summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-05-03 19:39:19 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-05-03 22:44:08 +0200
commita9102a1c637272d88ef542d37b871bd9278cacb7 (patch)
treec8396740a53e5262f1937917fea008098d853d00 /sfx2
parent28609e1017adf10cdfa513639406e362e578259e (diff)
explicitly pass SfxStyleFamily to GenerateUnusedName
Change-Id: I7879578383d58cb65441c9049e91e33bb4827afb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93353 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/mgetempl.cxx2
-rw-r--r--sfx2/source/dialog/styledlg.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index f924b41ac96d..44aba7480eaf 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -110,7 +110,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(weld::Container* pPage, weld::D
if ( pStyle->GetName().isEmpty() && pPool )
{
// NullString as Name -> generate Name
- OUString aNoName(SfxStyleDialogController::GenerateUnusedName(*pPool));
+ OUString aNoName(SfxStyleDialogController::GenerateUnusedName(*pPool, pStyle->GetFamily()));
pStyle->SetName( aNoName );
aName = aNoName;
aFollow = pStyle->GetFollow();
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index 133c338d1176..3f694ec66573 100644
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -108,12 +108,12 @@ IMPL_LINK_NOARG(SfxStyleDialogController, CancelHdl, weld::Button&, void)
m_xDialog->response(RET_CANCEL);
}
-OUString SfxStyleDialogController::GenerateUnusedName(SfxStyleSheetBasePool &rPool)
+OUString SfxStyleDialogController::GenerateUnusedName(SfxStyleSheetBasePool &rPool, SfxStyleFamily eFam)
{
OUString aNo(SfxResId(STR_NONAME));
sal_uInt16 i = 1;
OUString aNoName = aNo + OUString::number(i);
- while (rPool.Find(aNoName, rPool.GetSearchFamily(), rPool.GetSearchMask()))
+ while (rPool.Find(aNoName, eFam, rPool.GetSearchMask()))
{
++i;
aNoName = aNo + OUString::number(i);