use SfxStyleSearchBits::All for GenerateUnusedName
use in SfxManageStyleSheetPage is definitely with
SfxStyleSearchBits::All applied. It seems almost certain that
use in SwDocShell::ExecStyleSheet would prefer that
Change-Id: I245c3f02bcce87f124bf0e507b59738a6dff34d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93354
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx
index 3f694ec..2614083 100644
--- a/sfx2/source/dialog/styledlg.cxx
+++ b/sfx2/source/dialog/styledlg.cxx
@@ -113,7 +113,7 @@ OUString SfxStyleDialogController::GenerateUnusedName(SfxStyleSheetBasePool &rPo
OUString aNo(SfxResId(STR_NONAME));
sal_uInt16 i = 1;
OUString aNoName = aNo + OUString::number(i);
while (rPool.Find(aNoName, eFam, rPool.GetSearchMask()))
while (rPool.Find(aNoName, eFam))
{
++i;
aNoName = aNo + OUString::number(i);