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

Vasily Melenchuk (via logerrit) logerrit at kemper.freedesktop.org
Wed Nov 27 21:45:40 UTC 2019


 sw/source/core/unocore/unodraw.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit c2d689790c332ffd2f0d73de6aae53f26f0fbe53
Author:     Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Thu Nov 21 20:12:52 2019 +0300
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Nov 27 22:43:41 2019 +0100

    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 at CIB.de>

diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 4d14d25467e1..9dd329920602 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -713,8 +713,12 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape)
     UnoActionContext aAction(pDoc);
     pDoc->getIDocumentContentOperations().InsertDrawObj( *pTemp, *pObj, aSet );
     SwFrameFormat* pFormat = ::FindFrameFormat( pObj );
-    if(pFormat)
+    if (pFormat)
+    {
+        if (pFormat->GetName().isEmpty())
+            pFormat->SetName(pDoc->GetUniqueFrameName(), false);
         pShape->SetFrameFormat(pFormat);
+    }
     pShape->m_bDescriptor = false;
 
     pPam.reset();


More information about the Libreoffice-commits mailing list