diff options
Diffstat (limited to 'sw/source')
-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 |
12 files changed, 51 insertions, 42 deletions
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 |