diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-29 13:37:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-30 06:31:46 +0000 |
commit | 4d00ca767de19696084fc52ff3638c448233b818 (patch) | |
tree | ea9c174eca53ab497d1fefaf7910f1adfcbc118e /sw/source/filter/ww8/wrtww8.hxx | |
parent | b5a1f7cbf9c83f7b1cc6ea103047147ce3d63fee (diff) |
convert WRITEFIELD constants to o3tl::typed_flags
Change-Id: I6412faee844e19195d57415874022bcf8547f4d7
Reviewed-on: https://gerrit.libreoffice.org/31360
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/filter/ww8/wrtww8.hxx')
-rw-r--r-- | sw/source/filter/ww8/wrtww8.hxx | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 41e673c8f65b..a42a6405c1a3 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -40,6 +40,7 @@ #include <vcl/graph.hxx> #include <boost/optional.hpp> +#include <o3tl/typed_flags_set.hxx> #include <memory> #include <map> @@ -133,15 +134,18 @@ class SvxBrushItem; #define OLE_PREVIEW_AS_EMF //If we want to export ole2 previews as emf in ww8+ -typedef sal_uInt8 FieldFlags; -namespace nsFieldFlags // for InsertField- Method +enum class FieldFlags : sal_uInt8 // for InsertField- Method { - const FieldFlags WRITEFIELD_START = 0x01; - const FieldFlags WRITEFIELD_CMD_START = 0x02; - const FieldFlags WRITEFIELD_CMD_END = 0x04; - const FieldFlags WRITEFIELD_END = 0x10; - const FieldFlags WRITEFIELD_CLOSE = 0x20; - const FieldFlags WRITEFIELD_ALL = 0xFF; + NONE = 0x00, + Start = 0x01, + CmdStart = 0x02, + CmdEnd = 0x04, + End = 0x10, + Close = 0x20, + All = 0x37 +}; +namespace o3tl { + template<> struct typed_flags<FieldFlags> : is_typed_flags<FieldFlags, 0x37> {}; } enum TextTypes //enums for TextTypes @@ -752,7 +756,7 @@ public: /// Write the field virtual void OutputField( const SwField* pField, ww::eField eFieldType, - const OUString& rFieldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL ) = 0; + const OUString& rFieldCmd, FieldFlags nMode = FieldFlags::All ) = 0; /// Write the data of the form field virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) = 0; @@ -1023,7 +1027,7 @@ public: /// Write the field virtual void OutputField( const SwField* pField, ww::eField eFieldType, - const OUString& rFieldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL ) override; + const OUString& rFieldCmd, FieldFlags nMode = FieldFlags::All ) override; void StartCommentOutput( const OUString& rName ); void EndCommentOutput( const OUString& rName ); |