summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-09-10 17:53:41 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-09-12 06:08:32 +0000
commitea733ab5b632109d28bb8f1dc37116340b26229b (patch)
tree78a5c4d6cad5d6f2c58a89745ba0af130ef0e188 /editeng
parentcc3294e127a6aedb8f6da5741ac9063da1cc2135 (diff)
Turn SfxItemState into a C++11 scoped enumeration
...to gain further confidence in the claim "that none of the existing code tries to uses combinations of these enum values" (d92602c5b13d0a60439d86c5a033d124178726ca "more fixes for SfxItemState") Change-Id: I987922d945e8738e38adfde83b869adf3ff35b13 Reviewed-on: https://gerrit.libreoffice.org/11384 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editdbg.cxx8
-rw-r--r--editeng/source/editeng/editdoc.cxx56
-rw-r--r--editeng/source/editeng/editobj.cxx10
-rw-r--r--editeng/source/editeng/eertfpar.cxx4
-rw-r--r--editeng/source/editeng/impedit4.cxx6
-rw-r--r--editeng/source/editeng/impedit5.cxx18
-rw-r--r--editeng/source/items/textitem.cxx4
-rw-r--r--editeng/source/outliner/outliner.cxx4
-rw-r--r--editeng/source/outliner/outlvw.cxx6
-rw-r--r--editeng/source/rtf/rtfitem.cxx12
-rw-r--r--editeng/source/rtf/svxrtf.cxx14
-rw-r--r--editeng/source/uno/unofored.cxx16
-rw-r--r--editeng/source/uno/unoipset.cxx4
-rw-r--r--editeng/source/uno/unotext.cxx100
14 files changed, 131 insertions, 131 deletions
diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index 8b8a705b74b9..ba3d852dcf00 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -300,14 +300,14 @@ void DbgOutItemSet( FILE* fp, const SfxItemSet& rSet, bool bSearchInParent, bool
for ( sal_uInt16 nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ )
{
fprintf( fp, "\nWhich: %i\t", nWhich );
- if ( rSet.GetItemState( nWhich, bSearchInParent ) == SFX_ITEM_DEFAULT )
+ if ( rSet.GetItemState( nWhich, bSearchInParent ) == SfxItemState::DEFAULT )
fprintf( fp, "ITEM_OFF " );
- else if ( rSet.GetItemState( nWhich, bSearchInParent ) == SFX_ITEM_DONTCARE )
+ else if ( rSet.GetItemState( nWhich, bSearchInParent ) == SfxItemState::DONTCARE )
fprintf( fp, "ITEM_DC " );
- else if ( rSet.GetItemState( nWhich, bSearchInParent ) == SFX_ITEM_SET )
+ else if ( rSet.GetItemState( nWhich, bSearchInParent ) == SfxItemState::SET )
fprintf( fp, "ITEM_ON *" );
- if ( !bShowALL && ( rSet.GetItemState( nWhich, bSearchInParent ) != SFX_ITEM_SET ) )
+ if ( !bShowALL && ( rSet.GetItemState( nWhich, bSearchInParent ) != SfxItemState::SET ) )
continue;
const SfxPoolItem& rItem = rSet.Get( nWhich, bSearchInParent );
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 623e5e7c50ea..dc31300532f8 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -947,7 +947,7 @@ void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const Map
nSourceWhich = nW;
}
- if ( rSource.GetItemState( nSourceWhich, false ) == SFX_ITEM_SET )
+ if ( rSource.GetItemState( nSourceWhich, false ) == SfxItemState::SET )
{
MapUnit eSourceUnit = pSourceUnit ? *pSourceUnit : (MapUnit)pSourcePool->GetMetric( nSourceWhich );
MapUnit eDestUnit = pDestUnit ? *pDestUnit : (MapUnit)pDestPool->GetMetric( nWhich );
@@ -1882,7 +1882,7 @@ void ContentAttribs::SetStyleSheet( SfxStyleSheet* pS )
for ( sal_uInt16 nWhich = EE_PARA_START; nWhich <= EE_CHAR_END; nWhich++ )
{
// Don't change bullet on/off
- if ( ( nWhich != EE_PARA_BULLETSTATE ) && ( rStyleAttribs.GetItemState( nWhich ) == SFX_ITEM_SET ) )
+ if ( ( nWhich != EE_PARA_BULLETSTATE ) && ( rStyleAttribs.GetItemState( nWhich ) == SfxItemState::SET ) )
aAttribSet.ClearItem( nWhich );
}
}
@@ -1892,7 +1892,7 @@ const SfxPoolItem& ContentAttribs::GetItem( sal_uInt16 nWhich ) const
{
// Hard paragraph attributes take precedence!
const SfxItemSet* pTakeFrom = &aAttribSet;
- if ( pStyle && ( aAttribSet.GetItemState( nWhich, false ) != SFX_ITEM_SET ) )
+ if ( pStyle && ( aAttribSet.GetItemState( nWhich, false ) != SfxItemState::SET ) )
pTakeFrom = &pStyle->GetItemSet();
return pTakeFrom->Get( nWhich );
@@ -1901,9 +1901,9 @@ const SfxPoolItem& ContentAttribs::GetItem( sal_uInt16 nWhich ) const
bool ContentAttribs::HasItem( sal_uInt16 nWhich ) const
{
bool bHasItem = false;
- if ( aAttribSet.GetItemState( nWhich, false ) == SFX_ITEM_SET )
+ if ( aAttribSet.GetItemState( nWhich, false ) == SfxItemState::SET )
bHasItem = true;
- else if ( pStyle && pStyle->GetItemSet().GetItemState( nWhich ) == SFX_ITEM_SET )
+ else if ( pStyle && pStyle->GetItemSet().GetItemState( nWhich ) == SfxItemState::SET )
bHasItem = true;
return bHasItem;
@@ -2006,7 +2006,7 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s
sal_uInt16 nWhich_Weight = GetScriptItemId( EE_CHAR_WEIGHT, nScriptType );
sal_uInt16 nWhich_Italic = GetScriptItemId( EE_CHAR_ITALIC, nScriptType );
- if ( bSearchInParent || ( rSet.GetItemState( nWhich_FontInfo ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( nWhich_FontInfo ) == SfxItemState::SET ) )
{
const SvxFontItem& rFontItem = (const SvxFontItem&)rSet.Get( nWhich_FontInfo );
rFont.SetName( rFontItem.GetFamilyName() );
@@ -2014,31 +2014,31 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s
rFont.SetPitch( rFontItem.GetPitch() );
rFont.SetCharSet( rFontItem.GetCharSet() );
}
- if ( bSearchInParent || ( rSet.GetItemState( nWhich_Language ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( nWhich_Language ) == SfxItemState::SET ) )
rFont.SetLanguage( ((const SvxLanguageItem&)rSet.Get( nWhich_Language )).GetLanguage() );
- if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_COLOR ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_COLOR ) == SfxItemState::SET ) )
rFont.SetColor( ((const SvxColorItem&)rSet.Get( EE_CHAR_COLOR )).GetValue() );
- if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_BKGCOLOR ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_BKGCOLOR ) == SfxItemState::SET ) )
rFont.SetFillColor( ((const SvxBackgroundColorItem&)rSet.Get( EE_CHAR_BKGCOLOR )).GetValue() );
- if ( bSearchInParent || ( rSet.GetItemState( nWhich_FontHeight ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( nWhich_FontHeight ) == SfxItemState::SET ) )
rFont.SetSize( Size( rFont.GetSize().Width(), ((const SvxFontHeightItem&)rSet.Get( nWhich_FontHeight ) ).GetHeight() ) );
- if ( bSearchInParent || ( rSet.GetItemState( nWhich_Weight ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( nWhich_Weight ) == SfxItemState::SET ) )
rFont.SetWeight( ((const SvxWeightItem&)rSet.Get( nWhich_Weight )).GetWeight() );
- if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_UNDERLINE ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_UNDERLINE ) == SfxItemState::SET ) )
rFont.SetUnderline( ((const SvxUnderlineItem&)rSet.Get( EE_CHAR_UNDERLINE )).GetLineStyle() );
- if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_OVERLINE ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_OVERLINE ) == SfxItemState::SET ) )
rFont.SetOverline( ((const SvxOverlineItem&)rSet.Get( EE_CHAR_OVERLINE )).GetLineStyle() );
- if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_STRIKEOUT ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_STRIKEOUT ) == SfxItemState::SET ) )
rFont.SetStrikeout( ((const SvxCrossedOutItem&)rSet.Get( EE_CHAR_STRIKEOUT )).GetStrikeout() );
- if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_CASEMAP ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_CASEMAP ) == SfxItemState::SET ) )
rFont.SetCaseMap( ((const SvxCaseMapItem&)rSet.Get( EE_CHAR_CASEMAP )).GetCaseMap() );
- if ( bSearchInParent || ( rSet.GetItemState( nWhich_Italic ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( nWhich_Italic ) == SfxItemState::SET ) )
rFont.SetItalic( ((const SvxPostureItem&)rSet.Get( nWhich_Italic )).GetPosture() );
- if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_OUTLINE ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_OUTLINE ) == SfxItemState::SET ) )
rFont.SetOutline( ((const SvxContourItem&)rSet.Get( EE_CHAR_OUTLINE )).GetValue() );
- if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_SHADOW ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_SHADOW ) == SfxItemState::SET ) )
rFont.SetShadow( ((const SvxShadowedItem&)rSet.Get( EE_CHAR_SHADOW )).GetValue() );
- if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_ESCAPEMENT ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_ESCAPEMENT ) == SfxItemState::SET ) )
{
const SvxEscapementItem& rEsc = (const SvxEscapementItem&) rSet.Get( EE_CHAR_ESCAPEMENT );
@@ -2052,15 +2052,15 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s
nEsc = sal::static_int_cast< short >( -( 100 - nProp ) );
rFont.SetEscapement( nEsc );
}
- if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_PAIRKERNING ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_PAIRKERNING ) == SfxItemState::SET ) )
rFont.SetKerning( ((const SvxAutoKernItem&)rSet.Get( EE_CHAR_PAIRKERNING )).GetValue() );
- if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_KERNING ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_KERNING ) == SfxItemState::SET ) )
rFont.SetFixKerning( ((const SvxKerningItem&)rSet.Get( EE_CHAR_KERNING )).GetValue() );
- if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_WLM ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_WLM ) == SfxItemState::SET ) )
rFont.SetWordLineMode( ((const SvxWordLineModeItem&)rSet.Get( EE_CHAR_WLM )).GetValue() );
- if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_EMPHASISMARK ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_EMPHASISMARK ) == SfxItemState::SET ) )
rFont.SetEmphasisMark( ((const SvxEmphasisMarkItem&)rSet.Get( EE_CHAR_EMPHASISMARK )).GetValue() );
- if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_RELIEF ) == SFX_ITEM_SET ) )
+ if ( bSearchInParent || ( rSet.GetItemState( EE_CHAR_RELIEF ) == SfxItemState::SET ) )
rFont.SetRelief( (FontRelief)((const SvxCharReliefItem&)rSet.Get( EE_CHAR_RELIEF )).GetValue() );
// If comparing the entire font, or if checking before each alteration
@@ -2621,11 +2621,11 @@ void EditDoc::FindAttribs( ContentNode* pNode, sal_Int32 nStartPos, sal_Int32 nE
if ( pItem )
{
sal_uInt16 nWhich = pItem->Which();
- if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_DEFAULT )
+ if ( rCurSet.GetItemState( nWhich ) == SfxItemState::DEFAULT )
{
rCurSet.Put( *pItem );
}
- else if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_SET )
+ else if ( rCurSet.GetItemState( nWhich ) == SfxItemState::SET )
{
const SfxPoolItem& rItem = rCurSet.Get( nWhich );
if ( rItem != *pItem )
@@ -2671,11 +2671,11 @@ void EditDoc::FindAttribs( ContentNode* pNode, sal_Int32 nStartPos, sal_Int32 nE
if ( pItem )
{
sal_uInt16 nWhich = pItem->Which();
- if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_DEFAULT )
+ if ( rCurSet.GetItemState( nWhich ) == SfxItemState::DEFAULT )
{
rCurSet.Put( *pItem );
}
- else if ( rCurSet.GetItemState( nWhich ) == SFX_ITEM_SET )
+ else if ( rCurSet.GetItemState( nWhich ) == SfxItemState::SET )
{
const SfxPoolItem& rItem = rCurSet.Get( nWhich );
if ( rItem != *pItem )
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 76553149976f..ed2be30b1fc8 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -1099,7 +1099,7 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const
// Symbols?
bool bSymbolPara = false;
- if (rC.GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_SET)
+ if (rC.GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SfxItemState::SET)
{
const SvxFontItem& rFontItem = (const SvxFontItem&)rC.GetParaAttribs().Get(EE_CHAR_FONTINFO);
if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL )
@@ -1148,7 +1148,7 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const
// StarSymbol as paragraph attribute or in StyleSheet?
FontToSubsFontConverter hConv = NULL;
- if (rC.GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_SET)
+ if (rC.GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SfxItemState::SET)
{
hConv = CreateFontToSubsFontConverter( ((const SvxFontItem&)rC.GetParaAttribs().Get( EE_CHAR_FONTINFO )).GetFamilyName(), FONTTOSUBSFONT_EXPORT | FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS );
}
@@ -1334,7 +1334,7 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
// FinishLoad will not be called in OpenOffice Calc, no StyleSheets...
bool bSymbolPara = false;
- if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_SET )
+ if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SfxItemState::SET )
{
const SvxFontItem& rFontItem = (const SvxFontItem&)pC->GetParaAttribs().Get( EE_CHAR_FONTINFO );
if ( rFontItem.GetCharSet() == RTL_TEXTENCODING_SYMBOL )
@@ -1390,7 +1390,7 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
// Convert StarMath and StarBats to StarSymbol
// Maybe old symbol font as paragraph attribute?
- if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SFX_ITEM_SET )
+ if ( pC->GetParaAttribs().GetItemState( EE_CHAR_FONTINFO ) == SfxItemState::SET )
{
const SvxFontItem& rFontItem = (const SvxFontItem&)pC->GetParaAttribs().Get( EE_CHAR_FONTINFO );
FontToSubsFontConverter hConv = CreateFontToSubsFontConverter( rFontItem.GetFamilyName(), FONTTOSUBSFONT_IMPORT | FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS );
@@ -1493,7 +1493,7 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
{
ContentInfo& rC = aContents[i];
const SvxLRSpaceItem& rLRSpace = static_cast<const SvxLRSpaceItem&>(rC.GetParaAttribs().Get(EE_PARA_LRSPACE));
- if ( rLRSpace.GetTxtLeft() && ( rC.GetParaAttribs().GetItemState( EE_PARA_TABS ) == SFX_ITEM_SET ) )
+ if ( rLRSpace.GetTxtLeft() && ( rC.GetParaAttribs().GetItemState( EE_PARA_TABS ) == SfxItemState::SET ) )
{
const SvxTabStopItem& rTabs = static_cast<const SvxTabStopItem&>(rC.GetParaAttribs().Get(EE_PARA_TABS));
SvxTabStopItem aNewTabs( 0, 0, SVX_TAB_ADJUST_LEFT, EE_PARA_TABS );
diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx
index 006131ce6ce3..765c73085c5f 100644
--- a/editeng/source/editeng/eertfpar.cxx
+++ b/editeng/source/editeng/eertfpar.cxx
@@ -309,7 +309,7 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
sal_uInt16 aFntHeightIems[3] = { EE_CHAR_FONTHEIGHT, EE_CHAR_FONTHEIGHT_CJK, EE_CHAR_FONTHEIGHT_CTL };
for (size_t i = 0; i < SAL_N_ELEMENTS(aFntHeightIems); ++i)
{
- if (SFX_ITEM_SET == rSet.GetAttrSet().GetItemState( aFntHeightIems[i], false, &pItem ))
+ if (SfxItemState::SET == rSet.GetAttrSet().GetItemState( aFntHeightIems[i], false, &pItem ))
{
sal_uInt32 nHeight = ((SvxFontHeightItem*)pItem)->GetHeight();
long nNewHeight;
@@ -321,7 +321,7 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
}
}
- if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState( EE_CHAR_ESCAPEMENT, false, &pItem ))
+ if( SfxItemState::SET == rSet.GetAttrSet().GetItemState( EE_CHAR_ESCAPEMENT, false, &pItem ))
{
// die richtige
long nEsc = ((SvxEscapementItem*)pItem)->GetEsc();
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index eed20d559b37..db404f03340e 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -487,7 +487,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
// Attribute, alos from Parent!
for ( sal_uInt16 nParAttr = EE_PARA_START; nParAttr <= EE_CHAR_END; nParAttr++ )
{
- if ( pStyle->GetItemSet().GetItemState( nParAttr ) == SFX_ITEM_SET )
+ if ( pStyle->GetItemSet().GetItemState( nParAttr ) == SfxItemState::SET )
{
const SfxPoolItem& rItem = pStyle->GetItemSet().Get( nParAttr );
WriteItemAsRTF( rItem, rOutput, 0, 0, aFontTable, aColorList );
@@ -565,7 +565,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
// Attribute, also from Parent!
for ( sal_uInt16 nParAttr = EE_PARA_START; nParAttr <= EE_CHAR_END; nParAttr++ )
{
- if ( pNode->GetStyleSheet()->GetItemSet().GetItemState( nParAttr ) == SFX_ITEM_SET )
+ if ( pNode->GetStyleSheet()->GetItemSet().GetItemState( nParAttr ) == SfxItemState::SET )
{
const SfxPoolItem& rItem = pNode->GetStyleSheet()->GetItemSet().Get( nParAttr );
WriteItemAsRTF( rItem, rOutput, nNode, 0, aFontTable, aColorList );
@@ -577,7 +577,7 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
for ( sal_uInt16 nParAttr = EE_PARA_START; nParAttr <= EE_CHAR_END; nParAttr++ )
{
// Now where stylesheet processing, only hard paragraph attributes!
- if ( pNode->GetContentAttribs().GetItems().GetItemState( nParAttr ) == SFX_ITEM_SET )
+ if ( pNode->GetContentAttribs().GetItems().GetItemState( nParAttr ) == SfxItemState::SET )
{
const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItems().Get( nParAttr );
WriteItemAsRTF( rItem, rOutput, nNode, 0, aFontTable, aColorList );
diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx
index f9ef3d0c0cc1..ec24083d0204 100644
--- a/editeng/source/editeng/impedit5.cxx
+++ b/editeng/source/editeng/impedit5.cxx
@@ -335,27 +335,27 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, EditEngineAttribs nOnl
// and then paragraph formatting and template...
for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
{
- if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_DEFAULT )
+ if ( aCurSet.GetItemState( nWhich ) == SfxItemState::DEFAULT )
{
if ( nOnlyHardAttrib == EditEngineAttribs_All )
{
const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItem( nWhich );
aCurSet.Put( rItem );
}
- else if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich ) == SFX_ITEM_SET )
+ else if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich ) == SfxItemState::SET )
{
const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItems().Get( nWhich );
aCurSet.Put( rItem );
}
}
- else if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_SET )
+ else if ( aCurSet.GetItemState( nWhich ) == SfxItemState::SET )
{
const SfxPoolItem* pItem = NULL;
if ( nOnlyHardAttrib == EditEngineAttribs_All )
{
pItem = &pNode->GetContentAttribs().GetItem( nWhich );
}
- else if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich ) == SFX_ITEM_SET )
+ else if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich ) == SfxItemState::SET )
{
pItem = &pNode->GetContentAttribs().GetItems().Get( nWhich );
}
@@ -381,7 +381,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, EditEngineAttribs nOnl
{
for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++ )
{
- if ( aCurSet.GetItemState( nWhich ) == SFX_ITEM_DEFAULT )
+ if ( aCurSet.GetItemState( nWhich ) == SfxItemState::DEFAULT )
{
aCurSet.Put( aEditDoc.GetItemPool().GetDefaultItem( nWhich ) );
}
@@ -504,9 +504,9 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, sal_
bool bCheckLanguage = false;
if ( GetStatus().DoOnlineSpelling() )
{
- bCheckLanguage = ( rSet.GetItemState( EE_CHAR_LANGUAGE ) == SFX_ITEM_SET ) ||
- ( rSet.GetItemState( EE_CHAR_LANGUAGE_CJK ) == SFX_ITEM_SET ) ||
- ( rSet.GetItemState( EE_CHAR_LANGUAGE_CTL ) == SFX_ITEM_SET );
+ bCheckLanguage = ( rSet.GetItemState( EE_CHAR_LANGUAGE ) == SfxItemState::SET ) ||
+ ( rSet.GetItemState( EE_CHAR_LANGUAGE_CJK ) == SfxItemState::SET ) ||
+ ( rSet.GetItemState( EE_CHAR_LANGUAGE_CTL ) == SfxItemState::SET );
}
// iterate over the paragraphs ...
@@ -527,7 +527,7 @@ void ImpEditEngine::SetAttribs( EditSelection aSel, const SfxItemSet& rSet, sal_
// Iterate over the Items...
for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++)
{
- if ( rSet.GetItemState( nWhich ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( nWhich ) == SfxItemState::SET )
{
const SfxPoolItem& rItem = rSet.Get( nWhich );
if ( nWhich <= EE_PARA_END )
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 3d9a744a4ba1..ebb8153064a0 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -3302,8 +3302,8 @@ const SfxPoolItem* SvxScriptSetItem::GetItemOfScriptSet(
{
const SfxPoolItem* pI;
SfxItemState eSt = rSet.GetItemState( nId, false, &pI );
- if( SFX_ITEM_SET != eSt )
- pI = SFX_ITEM_DEFAULT == eSt ? &rSet.Get( nId ) : 0;
+ if( SfxItemState::SET != eSt )
+ pI = SfxItemState::DEFAULT == eSt ? &rSet.Get( nId ) : 0;
return pI;
}
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 9791dcbf81ba..74aba0240aef 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -737,7 +737,7 @@ void Outliner::ImplSetLevelDependendStyleSheet( sal_Int32 nPara, SfxStyleSheet*
{
SfxItemSet aOldAttrs( GetParaAttribs( nPara ) );
SetStyleSheet( nPara, pNewStyle );
- if ( aOldAttrs.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_SET )
+ if ( aOldAttrs.GetItemState( EE_PARA_NUMBULLET ) == SfxItemState::SET )
{
SfxItemSet aAttrs( GetParaAttribs( nPara ) );
aAttrs.Put( aOldAttrs.Get( EE_PARA_NUMBULLET ) );
@@ -1235,7 +1235,7 @@ void Outliner::ImpTextPasted( sal_Int32 nStartPara, sal_Int32 nCount )
{
sal_Int16 nDepth = -1;
const SfxItemSet& rAttrs = pEditEngine->GetParaAttribs( nStartPara );
- if ( rAttrs.GetItemState( EE_PARA_OUTLLEVEL ) == SFX_ITEM_SET )
+ if ( rAttrs.GetItemState( EE_PARA_OUTLLEVEL ) == SfxItemState::SET )
{
const SfxInt16Item& rLevel = (const SfxInt16Item&) rAttrs.Get( EE_PARA_OUTLLEVEL );
nDepth = rLevel.GetValue();
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index 5f80f00b4425..3c3c0db7cf43 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -860,7 +860,7 @@ void OutlinerView::ToggleBullets()
if( nNewDepth == -1 )
{
const SfxItemSet& rAttrs = pOwner->GetParaAttribs( nPara );
- if ( rAttrs.GetItemState( EE_PARA_BULLETSTATE ) == SFX_ITEM_SET )
+ if ( rAttrs.GetItemState( EE_PARA_BULLETSTATE ) == SfxItemState::SET )
{
SfxItemSet aAttrs(rAttrs);
aAttrs.ClearItem( EE_PARA_BULLETSTATE );
@@ -1058,7 +1058,7 @@ void OutlinerView::ApplyBulletsNumbering(
{
const SfxPoolItem* pPoolItem=NULL;
SfxItemState eState = rAttrs.GetItemState(EE_PARA_NUMBULLET, false, &pPoolItem);
- if (eState != SFX_ITEM_SET)
+ if (eState != SfxItemState::SET)
{
// Use default value when has not contain bullet item.
ESelection aSelection(nPara, 0);
@@ -1137,7 +1137,7 @@ void OutlinerView::SwitchOffBulletsNumbering(
pOwner->SetDepth( pPara, -1 );
const SfxItemSet& rAttrs = pOwner->GetParaAttribs( nPara );
- if (rAttrs.GetItemState( EE_PARA_BULLETSTATE ) == SFX_ITEM_SET)
+ if (rAttrs.GetItemState( EE_PARA_BULLETSTATE ) == SfxItemState::SET)
{
SfxItemSet aAttrs(rAttrs);
aAttrs.ClearItem( EE_PARA_BULLETSTATE );
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index aca69abe84e9..eefc873a6f0f 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -804,7 +804,7 @@ ATTR_SETUNDERLINE:
{
SvxUnderlineItem aUL( UNDERLINE_SINGLE, PLAINID->nUnderline );
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState(
+ if( SfxItemState::SET == pSet->GetItemState(
PLAINID->nUnderline, false, &pItem ) )
{
// is switched off ?
@@ -899,7 +899,7 @@ ATTR_SETOVERLINE:
{
SvxOverlineItem aOL( UNDERLINE_SINGLE, PLAINID->nOverline );
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState(
+ if( SfxItemState::SET == pSet->GetItemState(
PLAINID->nOverline, false, &pItem ) )
{
// is switched off ?
@@ -1398,7 +1398,7 @@ void SvxRTFParser::ReadBorderAttr( int nToken, SfxItemSet& rSet,
// then read the border attribute
SvxBoxItem aAttr( PARDID->nBox );
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( PARDID->nBox, false, &pItem ) )
+ if( SfxItemState::SET == rSet.GetItemState( PARDID->nBox, false, &pItem ) )
aAttr = *(SvxBoxItem*)pItem;
SvxBorderLine aBrd( 0, DEF_LINE_WIDTH_0 ); // Simple plain line
@@ -1772,19 +1772,19 @@ void SvxRTFParser::RTFPardPlain( int bPard, SfxItemSet** ppSet )
pAkt->aAttrSet.Put( pDfltSet->Get( *pPtr ) );
else if( !pAkt->aAttrSet.GetParent() )
{
- if( SFX_ITEM_SET ==
+ if( SfxItemState::SET ==
pDfltSet->GetItemState( *pPtr, false, &pDef ))
pAkt->aAttrSet.Put( *pDef );
else
pAkt->aAttrSet.ClearItem( *pPtr );
}
- else if( SFX_ITEM_SET == pAkt->aAttrSet.GetParent()->
+ else if( SfxItemState::SET == pAkt->aAttrSet.GetParent()->
GetItemState( *pPtr, true, &pItem ) &&
*( pDef = &pDfltSet->Get( *pPtr )) != *pItem )
pAkt->aAttrSet.Put( *pDef );
else
{
- if( SFX_ITEM_SET ==
+ if( SfxItemState::SET ==
pDfltSet->GetItemState( *pPtr, false, &pDef ))
pAkt->aAttrSet.Put( *pDef );
else
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index 19ae8a8c451d..625028e0c721 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -865,7 +865,7 @@ void SvxRTFParser::_ClearStyleAttr( SvxRTFItemStackType& rStkType )
for( sal_uInt16 nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() )
{
if( SFX_WHICH_MAX > nWhich &&
- SFX_ITEM_SET == rSet.GetItemState( nWhich, false, &pItem ) &&
+ SfxItemState::SET == rSet.GetItemState( nWhich, false, &pItem ) &&
rPool.GetDefaultItem( nWhich ) == *pItem )
rSet.ClearItem( nWhich ); // delete
}
@@ -879,14 +879,14 @@ void SvxRTFParser::_ClearStyleAttr( SvxRTFItemStackType& rStkType )
const SfxPoolItem* pSItem;
for( sal_uInt16 nWhich = aIter.GetCurWhich(); nWhich; nWhich = aIter.NextWhich() )
{
- if( SFX_ITEM_SET == rStyleSet.GetItemState( nWhich, true, &pSItem ))
+ if( SfxItemState::SET == rStyleSet.GetItemState( nWhich, true, &pSItem ))
{
- if( SFX_ITEM_SET == rSet.GetItemState( nWhich, false, &pItem )
+ if( SfxItemState::SET == rSet.GetItemState( nWhich, false, &pItem )
&& *pItem == *pSItem )
rSet.ClearItem( nWhich ); // delete
}
else if( SFX_WHICH_MAX > nWhich &&
- SFX_ITEM_SET == rSet.GetItemState( nWhich, false, &pItem ) &&
+ SfxItemState::SET == rSet.GetItemState( nWhich, false, &pItem ) &&
rPool.GetDefaultItem( nWhich ) == *pItem )
rSet.ClearItem( nWhich ); // delete
}
@@ -916,7 +916,7 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack
const SfxPoolItem* pItem = aIter.GetCurItem(), *pGet;
while( true )
{
- if( SFX_ITEM_SET == pAkt->aAttrSet.GetItemState(
+ if( SfxItemState::SET == pAkt->aAttrSet.GetItemState(
pItem->Which(), false, &pGet ) &&
*pItem == *pGet )
pOld->aAttrSet.ClearItem( pItem->Which() );
@@ -1290,7 +1290,7 @@ void SvxRTFItemStackType::Compress( const SvxRTFParser& rParser )
const SfxPoolItem* pItem;
do {
sal_uInt16 nWhich = aIter.GetCurItem()->Which();
- if( SFX_ITEM_SET != pTmp->aAttrSet.GetItemState( nWhich,
+ if( SfxItemState::SET != pTmp->aAttrSet.GetItemState( nWhich,
false, &pItem ) || *pItem != *aIter.GetCurItem() )
aMrgSet.ClearItem( nWhich );
@@ -1337,7 +1337,7 @@ void SvxRTFItemStackType::SetRTFDefaults( const SfxItemSet& rDefaults )
SfxItemIter aIter( rDefaults );
do {
sal_uInt16 nWhich = aIter.GetCurItem()->Which();
- if( SFX_ITEM_SET != aAttrSet.GetItemState( nWhich, false ))
+ if( SfxItemState::SET != aAttrSet.GetItemState( nWhich, false ))
aAttrSet.Put( *aIter.GetCurItem() );
if( aIter.IsAtEnd() )
diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx
index 88cda6625658..6b39f0a3095c 100644
--- a/editeng/source/uno/unofored.cxx
+++ b/editeng/source/uno/unofored.cxx
@@ -97,7 +97,7 @@ SfxItemSet SvxEditEngineForwarder::GetParaAttribs( sal_Int32 nPara ) const
sal_uInt16 nWhich = EE_PARA_START;
while( nWhich <= EE_PARA_END )
{
- if( aSet.GetItemState( nWhich, true ) != SFX_ITEM_SET )
+ if( aSet.GetItemState( nWhich, true ) != SfxItemState::SET )
{
if( rEditEngine.HasParaAttrib( nPara, nWhich ) )
aSet.Put( rEditEngine.GetParaAttrib( nPara, nWhich ) );
@@ -171,12 +171,12 @@ SfxItemState GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelectio
const SfxPoolItem* pLastItem = NULL;
- SfxItemState eState = SFX_ITEM_DEFAULT;
+ SfxItemState eState = SfxItemState::DEFAULT;
// check all paragraphs inside the selection
for( sal_Int32 nPara = rSel.nStartPara; nPara <= rSel.nEndPara; nPara++ )
{
- SfxItemState eParaState = SFX_ITEM_DEFAULT;
+ SfxItemState eParaState = SfxItemState::DEFAULT;
// calculate start and endpos for this paragraph
sal_Int32 nPos = 0;
@@ -218,7 +218,7 @@ SfxItemState GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelectio
{
// ... and its different to this one than the state is dont care
if(*pParaItem != *(i->pAttr))
- return SFX_ITEM_DONTCARE;
+ return SfxItemState::DONTCARE;
}
else
pParaItem = i->pAttr;
@@ -236,17 +236,17 @@ SfxItemState GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelectio
bGaps = true;
if( bEmpty )
- eParaState = SFX_ITEM_DEFAULT;
+ eParaState = SfxItemState::DEFAULT;
else if( bGaps )
- eParaState = SFX_ITEM_DONTCARE;
+ eParaState = SfxItemState::DONTCARE;
else
- eParaState = SFX_ITEM_SET;
+ eParaState = SfxItemState::SET;
// if we already found an item check if we found the same
if( pLastItem )
{
if( (pParaItem == NULL) || (*pLastItem != *pParaItem) )
- return SFX_ITEM_DONTCARE;
+ return SfxItemState::DONTCARE;
}
else
{
diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx
index c8c66b8127b3..b6fc8efc522f 100644
--- a/editeng/source/uno/unoipset.cxx
+++ b/editeng/source/uno/unoipset.cxx
@@ -153,7 +153,7 @@ void SvxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry* pMa
SfxItemPool* pPool = rSet.GetPool();
// Put UnoAny in the item value
- if(eState < SFX_ITEM_DEFAULT || pItem == NULL)
+ if(eState < SfxItemState::DEFAULT || pItem == NULL)
{
if( pPool == NULL )
{
@@ -220,7 +220,7 @@ uno::Any SvxItemPropertySet::getPropertyValue( const SfxItemPropertySimpleEntry*
{
const SfxPoolItem* pItem = NULL;
SfxItemState eState = aSet.GetItemState( pMap->nWID, true, &pItem );
- if(eState >= SFX_ITEM_DEFAULT && pItem)
+ if(eState >= SfxItemState::DEFAULT && pItem)
{
pItem->QueryValue( aVal, nMemberId );
((SvxItemPropertySet*)this)->AddUsrAnyForID(aVal, pMap->nWID);
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 135448b46906..77b9267a7180 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -644,7 +644,7 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertySimpleEntry* pM
switch( pMap->nWID )
{
case EE_FEATURE_FIELD:
- if ( rSet.GetItemState( EE_FEATURE_FIELD, false ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( EE_FEATURE_FIELD, false ) == SfxItemState::SET )
{
SvxFieldItem* pItem = (SvxFieldItem*)rSet.GetItem( EE_FEATURE_FIELD );
const SvxFieldData* pData = pItem->GetField();
@@ -666,7 +666,7 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertySimpleEntry* pM
break;
case WID_PORTIONTYPE:
- if ( rSet.GetItemState( EE_FEATURE_FIELD, false ) == SFX_ITEM_SET )
+ if ( rSet.GetItemState( EE_FEATURE_FIELD, false ) == SfxItemState::SET )
{
OUString aType("TextField");
rAny <<= aType;
@@ -700,7 +700,7 @@ bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const SfxIt
case EE_PARA_NUMBULLET:
{
SfxItemState eState = rSet.GetItemState( EE_PARA_NUMBULLET, true );
- if( eState != SFX_ITEM_SET && eState != SFX_ITEM_DEFAULT)
+ if( eState != SfxItemState::SET && eState != SfxItemState::DEFAULT)
throw uno::RuntimeException();
SvxNumBulletItem* pBulletItem = (SvxNumBulletItem*)rSet.GetItem( EE_PARA_NUMBULLET, true );
@@ -742,7 +742,7 @@ bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const SfxIt
{
bool bState = false;
SfxItemState eState = rSet.GetItemState( EE_PARA_BULLETSTATE, true );
- if( eState == SFX_ITEM_SET || eState == SFX_ITEM_DEFAULT )
+ if( eState == SfxItemState::SET || eState == SfxItemState::DEFAULT )
{
SfxBoolItem* pItem = (SfxBoolItem*)rSet.GetItem( EE_PARA_BULLETSTATE, true );
bState = pItem->GetValue() ? sal_True : sal_False;
@@ -823,7 +823,7 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< OUSt
if( pMap->nWID >= EE_ITEMS_START && pMap->nWID <= EE_ITEMS_END )
{
const SfxPoolItem* pItem;
- if( pNewAttrSet->GetItemState( pMap->nWID, true, &pItem ) == SFX_ITEM_SET )
+ if( pNewAttrSet->GetItemState( pMap->nWID, true, &pItem ) == SfxItemState::SET )
{
pOldAttrSet->Put( *pItem );
}
@@ -843,7 +843,7 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< OUSt
if( pMap->nWID >= EE_ITEMS_START && pMap->nWID <= EE_ITEMS_END )
{
const SfxPoolItem* pItem;
- if( pNewParaSet->GetItemState( pMap->nWID, true, &pItem ) == SFX_ITEM_SET )
+ if( pNewParaSet->GetItemState( pMap->nWID, true, &pItem ) == SfxItemState::SET )
{
pOldParaSet->Put( *pItem );
}
@@ -965,7 +965,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt
SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL;
if( pForwarder )
{
- SfxItemState eItemState = SFX_ITEM_UNKNOWN;
+ SfxItemState eItemState = SfxItemState::UNKNOWN;
sal_uInt16 nWID = 0;
switch( pMap->nWID )
@@ -973,7 +973,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt
case WID_FONTDESC:
{
const sal_uInt16* pWhichId = aSvxUnoFontDescriptorWhichMap;
- SfxItemState eTempItemState = SFX_ITEM_UNKNOWN;
+ SfxItemState eTempItemState = SfxItemState::UNKNOWN;
while( *pWhichId )
{
if(nPara != -1)
@@ -983,25 +983,25 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt
switch( eTempItemState )
{
- case SFX_ITEM_DISABLED:
- case SFX_ITEM_DONTCARE:
- eItemState = SFX_ITEM_DONTCARE;
+ case SfxItemState::DISABLED:
+ case SfxItemState::DONTCARE:
+ eItemState = SfxItemState::DONTCARE;
break;
- case SFX_ITEM_DEFAULT:
- if( eItemState != SFX_ITEM_DEFAULT )
+ case SfxItemState::DEFAULT:
+ if( eItemState != SfxItemState::DEFAULT )
{
- if( eItemState == SFX_ITEM_UNKNOWN )
- eItemState = SFX_ITEM_DEFAULT;
+ if( eItemState == SfxItemState::UNKNOWN )
+ eItemState = SfxItemState::DEFAULT;
}
break;
- case SFX_ITEM_READONLY:
- case SFX_ITEM_SET:
- if( eItemState != SFX_ITEM_SET )
+ case SfxItemState::READONLY:
+ case SfxItemState::SET:
+ if( eItemState != SfxItemState::SET )
{
- if( eItemState == SFX_ITEM_UNKNOWN )
- eItemState = SFX_ITEM_SET;
+ if( eItemState == SfxItemState::UNKNOWN )
+ eItemState = SfxItemState::SET;
}
break;
default:
@@ -1016,7 +1016,7 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt
case WID_NUMLEVEL:
case WID_NUMBERINGSTARTVALUE:
case WID_PARAISNUMBERINGRESTART:
- eItemState = SFX_ITEM_SET;
+ eItemState = SfxItemState::SET;
break;
default:
@@ -1033,16 +1033,16 @@ beans::PropertyState SAL_CALL SvxUnoTextRangeBase::_getPropertyState(const SfxIt
switch( eItemState )
{
- case SFX_ITEM_DONTCARE:
- case SFX_ITEM_DISABLED:
+ case SfxItemState::DONTCARE:
+ case SfxItemState::DISABLED:
return beans::PropertyState_AMBIGUOUS_VALUE;
- case SFX_ITEM_READONLY:
- case SFX_ITEM_SET:
+ case SfxItemState::READONLY:
+ case SfxItemState::SET:
return beans::PropertyState_DIRECT_VALUE;
- case SFX_ITEM_DEFAULT:
+ case SfxItemState::DEFAULT:
return beans::PropertyState_DEFAULT_VALUE;
default: break;
-// case SFX_ITEM_UNKNOWN:
+// case SfxItemState::UNKNOWN:
}
}
}
@@ -1113,7 +1113,7 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const Sf
bool bUnknownPropertyFound = false;
if(pSet && pMap)
{
- SfxItemState eItemState = SFX_ITEM_UNKNOWN;
+ SfxItemState eItemState = SfxItemState::UNKNOWN;
sal_uInt16 nWID = 0;
switch( pMap->nWID )
@@ -1121,32 +1121,32 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const Sf
case WID_FONTDESC:
{
const sal_uInt16* pWhichId = aSvxUnoFontDescriptorWhichMap;
- SfxItemState eTempItemState = SFX_ITEM_UNKNOWN;
+ SfxItemState eTempItemState = SfxItemState::UNKNOWN;
while( *pWhichId )
{
eTempItemState = pSet->GetItemState( *pWhichId );
switch( eTempItemState )
{
- case SFX_ITEM_DISABLED:
- case SFX_ITEM_DONTCARE:
- eItemState = SFX_ITEM_DONTCARE;
+ case SfxItemState::DISABLED:
+ case SfxItemState::DONTCARE:
+ eItemState = SfxItemState::DONTCARE;
break;
- case SFX_ITEM_DEFAULT:
- if( eItemState != SFX_ITEM_DEFAULT )
+ case SfxItemState::DEFAULT:
+ if( eItemState != SfxItemState::DEFAULT )
{
- if( eItemState == SFX_ITEM_UNKNOWN )
- eItemState = SFX_ITEM_DEFAULT;
+ if( eItemState == SfxItemState::UNKNOWN )
+ eItemState = SfxItemState::DEFAULT;
}
break;
- case SFX_ITEM_READONLY:
- case SFX_ITEM_SET:
- if( eItemState != SFX_ITEM_SET )
+ case SfxItemState::READONLY:
+ case SfxItemState::SET:
+ if( eItemState != SfxItemState::SET )
{
- if( eItemState == SFX_ITEM_UNKNOWN )
- eItemState = SFX_ITEM_SET;
+ if( eItemState == SfxItemState::UNKNOWN )
+ eItemState = SfxItemState::SET;
}
break;
default:
@@ -1162,7 +1162,7 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const Sf
case WID_NUMLEVEL:
case WID_NUMBERINGSTARTVALUE:
case WID_PARAISNUMBERINGRESTART:
- eItemState = SFX_ITEM_SET;
+ eItemState = SfxItemState::SET;
break;
default:
@@ -1177,16 +1177,16 @@ bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const Sf
switch( eItemState )
{
- case SFX_ITEM_READONLY:
- case SFX_ITEM_SET:
+ case SfxItemState::READONLY:
+ case SfxItemState::SET:
rState = beans::PropertyState_DIRECT_VALUE;
break;
- case SFX_ITEM_DEFAULT:
+ case SfxItemState::DEFAULT:
rState = beans::PropertyState_DEFAULT_VALUE;
break;
-// case SFX_ITEM_UNKNOWN:
-// case SFX_ITEM_DONTCARE:
-// case SFX_ITEM_DISABLED:
+// case SfxItemState::UNKNOWN:
+// case SfxItemState::DONTCARE:
+// case SfxItemState::DISABLED:
default:
rState = beans::PropertyState_AMBIGUOUS_VALUE;
}
@@ -2430,12 +2430,12 @@ void SvxDummyTextSource::GetPortions( sal_Int32, std::vector<sal_Int32>& ) const
SfxItemState SvxDummyTextSource::GetItemState( const ESelection&, sal_uInt16 ) const
{
- return SFX_ITEM_UNKNOWN;
+ return SfxItemState::UNKNOWN;
}
SfxItemState SvxDummyTextSource::GetItemState( sal_Int32, sal_uInt16 ) const
{
- return SFX_ITEM_UNKNOWN;
+ return SfxItemState::UNKNOWN;
}
SfxItemPool* SvxDummyTextSource::GetPool() const