diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-24 15:06:35 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-08-25 08:40:00 +0200 |
commit | 3aa7db4586c53a0815b74cc514ff8a6541dc7e01 (patch) | |
tree | b3dba2d12d3ef9738239c814184211fe75afa505 /include | |
parent | ce51b64947f120c592853aec2d01542dcd2cc2c0 (diff) |
convert SvxAnchorIds to scoped enum
Change-Id: I4375fa07eb6ac81b21b904e965e4c2f9600ca99a
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/anchorid.hxx | 23 | ||||
-rw-r--r-- | include/svx/svxdlg.hxx | 5 |
2 files changed, 20 insertions, 8 deletions
diff --git a/include/svx/anchorid.hxx b/include/svx/anchorid.hxx index 921769cd5ecc..da73870109e5 100644 --- a/include/svx/anchorid.hxx +++ b/include/svx/anchorid.hxx @@ -19,15 +19,26 @@ #ifndef INCLUDED_SVX_ANCHORID_HXX #define INCLUDED_SVX_ANCHORID_HXX +#include <o3tl/typed_flags_set.hxx> -enum SvxAnchorIds +enum class SvxAnchorIds { - SVX_OBJ_AT_CNTNT = 0x01, // Frame bound to paragraph - SVX_OBJ_IN_CNTNT = 0x02, // Frame bound to character - SVX_OBJ_PAGE = 0x04, // Frame bound to page - SVX_OBJ_AT_FLY = 0x08 // Frame bound to other frame -// SVX_OBJ_AUTO_CNTNT = 0x10 // Automatically positioned frame bound to paragraph + NONE = 0x0000, + Paragraph = 0x0001, // Frame bound to paragraph + Character = 0x0002, // Frame bound to character + Page = 0x0004, // Frame bound to page + Fly = 0x0008, // Frame bound to other frame + /** put this into the nAnchorTypes parameter of the SvxTransformTabDialog c'tor + to disable the size controls */ + NoResize = 0x0100, + /** put this into the nAnchorTypes parameter of the SvxTransformTabDialog c'tor + to disable the protect controls */ + NoProtect = 0x0200 }; +namespace o3tl +{ + template<> struct typed_flags<SvxAnchorIds> : is_typed_flags<SvxAnchorIds, 0x030f> {}; +} #endif diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx index 2224c3342b6d..f3a21ca0f8d9 100644 --- a/include/svx/svxdlg.hxx +++ b/include/svx/svxdlg.hxx @@ -20,6 +20,7 @@ #define INCLUDED_SVX_SVXDLG_HXX #include <sfx2/sfxdlg.hxx> +#include <svx/anchorid.hxx> #include <svx/zoom_def.hxx> #include <editeng/edtdlg.hxx> @@ -281,7 +282,7 @@ public: virtual AbstractSvxCaptionDialog* CreateCaptionDialog( vcl::Window* pParent, const SdrView* pView, - sal_uInt16 nAnchorTypes = 0 ) = 0; + SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE ) = 0; virtual AbstractSvxDistributeDialog* CreateSvxDistributeDialog( const SfxItemSet& rAttr)= 0; @@ -329,7 +330,7 @@ public: virtual AbstractSvxTransformTabDialog* CreateSvxTransformTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, const SdrView* pView, - sal_uInt16 nAnchorTypes = 0) = 0; + SvxAnchorIds nAnchorTypes = SvxAnchorIds::NONE) = 0; virtual SfxAbstractTabDialog* CreateSchTransformTabDialog( vcl::Window* pParent, const SfxItemSet* pAttr, const SdrView* pSdrView, |