diff --git a/include/svx/xenum.hxx b/include/svx/xenum.hxx index 586521948c8b..cc5bb74e8f7d 100644 --- a/include/svx/xenum.hxx +++ b/include/svx/xenum.hxx @@ -23,8 +23,8 @@ enum XFormTextStyle { XFT_ROTATE, XFT_UPRIGHT, XFT_SLANTX, XFT_SLANTY, XFT_NONE }; -enum XFormTextAdjust { XFT_LEFT, XFT_RIGHT, XFT_AUTOSIZE, XFT_CENTER }; -enum class XFormTextShadow { NONE, Normal, Slant}; +enum class XFormTextAdjust { Left, Right, AutoSize, Center }; +enum class XFormTextShadow { NONE, Normal, Slant }; enum class XBitmapType { Import, N8x8 }; diff --git a/include/svx/xftadit.hxx b/include/svx/xftadit.hxx index 6d2e5fbcdb9f..4346eb6afef2 100644 --- a/include/svx/xftadit.hxx +++ b/include/svx/xftadit.hxx @@ -34,7 +34,7 @@ class SVX_DLLPUBLIC XFormTextAdjustItem : public SfxEnumItem public: static SfxPoolItem* CreateDefault(); - XFormTextAdjustItem(XFormTextAdjust = XFT_CENTER); + XFormTextAdjustItem(XFormTextAdjust = XFormTextAdjust::Center); XFormTextAdjustItem(SvStream& rIn); virtual SfxPoolItem* Clone(SfxItemPool* pPool = nullptr) const override; virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nVer) const override; diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx index 7a427197ead6..3c20641fd531 100644 --- a/svx/source/dialog/fontwork.cxx +++ b/svx/source/dialog/fontwork.cxx @@ -387,15 +387,15 @@ void SvxFontWorkDialog::SetAdjust_Impl(const XFormTextAdjustItem* pItem) m_pTbxAdjust->Enable(); m_pMtrFldDistance->Enable(); - if ( pItem->GetValue() == XFT_LEFT || pItem->GetValue() == XFT_RIGHT ) + if ( pItem->GetValue() == XFormTextAdjust::Left || pItem->GetValue() == XFormTextAdjust::Right ) { - if ( pItem->GetValue() == XFT_LEFT ) nId = nAdjustLeftId; + if ( pItem->GetValue() == XFormTextAdjust::Left ) nId = nAdjustLeftId; else nId = nAdjustRightId; m_pMtrFldTextStart->Enable(); } else { - if ( pItem->GetValue() == XFT_CENTER ) nId = nAdjustCenterId; + if ( pItem->GetValue() == XFormTextAdjust::Center ) nId = nAdjustCenterId; else nId = nAdjustAutoSizeId; m_pMtrFldTextStart->Disable(); } @@ -673,14 +673,14 @@ IMPL_LINK_NOARG_TYPED(SvxFontWorkDialog, SelectAdjustHdl_Impl, ToolBox *, void) } else if ( nId != nLastAdjustTbxId ) { - XFormTextAdjust eAdjust = XFT_AUTOSIZE; + XFormTextAdjust eAdjust = XFormTextAdjust::AutoSize; if (nId == nAdjustLeftId) - eAdjust = XFT_LEFT; + eAdjust = XFormTextAdjust::Left; else if (nId == nAdjustCenterId) - eAdjust = XFT_CENTER; + eAdjust = XFormTextAdjust::Center; else if (nId == nAdjustRightId) - eAdjust = XFT_RIGHT; + eAdjust = XFormTextAdjust::Right; XFormTextAdjustItem aItem(eAdjust); GetBindings().GetDispatcher()->ExecuteList(SID_FORMTEXT_ADJUST, diff --git a/svx/source/sdr/attribute/sdrformtextattribute.cxx b/svx/source/sdr/attribute/sdrformtextattribute.cxx index 549103cb567e..44607a05dc8c 100644 --- a/svx/source/sdr/attribute/sdrformtextattribute.cxx +++ b/svx/source/sdr/attribute/sdrformtextattribute.cxx @@ -214,7 +214,7 @@ namespace drawinglayer mnFormTextShdwYVal(0), mnFormTextShdwTransp(0), meFormTextStyle(XFT_NONE), - meFormTextAdjust(XFT_CENTER), + meFormTextAdjust(XFormTextAdjust::Center), meFormTextShadow(XFormTextShadow::NONE), maFormTextShdwColor(), maOutline(), diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index 9a83d2766abd..d7cba40402e6 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -273,10 +273,10 @@ namespace } if(maSdrFormTextAttribute.getFormTextStart() - && (XFT_LEFT == maSdrFormTextAttribute.getFormTextAdjust() - || XFT_RIGHT == maSdrFormTextAttribute.getFormTextAdjust())) + && (XFormTextAdjust::Left == maSdrFormTextAttribute.getFormTextAdjust() + || XFormTextAdjust::Right == maSdrFormTextAttribute.getFormTextAdjust())) { - if(XFT_LEFT == maSdrFormTextAttribute.getFormTextAdjust()) + if(XFormTextAdjust::Left == maSdrFormTextAttribute.getFormTextAdjust()) { fPolyStart += maSdrFormTextAttribute.getFormTextStart(); @@ -296,16 +296,16 @@ namespace } } - if(XFT_LEFT != maSdrFormTextAttribute.getFormTextAdjust()) + if(XFormTextAdjust::Left != maSdrFormTextAttribute.getFormTextAdjust()) { // calculate total text length of this paragraph, some layout needs to be done const double fParagraphTextLength(getParagraphTextLength(rTextPortions)); // check if text is too long for paragraph. If yes, handle as if left aligned (default), - // but still take care of XFT_AUTOSIZE in that case + // but still take care of XFormTextAdjust::AutoSize in that case const bool bTextTooLong(fParagraphTextLength > (fPolyEnd - fPolyStart)); - if(XFT_RIGHT == maSdrFormTextAttribute.getFormTextAdjust()) + if(XFormTextAdjust::Right == maSdrFormTextAttribute.getFormTextAdjust()) { if(!bTextTooLong) { @@ -313,7 +313,7 @@ namespace fPolyStart += ((fPolyEnd - fPolyStart) - fParagraphTextLength); } } - else if(XFT_CENTER == maSdrFormTextAttribute.getFormTextAdjust()) + else if(XFormTextAdjust::Center == maSdrFormTextAttribute.getFormTextAdjust()) { if(!bTextTooLong) { @@ -321,7 +321,7 @@ namespace fPolyStart += ((fPolyEnd - fPolyStart) - fParagraphTextLength) / 2.0; } } - else if(XFT_AUTOSIZE == maSdrFormTextAttribute.getFormTextAdjust()) + else if(XFormTextAdjust::AutoSize == maSdrFormTextAttribute.getFormTextAdjust()) { // if scale, prepare scale factor between curve length and text length if(0.0 != fParagraphTextLength) diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index e22ba0bddebb..c4a96c5e98ea 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -679,10 +679,10 @@ static SvXMLEnumMapEntry const pXML_Fontwork_Style_Enum[] = static SvXMLEnumMapEntry const pXML_Fontwork_Adjust_Enum[] = { - { XML_LEFT, 0 }, //XFT_LEFT, - { XML_RIGHT, 1 }, //XFT_RIGHT, - { XML_AUTOSIZE, 2 }, //XFT_AUTOSIZE, - { XML_CENTER, 3 }, //XFT_CENTER + { XML_LEFT, 0 }, //XFormTextAdjust::Left, + { XML_RIGHT, 1 }, //XFormTextAdjust::Right, + { XML_AUTOSIZE, 2 }, //XFormTextAdjust::AutoSize, + { XML_CENTER, 3 }, //XFormTextAdjust::Center { XML_TOKEN_INVALID,0 } };