summaryrefslogtreecommitdiff
path: root/editeng
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 /editeng
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 'editeng')
-rw-r--r--editeng/source/editeng/editdbg.cxx2
-rw-r--r--editeng/source/editeng/editobj.cxx4
-rw-r--r--editeng/source/editeng/editundo.cxx4
-rw-r--r--editeng/source/editeng/eertfpar.cxx8
-rw-r--r--editeng/source/editeng/impedit4.cxx2
-rw-r--r--editeng/source/editeng/impedit5.cxx4
6 files changed, 12 insertions, 12 deletions
diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index 64a7e2f1e28b..ef6ab7a51412 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -432,7 +432,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, bool bInfoBox )
fprintf( fp, "\n================== Stylesheets =============================================" );
fprintf( fp, "\n================================================================================" );
fprintf( fp, "\n#Template: %" SAL_PRIuUINT32 "\n", sal_uInt32(nStyles) );
- SfxStyleSheetIterator aIter( pEE->pImpEditEngine->GetStyleSheetPool(), SFX_STYLE_FAMILY_ALL );
+ SfxStyleSheetIterator aIter( pEE->pImpEditEngine->GetStyleSheetPool(), SfxStyleFamily::All );
SfxStyleSheetBase* pStyle = aIter.First();
while ( pStyle )
{
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index fe784e0d097d..7190147e28e1 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -112,7 +112,7 @@ const XParaPortion& XParaPortionList::operator [](size_t i) const
}
ContentInfo::ContentInfo( SfxItemPool& rPool ) :
- eFamily(SFX_STYLE_FAMILY_PARA),
+ eFamily(SfxStyleFamily::Para),
aParaAttribs(rPool, EE_PARA_START, EE_CHAR_END)
{
}
@@ -1182,7 +1182,7 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const
// StyleName and Family...
write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, rC.GetStyle(), eEncoding);
- rOStream.WriteUInt16( rC.GetFamily() );
+ rOStream.WriteUInt16( (sal_uInt16)rC.GetFamily() );
// Paragraph attributes ...
rC.GetParaAttribs().Store( rOStream );
diff --git a/editeng/source/editeng/editundo.cxx b/editeng/source/editeng/editundo.cxx
index fdaeefa8450a..faea53b4acea 100644
--- a/editeng/source/editeng/editundo.cxx
+++ b/editeng/source/editeng/editundo.cxx
@@ -209,8 +209,8 @@ EditUndoConnectParas::EditUndoConnectParas(
EditUndo(EDITUNDO_CONNECTPARAS, pEE),
aLeftParaAttribs(rLeftParaAttribs),
aRightParaAttribs(rRightParaAttribs),
- eLeftStyleFamily(SFX_STYLE_FAMILY_ALL),
- eRightStyleFamily(SFX_STYLE_FAMILY_ALL),
+ eLeftStyleFamily(SfxStyleFamily::All),
+ eRightStyleFamily(SfxStyleFamily::All),
bBackward(bBkwrd)
{
nNode = nN;
diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx
index fa8b36b0efe2..3f81d4d64350 100644
--- a/editeng/source/editeng/eertfpar.cxx
+++ b/editeng/source/editeng/eertfpar.cxx
@@ -370,7 +370,7 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
auto const& pS = it->second;
mpEditEngine->SetStyleSheet(
EditSelection(aStartPaM, aEndPaM),
- static_cast<SfxStyleSheet*>(mpEditEngine->GetStyleSheetPool()->Find(pS->sName, SFX_STYLE_FAMILY_ALL)));
+ static_cast<SfxStyleSheet*>(mpEditEngine->GetStyleSheetPool()->Find(pS->sName, SfxStyleFamily::All)));
nOutlLevel = pS->nOutlineNo;
}
}
@@ -443,7 +443,7 @@ SvxRTFStyleType* EditRTFParser::FindStyleSheet( const OUString& rName )
SfxStyleSheet* EditRTFParser::CreateStyleSheet( SvxRTFStyleType* pRTFStyle )
{
// Check if a template exists, then it will not be changed!
- SfxStyleSheet* pStyle = static_cast<SfxStyleSheet*>(mpEditEngine->GetStyleSheetPool()->Find( pRTFStyle->sName, SFX_STYLE_FAMILY_ALL ));
+ SfxStyleSheet* pStyle = static_cast<SfxStyleSheet*>(mpEditEngine->GetStyleSheetPool()->Find( pRTFStyle->sName, SfxStyleFamily::All ));
if ( pStyle )
return pStyle;
@@ -460,7 +460,7 @@ SfxStyleSheet* EditRTFParser::CreateStyleSheet( SvxRTFStyleType* pRTFStyle )
}
}
- pStyle = static_cast<SfxStyleSheet*>( &mpEditEngine->GetStyleSheetPool()->Make( aName, SFX_STYLE_FAMILY_PARA ) );
+ pStyle = static_cast<SfxStyleSheet*>( &mpEditEngine->GetStyleSheetPool()->Make( aName, SfxStyleFamily::Para ) );
// 1) convert and take over Items ...
ConvertAndPutItems( pStyle->GetItemSet(), pRTFStyle->aAttrSet );
@@ -468,7 +468,7 @@ SfxStyleSheet* EditRTFParser::CreateStyleSheet( SvxRTFStyleType* pRTFStyle )
// 2) As long as Parent is not in the pool, also create this ...
if ( !aParent.isEmpty() && ( aParent != aName ) )
{
- SfxStyleSheet* pS = static_cast<SfxStyleSheet*>(mpEditEngine->GetStyleSheetPool()->Find( aParent, SFX_STYLE_FAMILY_ALL ));
+ SfxStyleSheet* pS = static_cast<SfxStyleSheet*>(mpEditEngine->GetStyleSheetPool()->Find( aParent, SfxStyleFamily::All ));
if ( !pS )
{
// If not found anywhere, create from RTF ...
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 4cb5d776fdc1..fc7744a956f0 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -458,7 +458,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
if ( GetStyleSheetPool() )
{
SfxStyleSheetIteratorPtr aSSSIterator = std::make_shared<SfxStyleSheetIterator>(GetStyleSheetPool(),
- SFX_STYLE_FAMILY_ALL);
+ SfxStyleFamily::All);
// fill aStyleSheetToIdMap
sal_uInt32 nId = 1;
for ( SfxStyleSheetBase* pStyle = aSSSIterator->First(); pStyle;
diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx
index 0d10336de6cd..a20d2cb86551 100644
--- a/editeng/source/editeng/impedit5.cxx
+++ b/editeng/source/editeng/impedit5.cxx
@@ -82,8 +82,8 @@ void ImpEditEngine::SetStyleSheet( sal_Int32 nPara, SfxStyleSheet* pStyle )
InsertUndo(
new EditUndoSetStyleSheet(pEditEngine, aEditDoc.GetPos( pNode ),
- aPrevStyleName, pCurStyle ? pCurStyle->GetFamily() : SFX_STYLE_FAMILY_PARA,
- aNewStyleName, pStyle ? pStyle->GetFamily() : SFX_STYLE_FAMILY_PARA,
+ aPrevStyleName, pCurStyle ? pCurStyle->GetFamily() : SfxStyleFamily::Para,
+ aNewStyleName, pStyle ? pStyle->GetFamily() : SfxStyleFamily::Para,
pNode->GetContentAttribs().GetItems() ) );
}
if ( pCurStyle )