diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-16 11:44:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-16 12:42:04 +0200 |
commit | 4e19742382708a691c6f62c47744fd2fa663216c (patch) | |
tree | 15f47d1b0ef832cdd34e6cad81eae69c3e5ccd64 /editeng | |
parent | 1c3de19e9892deabd7ed2f47afbdf86f292eff8f (diff) |
convert EditEngineAttribs to scoped enum
and drop unused EditEngineAttribs_HardAndPara enumerator
Change-Id: Ic1fcddc6adeb5317f96bcef9b6f715b26d901a8d
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 2 | ||||
-rw-r--r-- | editeng/source/editeng/impedit5.cxx | 8 | ||||
-rw-r--r-- | editeng/source/uno/unofored.cxx | 7 | ||||
-rw-r--r-- | editeng/source/uno/unoforou.cxx | 11 | ||||
-rw-r--r-- | editeng/source/uno/unotext.cxx | 2 |
5 files changed, 12 insertions, 18 deletions
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index bc42f55d45af..d9ec4848cf2a 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -819,7 +819,7 @@ public: sal_uInt32 GetParaHeight( sal_Int32 nParagraph ); SfxItemSet GetAttribs( sal_Int32 nPara, sal_Int32 nStart, sal_Int32 nEnd, GetAttribsFlags nFlags = GetAttribsFlags::ALL ) const; - SfxItemSet GetAttribs( EditSelection aSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs_All ); + SfxItemSet GetAttribs( EditSelection aSel, EditEngineAttribs nOnlyHardAttrib = EditEngineAttribs::All ); void SetAttribs( EditSelection aSel, const SfxItemSet& rSet, SetAttribsMode nSpecial = SetAttribsMode::NONE ); void RemoveCharAttribs( EditSelection aSel, bool bRemoveParaAttribs, sal_uInt16 nWhich ); void RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich = 0, bool bRemoveFeatures = false ); diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx index f0892252e756..edf94a0efd39 100644 --- a/editeng/source/editeng/impedit5.cxx +++ b/editeng/source/editeng/impedit5.cxx @@ -337,14 +337,14 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, EditEngineAttribs nOnl // First the very hard formatting ... EditDoc::FindAttribs( pNode, nStartPos, nEndPos, aCurSet ); - if( nOnlyHardAttrib != EditEngineAttribs_OnlyHard ) + if( nOnlyHardAttrib != EditEngineAttribs::OnlyHard ) { // and then paragraph formatting and template... for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++) { if ( aCurSet.GetItemState( nWhich ) == SfxItemState::DEFAULT ) { - if ( nOnlyHardAttrib == EditEngineAttribs_All ) + if ( nOnlyHardAttrib == EditEngineAttribs::All ) { const SfxPoolItem& rItem = pNode->GetContentAttribs().GetItem( nWhich ); aCurSet.Put( rItem ); @@ -358,7 +358,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, EditEngineAttribs nOnl else if ( aCurSet.GetItemState( nWhich ) == SfxItemState::SET ) { const SfxPoolItem* pItem = nullptr; - if ( nOnlyHardAttrib == EditEngineAttribs_All ) + if ( nOnlyHardAttrib == EditEngineAttribs::All ) { pItem = &pNode->GetContentAttribs().GetItem( nWhich ); } @@ -384,7 +384,7 @@ SfxItemSet ImpEditEngine::GetAttribs( EditSelection aSel, EditEngineAttribs nOnl } // fill empty slots with defaults ... - if ( nOnlyHardAttrib == EditEngineAttribs_All ) + if ( nOnlyHardAttrib == EditEngineAttribs::All ) { for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++ ) { diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx index 47f7afd5a734..8f7683e995a6 100644 --- a/editeng/source/uno/unofored.cxx +++ b/editeng/source/uno/unofored.cxx @@ -68,13 +68,10 @@ SfxItemSet SvxEditEngineForwarder::GetAttribs( const ESelection& rSel, EditEngin GetAttribsFlags nFlags = GetAttribsFlags::NONE; switch( nOnlyHardAttrib ) { - case EditEngineAttribs_All: + case EditEngineAttribs::All: nFlags = GetAttribsFlags::ALL; break; - case EditEngineAttribs_HardAndPara: - nFlags = GetAttribsFlags::PARAATTRIBS|GetAttribsFlags::CHARATTRIBS; - break; - case EditEngineAttribs_OnlyHard: + case EditEngineAttribs::OnlyHard: nFlags = GetAttribsFlags::CHARATTRIBS; break; default: diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx index c41bdac93a8a..1fa359a8c7b4 100644 --- a/editeng/source/uno/unoforou.cxx +++ b/editeng/source/uno/unoforou.cxx @@ -79,13 +79,10 @@ static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, EditE switch( nOnlyHardAttrib ) { - case EditEngineAttribs_All: + case EditEngineAttribs::All: nFlags = GetAttribsFlags::ALL; break; - case EditEngineAttribs_HardAndPara: - nFlags = GetAttribsFlags::PARAATTRIBS|GetAttribsFlags::CHARATTRIBS; - break; - case EditEngineAttribs_OnlyHard: + case EditEngineAttribs::OnlyHard: nFlags = GetAttribsFlags::CHARATTRIBS; break; default: @@ -101,7 +98,7 @@ static SfxItemSet ImplOutlinerForwarderGetAttribs( const ESelection& rSel, EditE SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, EditEngineAttribs nOnlyHardAttrib ) const { - if( mpAttribsCache && ( EditEngineAttribs_All == nOnlyHardAttrib ) ) + if( mpAttribsCache && ( EditEngineAttribs::All == nOnlyHardAttrib ) ) { // have we the correct set in cache? if( const_cast<SvxOutlinerForwarder*>(this)->maAttribCacheSelection.IsEqual(rSel) ) @@ -123,7 +120,7 @@ SfxItemSet SvxOutlinerForwarder::GetAttribs( const ESelection& rSel, EditEngineA SfxItemSet aSet( ImplOutlinerForwarderGetAttribs( rSel, nOnlyHardAttrib, rEditEngine ) ); - if( EditEngineAttribs_All == nOnlyHardAttrib ) + if( EditEngineAttribs::All == nOnlyHardAttrib ) { mpAttribsCache = new SfxItemSet( aSet ); maAttribCacheSelection = rSel; diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index f3fe061c6f75..17e4560ce4b0 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -1066,7 +1066,7 @@ uno::Sequence< beans::PropertyState > SvxUnoTextRangeBase::_getPropertyStates(co { ESelection aSel( GetSelection() ); CheckSelection( aSel, pForwarder ); - pSet = new SfxItemSet( pForwarder->GetAttribs( aSel, EditEngineAttribs_OnlyHard ) ); + pSet = new SfxItemSet( pForwarder->GetAttribs( aSel, EditEngineAttribs::OnlyHard ) ); } bool bUnknownPropertyFound = false; |