diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-23 12:26:18 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-08-24 08:47:57 +0200 |
commit | 92743c1da67485338aadfc9e9444146f9bacd6d1 (patch) | |
tree | e0b858d6f41a5bac900b2ee046dd17c68524f820 /svx/source | |
parent | 44b2afa192fbf78d337cf18840c26b7d04e91a4e (diff) |
convert SdrFitToSizeType to scoped enum
Change-Id: Id732c74b590db7006058d1919be2438b649a795e
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdattr.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdfmtf.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdibrow.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 6 | ||||
-rw-r--r-- | svx/source/toolbars/fontworkbar.cxx | 8 |
6 files changed, 12 insertions, 12 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 989d329cdd7e..def4e5bae4f8 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -433,7 +433,7 @@ void GetFontWorkOutline( FWData& rFWData, const SdrObject* pCustomShape ) while ( aTextAreaIter != aTextAreaIEnd ) { GetTextAreaOutline( rFWData, pCustomShape, *aTextAreaIter, bSameLetterHeights ); - if ( eFTS == SDRTEXTFIT_ALLLINES ) + if ( eFTS == SdrFitToSizeType::AllLines ) { std::vector< FWParagraphData >::iterator aParagraphIter( aTextAreaIter->vParagraphs.begin() ); std::vector< FWParagraphData >::const_iterator aParagraphIEnd( aTextAreaIter->vParagraphs.end() ); diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index b9563d0f9f28..4b3eba91870f 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -1047,11 +1047,11 @@ bool SdrTextFitToSizeTypeItem::GetPresentation(SfxItemPresentation ePres, bool SdrTextFitToSizeTypeItem::HasBoolValue() const { return true; } -bool SdrTextFitToSizeTypeItem::GetBoolValue() const { return GetValue()!=SDRTEXTFIT_NONE; } +bool SdrTextFitToSizeTypeItem::GetBoolValue() const { return GetValue()!=SdrFitToSizeType::NONE; } void SdrTextFitToSizeTypeItem::SetBoolValue(bool bVal) { - SetValue(sal::static_int_cast< sal_uInt16 >(bVal ? SDRTEXTFIT_PROPORTIONAL : SDRTEXTFIT_NONE)); + SetValue(sal::static_int_cast< sal_uInt16 >(bVal ? SdrFitToSizeType::Proportional : SdrFitToSizeType::NONE)); } bool SdrTextFitToSizeTypeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 42027a423a4f..146eaab14b38 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -1009,7 +1009,7 @@ void ImpSdrGDIMetaFileImport::ImportText( const Point& rPos, const OUString& rSt pText->ClearMergedItem( SDRATTR_TEXT_AUTOGROWWIDTH ); pText->SetMergedItem( makeSdrTextAutoGrowHeightItem( false ) ); // don't let the margins eat the space needed for the text - pText->SetMergedItem( SdrTextFitToSizeTypeItem( SDRTEXTFIT_ALLLINES ) ); + pText->SetMergedItem( SdrTextFitToSizeTypeItem( SdrFitToSizeType::AllLines ) ); } else { diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index 5f373c7bbb85..0c4e458f5ee8 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -799,7 +799,7 @@ bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rI case SDRATTR_TEXT_HORZADJUST: { if (ImpGetItem(*pSet,SDRATTR_TEXT_FITTOSIZE,pItem)) { SdrFitToSizeType eFit=static_cast<const SdrTextFitToSizeTypeItem*>(pItem)->GetValue(); - if (eFit!=SDRTEXTFIT_NONE) return true; + if (eFit!=SdrFitToSizeType::NONE) return true; } } break; diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index ddf5295951c1..54dda65b2f49 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1481,7 +1481,7 @@ void SdrTextObj::RestGeoData(const SdrObjGeoData& rGeo) SdrFitToSizeType SdrTextObj::GetFitToSize() const { - SdrFitToSizeType eType = SDRTEXTFIT_NONE; + SdrFitToSizeType eType = SdrFitToSizeType::NONE; if(!IsAutoGrowWidth()) eType = static_cast<const SdrTextFitToSizeTypeItem&>(GetObjectItem(SDRATTR_TEXT_FITTOSIZE)).GetValue(); @@ -1911,13 +1911,13 @@ GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle( // Access to TextAnimationAllowed flag bool SdrTextObj::IsAutoFit() const { - return GetFitToSize()==SDRTEXTFIT_AUTOFIT; + return GetFitToSize()==SdrFitToSizeType::Autofit; } bool SdrTextObj::IsFitToSize() const { const SdrFitToSizeType eFit=GetFitToSize(); - return (eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES); + return (eFit==SdrFitToSizeType::Proportional || eFit==SdrFitToSizeType::AllLines); } void SdrTextObj::SetTextAnimationAllowed(bool bNew) diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx index 07b688e84b8f..0dcad4f989a2 100644 --- a/svx/source/toolbars/fontworkbar.cxx +++ b/svx/source/toolbars/fontworkbar.cxx @@ -69,9 +69,9 @@ void SetAlignmentState( SdrView* pSdrView, SfxItemSet& rSet ) case SDRTEXTHORZADJUST_RIGHT : nAlignment = 2; break; case SDRTEXTHORZADJUST_BLOCK : { - if ( rTextFitToSizeTypeItem.GetValue() == SDRTEXTFIT_NONE ) + if ( rTextFitToSizeTypeItem.GetValue() == SdrFitToSizeType::NONE ) nAlignment = 3; - else if ( rTextFitToSizeTypeItem.GetValue() == SDRTEXTFIT_ALLLINES ) + else if ( rTextFitToSizeTypeItem.GetValue() == SdrFitToSizeType::AllLines ) nAlignment = 4; } } @@ -271,11 +271,11 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem sal_Int32 nValue = static_cast<const SfxInt32Item*>(rReq.GetArgs()->GetItem(SID_FONTWORK_ALIGNMENT))->GetValue(); if ( ( nValue >= 0 ) && ( nValue < 5 ) ) { - SdrFitToSizeType eFTS = SDRTEXTFIT_NONE; + SdrFitToSizeType eFTS = SdrFitToSizeType::NONE; SdrTextHorzAdjust eHorzAdjust; switch ( nValue ) { - case 4 : eFTS = SDRTEXTFIT_ALLLINES; SAL_FALLTHROUGH; + case 4 : eFTS = SdrFitToSizeType::AllLines; SAL_FALLTHROUGH; case 3 : eHorzAdjust = SDRTEXTHORZADJUST_BLOCK; break; default: eHorzAdjust = SDRTEXTHORZADJUST_LEFT; break; case 1 : eHorzAdjust = SDRTEXTHORZADJUST_CENTER; break; |