summaryrefslogtreecommitdiff
path: root/sc/source/core
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/core
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/core')
-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
14 files changed, 55 insertions, 55 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 ) )
{