diff options
author | Jim Raykowski <raykowj@gmail..com> | 2019-08-15 00:31:25 -0800 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-28 10:22:59 +0100 |
commit | 9f86b320a997c77069cf93dcb32fb71f09ad1348 (patch) | |
tree | c7767f9da6a3fbd465d80f36fee8ec2a9bd567fa /svx/source/svdraw/svdxcgv.cxx | |
parent | 2d8efd1afe03a4009600e914910144b70982e98d (diff) |
tdf#125191 Give object copies unique names
This patch makes a unique name for a copy of an object having
a user given name.
Change-Id: I14a7f45cc02962fc34a1532dd5db1cb9657b41d3
Reviewed-on: https://gerrit.libreoffice.org/77500
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw/svdxcgv.cxx')
-rw-r--r-- | svx/source/svdraw/svdxcgv.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index a65d38c8738d..f18d536b7bf2 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -18,6 +18,7 @@ */ #include <vector> +#include <unordered_set> #include <editeng/editdata.hxx> #include <editeng/editeng.hxx> #include <rtl/strbuf.hxx> @@ -301,7 +302,7 @@ bool SdrExchangeView::Paste( // #i13033# // New mechanism to re-create the connections of cloned connectors CloneList aCloneList; - + std::unordered_set<rtl::OUString> aNameSet; for (size_t nOb=0; nOb<nObjCount; ++nOb) { const SdrObject* pSrcOb=pSrcPg->GetObj(nOb); @@ -346,7 +347,7 @@ bool SdrExchangeView::Paste( pNewObj->SetLayer(nLayer); } - pDstLst->InsertObject(pNewObj, SAL_MAX_SIZE); + pDstLst->InsertObjectThenMakeNameUnique(pNewObj, aNameSet); if( bUndo ) AddUndo(getSdrModelFromSdrView().GetSdrUndoFactory().CreateUndoNewObject(*pNewObj)); |