summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/DocumentLayoutManager.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc/DocumentLayoutManager.cxx')
-rw-r--r--sw/source/core/doc/DocumentLayoutManager.cxx9
1 files changed, 9 insertions, 0 deletions
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;
}