summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-18 12:14:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-19 08:35:42 +0200
commit0035573ee7798cdf54ef44a54306a0515eeb90a7 (patch)
tree29f89470e725120dbb6378a64ab0bf01970ecf89 /sd/source
parent694f3ed0825d75bf855a74b2294ba0ff370afbb6 (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 'sd/source')
-rw-r--r--sd/source/core/drawdoc4.cxx6
-rw-r--r--sd/source/core/stlpool.cxx6
-rw-r--r--sd/source/core/stlsheet.cxx8
-rw-r--r--sd/source/ui/func/futempl.cxx14
4 files changed, 17 insertions, 17 deletions
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 72109415af6d..6f6e7ada56ac 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -130,7 +130,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Default style
- sal_uInt16 nMask = SFXSTYLEBIT_AUTO;
+ SfxStyleSearchBits nMask = SfxStyleSearchBits::Auto;
OUString aName(aStdName);
pSheet = &(pSSPool->Make(aName, SfxStyleFamily::Para, nMask));
@@ -492,7 +492,7 @@ void SdDrawDocument::CreateLayoutTemplates()
static Any implMakeSolidCellStyle( SdStyleSheetPool* pSSPool, const OUString& rName, const OUString& rParent, const Color& rColor )
{
- SfxStyleSheetBase* pSheet = &(pSSPool->Make(rName, SfxStyleFamily::Frame, SFXSTYLEBIT_AUTO));
+ SfxStyleSheetBase* pSheet = &(pSSPool->Make(rName, SfxStyleFamily::Frame, SfxStyleSearchBits::Auto));
pSheet->SetParent(rParent);
SfxItemSet* pISet = &pSheet->GetItemSet();
pISet->Put(XFillStyleItem(drawing::FillStyle_SOLID));
@@ -537,7 +537,7 @@ void SdDrawDocument::CreateDefaultCellStyles()
OUString aDefaultCellStyleName( "default" );
- pSheet = &(pSSPool->Make(aDefaultCellStyleName, SfxStyleFamily::Frame, SFXSTYLEBIT_AUTO));
+ pSheet = &(pSSPool->Make(aDefaultCellStyleName, SfxStyleFamily::Frame, SfxStyleSearchBits::Auto));
pSheet->SetHelpId( OUString(), HID_SD_CELL_STYLE_DEFAULT );
SfxItemSet& rISet = pSheet->GetItemSet();
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 6a25bb423751..8580b10f82ee 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -135,7 +135,7 @@ SdStyleSheetPool::~SdStyleSheetPool()
DBG_ASSERT( mpDoc == nullptr, "sd::SdStyleSheetPool::~SdStyleSheetPool(), dispose me first!" );
}
-SfxStyleSheetBase* SdStyleSheetPool::Create(const OUString& rName, SfxStyleFamily eFamily, sal_uInt16 _nMask )
+SfxStyleSheetBase* SdStyleSheetPool::Create(const OUString& rName, SfxStyleFamily eFamily, SfxStyleSearchBits _nMask )
{
return new SdStyleSheet(rName, *this, eFamily, _nMask);
}
@@ -180,7 +180,7 @@ void SdStyleSheetPool::CreateOutlineSheetList (const OUString& rLayoutName, std:
void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool bCheck /*= sal_False*/ )
{
- const sal_uInt16 nUsedMask = SFXSTYLEBIT_ALL & ~SFXSTYLEBIT_USERDEF;
+ const SfxStyleSearchBits nUsedMask = SfxStyleSearchBits::All & ~SfxStyleSearchBits::UserDefined;
bool bCreated = false;
@@ -840,7 +840,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
SfxStyleSheetBase* pSheet = nullptr;
SfxStyleSheetBase* pParent = nullptr;
- sal_uInt16 nUsedMask = SFXSTYLEBIT_USED;
+ SfxStyleSearchBits nUsedMask = SfxStyleSearchBits::Used;
aName = SdResId(STR_PSEUDOSHEET_TITLE);
if( (pSheet = Find(aName, SfxStyleFamily::Pseudo)) == nullptr )
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 012546b6b7e2..428f70b1c952 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -129,7 +129,7 @@ void ModifyListenerForewarder::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /*
mpStyleSheet->notifyModifyListener();
}
-SdStyleSheet::SdStyleSheet(const OUString& rDisplayName, SfxStyleSheetBasePool& _rPool, SfxStyleFamily eFamily, sal_uInt16 _nMask)
+SdStyleSheet::SdStyleSheet(const OUString& rDisplayName, SfxStyleSheetBasePool& _rPool, SfxStyleFamily eFamily, SfxStyleSearchBits _nMask)
: SdStyleSheetBase( rDisplayName, _rPool, eFamily, _nMask)
, ::cppu::BaseMutex()
, msApiName( rDisplayName )
@@ -162,10 +162,10 @@ void SdStyleSheet::Load (SvStream& rIn, sal_uInt16 nVersion)
SfxStyleSheetBase::Load(rIn, nVersion);
/* previously, the default mask was 0xAFFE. The needed flags were masked
- from this mask. Now the flag SFXSTYLEBIT_READONLY was introduced and with
+ from this mask. Now the flag SfxStyleSearchBits::ReadOnly was introduced and with
this, all style sheets are read only. Since no style sheet should be read
only in Draw, we reset the flag here. */
- nMask &= ~SFXSTYLEBIT_READONLY;
+ nMask &= ~SfxStyleSearchBits::ReadOnly;
}
bool SdStyleSheet::SetParent(const OUString& rParentName)
@@ -661,7 +661,7 @@ SdStyleSheet* SdStyleSheet::CreateEmptyUserStyle( SfxStyleSheetBasePool& rPool,
}
while( rPool.Find( aName, eFamily ) != nullptr );
- return new SdStyleSheet(aName, rPool, eFamily, SFXSTYLEBIT_USERDEF);
+ return new SdStyleSheet(aName, rPool, eFamily, SfxStyleSearchBits::UserDefined);
}
// XInterface
diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx
index 4264391a78e6..7402a939c813 100644
--- a/sd/source/ui/func/futempl.cxx
+++ b/sd/source/ui/func/futempl.cxx
@@ -119,7 +119,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
}
OUString aStyleName;
- sal_uInt16 nRetMask = SFXSTYLEBIT_ALL;
+ sal_uInt16 nRetMask = static_cast<sal_uInt16>(SfxStyleSearchBits::All);
switch( nSId )
{
@@ -167,7 +167,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
pSSPool->Remove(p);
p = nullptr;
}
- pStyleSheet = &pSSPool->Make( aStyleName, nFamily, SFXSTYLEBIT_USERDEF );
+ pStyleSheet = &pSSPool->Make( aStyleName, nFamily, SfxStyleSearchBits::UserDefined );
if (pArgs && pArgs->GetItemState(SID_STYLE_REFERENCE) == SfxItemState::SET)
{
@@ -190,7 +190,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
pSSPool->Remove(p);
p = nullptr;
}
- pStyleSheet = &pSSPool->Make( aStyleName, nFamily, SFXSTYLEBIT_USERDEF );
+ pStyleSheet = &pSSPool->Make( aStyleName, nFamily, SfxStyleSearchBits::UserDefined );
pStyleSheet->SetParent(SdResId(STR_STANDARD_STYLESHEET_NAME));
}
break;
@@ -382,7 +382,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
{
case RET_OK:
{
- nRetMask = pStyleSheet->GetMask();
+ nRetMask = static_cast<sal_uInt16>(pStyleSheet->GetMask());
if (eFamily == SfxStyleFamily::Pseudo)
{
@@ -568,7 +568,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
{
if( pStyleSheet )
{
- nRetMask = pStyleSheet->GetMask();
+ nRetMask = static_cast<sal_uInt16>(pStyleSheet->GetMask());
SfxItemSet aCoreSet( mpDoc->GetPool() );
mpView->GetAttributes( aCoreSet, true );
@@ -612,7 +612,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
if( pStyleSheet )
{
- nRetMask = pStyleSheet->GetMask();
+ nRetMask = static_cast<sal_uInt16>(pStyleSheet->GetMask());
SfxItemSet aCoreSet( mpDoc->GetPool() );
mpView->GetAttributes( aCoreSet );
@@ -630,7 +630,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
break;
}
- if( nRetMask != SFXSTYLEBIT_ALL )
+ if( nRetMask != static_cast<sal_uInt16>(SfxStyleSearchBits::All) )
rReq.SetReturnValue( SfxUInt16Item( nSId, nRetMask ) );
}