diff options
author | Noel Grandin <noel@peralex.com> | 2015-02-27 10:08:03 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-02 08:59:18 +0200 |
commit | 3c866bb8e42554ac96d3588208e167e7786e2d00 (patch) | |
tree | 9214124ed0b7d8274c5609725ed72a97466bbfce /sw/source | |
parent | f9ba16e44b2813dd1fc9b0e06994f67c6350f050 (diff) |
replace SVX_SEARCHCMD_ constants with enum class
Change-Id: I675c488742219cc19624a21d1fc8e5033e7cbefa
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/uibase/uiview/srcview.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewsrch.cxx | 26 |
2 files changed, 17 insertions, 17 deletions
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index 798b58c03bdb..13eebe75f2ff 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -594,13 +594,13 @@ sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, bool bAll = false; switch( rSearchItem.GetCommand() ) { - case SVX_SEARCHCMD_FIND: - case SVX_SEARCHCMD_FIND_ALL: + case SvxSearchCmd::FIND: + case SvxSearchCmd::FIND_ALL: nFound = pTextView->Search( aSearchOpt, bForward ) ? 1 : 0; break; - case SVX_SEARCHCMD_REPLACE_ALL: bAll = true; - case SVX_SEARCHCMD_REPLACE: + case SvxSearchCmd::REPLACE_ALL: bAll = true; + case SvxSearchCmd::REPLACE: nFound = pTextView->Replace( aSearchOpt, bAll, bForward ); break; diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index c329193587ad..8ed5c40b764c 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -186,7 +186,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) } switch (m_pSrchItem->GetCommand()) { - case SVX_SEARCHCMD_FIND: + case SvxSearchCmd::FIND: { bool bRet = SearchAndWrap(bApi); if( bRet ) @@ -206,7 +206,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) #endif } break; - case SVX_SEARCHCMD_FIND_ALL: + case SvxSearchCmd::FIND_ALL: { bool bRet = SearchAll(); if( !bRet ) @@ -233,14 +233,14 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) #endif } break; - case SVX_SEARCHCMD_REPLACE: + case SvxSearchCmd::REPLACE: { // 1) Replace selection (Not if only attributes should be replaced) //JP 27.04.95: Why? // what if you only want to assign attributes to the found?? - sal_uInt16 nCmd = SVX_SEARCHCMD_FIND; + SvxSearchCmd nCmd = SvxSearchCmd::FIND; if( !m_pSrchItem->GetReplaceString().isEmpty() || !m_pReplList ) { @@ -267,11 +267,11 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) } } else if( m_pReplList ) - nCmd = SVX_SEARCHCMD_REPLACE; + nCmd = SvxSearchCmd::REPLACE; // 2) Search further (without replacing!) - sal_uInt16 nOldCmd = m_pSrchItem->GetCommand(); + SvxSearchCmd nOldCmd = m_pSrchItem->GetCommand(); m_pSrchItem->SetCommand( nCmd ); bool bRet = SearchAndWrap(bApi); if( bRet ) @@ -294,7 +294,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage) #endif break; - case SVX_SEARCHCMD_REPLACE_ALL: + case SvxSearchCmd::REPLACE_ALL: { SwSearchOptions aOpts( m_pWrtShell, m_pSrchItem->GetBackward() ); m_bExtra = false; @@ -613,10 +613,10 @@ void SwView::Replace() SwPosition aStartPos = (* m_pWrtShell->GetSwCrsr()->Start()); SwPosition aEndPos = (* m_pWrtShell->GetSwCrsr()->End()); bool bHasSelection = m_pSrchItem->GetSelection(); - sal_uInt16 nOldCmd = m_pSrchItem->GetCommand(); + SvxSearchCmd nOldCmd = m_pSrchItem->GetCommand(); //set state for checking if current selection has a match - m_pSrchItem->SetCommand( SVX_SEARCHCMD_FIND ); + m_pSrchItem->SetCommand( SvxSearchCmd::FIND ); m_pSrchItem->SetSelection(true); //check if it matchs @@ -692,13 +692,13 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions ) #if HAVE_FEATURE_DESKTOP SvxSearchDialogWrapper::SetSearchLabel(SL_Empty); #endif - bool bDoReplace = m_pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE || - m_pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE_ALL; + bool bDoReplace = m_pSrchItem->GetCommand() == SvxSearchCmd::REPLACE || + m_pSrchItem->GetCommand() == SvxSearchCmd::REPLACE_ALL; int eRanges = m_pSrchItem->GetSelection() ? FND_IN_SEL : m_bExtra ? FND_IN_OTHER : FND_IN_BODY; - if (m_pSrchItem->GetCommand() == SVX_SEARCHCMD_FIND_ALL || - m_pSrchItem->GetCommand() == SVX_SEARCHCMD_REPLACE_ALL) + if (m_pSrchItem->GetCommand() == SvxSearchCmd::FIND_ALL || + m_pSrchItem->GetCommand() == SvxSearchCmd::REPLACE_ALL) eRanges |= FND_IN_SELALL; m_pWrtShell->SttSelect(); |