diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2020-04-30 16:27:37 +0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-05-04 22:48:12 +0200 |
commit | db3d90abd3bb830b079169397f656c56bdcc3af8 (patch) | |
tree | fe916269d0329ea533f79eaf30681320af05e069 /sw | |
parent | 0bb9197653f9fb73735769acca5f19428726baa6 (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>
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 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(); } |