summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unodraw.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/unocore/unodraw.cxx')
-rw-r--r--sw/source/core/unocore/unodraw.cxx4
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();