summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-04 11:31:33 +0200
committerNoel Grandin <noel@peralex.com>2016-05-09 10:17:13 +0200
commitbcb41235deaf4b7ca90522bda3ba21a686819e6e (patch)
tree29f397deeb5c776b290b782847a4f9ec8487adb2 /sc/source/ui
parentb55b7a057f19521ad88fc6a274fcf071b798eb3e (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')
-rw-r--r--sc/source/ui/Accessibility/AccessiblePageHeader.cxx2
-rw-r--r--sc/source/ui/app/transobj.cxx4
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx8
-rw-r--r--sc/source/ui/docshell/docfunc.cxx2
-rw-r--r--sc/source/ui/docshell/docsh3.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx22
-rw-r--r--sc/source/ui/docshell/docsh6.cxx6
-rw-r--r--sc/source/ui/styleui/scstyles.src4
-rw-r--r--sc/source/ui/undo/undoblk.cxx4
-rw-r--r--sc/source/ui/undo/undocell.cxx2
-rw-r--r--sc/source/ui/undo/undostyl.cxx8
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx10
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx6
-rw-r--r--sc/source/ui/unoobj/servuno.cxx4
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx66
-rw-r--r--sc/source/ui/view/formatsh.cxx32
-rw-r--r--sc/source/ui/view/gridwin.cxx4
-rw-r--r--sc/source/ui/view/preview.cxx10
-rw-r--r--sc/source/ui/view/prevwsh.cxx6
-rw-r--r--sc/source/ui/view/printfun.cxx4
-rw-r--r--sc/source/ui/view/tabview2.cxx2
-rw-r--r--sc/source/ui/view/tabvwsha.cxx2
22 files changed, 105 insertions, 105 deletions
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
index 1a20e96977ce..eda119923b45 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeader.cxx
@@ -228,7 +228,7 @@ sal_Int32 SAL_CALL ScAccessiblePageHeader::getAccessibleChildCount() throw (uno:
ScDocument& rDoc = mpViewShell->GetDocument();
// find out how many regions (left,center, right) are with content
- SfxStyleSheetBase* pStyle = rDoc.GetStyleSheetPool()->Find(rDoc.GetPageStyle(mpViewShell->GetLocationData().GetPrintTab()), SFX_STYLE_FAMILY_PAGE);
+ SfxStyleSheetBase* pStyle = rDoc.GetStyleSheetPool()->Find(rDoc.GetPageStyle(mpViewShell->GetLocationData().GetPrintTab()), SfxStyleFamily::Page);
if (pStyle)
{
sal_uInt16 nPageWhichId(0);
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index a5d90f40e139..0800da99f086 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -668,7 +668,7 @@ void ScTransferObj::InitDocShell(bool bLimitToPageSize)
Size aPaperSize = SvxPaperInfo::GetPaperSize( PAPER_A4 ); // Twips
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
OUString aStyleName = pDoc->GetPageStyle( aBlock.aStart.Tab() );
- SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PAGE );
+ SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SfxStyleFamily::Page );
if (pStyleSheet)
{
const SfxItemSet& rSourceSet = pStyleSheet->GetItemSet();
@@ -676,7 +676,7 @@ void ScTransferObj::InitDocShell(bool bLimitToPageSize)
// CopyStyleFrom kopiert SetItems mit richtigem Pool
ScStyleSheetPool* pDestPool = rDestDoc.GetStyleSheetPool();
- pDestPool->CopyStyleFrom( pStylePool, aStyleName, SFX_STYLE_FAMILY_PAGE );
+ pDestPool->CopyStyleFrom( pStylePool, aStyleName, SfxStyleFamily::Page );
}
ScViewData aViewData( pDocSh, nullptr );
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index 7ca4a1838d06..3e3d7f18215f 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -143,7 +143,7 @@ void FillStyleListBox( ScDocument* pDoc, ListBox& rLbStyle )
{
rLbStyle.SetSeparatorPos(0);
std::set<OUString> aStyleNames;
- SfxStyleSheetIterator aStyleIter( pDoc->GetStyleSheetPool(), SFX_STYLE_FAMILY_PARA );
+ SfxStyleSheetIterator aStyleIter( pDoc->GetStyleSheetPool(), SfxStyleFamily::Para );
for ( SfxStyleSheetBase* pStyle = aStyleIter.First(); pStyle; pStyle = aStyleIter.Next() )
{
OUString aName = pStyle->GetName();
@@ -483,7 +483,7 @@ void StyleSelect( ListBox& rLbStyle, ScDocument* pDoc, SvxFontPrevWindow& rWdPre
if(rLbStyle.GetSelectEntryPos() == 0)
{
// call new style dialog
- SfxUInt16Item aFamilyItem( SID_STYLE_FAMILY, SFX_STYLE_FAMILY_PARA );
+ SfxUInt16Item aFamilyItem( SID_STYLE_FAMILY, (sal_uInt16) SfxStyleFamily::Para );
SfxStringItem aRefItem( SID_STYLE_REFERENCE, ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
// unlock the dispatcher so SID_STYLE_NEW can be executed
@@ -504,7 +504,7 @@ void StyleSelect( ListBox& rLbStyle, ScDocument* pDoc, SvxFontPrevWindow& rWdPre
pDisp->Lock(true);
// Find the new style and add it into the style list boxes
- SfxStyleSheetIterator aStyleIter( pDoc->GetStyleSheetPool(), SFX_STYLE_FAMILY_PARA );
+ SfxStyleSheetIterator aStyleIter( pDoc->GetStyleSheetPool(), SfxStyleFamily::Para );
bool bFound = false;
for ( SfxStyleSheetBase* pStyle = aStyleIter.First(); pStyle && !bFound; pStyle = aStyleIter.Next() )
{
@@ -532,7 +532,7 @@ void StyleSelect( ListBox& rLbStyle, ScDocument* pDoc, SvxFontPrevWindow& rWdPre
}
OUString aStyleName = rLbStyle.GetSelectEntry();
- SfxStyleSheetBase* pStyleSheet = pDoc->GetStyleSheetPool()->Find( aStyleName, SFX_STYLE_FAMILY_PARA );
+ SfxStyleSheetBase* pStyleSheet = pDoc->GetStyleSheetPool()->Find( aStyleName, SfxStyleFamily::Para );
if(pStyleSheet)
{
const SfxItemSet& rSet = pStyleSheet->GetItemSet();
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 )
diff --git a/sc/source/ui/styleui/scstyles.src b/sc/source/ui/styleui/scstyles.src
index 485ac445a43f..ccb74932f35a 100644
--- a/sc/source/ui/styleui/scstyles.src
+++ b/sc/source/ui/styleui/scstyles.src
@@ -26,7 +26,7 @@ SfxStyleFamilies DLG_STYLE_DESIGNER
{
SfxStyleFamilyItem
{
- StyleFamily = SFX_STYLE_FAMILY_PARA ;
+ StyleFamily = SfxStyleFamily::Para ;
FilterList [ en-US ] =
{
< "All Styles" ; SFXSTYLEBIT_ALL_VISIBLE ; > ;
@@ -39,7 +39,7 @@ SfxStyleFamilies DLG_STYLE_DESIGNER
SfxStyleFamilyItem
{
- StyleFamily = SFX_STYLE_FAMILY_PAGE ;
+ StyleFamily = SfxStyleFamily::Page ;
FilterList [ en-US ] =
{
< "All Styles" ; SFXSTYLEBIT_ALL ; > ;
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 04e8e8fb45ab..8379d46b83c0 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -1707,7 +1707,7 @@ void ScUndoSelectionStyle::DoChange( const bool bUndo )
{
ScStyleSheetPool* pStlPool = rDoc.GetStyleSheetPool();
ScStyleSheet* pStyleSheet =
- static_cast<ScStyleSheet*>( pStlPool->Find( aStyleName, SFX_STYLE_FAMILY_PARA ) );
+ static_cast<ScStyleSheet*>( pStlPool->Find( aStyleName, SfxStyleFamily::Para ) );
if (!pStyleSheet)
{
OSL_FAIL("StyleSheet not found");
@@ -1746,7 +1746,7 @@ void ScUndoSelectionStyle::Repeat(SfxRepeatTarget& rTarget)
ScDocument& rDoc = pDocShell->GetDocument();
ScStyleSheetPool* pStlPool = rDoc.GetStyleSheetPool();
ScStyleSheet* pStyleSheet = static_cast<ScStyleSheet*>( pStlPool->
- Find( aStyleName, SFX_STYLE_FAMILY_PARA ));
+ Find( aStyleName, SfxStyleFamily::Para ));
if (!pStyleSheet)
{
OSL_FAIL("StyleSheet not found");
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index 41a5a83e6ca3..f24330881910 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -591,7 +591,7 @@ void ScUndoPrintZoom::DoChange( bool bUndo )
ScDocument& rDoc = pDocShell->GetDocument();
OUString aStyleName = rDoc.GetPageStyle( nTab );
ScStyleSheetPool* pStylePool = rDoc.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 )
{
diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx
index 9d336faef5c2..96ad6ccb2c7e 100644
--- a/sc/source/ui/undo/undostyl.cxx
+++ b/sc/source/ui/undo/undostyl.cxx
@@ -94,7 +94,7 @@ ScUndoModifyStyle::~ScUndoModifyStyle()
OUString ScUndoModifyStyle::GetComment() const
{
- sal_uInt16 nId = (eFamily == SFX_STYLE_FAMILY_PARA) ?
+ sal_uInt16 nId = (eFamily == SfxStyleFamily::Para) ?
STR_UNDO_EDITCELLSTYLE :
STR_UNDO_EDITPAGESTYLE;
return ScGlobal::GetRscString( nId );
@@ -143,7 +143,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const OUString& rName,
// create style (with new name)
pStyle = &pStlPool->Make( aNewName, eStyleFamily, SFXSTYLEBIT_USERDEF );
- if ( eStyleFamily == SFX_STYLE_FAMILY_PARA )
+ if ( eStyleFamily == SfxStyleFamily::Para )
rDoc.GetPool()->CellStyleCreated( aNewName, &rDoc );
}
@@ -151,7 +151,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const OUString& rName,
{
if ( bDelete )
{
- if ( eStyleFamily == SFX_STYLE_FAMILY_PARA )
+ if ( eStyleFamily == SfxStyleFamily::Para )
lcl_DocStyleChanged( &rDoc, pStyle, true ); // TRUE: remove usage of style
else
rDoc.RemovePageStyleInUse( rName );
@@ -173,7 +173,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const OUString& rName,
if (pNewSet)
rStyleSet.Set( *pNewSet, false );
- if ( eStyleFamily == SFX_STYLE_FAMILY_PARA )
+ if ( eStyleFamily == SfxStyleFamily::Para )
{
lcl_DocStyleChanged( &rDoc, pStyle, false ); // cell styles: row heights
}
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 1247ab21aa2c..213d83f5349f 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -2066,7 +2066,7 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const OUString& aPropert
break;
case SC_WID_UNO_CELLSTYL:
aAny <<= OUString( ScStyleNameConversion::DisplayToProgrammaticName(
- ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SFX_STYLE_FAMILY_PARA ) );
+ ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SfxStyleFamily::Para ) );
break;
case SC_WID_UNO_TBLBORD:
case SC_WID_UNO_TBLBORD2:
@@ -2351,7 +2351,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
OUString aStrVal;
aValue >>= aStrVal;
OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName(
- aStrVal, SFX_STYLE_FAMILY_PARA ));
+ aStrVal, SfxStyleFamily::Para ));
pDocShell->GetDocFunc().ApplyStyle( *GetMarkData(), aString, true );
}
break;
@@ -2539,7 +2539,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE
if (pStyle)
aStyleName = pStyle->GetName();
rAny <<= OUString( ScStyleNameConversion::DisplayToProgrammaticName(
- aStyleName, SFX_STYLE_FAMILY_PARA ) );
+ aStyleName, SfxStyleFamily::Para ) );
}
break;
case SC_WID_UNO_TBLBORD:
@@ -8130,7 +8130,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
OUString aStrVal;
aValue >>= aStrVal;
OUString aNewStr(ScStyleNameConversion::ProgrammaticToDisplayName(
- aStrVal, SFX_STYLE_FAMILY_PAGE ));
+ aStrVal, SfxStyleFamily::Page ));
//! Undo? (auch bei SID_STYLE_APPLY an der View)
@@ -8455,7 +8455,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn
else if ( pEntry->nWID == SC_WID_UNO_PAGESTL )
{
rAny <<= OUString( ScStyleNameConversion::DisplayToProgrammaticName(
- rDoc.GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE ) );
+ rDoc.GetPageStyle( nTab ), SfxStyleFamily::Page ) );
}
else if ( pEntry->nWID == SC_WID_UNO_CELLVIS )
{
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index 2abcfb96fcf6..e4692ae1af9c 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -308,7 +308,7 @@ void SAL_CALL ScTableConditionalFormat::addNew(
OUString aStrVal;
if ( rProp.Value >>= aStrVal )
aEntry.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName(
- aStrVal, SFX_STYLE_FAMILY_PARA );
+ aStrVal, SfxStyleFamily::Para );
}
else if ( rProp.Name == SC_UNONAME_FORMULANMSP1 )
{
@@ -592,14 +592,14 @@ void SAL_CALL ScTableConditionalEntry::setSourcePosition( const table::CellAddre
OUString SAL_CALL ScTableConditionalEntry::getStyleName() throw(uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- return ScStyleNameConversion::DisplayToProgrammaticName( aData.maStyle, SFX_STYLE_FAMILY_PARA );
+ return ScStyleNameConversion::DisplayToProgrammaticName( aData.maStyle, SfxStyleFamily::Para );
}
void SAL_CALL ScTableConditionalEntry::setStyleName( const OUString& aStyleName )
throw(uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- aData.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName( aStyleName, SFX_STYLE_FAMILY_PARA );
+ aData.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName( aStyleName, SfxStyleFamily::Para );
}
ScTableValidationObj::ScTableValidationObj(ScDocument* pDoc, sal_uLong nKey,
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 0d242d73df34..ddfa113ebf51 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -412,10 +412,10 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
new ScEditFieldObj(xNullContent, nullptr, getFieldType(nType), ESelection())));
} break;
case Type::CELLSTYLE:
- xRet.set(static_cast<style::XStyle*>(new ScStyleObj( nullptr, SFX_STYLE_FAMILY_PARA, OUString() )));
+ xRet.set(static_cast<style::XStyle*>(new ScStyleObj( nullptr, SfxStyleFamily::Para, OUString() )));
break;
case Type::PAGESTYLE:
- xRet.set(static_cast<style::XStyle*>(new ScStyleObj( nullptr, SFX_STYLE_FAMILY_PAGE, OUString() )));
+ xRet.set(static_cast<style::XStyle*>(new ScStyleObj( nullptr, SfxStyleFamily::Page, OUString() )));
break;
case Type::AUTOFORMAT:
xRet.set(static_cast<container::XIndexAccess*>(new ScAutoFormatObj( SC_AFMTOBJ_INVALID )));
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index d5942b056c52..4a7b14ff8a8b 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -372,7 +372,7 @@ static const SfxItemPropertyMap* lcl_GetFooterStyleMap()
#define SC_FAMILYNAME_CELL "CellStyles"
#define SC_FAMILYNAME_PAGE "PageStyles"
-static const sal_uInt16 aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SFX_STYLE_FAMILY_PARA, SFX_STYLE_FAMILY_PAGE };
+static const SfxStyleFamily aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SfxStyleFamily::Para, SfxStyleFamily::Page };
using sc::HMMToTwips;
using sc::TwipsToHMM;
@@ -422,14 +422,14 @@ void ScStyleFamiliesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
// XStyleFamilies
-ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(sal_uInt16 nType) const
+ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(SfxStyleFamily nType) const
{
if ( pDocShell )
{
- if ( nType == SFX_STYLE_FAMILY_PARA )
- return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PARA );
- else if ( nType == SFX_STYLE_FAMILY_PAGE )
- return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PAGE );
+ if ( nType == SfxStyleFamily::Para )
+ return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Para );
+ else if ( nType == SfxStyleFamily::Page )
+ return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Page );
}
OSL_FAIL("getStyleFamilyByType: keine DocShell oder falscher Typ");
return nullptr;
@@ -448,9 +448,9 @@ ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByName_Impl(const OUString& aName
if ( pDocShell )
{
if ( aName == SC_FAMILYNAME_CELL )
- return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PARA );
+ return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Para );
else if ( aName == SC_FAMILYNAME_PAGE )
- return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PAGE );
+ return new ScStyleFamilyObj( pDocShell, SfxStyleFamily::Page );
}
// no assertion - called directly from getByName
return nullptr;
@@ -682,7 +682,7 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno::
if ( pStyleObj && pStyleObj->GetFamily() == eFamily &&
!pStyleObj->IsInserted() ) // noch nicht eingefuegt?
{
- OUString aNameStr(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ));
+ OUString aNameStr(ScStyleNameConversion::ProgrammaticToDisplayName( aName, eFamily ));
ScDocument& rDoc = pDocShell->GetDocument();
ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
@@ -694,7 +694,7 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno::
{
(void)pStylePool->Make( aNameStr, eFamily, SFXSTYLEBIT_USERDEF );
- if ( eFamily == SFX_STYLE_FAMILY_PARA && !rDoc.IsImportingXML() )
+ if ( eFamily == SfxStyleFamily::Para && !rDoc.IsImportingXML() )
rDoc.GetPool()->CellStyleCreated( aNameStr, &rDoc );
pStyleObj->InitDoc( pDocShell, aNameStr ); // Objekt kann benutzt werden
@@ -735,7 +735,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const OUString& aName )
bool bFound = false;
if ( pDocShell )
{
- OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ));
+ OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, eFamily ));
ScDocument& rDoc = pDocShell->GetDocument();
ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
@@ -747,7 +747,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const OUString& aName )
if (pStyle)
{
bFound = true;
- if ( eFamily == SFX_STYLE_FAMILY_PARA )
+ if ( eFamily == SfxStyleFamily::Para )
{
// wie ScViewFunc::RemoveStyleSheetInUse
ScopedVclPtrInstance< VirtualDevice > pVDev;
@@ -831,7 +831,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getByName( const OUString& aName )
{
SolarMutexGuard aGuard;
uno::Reference< style::XStyle > xObj(
- GetObjectByName_Impl( ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ) ));
+ GetObjectByName_Impl( ScStyleNameConversion::ProgrammaticToDisplayName( aName, eFamily ) ));
if (xObj.is())
return uno::makeAny(xObj);
else
@@ -860,7 +860,7 @@ uno::Sequence<OUString> SAL_CALL ScStyleFamilyObj::getElementNames()
OSL_ENSURE( nPos<nCount, "Anzahl durcheinandergekommen" );
if (nPos<nCount)
pAry[nPos++] = ScStyleNameConversion::DisplayToProgrammaticName(
- pStyle->GetName(), sal::static_int_cast<sal_uInt16>(eFamily) );
+ pStyle->GetName(), eFamily );
pStyle = aIter.Next();
}
return aSeq;
@@ -874,7 +874,7 @@ sal_Bool SAL_CALL ScStyleFamilyObj::hasByName( const OUString& aName )
SolarMutexGuard aGuard;
if ( pDocShell )
{
- OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ));
+ OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, eFamily ));
ScDocument& rDoc = pDocShell->GetDocument();
ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
@@ -907,9 +907,9 @@ uno::Any SAL_CALL ScStyleFamilyObj::getPropertyValue( const OUString& sPropertyN
sal_uInt32 nResId = 0;
switch ( eFamily )
{
- case SFX_STYLE_FAMILY_PARA:
+ case SfxStyleFamily::Para:
nResId = STR_STYLE_FAMILY_CELL; break;
- case SFX_STYLE_FAMILY_PAGE:
+ case SfxStyleFamily::Page:
nResId = STR_STYLE_FAMILY_PAGE; break;
default:
OSL_FAIL( "ScStyleFamilyObj::getPropertyValue(): invalid family" );
@@ -951,7 +951,7 @@ void SAL_CALL ScStyleFamilyObj::removeVetoableChangeListener( const OUString&, c
// Default-ctor wird fuer die Reflection gebraucht
ScStyleObj::ScStyleObj(ScDocShell* pDocSh, SfxStyleFamily eFam, const OUString& rName) :
- pPropSet( (eFam == SFX_STYLE_FAMILY_PARA) ? lcl_GetCellStyleSet() : lcl_GetPageStyleSet() ),
+ pPropSet( (eFam == SfxStyleFamily::Para) ? lcl_GetCellStyleSet() : lcl_GetPageStyleSet() ),
pDocShell( pDocSh ),
eFamily( eFam ),
aStyleName( rName )
@@ -1060,7 +1060,7 @@ OUString SAL_CALL ScStyleObj::getParentStyle() throw(uno::RuntimeException, std:
SolarMutexGuard aGuard;
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
- return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetParent(), sal::static_int_cast<sal_uInt16>(eFamily) );
+ return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetParent(), eFamily );
return OUString();
}
@@ -1074,20 +1074,20 @@ void SAL_CALL ScStyleObj::setParentStyle( const OUString& rParentStyle )
if (pStyle)
{
// cell styles cannot be modified if any sheet is protected
- if ( eFamily == SFX_STYLE_FAMILY_PARA && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
+ if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
return; //! exception?
//! DocFunc-Funktion??
//! Undo ?????????????
- OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( rParentStyle, sal::static_int_cast<sal_uInt16>(eFamily) ));
+ OUString aString(ScStyleNameConversion::ProgrammaticToDisplayName( rParentStyle, eFamily ));
bool bOk = pStyle->SetParent( aString );
if (bOk)
{
// wie bei setPropertyValue
ScDocument& rDoc = pDocShell->GetDocument();
- if ( eFamily == SFX_STYLE_FAMILY_PARA )
+ if ( eFamily == SfxStyleFamily::Para )
{
// Zeilenhoehen anpassen...
@@ -1121,7 +1121,7 @@ OUString SAL_CALL ScStyleObj::getName() throw(uno::RuntimeException, std::except
SolarMutexGuard aGuard;
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
- return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetName(), sal::static_int_cast<sal_uInt16>(eFamily) );
+ return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetName(), eFamily );
return OUString();
}
@@ -1133,7 +1133,7 @@ void SAL_CALL ScStyleObj::setName( const OUString& aNewName )
if (pStyle)
{
// cell styles cannot be renamed if any sheet is protected
- if ( eFamily == SFX_STYLE_FAMILY_PARA && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
+ if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
return; //! exception?
//! DocFunc-Funktion??
@@ -1145,11 +1145,11 @@ void SAL_CALL ScStyleObj::setName( const OUString& aNewName )
aStyleName = aNewName; //! notify other objects for this style?
ScDocument& rDoc = pDocShell->GetDocument();
- if ( eFamily == SFX_STYLE_FAMILY_PARA && !rDoc.IsImportingXML() )
+ if ( eFamily == SfxStyleFamily::Para && !rDoc.IsImportingXML() )
rDoc.GetPool()->CellStyleCreated( aNewName, &rDoc );
// Zellvorlagen = 2, Seitenvorlagen = 4
- sal_uInt16 nId = ( eFamily == SFX_STYLE_FAMILY_PARA ) ?
+ sal_uInt16 nId = ( eFamily == SfxStyleFamily::Para ) ?
SID_STYLE_FAMILY2 : SID_STYLE_FAMILY4;
SfxBindings* pBindings = pDocShell->GetViewBindings();
if (pBindings)
@@ -1178,7 +1178,7 @@ const SfxItemSet* ScStyleObj::GetStyleItemSet_Impl( const OUString& rPropName,
if (pStyle)
{
const SfxItemPropertySimpleEntry* pEntry = nullptr;
- if ( eFamily == SFX_STYLE_FAMILY_PAGE )
+ if ( eFamily == SfxStyleFamily::Page )
{
pEntry = lcl_GetHeaderStyleMap()->getByName( rPropName );
if ( pEntry ) // only item-wids in header/footer map
@@ -1444,7 +1444,7 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault()
if ( pStyle )
{
// cell styles cannot be modified if any sheet is protected
- if ( eFamily == SFX_STYLE_FAMILY_PARA && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
+ if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
throw uno::RuntimeException();
SfxItemSet& rSet = pStyle->GetItemSet();
@@ -1453,7 +1453,7 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault()
//! merge with SetOneProperty
ScDocument& rDoc = pDocShell->GetDocument();
- if ( eFamily == SFX_STYLE_FAMILY_PARA )
+ if ( eFamily == SfxStyleFamily::Para )
{
// row heights
@@ -1558,12 +1558,12 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt
if ( pStyle && pEntry )
{
// cell styles cannot be modified if any sheet is protected
- if ( eFamily == SFX_STYLE_FAMILY_PARA && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
+ if ( eFamily == SfxStyleFamily::Para && lcl_AnyTabProtected( pDocShell->GetDocument() ) )
throw uno::RuntimeException();
SfxItemSet& rSet = pStyle->GetItemSet(); // direkt im lebenden Style aendern...
bool bDone = false;
- if ( eFamily == SFX_STYLE_FAMILY_PAGE )
+ if ( eFamily == SfxStyleFamily::Page )
{
if(pEntry->nWID == SC_WID_UNO_HEADERSET)
{
@@ -1835,7 +1835,7 @@ void ScStyleObj::SetOnePropertyValue( const OUString& rPropertyName, const SfxIt
//! Undo ?????????????
ScDocument& rDoc = pDocShell->GetDocument();
- if ( eFamily == SFX_STYLE_FAMILY_PARA )
+ if ( eFamily == SfxStyleFamily::Para )
{
// Zeilenhoehen anpassen...
@@ -2017,7 +2017,7 @@ sal_Bool SAL_CALL ScStyleObj::supportsService( const OUString& rServiceName )
uno::Sequence<OUString> SAL_CALL ScStyleObj::getSupportedServiceNames()
throw(uno::RuntimeException, std::exception)
{
- bool bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE );
+ bool bPage = ( eFamily == SfxStyleFamily::Page );
uno::Sequence<OUString> aRet(2);
OUString* pArray = aRet.getArray();
pArray[0] = SCSTYLE_SERVICE;
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 0850aad67670..258a9c3d1e90 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -196,7 +196,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
SCTAB nCurTab = GetViewData()->GetTabNo();
OUString aPageStyle = pDoc->GetPageStyle( nCurTab );
SfxStyleSheet* pStyleSheet = pStylePool ? static_cast<SfxStyleSheet*>(pStylePool->
- Find( aPageStyle, SFX_STYLE_FAMILY_PAGE )) : nullptr;
+ Find( aPageStyle, SfxStyleFamily::Page )) : nullptr;
if ( pStyleSheet )
rSet.Put( SfxTemplateItem( nSlotId, aPageStyle ) );
@@ -217,7 +217,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
pTabViewShell->GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get());
- bool bPage = pFamilyItem && SFX_STYLE_FAMILY_PAGE == SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue());
+ bool bPage = pFamilyItem && SfxStyleFamily::Page == SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue());
if ( bProtected || bPage )
rSet.DisableItem( nSlotId );
@@ -232,7 +232,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
std::unique_ptr<SfxPoolItem> pItem;
pTabViewShell->GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get());
- bool bPage = pFamilyItem && SFX_STYLE_FAMILY_PAGE == SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue());
+ bool bPage = pFamilyItem && SfxStyleFamily::Page == SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue());
if ( bProtected && !bPage )
rSet.DisableItem( nSlotId );
@@ -274,7 +274,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
{
if (nSlotId == SID_STYLE_PREVIEW)
{
- SfxStyleFamily eFamily = SFX_STYLE_FAMILY_PARA;
+ SfxStyleFamily eFamily = SfxStyleFamily::Para;
const SfxPoolItem* pFamItem;
if ( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY, true, &pFamItem ) )
eFamily = (SfxStyleFamily) static_cast<const SfxUInt16Item*>(pFamItem)->GetValue();
@@ -282,7 +282,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
OUString aStyleName;
if (pArgs && SfxItemState::SET == pArgs->GetItemState( nSlotId, true, &pNameItem ))
aStyleName = static_cast<const SfxStringItem*>(pNameItem)->GetValue();
- if ( eFamily == SFX_STYLE_FAMILY_PARA ) // CellStyles
+ if ( eFamily == SfxStyleFamily::Para ) // CellStyles
{
ScMarkData aFuncMark( pViewData->GetMarkData() );
ScViewUtil::UnmarkFiltered( aFuncMark, &rDoc );
@@ -354,7 +354,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
ScStyleSaveData aOldData; // for undo/redo
ScStyleSaveData aNewData;
- SfxStyleFamily eFamily = SFX_STYLE_FAMILY_PARA;
+ SfxStyleFamily eFamily = SfxStyleFamily::Para;
const SfxPoolItem* pFamItem;
if ( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY, true, &pFamItem ) )
eFamily = (SfxStyleFamily) static_cast<const SfxUInt16Item*>(pFamItem)->GetValue();
@@ -362,9 +362,9 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
{
OUString sFamily = static_cast<const SfxStringItem*>(pFamItem)->GetValue();
if (sFamily == "CellStyles")
- eFamily = SFX_STYLE_FAMILY_PARA;
+ eFamily = SfxStyleFamily::Para;
else if (sFamily == "PageStyles")
- eFamily = SFX_STYLE_FAMILY_PAGE;
+ eFamily = SfxStyleFamily::Page;
}
OUString aStyleName;
@@ -495,7 +495,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
switch ( eFamily )
{
- case SFX_STYLE_FAMILY_PARA:
+ case SfxStyleFamily::Para:
{
switch ( nSlotId )
{
@@ -652,10 +652,10 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
default:
break;
}
- } // case SFX_STYLE_FAMILY_PARA:
+ } // case SfxStyleFamily::Para:
break;
- case SFX_STYLE_FAMILY_PAGE:
+ case SfxStyleFamily::Page:
{
switch ( nSlotId )
{
@@ -764,7 +764,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
default:
break;
} // switch ( nSlotId )
- } // case SFX_STYLE_FAMILY_PAGE:
+ } // case SfxStyleFamily::Page:
break;
default:
@@ -786,11 +786,11 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
switch ( eFam )
{
- case SFX_STYLE_FAMILY_PAGE:
+ case SfxStyleFamily::Page:
nRsc = RID_SCDLG_STYLES_PAGE;
break;
- case SFX_STYLE_FAMILY_PARA:
+ case SfxStyleFamily::Para:
default:
{
SfxItemSet& rSet = pStyleSheet->GetItemSet();
@@ -876,7 +876,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
// Attribute comparisons (earlier in ModifyStyleSheet) now here
// with the old values (the style is already changed)
- if ( SFX_STYLE_FAMILY_PARA == eFam )
+ if ( SfxStyleFamily::Para == eFam )
{
SfxItemSet& rNewSet = pStyleSheet->GetItemSet();
bool bNumFormatChanged;
@@ -923,7 +923,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
pDocSh->SetDocumentModified();
- if ( SFX_STYLE_FAMILY_PARA == eFam )
+ if ( SfxStyleFamily::Para == eFam )
{
ScTabViewShell::UpdateNumberFormatter(
static_cast<const SvxNumberInfoItem&>(
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 0abbfa970629..5cc9ba4e5c01 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2184,12 +2184,12 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
switch ( eFamily )
{
- case SFX_STYLE_FAMILY_PARA:
+ case SfxStyleFamily::Para:
pViewData->GetView()->SetStyleSheetToMarked( pStyleSheet );
pViewData->GetView()->DoneBlockMode();
break;
- case SFX_STYLE_FAMILY_PAGE:
+ case SfxStyleFamily::Page:
pViewData->GetDocument()->SetPageStyle( pViewData->GetTabNo(),
pStyleSheet->GetName() );
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 18f40388d8ee..db7d43b0a592 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -790,7 +790,7 @@ static Size lcl_GetDocPageSize( ScDocument* pDoc, SCTAB nTab )
{
OUString aName = pDoc->GetPageStyle( nTab );
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
- SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aName, SFX_STYLE_FAMILY_PAGE );
+ SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aName, SfxStyleFamily::Page );
if ( pStyleSheet )
{
SfxItemSet& rStyleSet = pStyleSheet->GetItemSet();
@@ -1061,7 +1061,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
OUString aOldName = rDoc.GetPageStyle( nTab );
bool bUndo = rDoc.IsUndoEnabled();
ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
- SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE );
+ SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SfxStyleFamily::Page );
if ( pStyleSheet )
{
@@ -1115,7 +1115,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
if( bUndo )
{
pDocShell->GetUndoManager()->AddUndoAction(
- new ScUndoModifyStyle( pDocShell, SFX_STYLE_FAMILY_PAGE,
+ new ScUndoModifyStyle( pDocShell, SfxStyleFamily::Page,
aOldData, aNewData ) );
}
@@ -1156,7 +1156,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
ScDocument& rDoc = pDocShell->GetDocument();
bool bUndo = rDoc.IsUndoEnabled();
ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
- SfxStyleSheetBase* pStyleSheet = pStylePool->Find( rDoc.GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE );
+ SfxStyleSheetBase* pStyleSheet = pStylePool->Find( rDoc.GetPageStyle( nTab ), SfxStyleFamily::Page );
OSL_ENSURE( pStyleSheet, "PageStyle not found" );
if ( pStyleSheet )
{
@@ -1217,7 +1217,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
if( bUndo )
{
pDocShell->GetUndoManager()->AddUndoAction(
- new ScUndoModifyStyle( pDocShell, SFX_STYLE_FAMILY_PAGE,
+ new ScUndoModifyStyle( pDocShell, SfxStyleFamily::Page,
aOldData, aNewData ) );
}
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 3dfb9e5efc5b..885273f78739 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -240,7 +240,7 @@ bool ScPreviewShell::GetPageSize( Size& aPageSize )
ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( rDoc.GetPageStyle( nTab ),
- SFX_STYLE_FAMILY_PAGE );
+ SfxStyleFamily::Page );
OSL_ENSURE(pStyleSheet,"No style sheet");
if (!pStyleSheet) return false;
const SfxItemSet* pParamSet = &pStyleSheet->GetItemSet();
@@ -727,7 +727,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
SCTAB nTab = pPreview->GetTab();
OUString aOldName = pDocShell->GetDocument().GetPageStyle( pPreview->GetTab() );
ScStyleSheetPool* pStylePool = pDocShell->GetDocument().GetStyleSheetPool();
- SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE );
+ SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SfxStyleFamily::Page );
OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" );
if ( pReqArgs && pStyleSheet && SfxItemState::SET == pReqArgs->GetItemState( SID_PREVIEW_SCALINGFACTOR, true, &pItem ) )
@@ -841,7 +841,7 @@ void ScPreviewShell::GetState( SfxItemSet& rSet )
{
OUString aOldName = pDocShell->GetDocument().GetPageStyle( pPreview->GetTab() );
ScStyleSheetPool* pStylePool = pDocShell->GetDocument().GetStyleSheetPool();
- SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SFX_STYLE_FAMILY_PAGE );
+ SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aOldName, SfxStyleFamily::Page );
OSL_ENSURE( pStyleSheet, "PageStyle not found! :-/" );
if ( pStyleSheet )
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index ca7a15a82fb2..26851bc47b73 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -203,7 +203,7 @@ void ScPrintFunc::Construct( const ScPrintOptions* pOptions )
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find(
pDoc->GetPageStyle( nPrintTab ),
- SFX_STYLE_FAMILY_PAGE );
+ SfxStyleFamily::Page );
if (pStyleSheet)
pParamSet = &pStyleSheet->GetItemSet();
else
@@ -424,7 +424,7 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
bool bDoGrid, bNullVal, bFormula;
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
- SfxStyleSheetBase* pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE );
+ SfxStyleSheetBase* pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SfxStyleFamily::Page );
if (pStyleSheet)
{
SfxItemSet& rSet = pStyleSheet->GetItemSet();
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index 3468d086d8dd..42b843cdd59a 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -1288,7 +1288,7 @@ sal_uInt16 ScTabView::CalcZoom( SvxZoomType eType, sal_uInt16 nOldZoom )
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet =
pStylePool->Find( pDoc->GetPageStyle( nCurTab ),
- SFX_STYLE_FAMILY_PAGE );
+ SfxStyleFamily::Page );
OSL_ENSURE( pStyleSheet, "PageStyle not found :-/" );
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index c005614bdb4e..e012f7157fc6 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -278,7 +278,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
OUString aStyleName = pDoc->GetPageStyle( nTab );
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName,
- SFX_STYLE_FAMILY_PAGE );
+ SfxStyleFamily::Page );
OSL_ENSURE( pStyleSheet, "PageStyle not found" );
if ( pStyleSheet )
{