[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sw/source
Vasily Melenchuk (via logerrit)
logerrit at kemper.freedesktop.org
Thu Aug 27 08:22:10 UTC 2020
sw/source/core/doc/DocumentLayoutManager.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 8c0cf4e63c1522a58584f93f38cda71b87c9bb3a
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Thu Aug 20 12:06:03 2020 +0300
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Thu Aug 27 10:21:35 2020 +0200
tdf#133490: set name for pasted frame format
In some copy/paste operations resulting frame format name can
be empty. This can lead to problems with udo/redo which relies
on format names.
Change-Id: I3cb542321d37cc00e2dee83d0f667164d83ead78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101042
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
(cherry picked from commit a6c2a87612a10d55fc59fa01e44d67d95505834f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101367
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx
index 67875e86efbb..57e436a8bac6 100644
--- a/sw/source/core/doc/DocumentLayoutManager.cxx
+++ b/sw/source/core/doc/DocumentLayoutManager.cxx
@@ -40,6 +40,7 @@
#include <ndindex.hxx>
#include <pam.hxx>
#include <com/sun/star/embed/EmbedStates.hpp>
+#include <svx/svdobj.hxx>
using namespace ::com::sun::star;
@@ -483,6 +484,14 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat(
pDestTextBox->SetOtherTextBoxFormat(pDest);
}
+ if (pDest->GetName().isEmpty())
+ {
+ // Format name should have unique name. Let's use object name as a fallback
+ SdrObject *pObj = pDest->FindSdrObject();
+ if (pObj)
+ pDest->SetName(pObj->GetName());
+ }
+
return pDest;
}
More information about the Libreoffice-commits
mailing list