diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-29 13:08:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-30 06:23:54 +0000 |
commit | b5a1f7cbf9c83f7b1cc6ea103047147ce3d63fee (patch) | |
tree | af07a78adc1184a1189d1818f6f4ad147c9f582b /sw/inc/undobj.hxx | |
parent | 3c1b1fb937c261987a430593ed525df78fa5ce07 (diff) |
convert DelContentType to o3tl::typed_flags
Change-Id: I2c94b28e4c95c22c05ba7aed8e413cc7f6b70874
Reviewed-on: https://gerrit.libreoffice.org/31358
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc/undobj.hxx')
-rw-r--r-- | sw/inc/undobj.hxx | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index ef154ca2d41c..fedc5673f4b9 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -26,6 +26,7 @@ #include <tools/solar.h> #include <SwRewriter.hxx> #include <swundo.hxx> +#include <o3tl/typed_flags_set.hxx> class SwHistory; class SwIndex; @@ -125,21 +126,23 @@ public: static bool HasHiddenRedlines( const SwRedlineSaveDatas& rSData ); }; -typedef sal_uInt16 DelContentType; -namespace nsDelContentType +enum class DelContentType : sal_uInt16 { - const DelContentType DELCNT_FTN = 0x01; - const DelContentType DELCNT_FLY = 0x02; - const DelContentType DELCNT_TOC = 0x04; - const DelContentType DELCNT_BKM = 0x08; - const DelContentType DELCNT_ALL = 0x0F; - const DelContentType DELCNT_CHKNOCNTNT = 0x80; + Ftn = 0x01, + Fly = 0x02, + Toc = 0x04, + Bkm = 0x08, + AllMask = 0x0F, + CheckNoCntnt = 0x80, +}; +namespace o3tl { + template<> struct typed_flags<DelContentType> : is_typed_flags<DelContentType, 0x8f> {}; } /// will DelContentIndex destroy a frame anchored at character at rAnchorPos? bool IsDestroyFrameAnchoredAtChar(SwPosition const & rAnchorPos, SwPosition const & rStart, SwPosition const & rEnd, const SwDoc* doc, - DelContentType const nDelContentType = nsDelContentType::DELCNT_ALL); + DelContentType const nDelContentType = DelContentType::AllMask); // This class has to be inherited into an Undo-object if it saves content // for Redo/Undo... @@ -171,7 +174,7 @@ protected: // Before moving stuff into UndoNodes-Array care has to be taken that // the content-bearing attributes are removed from the nodes-array. void DelContentIndex( const SwPosition& pMark, const SwPosition& pPoint, - DelContentType nDelContentType = nsDelContentType::DELCNT_ALL ); + DelContentType nDelContentType = DelContentType::AllMask ); public: SwUndoSaveContent(); |