[Libreoffice-commits] core.git: sw/source

Vasily Melenchuk (via logerrit) logerrit at kemper.freedesktop.org
Mon May 4 20:48:47 UTC 2020


 sw/source/core/edit/edfcol.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit db3d90abd3bb830b079169397f656c56bdcc3af8
Author:     Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Thu Apr 30 16:27:37 2020 +0300
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon May 4 22:48:12 2020 +0200

    sw: moved setting shape name to earlier stage
    
    During setting of some shape properties undo/redo code is called.
    Undo/redo code should know about shape and style name.
    
    Change-Id: I5240c450d0c739a245e32e9ca6f34518f35ddda5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93214
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index f6804b0db3c4..6ecde0f71c77 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -1522,6 +1522,10 @@ static void lcl_placeWatermarkInHeader(const SfxWatermarkItem& rWatermark,
 
     // Create and insert the shape.
     uno::Reference<drawing::XShape> xShape(xMultiServiceFactory->createInstance(aShapeServiceName), uno::UNO_QUERY);
+
+    uno::Reference<container::XNamed> xNamed(xShape, uno::UNO_QUERY);
+    xNamed->setName(sWatermark);
+
     basegfx::B2DHomMatrix aTransformation;
     aTransformation.identity();
     aTransformation.scale(nWidth, nHeight);
@@ -1590,8 +1594,6 @@ static void lcl_placeWatermarkInHeader(const SfxWatermarkItem& rWatermark,
     xPropertySet->setPropertyValue(UNO_NAME_HORI_ORIENT, uno::makeAny(text::HoriOrientation::CENTER));
     xPropertySet->setPropertyValue(UNO_NAME_VERT_ORIENT, uno::makeAny(text::VertOrientation::CENTER));
 
-    uno::Reference<container::XNamed> xNamed(xShape, uno::UNO_QUERY);
-    xNamed->setName(sWatermark);
     xLockable->removeActionLock();
 }
 


More information about the Libreoffice-commits mailing list