diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/mgetempl.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/styledlg.cxx | 4 |
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); |