summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-05-05 14:34:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-05-05 20:12:55 +0200
commitcae9785d0f7aa298d2f98f5d0334610b603d2b79 (patch)
tree6fa4e7ec1aeb26870d254aa10e9cea7c86d4ddb8 /sfx2/source
parent0587cd484c010aa9ed21048d4ad35aae1ed5cd50 (diff)
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@redhat.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/dialog/templdlg.cxx24
1 files changed, 8 insertions, 16 deletions
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);