diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-30 12:35:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-08-31 10:00:07 +0200 |
commit | 7bf9abffb69966882feecca4b35a04722e5b7822 (patch) | |
tree | 53736730de90f3167fc264a7133c9c36e079b743 /sw/inc | |
parent | 8b52d4e73a06d433d128d61a4939e92e4a497d71 (diff) |
convert FindRanges to o3tl::typed_flags_set
Change-Id: I745b2f469e44b79a06a18bc5264aae75b096835c
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/cshtyp.hxx | 27 | ||||
-rw-r--r-- | sw/inc/swcrsr.hxx | 6 |
2 files changed, 19 insertions, 14 deletions
diff --git a/sw/inc/cshtyp.hxx b/sw/inc/cshtyp.hxx index c2e9a3bbcc1e..d456feca753b 100644 --- a/sw/inc/cshtyp.hxx +++ b/sw/inc/cshtyp.hxx @@ -21,6 +21,7 @@ #include <tools/solar.h> #include "swdllapi.h" +#include <o3tl/typed_flags_set.hxx> class SwPaM; class SwContentFrame; @@ -72,20 +73,24 @@ extern SwMoveFnCollection const & fnRegionEnd; /* * The following combinations are allowed: - * - find one in body -> FND_IN_BODY - * - find all in body: -> FND_IN_BODYONLY | FND_IN_SELALL - * - find in selections: one/all -> FND_IN_SEL [ | FND_IN_SELALL ] - * - find not in body: one/all -> FND_IN_OTHER [ | FND_IN_SELALL ] - * - find all everywhere -> FND_IN_SELALL + * - find one in body -> FindRanges::InBody + * - find all in body: -> FindRanges::InBodyOnly | FindRanges::InSelAll + * - find in selections: one/all -> FindRanges::InSel [ | FindRanges::InSelAll ] + * - find not in body: one/all -> FindRanges::InOther [ | FindRanges::InSelAll ] + * - find all everywhere -> FindRanges::InSelAll */ -enum FindRanges +enum class FindRanges { - FND_IN_BODY = 0x00, ///< Find "one" only in body text. - FND_IN_OTHER = 0x02, ///< Find "all" in Footer/Header/Fly... - FND_IN_SEL = 0x04, ///< Find in selections. - FND_IN_BODYONLY = 0x08, ///< Find only in body - only in combination with FND_IN_SELALL !!! - FND_IN_SELALL = 0x01 ///< All (only in non-body and selections). + InBody = 0x00, ///< Find "one" only in body text. + InSelAll = 0x01, ///< All (only in non-body and selections). + InOther = 0x02, ///< Find "all" in Footer/Header/Fly... + InSel = 0x04, ///< Find in selections. + InBodyOnly = 0x08, ///< Find only in body - only in combination with FindRanges::InSelAll !!! }; +namespace o3tl +{ + template<> struct typed_flags<FindRanges> : is_typed_flags<FindRanges, 0x0f> {}; +} enum class SwDocPositions { diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx index 122dc4c0d7db..0e9d7d351be8 100644 --- a/sw/inc/swcrsr.hxx +++ b/sw/inc/swcrsr.hxx @@ -116,17 +116,17 @@ public: bool bSearchInNotes, SwDocPositions nStart, SwDocPositions nEnde, bool& bCancel, - FindRanges = FND_IN_BODY, + FindRanges = FindRanges::InBody, bool bReplace = false ); sal_uLong Find( const SwTextFormatColl& rFormatColl, SwDocPositions nStart, SwDocPositions nEnde, bool& bCancel, - FindRanges = FND_IN_BODY, + FindRanges = FindRanges::InBody, const SwTextFormatColl* pReplFormat = nullptr ); sal_uLong Find( const SfxItemSet& rSet, bool bNoCollections, SwDocPositions nStart, SwDocPositions nEnde, bool& bCancel, - FindRanges = FND_IN_BODY, + FindRanges = FindRanges::InBody, const css::util::SearchOptions2* pSearchOpt = nullptr, const SfxItemSet* rReplSet = nullptr ); |