diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-10-18 12:28:45 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-10-18 12:34:03 +0200 |
commit | e2c85365dfa40c03c6ea04023627366d118bb530 (patch) | |
tree | 55e6c673869f4278e17cd83bea04bb782a2519d0 /svx | |
parent | 8304de4701eca8a41f0dd70c84e437707cbb43cf (diff) |
svx: remove pointless duplicate SdrFitToSizeType
Change-Id: I7a59ecfdb8d09ecbc0b760003dbc453ac5646d1c
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdattr.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdfmtf.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdibrow.cxx | 5 | ||||
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 11 | ||||
-rw-r--r-- | svx/source/toolbars/fontworkbar.cxx | 8 |
6 files changed, 19 insertions, 17 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 0aca12a4667f..486dd9aff0a7 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -416,7 +416,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F void GetFontWorkOutline( FWData& rFWData, const SdrObject* pCustomShape ) { SdrTextHorzAdjust eHorzAdjust( static_cast<const SdrTextHorzAdjustItem&>(pCustomShape->GetMergedItem( SDRATTR_TEXT_HORZADJUST )).GetValue() ); - SdrFitToSizeType eFTS( static_cast<const SdrTextFitToSizeTypeItem&>(pCustomShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE )).GetValue() ); + drawing::TextFitToSizeType const eFTS( static_cast<const SdrTextFitToSizeTypeItem&>(pCustomShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE )).GetValue() ); std::vector< FWTextArea >::iterator aTextAreaIter = rFWData.vTextAreas.begin(); std::vector< FWTextArea >::const_iterator aTextAreaIEnd = rFWData.vTextAreas.end(); @@ -433,7 +433,7 @@ void GetFontWorkOutline( FWData& rFWData, const SdrObject* pCustomShape ) while ( aTextAreaIter != aTextAreaIEnd ) { GetTextAreaOutline( rFWData, pCustomShape, *aTextAreaIter, bSameLetterHeights ); - if ( eFTS == SdrFitToSizeType::AllLines ) + if (eFTS == drawing::TextFitToSizeType_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 0a6d5a791472..583df3f853de 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -960,11 +960,11 @@ bool SdrTextFitToSizeTypeItem::GetPresentation(SfxItemPresentation ePres, bool SdrTextFitToSizeTypeItem::HasBoolValue() const { return true; } -bool SdrTextFitToSizeTypeItem::GetBoolValue() const { return GetValue()!=SdrFitToSizeType::NONE; } +bool SdrTextFitToSizeTypeItem::GetBoolValue() const { return GetValue() != drawing::TextFitToSizeType_NONE; } void SdrTextFitToSizeTypeItem::SetBoolValue(bool bVal) { - SetValue(bVal ? SdrFitToSizeType::Proportional : SdrFitToSizeType::NONE); + SetValue((bVal) ? drawing::TextFitToSizeType_PROPORTIONAL : drawing::TextFitToSizeType_NONE); } bool SdrTextFitToSizeTypeItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/) const @@ -987,7 +987,7 @@ bool SdrTextFitToSizeTypeItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemb eFS = (drawing::TextFitToSizeType) nEnum; } - SetValue( (SdrFitToSizeType)eFS ); + SetValue(eFS); return true; } diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 11d01ed01c3d..60fe1ed4c867 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -1001,7 +1001,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( SdrFitToSizeType::AllLines ) ); + pText->SetMergedItem( SdrTextFitToSizeTypeItem(drawing::TextFitToSizeType_ALLLINES) ); } else { diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index 5fdc614b7a10..cf739d14adca 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -776,8 +776,9 @@ bool IsItemIneffective(sal_uInt16 nWhich, const SfxItemSet* pSet, sal_uInt16& rI case SDRATTR_TEXT_VERTADJUST: case SDRATTR_TEXT_HORZADJUST: { if (ImpGetItem(*pSet,SDRATTR_TEXT_FITTOSIZE,pItem)) { - SdrFitToSizeType eFit=static_cast<const SdrTextFitToSizeTypeItem*>(pItem)->GetValue(); - if (eFit!=SdrFitToSizeType::NONE) return true; + drawing::TextFitToSizeType const eFit = + static_cast<const SdrTextFitToSizeTypeItem*>(pItem)->GetValue(); + if (eFit != drawing::TextFitToSizeType_NONE) { return true; } } } break; diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 5d05b813d21c..0664ccb84a61 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1466,9 +1466,9 @@ void SdrTextObj::RestGeoData(const SdrObjGeoData& rGeo) SetTextSizeDirty(); } -SdrFitToSizeType SdrTextObj::GetFitToSize() const +drawing::TextFitToSizeType SdrTextObj::GetFitToSize() const { - SdrFitToSizeType eType = SdrFitToSizeType::NONE; + drawing::TextFitToSizeType eType = drawing::TextFitToSizeType_NONE; if(!IsAutoGrowWidth()) eType = static_cast<const SdrTextFitToSizeTypeItem&>(GetObjectItem(SDRATTR_TEXT_FITTOSIZE)).GetValue(); @@ -1898,13 +1898,14 @@ GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle( // Access to TextAnimationAllowed flag bool SdrTextObj::IsAutoFit() const { - return GetFitToSize()==SdrFitToSizeType::Autofit; + return GetFitToSize() == drawing::TextFitToSizeType_AUTOFIT; } bool SdrTextObj::IsFitToSize() const { - const SdrFitToSizeType eFit=GetFitToSize(); - return (eFit==SdrFitToSizeType::Proportional || eFit==SdrFitToSizeType::AllLines); + const drawing::TextFitToSizeType eFit = GetFitToSize(); + return (eFit == drawing::TextFitToSizeType_PROPORTIONAL + || eFit == drawing::TextFitToSizeType_ALLLINES); } void SdrTextObj::SetTextAnimationAllowed(bool bNew) diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx index 0522b5d927da..71a2c5653a92 100644 --- a/svx/source/toolbars/fontworkbar.cxx +++ b/svx/source/toolbars/fontworkbar.cxx @@ -73,9 +73,9 @@ void SetAlignmentState( SdrView const * pSdrView, SfxItemSet& rSet ) case SDRTEXTHORZADJUST_RIGHT : nAlignment = 2; break; case SDRTEXTHORZADJUST_BLOCK : { - if ( rTextFitToSizeTypeItem.GetValue() == SdrFitToSizeType::NONE ) + if (rTextFitToSizeTypeItem.GetValue() == drawing::TextFitToSizeType_NONE) nAlignment = 3; - else if ( rTextFitToSizeTypeItem.GetValue() == SdrFitToSizeType::AllLines ) + else if (rTextFitToSizeTypeItem.GetValue() == drawing::TextFitToSizeType_ALLLINES) nAlignment = 4; } } @@ -271,11 +271,11 @@ static void impl_execute( SfxRequest const & rReq, SdrCustomShapeGeometryItem& r sal_Int32 nValue = rReq.GetArgs()->GetItem<SfxInt32Item>(SID_FONTWORK_ALIGNMENT)->GetValue(); if ( ( nValue >= 0 ) && ( nValue < 5 ) ) { - SdrFitToSizeType eFTS = SdrFitToSizeType::NONE; + drawing::TextFitToSizeType eFTS = drawing::TextFitToSizeType_NONE; SdrTextHorzAdjust eHorzAdjust; switch ( nValue ) { - case 4 : eFTS = SdrFitToSizeType::AllLines; SAL_FALLTHROUGH; + case 4 : eFTS = drawing::TextFitToSizeType_ALLLINES; SAL_FALLTHROUGH; case 3 : eHorzAdjust = SDRTEXTHORZADJUST_BLOCK; break; default: eHorzAdjust = SDRTEXTHORZADJUST_LEFT; break; case 1 : eHorzAdjust = SDRTEXTHORZADJUST_CENTER; break; |