diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-04 11:31:33 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-05-09 10:17:13 +0200 |
commit | bcb41235deaf4b7ca90522bda3ba21a686819e6e (patch) | |
tree | 29f397deeb5c776b290b782847a4f9ec8487adb2 /include | |
parent | b55b7a057f19521ad88fc6a274fcf071b798eb3e (diff) |
convert SfxStyleFamily to scoped enum
and update the RSC compiler to accept such
In the process fix some confusion in SD where it was confusing
SfxStyleFamily and the index of the relevant family
(which other parts of the code in SVL use)
Change-Id: I1efc9f85fbed8ab76eafe8f6e1ada411753ae5f9
Diffstat (limited to 'include')
-rw-r--r-- | include/rsc/rscsfx.hxx | 18 | ||||
-rw-r--r-- | include/sfx2/styfitem.hxx | 4 | ||||
-rw-r--r-- | include/svl/style.hxx | 2 |
3 files changed, 14 insertions, 10 deletions
diff --git a/include/rsc/rscsfx.hxx b/include/rsc/rscsfx.hxx index 837187aece06..b4dd3c7abb16 100644 --- a/include/rsc/rscsfx.hxx +++ b/include/rsc/rscsfx.hxx @@ -28,13 +28,17 @@ // Public (RSC_NOTYPE + 0x300) bis (RSC_NOTYPE + 0x3FF) //========== S F X ======================================= -enum SfxStyleFamily { SFX_STYLE_FAMILY_CHAR = 1, - SFX_STYLE_FAMILY_PARA = 2, - SFX_STYLE_FAMILY_FRAME = 4, - SFX_STYLE_FAMILY_PAGE = 8, - SFX_STYLE_FAMILY_PSEUDO = 16, - SFX_STYLE_FAMILY_ALL = 0x7fff - }; +// This is used as a flags enum in sw/, but only there, +// so I don't pull in o3tl::typed_flags here +enum class SfxStyleFamily { + None = 0x00, + Char = 0x01, + Para = 0x02, + Frame = 0x04, + Page = 0x08, + Pseudo = 0x10, + All = 0x7fff +}; // SfxTemplate diff --git a/include/sfx2/styfitem.hxx b/include/sfx2/styfitem.hxx index 64d092690c35..1fd10168c693 100644 --- a/include/sfx2/styfitem.hxx +++ b/include/sfx2/styfitem.hxx @@ -42,7 +42,7 @@ class SfxStyleFamilyItem: public Resource Bitmap aBitmap; OUString aText; OUString aHelpText; - sal_uInt16 nFamily; + SfxStyleFamily nFamily; SfxStyleFilter aFilterList; public: @@ -50,7 +50,7 @@ public: ~SfxStyleFamilyItem(); const OUString& GetText() const { return aText; } - SfxStyleFamily GetFamily() const { return (SfxStyleFamily)nFamily; } + SfxStyleFamily GetFamily() const { return nFamily; } const SfxStyleFilter& GetFilterList() const { return aFilterList; } const Image& GetImage() const { return aImage; } diff --git a/include/svl/style.hxx b/include/svl/style.hxx index 8083cb36bdbd..a36c3757e096 100644 --- a/include/svl/style.hxx +++ b/include/svl/style.hxx @@ -278,7 +278,7 @@ public: protected: SfxStyleSheet() // do not use! needed by MSVC at compile time to satisfy ImplInheritanceHelper2 - : SfxStyleSheetBase(OUString("dummy"), nullptr, SFX_STYLE_FAMILY_ALL, 0) + : SfxStyleSheetBase(OUString("dummy"), nullptr, SfxStyleFamily::All, 0) { assert(false); } |