diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2019-11-21 20:12:52 +0300 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-01-24 11:12:11 +0100 |
commit | fd0cade5e0fc29436572799aa48f3aca789e1734 (patch) | |
tree | db0d105f34ba3eb699b4117eb991deff3b6f7775 /sw | |
parent | 4de88a0f0814d88abe8703936afdc76f8bd3d685 (diff) |
tdf#128782: sw: assign name to draw object
SwXDrawPage is inserting frame styles without name. This is confusing
undo/redo code which is operating styles by names.
Change-Id: Ibcda01fbd3ec88e9cdbde446c3f18c7ad6b0cbc8
Reviewed-on: https://gerrit.libreoffice.org/83415
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
(cherry picked from commit c2d689790c332ffd2f0d73de6aae53f26f0fbe53)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87206
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87304
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/unocore/unodraw.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index b6536f0397e1..4f6f0df53530 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -719,7 +719,11 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape) pDoc->getIDocumentContentOperations().InsertDrawObj( *pTemp, *pObj, aSet ); SwFrameFormat* pFormat = ::FindFrameFormat( pObj ); if(pFormat) + { + if (pFormat->GetName().isEmpty()) + pFormat->SetName(pDoc->GetUniqueFrameName(), false); pFormat->Add(pShape); + } pShape->m_bDescriptor = false; pPam.reset(); |