[Libreoffice-commits] core.git: sfx2/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 5 18:13:38 UTC 2020
sfx2/source/dialog/templdlg.cxx | 24 ++++++++----------------
1 file changed, 8 insertions(+), 16 deletions(-)
New commits:
commit cae9785d0f7aa298d2f98f5d0334610b603d2b79
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue May 5 14:34:08 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue May 5 20:12:55 2020 +0200
use SfxStyleSearchBits::Auto as fallback
instead of SfxStyleSheetBasePool::GetSearchMask()
Change-Id: I2ca3ccc775f30f0ffa99f6cc2c41c69c6d401010
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93493
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index aab406227ef4..8d52f5ae8ad5 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1607,15 +1607,11 @@ void SfxCommonTemplateDialog_Impl::ActionSelect(const OString& rEntry)
{
const SfxStyleFamily eFam=GetFamilyItem_Impl()->GetFamily();
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
- SfxStyleSearchBits nFilter;
- if( pItem && nActFilter != 0xffff )
- {
+ SfxStyleSearchBits nFilter(SfxStyleSearchBits::Auto);
+ if (pItem && nActFilter != 0xffff)
nFilter = pItem->GetFilterList()[nActFilter].nFlags;
- if(nFilter == SfxStyleSearchBits::Auto) // automatic
- nFilter = nAppFilter;
- }
- else
- nFilter=pStyleSheetPool->GetSearchMask();
+ if (nFilter == SfxStyleSearchBits::Auto) // automatic
+ nFilter = nAppFilter;
// why? : FloatingWindow must not be parent of a modal dialog
SfxNewStyleDlg aDlg(pWindow ? pWindow->GetFrameWeld() : nullptr, *pStyleSheetPool, eFam);
@@ -1719,15 +1715,11 @@ void SfxCommonTemplateDialog_Impl::NewHdl()
const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl();
const SfxStyleFamily eFam=pItem->GetFamily();
- SfxStyleSearchBits nMask;
- if( nActFilter != 0xffff )
- {
+ SfxStyleSearchBits nMask(SfxStyleSearchBits::Auto);
+ if (nActFilter != 0xffff)
nMask = pItem->GetFilterList()[nActFilter].nFlags;
- if(nMask == SfxStyleSearchBits::Auto) // automatic
- nMask = nAppFilter;
- }
- else
- nMask=pStyleSheetPool->GetSearchMask();
+ if (nMask == SfxStyleSearchBits::Auto) // automatic
+ nMask = nAppFilter;
pStyleSheetPool->SetSearchMask(eFam,nMask);
More information about the Libreoffice-commits
mailing list