diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2020-04-30 16:27:37 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2020-08-23 19:13:32 +0200 |
commit | e4c4caea265b874f5f6b96b2aab108785e9ebc3a (patch) | |
tree | 3f50957e654a38ede60961f11c9f3b709c1dcb5e /sw | |
parent | 9253d60c6fa4c8f37eba8e445cb5432e80a61696 (diff) |
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@CIB.de>
(cherry picked from commit db3d90abd3bb830b079169397f656c56bdcc3af8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100939
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101226
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/edit/edfcol.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 7216ab102c87..2b49ee16ecc8 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -1532,6 +1532,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); @@ -1600,8 +1604,6 @@ static void lcl_placeWatermarkInHeader(const SfxWatermarkItem& rWatermark, xPropertySet->setPropertyValue(UNO_NAME_HORI_ORIENT, uno::makeAny(static_cast<sal_Int16>(text::HoriOrientation::CENTER))); xPropertySet->setPropertyValue(UNO_NAME_VERT_ORIENT, uno::makeAny(static_cast<sal_Int16>(text::VertOrientation::CENTER))); - uno::Reference<container::XNamed> xNamed(xShape, uno::UNO_QUERY); - xNamed->setName(sWatermark); xLockable->removeActionLock(); } |