diff options
author | Jim Raykowski <raykowj@gmail..com> | 2020-04-15 21:24:44 -0800 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-16 10:09:38 +0200 |
commit | 00d4852eef26037f7ddf6778542a131e94c752b2 (patch) | |
tree | 78b469074f35bc692b0ee62a3a252aa4e949f044 /svx | |
parent | 86280100cb4d558e2c1a4f67aa6e3ce7fdfb87b1 (diff) |
tdf#122444 Use fontwork name for object name
Change-Id: Icdbde958f2e89e669a9399479e0059095a6d8a3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92333
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdobj.cxx | 6 | ||||
-rw-r--r-- | svx/source/tbxctrls/fontworkgallery.cxx | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index b1e4a44ae12b..8081df8269e5 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -2990,6 +2990,12 @@ bool SdrObject::IsTextBox() const return false; } +void SdrObject::MakeNameUnique() +{ + std::unordered_set<OUString> aNameSet; + MakeNameUnique(aNameSet); +} + void SdrObject::MakeNameUnique(std::unordered_set<OUString>& rNameSet) { if (GetName().isEmpty()) diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx index d7dea7f070e1..4268cec97316 100644 --- a/svx/source/tbxctrls/fontworkgallery.cxx +++ b/svx/source/tbxctrls/fontworkgallery.cxx @@ -192,6 +192,8 @@ void FontWorkGalleryDialog::insertSelectedFontwork() pPage->GetObj(0)->CloneSdrObject( bUseSpecialCalcMode ? *mpDestModel : mrSdrView.getSdrModelFromSdrView())); + pNewObject->MakeNameUnique(); + // tdf#117629 // Since the 'old' ::CloneSdrObject also copies the SdrPage* the // SdrObject::getUnoShape() *will* create the wrong UNO API object |