diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-23 16:15:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-01 07:28:03 +0000 |
commit | 4c09fc48e9fa9114f32f2973090cbe75177cdd37 (patch) | |
tree | 09d4ee3c2d75d038f45ba13a086a344d35aeadb6 /vcl/source/edit | |
parent | d97380c66904328e9d706a0b03a6800dc048aa7d (diff) |
typesafe wrappers for css::i18nutil::TransliterationModules
and related css::util::SearchOptions2
The TransliterationModules enum has it's constants spread over multiple
UNO enum/constant-collections - TransliterationModules and
TransliterationModulesExtra, which means that most code simply uses
sal_Int32.
Wrap them up into a better bundle so that only the lowest layer needs to
deal directly with the UNO constants.
Change-Id: I1edeab79fcc7817a4a97c933ef84ab7015bb849b
Reviewed-on: https://gerrit.libreoffice.org/34582
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/edit')
-rw-r--r-- | vcl/source/edit/textview.cxx | 5 | ||||
-rw-r--r-- | vcl/source/edit/xtextedt.cxx | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index f810b56ac7bf..120b2ff5d172 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <i18nutil/searchopt.hxx> #include <vcl/textview.hxx> #include <vcl/texteng.hxx> #include <vcl/settings.hxx> @@ -2248,7 +2249,7 @@ bool TextView::MatchGroup() return aMatchSel.HasRange(); } -bool TextView::Search( const css::util::SearchOptions& rSearchOptions, bool bForward ) +bool TextView::Search( const i18nutil::SearchOptions& rSearchOptions, bool bForward ) { bool bFound = false; TextSelection aSel( GetSelection() ); @@ -2271,7 +2272,7 @@ bool TextView::Search( const css::util::SearchOptions& rSearchOptions, bool bFor return bFound; } -sal_uInt16 TextView::Replace( const css::util::SearchOptions& rSearchOptions, bool bAll, bool bForward ) +sal_uInt16 TextView::Replace( const i18nutil::SearchOptions& rSearchOptions, bool bAll, bool bForward ) { sal_uInt16 nFound = 0; diff --git a/vcl/source/edit/xtextedt.cxx b/vcl/source/edit/xtextedt.cxx index 2a43f958158e..aa630c7ecab0 100644 --- a/vcl/source/edit/xtextedt.cxx +++ b/vcl/source/edit/xtextedt.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <i18nutil/searchopt.hxx> #include <vcl/xtextedt.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> @@ -133,7 +134,7 @@ TextSelection ExtTextEngine::MatchGroup( const TextPaM& rCursor ) const return aSel; } -bool ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSearchOptions, bool bForward ) +bool ExtTextEngine::Search( TextSelection& rSel, const i18nutil::SearchOptions& rSearchOptions, bool bForward ) { TextSelection aSel( rSel ); aSel.Justify(); @@ -156,9 +157,9 @@ bool ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSea const sal_uInt32 nStartNode = aStartPaM.GetPara(); - util::SearchOptions aOptions( rSearchOptions ); + i18nutil::SearchOptions aOptions( rSearchOptions ); aOptions.Locale = Application::GetSettings().GetLanguageTag().getLocale(); - utl::TextSearch aSearcher( utl::TextSearch::UpgradeToSearchOptions2( aOptions)); + utl::TextSearch aSearcher( utl::TextSearch::UpgradeToSearchOptions2(aOptions) ); // iterate over the paragraphs for ( sal_uInt32 nNode = nStartNode; |