diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-18 12:14:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-19 08:35:42 +0200 |
commit | 0035573ee7798cdf54ef44a54306a0515eeb90a7 (patch) | |
tree | 29f89470e725120dbb6378a64ab0bf01970ecf89 /sfx2/source/dialog/mgetempl.cxx | |
parent | 694f3ed0825d75bf855a74b2294ba0ff370afbb6 (diff) |
convert SFXSTYLEBIT to scoped enum
drop SFXSTYLEBIT_HIERARCHY because it has no overlap with these values,
it's used an extra bit in
SfxCommonTemplateDialog_Impl::LoadFactoryStyleFilter
Change-Id: I8ee5ecb9b5f8d2087d8eedd1f5526260ec1e4018
Reviewed-on: https://gerrit.libreoffice.org/53089
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/dialog/mgetempl.cxx')
-rw-r--r-- | sfx2/source/dialog/mgetempl.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index f7f29f4e0010..77eed3e403e7 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -189,19 +189,19 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(vcl::Window* pParent, const Sfx const SfxStyleFilter& rList = pItem->GetFilterList(); nCount = rList.size(); sal_uInt16 nIdx = 0; - sal_uInt16 nMask = pStyle->GetMask() & ~SFXSTYLEBIT_USERDEF; + SfxStyleSearchBits nMask = pStyle->GetMask() & ~SfxStyleSearchBits::UserDefined; - if ( !nMask ) // User Template? + if ( nMask == SfxStyleSearchBits::Auto ) // User Template? nMask = pStyle->GetMask(); for ( i = 0; i < nCount; ++i ) { const SfxFilterTupel& rTupel = rList[ i ]; - if ( rTupel.nFlags != SFXSTYLEBIT_AUTO && - rTupel.nFlags != SFXSTYLEBIT_USED && - rTupel.nFlags != SFXSTYLEBIT_ALL_VISIBLE && - rTupel.nFlags != SFXSTYLEBIT_ALL ) + if ( rTupel.nFlags != SfxStyleSearchBits::Auto && + rTupel.nFlags != SfxStyleSearchBits::Used && + rTupel.nFlags != SfxStyleSearchBits::AllVisible && + rTupel.nFlags != SfxStyleSearchBits::All ) { m_pFilterLb->InsertEntry( rTupel.aName, nIdx ); m_pFilterLb->SetEntryData(nIdx, reinterpret_cast<void*>(i)); @@ -453,7 +453,7 @@ bool SfxManageStyleSheetPage::FillItemSet( SfxItemSet* rSet ) bModified = true; OSL_ENSURE( pItem, "No Item" ); // is only possibly for user templates - sal_uInt16 nMask = pItem->GetFilterList()[ reinterpret_cast<size_t>(m_pFilterLb->GetEntryData( nFilterIdx )) ].nFlags | SFXSTYLEBIT_USERDEF; + SfxStyleSearchBits nMask = pItem->GetFilterList()[ reinterpret_cast<size_t>(m_pFilterLb->GetEntryData( nFilterIdx )) ].nFlags | SfxStyleSearchBits::UserDefined; pStyle->SetMask( nMask ); } if(m_pAutoCB->IsVisible() && @@ -525,7 +525,7 @@ void SfxManageStyleSheetPage::Reset( const SfxItemSet* /*rAttrSet*/ ) if ( m_pFilterLb->IsEnabled() ) { - sal_uInt16 nCmp = pStyle->GetMask(); + SfxStyleSearchBits nCmp = pStyle->GetMask(); if ( nCmp != nFlags ) pStyle->SetMask( nFlags ); |