diff options
-rw-r--r-- | sw/source/core/unocore/unodraw.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
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(); |