diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-04 11:31:33 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-05-09 10:17:13 +0200 |
commit | bcb41235deaf4b7ca90522bda3ba21a686819e6e (patch) | |
tree | 29f397deeb5c776b290b782847a4f9ec8487adb2 /sc/source/ui/docshell | |
parent | b55b7a057f19521ad88fc6a274fcf071b798eb3e (diff) |
convert SfxStyleFamily to scoped enum
and update the RSC compiler to accept such
In the process fix some confusion in SD where it was confusing
SfxStyleFamily and the index of the relevant family
(which other parts of the code in SVL use)
Change-Id: I1efc9f85fbed8ab76eafe8f6e1ada411753ae5f9
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh3.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 22 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh6.cxx | 6 |
4 files changed, 16 insertions, 16 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 398a761cf61b..a8f85a0e2fd9 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -1392,7 +1392,7 @@ bool ScDocFunc::ApplyStyle( const ScMarkData& rMark, const OUString& rStyleName, } ScStyleSheet* pStyleSheet = static_cast<ScStyleSheet*>( rDoc.GetStyleSheetPool()->Find( - rStyleName, SFX_STYLE_FAMILY_PARA )); + rStyleName, SfxStyleFamily::Para )); if (!pStyleSheet) return false; diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 11af532458ab..72bdfadbebaf 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -522,7 +522,7 @@ sal_uInt16 ScDocShell::SetPrinter( SfxPrinter* pNewPrinter, SfxPrinterChangeFlag { OUString aStyle = aDocument.GetPageStyle( GetCurTab() ); ScStyleSheetPool* pStPl = aDocument.GetStyleSheetPool(); - SfxStyleSheet* pStyleSheet = static_cast<SfxStyleSheet*>(pStPl->Find(aStyle, SFX_STYLE_FAMILY_PAGE)); + SfxStyleSheet* pStyleSheet = static_cast<SfxStyleSheet*>(pStPl->Find(aStyle, SfxStyleFamily::Page)); if (pStyleSheet) { SfxItemSet& rSet = pStyleSheet->GetItemSet(); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index b667891759fc..1bedf9183548 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1278,10 +1278,10 @@ void ScDocShell::DoAutoStyle( const ScRange& rRange, const OUString& rStyle ) { ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool(); ScStyleSheet* pStyleSheet = - pStylePool->FindCaseIns( rStyle, SFX_STYLE_FAMILY_PARA ); + pStylePool->FindCaseIns( rStyle, SfxStyleFamily::Para ); if (!pStyleSheet) pStyleSheet = static_cast<ScStyleSheet*>( - pStylePool->Find( ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SFX_STYLE_FAMILY_PARA )); + pStylePool->Find( ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SfxStyleFamily::Para )); if (pStyleSheet) { OSL_ENSURE(rRange.aStart.Tab() == rRange.aEnd.Tab(), @@ -1304,7 +1304,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint ) if (!pStyle) return; - if ( pStyle->GetFamily() == SFX_STYLE_FAMILY_PAGE ) + if ( pStyle->GetFamily() == SfxStyleFamily::Page ) { if ( nId == SfxStyleSheetHintId::MODIFIED ) { @@ -1344,7 +1344,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint ) } } } - else if ( pStyle->GetFamily() == SFX_STYLE_FAMILY_PARA ) + else if ( pStyle->GetFamily() == SfxStyleFamily::Para ) { if ( nId == SfxStyleSheetHintId::MODIFIED) { @@ -1375,7 +1375,7 @@ void ScDocShell::SetPrintZoom( SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages { OUString aStyleName = aDocument.GetPageStyle( nTab ); ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool(); - SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PAGE ); + SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SfxStyleFamily::Page ); OSL_ENSURE( pStyleSheet, "PageStyle not found" ); if ( pStyleSheet ) { @@ -1411,7 +1411,7 @@ bool ScDocShell::AdjustPrintZoom( const ScRange& rRange ) OUString aStyleName = aDocument.GetPageStyle( nTab ); ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool(); - SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PAGE ); + SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SfxStyleFamily::Page ); OSL_ENSURE( pStyleSheet, "PageStyle not found" ); if ( pStyleSheet ) { @@ -1539,7 +1539,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller, OUString aOldName = aDocument.GetPageStyle( nCurTab ); ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool(); SfxStyleSheetBase* pStyleSheet - = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE ); + = pStylePool->Find( aOldName, SfxStyleFamily::Page ); OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" ); @@ -1588,7 +1588,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller, if (bUndo) { GetUndoManager()->AddUndoAction( - new ScUndoModifyStyle( this, SFX_STYLE_FAMILY_PAGE, + new ScUndoModifyStyle( this, SfxStyleFamily::Page, aOldData, aNewData ) ); } @@ -1613,7 +1613,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller, = aDocument.GetStyleSheetPool(); SfxStyleSheetBase* pStyleSheet - = pStylePool->Find( aStr, SFX_STYLE_FAMILY_PAGE ); + = pStylePool->Find( aStr, SfxStyleFamily::Page ); OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" ); @@ -1761,7 +1761,7 @@ void ScDocShell::GetStatePageStyle( SfxViewShell& /* rCaller */, { OUString aStr = aDocument.GetPageStyle( nCurTab ); ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool(); - SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStr, SFX_STYLE_FAMILY_PAGE ); + SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStr, SfxStyleFamily::Page ); OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" ); @@ -2068,7 +2068,7 @@ void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet, ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool(); SfxStyleSheetBase* pStyleSheet = pStylePool-> Find( aDocument.GetPageStyle( nCurTab ), - SFX_STYLE_FAMILY_PAGE ); + SfxStyleFamily::Page ); OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" ); diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index 9198313c19c4..382900a031dc 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -199,7 +199,7 @@ SfxStyleSheetBasePool* ScDocShell::GetStyleSheetPool() static void lcl_AdjustPool( SfxStyleSheetBasePool* pStylePool ) { - pStylePool->SetSearchMask(SFX_STYLE_FAMILY_PAGE); + pStylePool->SetSearchMask(SfxStyleFamily::Page); SfxStyleSheetBase *pStyle = pStylePool->First(); while ( pStyle ) { @@ -252,8 +252,8 @@ void ScDocShell::LoadStylesArgs( ScDocShell& rSource, bool bReplace, bool bCellS ScStyleSheetPool* pDestPool = aDocument.GetStyleSheetPool(); SfxStyleFamily eFamily = bCellStyles ? - ( bPageStyles ? SFX_STYLE_FAMILY_ALL : SFX_STYLE_FAMILY_PARA ) : - SFX_STYLE_FAMILY_PAGE; + ( bPageStyles ? SfxStyleFamily::All : SfxStyleFamily::Para ) : + SfxStyleFamily::Page; SfxStyleSheetIterator aIter( pSourcePool, eFamily ); sal_uInt16 nSourceCount = aIter.Count(); if ( nSourceCount == 0 ) |