summaryrefslogtreecommitdiff
path: root/sc/source
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
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')
-rw-r--r--sc/source/core/data/attarray.cxx2
-rw-r--r--sc/source/core/data/documen4.cxx4
-rw-r--r--sc/source/core/data/documen8.cxx12
-rw-r--r--sc/source/core/data/document.cxx4
-rw-r--r--sc/source/core/data/dpoutput.cxx4
-rw-r--r--sc/source/core/data/fillinfo.cxx2
-rw-r--r--sc/source/core/data/patattr.cxx6
-rw-r--r--sc/source/core/data/stlpool.cxx32
-rw-r--r--sc/source/core/data/stlsheet.cxx10
-rw-r--r--sc/source/core/data/table2.cxx6
-rw-r--r--sc/source/core/data/table3.cxx2
-rw-r--r--sc/source/core/data/table5.cxx8
-rw-r--r--sc/source/core/data/table6.cxx8
-rw-r--r--sc/source/core/tool/stylehelper.cxx10
-rw-r--r--sc/source/filter/excel/impop.cxx2
-rw-r--r--sc/source/filter/excel/xecontent.cxx2
-rw-r--r--sc/source/filter/excel/xepage.cxx2
-rw-r--r--sc/source/filter/excel/xestyle.cxx4
-rw-r--r--sc/source/filter/excel/xistyle.cxx10
-rw-r--r--sc/source/filter/ftools/ftools.cxx4
-rw-r--r--sc/source/filter/html/htmlexp.cxx8
-rw-r--r--sc/source/filter/html/htmlimp.cxx2
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx10
-rw-r--r--sc/source/filter/oox/worksheethelper.cxx2
-rw-r--r--sc/source/filter/orcus/interface.cxx2
-rw-r--r--sc/source/filter/starcalc/scflt.cxx12
-rw-r--r--sc/source/filter/xml/xmlcondformat.cxx4
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx4
-rw-r--r--sc/source/filter/xml/xmlfonte.cxx2
-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
51 files changed, 195 insertions, 195 deletions
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index ca61b3972d88..d7c1f3027004 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1734,7 +1734,7 @@ void ScAttrArray::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBo
pNewPattern->SetStyleSheet( static_cast<ScStyleSheet*>(
pDocument->GetStyleSheetPool()->
Find( ScGlobal::GetRscString(STR_STYLENAME_STANDARD),
- SFX_STYLE_FAMILY_PARA,
+ SfxStyleFamily::Para,
SFXSTYLEBIT_AUTO | SCSTYLEBIT_STANDARD ) ) );
pData[nPos].pPattern = static_cast<const ScPatternAttr*>(
&pDocument->GetPool()->Put(*pNewPattern));
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index 780d361a97d2..11fba58d7d81 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -757,7 +757,7 @@ const SfxPoolItem* ScDocument::GetEffItem(
if (!aStyle.isEmpty())
{
SfxStyleSheetBase* pStyleSheet = xPoolHelper->GetStylePool()->Find(
- aStyle, SFX_STYLE_FAMILY_PARA );
+ aStyle, SfxStyleFamily::Para );
if ( pStyleSheet && pStyleSheet->GetItemSet().GetItemState(
nWhich, true, &pItem ) == SfxItemState::SET )
return pItem;
@@ -802,7 +802,7 @@ const SfxItemSet* ScDocument::GetCondResult(
if (!aStyle.isEmpty())
{
SfxStyleSheetBase* pStyleSheet =
- xPoolHelper->GetStylePool()->Find(aStyle, SFX_STYLE_FAMILY_PARA);
+ xPoolHelper->GetStylePool()->Find(aStyle, SfxStyleFamily::Para);
if (pStyleSheet)
return &pStyleSheet->GetItemSet();
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 40cac04e4cd8..a84c2d09a01e 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -221,7 +221,7 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet,
switch ( rStyleSheet.GetFamily() )
{
- case SFX_STYLE_FAMILY_PAGE:
+ case SfxStyleFamily::Page:
{
const sal_uInt16 nOldScale = getScaleValue(rStyleSheet, ATTR_PAGE_SCALE);
const sal_uInt16 nOldScaleToPages = getScaleValue(rStyleSheet, ATTR_PAGE_SCALETOPAGES);
@@ -241,7 +241,7 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet,
}
break;
- case SFX_STYLE_FAMILY_PARA:
+ case SfxStyleFamily::Para:
{
bool bNumFormatChanged;
if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
@@ -367,7 +367,7 @@ sal_uInt8 ScDocument::GetEditTextDirection(SCTAB nTab) const
EEHorizontalTextDirection eRet = EE_HTEXTDIR_DEFAULT;
OUString aStyleName = GetPageStyle( nTab );
- SfxStyleSheetBase* pStyle = xPoolHelper->GetStylePool()->Find( aStyleName, SFX_STYLE_FAMILY_PAGE );
+ SfxStyleSheetBase* pStyle = xPoolHelper->GetStylePool()->Find( aStyleName, SfxStyleFamily::Page );
if ( pStyle )
{
SfxItemSet& rStyleSet = pStyle->GetItemSet();
@@ -482,7 +482,7 @@ public:
// the calls.
mrDoc.EnableIdle(false);
- mpStylePool->SetSearchMask(SFX_STYLE_FAMILY_PAGE);
+ mpStylePool->SetSearchMask(SfxStyleFamily::Page);
}
~IdleCalcTextWidthScope()
@@ -553,7 +553,7 @@ bool ScDocument::IdleCalcTextWidth() // true = try next again
aScope.setTab(0);
ScTable* pTab = maTabs[aScope.Tab()];
- ScStyleSheet* pStyle = static_cast<ScStyleSheet*>(aScope.getStylePool()->Find(pTab->aPageStyle, SFX_STYLE_FAMILY_PAGE));
+ ScStyleSheet* pStyle = static_cast<ScStyleSheet*>(aScope.getStylePool()->Find(pTab->aPageStyle, SfxStyleFamily::Page));
OSL_ENSURE( pStyle, "Missing StyleSheet :-/" );
if (!pStyle || getScaleValue(*pStyle, ATTR_PAGE_SCALETOPAGES) == 0)
@@ -641,7 +641,7 @@ bool ScDocument::IdleCalcTextWidth() // true = try next again
{
pTab = maTabs[aScope.Tab()];
pStyle = static_cast<ScStyleSheet*>(aScope.getStylePool()->Find(
- pTab->aPageStyle, SFX_STYLE_FAMILY_PAGE));
+ pTab->aPageStyle, SfxStyleFamily::Page));
if ( pStyle )
{
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 75d2336c60ab..4d0ea1e39a65 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -4853,7 +4853,7 @@ bool ScDocument::IsStyleSheetUsed( const ScStyleSheet& rStyle ) const
if ( bStyleSheetUsageInvalid || rStyle.GetUsage() == ScStyleSheet::UNKNOWN )
{
SfxStyleSheetIterator aIter( xPoolHelper->GetStylePool(),
- SFX_STYLE_FAMILY_PARA );
+ SfxStyleFamily::Para );
for ( const SfxStyleSheetBase* pStyle = aIter.First(); pStyle;
pStyle = aIter.Next() )
{
@@ -6196,7 +6196,7 @@ bool ScDocument::NeedPageResetAfterTab( SCTAB nTab ) const
OUString aNew = maTabs[nTab+1]->GetPageStyle();
if ( aNew != maTabs[nTab]->GetPageStyle() )
{
- SfxStyleSheetBase* pStyle = xPoolHelper->GetStylePool()->Find( aNew, SFX_STYLE_FAMILY_PAGE );
+ SfxStyleSheetBase* pStyle = xPoolHelper->GetStylePool()->Find( aNew, SfxStyleFamily::Page );
if ( pStyle )
{
const SfxItemSet& rSet = pStyle->GetItemSet();
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 75e9dd36d672..4da81389a1ef 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -286,12 +286,12 @@ void lcl_SetStyleById( ScDocument* pDoc, SCTAB nTab,
OUString aStyleName = ScGlobal::GetRscString( nStrId );
ScStyleSheetPool* pStlPool = pDoc->GetStyleSheetPool();
- ScStyleSheet* pStyle = static_cast<ScStyleSheet*>( pStlPool->Find( aStyleName, SFX_STYLE_FAMILY_PARA ) );
+ ScStyleSheet* pStyle = static_cast<ScStyleSheet*>( pStlPool->Find( aStyleName, SfxStyleFamily::Para ) );
if (!pStyle)
{
// create new style (was in ScPivot::SetStyle)
- pStyle = static_cast<ScStyleSheet*>( &pStlPool->Make( aStyleName, SFX_STYLE_FAMILY_PARA,
+ pStyle = static_cast<ScStyleSheet*>( &pStlPool->Make( aStyleName, SfxStyleFamily::Para,
SFXSTYLEBIT_USERDEF ) );
pStyle->SetParent( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
SfxItemSet& rSet = pStyle->GetItemSet();
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index ffeb066e63c2..17c6d2263588 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -328,7 +328,7 @@ bool handleConditionalFormat(ScConditionalFormatList* pCondFormList, const std::
if (!aData.aStyleName.isEmpty())
{
SfxStyleSheetBase* pStyleSheet =
- pStlPool->Find( aData.aStyleName, SFX_STYLE_FAMILY_PARA );
+ pStlPool->Find( aData.aStyleName, SfxStyleFamily::Para );
if ( pStyleSheet )
{
//TODO: cache Style-Sets !!!
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index fccfb43c8ca4..ba4476a8702f 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -181,7 +181,7 @@ SvStream& ScPatternAttr::Store(SvStream& rStream, sal_uInt16 /* nItemVersion */)
rStream.WriteUniOrByteString( ScGlobal::GetRscString(STR_STYLENAME_STANDARD),
rStream.GetStreamCharSet() );
- rStream.WriteInt16( SFX_STYLE_FAMILY_PARA ); // due to old data format
+ rStream.WriteInt16( (sal_uInt16) SfxStyleFamily::Para ); // due to old data format
GetItemSet().Store( rStream );
@@ -1245,14 +1245,14 @@ void ScPatternAttr::UpdateStyleSheet(ScDocument* pDoc)
{
if (pName)
{
- pStyle = static_cast<ScStyleSheet*>(pDoc->GetStyleSheetPool()->Find(*pName, SFX_STYLE_FAMILY_PARA));
+ pStyle = static_cast<ScStyleSheet*>(pDoc->GetStyleSheetPool()->Find(*pName, SfxStyleFamily::Para));
// use Standard if Style is not found,
// to avoid empty display in Toolbox-Controller
// Assumes that "Standard" is always the 1st entry!
if (!pStyle)
{
- SfxStyleSheetIteratorPtr pIter = pDoc->GetStyleSheetPool()->CreateIterator( SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_ALL );
+ SfxStyleSheetIteratorPtr pIter = pDoc->GetStyleSheetPool()->CreateIterator( SfxStyleFamily::Para, SFXSTYLEBIT_ALL );
pStyle = dynamic_cast< ScStyleSheet* >(pIter->First());
}
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index 2e859f6926d0..c9acb13effe8 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -102,7 +102,7 @@ SfxStyleSheetBase* ScStyleSheetPool::Create( const OUString& rName,
sal_uInt16 nMaskP )
{
ScStyleSheet* pSheet = new ScStyleSheet( rName, *this, eFamily, nMaskP );
- if ( eFamily == SFX_STYLE_FAMILY_PARA && ScGlobal::GetRscString(STR_STYLENAME_STANDARD) != rName )
+ if ( eFamily == SfxStyleFamily::Para && ScGlobal::GetRscString(STR_STYLENAME_STANDARD) != rName )
pSheet->SetParent( ScGlobal::GetRscString(STR_STYLENAME_STANDARD) );
return pSheet;
@@ -142,7 +142,7 @@ void ScStyleSheetPool::CopyStyleFrom( ScStyleSheetPool* pSrcPool,
rDestSet.PutExtended( rSourceSet, SfxItemState::DONTCARE, SfxItemState::DEFAULT );
const SfxPoolItem* pItem;
- if ( eFamily == SFX_STYLE_FAMILY_PAGE )
+ if ( eFamily == SfxStyleFamily::Page )
{
// Set-Items
@@ -188,13 +188,13 @@ void ScStyleSheetPool::CopyStdStylesFrom( ScStyleSheetPool* pSrcPool )
{
// Copy Default styles
- CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD), SFX_STYLE_FAMILY_PARA );
- CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_RESULT), SFX_STYLE_FAMILY_PARA );
- CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_RESULT1), SFX_STYLE_FAMILY_PARA );
- CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_HEADLINE), SFX_STYLE_FAMILY_PARA );
- CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_HEADLINE1), SFX_STYLE_FAMILY_PARA );
- CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD), SFX_STYLE_FAMILY_PAGE );
- CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_REPORT), SFX_STYLE_FAMILY_PAGE );
+ CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD), SfxStyleFamily::Para );
+ CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_RESULT), SfxStyleFamily::Para );
+ CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_RESULT1), SfxStyleFamily::Para );
+ CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_HEADLINE), SfxStyleFamily::Para );
+ CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_HEADLINE1), SfxStyleFamily::Para );
+ CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_STANDARD), SfxStyleFamily::Page );
+ CopyStyleFrom( pSrcPool, SCSTR(STR_STYLENAME_REPORT), SfxStyleFamily::Page );
}
static void lcl_CheckFont( SfxItemSet& rSet, LanguageType eLang, DefaultFontType nFontType, sal_uInt16 nItemId )
@@ -241,7 +241,7 @@ void ScStyleSheetPool::CreateStandardStyles()
// 1. Standard
- pSheet = static_cast<ScStyleSheet*>( &Make( aStrStandard, SFX_STYLE_FAMILY_PARA, SCSTYLEBIT_STANDARD ) );
+ pSheet = static_cast<ScStyleSheet*>( &Make( aStrStandard, SfxStyleFamily::Para, SCSTYLEBIT_STANDARD ) );
pSheet->SetHelpId( aHelpFile, HID_SC_SHEET_CELL_STD );
// if default fonts for the document's languages are different from the pool default,
@@ -273,7 +273,7 @@ void ScStyleSheetPool::CreateStandardStyles()
// 2. Result
pSheet = static_cast<ScStyleSheet*>( &Make( SCSTR( STR_STYLENAME_RESULT ),
- SFX_STYLE_FAMILY_PARA,
+ SfxStyleFamily::Para,
SCSTYLEBIT_STANDARD ) );
pSheet->SetParent( aStrStandard );
pSheet->SetHelpId( aHelpFile, HID_SC_SHEET_CELL_ERG );
@@ -285,7 +285,7 @@ void ScStyleSheetPool::CreateStandardStyles()
// 3. Result1
pSheet = static_cast<ScStyleSheet*>( &Make( SCSTR( STR_STYLENAME_RESULT1 ),
- SFX_STYLE_FAMILY_PARA,
+ SfxStyleFamily::Para,
SCSTYLEBIT_STANDARD ) );
pSheet->SetParent( SCSTR( STR_STYLENAME_RESULT ) );
@@ -294,7 +294,7 @@ void ScStyleSheetPool::CreateStandardStyles()
// 4. headline
pSheet = static_cast<ScStyleSheet*>( &Make( SCSTR( STR_STYLENAME_HEADLINE ),
- SFX_STYLE_FAMILY_PARA,
+ SfxStyleFamily::Para,
SCSTYLEBIT_STANDARD ) );
pSheet->SetParent( aStrStandard );
@@ -308,7 +308,7 @@ void ScStyleSheetPool::CreateStandardStyles()
// 5. Ueberschrift1
pSheet = static_cast<ScStyleSheet*>( &Make( SCSTR( STR_STYLENAME_HEADLINE1 ),
- SFX_STYLE_FAMILY_PARA,
+ SfxStyleFamily::Para,
SCSTYLEBIT_STANDARD ) );
pSheet->SetParent( SCSTR( STR_STYLENAME_HEADLINE ) );
@@ -321,7 +321,7 @@ void ScStyleSheetPool::CreateStandardStyles()
// 1. Standard
pSheet = static_cast<ScStyleSheet*>( &Make( aStrStandard,
- SFX_STYLE_FAMILY_PAGE,
+ SfxStyleFamily::Page,
SCSTYLEBIT_STANDARD ) );
pSet = &pSheet->GetItemSet();
@@ -362,7 +362,7 @@ void ScStyleSheetPool::CreateStandardStyles()
// 2. Report
pSheet = static_cast<ScStyleSheet*>( &Make( SCSTR( STR_STYLENAME_REPORT ),
- SFX_STYLE_FAMILY_PAGE,
+ SfxStyleFamily::Page,
SCSTYLEBIT_STANDARD ) );
pSet = &pSheet->GetItemSet();
pSheet->SetHelpId( aHelpFile, HID_SC_SHEET_PAGE_REP );
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index 0c3a7e1381ad..77078ead7652 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -76,8 +76,8 @@ bool ScStyleSheet::HasParentSupport () const
switch ( GetFamily() )
{
- case SFX_STYLE_FAMILY_PARA: bHasParentSupport = true; break;
- case SFX_STYLE_FAMILY_PAGE: bHasParentSupport = false; break;
+ case SfxStyleFamily::Para: bHasParentSupport = true; break;
+ case SfxStyleFamily::Page: bHasParentSupport = false; break;
default:
{
// added to avoid warnings
@@ -131,7 +131,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
{
switch ( GetFamily() )
{
- case SFX_STYLE_FAMILY_PAGE:
+ case SfxStyleFamily::Page:
{
// Page templates should not be derivable,
// therefore suitable values are set at this point.
@@ -218,7 +218,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
}
break;
- case SFX_STYLE_FAMILY_PARA:
+ case SfxStyleFamily::Para:
default:
pSet = new SfxItemSet( GetPool().GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END );
break;
@@ -250,7 +250,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
bool ScStyleSheet::IsUsed() const
{
- if ( GetFamily() == SFX_STYLE_FAMILY_PARA )
+ if ( GetFamily() == SfxStyleFamily::Para )
{
// Always query the document to let it decide if a rescan is necessary,
// and store the state.
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index c677ce19c2b2..f5da41e63509 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -624,11 +624,11 @@ void ScTable::CopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCRO
if(!aStyleName.isEmpty())
{
- if(pDocument->GetStyleSheetPool()->Find(aStyleName, SFX_STYLE_FAMILY_PARA))
+ if(pDocument->GetStyleSheetPool()->Find(aStyleName, SfxStyleFamily::Para))
continue;
pDocument->GetStyleSheetPool()->CopyStyleFrom(
- pTable->pDocument->GetStyleSheetPool(), aStyleName, SFX_STYLE_FAMILY_PARA );
+ pTable->pDocument->GetStyleSheetPool(), aStyleName, SfxStyleFamily::Para );
}
}
}
@@ -2077,7 +2077,7 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCC
if (!aStyleName.isEmpty())
{
SfxStyleSheetBase* pStyleSheet =
- pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PARA );
+ pStylePool->Find( aStyleName, SfxStyleFamily::Para );
if ( pStyleSheet )
{
FillMaxRot( pRowInfo, nArrCount, nX1, nX2,
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 3fb4799a002d..64934400d6c9 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -1961,7 +1961,7 @@ bool ScTable::DoSubTotals( ScSubTotalParam& rParam )
//TODO: sort?
ScStyleSheet* pStyle = static_cast<ScStyleSheet*>(pDocument->GetStyleSheetPool()->Find(
- ScGlobal::GetRscString(STR_STYLENAME_RESULT), SFX_STYLE_FAMILY_PARA ));
+ ScGlobal::GetRscString(STR_STYLENAME_RESULT), SfxStyleFamily::Para ));
bool bSpaceLeft = true; // Success when inserting?
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index 8ba078cb4e84..6a2f060a5f14 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -72,7 +72,7 @@ void ScTable::UpdatePageBreaks( const ScRange* pUserArea )
}
SfxStyleSheetBase* pStyle = pDocument->GetStyleSheetPool()->
- Find( aPageStyle, SFX_STYLE_FAMILY_PAGE );
+ Find( aPageStyle, SfxStyleFamily::Page );
if ( !pStyle )
{
OSL_FAIL("UpdatePageBreaks: Style not found");
@@ -1121,17 +1121,17 @@ void ScTable::SetPageStyle( const OUString& rName )
{
OUString aStrNew = rName;
SfxStyleSheetBasePool* pStylePool = pDocument->GetStyleSheetPool();
- SfxStyleSheetBase* pNewStyle = pStylePool->Find( aStrNew, SFX_STYLE_FAMILY_PAGE );
+ SfxStyleSheetBase* pNewStyle = pStylePool->Find( aStrNew, SfxStyleFamily::Page );
if ( !pNewStyle )
{
aStrNew = ScGlobal::GetRscString(STR_STYLENAME_STANDARD);
- pNewStyle = pStylePool->Find( aStrNew, SFX_STYLE_FAMILY_PAGE );
+ pNewStyle = pStylePool->Find( aStrNew, SfxStyleFamily::Page );
}
if ( aPageStyle != aStrNew )
{
- SfxStyleSheetBase* pOldStyle = pStylePool->Find( aPageStyle, SFX_STYLE_FAMILY_PAGE );
+ SfxStyleSheetBase* pOldStyle = pStylePool->Find( aPageStyle, SfxStyleFamily::Page );
if ( pOldStyle && pNewStyle )
{
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index c54812a9cd26..2c63ed46a8ec 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -528,7 +528,7 @@ bool ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW&
{
const ScStyleSheet* pSearchStyle = static_cast<const ScStyleSheet*>(
pDocument->GetStyleSheetPool()->Find(
- rSearchItem.GetSearchString(), SFX_STYLE_FAMILY_PARA ));
+ rSearchItem.GetSearchString(), SfxStyleFamily::Para ));
SCsCOL nCol = rCol;
SCsROW nRow = rRow;
@@ -620,7 +620,7 @@ bool ScTable::ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW&
{
const ScStyleSheet* pReplaceStyle = static_cast<const ScStyleSheet*>(
pDocument->GetStyleSheetPool()->Find(
- rSearchItem.GetReplaceString(), SFX_STYLE_FAMILY_PARA ));
+ rSearchItem.GetReplaceString(), SfxStyleFamily::Para ));
if (pReplaceStyle)
ApplyStyle( rCol, rRow, *pReplaceStyle );
@@ -638,7 +638,7 @@ bool ScTable::SearchAllStyle(
{
const ScStyleSheet* pSearchStyle = static_cast<const ScStyleSheet*>(
pDocument->GetStyleSheetPool()->Find(
- rSearchItem.GetSearchString(), SFX_STYLE_FAMILY_PARA ));
+ rSearchItem.GetSearchString(), SfxStyleFamily::Para ));
bool bSelect = rSearchItem.GetSelection();
bool bBack = rSearchItem.GetBackward();
bool bEverFound = false;
@@ -678,7 +678,7 @@ bool ScTable::ReplaceAllStyle(
{
const ScStyleSheet* pReplaceStyle = static_cast<const ScStyleSheet*>(
pDocument->GetStyleSheetPool()->Find(
- rSearchItem.GetReplaceString(), SFX_STYLE_FAMILY_PARA ));
+ rSearchItem.GetReplaceString(), SfxStyleFamily::Para ));
if (pReplaceStyle)
{
diff --git a/sc/source/core/tool/stylehelper.cxx b/sc/source/core/tool/stylehelper.cxx
index d1eccbdd9bdd..e8fece39eef2 100644
--- a/sc/source/core/tool/stylehelper.cxx
+++ b/sc/source/core/tool/stylehelper.cxx
@@ -42,9 +42,9 @@ struct ScDisplayNameMap
OUString aProgName;
};
-static const ScDisplayNameMap* lcl_GetStyleNameMap( sal_uInt16 nType )
+static const ScDisplayNameMap* lcl_GetStyleNameMap( SfxStyleFamily nType )
{
- if ( nType == SFX_STYLE_FAMILY_PARA )
+ if ( nType == SfxStyleFamily::Para )
{
static bool bCellMapFilled = false;
static ScDisplayNameMap aCellMap[6];
@@ -71,7 +71,7 @@ static const ScDisplayNameMap* lcl_GetStyleNameMap( sal_uInt16 nType )
}
return aCellMap;
}
- else if ( nType == SFX_STYLE_FAMILY_PAGE )
+ else if ( nType == SfxStyleFamily::Page )
{
static bool bPageMapFilled = false;
static ScDisplayNameMap aPageMap[3];
@@ -104,7 +104,7 @@ static bool lcl_EndsWithUser( const OUString& rString )
return rString.endsWith(SC_SUFFIX_USER);
}
-OUString ScStyleNameConversion::DisplayToProgrammaticName( const OUString& rDispName, sal_uInt16 nType )
+OUString ScStyleNameConversion::DisplayToProgrammaticName( const OUString& rDispName, SfxStyleFamily nType )
{
bool bDisplayIsProgrammatic = false;
@@ -131,7 +131,7 @@ OUString ScStyleNameConversion::DisplayToProgrammaticName( const OUString& rDisp
return rDispName;
}
-OUString ScStyleNameConversion::ProgrammaticToDisplayName( const OUString& rProgName, sal_uInt16 nType )
+OUString ScStyleNameConversion::ProgrammaticToDisplayName( const OUString& rProgName, SfxStyleFamily nType )
{
if ( lcl_EndsWithUser( rProgName ) )
{
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index c4e27178f654..6d27232ffd61 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -1255,7 +1255,7 @@ void ImportExcel::PostDocLoad()
/* Set automatic page numbering in Default page style (default is "page number = 1").
Otherwise hidden tables (i.e. for scenarios) which have Default page style will
break automatic page numbering. */
- if( SfxStyleSheetBase* pStyleSheet = GetStyleSheetPool().Find( ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SFX_STYLE_FAMILY_PAGE ) )
+ if( SfxStyleSheetBase* pStyleSheet = GetStyleSheetPool().Find( ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SfxStyleFamily::Page ) )
pStyleSheet->GetItemSet().Put( SfxUInt16Item( ATTR_PAGE_FIRSTPAGENO, 0 ) );
// outlines for all sheets, sets hidden rows and columns (#i11776# after filtered ranges)
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 1a5ce8d7fa1e..24cc6565e9cd 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -621,7 +621,7 @@ XclExpCFImpl::XclExpCFImpl( const XclExpRoot& rRoot, const ScCondFormatEntry& rF
/* Get formatting attributes here, and not in WriteBody(). This is needed to
correctly insert all colors into the palette. */
- if( SfxStyleSheetBase* pStyleSheet = GetDoc().GetStyleSheetPool()->Find( mrFormatEntry.GetStyle(), SFX_STYLE_FAMILY_PARA ) )
+ if( SfxStyleSheetBase* pStyleSheet = GetDoc().GetStyleSheetPool()->Find( mrFormatEntry.GetStyle(), SfxStyleFamily::Para ) )
{
const SfxItemSet& rItemSet = pStyleSheet->GetItemSet();
diff --git a/sc/source/filter/excel/xepage.cxx b/sc/source/filter/excel/xepage.cxx
index 5fb1951236ba..2895819d4ff9 100644
--- a/sc/source/filter/excel/xepage.cxx
+++ b/sc/source/filter/excel/xepage.cxx
@@ -210,7 +210,7 @@ XclExpPageSettings::XclExpPageSettings( const XclExpRoot& rRoot ) :
ScDocument& rDoc = GetDoc();
SCTAB nScTab = GetCurrScTab();
- if( SfxStyleSheetBase* pStyleSheet = GetStyleSheetPool().Find( rDoc.GetPageStyle( nScTab ), SFX_STYLE_FAMILY_PAGE ) )
+ if( SfxStyleSheetBase* pStyleSheet = GetStyleSheetPool().Find( rDoc.GetPageStyle( nScTab ), SfxStyleFamily::Page ) )
{
const SfxItemSet& rItemSet = pStyleSheet->GetItemSet();
maData.mbValid = true;
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index d56d041f469d..08007ec51a37 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -2837,7 +2837,7 @@ sal_uInt32 XclExpXFBuffer::InsertStyleXF( const SfxStyleSheetBase& rStyleSheet )
void XclExpXFBuffer::InsertUserStyles()
{
- SfxStyleSheetIterator aStyleIter( GetDoc().GetStyleSheetPool(), SFX_STYLE_FAMILY_PARA );
+ SfxStyleSheetIterator aStyleIter( GetDoc().GetStyleSheetPool(), SfxStyleFamily::Para );
for( SfxStyleSheetBase* pStyleSheet = aStyleIter.First(); pStyleSheet; pStyleSheet = aStyleIter.Next() )
if( pStyleSheet->IsUserDefined() && !lclIsBuiltInStyle( pStyleSheet->GetName() ) )
InsertStyleXF( *pStyleSheet );
@@ -2884,7 +2884,7 @@ void XclExpXFBuffer::InsertDefaultRecords()
maFills.push_back( lcl_GetPatternFill_Gray125() );
// index 0: default style
- if( SfxStyleSheetBase* pDefStyleSheet = GetStyleSheetPool().Find( ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SFX_STYLE_FAMILY_PARA ) )
+ if( SfxStyleSheetBase* pDefStyleSheet = GetStyleSheetPool().Find( ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SfxStyleFamily::Para ) )
{
XclExpXFRef xDefStyle( new XclExpXF( GetRoot(), *pDefStyleSheet ) );
sal_uInt32 nXFId = AppendBuiltInXFWithStyle( xDefStyle, EXC_STYLE_NORMAL );
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index d53c75bf4b8a..e25745873439 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -1352,7 +1352,7 @@ void XclImpXF::ApplyPatternToAttrList(
{
ScStyleSheet* pStyleSheet = static_cast<ScStyleSheet*>(
pStylePool->Find(
- ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SFX_STYLE_FAMILY_PARA));
+ ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SfxStyleFamily::Para));
if (pStyleSheet)
rPat.SetStyleSheet(pStyleSheet, false);
@@ -1514,7 +1514,7 @@ ScStyleSheet* XclImpStyle::CreateStyleSheet()
if( pXF ) pXF->SetAllUsedFlags( true );
// use existing "Default" style sheet
mpStyleSheet = static_cast< ScStyleSheet* >( GetStyleSheetPool().Find(
- ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SFX_STYLE_FAMILY_PARA ) );
+ ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SfxStyleFamily::Para ) );
OSL_ENSURE( mpStyleSheet, "XclImpStyle::CreateStyleSheet - Default style not found" );
bCreatePattern = true;
}
@@ -1523,10 +1523,10 @@ ScStyleSheet* XclImpStyle::CreateStyleSheet()
/* #i103281# do not create another style sheet of the same name,
if it exists already. This is needed to prevent that styles
pasted from clipboard get duplicated over and over. */
- mpStyleSheet = static_cast< ScStyleSheet* >( GetStyleSheetPool().Find( maFinalName, SFX_STYLE_FAMILY_PARA ) );
+ mpStyleSheet = static_cast< ScStyleSheet* >( GetStyleSheetPool().Find( maFinalName, SfxStyleFamily::Para ) );
if( !mpStyleSheet )
{
- mpStyleSheet = &static_cast< ScStyleSheet& >( GetStyleSheetPool().Make( maFinalName, SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_USERDEF ) );
+ mpStyleSheet = &static_cast< ScStyleSheet& >( GetStyleSheetPool().Make( maFinalName, SfxStyleFamily::Para, SFXSTYLEBIT_USERDEF ) );
bCreatePattern = true;
}
}
@@ -1614,7 +1614,7 @@ void XclImpXFBuffer::CreateUserStyles()
for styles in different sheets with the same name. Assuming that the
BIFF4W import filter is never used to import from clipboard... */
bool bReserveAll = (GetBiff() == EXC_BIFF4) && (GetCurrScTab() > 0);
- SfxStyleSheetIterator aStyleIter( GetDoc().GetStyleSheetPool(), SFX_STYLE_FAMILY_PARA );
+ SfxStyleSheetIterator aStyleIter( GetDoc().GetStyleSheetPool(), SfxStyleFamily::Para );
OUString aStandardName = ScGlobal::GetRscString( STR_STYLENAME_STANDARD );
for( SfxStyleSheetBase* pStyleSheet = aStyleIter.First(); pStyleSheet; pStyleSheet = aStyleIter.Next() )
if( (pStyleSheet->GetName() != aStandardName) && (bReserveAll || !pStyleSheet->IsUserDefined()) )
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index fb80b938c3b7..fde80bded0b4 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -257,12 +257,12 @@ ScStyleSheet& lclMakeStyleSheet( ScStyleSheetPool& rPool, const OUString& rStyle
ScStyleSheet& ScfTools::MakeCellStyleSheet( ScStyleSheetPool& rPool, const OUString& rStyleName, bool bForceName )
{
- return lclMakeStyleSheet( rPool, rStyleName, SFX_STYLE_FAMILY_PARA, bForceName );
+ return lclMakeStyleSheet( rPool, rStyleName, SfxStyleFamily::Para, bForceName );
}
ScStyleSheet& ScfTools::MakePageStyleSheet( ScStyleSheetPool& rPool, const OUString& rStyleName, bool bForceName )
{
- return lclMakeStyleSheet( rPool, rStyleName, SFX_STYLE_FAMILY_PAGE, bForceName );
+ return lclMakeStyleSheet( rPool, rStyleName, SfxStyleFamily::Page, bForceName );
}
// *** byte string import operations *** --------------------------------------
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 108cd63774d7..901ff80acbd8 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -473,10 +473,10 @@ const SfxItemSet& ScHTMLExport::PageDefaults( SCTAB nTab )
// remember defaults for compare in WriteCell
if ( !aHTMLStyle.bInitialized )
{
- pStylePool->SetSearchMask( SFX_STYLE_FAMILY_PARA );
+ pStylePool->SetSearchMask( SfxStyleFamily::Para );
pStyleSheet = pStylePool->Find(
ScGlobal::GetRscString(STR_STYLENAME_STANDARD),
- SFX_STYLE_FAMILY_PARA );
+ SfxStyleFamily::Para );
OSL_ENSURE( pStyleSheet, "ParaStyle not found! :-(" );
if (!pStyleSheet)
pStyleSheet = pStylePool->First();
@@ -496,8 +496,8 @@ const SfxItemSet& ScHTMLExport::PageDefaults( SCTAB nTab )
// Page style sheet printer settings, e.g. for background graphics.
// There's only one background graphic in HTML!
- pStylePool->SetSearchMask( SFX_STYLE_FAMILY_PAGE );
- pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SFX_STYLE_FAMILY_PAGE );
+ pStylePool->SetSearchMask( SfxStyleFamily::Page );
+ pStyleSheet = pStylePool->Find( pDoc->GetPageStyle( nTab ), SfxStyleFamily::Page );
OSL_ENSURE( pStyleSheet, "PageStyle not found! :-(" );
if (!pStyleSheet)
pStyleSheet = pStylePool->First();
diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx
index 3baae4fe6486..f57b19734922 100644
--- a/sc/source/filter/html/htmlimp.cxx
+++ b/sc/source/filter/html/htmlimp.cxx
@@ -66,7 +66,7 @@ ScHTMLImport::ScHTMLImport( ScDocument* pDocP, const OUString& rBaseURL, const S
OutputDevice* pDefaultDev = Application::GetDefaultDevice();
const OUString& aPageStyle = mpDoc->GetPageStyle( rRange.aStart.Tab() );
ScStyleSheet* pStyleSheet = static_cast<ScStyleSheet*>(mpDoc->
- GetStyleSheetPool()->Find( aPageStyle, SFX_STYLE_FAMILY_PAGE ));
+ GetStyleSheetPool()->Find( aPageStyle, SfxStyleFamily::Page ));
if ( pStyleSheet )
{
const SfxItemSet& rSet = pStyleSheet->GetItemSet();
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index b1d40dcaab93..10cc7c5be1ad 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -2151,7 +2151,7 @@ void Xf::applyPatternToAttrList( AttrList& rAttrs, SCROW nRow1, SCROW nRow2, sal
{
ScStyleSheet* pStyleSheet = static_cast<ScStyleSheet*>(
pStylePool->Find(
- ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SFX_STYLE_FAMILY_PARA));
+ ScGlobal::GetRscString(STR_STYLENAME_STANDARD), SfxStyleFamily::Para));
if (pStyleSheet)
rPat.SetStyleSheet( pStyleSheet, false );
@@ -2243,7 +2243,7 @@ void Xf::writeToDoc( ScDocumentImport& rDoc, const table::CellRangeAddress& rRan
ScStyleSheet* pStyleSheet =
static_cast<ScStyleSheet*>(
- rDoc.getDoc().GetStyleSheetPool()->Find(aStyleName, SFX_STYLE_FAMILY_PARA));
+ rDoc.getDoc().GetStyleSheetPool()->Find(aStyleName, SfxStyleFamily::Para));
if (pStyleSheet)
{
@@ -2631,16 +2631,16 @@ void CellStyle::createCellStyle()
{
// use existing "Default" style sheet
mpStyleSheet = static_cast< ScStyleSheet* >( static_cast< ScStyleSheetPool* >( rDoc.GetStyleSheetPool() )->Find(
- ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SFX_STYLE_FAMILY_PARA ) );
+ ScGlobal::GetRscString( STR_STYLENAME_STANDARD ), SfxStyleFamily::Para ) );
OSL_ENSURE( mpStyleSheet, "CellStyle::createStyle - Default style not found" );
bCreatePattern = true;
}
else
{
- mpStyleSheet = static_cast< ScStyleSheet* >( static_cast< ScStyleSheetPool* >( rDoc.GetStyleSheetPool() )->Find( maFinalName, SFX_STYLE_FAMILY_PARA ) );
+ mpStyleSheet = static_cast< ScStyleSheet* >( static_cast< ScStyleSheetPool* >( rDoc.GetStyleSheetPool() )->Find( maFinalName, SfxStyleFamily::Para ) );
if( !mpStyleSheet )
{
- mpStyleSheet = &static_cast< ScStyleSheet& >( rDoc.GetStyleSheetPool()->Make( maFinalName, SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_USERDEF ) );
+ mpStyleSheet = &static_cast< ScStyleSheet& >( rDoc.GetStyleSheetPool()->Make( maFinalName, SfxStyleFamily::Para, SFXSTYLEBIT_USERDEF ) );
bCreatePattern = true;
}
}
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index 176d5eb40096..38da31387d25 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -947,7 +947,7 @@ void WorksheetGlobals::initializeWorksheetImport()
ScStyleSheet* pStyleSheet =
static_cast<ScStyleSheet*>(rDoc.getDoc().GetStyleSheetPool()->Find(
- getStyles().getDefaultStyleName(), SFX_STYLE_FAMILY_PARA));
+ getStyles().getDefaultStyleName(), SfxStyleFamily::Para));
if (pStyleSheet)
rDoc.setCellStyleToSheet(getSheetIndex(), *pStyleSheet);
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 496faeae891b..0bfe90f4e6cd 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -1207,7 +1207,7 @@ size_t ScOrcusStyles::commit_cell_style()
}
ScStyleSheetPool* pPool = mrDoc.GetStyleSheetPool();
- SfxStyleSheetBase& rBase = pPool->Make(maCurrentCellStyle.maName, SFX_STYLE_FAMILY_PARA);
+ SfxStyleSheetBase& rBase = pPool->Make(maCurrentCellStyle.maName, SfxStyleFamily::Para);
SfxItemSet& rSet = rBase.GetItemSet();
xf& rXf = maCellStyleXfs[maCurrentCellStyle.mnXFId];
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index 43731e0bd7df..bfac4b03da1f 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -689,7 +689,7 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
OUString aName = lcl_MakeOldPageStyleFormatName( i );
ScStyleSheet* pSheet = static_cast<ScStyleSheet*>( &pStylePool->Make( aName,
- SFX_STYLE_FAMILY_PAGE,
+ SfxStyleFamily::Page,
SFXSTYLEBIT_USERDEF | SCSTYLEBIT_STANDARD ) );
// #i68483# set page style name at sheet...
pDoc->SetPageStyle( static_cast< SCTAB >( i ), aName );
@@ -1107,17 +1107,17 @@ void Sc10Import::LoadPatternCollection()
{
Sc10PatternData* pPattern = pPatternCollection->At( i );
OUString aName( pPattern->Name, strlen(pPattern->Name), DEFCHARSET );
- SfxStyleSheetBase* pStyle = pStylePool->Find( aName, SFX_STYLE_FAMILY_PARA );
+ SfxStyleSheetBase* pStyle = pStylePool->Find( aName, SfxStyleFamily::Para );
if( pStyle == nullptr )
- pStylePool->Make( aName, SFX_STYLE_FAMILY_PARA );
+ pStylePool->Make( aName, SfxStyleFamily::Para );
else
{
pPattern->Name[ 27 ] = 0;
strcat( pPattern->Name, "_Old" );
aName = SC10TOSTRING( pPattern->Name );
- pStylePool->Make( aName, SFX_STYLE_FAMILY_PARA );
+ pStylePool->Make( aName, SfxStyleFamily::Para );
}
- pStyle = pStylePool->Find( aName, SFX_STYLE_FAMILY_PARA );
+ pStyle = pStylePool->Find( aName, SfxStyleFamily::Para );
if( pStyle != nullptr )
{
SfxItemSet &rItemSet = pStyle->GetItemSet();
@@ -2104,7 +2104,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
if (pPattern != nullptr)
{
ScStyleSheet* pStyle = static_cast<ScStyleSheet*>( pStylePool->Find(
- SC10TOSTRING( pPattern->Name ), SFX_STYLE_FAMILY_PARA) );
+ SC10TOSTRING( pPattern->Name ), SfxStyleFamily::Para) );
if (pStyle != nullptr)
pDoc->ApplyStyleAreaTab(Col, nStart, Col, nEnd, Tab, *pStyle);
diff --git a/sc/source/filter/xml/xmlcondformat.cxx b/sc/source/filter/xml/xmlcondformat.cxx
index 7a06e0e797ee..7e0e0c063ce1 100644
--- a/sc/source/filter/xml/xmlcondformat.cxx
+++ b/sc/source/filter/xml/xmlcondformat.cxx
@@ -588,7 +588,7 @@ ScXMLCondContext::ScXMLCondContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
sExpression = sValue;
break;
case XML_TOK_CONDITION_APPLY_STYLE_NAME:
- sStyle = ScStyleNameConversion::ProgrammaticToDisplayName(sValue, SFX_STYLE_FAMILY_PARA );
+ sStyle = ScStyleNameConversion::ProgrammaticToDisplayName(sValue, SfxStyleFamily::Para );
break;
case XML_TOK_CONDITION_BASE_CELL_ADDRESS:
sAddress = sValue;
@@ -789,7 +789,7 @@ ScXMLDateContext::ScXMLDateContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
sDateType = sValue;
break;
case XML_TOK_COND_DATE_STYLE:
- sStyle = ScStyleNameConversion::ProgrammaticToDisplayName(sValue, SFX_STYLE_FAMILY_PARA );
+ sStyle = ScStyleNameConversion::ProgrammaticToDisplayName(sValue, SfxStyleFamily::Para );
break;
default:
break;
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 9042eb6e2bc0..a92834ea0acc 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -4315,7 +4315,7 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab)
default:
SAL_WARN("sc", "unimplemented conditional format export");
}
- OUString sStyle = ScStyleNameConversion::DisplayToProgrammaticName(pEntry->GetStyle(), SFX_STYLE_FAMILY_PARA);
+ OUString sStyle = ScStyleNameConversion::DisplayToProgrammaticName(pEntry->GetStyle(), SfxStyleFamily::Para);
AddAttribute(XML_NAMESPACE_CALC_EXT, XML_APPLY_STYLE_NAME, sStyle);
AddAttribute(XML_NAMESPACE_CALC_EXT, XML_VALUE, aCond.makeStringAndClear());
@@ -4464,7 +4464,7 @@ void ScXMLExport::ExportConditionalFormat(SCTAB nTab)
{
const ScCondDateFormatEntry& rDateFormat = static_cast<const ScCondDateFormatEntry&>(*pFormatEntry);
OUString aDateType = getDateStringForType(rDateFormat.GetDateType());
- OUString aStyleName = ScStyleNameConversion::DisplayToProgrammaticName(rDateFormat.GetStyleName(), SFX_STYLE_FAMILY_PARA );
+ OUString aStyleName = ScStyleNameConversion::DisplayToProgrammaticName(rDateFormat.GetStyleName(), SfxStyleFamily::Para );
AddAttribute( XML_NAMESPACE_CALC_EXT, XML_STYLE, aStyleName);
AddAttribute( XML_NAMESPACE_CALC_EXT, XML_DATE, aDateType);
SvXMLElementExport aElementDateFormat(*this, XML_NAMESPACE_CALC_EXT, XML_DATE_IS, true, true);
diff --git a/sc/source/filter/xml/xmlfonte.cxx b/sc/source/filter/xml/xmlfonte.cxx
index 9d39d60830ac..4654add1f021 100644
--- a/sc/source/filter/xml/xmlfonte.cxx
+++ b/sc/source/filter/xml/xmlfonte.cxx
@@ -86,7 +86,7 @@ ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl(ScXMLExport& rExportP,
const SfxItemPool* pEditPool(rExportP.GetDocument()->GetEditPool());
AddFontItems(aEditWhichIds, 3, pEditPool, false);
- SfxStyleSheetIteratorPtr pItr = rExportP.GetDocument()->GetStyleSheetPool()->CreateIterator(SFX_STYLE_FAMILY_PAGE, 0xFFFF);
+ SfxStyleSheetIteratorPtr pItr = rExportP.GetDocument()->GetStyleSheetPool()->CreateIterator(SfxStyleFamily::Page, 0xFFFF);
if(pItr)
{
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 )
{