summaryrefslogtreecommitdiff
path: root/sw/inc/itabenum.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-04-26 11:42:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-26 13:16:39 +0200
commit9370c07101bbca313f8e69518b0988b07eb21888 (patch)
tree4ab8f5731978ad121187856e3ea493d30b7bca1e /sw/inc/itabenum.hxx
parent60db3d2cc3bc4f124bd4d819fbd0285e7f19c8c4 (diff)
convert tabopts to scoped enum
Change-Id: I6c9290e3319d2afd1bd71847091c7ab77b8ea6e6 Reviewed-on: https://gerrit.libreoffice.org/53497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc/itabenum.hxx')
-rw-r--r--sw/inc/itabenum.hxx21
1 files changed, 13 insertions, 8 deletions
diff --git a/sw/inc/itabenum.hxx b/sw/inc/itabenum.hxx
index c3c06e5d6abb..d5c68cb510d9 100644
--- a/sw/inc/itabenum.hxx
+++ b/sw/inc/itabenum.hxx
@@ -20,22 +20,27 @@
#define INCLUDED_SW_INC_ITABENUM_HXX
#include <sal/types.h>
+#include <o3tl/typed_flags_set.hxx>
-namespace tabopts
+enum class SwInsertTableFlags
{
- const sal_uInt16 DEFAULT_BORDER = 0x01;
- const sal_uInt16 HEADLINE = 0x02;
- const sal_uInt16 SPLIT_LAYOUT = 0x08;
- const sal_uInt16 HEADLINE_NO_BORDER = HEADLINE | SPLIT_LAYOUT;
- const sal_uInt16 ALL_TBL_INS_ATTR = DEFAULT_BORDER | HEADLINE | SPLIT_LAYOUT;
+ NONE = 0x00,
+ DefaultBorder = 0x01,
+ Headline = 0x02,
+ SplitLayout = 0x08,
+ HeadlineNoBorder = Headline | SplitLayout,
+ All = DefaultBorder | Headline | SplitLayout
+};
+namespace o3tl {
+ template<> struct typed_flags<SwInsertTableFlags> : is_typed_flags<SwInsertTableFlags, 0x0b> {};
}
struct SwInsertTableOptions
{
- sal_uInt16 mnInsMode;
+ SwInsertTableFlags mnInsMode;
sal_uInt16 mnRowsToRepeat;
- SwInsertTableOptions( sal_uInt16 nInsMode, sal_uInt16 nRowsToRepeat ) :
+ SwInsertTableOptions( SwInsertTableFlags nInsMode, sal_uInt16 nRowsToRepeat ) :
mnInsMode( nInsMode ), mnRowsToRepeat( nRowsToRepeat ) {};
};