[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2022-03-01 Thread Miklos Vajna (via logerrit)
 svx/source/unodraw/unoshap2.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 02b34caefc9fbcbdc2db45dba942783d384a5832
Author: Miklos Vajna 
AuthorDate: Tue Mar 1 08:34:32 2022 +0100
Commit: Michael Meeks 
CommitDate: Tue Mar 1 13:46:14 2022 +0100

svx: the SdrObject of SvxGraphicObject can be nullptr

Crashreport:

Graphic::GetType() const
vcl/inc/impgraph.hxx:122
SvxGraphicObject::getPropertyValueImpl(rtl::OUString const&, 
SfxItemPropertySimpleEntry const*, com::sun::star::uno::Any&)
svx/source/unodraw/unoshap2.cxx:1466 (discriminator 1)
SvxShape::_getPropertyValue(rtl::OUString const&)
svx/source/unodraw/unoshape.cxx:1747
non-virtual thunk to SvxShape::getPropertyValue(rtl::OUString 
const&)
svx/source/unodraw/unoshape.cxx:1732

During SVG export of a selected shape.

Change-Id: I29b56d49b0c5418dfe8fec8491ac8667e5ade2ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130740
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 
(cherry picked from commit 8311a2716924ad0bac7fc0a9e75279382a9553b0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130684

diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 688fd1b29ee6..19268527fc26 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1496,7 +1496,8 @@ bool SvxGraphicObject::getPropertyValueImpl( const 
OUString& rName, const SfxIte
 
 Reference xGraphic;
 auto pSdrGraphicObject = static_cast(GetSdrObject());
-if (pSdrGraphicObject->GetGraphicObject().GetType() != 
GraphicType::NONE)
+if (pSdrGraphicObject
+&& pSdrGraphicObject->GetGraphicObject().GetType() != 
GraphicType::NONE)
 xGraphic = pSdrGraphicObject->GetGraphic().GetXGraphic();
 rValue <<= xGraphic;
 break;


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2022-02-14 Thread Henry Castro (via logerrit)
 svx/source/svdraw/svdpntv.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 4d6d159bdfa6363eddf5cf92d67d14215053905f
Author: Henry Castro 
AuthorDate: Thu Feb 10 10:25:52 2022 -0400
Commit: Henry Castro 
CommitDate: Mon Feb 14 16:50:20 2022 +0100

svx: fix dynamic cast SdrView

Jan 19 13:48:41 ip-172-31-35-149 coolwsd[23647]: SUMMARY: 
UndefinedBehaviorSanitizer: undefined-behavior 
/home/collabora/online-buildscripts/staging/builddir/libreoffice/svx/source/sdr/contact/objectcontactofpageview.cxx:353:57
 in
Jan 19 13:48:41 ip-172-31-35-149 coolwsd[23647]: 
/home/collabora/online-buildscripts/staging/builddir/libreoffice/include/svx/svdview.hxx:235:65:
 runtime error: member access within address 0x61c000489880 which does not 
point to an object of type 'SdrView'
Jan 19 13:48:41 ip-172-31-35-149 coolwsd[23647]: 0x61c000489880: note: 
object is of type 'SdrPaintView'
Jan 19 13:48:41 ip-172-31-35-149 coolwsd[23647]:  7c 04 80 3b  90 58 b9 3d 
60 7f 00 00  30 51 96 0a 20 60 00 00  38 51 96 0a 20 60 00 00  38 51 96 0a
Jan 19 13:48:41 ip-172-31-35-149 coolwsd[23647]:   
^~~
Jan 19 13:48:41 ip-172-31-35-149 coolwsd[23647]:   vptr for 
'SdrPaintView'.

Change-Id: Ifc9177902ac834d400d6bf9f72b94e82f544b348
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129791
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129824
Tested-by: Jenkins CollaboraOffice 

diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index f4fa2e4783bc..d7a682272700 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -395,8 +395,11 @@ SdrPageView* SdrPaintView::ShowSdrPage(SdrPage* pPage)
 mpPageView.reset();
 }
 
-mpPageView.reset(new SdrPageView(pPage, *static_cast(this)));
-mpPageView->Show();
+if (SdrView *pView = dynamic_cast(this))
+{
+mpPageView.reset(new SdrPageView(pPage, *pView));
+mpPageView->Show();
+}
 }
 
 return mpPageView.get();


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2021-08-28 Thread Aron Budea (via logerrit)
 svx/source/tbxctrls/fontworkgallery.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2eca9fda89bb200cd1f34f5a272f2197a564a364
Author: Aron Budea 
AuthorDate: Sun Aug 29 03:18:43 2021 +0200
Commit: Aron Budea 
CommitDate: Sun Aug 29 06:24:33 2021 +0200

fix -Werror -Wsign-compare error on Android

Change-Id: I08ce05fa25af17d1df4ba17cae89ac11d860494a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121215
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 

diff --git a/svx/source/tbxctrls/fontworkgallery.cxx 
b/svx/source/tbxctrls/fontworkgallery.cxx
index afd2da9f8dfa..5834979d5152 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -215,7 +215,7 @@ void FontWorkGalleryDialog::insertSelectedFontwork()
 aPagePos.setX(convertTwipToMm100(aPagePos.X()));
 aPagePos.setY(convertTwipToMm100(aPagePos.Y()));
 
-sal_uInt32 nLOKViewWidth = 0.8 * 
convertTwipToMm100(pViewShell->getLOKVisibleArea().getWidth());
+sal_Int32 nLOKViewWidth = 0.8 * 
convertTwipToMm100(pViewShell->getLOKVisibleArea().getWidth());
 if (aFontworkSize.getWidth() > nLOKViewWidth)
 {
 double fScale = 
static_cast(aFontworkSize.getWidth()) / nLOKViewWidth;


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source sw/source

2021-07-05 Thread Dennis Francis (via logerrit)
 svx/source/svdraw/svdmrkv.cxx  |2 +-
 sw/source/core/crsr/crsrsh.cxx |7 +--
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 935563fddce9e0cb8a7fccc6f1901150dab31a00
Author: Dennis Francis 
AuthorDate: Thu Jun 24 12:38:45 2021 +0530
Commit: Miklos Vajna 
CommitDate: Mon Jul 5 08:55:39 2021 +0200

lok: fix incorrect multi-view table selection updates

Use the correct writer shell to fetch selected table info, else the
active view's table selection data is sent to all views which is
incorrect.

Also avoid interference from draw empty table updates in
SdrMarkView::SetMarkHandlesForLOKit() if we are in writer.

Change-Id: Iff8181a7d43712e3c9a23cee43a8b6b98ba032d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118000
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 61f7d472ecd6..738faec6175f 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1108,7 +1108,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, SfxView
 boost::property_tree::write_json(aStream, aTableJsonTree);
 
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TABLE_SELECTED, 
aStream.str().c_str());
 }
-else
+else if (!getSdrModelFromSdrView().IsWriter())
 {
 
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TABLE_SELECTED, "{}");
 }
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 7d3b70dbf363..7a3c3ec421b8 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -72,6 +72,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 using namespace com::sun::star;
@@ -2033,10 +2034,12 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, 
bool bIdleEnd )
 
 void SwCursorShell::sendLOKCursorUpdates()
 {
-SwWrtShell* pShell = GetDoc()->GetDocShell()->GetWrtShell();
-if (!pShell)
+SwView* pView = static_cast(GetSfxViewShell());
+if (!pView)
 return;
 
+SwWrtShell* pShell = >GetWrtShell();
+
 SwFrame* pCurrentFrame = GetCurrFrame();
 SelectionType eType = pShell->GetSelectionType();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source sw/source

2021-05-24 Thread merttumer (via logerrit)
 svx/source/svdraw/svdmrkv.cxx  |   21 -
 sw/source/core/draw/dview.cxx  |6 --
 sw/source/uibase/shells/drawsh.cxx |   12 +++-
 sw/source/uibase/uiview/view2.cxx  |7 ++-
 4 files changed, 37 insertions(+), 9 deletions(-)

New commits:
commit 0a5606dc180c7a643ff4820f7e05413398352b2d
Author: merttumer 
AuthorDate: Mon May 24 10:52:13 2021 +0300
Commit: Mert Tumer 
CommitDate: Tue May 25 06:19:44 2021 +0200

Extended MoveShapeHandle command for Anchors as well

Change-Id: I0e2811802f17831097a86103571b505a7557717a
Signed-off-by: merttumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116040
Tested-by: Jenkins CollaboraOffice 

diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 875d0dfc3993..61f7d472ecd6 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1002,6 +1002,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, SfxView
 {
 boost::property_tree::ptree responseJSON;
 boost::property_tree::ptree others;
+boost::property_tree::ptree anchor;
 boost::property_tree::ptree rectangle;
 boost::property_tree::ptree poly;
 boost::property_tree::ptree custom;
@@ -1036,6 +1037,14 @@ void 
SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, SfxView
 {
 selectedNode = 
 }
+else if (kind == 
static_cast(SdrHdlKind::Anchor) || kind == 
static_cast(SdrHdlKind::Anchor_TR))
+{
+if (getSdrModelFromSdrView().IsWriter())
+selectedNode = 
+else
+// put it to others as we dont render them except 
in writer
+selectedNode = 
+}
 else
 {
 selectedNode = 
@@ -1054,6 +1063,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, SfxView
 nodes.add_child("rectangle", rectangle);
 nodes.add_child("poly", poly);
 nodes.add_child("custom", custom);
+nodes.add_child("anchor", anchor);
 nodes.add_child("others", others);
 responseJSON.add_child("kinds", nodes);
 std::stringstream aStream;
@@ -1415,11 +1425,6 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* 
pOtherShell)
 }
 }
 
-// moved it here to access all the handles for callback.
-if (bTiledRendering && pViewShell)
-{
-SetMarkHandlesForLOKit(aRect, pOtherShell);
-}
 // rotation point/axis of reflection
 if(!bLimitedRotation)
 {
@@ -1432,6 +1437,12 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* 
pOtherShell)
 // add custom handles (used by other apps, e.g. AnchorPos)
 AddCustomHdl();
 
+// moved it here to access all the handles for callback.
+if (bTiledRendering && pViewShell)
+{
+SetMarkHandlesForLOKit(aRect, pOtherShell);
+}
+
 // try to restore focus handle index from remembered values
 if(bSaveOldFocus)
 {
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index c1a7b6a8cbbc..f9ef11b99897 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -239,8 +239,10 @@ void SwDrawView::AddCustomHdl()
 }
 
 // add anchor handle:
-maHdlList.AddHdl( std::make_unique( aPos, ( pAnch->IsVertical() 
&& !pAnch->IsVertLR() ) ||
- pAnch->IsRightToLeft() ) );
+std::unique_ptr hdl = std::make_unique( aPos, ( 
pAnch->IsVertical() && !pAnch->IsVertLR() ) ||
+ pAnch->IsRightToLeft() );
+hdl->SetObjHdlNum(maHdlList.GetHdlCount());
+maHdlList.AddHdl(std::move(hdl));
 }
 
 SdrObject* SwDrawView::GetMaxToTopObj( SdrObject* pObj ) const
diff --git a/sw/source/uibase/shells/drawsh.cxx 
b/sw/source/uibase/shells/drawsh.cxx
index a37d57f84e28..ef91d2efb9c3 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -231,7 +231,17 @@ void SwDrawShell::Execute(SfxRequest )
 const sal_uLong handleNum = handleNumItem->GetValue();
 const sal_uLong newPosX = newPosXTwips->GetValue();
 const sal_uLong newPosY = newPosYTwips->GetValue();
-pSdrView->MoveShapeHandle(handleNum, Point(newPosX, newPosY), 
OrdNum ? OrdNum->GetValue() : -1);
+const Point mPoint(newPosX, newPosY);
+const SdrHdl* handle = 
pSdrView->GetHdlList().GetHdl(handleNum);
+if (handle->GetKind() == SdrHdlKind::Anchor || 
handle->GetKind() == SdrHdlKind::Anchor_TR)
+{
+rSh.FindAnchorPos(mPoint, 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2021-05-24 Thread merttumer (via logerrit)
 svx/source/table/tablecontroller.cxx |   30 ++
 1 file changed, 22 insertions(+), 8 deletions(-)

New commits:
commit 86fad1dfee9f6678cdca46c607c6a05306ac622e
Author: merttumer 
AuthorDate: Mon May 17 05:52:01 2021 +0300
Commit: Mert Tumer 
CommitDate: Tue May 25 06:18:33 2021 +0200

Implemented Delete key deletes the table when all the cells are selected

Change-Id: I8a17c73781a3399b214d5655b83036652933a90a
Signed-off-by: merttumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115689
Tested-by: Jenkins CollaboraOffice 

diff --git a/svx/source/table/tablecontroller.cxx 
b/svx/source/table/tablecontroller.cxx
index 464d8290e572..eee8278090ed 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -1419,30 +1419,44 @@ bool SvxTableController::DeleteMarked()
 SdrTableObj& rTableObj(*mxTableObj.get());
 SdrModel& rModel(rTableObj.getSdrModelFromSdrObject());
 const bool bUndo(rModel.IsUndoEnabled());
+bool bDeleteTable = false;
 
 if (bUndo)
 rModel.BegUndo(SvxResId(STR_TABLE_DELETE_CELL_CONTENTS));
 
 CellPos aStart, aEnd;
 getSelectedCells( aStart, aEnd );
-for( sal_Int32 nRow = aStart.mnRow; nRow <= aEnd.mnRow; nRow++ )
+const sal_Int32 nRemovedColumns = aEnd.mnCol - aStart.mnCol + 1;
+const sal_Int32 nRemovedRows = aEnd.mnRow - aStart.mnRow + 1;
+if( nRemovedColumns == mxTable->getColumnCount() && nRemovedRows == 
mxTable->getRowCount())
 {
-for( sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol; nCol++ )
+bDeleteTable = true;
+}
+else
+{
+for( sal_Int32 nRow = aStart.mnRow; nRow <= aEnd.mnRow; nRow++ )
 {
-CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( 
nCol, nRow ).get() ) );
-if (xCell.is() && xCell->hasText())
+for( sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol; nCol++ )
 {
-if (bUndo)
-xCell->AddUndo();
-xCell->SetOutlinerParaObject(nullptr);
+CellRef xCell( dynamic_cast< Cell* >( 
mxTable->getCellByPosition( nCol, nRow ).get() ) );
+if (xCell.is() && xCell->hasText())
+{
+if (bUndo)
+xCell->AddUndo();
+xCell->SetOutlinerParaObject(nullptr);
+}
 }
 }
 }
 
+if (bDeleteTable)
+mrView.DeleteMarkedObj();
+
 if (bUndo)
 rModel.EndUndo();
 
-UpdateTableShape();
+if (!bDeleteTable)
+UpdateTableShape();
 return true;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2021-04-22 Thread merttumer (via logerrit)
 svx/source/svdraw/svdview.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit e7ef006f2f3d27904618adf59dd8b2f2c403f30a
Author: merttumer 
AuthorDate: Wed Apr 21 12:05:07 2021 +0300
Commit: Mert Tumer 
CommitDate: Thu Apr 22 09:17:34 2021 +0200

lok: Edit the click selected cell on table selection

for LOK case, it should start editing when table is selected
from the cell that is under the cursor instead of selecting the
table object.

Change-Id: Ibb3fa41377b76edcdcc2be7419838a151ff765fe
Signed-off-by: merttumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114386
Tested-by: Jenkins CollaboraOffice 

diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index bb677b7707e6..2c784b6a6e2e 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -56,6 +56,7 @@
 #include 
 #include 
 #include 
+#include 
 
 
 SdrViewEvent::SdrViewEvent()
@@ -385,7 +386,9 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, 
SdrViewEvent& rVEvt) co
 // for e.g. URL links when hoovering and clicking
 // them will not work. Tried several other changes,
 // but this one safely keeps existing behaviour as-is.
-eHit = SdrHitKind::UnmarkedObject;
+// Except for the LOK. LOK doesn't have hoovering popup
+// feature.
+eHit = comphelper::LibreOfficeKit::isActive() ? 
SdrHitKind::TextEditObj : SdrHitKind::UnmarkedObject;
 break;
 default:
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2021-04-18 Thread merttumer (via logerrit)
 svx/source/table/svdotable.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit a20fee0312bd3bcf41e88cdb8a84d0ee10de901f
Author: merttumer 
AuthorDate: Thu Apr 15 11:27:08 2021 +0300
Commit: Mert Tumer 
CommitDate: Mon Apr 19 07:52:31 2021 +0200

Fix Row size change is not updated

Row size is not taken into account when there is a change
Only if column size/position changes, it starts updating

Change-Id: I99f3aa9fe0e7f3428234062a2520ca8a61984067
Signed-off-by: merttumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114130
Reviewed-by: Jan Holesovsky 
Tested-by: Jenkins CollaboraOffice 

diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 77dc10165480..18e94d7a9bae 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -245,6 +245,7 @@ private:
 static sal_Int32 lastRowCount;
 static sal_Int32 lastColCount;
 static std::vector lastColWidths;
+static bool rowSizeChanged;
 };
 
 SdrTableObjImpl* SdrTableObjImpl::lastLayoutTable = nullptr;
@@ -255,6 +256,7 @@ bool SdrTableObjImpl::lastLayoutFitHeight;
 WritingMode SdrTableObjImpl::lastLayoutMode;
 sal_Int32 SdrTableObjImpl::lastRowCount;
 sal_Int32 SdrTableObjImpl::lastColCount;
+bool SdrTableObjImpl::rowSizeChanged = false;
 std::vector SdrTableObjImpl::lastColWidths;
 
 SdrTableObjImpl::SdrTableObjImpl()
@@ -599,6 +601,7 @@ void SdrTableObjImpl::DragEdge( bool mbHorizontal, int 
nEdge, sal_Int32 nOffset
 Reference< XIndexAccess > xRows( mxTable->getRows(), 
UNO_QUERY_THROW );
 Reference< XPropertySet > xRowSet( xRows->getByIndex( 
(!nEdge)?nEdge:(nEdge-1) ), UNO_QUERY_THROW );
 xRowSet->setPropertyValue( sSize, Any( nHeight ) );
+rowSizeChanged = true;
 }
 }
 else
@@ -801,7 +804,8 @@ void SdrTableObjImpl::LayoutTable( tools::Rectangle& rArea, 
bool bFitWidth, bool
 || lastLayoutMode != writingMode
 || lastRowCount != getRowCount()
 || lastColCount != getColumnCount()
-|| lastColWidths != getColumnWidths() )
+|| lastColWidths != getColumnWidths()
+|| rowSizeChanged )
 {
 lastLayoutTable = this;
 lastLayoutInputRectangle = rArea;
@@ -816,6 +820,7 @@ void SdrTableObjImpl::LayoutTable( tools::Rectangle& rArea, 
bool bFitWidth, bool
 TableModelNotifyGuard aGuard( mxTable.get() );
 mpLayouter->LayoutTable( rArea, bFitWidth, bFitHeight );
 lastLayoutResultRectangle = rArea;
+rowSizeChanged = false;
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2021-04-08 Thread merttumer (via logerrit)
 svx/source/svdraw/svdglue.cxx |5 +
 svx/source/svdraw/svdpntv.cxx |5 +
 2 files changed, 10 insertions(+)

New commits:
commit dedd720cf7188bb1e70f977099c5cee76e83541d
Author: merttumer 
AuthorDate: Thu Mar 11 10:33:04 2021 +0300
Commit: Mert Tumer 
CommitDate: Fri Apr 9 07:09:50 2021 +0200

lok: Don't invalidate GluePoints

Change-Id: Ie579b31e6ee2067f5b88464c62c0870b68a461a2
Signed-off-by: merttumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112315
Tested-by: Jenkins CollaboraOffice 

diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx
index 2f9d53028988..f9a6992a0ec7 100644
--- a/svx/source/svdraw/svdglue.cxx
+++ b/svx/source/svdraw/svdglue.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static const Size aGlueHalfSize(4,4);
 
@@ -253,6 +254,8 @@ void SdrGluePoint::Shear(const Point& rRef, double tn, bool 
bVShear, const SdrOb
 
 void SdrGluePoint::Invalidate(vcl::Window& rWin, const SdrObject* pObj) const
 {
+if (comphelper::LibreOfficeKit::isActive())
+return;
 bool bMapMode=rWin.IsMapModeEnabled();
 Point aPt(pObj!=nullptr ? GetAbsolutePos(*pObj) : GetPos());
 aPt=rWin.LogicToPixel(aPt);
@@ -329,6 +332,8 @@ sal_uInt16 SdrGluePointList::Insert(const SdrGluePoint& rGP)
 
 void SdrGluePointList::Invalidate(vcl::Window& rWin, const SdrObject* pObj) 
const
 {
+if (comphelper::LibreOfficeKit::isActive())
+return;
 for (auto& xGP : aList)
 xGP->Invalidate(rWin,pObj);
 }
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index ec2a3b1917c5..f4fa2e4783bc 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -823,6 +823,11 @@ bool SdrPaintView::KeyInput(const KeyEvent& /*rKEvt*/, 
vcl::Window* /*pWin*/)
 
 void SdrPaintView::GlueInvalidate() const
 {
+// Do not invalidate GluePoints in Online
+// They are handled on front-end
+if (comphelper::LibreOfficeKit::isActive())
+return;
+
 const sal_uInt32 nWindowCount(PaintWindowCount());
 
 for(sal_uInt32 nWinNum(0); nWinNum < nWindowCount; nWinNum++)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2021-04-08 Thread merttumer (via logerrit)
 svx/source/sdr/contact/objectcontactofpageview.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit b3b231b7b44fb81efd2ee72cb08deec3997f6431
Author: merttumer 
AuthorDate: Thu Mar 11 09:52:00 2021 +0300
Commit: Mert Tumer 
CommitDate: Fri Apr 9 07:09:18 2021 +0200

Hide GluePoints in LOK

Change-Id: Ibf6bba4cdc69bd8479ccc08b5d9695253ef81890
Signed-off-by: merttumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112314
Tested-by: Jenkins CollaboraOffice 

diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx 
b/svx/source/sdr/contact/objectcontactofpageview.cxx
index 5838a1610e0f..d0756018d7b2 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -348,7 +348,8 @@ namespace sdr
 // Get info about the need to visualize GluePoints
 bool ObjectContactOfPageView::AreGluePointsVisible() const
 {
-return GetPageWindow().GetPageView().GetView().ImpIsGlueVisible();
+bool bTiledRendering = comphelper::LibreOfficeKit::isActive();
+return !bTiledRendering && 
GetPageWindow().GetPageView().GetView().ImpIsGlueVisible();
 }
 
 // check if text animation is allowed.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2021-03-18 Thread merttumer (via logerrit)
 svx/source/sdr/contact/viewobjectcontact.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit b4296e1b462ddf626fe2ec2f9f5935993759ff86
Author: merttumer 
AuthorDate: Wed Mar 17 09:01:45 2021 +0300
Commit: Jan Holesovsky 
CommitDate: Thu Mar 18 10:06:10 2021 +0100

LOK: Fix wrong gridOffset when shape is moved on calc

Change-Id: I37501128068943cee8f67a5d91a35ec1a76fe550
Signed-off-by: merttumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112599
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 
Reviewed-by: Jan Holesovsky 

diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx 
b/svx/source/sdr/contact/viewobjectcontact.cxx
index 882b911a8fab..89e099da71c3 100644
--- a/svx/source/sdr/contact/viewobjectcontact.cxx
+++ b/svx/source/sdr/contact/viewobjectcontact.cxx
@@ -234,8 +234,11 @@ void ViewObjectContact::ActionChanged()
 // invalidate current valid range
 GetObjectContact().InvalidatePartOfView(maObjectRange);
 
-// reset ObjectRange, it needs to be recalculated
-maObjectRange.reset();
+// reset gridOffset, it needs to be recalculated
+if (GetObjectContact().supportsGridOffsets())
+resetGridOffset();
+else
+maObjectRange.reset();
 }
 
 // register at OC for lazy invalidate
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source sw/source

2021-03-04 Thread Szymon Kłos (via logerrit)
 svx/source/inc/StylesPreviewWindow.hxx  |   16 +-
 svx/source/tbxctrls/StylesPreviewWindow.cxx |   32 +---
 sw/source/uibase/app/docst.cxx  |4 +++
 3 files changed, 48 insertions(+), 4 deletions(-)

New commits:
commit 145fba733121fe36d29d10fa62ce8ab90e00b891
Author: Szymon Kłos 
AuthorDate: Tue Mar 2 12:18:21 2021 +0100
Commit: Szymon Kłos 
CommitDate: Thu Mar 4 12:32:45 2021 +0100

Styles preview: use listener to trigger update

Do not render all styles on every selection change.
Use listener to detect styles modification.

Change-Id: I6d41acd7acad160d1477281d2b3d473233def4d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111833
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/svx/source/inc/StylesPreviewWindow.hxx 
b/svx/source/inc/StylesPreviewWindow.hxx
index 99e59037b617..ce4f6eb6d4a8 100644
--- a/svx/source/inc/StylesPreviewWindow.hxx
+++ b/svx/source/inc/StylesPreviewWindow.hxx
@@ -40,6 +40,19 @@ public:
 void StateChanged(SfxItemState eState, const SfxPoolItem* pState) override;
 };
 
+
+class StylePoolChangeListener : public SfxListener
+{
+StylesPreviewWindow_Base* m_pPreviewControl;
+SfxStyleSheetBasePool* m_pStyleSheetPool;
+
+public:
+StylePoolChangeListener(StylesPreviewWindow_Base* pPreviewControl);
+~StylePoolChangeListener();
+
+virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
+};
+
 class StyleItemController
 {
 static constexpr unsigned LEFT_MARGIN = 8;
@@ -75,6 +88,7 @@ protected:
 std::unique_ptr m_xStylesView;
 
 StyleStatusListener* m_pStatusListener;
+std::unique_ptr m_pStylePoolChangeListener;
 css::uno::Reference m_xStatusListener;
 
 std::vector> m_aDefaultStyles;
@@ -93,10 +107,10 @@ public:
 ~StylesPreviewWindow_Base();
 
 void Select(const OUString& rStyleName);
+void UpdateStylesList();
 
 private:
 void Update();
-void UpdateStylesList();
 bool Command(const CommandEvent& rEvent);
 };
 
diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx 
b/svx/source/tbxctrls/StylesPreviewWindow.cxx
index 5413056e2177..0520f5c99a24 100644
--- a/svx/source/tbxctrls/StylesPreviewWindow.cxx
+++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx
@@ -72,6 +72,32 @@ void StyleStatusListener::StateChanged(SfxItemState 
/*eState*/, const SfxPoolIte
 m_pPreviewControl->Select(pStateItem->GetStyleName());
 }
 
+StylePoolChangeListener::StylePoolChangeListener(StylesPreviewWindow_Base* 
pPreviewControl)
+: SfxListener()
+, m_pPreviewControl(pPreviewControl)
+{
+SfxObjectShell* pDocShell = SfxObjectShell::Current();
+
+if (pDocShell)
+m_pStyleSheetPool = pDocShell->GetStyleSheetPool();
+
+if (m_pStyleSheetPool)
+{
+StartListening(*m_pStyleSheetPool);
+}
+}
+
+StylePoolChangeListener::~StylePoolChangeListener()
+{
+if (m_pStyleSheetPool)
+EndListening(*m_pStyleSheetPool);
+}
+
+void StylePoolChangeListener::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& 
/*rHint*/)
+{
+m_pPreviewControl->UpdateStylesList();
+}
+
 StyleItemController::StyleItemController(const std::pair& 
aStyleName)
 : m_eStyleFamily(SfxStyleFamily::Para)
 , m_aStyleName(aStyleName)
@@ -349,6 +375,9 @@ StylesPreviewWindow_Base::StylesPreviewWindow_Base(
 m_pStatusListener = new StyleStatusListener(this, xDispatchProvider);
 m_xStatusListener.set(static_cast(m_pStatusListener), 
css::uno::UNO_QUERY);
 
+m_pStylePoolChangeListener.reset(new StylePoolChangeListener(this));
+
+UpdateStylesList();
 Update();
 }
 
@@ -404,14 +433,11 @@ void StylesPreviewWindow_Base::Select(const OUString& 
rStyleName)
 {
 m_sSelectedStyle = rStyleName;
 
-UpdateStylesList();
 Update();
 }
 
 void StylesPreviewWindow_Base::Update()
 {
-UpdateStylesList();
-
 for (unsigned long i = 0; i < m_aAllStyles.size(); ++i)
 {
 if (m_aAllStyles[i].first == m_sSelectedStyle || 
m_aAllStyles[i].second == m_sSelectedStyle)
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index b2656c925620..2e25b89ea9e6 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -1314,6 +1314,8 @@ void SwDocShell::UpdateStyle(const OUString , 
SfxStyleFamily nFamily, SwWr
 break;
 default: break;
 }
+
+m_xDoc->BroadcastStyleOperation(rName, nFamily, 
SfxHintId::StyleSheetModified);
 }
 
 // NewByExample
@@ -1507,6 +1509,8 @@ void SwDocShell::MakeByExample( const OUString , 
SfxStyleFamily nFamily,
 
 default: break;
 }
+
+m_xDoc->BroadcastStyleOperation(rName, nFamily, 
SfxHintId::StyleSheetCreated);
 }
 
 std::set SwDocShell::GetDocColors()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2021-03-01 Thread mert (via logerrit)
 svx/source/svdraw/svdview.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 7ca91edcb5e6f2fd744d15cdb67800eb99b19504
Author: mert 
AuthorDate: Mon Mar 1 06:00:11 2021 +0300
Commit: Mert Tumer 
CommitDate: Mon Mar 1 11:28:28 2021 +0100

Fix crash while moving handle when shape text is active

Change-Id: Ie21398917bc204245837215f1eade78e11c61890
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111726
Tested-by: Jenkins CollaboraOffice 

diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 27b1c67c6551..394b3af6bd06 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -1428,6 +1428,9 @@ bool SdrView::BegMark(const Point& rPnt, bool bAddMark, 
bool bUnmark)
 
 bool SdrView::MoveShapeHandle(const sal_uInt32 handleNum, const Point& 
aEndPoint)
 {
+if (GetHdlList().IsMoveOutside())
+return false;
+
 if (!GetMarkedObjectList().GetMarkCount())
 return false;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2021-02-24 Thread mert (via logerrit)
 svx/source/svdraw/svdmrkv.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 3e885c29ff1a295a20fdb8688d2875dd2a5fccd8
Author: mert 
AuthorDate: Wed Feb 24 06:22:49 2021 +0300
Commit: Mert Tumer 
CommitDate: Wed Feb 24 09:59:50 2021 +0100

Fix chart sub element rectangle and handle positions

Change-Id: I486b542ae0bb4a987c98d92c1866895eafcf620c
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111440
Tested-by: Jenkins CollaboraOffice 

diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index beda9a2c3621..db05163b1ec4 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -709,7 +709,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, SfxView
 
 tools::Rectangle aSelection(rRect);
 bool bIsChart = false;
-
+Point addLogicOffset = Point(0,0);
 if (!rRect.IsEmpty())
 {
 sal_uInt32 nTotalPaintWindows = this->PaintWindowCount();
@@ -724,6 +724,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, SfxView
 {
 Point aOffsetPx = 
pWin->GetOffsetPixelFrom(*pViewShellWindow);
 Point aLogicOffset = pWin->PixelToLogic(aOffsetPx);
+addLogicOffset = aLogicOffset;
 aSelection.Move(aLogicOffset.getX(), aLogicOffset.getY());
 }
 }
@@ -883,8 +884,6 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, SfxView
 }
 sPolygonElem += R"elem(\" 
style=\"stroke: none; fill: rgb(114,159,207); fill-opacity: 0.8\"/>)elem";
 
-aSelection = 
OutputDevice::LogicToLogic(aSelection, MapMode(MapUnit::MapTwip), 
MapMode(MapUnit::Map100thMM));
-
 OString sSVGElem = R"elem((pHdl->GetPointer()));
 Point pHdlPos = pHdl->GetPos();
+pHdlPos.Move(addLogicOffset.getX(), addLogicOffset.getY());
 if (convertMapMode)
 pHdlPos = OutputDevice::LogicToLogic(pHdlPos, 
MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
 point.put("x", pHdlPos.getX());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2021-02-23 Thread mert (via logerrit)
 svx/source/svdraw/svdmrkv.cxx  |9 ++---
 svx/source/svdraw/svdoedge.cxx |2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 82e6ded597e5f448cac213b1c8b72a5ff2660392
Author: mert 
AuthorDate: Fri Feb 19 09:55:12 2021 +0300
Commit: Mert Tumer 
CommitDate: Wed Feb 24 08:37:57 2021 +0100

Convert MapModeUnits If necessary.

Connecting to a glue point or handle callback messages
contain points which may need a unit conversion depending
on the module

Change-Id: Icc0b2bc5981bb7d135efd38e60ac06fe12a70480
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93
Tested-by: Jenkins CollaboraOffice 

diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index e3b122d11938..beda9a2c3621 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -917,6 +917,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, SfxView
 boost::property_tree::ptree poly;
 boost::property_tree::ptree custom;
 boost::property_tree::ptree nodes;
+const bool convertMapMode = 
mpMarkedPV->GetView().GetFirstOutputDevice()->GetMapMode().GetMapUnit() == 
MapUnit::Map100thMM;
 for (size_t i = 0; i < maHdlList.GetHdlCount(); i++)
 {
 SdrHdl *pHdl = maHdlList.GetHdl(i);
@@ -926,8 +927,11 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, SfxView
 child.put("id", pHdl->GetObjHdlNum());
 child.put("kind", kind);
 child.put("pointer", 
static_cast(pHdl->GetPointer()));
-point.put("x", convertMm100ToTwip(pHdl->GetPos().getX()));
-point.put("y", convertMm100ToTwip(pHdl->GetPos().getY()));
+Point pHdlPos = pHdl->GetPos();
+if (convertMapMode)
+pHdlPos = OutputDevice::LogicToLogic(pHdlPos, 
MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
+point.put("x", pHdlPos.getX());
+point.put("y", pHdlPos.getY());
 child.add_child("point", point);
 const auto node = std::make_pair("", child);
 boost::property_tree::ptree* selectedNode = nullptr;
@@ -957,7 +961,6 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, SfxView
 }
 else
 kindNode.get().push_back(node);
-
 }
 nodes.add_child("rectangle", rectangle);
 nodes.add_child("poly", poly);
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 5946ecadc4c4..99dee49aa2d2 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -2140,7 +2140,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const 
SdrPageView& rPV, SdrO
 // sensitive area of connectors is twice as large as the one of the handles
 sal_uInt16 nMarkHdSiz=rPV.GetView().GetMarkHdlSizePixel();
 Size aHalfConSiz(nMarkHdSiz,nMarkHdSiz);
-if (comphelper::LibreOfficeKit::isActive())
+if (comphelper::LibreOfficeKit::isActive() && 
pOut->GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
 aHalfConSiz=pOut->PixelToLogic(aHalfConSiz, 
MapMode(MapUnit::Map100thMM));
 else
 aHalfConSiz=pOut->PixelToLogic(aHalfConSiz);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2021-02-23 Thread mert (via logerrit)
 svx/source/svdraw/svdoedge.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 4f12603d84b46eaae30a67274983d3a49ecc2ece
Author: mert 
AuthorDate: Wed Feb 17 09:12:25 2021 +0300
Commit: Mert Tumer 
CommitDate: Wed Feb 24 08:37:11 2021 +0100

Fix connectors cannot select a glue point

Change-Id: I6b6d2dad27910ac6d5de43e9d0992e3565f5be5e
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111024

diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 8b84492dd48f..5946ecadc4c4 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -49,6 +49,7 @@
 #include 
 #include 
 #include 
+#include 
 
 void SdrObjConnection::ResetVars()
 {
@@ -2139,7 +2140,10 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, 
const SdrPageView& rPV, SdrO
 // sensitive area of connectors is twice as large as the one of the handles
 sal_uInt16 nMarkHdSiz=rPV.GetView().GetMarkHdlSizePixel();
 Size aHalfConSiz(nMarkHdSiz,nMarkHdSiz);
-aHalfConSiz=pOut->PixelToLogic(aHalfConSiz);
+if (comphelper::LibreOfficeKit::isActive())
+aHalfConSiz=pOut->PixelToLogic(aHalfConSiz, 
MapMode(MapUnit::Map100thMM));
+else
+aHalfConSiz=pOut->PixelToLogic(aHalfConSiz);
 tools::Rectangle aMouseRect(rPt,rPt);
 aMouseRect.AdjustLeft( -(aHalfConSiz.Width()) );
 aMouseRect.AdjustTop( -(aHalfConSiz.Height()) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2021-02-23 Thread mert (via logerrit)
 svx/source/svdraw/svdmrkv.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3b43ecb2ca5a2dde5c7864002f7aa5a23a4fcafd
Author: mert 
AuthorDate: Mon Feb 8 10:31:38 2021 +0300
Commit: Mert Tumer 
CommitDate: Wed Feb 24 08:36:12 2021 +0100

Exclude table selection from handle message

Change-Id: Ic079c2d59040c8b6d714af3932d5294c2060edc0
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110548
Tested-by: Jenkins CollaboraOffice 

diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index ecaa8f622edd..e3b122d11938 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -909,7 +909,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, SfxView
 }
 }
 }
-if (!pOtherShell && maHdlList.GetHdlCount())
+if (!bTableSelection && !pOtherShell && maHdlList.GetHdlCount())
 {
 boost::property_tree::ptree responseJSON;
 boost::property_tree::ptree others;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2021-02-23 Thread mert (via logerrit)
 svx/source/svdraw/svdmrkv.cxx |   83 +-
 1 file changed, 75 insertions(+), 8 deletions(-)

New commits:
commit e6c31a24dd9555b06e9492bfc2d755ba677ee7b6
Author: mert 
AuthorDate: Mon Jan 4 22:39:56 2021 +0300
Commit: Mert Tumer 
CommitDate: Wed Feb 24 08:32:10 2021 +0100

Send handle information of selected shapes to LOK

Include the handle information to the callback for
the new uno command for interactive dragging/resizing
operations.

Change-Id: I57c03abc22d3831606da2b698f1de080e9b4da78
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108686
Tested-by: Jenkins CollaboraOffice 

diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 5b3a77e3e5a8..ecaa8f622edd 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -71,6 +71,7 @@
 #include 
 
 #include 
+#include 
 
 using namespace com::sun::star;
 
@@ -747,6 +748,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, SfxView
 
 {
 OString sSelectionText;
+OString sSelectionTextView;
 boost::property_tree::ptree aTableJsonTree;
 bool bTableSelection = false;
 
@@ -770,6 +772,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, SfxView
 }
 
 OStringBuffer aExtraInfo;
+OString handleArrayStr;
 
 aExtraInfo.append("{\"id\":\"");
 
aExtraInfo.append(OString::number(reinterpret_cast(pO)));
@@ -906,18 +909,82 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, SfxView
 }
 }
 }
-aExtraInfo.append("}");
+if (!pOtherShell && maHdlList.GetHdlCount())
+{
+boost::property_tree::ptree responseJSON;
+boost::property_tree::ptree others;
+boost::property_tree::ptree rectangle;
+boost::property_tree::ptree poly;
+boost::property_tree::ptree custom;
+boost::property_tree::ptree nodes;
+for (size_t i = 0; i < maHdlList.GetHdlCount(); i++)
+{
+SdrHdl *pHdl = maHdlList.GetHdl(i);
+boost::property_tree::ptree child;
+boost::property_tree::ptree point;
+sal_Int32 kind = static_cast(pHdl->GetKind());
+child.put("id", pHdl->GetObjHdlNum());
+child.put("kind", kind);
+child.put("pointer", 
static_cast(pHdl->GetPointer()));
+point.put("x", convertMm100ToTwip(pHdl->GetPos().getX()));
+point.put("y", convertMm100ToTwip(pHdl->GetPos().getY()));
+child.add_child("point", point);
+const auto node = std::make_pair("", child);
+boost::property_tree::ptree* selectedNode = nullptr;
+if (kind >= static_cast(SdrHdlKind::UpperLeft) 
&& kind <= static_cast(SdrHdlKind::LowerRight))
+{
+selectedNode = 
+}
+else if (kind == static_cast(SdrHdlKind::Poly))
+{
+selectedNode = 
+}
+else if (kind == 
static_cast(SdrHdlKind::CustomShape1))
+{
+selectedNode = 
+}
+else
+{
+selectedNode = 
+}
+std::string sKind = std::to_string(kind);
+boost::optional< boost::property_tree::ptree& > kindNode = 
selectedNode->get_child_optional(sKind.c_str());
+if (!kindNode)
+{
+boost::property_tree::ptree newChild;
+newChild.push_back(node);
+selectedNode->add_child(sKind.c_str(), newChild);
+}
+else
+kindNode.get().push_back(node);
 
+}
+nodes.add_child("rectangle", rectangle);
+nodes.add_child("poly", poly);
+nodes.add_child("custom", custom);
+nodes.add_child("others", others);
+responseJSON.add_child("kinds", nodes);
+std::stringstream aStream;
+boost::property_tree::write_json(aStream, responseJSON, 
/*pretty=*/ false);
+handleArrayStr = ", \"handles\":";
+handleArrayStr += aStream.str().c_str();
+}
 sSelectionText = aSelection.toString() +
 ", " + OString::number(nRotAngle);
 if (!aExtraInfo.isEmpty())
 {
+sSelectionTextView = sSelectionText + ", " + 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2021-02-17 Thread Gülşah Köse (via logerrit)
 svx/source/table/tablelayouter.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 52a666e3ee429c1041ab74b1c005cf484b7e0d6f
Author: Gülşah Köse 
AuthorDate: Wed Feb 10 08:49:28 2021 +0300
Commit: Miklos Vajna 
CommitDate: Wed Feb 17 09:15:27 2021 +0100

tdf#139511 Correct calculation of minimum row height during resize.

Change-Id: Id47b5877d56850c80395897a83daae8e24f5c099
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110662
Tested-by: Jenkins
Reviewed-by: Gülşah Köse 
(cherry picked from commit b6d53ce5359d4f41b9fece475339cdf63c5817e9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110930
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/svx/source/table/tablelayouter.cxx 
b/svx/source/table/tablelayouter.cxx
index 3e7ff37c00ac..5ee25af7be86 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -794,7 +794,7 @@ void TableLayouter::LayoutTableHeight( tools::Rectangle& 
rArea, bool bFit )
 // Case 2: * Row has "Heigth" property
 // * Calculated minimum heigth is bigger than 
Height propery value and
 // * Row has not any text of any cell in edit 
mode in the row (means completely empty)
-if ((nMinHeight < nRowPropHeight && nRowPropHeight > 0 ) ||
+if ((nMinHeight < nRowPropHeight && nRowPropHeight > 0 && 
(bRowHasText || bRowHasCellInEditMode)) ||
 (nMinHeight > nRowPropHeight && nRowPropHeight > 0 && 
(!bRowHasText && !bRowHasCellInEditMode)))
 {
 nMinHeight = nRowPropHeight;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2021-01-20 Thread Szymon Kłos (via logerrit)
 svx/source/tbxctrls/fontworkgallery.cxx |   15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 29c15be71f8c12e1116ef80d515fe3f734cd183f
Author: Szymon Kłos 
AuthorDate: Wed Jan 20 10:02:53 2021 +0100
Commit: Szymon Kłos 
CommitDate: Wed Jan 20 11:23:15 2021 +0100

Don't insert fontwork outside view

Change-Id: Ib518cc6c70e2595cc191cd353b628729fd220de7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109665
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/svx/source/tbxctrls/fontworkgallery.cxx 
b/svx/source/tbxctrls/fontworkgallery.cxx
index edd3748400fb..e04978139236 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -200,10 +200,19 @@ void FontWorkGalleryDialog::insertSelectedFontwork()
 // pNewObject->SetPage(nullptr);
 
 tools::Rectangle aObjRect( pNewObject->GetLogicRect() );
-tools::Rectangle aVisArea = 
pOutDev->PixelToLogic(tools::Rectangle(Point(0,0), 
pOutDev->GetOutputSizePixel()));
+Size aSize = pOutDev->GetOutputSizePixel();
+tools::Rectangle aVisArea = 
pOutDev->PixelToLogic(tools::Rectangle(Point(0,0), aSize));
+
 Point aPagePos = aVisArea.Center();
-aPagePos.AdjustX( -(aObjRect.GetWidth() / 2) );
-aPagePos.AdjustY( -(aObjRect.GetHeight() / 2) );
+bool bIsInsertedObjectSmallerThanVisibleArea =
+aVisArea.GetSize().getHeight() > 
aObjRect.GetSize().getHeight()
+&& aVisArea.GetSize().getWidth() > 
aObjRect.GetSize().getWidth();
+if (bIsInsertedObjectSmallerThanVisibleArea)
+{
+aPagePos.AdjustX( -(aObjRect.GetWidth() / 2) );
+aPagePos.AdjustY( -(aObjRect.GetHeight() / 2) );
+}
+
 tools::Rectangle aNewObjectRectangle(aPagePos, 
aObjRect.GetSize());
 pNewObject->SetLogicRect(aNewObjectRectangle);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-10-08 Thread Tomaž Vajngerl (via logerrit)
 svx/source/table/tablecontroller.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b7f3d35ecd63b503fb2fb9685b5475cef63fcbea
Author: Tomaž Vajngerl 
AuthorDate: Fri Oct 2 12:02:42 2020 +0200
Commit: Tomaž Vajngerl 
CommitDate: Thu Oct 8 16:28:29 2020 +0200

rearrange to not use pUndoObject after std::move

pGeoUndo is always nullptr in this case because of std::move, so
the SetSkipChangeLayout is never set.

Issue since: https://gerrit.libreoffice.org/c/core/+/78201

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103827
Reviewed-by: Tomaž Vajngerl 
Tested-by: Tomaž Vajngerl 
(cherry picked from commit e31474d71235bccee8568c4a952a8319bddf39e0)

Change-Id: I4f1dcb3a25adeb0737e03aa9e9dfb193969250b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103894
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 

diff --git a/svx/source/table/tablecontroller.cxx 
b/svx/source/table/tablecontroller.cxx
index d6541073be6e..232ed782414a 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -1529,11 +1529,11 @@ void SvxTableController::changeTableEdge(const 
SfxRequest& rReq)
 {
 auto pUndoObject = 
rModel.GetSdrUndoFactory().CreateUndoGeoObject(rTableObj);
 rModel.BegUndo(pUndoObject->GetComment());
-rModel.AddUndo(std::move(pUndoObject));
 
 auto* pGeoUndo = 
static_cast(pUndoObject.get());
 if (pGeoUndo)
 pGeoUndo->SetSkipChangeLayout(true);
+rModel.AddUndo(std::move(pUndoObject));
 }
 tools::Rectangle aBoundRect;
 if (rTableObj.GetUserCall())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-09-22 Thread Szymon Kłos (via logerrit)
 svx/source/tbxctrls/tbcontrl.cxx |   27 +++
 1 file changed, 19 insertions(+), 8 deletions(-)

New commits:
commit 5d8390a36e45c14a38c02cafd935512ea58fbfe6
Author: Szymon Kłos 
AuthorDate: Fri Sep 18 13:26:41 2020 +0200
Commit: Szymon Kłos 
CommitDate: Tue Sep 22 08:33:05 2020 +0200

Use translated standard styles for styles listbox

In online we can have users with multiple languages.
Select style in sidebar depending on translated name
and also universal/English.

Change-Id: Ia33df29526e5fd8de5c7e0f7f6f74e0b0f559477
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103000
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index e49ac60442a8..50e3f6760867 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2847,7 +2847,7 @@ struct SvxStyleToolBoxControl::Impl
 {
 OUString aClearForm;
 OUString aMore;
-::std::vector< OUString >aDefaultStyles;
+::std::vector< std::pair< OUString, OUString > >aDefaultStyles;
 bool bSpecModeWriter;
 bool bSpecModeCalc;
 
@@ -2893,7 +2893,8 @@ struct SvxStyleToolBoxControl::Impl
 OUString sName;
 xStyle->getPropertyValue("DisplayName") >>= sName;
 if( !sName.isEmpty() )
-aDefaultStyles.push_back(sName);
+aDefaultStyles.push_back(
+std::pair(aStyle, sName) );
 }
 catch( const uno::Exception& )
 {}
@@ -2924,7 +2925,8 @@ struct SvxStyleToolBoxControl::Impl
 OUString sName;
 xStyle->getPropertyValue("DisplayName") >>= sName;
 if( !sName.isEmpty() )
-aDefaultStyles.push_back(sName);
+aDefaultStyles.push_back(
+std::pair(sStyleName, 
sName) );
 }
 }
 catch( const uno::Exception& )
@@ -3100,7 +3102,7 @@ void SvxStyleToolBoxControl::FillStyleBox()
 OUString aName( pStyle->GetName() );
 for( auto const & _i: pImpl->aDefaultStyles )
 {
-if( _i == aName )
+if( _i.first == aName || _i.second == aName )
 {
 bInsert = false;
 break;
@@ -3133,7 +3135,7 @@ void SvxStyleToolBoxControl::FillStyleBox()
 sal_uInt16 nPos = 1;
 for( auto const & _i: pImpl->aDefaultStyles )
 {
-pBox->InsertEntry( _i, nPos );
+pBox->InsertEntry( _i.second, nPos );
 ++nPos;
 }
 
@@ -3169,8 +3171,17 @@ void SvxStyleToolBoxControl::SelectStyle( const 
OUString& rStyleName )
 
 if ( !rStyleName.isEmpty() )
 {
-if ( rStyleName != aStrSel )
-pBox->SetText( rStyleName );
+OUString aNewStyle = rStyleName;
+
+auto aFound = std::find_if(pImpl->aDefaultStyles.begin(), 
pImpl->aDefaultStyles.end(),
+[rStyleName] (auto it) { return it.first == rStyleName || 
it.second == rStyleName; }
+);
+
+if (aFound != pImpl->aDefaultStyles.end())
+aNewStyle = aFound->second;
+
+if ( aNewStyle != aStrSel )
+pBox->SetText( aNewStyle );
 }
 else
 pBox->SetNoSelection();
@@ -3304,7 +3315,7 @@ VclPtr 
SvxStyleToolBoxControl::CreateItemWindow( vcl::Window *pPare
pImpl->aMore,
pImpl->bSpecModeWriter || 
pImpl->bSpecModeCalc );
 if( !pImpl->aDefaultStyles.empty())
-pBox->SetDefaultStyle( pImpl->aDefaultStyles[0] );
+pBox->SetDefaultStyle( pImpl->aDefaultStyles[0].second );
 // Set visibility listener to bind/unbind controller
 pBox->SetVisibilityListener( LINK( this, SvxStyleToolBoxControl, 
VisibilityNotification ));
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-09-08 Thread Szymon Kłos (via logerrit)
 svx/source/inc/StylesPreviewToolBoxControl.hxx  |2 
 svx/source/inc/StylesPreviewWindow.hxx  |   18 ---
 svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx |   10 +++-
 svx/source/tbxctrls/StylesPreviewWindow.cxx |   47 
 4 files changed, 49 insertions(+), 28 deletions(-)

New commits:
commit e40010a530778efde26ab20b2a2e8f9dbf7d55ee
Author: Szymon Kłos 
AuthorDate: Mon Aug 31 13:05:31 2020 +0200
Commit: Szymon Kłos 
CommitDate: Tue Sep 8 11:22:34 2020 +0200

Styles preview widget language independent

Use both english / universal and translated names
to identify a style.

Change-Id: Ibd8b23e678e8bea5773d1da97adf5201377b4453
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101832
Tested-by: Jenkins CollaboraOffice 
Tested-by: Szymon Kłos 
Reviewed-by: Szymon Kłos 

diff --git a/svx/source/inc/StylesPreviewToolBoxControl.hxx 
b/svx/source/inc/StylesPreviewToolBoxControl.hxx
index c42c5ba09fd2..8de721ab0032 100644
--- a/svx/source/inc/StylesPreviewToolBoxControl.hxx
+++ b/svx/source/inc/StylesPreviewToolBoxControl.hxx
@@ -36,7 +36,7 @@ class SVX_DLLPUBLIC StylesPreviewToolBoxControl final
 
 css::uno::Reference m_xDispatchProvider;
 
-std::vector m_aDefaultStyles;
+std::vector> m_aDefaultStyles;
 
 public:
 StylesPreviewToolBoxControl();
diff --git a/svx/source/inc/StylesPreviewWindow.hxx 
b/svx/source/inc/StylesPreviewWindow.hxx
index 5ae857210c6f..26ba93d7be79 100644
--- a/svx/source/inc/StylesPreviewWindow.hxx
+++ b/svx/source/inc/StylesPreviewWindow.hxx
@@ -44,19 +44,19 @@ class StyleItemController : public 
weld::CustomWidgetController
 static constexpr unsigned LEFT_MARGIN = 8;
 
 SfxStyleFamily m_eStyleFamily;
-OUString m_aStyleName;
+std::pair m_aStyleName;
 bool m_bSelected;
 css::uno::Reference m_xDispatchProvider;
 
 public:
-StyleItemController(const OUString& aStyleName,
+StyleItemController(const std::pair& aStyleName,
 css::uno::Reference& 
xDispatchProvider);
 
 void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& 
rRect) override;
 
 bool MouseButtonDown(const MouseEvent&) override;
 
-void SetStyle(const OUString& sStyleName);
+void SetStyle(const std::pair& sStyleName);
 
 void Select(bool bSelect);
 
@@ -83,8 +83,8 @@ protected:
 std::unique_ptr m_xUp;
 std::unique_ptr m_xDown;
 
-std::vector m_aDefaultStyles;
-std::vector m_aAllStyles;
+std::vector> m_aDefaultStyles;
+std::vector> m_aAllStyles;
 
 unsigned m_nStyleIterator;
 OUString m_sSelectedStyle;
@@ -93,7 +93,8 @@ protected:
 DECL_LINK(GoDown, const OString&, void);
 
 public:
-StylesPreviewWindow_Base(weld::Builder& xBuilder, std::vector& 
aDefaultStyles,
+StylesPreviewWindow_Base(weld::Builder& xBuilder,
+ std::vector>& 
aDefaultStyles,
  
css::uno::Reference& xDispatchProvider);
 ~StylesPreviewWindow_Base();
 
@@ -103,13 +104,14 @@ private:
 void Update();
 void UpdateStylesList();
 void MakeCurrentStyleVisible();
-OUString GetVisibleStyle(unsigned nPosition);
+std::pair GetVisibleStyle(unsigned nPosition);
 };
 
 class StylesPreviewWindow_Impl : public InterimItemWindow, public 
StylesPreviewWindow_Base
 {
 public:
-StylesPreviewWindow_Impl(vcl::Window* pParent, std::vector& 
aDefaultStyles,
+StylesPreviewWindow_Impl(vcl::Window* pParent,
+ std::vector>& 
aDefaultStyles,
  
css::uno::Reference& xDispatchProvider);
 ~StylesPreviewWindow_Impl();
 
diff --git a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx 
b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
index 0a95aa5397e5..9acf4a517194 100644
--- a/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
+++ b/svx/source/tbxctrls/StylesPreviewToolBoxControl.cxx
@@ -80,7 +80,10 @@ void StylesPreviewToolBoxControl::InitializeStyles(
 OUString sName;
 xStyle->getPropertyValue("DisplayName") >>= sName;
 if (!sName.isEmpty())
-m_aDefaultStyles.push_back(sName);
+m_aDefaultStyles.push_back(std::pair(aStyle, sName));
+}
+catch (const css::container::NoSuchElementException&)
+{
 }
 catch (const css::uno::Exception&)
 {
@@ -104,7 +107,10 @@ void StylesPreviewToolBoxControl::InitializeStyles(
 OUString sName;
 xStyle->getPropertyValue("DisplayName") >>= sName;
 if (!sName.isEmpty())
-m_aDefaultStyles.push_back(sName);
+{
+m_aDefaultStyles.push_back(
+std::pair(sStyleName, 
sName));
+ 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-08-23 Thread Szymon Kłos (via logerrit)
 svx/source/sidebar/shadow/ShadowPropertyPanel.cxx |   16 
 1 file changed, 16 insertions(+)

New commits:
commit b243549bb1c2d254b52c51b6250e9e0e48942fe9
Author: Szymon Kłos 
AuthorDate: Tue Aug 11 10:28:52 2020 +0200
Commit: Andras Timar 
CommitDate: Sun Aug 23 19:16:17 2020 +0200

Instant update shadow fields in sidebar

This allows mobile LOK client to receive updated
state.

Change-Id: I07fb397c1566546e6e2eb8071eaf6d848f6effc0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100466
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101234
Reviewed-by: Andras Timar 

diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx 
b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx
index 8c93ee2708d0..61c30fcb9eb5 100644
--- a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx
+++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace css;
 using namespace css::uno;
@@ -143,12 +144,27 @@ IMPL_LINK_NOARG(ShadowPropertyPanel, ClickShadowHdl, 
Button*, void)
 SdrOnOffItem aItem(makeSdrShadowItem(false));
 GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_FILL_SHADOW,
 SfxCallMode::RECORD, {  });
+
+if (comphelper::LibreOfficeKit::isActive())
+{
+mpShowShadow->SetState( TRISTATE_FALSE );
+UpdateControls();
+}
 }
 else
 {
 SdrOnOffItem aItem(makeSdrShadowItem(true));
 GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_FILL_SHADOW,
 SfxCallMode::RECORD, {  });
+
+if (mpShadowDistance->GetValue( FieldUnit::POINT ) == 0)
+mpShadowDistance->SetValue( 8, FieldUnit::POINT );
+
+if (comphelper::LibreOfficeKit::isActive())
+{
+mpShowShadow->SetState( TRISTATE_TRUE );
+UpdateControls();
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-08-11 Thread gokaysatir (via logerrit)
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 4a31a63c5e4d4dac01426581c39bc1ef9278f6cb
Author: gokaysatir 
AuthorDate: Sat Aug 8 16:27:48 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Tue Aug 11 12:07:16 2020 +0200

core: Hide shape area bitmap import button.

Change-Id: I6f6987ea82c102fc5ac44a1c48a234c9f43484e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100391
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx 
b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index 8cfc9c6d2459..3725feea9674 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace css;
 using namespace css::uno;
@@ -379,7 +380,8 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, 
ListBox&, void)
 GraphicObject aBitmap;
 if(nPos == static_cast< sal_Int32 >(BITMAP))
 {
-mpBmpImport->Show();
+if (!comphelper::LibreOfficeKit::isActive())
+mpBmpImport->Show();
 const SvxBitmapListItem* pItem = pSh->GetItem(SID_BITMAP_LIST);
 if(pItem)
 {
@@ -1234,7 +1236,8 @@ void AreaPropertyPanelBase::Update()
 {
 if(pSh && pSh->GetItem(SID_BITMAP_LIST) && eXFS == BITMAP)
 {
-mpBmpImport->Show();
+if (!comphelper::LibreOfficeKit::isActive())
+mpBmpImport->Show();
 mpLbFillType->SelectEntryPos(sal_uInt32(BITMAP));
 
mpLbFillAttr->Fill(pSh->GetItem(SID_BITMAP_LIST)->GetBitmapList());
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-08-06 Thread Szymon Kłos (via logerrit)
 svx/source/tbxctrls/tbcontrl.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 977872353475dbe44b126cdf963fd6ff5cfe6734
Author: Szymon Kłos 
AuthorDate: Thu Aug 6 10:56:41 2020 +0200
Commit: Szymon Kłos 
CommitDate: Thu Aug 6 14:21:01 2020 +0200

lok: Hide not working 'More Styles' option

Option was shown in the sidebar style dropdown.

Change-Id: Icd7b555d1c6c1a860454c4b367146a1ea9746b76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100204
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 8f12f79818e85c31c1f752c200d9174093d0dfca)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100218

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 6385517cc321..e49ac60442a8 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -3140,7 +3140,8 @@ void SvxStyleToolBoxControl::FillStyleBox()
 pBox->InsertEntry( pImpl->aClearForm, 0 );
 pBox->SetSeparatorPos( 0 );
 
-pBox->InsertEntry( pImpl->aMore );
+if (!comphelper::LibreOfficeKit::isActive())
+pBox->InsertEntry( pImpl->aMore );
 
 // enable sort again
 nWinBits |= WB_SORT;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-07-10 Thread Szymon Kłos (via logerrit)
 svx/source/tbxctrls/fillctrl.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 82dd508c9d534997522adf02869c35b616fc989b
Author: Szymon Kłos 
AuthorDate: Fri Jul 10 12:12:02 2020 +0200
Commit: Szymon Kłos 
CommitDate: Fri Jul 10 14:50:18 2020 +0200

Fix FillControl vcl structure for online notebookbar

Change-Id: I6fff96284270821382e07cb1a024f76c67c67f3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98486
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/svx/source/tbxctrls/fillctrl.cxx b/svx/source/tbxctrls/fillctrl.cxx
index 7a9be740539c..876d27ed7d53 100644
--- a/svx/source/tbxctrls/fillctrl.cxx
+++ b/svx/source/tbxctrls/fillctrl.cxx
@@ -541,7 +541,7 @@ VclPtr 
SvxFillToolBoxControl::CreateItemWindow(vcl::Window *pParent
 
 return mpFillControl.get();
 }
-return VclPtr();
+return mpFillControl;
 }
 
 FillControl::FillControl(vcl::Window* pParent)
@@ -551,6 +551,7 @@ FillControl::FillControl(vcl::Window* pParent)
 , mpLbFillAttr(VclPtr::Create(this))
 {
 SetOptimalSize();
+mpToolBoxColor->set_id("colortoolbox");
 }
 
 FillControl::~FillControl()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-07-07 Thread Szymon Kłos (via logerrit)
 svx/source/tbxctrls/StylesPreviewWindow.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c9ceaeaee923a742d842fbc6174222eaf9667ca6
Author: Szymon Kłos 
AuthorDate: Tue Jul 7 14:24:57 2020 +0200
Commit: Szymon Kłos 
CommitDate: Tue Jul 7 14:57:39 2020 +0200

Avoid nullptr dereference

Change-Id: I5f2bd8206a1339e09f277cdc7f0c6a01a6d85df7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98259
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx 
b/svx/source/tbxctrls/StylesPreviewWindow.cxx
index 01bd8037b0f7..4ff428a73e66 100644
--- a/svx/source/tbxctrls/StylesPreviewWindow.cxx
+++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx
@@ -66,7 +66,8 @@ StyleStatusListener::StyleStatusListener(
 void StyleStatusListener::StateChanged(SfxItemState /*eState*/, const 
SfxPoolItem* pState)
 {
 const SfxTemplateItem* pStateItem = dynamic_cast(pState);
-m_pPreviewControl->Select(pStateItem->GetStyleName());
+if (pStateItem)
+m_pPreviewControl->Select(pStateItem->GetStyleName());
 }
 
 StyleItemController::StyleItemController(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-07-03 Thread Szymon Kłos (via logerrit)
 svx/source/xoutdev/xattr.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7f27f0559bc1101441dcebd9af6d4ac9a0b0f11e
Author: Szymon Kłos 
AuthorDate: Fri Jul 3 14:59:28 2020 +0200
Commit: Szymon Kłos 
CommitDate: Fri Jul 3 15:18:14 2020 +0200

Fix redefinition of StringMap

Noticed in tinderbox windows build

Change-Id: I525e1c8ef1b25d0e13844b43865c317514c6e434
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97857
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 10795e34f54a..682396b0de5e 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -90,12 +90,12 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
 using namespace ::com::sun::star;
 
-typedef std::map StringMap;
 
 static long ScaleMetricValue( long nVal, long nMul, long nDiv )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-06-26 Thread Miklos Vajna (via logerrit)
 svx/source/dialog/signaturelinehelper.cxx |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit e5244056afd6ecff93d867680249d83d9bef9b46
Author: Miklos Vajna 
AuthorDate: Wed Jun 10 10:49:01 2020 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jun 26 08:54:36 2020 +0200

sd signature line: set graphic of signature shape

All placeholders are replaced, but the template is still English-only.

(cherry picked from commit a24246e1b5910482ed200b24f24a11fcfe04d00a)

Change-Id: Ia361447ff0a69fa0f80db4af07274d1a764a3d64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97178
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/svx/source/dialog/signaturelinehelper.cxx 
b/svx/source/dialog/signaturelinehelper.cxx
index 0b07c5169430..bdc78e39be37 100644
--- a/svx/source/dialog/signaturelinehelper.cxx
+++ b/svx/source/dialog/signaturelinehelper.cxx
@@ -135,6 +135,16 @@ void setShapeCertificate(SdrView* pView,
 aMap["SignatureCertificate"] <<= xCertificate;
 xShapeProps->setPropertyValue("InteropGrabBag",
   
uno::makeAny(aMap.getAsConstPropertyValueList()));
+
+// Read svg and replace placeholder texts.
+OUString 
aSvgImage(svx::SignatureLineHelper::getSignatureImage("signature-line-draw.svg"));
+OUString aSignerName = 
svx::SignatureLineHelper::getSignerName(xCertificate);
+aSvgImage = aSvgImage.replaceAll("[SIGNER_NAME]", aSignerName);
+OUString aDate = svx::SignatureLineHelper::getLocalizedDate();
+aSvgImage = aSvgImage.replaceAll("[DATE]", aDate);
+
+uno::Reference xGraphic = 
svx::SignatureLineHelper::importSVG(aSvgImage);
+xShapeProps->setPropertyValue("Graphic", uno::Any(xGraphic));
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-06-26 Thread Miklos Vajna (via logerrit)
 svx/source/svdraw/svdobj.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 30bd183978bb12ade1be2ea948febafd14fb4440
Author: Miklos Vajna 
AuthorDate: Tue Jun 9 13:43:19 2020 +0200
Commit: Miklos Vajna 
CommitDate: Fri Jun 26 08:54:01 2020 +0200

sd doc model xml dump: show grab-bag of shape

Which is contained directly for some reason, not inside mpProperties.

(cherry picked from commit 93f2cb69575df5b4a9e2c509ee2b691dc013045d)

Change-Id: I0f7d2d5afbeae2d399710d5ce271f3ad4ab9866d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97176
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index eaa5abfa177a..51209c92ef43 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1741,6 +1741,11 @@ void SdrObject::dumpAsXml(xmlTextWriterPtr pWriter) const
 xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("nOrdNum"), "%" 
SAL_PRIuUINT32, GetOrdNumDirect());
 xmlTextWriterWriteAttribute(pWriter, BAD_CAST("aOutRect"), 
BAD_CAST(aOutRect.toString().getStr()));
 
+if (pGrabBagItem)
+{
+pGrabBagItem->dumpAsXml(pWriter);
+}
+
 if (mpProperties)
 {
 mpProperties->dumpAsXml(pWriter);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-06-24 Thread Szymon Kłos (via logerrit)
 svx/source/tbxctrls/StylesPreviewWindow.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit c64e4a6ac65535e2e8ca6ba52812804618b03fac
Author: Szymon Kłos 
AuthorDate: Thu Jun 18 09:55:44 2020 +0200
Commit: Szymon Kłos 
CommitDate: Wed Jun 24 10:28:00 2020 +0200

Styles preview: avoid nullptr dereference

Change-Id: I04292baa8a680f03613cef32f7cb55581b914809
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96935
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx 
b/svx/source/tbxctrls/StylesPreviewWindow.cxx
index 806b168c5857..cf1fba02a2d7 100644
--- a/svx/source/tbxctrls/StylesPreviewWindow.cxx
+++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx
@@ -205,6 +205,9 @@ static SvxFont GetFontFromItems(const SvxFontItem* 
pFontItem, Size aPixelFontSiz
 void StyleItemController::DrawEntry(vcl::RenderContext& rRenderContext)
 {
 SfxObjectShell* pShell = SfxObjectShell::Current();
+if (!pShell)
+return;
+
 SfxStyleSheetBasePool* pPool = pShell->GetStyleSheetPool();
 SfxStyleSheetBase* pStyle = nullptr;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-06-08 Thread Tomaž Vajngerl (via logerrit)
 svx/source/inc/svdpdf.hxx|2 +-
 svx/source/svdraw/svdpdf.cxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 1dd9431056b8e16e6c2c916baa251121c36e0b7e
Author: Tomaž Vajngerl 
AuthorDate: Fri May 1 17:30:22 2020 +0200
Commit: Tomaž Vajngerl 
CommitDate: Mon Jun 8 13:45:35 2020 +0200

SdrPdfImport: rename ImportText to InsertTextObject

There are two ImportText methods, so rename one to something
else to avoid confusion.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/9
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 92b0a4d933d682bfce10fa5f04c7a966f20cde7a)

Change-Id: I1ccc491fca47b2d72ba1f7bd5a75d325819ec041
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95785
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 

diff --git a/svx/source/inc/svdpdf.hxx b/svx/source/inc/svdpdf.hxx
index 60894542fb8f..cc3ec7f27bfa 100644
--- a/svx/source/inc/svdpdf.hxx
+++ b/svx/source/inc/svdpdf.hxx
@@ -114,7 +114,7 @@ class SVXCORE_DLLPUBLIC ImpSdrPdfImport final
 void ImportImage(FPDF_PAGEOBJECT pPageObject, int nPageObjectIndex);
 void ImportPath(FPDF_PAGEOBJECT pPageObject, int nPageObjectIndex);
 void ImportText(FPDF_PAGEOBJECT pPageObject, FPDF_TEXTPAGE pTextPage, int 
nPageObjectIndex);
-void ImportText(const Point& rPos, const Size& rSize, const OUString& 
rStr);
+void InsertTextObject(const Point& rPos, const Size& rSize, const 
OUString& rStr);
 
 void SetupPageScale(const double dPageWidth, const double dPageHeight);
 void SetAttributes(SdrObject* pObj, bool bForceTextAttr = false);
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 4d973c433711..b380d478d806 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -872,10 +872,10 @@ void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT 
pPageObject, FPDF_TEXTPAGE pTex
 mbFntDirty = true;
 }
 
-ImportText(aRect.TopLeft(), aRect.GetSize(), sText);
+InsertTextObject(aRect.TopLeft(), aRect.GetSize(), sText);
 }
 
-void ImpSdrPdfImport::ImportText(const Point& rPos, const Size& rSize, const 
OUString& rStr)
+void ImpSdrPdfImport::InsertTextObject(const Point& rPos, const Size& rSize, 
const OUString& rStr)
 {
 // calc text box size, add 5% to make it fit safely
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-06-08 Thread Tomaž Vajngerl (via logerrit)
 svx/source/svdraw/svdpdf.cxx |   13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 88c70ae002120f46e1f9a2a5cac2f73f835a4984
Author: Tomaž Vajngerl 
AuthorDate: Thu Apr 30 19:07:44 2020 +0200
Commit: Tomaž Vajngerl 
CommitDate: Mon Jun 8 13:43:54 2020 +0200

SdrPdfImport: fix garbled text at breaking the PDF graphic

The text size of OUString expects no. of characters, but we give
the number of bytes as that is what we get from PDFium. Best to
just not give the text size at all and let OUString determine
that as the text shouldbe terminated correctly.

Change-Id: Icc5cd6e851a9d2920faa9ca2eb6d827465483e72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93330
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit d4190effb9068dff5ebd3c01c7e3073b1af78b2d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95782
Tested-by: Tomaž Vajngerl 

diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 106718a34aa9..78bb7131ae13 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -810,16 +810,19 @@ void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT 
pPageObject, FPDF_TEXTPAGE pTex
 const tools::Rectangle aRect = PointsToLogic(aTextRect.getMinX(), 
aTextRect.getMaxX(),
  aTextRect.getMinY(), 
aTextRect.getMaxY());
 
-const int nChars = FPDFTextObj_GetText(pPageObject, pTextPage, nullptr, 0);
-std::unique_ptr pText(new sal_Unicode[nChars]);
+const int nBytes = FPDFTextObj_GetText(pPageObject, pTextPage, nullptr, 0);
+std::unique_ptr pText(new sal_Unicode[nBytes]);
 
-const int nActualChars = FPDFTextObj_GetText(pPageObject, pTextPage, 
pText.get(), nChars);
-if (nActualChars <= 0)
+const int nActualBytes = FPDFTextObj_GetText(pPageObject, pTextPage, 
pText.get(), nBytes);
+if (nActualBytes <= 0)
 {
 return;
 }
 
-OUString sText(pText.get(), nActualChars);
+// Let's rely on null-terminaton for the length of the string. We
+// just know the number of bytes the string takes, but in OUString
+// needs the number of charaters.
+OUString sText(pText.get());
 
 const double dFontSize = FPDFTextObj_GetFontSize(pPageObject);
 double dFontSizeH = fabs(sqrt2(a, c) * dFontSize);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-06-08 Thread Tomaž Vajngerl (via logerrit)
 svx/source/svdraw/svdpdf.cxx |   45 +--
 1 file changed, 10 insertions(+), 35 deletions(-)

New commits:
commit 26e52703188d1301f8cac335975bafff58c37ee4
Author: Tomaž Vajngerl 
AuthorDate: Sun May 3 13:03:30 2020 +0200
Commit: Tomaž Vajngerl 
CommitDate: Mon Jun 8 13:44:36 2020 +0200

SdrPdfImport: use convertPointToMm100 for all unit conversion

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93391
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit dba50d5e6c1b4d3d16690ee5b8a9648c652f41e7)

Change-Id: I78b3512cc0b9aea1fa4e9a810ec71eadd00b7635
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95784
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 

diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 78bb7131ae13..4d973c433711 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -93,29 +93,13 @@
 
 namespace
 {
-/// Convert from DPI to pixels.
-/// PDFs don't have resolution, rather,
-/// dimensions are in inches, with 72 points / inch.
-/// Here we effectively render at 96 DPI (to match
-/// the image rendered in vcl::ImportPDF in pdfread.cxx).
-double lcl_PointToPixel(double fPoint) { return fPoint * 96. / 72.; }
-
-/// Convert from pixels to logic (twips).
-long lcl_ToLogic(double value)
-{
-// Convert to integral preserving two dp.
-const long in = static_cast(value * 100.);
-const long out = OutputDevice::LogicToLogic(in, MapUnit::MapPixel, 
MapUnit::Map100thMM);
-return out / 100;
-}
-
 double sqrt2(double a, double b) { return sqrt(a * a + b * b); }
-}
 
 struct FPDFBitmapDeleter
 {
 void operator()(FPDF_BITMAP bitmap) { FPDFBitmap_Destroy(bitmap); }
 };
+}
 
 using namespace com::sun::star;
 
@@ -260,8 +244,7 @@ void ImpSdrPdfImport::SetupPageScale(const double 
dPageWidth, const double dPage
 mdPageWidthPts = dPageWidth;
 mdPageHeightPts = dPageHeight;
 
-Size aPageSize(lcl_ToLogic(lcl_PointToPixel(dPageWidth)),
-   lcl_ToLogic(lcl_PointToPixel(dPageHeight)));
+Size aPageSize(convertPointToMm100(dPageWidth), 
convertPointToMm100(dPageHeight));
 
 if (aPageSize.Width() && aPageSize.Height() && (!maScaleRect.IsEmpty()))
 {
@@ -827,10 +810,9 @@ void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT 
pPageObject, FPDF_TEXTPAGE pTex
 const double dFontSize = FPDFTextObj_GetFontSize(pPageObject);
 double dFontSizeH = fabs(sqrt2(a, c) * dFontSize);
 double dFontSizeV = fabs(sqrt2(b, d) * dFontSize);
-dFontSizeH = lcl_PointToPixel(dFontSizeH);
-dFontSizeV = lcl_PointToPixel(dFontSizeV);
-dFontSizeH = lcl_ToLogic(dFontSizeH);
-dFontSizeV = lcl_ToLogic(dFontSizeV);
+
+dFontSizeH = convertPointToMm100(dFontSizeH);
+dFontSizeV = convertPointToMm100(dFontSizeV);
 
 const Size aFontSize(dFontSizeH, dFontSizeV);
 vcl::Font aFnt = mpVD->GetFont();
@@ -1129,7 +,7 @@ void ImpSdrPdfImport::ImportPath(FPDF_PAGEOBJECT 
pPageObject, int /*nPageObjectI
 float fWidth = 1;
 FPDFPageObj_GetStrokeWidth(pPageObject, );
 const double dWidth = 0.5 * fabs(sqrt2(aPathMatrix.a(), aPathMatrix.c()) * 
fWidth);
-mnLineWidth = lcl_ToLogic(lcl_PointToPixel(dWidth));
+mnLineWidth = convertPointToMm100(dWidth);
 
 int nFillMode = FPDF_FILLMODE_ALTERNATE;
 FPDF_BOOL bStroke = 1; // Assume we have to draw, unless told otherwise.
@@ -1169,10 +1151,8 @@ void ImpSdrPdfImport::ImportPath(FPDF_PAGEOBJECT 
pPageObject, int /*nPageObjectI
 Point ImpSdrPdfImport::PointsToLogic(double x, double y) const
 {
 y = correctVertOrigin(y);
-x = lcl_PointToPixel(x);
-y = lcl_PointToPixel(y);
 
-Point aPos(lcl_ToLogic(x), lcl_ToLogic(y));
+Point aPos(convertPointToMm100(x), convertPointToMm100(y));
 return aPos;
 }
 
@@ -1182,15 +1162,10 @@ tools::Rectangle ImpSdrPdfImport::PointsToLogic(double 
left, double right, doubl
 top = correctVertOrigin(top);
 bottom = correctVertOrigin(bottom);
 
-left = lcl_PointToPixel(left);
-right = lcl_PointToPixel(right);
-top = lcl_PointToPixel(top);
-bottom = lcl_PointToPixel(bottom);
+Point aPos(convertPointToMm100(left), convertPointToMm100(top));
+Size aSize(convertPointToMm100(right - left), convertPointToMm100(bottom - 
top));
 
-Point aPos(lcl_ToLogic(left), lcl_ToLogic(top));
-Size aSize(lcl_ToLogic(right - left), lcl_ToLogic(bottom - top));
-tools::Rectangle aRect(aPos, aSize);
-return aRect;
+return tools::Rectangle(aPos, aSize);
 }
 
 #endif // HAVE_FEATURE_PDFIUM
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-06-08 Thread Tomaž Vajngerl (via logerrit)
 svx/source/svdraw/svdpdf.cxx |   28 +++-
 1 file changed, 15 insertions(+), 13 deletions(-)

New commits:
commit ae512835805da05cfa873eebf189fa7a2f927a20
Author: Tomaž Vajngerl 
AuthorDate: Thu Apr 30 13:18:21 2020 +0200
Commit: Tomaž Vajngerl 
CommitDate: Mon Jun 8 13:43:26 2020 +0200

SdrPdfImport: rename some variables to non-abbreviated names

Change-Id: I1cb004a8e426f8ea26bb930d4897db3763433b31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93329
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 9e3da9e3bc7133972fae76c27f911fc19ca854b1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95781
Tested-by: Tomaž Vajngerl 

diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index a41caaeaba14..106718a34aa9 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -99,6 +99,7 @@ namespace
 /// Here we effectively render at 96 DPI (to match
 /// the image rendered in vcl::ImportPDF in pdfread.cxx).
 double lcl_PointToPixel(double fPoint) { return fPoint * 96. / 72.; }
+
 /// Convert from pixels to logic (twips).
 long lcl_ToLogic(double value)
 {
@@ -894,21 +895,22 @@ void ImpSdrPdfImport::ImportText(const Point& rPos, const 
Size& rSize, const OUS
 // calc text box size, add 5% to make it fit safely
 
 FontMetric aFontMetric(mpVD->GetFontMetric());
-vcl::Font aFnt(mpVD->GetFont());
-FontAlign eAlg(aFnt.GetAlignment());
+vcl::Font aFont(mpVD->GetFont());
+FontAlign eAlignment(aFont.GetAlignment());
 
 // sal_Int32 nTextWidth = static_cast(mpVD->GetTextWidth(rStr) 
* mfScaleX);
 sal_Int32 nTextHeight = static_cast(mpVD->GetTextHeight() * 
mfScaleY);
 
-Point aPos(FRound(rPos.X() * mfScaleX + maOfs.X()), FRound(rPos.Y() * 
mfScaleY + maOfs.Y()));
+Point aPosition(FRound(rPos.X() * mfScaleX + maOfs.X()),
+FRound(rPos.Y() * mfScaleY + maOfs.Y()));
 Size aSize(FRound(rSize.Width() * mfScaleX), FRound(rSize.Height() * 
mfScaleY));
 
-if (eAlg == ALIGN_BASELINE)
-aPos.AdjustY(-FRound(aFontMetric.GetAscent() * mfScaleY));
-else if (eAlg == ALIGN_BOTTOM)
-aPos.AdjustY(-nTextHeight);
+if (eAlignment == ALIGN_BASELINE)
+aPosition.AdjustY(-FRound(aFontMetric.GetAscent() * mfScaleY));
+else if (eAlignment == ALIGN_BOTTOM)
+aPosition.AdjustY(-nTextHeight);
 
-tools::Rectangle aTextRect(aPos, aSize);
+tools::Rectangle aTextRect(aPosition, aSize);
 SdrRectObj* pText = new SdrRectObj(*mpModel, OBJ_TEXT, aTextRect);
 
 pText->SetMergedItem(makeSdrTextUpperDistItem(0));
@@ -916,7 +918,7 @@ void ImpSdrPdfImport::ImportText(const Point& rPos, const 
Size& rSize, const OUS
 pText->SetMergedItem(makeSdrTextRightDistItem(0));
 pText->SetMergedItem(makeSdrTextLeftDistItem(0));
 
-if (aFnt.GetAverageFontWidth())
+if (aFont.GetAverageFontWidth())
 {
 pText->ClearMergedItem(SDRATTR_TEXT_AUTOGROWWIDTH);
 pText->SetMergedItem(makeSdrTextAutoGrowHeightItem(false));
@@ -933,21 +935,21 @@ void ImpSdrPdfImport::ImportText(const Point& rPos, const 
Size& rSize, const OUS
 SetAttributes(pText, true);
 pText->SetSnapRect(aTextRect);
 
-if (!aFnt.IsTransparent())
+if (!aFont.IsTransparent())
 {
 SfxItemSet aAttr(*mpFillAttr->GetPool(), svl::Items{});
 aAttr.Put(XFillStyleItem(drawing::FillStyle_SOLID));
-aAttr.Put(XFillColorItem(OUString(), aFnt.GetFillColor()));
+aAttr.Put(XFillColorItem(OUString(), aFont.GetFillColor()));
 pText->SetMergedItemSet(aAttr);
 }
-sal_uInt32 nAngle = aFnt.GetOrientation();
+sal_uInt32 nAngle = aFont.GetOrientation();
 if (nAngle)
 {
 nAngle *= 10;
 double a = nAngle * F_PI18000;
 double nSin = sin(a);
 double nCos = cos(a);
-pText->NbcRotate(aPos, nAngle, nSin, nCos);
+pText->NbcRotate(aPosition, nAngle, nSin, nCos);
 }
 InsertObj(pText, false);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-06-07 Thread Tomaž Vajngerl (via logerrit)
 svx/source/svdraw/svdpdf.cxx |   38 --
 svx/source/svdraw/svdpdf.hxx |4 ++--
 2 files changed, 22 insertions(+), 20 deletions(-)

New commits:
commit ca006ba55cceb0a4c97e9c9f9d59be3fc1727765
Author: Tomaž Vajngerl 
AuthorDate: Sun Mar 29 23:05:25 2020 +0200
Commit: Tomaž Vajngerl 
CommitDate: Sun Jun 7 21:17:07 2020 +0200

replace usage of Matrix for B2DHomMatrix in ImpSdrPdfImport

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91341
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit c20fa884cf20959dbd65814274e450e1f49cf45e)

Change-Id: I366ee435ddf217c7c078d58f882610df12bec276
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95698
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 

diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 415c6e3dc7df..820832265aa0 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -768,11 +768,11 @@ void ImpSdrPdfImport::ImportForm(FPDF_PAGEOBJECT 
pPageObject, FPDF_TEXTPAGE pTex
  int /*nPageObjectIndex*/)
 {
 // Get the form matrix to perform correct translation/scaling of the form 
sub-objects.
-const Matrix aOldMatrix = mCurMatrix;
+const basegfx::B2DHomMatrix aOldMatrix = maCurrentMatrix;
 
 double a, b, c, d, e, f;
-FPDFFormObj_GetMatrix(pPageObject, , , , , , );
-mCurMatrix = Matrix(a, b, c, d, e, f);
+FPDFTextObj_GetMatrix(pPageObject, , , , , , );
+maCurrentMatrix = basegfx::B2DHomMatrix::abcdef(a, b, c, d, e, f);
 
 const int nCount = FPDFFormObj_CountObjects(pPageObject);
 for (int nIndex = 0; nIndex < nCount; ++nIndex)
@@ -782,7 +782,7 @@ void ImpSdrPdfImport::ImportForm(FPDF_PAGEOBJECT 
pPageObject, FPDF_TEXTPAGE pTex
 }
 
 // Restore the old one.
-mCurMatrix = aOldMatrix;
+maCurrentMatrix = aOldMatrix;
 }
 
 void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT pPageObject, FPDF_TEXTPAGE 
pTextPage,
@@ -802,10 +802,12 @@ void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT 
pPageObject, FPDF_TEXTPAGE pTex
 
 double a, b, c, d, e, f;
 FPDFTextObj_GetMatrix(pPageObject, , , , , , );
-Matrix aTextMatrix(mCurMatrix);
 
-aTextMatrix.Transform(left, right, top, bottom);
-const tools::Rectangle aRect = PointsToLogic(left, right, top, bottom);
+basegfx::B2DHomMatrix aTextMatrix(maCurrentMatrix);
+basegfx::B2DRange aTextRect(left, top, right, bottom);
+aTextRect *= aTextMatrix;
+const tools::Rectangle aRect = PointsToLogic(aTextRect.getMinX(), 
aTextRect.getMaxX(),
+ aTextRect.getMinY(), 
aTextRect.getMaxY());
 
 const int nChars = FPDFTextObj_GetText(pPageObject, pTextPage, nullptr, 0);
 std::unique_ptr pText(new sal_Unicode[nChars]);
@@ -1037,8 +1039,8 @@ void ImpSdrPdfImport::ImportPath(FPDF_PAGEOBJECT 
pPageObject, int /*nPageObjectI
 {
 double a, b, c, d, e, f;
 FPDFPath_GetMatrix(pPageObject, , , , , , );
-Matrix aPathMatrix(a, b, c, d, e, f);
-aPathMatrix.Concatinate(mCurMatrix);
+auto aPathMatrix = basegfx::B2DHomMatrix::abcdef(a, b, c, d, e, f);
+aPathMatrix *= maCurrentMatrix;
 
 basegfx::B2DPolyPolygon aPolyPoly;
 basegfx::B2DPolygon aPoly;
@@ -1057,26 +1059,26 @@ void ImpSdrPdfImport::ImportPath(FPDF_PAGEOBJECT 
pPageObject, int /*nPageObjectI
 continue;
 }
 
-double x = fx;
-double y = fy;
-aPathMatrix.Transform(x, y);
+basegfx::B2DPoint aB2DPoint(fx, fy);
+aB2DPoint *= aPathMatrix;
+
 const bool bClose = FPDFPathSegment_GetClose(pPathSegment);
 if (bClose)
 aPoly.setClosed(bClose); // TODO: Review
 
-Point aPoint = PointsToLogic(x, y);
-x = aPoint.X();
-y = aPoint.Y();
+Point aPoint = PointsToLogic(aB2DPoint.getX(), aB2DPoint.getY());
+aB2DPoint.setX(aPoint.X());
+aB2DPoint.setY(aPoint.Y());
 
 const int nSegmentType = FPDFPathSegment_GetType(pPathSegment);
 switch (nSegmentType)
 {
 case FPDF_SEGMENT_LINETO:
-aPoly.append(basegfx::B2DPoint(x, y));
+aPoly.append(aB2DPoint);
 break;
 
 case FPDF_SEGMENT_BEZIERTO:
-aBezier.emplace_back(x, y);
+aBezier.emplace_back(aB2DPoint.getX(), aB2DPoint.getY());
 if (aBezier.size() == 3)
 {
 aPoly.appendBezierSegment(aBezier[0], aBezier[1], 
aBezier[2]);
@@ -1092,7 +1094,7 @@ void ImpSdrPdfImport::ImportPath(FPDF_PAGEOBJECT 
pPageObject, int /*nPageObjectI
 aPoly.clear();
 }
 
-aPoly.append(basegfx::B2DPoint(x, y));
+

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-06-06 Thread Tomaž Vajngerl (via logerrit)
 svx/source/svdraw/svdedtv2.cxx |   17 -
 svx/source/svdraw/svdpdf.cxx   |   13 -
 svx/source/svdraw/svdpdf.hxx   |8 +---
 3 files changed, 29 insertions(+), 9 deletions(-)

New commits:
commit 90922a7b4485d7dac7666ee7e44eda2eee916dc0
Author: Tomaž Vajngerl 
AuthorDate: Fri Mar 27 20:14:39 2020 +0100
Commit: Tomaž Vajngerl 
CommitDate: Sat Jun 6 19:27:01 2020 +0200

pdfium: make breaking of PDF graphic work again

Changing PDF to use VectorGraphicData deleted the calls which
triggered the breaking of the PDF. This change makes breaking
work again.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91234
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit f265b14d6f8e3e63260b3c8ecce48d4251288fea)

Change-Id: I1d817f1556e37fcbcc3d2850b690eb0810676fa5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95635
Tested-by: Tomaž Vajngerl 
Reviewed-by: Tomaž Vajngerl 

diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 4531aa511579..7eab69f7bb5b 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -52,6 +52,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using ::std::vector;
 using namespace com::sun::star;
@@ -2095,7 +2096,21 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo 
*pProgrInfo)
 SdrGrafObj*  pGraf = dynamic_cast( pObj );
 if (pGraf != nullptr)
 {
-if (pGraf->HasGDIMetaFile() || 
pGraf->isEmbeddedVectorGraphicData())
+Graphic aGraphic = pGraf->GetGraphic();
+auto const & pVectorGraphicData = aGraphic.getVectorGraphicData();
+
+if (pVectorGraphicData && 
pVectorGraphicData->getVectorGraphicDataType() == VectorGraphicDataType::Pdf)
+{
+#if HAVE_FEATURE_PDFIUM
+aLogicRect = pGraf->GetLogicRect();
+ImpSdrPdfImport aFilter(*mpModel, pObj->GetLayer(), 
aLogicRect, aGraphic);
+if (pGraf->getEmbeddedPageNumber() < aFilter.GetPageCount())
+{
+nInsCnt = aFilter.DoImport(*pOL, nInsPos, 
aGraphic.getPageNumber(), pProgrInfo);
+}
+#endif // HAVE_FEATURE_PDFIUM
+}
+else if (pGraf->HasGDIMetaFile() || 
pGraf->isEmbeddedVectorGraphicData() )
 {
 GDIMetaFile aMetaFile(GetMetaFile(pGraf));
 if (aMetaFile.GetActionSize())
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index b392e9523f79..415c6e3dc7df 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -29,6 +29,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -118,11 +119,11 @@ struct FPDFBitmapDeleter
 using namespace com::sun::star;
 
 ImpSdrPdfImport::ImpSdrPdfImport(SdrModel& rModel, SdrLayerID nLay, const 
tools::Rectangle& rRect,
- const std::shared_ptr>& 
pPdfData)
-: maTmpList()
+ Graphic const& rGraphic)
+: mrGraphic(rGraphic)
+, maTmpList()
 , mpVD(VclPtr::Create())
 , maScaleRect(rRect)
-, mpPdfData(pPdfData)
 , mnMapScalingOfs(0)
 , mpModel()
 , mnLayer(nLay)
@@ -166,8 +167,10 @@ ImpSdrPdfImport::ImpSdrPdfImport(SdrModel& rModel, 
SdrLayerID nLay, const tools:
 FPDF_InitLibraryWithConfig();
 
 // Load the buffer using pdfium.
-mpPdfDocument = FPDF_LoadMemDocument(mpPdfData->data(), mpPdfData->size(),
- /*password=*/nullptr);
+auto const& rVectorGraphicData = mrGraphic.getVectorGraphicData();
+mpPdfDocument = FPDF_LoadMemDocument(
+rVectorGraphicData->getVectorGraphicDataArray().getConstArray(),
+rVectorGraphicData->getVectorGraphicDataArrayLength(), 
/*password=*/nullptr);
 if (!mpPdfDocument)
 {
 //TODO: Handle failure to load.
diff --git a/svx/source/svdraw/svdpdf.hxx b/svx/source/svdraw/svdpdf.hxx
index 70b5a44e4ddf..1005b081142a 100644
--- a/svx/source/svdraw/svdpdf.hxx
+++ b/svx/source/svdraw/svdpdf.hxx
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -158,10 +159,10 @@ class ImpSdrPdfImport final
 double ma, mb, mc, md, me, mf;
 };
 
-::std::vector maTmpList;
+Graphic const& mrGraphic;
+std::vector maTmpList;
 ScopedVclPtr mpVD;
 tools::Rectangle const maScaleRect;
-const std::shared_ptr> mpPdfData;
 size_t mnMapScalingOfs; // from here on, not edited with MapScaling
 std::unique_ptr mpLineAttr;
 std::unique_ptr mpFillAttr;
@@ -233,7 +234,8 @@ class ImpSdrPdfImport final
 
 public:
 ImpSdrPdfImport(SdrModel& rModel, SdrLayerID nLay, const tools::Rectangle& 
rRect,
-const std::shared_ptr>& pPdfData);
+Graphic const& rGraphic);
+
 ~ImpSdrPdfImport();
 
 int GetPageCount() const { return mnPageCount; }

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-06-06 Thread Tomaž Vajngerl (via logerrit)
 svx/source/svdraw/svdograf.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 6e5cc0932a5fddc7dbd588de3b3dcae563ecd866
Author: Tomaž Vajngerl 
AuthorDate: Wed Mar 25 10:28:53 2020 +0100
Commit: Tomaž Vajngerl 
CommitDate: Sat Jun 6 19:24:56 2020 +0200

SdrGrafObj: don't check the primitive sequence for PDF to get metadata

For a PDF we create a BitmapPrimitive2D only, so it doesn't have
any metadata in the primitive sequence itself, but a call to the
getVectorGraphicData() method will render the PDF in order to
create the BitmapPrimitive2D. This is a problem when we have
multiple pages as we want them to be rendered on demand and not
right away on load.
This change short-circuits the gathering of metadata for PDF to
prevent unnecessary early rendering of PDF pages.

Change-Id: If5c286e88e72c4c0ba5083a98c7db707d207b6cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91034
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 74ebc6dcbc85ce9f49d7451e08d71a41f794f569)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95629
Tested-by: Tomaž Vajngerl 

diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 9460926c069f..875aa8efcefb 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -165,6 +165,12 @@ void SdrGrafObj::onGraphicChanged()
 if (!rVectorGraphicDataPtr.get())
 return;
 
+// Skip for PDF as it is only a bitmap primitive in a sequence and
+// doesn't contain metadata. However getting the primitive sequence
+// will also trigger a premature rendering of the PDF.
+if (rVectorGraphicDataPtr->getVectorGraphicDataType() == 
VectorGraphicDataType::Pdf)
+return;
+
 const drawinglayer::primitive2d::Primitive2DContainer 
aSequence(rVectorGraphicDataPtr->getPrimitive2DSequence());
 
 if (aSequence.empty())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-06-05 Thread Szymon Kłos (via logerrit)
 svx/source/inc/InterimItemWindow.hxx   |   35 -
 svx/source/sidebar/paragraph/ParaSpacingWindow.cxx |1 
 svx/source/sidebar/paragraph/ParaSpacingWindow.hxx |2 -
 svx/source/tbxctrls/tbunocontroller.cxx|2 -
 4 files changed, 3 insertions(+), 37 deletions(-)

New commits:
commit 0c6d6819508056fed1e2dbd5a579405c3281fcef
Author: Szymon Kłos 
AuthorDate: Fri Jun 5 12:48:57 2020 +0200
Commit: Szymon Kłos 
CommitDate: Fri Jun 5 12:49:47 2020 +0200

remove duplicated InterimItemWindow header

Change-Id: I9baa91fa5a5b7d5676e7fa923ffdf533adf33fbb

diff --git a/svx/source/inc/InterimItemWindow.hxx 
b/svx/source/inc/InterimItemWindow.hxx
deleted file mode 100644
index 715cf41fc020..
--- a/svx/source/inc/InterimItemWindow.hxx
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#pragma once
-
-#include 
-
-class InterimItemWindow : public Control
-{
-public:
-virtual ~InterimItemWindow() override;
-virtual void dispose() override;
-
-virtual void Resize() override;
-virtual Size GetOptimalSize() const override;
-
-protected:
-InterimItemWindow(vcl::Window* pParent, const OUString& rUIXMLDescription, 
const OString& rID);
-
-// pass keystrokes from our child window through this to handle focus 
changes correctly
-// returns true if keystroke is consumed
-bool ChildKeyInput(const KeyEvent& rKEvt);
-
-std::unique_ptr m_xBuilder;
-VclPtr m_xVclContentArea;
-std::unique_ptr m_xContainer;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx 
b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
index 3f0e05060fd5..d6bf95f83a00 100644
--- a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
+++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace svx;
 
diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.hxx 
b/svx/source/sidebar/paragraph/ParaSpacingWindow.hxx
index 138a7c3c4e78..9196a4a9f3d7 100644
--- a/svx/source/sidebar/paragraph/ParaSpacingWindow.hxx
+++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.hxx
@@ -24,7 +24,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 using namespace com::sun::star;
 
diff --git a/svx/source/tbxctrls/tbunocontroller.cxx 
b/svx/source/tbxctrls/tbunocontroller.cxx
index 7f648766bc12..b87d313a9ad4 100644
--- a/svx/source/tbxctrls/tbunocontroller.cxx
+++ b/svx/source/tbxctrls/tbunocontroller.cxx
@@ -41,7 +41,7 @@
 
 #include 
 #include 
-#include 
+#include 
 
 using namespace ::com::sun::star;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-06-03 Thread Szymon Kłos (via logerrit)
 svx/source/sidebar/paragraph/ParaSpacingWindow.cxx |   72 -
 1 file changed, 72 deletions(-)

New commits:
commit 21b2346f227c7833d6e98bfdd947230006c20529
Author: Szymon Kłos 
AuthorDate: Wed Jun 3 17:52:03 2020 +0200
Commit: Szymon Kłos 
CommitDate: Wed Jun 3 17:52:03 2020 +0200

Remove duplicated InterimItemWindow

Change-Id: Ic5074c239d96efacbacc50b50c0e6da56cec0dc4

diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx 
b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
index 184448e00f1f..3f0e05060fd5 100644
--- a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
+++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx
@@ -34,78 +34,6 @@ using namespace svx;
 #define MAX_SC_SD   116220200
 #define NEGA_MAXVALUE  -1000
 
-InterimItemWindow::InterimItemWindow(vcl::Window* pParent, const OUString& 
rUIXMLDescription, const OString& rID)
-: Control(pParent, WB_TABSTOP)
-{
-m_xVclContentArea = VclPtr::Create(this);
-m_xVclContentArea->Show();
-m_xBuilder.reset(Application::CreateInterimBuilder(m_xVclContentArea, 
rUIXMLDescription));
-m_xContainer = m_xBuilder->weld_container(rID);
-}
-
-InterimItemWindow::~InterimItemWindow()
-{
-disposeOnce();
-}
-
-void InterimItemWindow::dispose()
-{
-m_xContainer.reset();
-m_xBuilder.reset();
-m_xVclContentArea.disposeAndClear();
-
-Control::dispose();
-}
-
-void InterimItemWindow::Resize()
-{
-vcl::Window *pChild = GetWindow(GetWindowType::FirstChild);
-assert(pChild);
-VclContainer::setLayoutAllocation(*pChild, Point(0, 0), GetSizePixel());
-Control::Resize();
-}
-
-Size InterimItemWindow::GetOptimalSize() const
-{
-return 
VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild));
-}
-
-bool InterimItemWindow::ChildKeyInput(const KeyEvent& rKEvt)
-{
-sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
-if (nCode != KEY_TAB)
-return false;
-
-/* if the native widget has focus, then no vcl window has focus.
-
-   We want to grab focus to this vcl widget so that pressing tab will 
travese
-   to the next vcl widget.
-
-   But just using GrabFocus will, because no vcl widget has focus, trigger
-   bringing the toplevel to front with the expectation that a suitable 
widget
-   will be picked for focus when that happen, which is no use to us here.
-
-   SetFakeFocus avoids the problem, allowing GrabFocus to do the expected 
thing
-   then sending the Tab to our parent will do the right traversal
-*/
-SetFakeFocus(true);
-GrabFocus();
-
-/* let toolbox know we have focus so it updates its mnHighItemId to point
-   to this toolitem in case tab means to move to another toolitem within
-   the toolbox
-*/
-NotifyEvent aNEvt(MouseNotifyEvent::GETFOCUS, this);
-vcl::Window* pToolBox = GetParent();
-pToolBox->EventNotify(aNEvt);
-
-/* now give focus to our toolbox parent and send it the tab */
-pToolBox->GrabFocus();
-pToolBox->KeyInput(rKEvt);
-
-return true;
-}
-
 // ParaULSpacingWindow
 
 ParaULSpacingWindow::ParaULSpacingWindow(vcl::Window* pParent)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-06-03 Thread Szymon Kłos (via logerrit)
 svx/source/tbxctrls/StylesPreviewWindow.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 170fbb1ffc2b47dd6ade7c719685c91c19c9bdf5
Author: Szymon Kłos 
AuthorDate: Wed Jun 3 13:22:54 2020 +0200
Commit: Szymon Kłos 
CommitDate: Wed Jun 3 13:22:54 2020 +0200

Fix build

Change-Id: Ic06fc28b0ca07e0c96cd9288fa7a958772b62651

diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx 
b/svx/source/tbxctrls/StylesPreviewWindow.cxx
index 48fd9ad6237f..806b168c5857 100644
--- a/svx/source/tbxctrls/StylesPreviewWindow.cxx
+++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx
@@ -388,7 +388,7 @@ StylesPreviewWindow_Base::~StylesPreviewWindow_Base()
 
 OUString StylesPreviewWindow_Base::GetVisibleStyle(unsigned nPosition)
 {
-if (nPosition < 0 || nPosition >= STYLES_COUNT || !m_aAllStyles.size())
+if (nPosition >= STYLES_COUNT || !m_aAllStyles.size())
 return "";
 
 return m_aAllStyles[(m_nStyleIterator + nPosition) % m_aAllStyles.size()];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source svx/uiconfig

2020-05-27 Thread Pranam Lashkari (via logerrit)
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx |6 ++
 svx/source/sidebar/possize/PosSizePropertyPanel.hxx |3 +
 svx/uiconfig/ui/sidebarpossize.ui   |   49 +++-
 3 files changed, 56 insertions(+), 2 deletions(-)

New commits:
commit 368033e18fef487a981ad8b53f8657ea0a0c98d3
Author: Pranam Lashkari 
AuthorDate: Sat Mar 28 06:02:05 2020 +0530
Commit: Andras Timar 
CommitDate: Wed May 27 08:51:24 2020 +0200

use "To Background" and "To Foreground" only in writer sidebar

Change-Id: Ib7ccac192721b663c9655417fc3d639766d0424d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91267
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94853
Tested-by: Andras Timar 

diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx 
b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 6258eb810f8d..e5cc427a0f2a 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -110,6 +110,7 @@ PosSizePropertyPanel::PosSizePropertyPanel(
 get( mpFtFlip,"fliplabel" );
 get( mpFlipTbx,   "selectrotationtype" );
 get( mpBtnEditChart,   "btnEditChart" );
+get( mArrang, "shaperespectedtotext");
 Initialize();
 
 mpBindings->Update( SID_ATTR_METRIC );
@@ -277,12 +278,14 @@ void PosSizePropertyPanel::HandleContextChange(
 bool bShowAngle = false;
 bool bShowFlip = false;
 bool bShowEditChart = false;
+bool bShowArrangeShape = false;
 
 switch (maContext.GetCombinedContext_DI())
 {
 case CombinedEnumContext(Application::WriterVariants, Context::Draw):
 bShowAngle = true;
 bShowFlip = true;
+bShowArrangeShape = true;
 break;
 
 case CombinedEnumContext(Application::WriterVariants, 
Context::Graphic):
@@ -342,6 +345,9 @@ void PosSizePropertyPanel::HandleContextChange(
 // Edit Chart
 mpBtnEditChart->Show(bShowEditChart);
 
+// Arrange with respect to text
+mArrang->Show(bShowArrangeShape);
+
 if (mxSidebar.is())
 mxSidebar->requestLayout();
 }
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx 
b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
index f049d5e4ef9e..26854fa4873c 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
@@ -116,6 +116,9 @@ private:
 //edit charts button for online's mobile view
 VclPtr   mpBtnEditChart;
 
+// Arrange with respect to text
+VclPtr  mArrang;
+
 // Internal variables
 basegfx::B2DRange   maRect;
 basegfx::B2DRange   maWorkArea;
diff --git a/svx/uiconfig/ui/sidebarpossize.ui 
b/svx/uiconfig/ui/sidebarpossize.ui
index 8605a49d387e..5a5fc9a00a6c 100644
--- a/svx/uiconfig/ui/sidebarpossize.ui
+++ b/svx/uiconfig/ui/sidebarpossize.ui
@@ -422,8 +422,53 @@
   
   
 True
-True
-1
+False
+2
+  
+
+
+  
+True
+False
+True
+Arrange
+end
+False
+
+  
+True
+False
+  
+
+
+  
+True
+False
+.uno:SetObjectToBackground
+True
+  
+  
+False
+True
+  
+
+
+  
+True
+False
+.uno:SetObjectToForeground
+True
+  
+  
+False
+True
+  
+
+  
+  
+True
+False
+2
   
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-05-27 Thread Pranam Lashkari (via logerrit)
 svx/source/sidebar/text/TextPropertyPanel.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 5bcf8afb26d43d61fd7c89bfc92dfba555af57d2
Author: Pranam Lashkari 
AuthorDate: Fri May 8 23:59:36 2020 +0530
Commit: Andras Timar 
CommitDate: Wed May 27 08:49:55 2020 +0200

added clear Direct Formatting button in calc sidebar

Change-Id: I7f18c696eb32332d9c65145e7788370304d91ea6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93812
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94850
Tested-by: Andras Timar 

diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx 
b/svx/source/sidebar/text/TextPropertyPanel.cxx
index e8a69b3f789d..f2b3d9ae492d 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -85,6 +85,7 @@ void TextPropertyPanel::HandleContextChange (
 
 bool bWriterText = false;
 bool bDrawText = false;
+bool bCalcText = false;
 
 switch (maContext.GetCombinedContext_DI())
 {
@@ -106,6 +107,14 @@ void TextPropertyPanel::HandleContextChange (
 bWriterText = true;
 break;
 
+case CombinedEnumContext(Application::Calc, Context::Text):
+case CombinedEnumContext(Application::Calc, Context::Table):
+case CombinedEnumContext(Application::Calc, Context::Cell):
+case CombinedEnumContext(Application::Calc, Context::EditCell):
+case CombinedEnumContext(Application::Calc, Context::Grid):
+bCalcText = true;
+break;
+
 default:
 break;
 }
@@ -113,7 +122,7 @@ void TextPropertyPanel::HandleContextChange (
 mpToolBoxFontColor->Show(!bWriterText);
 mpToolBoxFontColorSw->Show(bWriterText);
 mpToolBoxBackgroundColor->Show(bDrawText);
-mpResetAttr->Show(bWriterText);
+mpResetAttr->Show(bWriterText || bCalcText);
 mpSetDefault->Show(bDrawText);
 
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source svx/uiconfig

2020-05-27 Thread Pranam Lashkari (via logerrit)
 svx/source/sidebar/text/TextPropertyPanel.cxx |7 +++
 svx/source/sidebar/text/TextPropertyPanel.hxx |2 ++
 svx/uiconfig/ui/sidebartextpanel.ui   |   25 +
 3 files changed, 34 insertions(+)

New commits:
commit 3530807d113074a825dd6590ef5881b9f568e125
Author: Pranam Lashkari 
AuthorDate: Thu May 7 19:21:04 2020 +0530
Commit: Andras Timar 
CommitDate: Wed May 27 08:49:15 2020 +0200

fixed clear Direct Formatting button to sidebar in impress

Change-Id: I81cd30b3ce7087122c260dca99e86a3c857447b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93648
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94829
Tested-by: Andras Timar 

diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx 
b/svx/source/sidebar/text/TextPropertyPanel.cxx
index 6aa27cd3cd59..e8a69b3f789d 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -46,6 +46,8 @@ TextPropertyPanel::TextPropertyPanel ( vcl::Window* pParent, 
const css::uno::Ref
 get(mpToolBoxFontColorSw, "colorbar_writer");
 get(mpToolBoxFontColor, "colorbar_others");
 get(mpToolBoxBackgroundColor, "colorbar_background");
+get(mpResetAttr, "resetattr");
+get(mpSetDefault, "defaultattr");
 
 bool isMobilePhone = false;
 if (comphelper::LibreOfficeKit::isActive() &&
@@ -67,6 +69,8 @@ void TextPropertyPanel::dispose()
 mpToolBoxFontColorSw.clear();
 mpToolBoxFontColor.clear();
 mpToolBoxBackgroundColor.clear();
+mpResetAttr.clear();
+mpSetDefault.clear();
 
 PanelLayout::dispose();
 }
@@ -109,6 +113,9 @@ void TextPropertyPanel::HandleContextChange (
 mpToolBoxFontColor->Show(!bWriterText);
 mpToolBoxFontColorSw->Show(bWriterText);
 mpToolBoxBackgroundColor->Show(bDrawText);
+mpResetAttr->Show(bWriterText);
+mpSetDefault->Show(bDrawText);
+
 }
 
 } } // end of namespace svx::sidebar
diff --git a/svx/source/sidebar/text/TextPropertyPanel.hxx 
b/svx/source/sidebar/text/TextPropertyPanel.hxx
index bbfe13f030d2..89a57d5e7b25 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.hxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.hxx
@@ -50,6 +50,8 @@ private:
 VclPtr mpToolBoxFontColorSw;
 VclPtr mpToolBoxFontColor;
 VclPtr mpToolBoxBackgroundColor;
+VclPtr mpResetAttr;
+VclPtr mpSetDefault;
 
 vcl::EnumContext maContext;
 };
diff --git a/svx/uiconfig/ui/sidebartextpanel.ui 
b/svx/uiconfig/ui/sidebartextpanel.ui
index 64b19a115db2..e965fbff9ecb 100644
--- a/svx/uiconfig/ui/sidebartextpanel.ui
+++ b/svx/uiconfig/ui/sidebartextpanel.ui
@@ -318,6 +318,31 @@
 3
   
 
+
+  
+True
+False
+False
+
+  
+True
+False
+True
+.uno:SetDefault
+True
+  
+  
+False
+True
+  
+
+  
+  
+False
+True
+3
+  
+
 
   
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source svx/uiconfig

2020-05-21 Thread Andras Timar (via logerrit)
 svx/source/dialog/crashreportdlg.cxx |9 +
 svx/source/dialog/crashreportdlg.hxx |2 +-
 svx/uiconfig/ui/crashreportdlg.ui|   10 +++---
 3 files changed, 9 insertions(+), 12 deletions(-)

New commits:
commit 321b4048a41f501e88560ecf10837207a6b7f414
Author: Andras Timar 
AuthorDate: Fri May 5 16:20:35 2017 +0200
Commit: Mike Kaganski 
CommitDate: Thu May 21 17:13:48 2020 +0200

don't show inaccessible crashreport links

(cherry picked from commit 0d045c85fb8dbdb7fa2e116ef9983e0a60bd2b99)

Change-Id: I3c4ed28cb1a02049fb009f576943f80b8ba8e627
Reviewed-on: https://gerrit.libreoffice.org/78403
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94479
Tested-by: Mike Kaganski 
Reviewed-by: Mike Kaganski 

diff --git a/svx/source/dialog/crashreportdlg.cxx 
b/svx/source/dialog/crashreportdlg.cxx
index 52cec8fc770c..1e51b66e5582 100644
--- a/svx/source/dialog/crashreportdlg.cxx
+++ b/svx/source/dialog/crashreportdlg.cxx
@@ -28,15 +28,16 @@ CrashReportDialog::CrashReportDialog(weld::Window* pParent)
 , mxBtnCancel(m_xBuilder->weld_button("btn_cancel"))
 , mxBtnClose(m_xBuilder->weld_button("btn_close"))
 , mxEditPreUpload(m_xBuilder->weld_label("ed_pre"))
-, mxEditPostUpload(m_xBuilder->weld_text_view("ed_post"))
+, mxEditPostUpload(m_xBuilder->weld_label("ft_post"))
 , mxBugReportMailto(m_xBuilder->weld_link_button("bugreport_mailto"))
 , mxCBSafeMode(m_xBuilder->weld_check_button("check_safemode"))
 {
-maSuccessMsg = mxEditPostUpload->get_text();
+maSuccessMsg = mxEditPostUpload->get_label();
 
 auto nWidth = mxEditPreUpload->get_preferred_size().Width();
 nWidth = std::max(nWidth, mxCBSafeMode->get_size_request().Width());
 mxEditPreUpload->set_size_request(nWidth, -1);
+mxEditPostUpload->set_size_request(nWidth, -1);
 mxCBSafeMode->set_size_request(nWidth, -1);
 
 mxBtnSend->connect_clicked(LINK(this, CrashReportDialog, BtnHdl));
@@ -76,11 +77,11 @@ IMPL_LINK(CrashReportDialog, BtnHdl, weld::Button&, rBtn, 
void)
 OUString aProcessedMessage = maSuccessMsg.replaceAll("%CRASHID", 
aCrashID.replaceAll("Crash-ID=",""));
 
 // vclbuilder seems to replace _ with ~ even in text
-mxEditPostUpload->set_text(aProcessedMessage.replaceAll("~", "_"));
+mxEditPostUpload->set_label(aProcessedMessage.replaceAll("~", 
"_"));
 }
 else
 {
-mxEditPostUpload->set_text(aCrashID);
+mxEditPostUpload->set_label(aCrashID);
 }
 
 mxBtnClose->show();
diff --git a/svx/source/dialog/crashreportdlg.hxx 
b/svx/source/dialog/crashreportdlg.hxx
index 1c436c1c7639..256cf014c3fb 100644
--- a/svx/source/dialog/crashreportdlg.hxx
+++ b/svx/source/dialog/crashreportdlg.hxx
@@ -24,7 +24,7 @@ private:
 std::unique_ptr mxBtnCancel;
 std::unique_ptr mxBtnClose;
 std::unique_ptr mxEditPreUpload;
-std::unique_ptr mxEditPostUpload;
+std::unique_ptr mxEditPostUpload;
 std::unique_ptr mxBugReportMailto;
 std::unique_ptr mxCBSafeMode;
 
diff --git a/svx/uiconfig/ui/crashreportdlg.ui 
b/svx/uiconfig/ui/crashreportdlg.ui
index 9cdd939b2157..a0e2877f74e3 100644
--- a/svx/uiconfig/ui/crashreportdlg.ui
+++ b/svx/uiconfig/ui/crashreportdlg.ui
@@ -3,9 +3,7 @@
 
   
   
-The crash report was successfully uploaded.
-You can soon find the report at:
-http://crashreport.collaboraoffice.com/stats/crash_details/%CRASHID
+The crash report was successfully 
uploaded.
   
   
 False
@@ -92,13 +90,11 @@ You can help us to fix this issue by sending an anonymous 
crash report to the %P
   
 
 
-  
+  
 False
 center
-False
-False
 textbuffer1
-False
+True
   
   
 False
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source svx/uiconfig

2020-05-21 Thread Andras Timar (via logerrit)
 svx/source/dialog/crashreportdlg.cxx |5 +++--
 svx/source/dialog/crashreportdlg.hxx |2 +-
 svx/uiconfig/ui/crashreportdlg.ui|   23 +++
 3 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 543cd2d2a99072d0aa5797be29275a575261f31c
Author: Andras Timar 
AuthorDate: Wed Apr 12 17:06:37 2017 +0200
Commit: Mike Kaganski 
CommitDate: Thu May 21 17:13:12 2020 +0200

Collabora Crashreport Dialog

(cherry picked from commit c51dc04cc3cd48e7d5ab51a1f88e36bda8707c73)

fix previous commit

(cherry picked from commit 4553bc1bfa72dce55566971e27b94f3a5bfcdc79)
Reviewed-on: https://gerrit.libreoffice.org/78402
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

204f83aede085bbe4f5bd6937238b2117e51c86a

Change-Id: Id44e446684993984cf5778c82eb0a990bdd2f465
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94478
Tested-by: Mike Kaganski 
Reviewed-by: Mike Kaganski 

diff --git a/svx/source/dialog/crashreportdlg.cxx 
b/svx/source/dialog/crashreportdlg.cxx
index 85801277c27c..52cec8fc770c 100644
--- a/svx/source/dialog/crashreportdlg.cxx
+++ b/svx/source/dialog/crashreportdlg.cxx
@@ -29,7 +29,7 @@ CrashReportDialog::CrashReportDialog(weld::Window* pParent)
 , mxBtnClose(m_xBuilder->weld_button("btn_close"))
 , mxEditPreUpload(m_xBuilder->weld_label("ed_pre"))
 , mxEditPostUpload(m_xBuilder->weld_text_view("ed_post"))
-, mxFtBugReport(m_xBuilder->weld_text_view("ed_bugreport"))
+, mxBugReportMailto(m_xBuilder->weld_link_button("bugreport_mailto"))
 , mxCBSafeMode(m_xBuilder->weld_check_button("check_safemode"))
 {
 maSuccessMsg = mxEditPostUpload->get_text();
@@ -84,7 +84,8 @@ IMPL_LINK(CrashReportDialog, BtnHdl, weld::Button&, rBtn, 
void)
 }
 
 mxBtnClose->show();
-mxFtBugReport->show();
+
mxBugReportMailto->set_uri(mxBugReportMailto->get_uri().replaceAll("%CRASHID", 
aCrashID.replaceAll("Crash-ID=","")));
+mxBugReportMailto->show();
 mxEditPostUpload->show();
 mxBtnSend->set_sensitive(false);
 mxBtnCancel->set_sensitive(false);
diff --git a/svx/source/dialog/crashreportdlg.hxx 
b/svx/source/dialog/crashreportdlg.hxx
index f913cabac43f..1c436c1c7639 100644
--- a/svx/source/dialog/crashreportdlg.hxx
+++ b/svx/source/dialog/crashreportdlg.hxx
@@ -25,7 +25,7 @@ private:
 std::unique_ptr mxBtnClose;
 std::unique_ptr mxEditPreUpload;
 std::unique_ptr mxEditPostUpload;
-std::unique_ptr mxFtBugReport;
+std::unique_ptr mxBugReportMailto;
 std::unique_ptr mxCBSafeMode;
 
 OUString maSuccessMsg;
diff --git a/svx/uiconfig/ui/crashreportdlg.ui 
b/svx/uiconfig/ui/crashreportdlg.ui
index b5de76bec904..9cdd939b2157 100644
--- a/svx/uiconfig/ui/crashreportdlg.ui
+++ b/svx/uiconfig/ui/crashreportdlg.ui
@@ -5,12 +5,7 @@
   
 The crash report was successfully uploaded.
 You can soon find the report at:
-crashreport.collaboraoffice.com/stats/crash_details/%CRASHID
-  
-  
-Please check the report and if no bug 
report is connected to the crash report yet, open a new bug report at 
bugs.documentfoundation.org.
-Add detailed instructions on how to reproduce the crash and the shown crash ID 
into the crash report field.
-Thank you for your help in improving %PRODUCTNAME.
+http://crashreport.collaboraoffice.com/stats/crash_details/%CRASHID
   
   
 False
@@ -112,12 +107,16 @@ You can help us to fix this issue by sending an anonymous 
crash report to the %P
   
 
 
-  
-False
-False
-False
-textbuffer2
-False
+  
+ Click here to send an email to 
supp...@collaboraoffice.com.
+In the message body please add detailed instructions on how to reproduce the 
crash.
+Thank you for your help in improving %PRODUCTNAME.
+True
+True
+True
+none
+0
+mailto:supp...@collaboraoffice.com?subject=Crash report: 
%CRASHID
   
   
 False
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-05-20 Thread Henry Castro (via logerrit)
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx |9 +
 svx/source/sidebar/possize/PosSizePropertyPanel.hxx |2 ++
 2 files changed, 11 insertions(+)

New commits:
commit 6d2b3e68c0b2929177ad61fb4b6c377bd44d0829
Author: Henry Castro 
AuthorDate: Mon Mar 23 15:34:57 2020 -0400
Commit: Henry Castro 
CommitDate: Thu May 21 00:40:20 2020 +0200

lok: update the measure units if changed

Change-Id: If793e5e678277e27d66e7bcfbf3fbec999e46c63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90937
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94515
Tested-by: Henry Castro 
Reviewed-by: Henry Castro 

diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx 
b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 148d8e696be7..5dde7497a0d8 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -866,6 +866,15 @@ void PosSizePropertyPanel::executeSize()
 }
 }
 
+boost::property_tree::ptree PosSizePropertyPanel::DumpAsPropertyTree()
+{
+if (meDlgUnit != GetCurrentUnit(SfxItemState::DEFAULT, nullptr))
+{
+mpBindings->Update( SID_ATTR_METRIC );
+}
+
+return PanelLayout::DumpAsPropertyTree();
+}
 
 void PosSizePropertyPanel::MetricState( SfxItemState eState, const 
SfxPoolItem* pState )
 {
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx 
b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
index 2ac505428c36..ab72632649c9 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx
@@ -73,6 +73,8 @@ public:
 const SfxItemState eState,
 const SfxPoolItem* pState) override;
 
+virtual boost::property_tree::ptree DumpAsPropertyTree() override;
+
 SfxBindings* GetBindings() { return mpBindings;}
 
 // constructor/destructor
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-05-20 Thread Henry Castro (via logerrit)
 svx/source/svdraw/svdmrkv.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit ec9496b9ab2ca62c4522b883c2f3b4f669a91536
Author: Henry Castro 
AuthorDate: Tue Feb 4 15:05:09 2020 -0400
Commit: Henry Castro 
CommitDate: Thu May 21 00:38:42 2020 +0200

lok: add "type" information when a graphic is selected

Change-Id: I67a36d3aabbc197d9ac8f6ca4509dafd6f2620f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87989
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94512
Tested-by: Henry Castro 

diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index a1806a13299e..1bbd669bab5d 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -844,9 +844,10 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell)
 
 OStringBuffer aExtraInfo;
 
-aExtraInfo.append("{ \"id\": \"");
+aExtraInfo.append("{\"id\":\"");
 
aExtraInfo.append(OString::number(reinterpret_cast(pO)));
-aExtraInfo.append("\"");
+aExtraInfo.append("\",\"type\":");
+aExtraInfo.append(OString::number(pO->GetObjIdentifier()));
 
 if (bWriterGraphic)
 {
@@ -978,7 +979,7 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell)
 }
 }
 }
-aExtraInfo.append(" }");
+aExtraInfo.append("}");
 
 sSelectionText = aSelection.toString() +
 ", " + OString::number(nRotAngle);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - svx/source

2020-05-20 Thread Henry Castro (via logerrit)
 svx/source/svdraw/svdmrkv.cxx |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit f2a5fcbea0e1d118a9bcb701c26d064a74f80690
Author: Henry Castro 
AuthorDate: Tue Jan 21 17:00:13 2020 -0400
Commit: Henry Castro 
CommitDate: Thu May 21 00:38:03 2020 +0200

lok: add id information to the selected graphic

When the graphic is selected it is necessary to send
the id so the SVG background can be cached.

Change-Id: I13afcad61c2f059f409484ea4af089dd199d1242
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87165
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87285
Tested-by: Jenkins
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94511
Tested-by: Henry Castro 

diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 0391088cc377..a1806a13299e 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -843,9 +843,14 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell)
 }
 
 OStringBuffer aExtraInfo;
+
+aExtraInfo.append("{ \"id\": \"");
+
aExtraInfo.append(OString::number(reinterpret_cast(pO)));
+aExtraInfo.append("\"");
+
 if (bWriterGraphic)
 {
-aExtraInfo.append("{ \"isWriterGraphic\": true }");
+aExtraInfo.append(", \"isWriterGraphic\": true");
 }
 else if (bIsChart)
 {
@@ -859,7 +864,6 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell)
 if (aSel >>= aValue)
 {
 OString aObjectCID(aValue.getStr(), 
aValue.getLength(), osl_getThreadTextEncoding());
-aExtraInfo.append("{ ");
 const std::vector aProps{"Draggable", 
"Resizable", "Rotatable"};
 for (const auto& rProp: aProps)
 {
@@ -971,10 +975,11 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* 
pOtherShell)
 aExtraInfo.append("}"); // dragInfo
 }
 }
-aExtraInfo.append(" }");
 }
 }
 }
+aExtraInfo.append(" }");
+
 sSelectionText = aSelection.toString() +
 ", " + OString::number(nRotAngle);
 if (!aExtraInfo.isEmpty())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits