diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-07 11:19:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-08 06:30:49 +0000 |
commit | 9cb57a50d7eeaa1dda19d18bcb3cde7e4a7984e5 (patch) | |
tree | 790282bdd3d41f9ceda28267cb72dd119ac15230 /include/editeng | |
parent | bb4cf1da125344d5ef4fe51b0f1549718a11affa (diff) |
convert SvxAdjust to scoped enum
Change-Id: I0df7a5313d6d62d0c657e62ef6014a3ddbab4639
Reviewed-on: https://gerrit.libreoffice.org/34941
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/editeng')
-rw-r--r-- | include/editeng/adjustitem.hxx | 34 | ||||
-rw-r--r-- | include/editeng/svxenum.hxx | 15 |
2 files changed, 25 insertions, 24 deletions
diff --git a/include/editeng/adjustitem.hxx b/include/editeng/adjustitem.hxx index 04a04ff36ee3..8c71878cae65 100644 --- a/include/editeng/adjustitem.hxx +++ b/include/editeng/adjustitem.hxx @@ -49,7 +49,7 @@ class EDITENG_DLLPUBLIC SvxAdjustItem : public SfxEnumItemInterface public: static SfxPoolItem* CreateDefault(); - SvxAdjustItem( const SvxAdjust eAdjst /*= SVX_ADJUST_LEFT*/, + SvxAdjustItem( const SvxAdjust eAdjst /*= SvxAdjust::Left*/, const sal_uInt16 nId ); // "pure virtual Methods" from SfxPoolItem @@ -73,53 +73,53 @@ public: void SetOneWord( const SvxAdjust eType ) { - bOneBlock = eType == SVX_ADJUST_BLOCK; + bOneBlock = eType == SvxAdjust::Block; } void SetLastBlock( const SvxAdjust eType ) { - bLastBlock = eType == SVX_ADJUST_BLOCK; - bLastCenter = eType == SVX_ADJUST_CENTER; + bLastBlock = eType == SvxAdjust::Block; + bLastCenter = eType == SvxAdjust::Center; } void SetAdjust( const SvxAdjust eType ) { - bLeft = eType == SVX_ADJUST_LEFT; - bRight = eType == SVX_ADJUST_RIGHT; - bCenter = eType == SVX_ADJUST_CENTER; - bBlock = eType == SVX_ADJUST_BLOCK; + bLeft = eType == SvxAdjust::Left; + bRight = eType == SvxAdjust::Right; + bCenter = eType == SvxAdjust::Center; + bBlock = eType == SvxAdjust::Block; } SvxAdjust GetLastBlock() const { - SvxAdjust eRet = SVX_ADJUST_LEFT; + SvxAdjust eRet = SvxAdjust::Left; if ( bLastBlock ) - eRet = SVX_ADJUST_BLOCK; + eRet = SvxAdjust::Block; else if( bLastCenter ) - eRet = SVX_ADJUST_CENTER; + eRet = SvxAdjust::Center; return eRet; } SvxAdjust GetOneWord() const { - SvxAdjust eRet = SVX_ADJUST_LEFT; + SvxAdjust eRet = SvxAdjust::Left; if ( bBlock && bOneBlock ) - eRet = SVX_ADJUST_BLOCK; + eRet = SvxAdjust::Block; return eRet; } SvxAdjust GetAdjust() const { - SvxAdjust eRet = SVX_ADJUST_LEFT; + SvxAdjust eRet = SvxAdjust::Left; if ( bRight ) - eRet = SVX_ADJUST_RIGHT; + eRet = SvxAdjust::Right; else if ( bCenter ) - eRet = SVX_ADJUST_CENTER; + eRet = SvxAdjust::Center; else if ( bBlock ) - eRet = SVX_ADJUST_BLOCK; + eRet = SvxAdjust::Block; return eRet; } }; diff --git a/include/editeng/svxenum.hxx b/include/editeng/svxenum.hxx index 670c360bc9de..12b1f4ba5901 100644 --- a/include/editeng/svxenum.hxx +++ b/include/editeng/svxenum.hxx @@ -73,14 +73,15 @@ enum class SvxInterLineSpaceRule Fix }; -enum SvxAdjust +enum class SvxAdjust { - SVX_ADJUST_LEFT, - SVX_ADJUST_RIGHT, - SVX_ADJUST_BLOCK, - SVX_ADJUST_CENTER, - SVX_ADJUST_BLOCKLINE, - SVX_ADJUST_END + Left, + Right, + Block, + Center, + BlockLine, + End, + LAST = End }; enum class SvxBreak |