diff options
author | Eike Rathke <erack@redhat.com> | 2016-02-24 22:37:57 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-02-24 22:42:05 +0100 |
commit | 21edff2a37c9c22d200df2638e31f7ff3afe85b6 (patch) | |
tree | 8b3ded0d95c55ddf739e4baf71d5726fa79d80ab /sw | |
parent | eb3e47dbf798103d09bb8f3461959726e917a75f (diff) |
let SvxSearchItem use SearchOptions2
And all those places that interface to SvxSearchItem.
Change-Id: I08915824a596cd0f247a89f44e4684cd22b98082
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/PostItMgr.hxx | 6 | ||||
-rw-r--r-- | sw/inc/crsrsh.hxx | 8 | ||||
-rw-r--r-- | sw/inc/pam.hxx | 6 | ||||
-rw-r--r-- | sw/inc/swcrsr.hxx | 6 | ||||
-rw-r--r-- | sw/qa/core/macros-test.cxx | 9 | ||||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 7 | ||||
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/crsr/findattr.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/crsr/findtxt.cxx | 14 | ||||
-rw-r--r-- | sw/source/core/edit/edtox.cxx | 9 | ||||
-rw-r--r-- | sw/source/ui/index/swuiidxmrk.cxx | 9 | ||||
-rw-r--r-- | sw/source/uibase/docvw/PostItMgr.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/inc/wrtsh.hxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/uiview/srcview.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view2.cxx | 9 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewsrch.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/select.cxx | 6 |
18 files changed, 75 insertions, 60 deletions
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 8f9a22017f3d..f8c372715c47 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -29,7 +29,7 @@ #include <swrect.hxx> #include <unotools/configitem.hxx> #include <unotools/options.hxx> -#include <com/sun/star/util/SearchOptions.hpp> +#include <com/sun/star/util/SearchOptions2.hpp> #include <com/sun/star/uno/Any.hxx> #include <SidebarWindowsTypes.hxx> #include <svl/lstner.hxx> @@ -272,8 +272,8 @@ class SwPostItMgr: public SfxListener void CheckMetaText(); sal_uInt16 Replace(SvxSearchItem* pItem); - sal_uInt16 SearchReplace(const SwFormatField &pField, const css::util::SearchOptions& rSearchOptions,bool bSrchForward); - sal_uInt16 FinishSearchReplace(const css::util::SearchOptions& rSearchOptions,bool bSrchForward); + sal_uInt16 SearchReplace(const SwFormatField &pField, const css::util::SearchOptions2& rSearchOptions,bool bSrchForward); + sal_uInt16 FinishSearchReplace(const css::util::SearchOptions2& rSearchOptions,bool bSrchForward); void AssureStdModeAtShell(); diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 85f662523ab1..aefacf20b9b4 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -67,7 +67,7 @@ class SwTextField; struct SwPosition; namespace com { namespace sun { namespace star { namespace util { - struct SearchOptions; + struct SearchOptions2; } } } } namespace com { namespace sun { namespace star { namespace text { @@ -134,7 +134,7 @@ const int CRSR_POSOLD = 0x01, // cursor stays at old position CRSR_POSCHG = 0x02; // position changed by the layout /// Helperfunction to resolve backward references in regular expressions -OUString *ReplaceBackReferences( const css::util::SearchOptions& rSearchOpt, SwPaM* pPam ); +OUString *ReplaceBackReferences( const css::util::SearchOptions2& rSearchOpt, SwPaM* pPam ); class SW_DLLPUBLIC SwCursorShell : public SwViewShell @@ -367,7 +367,7 @@ public: bool MoveColumn( SwWhichColumn, SwPosColumn ); bool MoveRegion( SwWhichRegion, SwPosRegion ); - sal_uLong Find( const css::util::SearchOptions& rSearchOpt, + sal_uLong Find( const css::util::SearchOptions2& rSearchOpt, bool bSearchInNotes, SwDocPositions eStart, SwDocPositions eEnd, bool& bCancel, @@ -382,7 +382,7 @@ public: SwDocPositions eStart, SwDocPositions eEnd, bool& bCancel, FindRanges eRng, - const css::util::SearchOptions* pSearchOpt = nullptr, + const css::util::SearchOptions2* pSearchOpt = nullptr, const SfxItemSet* rReplSet = nullptr ); // Position the Cursor diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index 295aaf5d804b..4e1d9f76d5ee 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -40,7 +40,7 @@ class SwPaM; class Point; namespace com { namespace sun { namespace star { namespace util { - struct SearchOptions; + struct SearchOptions2; } } } } namespace utl { @@ -194,7 +194,7 @@ public: SwGoInDoc fnGo = fnGoContent ); /// Search. - bool Find( const css::util::SearchOptions& rSearchOpt, + bool Find( const css::util::SearchOptions2& rSearchOpt, bool bSearchInNotes, utl::TextSearch& rSText, SwMoveFn fnMove = fnMoveForward, @@ -209,7 +209,7 @@ public: SwMoveFn fnMove, const SwPaM *pPam, bool bInReadOnly, bool bMoveFirst ); - bool DoSearch( const css::util::SearchOptions& rSearchOpt, utl::TextSearch& rSText, + bool DoSearch( const css::util::SearchOptions2& rSearchOpt, utl::TextSearch& rSText, SwMoveFn fnMove, bool bSrchForward, bool bRegSearch, bool bChkEmptyPara, bool bChkParaEnd, sal_Int32 &nStart, sal_Int32 &nEnd, sal_Int32 nTextLen, SwNode* pNode, SwPaM* pPam); diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx index 1d37cbfb960d..941f2a052f6e 100644 --- a/sw/inc/swcrsr.hxx +++ b/sw/inc/swcrsr.hxx @@ -28,7 +28,7 @@ struct _SwCursor_SavePos; namespace com { namespace sun { namespace star { namespace util { - struct SearchOptions; + struct SearchOptions2; } } } } // Base structure for parameters of the find-methods. @@ -103,7 +103,7 @@ public: SwMoveFnCollection* MakeFindRange( SwDocPositions, SwDocPositions, SwPaM* ) const; - sal_uLong Find( const css::util::SearchOptions& rSearchOpt, + sal_uLong Find( const css::util::SearchOptions2& rSearchOpt, bool bSearchInNotes, SwDocPositions nStart, SwDocPositions nEnde, bool& bCancel, @@ -118,7 +118,7 @@ public: SwDocPositions nStart, SwDocPositions nEnde, bool& bCancel, FindRanges = FND_IN_BODY, - const css::util::SearchOptions* pSearchOpt = nullptr, + const css::util::SearchOptions2* pSearchOpt = nullptr, const SfxItemSet* rReplSet = nullptr ); // UI versions diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx index 8d408c3ba68b..687ac8661103 100644 --- a/sw/qa/core/macros-test.cxx +++ b/sw/qa/core/macros-test.cxx @@ -18,7 +18,8 @@ #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/util/SearchOptions.hpp> +#include <com/sun/star/util/SearchOptions2.hpp> +#include <com/sun/star/util/SearchAlgorithms2.hpp> #include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/frame/XComponentLoader.hpp> #include <com/sun/star/frame/XStorable.hpp> @@ -451,7 +452,7 @@ void SwMacrosTest::testFindReplace() pPaM->Move(fnMoveBackward, fnGoDoc); bool bCancel(false); - util::SearchOptions opts( + util::SearchOptions2 opts( util::SearchAlgorithms_REGEXP, 65536, "$", @@ -460,7 +461,9 @@ void SwMacrosTest::testFindReplace() 2, 2, 2, - 1073745152); + 1073745152, + util::SearchAlgorithms2::REGEXP, + '\\'); // find newline on 1st paragraph bool bFound = pPaM->Find( diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 71ed6801aa16..304393e216cc 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -69,7 +69,8 @@ #include "com/sun/star/util/XNumberFormatTypes.hpp" #include "com/sun/star/util/NumberFormat.hpp" #include "com/sun/star/util/XNumberFormatsSupplier.hpp" -#include <com/sun/star/util/SearchOptions.hpp> +#include <com/sun/star/util/SearchOptions2.hpp> +#include <com/sun/star/util/SearchAlgorithms2.hpp> #include <com/sun/star/util/SearchFlags.hpp> #include "com/sun/star/util/SearchAlgorithms.hpp" #include "com/sun/star/i18n/TransliterationModulesExtra.hpp" @@ -1819,7 +1820,7 @@ void SwUiWriterTest::testSearchWithTransliterate() aIdx = SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1); aPaM = SwPaM(aIdx); pDoc->getIDocumentContentOperations().InsertString(aPaM,"This is Other PARAGRAPH"); - css::util::SearchOptions SearchOpt; + css::util::SearchOptions2 SearchOpt; SearchOpt.algorithmType = css::util::SearchAlgorithms_ABSOLUTE; SearchOpt.searchFlag = 0x00000001; SearchOpt.searchString = "other"; @@ -1828,6 +1829,8 @@ void SwUiWriterTest::testSearchWithTransliterate() SearchOpt.deletedChars = 0; SearchOpt.insertedChars = 0; SearchOpt.transliterateFlags = css::i18n::TransliterationModulesExtra::IGNORE_DIACRITICS_CTL; + SearchOpt.AlgorithmType2 = css::util::SearchAlgorithms2::ABSOLUTE; + SearchOpt.WildcardEscapeCharacter = 0; //transliteration option set so that at least one of the search strings is not found sal_uLong case1 = pWrtShell->SearchPattern(SearchOpt,true,DOCPOS_START,DOCPOS_END); SwShellCursor* pShellCursor = pWrtShell->getShellCursor(true); diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 806c34d6fc6a..d4bff232657f 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <com/sun/star/util/SearchOptions.hpp> +#include <com/sun/star/util/SearchOptions2.hpp> #include <com/sun/star/text/XTextRange.hpp> #include <hintids.hxx> @@ -3165,7 +3165,7 @@ bool SwCursorShell::SelectHiddenRange() return bRet; } -sal_uLong SwCursorShell::Find( const SearchOptions& rSearchOpt, +sal_uLong SwCursorShell::Find( const SearchOptions2& rSearchOpt, bool bSearchInNotes, SwDocPositions eStart, SwDocPositions eEnd, bool& bCancel, @@ -3207,7 +3207,7 @@ sal_uLong SwCursorShell::Find( const SfxItemSet& rSet, SwDocPositions eStart, SwDocPositions eEnd, bool& bCancel, FindRanges eRng, - const SearchOptions* pSearchOpt, + const SearchOptions2* pSearchOpt, const SfxItemSet* rReplSet ) { if( m_pTableCursor ) diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx index c8f402ae895f..43bec93de0e5 100644 --- a/sw/source/core/crsr/findattr.cxx +++ b/sw/source/core/crsr/findattr.cxx @@ -18,7 +18,7 @@ */ #include <com/sun/star/lang/Locale.hpp> -#include <com/sun/star/util/SearchOptions.hpp> +#include <com/sun/star/util/SearchOptions2.hpp> #include <com/sun/star/util/SearchFlags.hpp> #include <i18nlangtag/languagetag.hxx> #include <hintids.hxx> @@ -1056,12 +1056,12 @@ struct SwFindParaAttr : public SwFindParas { bool bValue; const SfxItemSet *pSet, *pReplSet; - const SearchOptions *pSearchOpt; + const SearchOptions2 *pSearchOpt; SwCursor& m_rCursor; utl::TextSearch* pSText; SwFindParaAttr( const SfxItemSet& rSet, bool bNoCollection, - const SearchOptions* pOpt, const SfxItemSet* pRSet, + const SearchOptions2* pOpt, const SfxItemSet* pRSet, SwCursor& rCursor ) : bValue( bNoCollection ), pSet( &rSet ), pReplSet( pRSet ), pSearchOpt( pOpt ), m_rCursor( rCursor ),pSText( nullptr ) {} @@ -1109,7 +1109,7 @@ int SwFindParaAttr::Find( SwPaM* pCursor, SwMoveFn fnMove, const SwPaM* pRegion, // then search in text of it if( !pSText ) { - SearchOptions aTmp( *pSearchOpt ); + SearchOptions2 aTmp( *pSearchOpt ); // search in selection aTmp.searchFlag |= (SearchFlags::REG_NOT_BEGINOFLINE | @@ -1117,7 +1117,7 @@ int SwFindParaAttr::Find( SwPaM* pCursor, SwMoveFn fnMove, const SwPaM* pRegion, aTmp.Locale = SvtSysLocale().GetLanguageTag().getLocale(); - pSText = new utl::TextSearch( utl::TextSearch::UpgradeToSearchOptions2( aTmp) ); + pSText = new utl::TextSearch( aTmp ); } // TODO: searching for attributes in Outliner text?! @@ -1221,7 +1221,7 @@ bool SwFindParaAttr::IsReplaceMode() const sal_uLong SwCursor::Find( const SfxItemSet& rSet, bool bNoCollections, SwDocPositions nStart, SwDocPositions nEnd, bool& bCancel, FindRanges eFndRngs, - const SearchOptions* pSearchOpt, + const SearchOptions2* pSearchOpt, const SfxItemSet* pReplSet ) { // switch off OLE-notifications diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index 61943acb0937..f918bb620c45 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -19,7 +19,7 @@ #include <memory> -#include <com/sun/star/util/SearchOptions.hpp> +#include <com/sun/star/util/SearchOptions2.hpp> #include <com/sun/star/util/SearchFlags.hpp> #include <comphelper/string.hxx> #include <vcl/svapp.hxx> @@ -220,7 +220,7 @@ size_t GetPostIt(sal_Int32 aCount,const SwpHints *pHts) return aIndex; } -bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::TextSearch& rSText, +bool SwPaM::Find( const SearchOptions2& rSearchOpt, bool bSearchInNotes , utl::TextSearch& rSText, SwMoveFn fnMove, const SwPaM * pRegion, bool bInReadOnly ) { @@ -465,7 +465,7 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te return bFound; } -bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSText, +bool SwPaM::DoSearch( const SearchOptions2& rSearchOpt, utl::TextSearch& rSText, SwMoveFn fnMove, bool bSrchForward, bool bRegSearch, bool bChkEmptyPara, bool bChkParaEnd, sal_Int32 &nStart, sal_Int32 &nEnd, sal_Int32 nTextLen, @@ -628,13 +628,13 @@ bool SwPaM::DoSearch( const SearchOptions& rSearchOpt, utl::TextSearch& rSText, /// parameters for search and replace in text struct SwFindParaText : public SwFindParas { - const SearchOptions& m_rSearchOpt; + const SearchOptions2& m_rSearchOpt; SwCursor& m_rCursor; utl::TextSearch m_aSText; bool m_bReplace; bool m_bSearchInNotes; - SwFindParaText( const SearchOptions& rOpt, bool bSearchInNotes, bool bRepl, SwCursor& rCursor ) + SwFindParaText( const SearchOptions2& rOpt, bool bSearchInNotes, bool bRepl, SwCursor& rCursor ) : m_rSearchOpt( rOpt ), m_rCursor( rCursor ), m_aSText( utl::TextSearch::UpgradeToSearchOptions2( rOpt) ), m_bReplace( bRepl ), m_bSearchInNotes( bSearchInNotes ) {} @@ -708,7 +708,7 @@ bool SwFindParaText::IsReplaceMode() const return m_bReplace; } -sal_uLong SwCursor::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes, +sal_uLong SwCursor::Find( const SearchOptions2& rSearchOpt, bool bSearchInNotes, SwDocPositions nStart, SwDocPositions nEnd, bool& bCancel, FindRanges eFndRngs, bool bReplace ) { @@ -741,7 +741,7 @@ sal_uLong SwCursor::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes, return nRet; } -OUString *ReplaceBackReferences( const SearchOptions& rSearchOpt, SwPaM* pPam ) +OUString *ReplaceBackReferences( const SearchOptions2& rSearchOpt, SwPaM* pPam ) { OUString *pRet = nullptr; if( pPam && pPam->HasMark() && diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index 36af137ef033..d52205a968e1 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -17,7 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <com/sun/star/util/SearchOptions.hpp> +#include <com/sun/star/util/SearchOptions2.hpp> +#include <com/sun/star/util/SearchAlgorithms2.hpp> #include <com/sun/star/util/SearchFlags.hpp> #include <com/sun/star/i18n/TransliterationModules.hpp> #include <comphelper/string.hxx> @@ -314,12 +315,14 @@ void SwEditShell::ApplyAutoMark() sal_Int32 nSrchFlags = SearchFlags::LEV_RELAXED; - SearchOptions aSearchOpt( + SearchOptions2 aSearchOpt( SearchAlgorithms_ABSOLUTE, nSrchFlags, "", "", SvtSysLocale().GetLanguageTag().getLocale(), nLEV_Other, nLEV_Longer, nLEV_Shorter, - nTransliterationFlags ); + nTransliterationFlags, + SearchAlgorithms2::ABSOLUTE, + '\\' ); while( !rStrm.GetError() && !rStrm.IsEof() ) { diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index b64ecf87bbe2..b0ffb27d3e72 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -27,7 +27,8 @@ #include <com/sun/star/frame/Bibliography.hpp> #include <com/sun/star/i18n/TransliterationModules.hpp> #include <com/sun/star/i18n/IndexEntrySupplier.hpp> -#include <com/sun/star/util/SearchOptions.hpp> +#include <com/sun/star/util/SearchOptions2.hpp> +#include <com/sun/star/util/SearchAlgorithms2.hpp> #include <com/sun/star/util/SearchFlags.hpp> #include <svl/stritem.hxx> #include <vcl/layout.hxx> @@ -427,7 +428,7 @@ static void lcl_SelectSameStrings(SwWrtShell& rSh, bool bWordOnly, bool bCaseSen { rSh.Push(); - SearchOptions aSearchOpt( + SearchOptions2 aSearchOpt( SearchAlgorithms_ABSOLUTE, ( bWordOnly ? SearchFlags::NORM_WORD_ONLY : 0 ), rSh.GetSelText(), OUString(), @@ -435,7 +436,9 @@ static void lcl_SelectSameStrings(SwWrtShell& rSh, bool bWordOnly, bool bCaseSen 0, 0, 0, (bCaseSensitive ? 0 - : static_cast<int>(TransliterationModules_IGNORE_CASE)) ); + : static_cast<int>(TransliterationModules_IGNORE_CASE)), + SearchAlgorithms2::ABSOLUTE, + '\\' ); rSh.ClearMark(); bool bCancel; diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index b0ddb3bc863d..a09c6c9a89ed 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -2057,7 +2057,7 @@ sal_uInt16 SwPostItMgr::Replace(SvxSearchItem* pItem) return aResult; } -sal_uInt16 SwPostItMgr::FinishSearchReplace(const css::util::SearchOptions& rSearchOptions, bool bSrchForward) +sal_uInt16 SwPostItMgr::FinishSearchReplace(const css::util::SearchOptions2& rSearchOptions, bool bSrchForward) { SwSidebarWin* pWin = GetActiveSidebarWin(); SvxSearchItem aItem(SID_SEARCH_ITEM ); @@ -2069,7 +2069,7 @@ sal_uInt16 SwPostItMgr::FinishSearchReplace(const css::util::SearchOptions& rSea return aResult; } -sal_uInt16 SwPostItMgr::SearchReplace(const SwFormatField &pField, const css::util::SearchOptions& rSearchOptions, bool bSrchForward) +sal_uInt16 SwPostItMgr::SearchReplace(const SwFormatField &pField, const css::util::SearchOptions2& rSearchOptions, bool bSrchForward) { sal_uInt16 aResult = 0; SwSidebarWin* pWin = GetSidebarWin(&pField); diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index ff159305dd6d..5392561cf3c9 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -48,7 +48,7 @@ struct SwCallMouseEvent; class SfxStringListItem; namespace com { namespace sun { namespace star { namespace util { - struct SearchOptions; + struct SearchOptions2; } } } } typedef sal_Int32 SelectionType; @@ -362,7 +362,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); void GetDoStrings( DoType eDoType, SfxStringListItem& rStrLstItem ) const; // search and replace - sal_uLong SearchPattern(const css::util::SearchOptions& rSearchOpt, + sal_uLong SearchPattern(const css::util::SearchOptions2& rSearchOpt, bool bSearchInNotes, SwDocPositions eStart, SwDocPositions eEnd, FindRanges eFlags = FND_IN_BODY, @@ -377,7 +377,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); bool bNoColls, SwDocPositions eStart, SwDocPositions eEnd, FindRanges eFlags = FND_IN_BODY, - const css::util::SearchOptions* pSearchOpt = nullptr, + const css::util::SearchOptions2* pSearchOpt = nullptr, const SfxItemSet* pReplaceSet = nullptr); void AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar ); diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index a20b6a965e4c..60a45b663314 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -18,7 +18,7 @@ */ #include <hintids.hxx> -#include <com/sun/star/util/SearchOptions.hpp> +#include <com/sun/star/util/SearchOptions2.hpp> #include <com/sun/star/util/SearchFlags.hpp> #include <com/sun/star/i18n/TransliterationModules.hpp> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> @@ -96,7 +96,7 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::ui::dialogs; using namespace ::sfx2; -using ::com::sun::star::util::SearchOptions; +using ::com::sun::star::util::SearchOptions2; #define SWSRCVIEWFLAGS ( SfxViewShellFlags::CAN_PRINT | SfxViewShellFlags::NO_NEWWINDOW ) @@ -587,7 +587,7 @@ void SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, pTextView->SetSelection( TextSelection( aPaM, aPaM )); } - util::SearchOptions aSearchOpt( rSearchItem.GetSearchOptions() ); + util::SearchOptions2 aSearchOpt( rSearchItem.GetSearchOptions() ); aSearchOpt.Locale = GetAppLanguageTag().getLocale(); sal_uInt16 nFound; diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 928289cf3d9a..075802f97d52 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -19,7 +19,8 @@ #include <config_features.h> -#include <com/sun/star/util/SearchOptions.hpp> +#include <com/sun/star/util/SearchOptions2.hpp> +#include <com/sun/star/util/SearchAlgorithms2.hpp> #include <com/sun/star/util/SearchFlags.hpp> #include <com/sun/star/i18n/TransliterationModules.hpp> #include <vcl/graphicfilter.hxx> @@ -1986,12 +1987,14 @@ bool SwView::JumpToSwMark( const OUString& rMark ) // normal text search m_pWrtShell->EnterStdMode(); - SearchOptions aSearchOpt( + SearchOptions2 aSearchOpt( SearchAlgorithms_ABSOLUTE, 0, sName, OUString(), SvtSysLocale().GetLanguageTag().getLocale(), 0,0,0, - TransliterationModules_IGNORE_CASE ); + TransliterationModules_IGNORE_CASE, + SearchAlgorithms2::ABSOLUTE, + '\\' ); //todo/mba: assuming that notes shouldn't be searched bool bSearchInNotes = false; diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index bc922495e0f0..d0989d66f2b3 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -26,7 +26,7 @@ #include <hintids.hxx> -#include <com/sun/star/util/SearchOptions.hpp> +#include <com/sun/star/util/SearchOptions2.hpp> #include <svl/cjkoptions.hxx> #include <svl/ctloptions.hxx> #include <svx/pageitem.hxx> @@ -322,7 +322,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) if (bBack) m_pWrtShell->Push(); OUString aReplace( m_pSrchItem->GetReplaceString() ); - SearchOptions aTmp( m_pSrchItem->GetSearchOptions() ); + SearchOptions2 aTmp( m_pSrchItem->GetSearchOptions() ); OUString *pBackRef = ReplaceBackReferences( aTmp, m_pWrtShell->GetCursor() ); if( pBackRef ) m_pSrchItem->SetReplaceString( *pBackRef ); @@ -850,7 +850,7 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions ) // build SearchOptions to be used - SearchOptions aSearchOpt( m_pSrchItem->GetSearchOptions() ); + SearchOptions2 aSearchOpt( m_pSrchItem->GetSearchOptions() ); aSearchOpt.Locale = GetAppLanguageTag().getLocale(); if( !bDoReplace ) aSearchOpt.replaceString.clear(); diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 565af8c894a7..853001f2cd08 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -74,7 +74,7 @@ #include <globals.hrc> #include <unomid.h> #include <unotools/printwarningoptions.hxx> -#include <com/sun/star/util/SearchOptions.hpp> +#include <com/sun/star/util/SearchOptions2.hpp> #include <com/sun/star/lang/ServiceNotRegisteredException.hpp> #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/util/XNumberFormatsSupplier.hpp> @@ -755,7 +755,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor > int eRanges(FND_IN_BODY|FND_IN_SELALL); - util::SearchOptions aSearchOpt; + util::SearchOptions2 aSearchOpt; pSearch->FillSearchOptions( aSearchOpt ); SwDocPositions eStart = pSearch->bBack ? DOCPOS_END : DOCPOS_START; @@ -878,7 +878,7 @@ SwUnoCursor* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > rRangeNode.FindFooterStartNode() ; } - util::SearchOptions aSearchOpt; + util::SearchOptions2 aSearchOpt; pSearch->FillSearchOptions( aSearchOpt ); /** diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx index 3226dd6ff316..71dce0e22fc6 100644 --- a/sw/source/uibase/wrtsh/select.cxx +++ b/sw/source/uibase/wrtsh/select.cxx @@ -42,7 +42,7 @@ #include <memory> namespace com { namespace sun { namespace star { namespace util { - struct SearchOptions; + struct SearchOptions2; } } } } using namespace ::com::sun::star::util; @@ -210,7 +210,7 @@ long SwWrtShell::SelAll() // Description: Text search -sal_uLong SwWrtShell::SearchPattern( const SearchOptions& rSearchOpt, bool bSearchInNotes, +sal_uLong SwWrtShell::SearchPattern( const SearchOptions2& rSearchOpt, bool bSearchInNotes, SwDocPositions eStt, SwDocPositions eEnd, FindRanges eFlags, bool bReplace ) { @@ -256,7 +256,7 @@ sal_uLong SwWrtShell::SearchTempl( const OUString &rTempl, sal_uLong SwWrtShell::SearchAttr( const SfxItemSet& rFindSet, bool bNoColls, SwDocPositions eStart, SwDocPositions eEnd, - FindRanges eFlags, const SearchOptions* pSearchOpt, + FindRanges eFlags, const SearchOptions2* pSearchOpt, const SfxItemSet* pReplaceSet ) { // no enhancement of existing selections |