summaryrefslogtreecommitdiff
path: root/editeng/source/uno
diff options
context:
space:
mode:
Diffstat (limited to 'editeng/source/uno')
-rw-r--r--editeng/source/uno/unofored.cxx16
-rw-r--r--editeng/source/uno/unoipset.cxx4
-rw-r--r--editeng/source/uno/unotext.cxx100
3 files changed, 60 insertions, 60 deletions
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