diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-16 13:44:05 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-04-20 08:23:13 +0000 |
commit | 9c50c39fb4410d966d12aee915f6dc9ed53d0211 (patch) | |
tree | 597e25f7c6fdd078db063894e4758caaa3a59729 /basctl | |
parent | e1929061783b9d0276a51ee5f1979cf62f434c5c (diff) |
convert SEARCH_OPTIONS constants to scoped enum
Change-Id: Id0f0c7d692410cf5e1477c5180e7cfb8e7b0f52b
Reviewed-on: https://gerrit.libreoffice.org/15345
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 20 | ||||
-rw-r--r-- | basctl/source/basicide/baside2.hxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/basides1.cxx | 4 | ||||
-rw-r--r-- | basctl/source/basicide/bastypes.cxx | 5 | ||||
-rw-r--r-- | basctl/source/inc/bastypes.hxx | 3 |
5 files changed, 18 insertions, 16 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 64c1343796c6..1c11bb11a24d 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -1295,20 +1295,20 @@ sal_uInt16 ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, return NULL; } -sal_uInt16 ModulWindow::GetSearchOptions() +SearchOptionFlags ModulWindow::GetSearchOptions() { - sal_uInt16 nOptions = SEARCH_OPTIONS_SEARCH | - SEARCH_OPTIONS_WHOLE_WORDS | - SEARCH_OPTIONS_BACKWARDS | - SEARCH_OPTIONS_REG_EXP | - SEARCH_OPTIONS_EXACT | - SEARCH_OPTIONS_SELECTION | - SEARCH_OPTIONS_SIMILARITY; + SearchOptionFlags nOptions = SearchOptionFlags::SEARCH | + SearchOptionFlags::WHOLE_WORDS | + SearchOptionFlags::BACKWARDS | + SearchOptionFlags::REG_EXP | + SearchOptionFlags::EXACT | + SearchOptionFlags::SELECTION | + SearchOptionFlags::SIMILARITY; if ( !IsReadOnly() ) { - nOptions |= SEARCH_OPTIONS_REPLACE; - nOptions |= SEARCH_OPTIONS_REPLACE_ALL; + nOptions |= SearchOptionFlags::REPLACE; + nOptions |= SearchOptionFlags::REPLACE_ALL; } return nOptions; diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 595db9ebc8c6..3d840d8b2515 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -383,7 +383,7 @@ public: void ShowCursor( bool bOn ); - virtual sal_uInt16 GetSearchOptions() SAL_OVERRIDE; + virtual SearchOptionFlags GetSearchOptions() SAL_OVERRIDE; virtual sal_uInt16 StartSearchAndReplace (SvxSearchItem const&, bool bFromStart = false) SAL_OVERRIDE; EditorWindow& GetEditorWindow() { return aXEditorWindow.GetEdtWindow(); } diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 4a952cad67ff..1a620ce03a41 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -826,10 +826,10 @@ void Shell::GetState(SfxItemSet &rSet) break; case SID_SEARCH_OPTIONS: { - sal_uInt16 nOptions = 0; + SearchOptionFlags nOptions = SearchOptionFlags::NONE; if( pCurWin ) nOptions = pCurWin->GetSearchOptions(); - rSet.Put( SfxUInt16Item( SID_SEARCH_OPTIONS, nOptions ) ); + rSet.Put( SfxUInt16Item( SID_SEARCH_OPTIONS, static_cast<sal_uInt16>(nOptions) ) ); } break; case SID_BASICIDE_LIBSELECTOR: diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 88fd1cec6323..854621f0adda 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -32,6 +32,7 @@ #include <sfx2/passwd.hxx> #include <svl/intitem.hxx> #include <svl/stritem.hxx> +#include <svl/srchdefs.hxx> namespace basctl { @@ -207,9 +208,9 @@ bool BaseWindow::IsPasteAllowed () return NULL; } -sal_uInt16 BaseWindow::GetSearchOptions() +SearchOptionFlags BaseWindow::GetSearchOptions() { - return 0; + return SearchOptionFlags::NONE; } sal_uInt16 BaseWindow::StartSearchAndReplace (SvxSearchItem const&, bool bFromStart) diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index 646fb3279a62..c7e1e1d913a7 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -33,6 +33,7 @@ class SfxItemSet; class SfxRequest; class SvxSearchItem; class Printer; +enum class SearchOptionFlags; namespace svl { @@ -211,7 +212,7 @@ public: virtual svl::IUndoManager* GetUndoManager (); - virtual sal_uInt16 GetSearchOptions(); + virtual SearchOptionFlags GetSearchOptions(); virtual sal_uInt16 StartSearchAndReplace (SvxSearchItem const&, bool bFromStart = false); virtual void BasicStarted(); |