diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-23 09:42:09 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-08-23 09:54:16 +0200 |
commit | f091a4d82e383b2beab91ecd01d9f6a700377a2e (patch) | |
tree | 8d462c15bef61a8814980a75eaebd57d4536c95c | |
parent | f8d980a813fb0125a2d7bb332450b2ab1d943031 (diff) |
convert SearchLabel to scoped enum
Change-Id: I0c62a3166b9284895f119c600776dc2c7d6d1078
-rwxr-xr-x | include/svx/srchdlg.hxx | 12 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/Outliner.cxx | 10 | ||||
-rwxr-xr-x | svx/source/dialog/srchdlg.cxx | 8 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbunosearchcontrollers.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewsrch.cxx | 14 |
6 files changed, 27 insertions, 27 deletions
diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx index 637a7a0553be..f77f3f55fcab 100755 --- a/include/svx/srchdlg.hxx +++ b/include/svx/srchdlg.hxx @@ -78,13 +78,13 @@ public: // class SvxSearchDialogWrapper ------------------------------------------ -enum SearchLabel +enum class SearchLabel { - SL_Empty, - SL_End, - SL_Start, - SL_EndSheet, - SL_NotFound + Empty, + End, + Start, + EndSheet, + NotFound }; class SvxSearchDialog; diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 85f969e87a95..a92d2bea2985 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -1657,7 +1657,7 @@ void ScViewFunc::AutoFormat( sal_uInt16 nFormatNo ) bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, bool bAddUndo, bool bIsApi ) { - SvxSearchDialogWrapper::SetSearchLabel(SL_Empty); + SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::Empty); ScDocShell* pDocSh = GetViewData().GetDocShell(); ScDocument& rDoc = pDocSh->GetDocument(); ScMarkData& rMark = GetViewData().GetMarkData(); @@ -1792,9 +1792,9 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, if (!bIsApi) { if ( nStartTab == nEndTab ) - SvxSearchDialogWrapper::SetSearchLabel(SL_EndSheet); + SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::EndSheet); else - SvxSearchDialogWrapper::SetSearchLabel(SL_End); + SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::End); ScDocument::GetSearchAndReplaceStart( *pSearchItem, nCol, nRow ); if (pSearchItem->GetBackward()) @@ -1818,7 +1818,7 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, if (!bIsApi) { GetViewData().GetViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, pSearchItem->GetSearchString().toUtf8().getStr()); - SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound); + SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NotFound); } break; // break 'while (TRUE)' diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 61e06e147a95..53c7f98a817a 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -442,7 +442,7 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem) bool bEndOfSearch = true; // clear the search toolbar entry - SvxSearchDialogWrapper::SetSearchLabel(SL_Empty); + SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::Empty); mpDrawDocument->GetDocSh()->SetWaitCursor( true ); if (mbPrepareSpellingPending) @@ -1170,7 +1170,7 @@ void Outliner::ShowEndOfSearchDialog() { if (!mbStringFound) { - SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound); + SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NotFound); std::shared_ptr<ViewShell> pViewShell(mpWeakViewShell.lock()); if (pViewShell) { @@ -1205,9 +1205,9 @@ bool Outliner::ShowWrapArroundDialog() if (nCommand == SvxSearchCmd::REPLACE || nCommand == SvxSearchCmd::FIND) { if (mbDirectionIsForward) - SvxSearchDialogWrapper::SetSearchLabel(SL_End); + SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::End); else - SvxSearchDialogWrapper::SetSearchLabel(SL_Start); + SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::Start); return true; } @@ -1481,7 +1481,7 @@ bool Outliner::HandleFailedSearch() if (HasNoPreviousMatch ()) { // No match found in the whole presentation. - SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound); + SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NotFound); } else diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index ea1f9a1631e9..9cc4cbddfd96 100755 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -2401,13 +2401,13 @@ static vcl::Window* lcl_GetSearchLabelWindow() void SvxSearchDialogWrapper::SetSearchLabel(const SearchLabel& rSL) { OUString sStr; - if (rSL == SL_End) + if (rSL == SearchLabel::End) sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_END); - else if (rSL == SL_Start) + else if (rSL == SearchLabel::Start) sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_START); - else if (rSL == SL_EndSheet) + else if (rSL == SearchLabel::EndSheet) sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_END_SHEET); - else if (rSL == SL_NotFound) + else if (rSL == SearchLabel::NotFound) sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_NOT_FOUND); if (vcl::Window *pSearchLabel = lcl_GetSearchLabelWindow()) diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 0979bf74b952..8eb93515e564 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -210,7 +210,7 @@ bool FindTextFieldControl::PreNotify( NotifyEvent& rNEvt ) { // Clear SearchLabel when altering the search string #if HAVE_FEATURE_DESKTOP - SvxSearchDialogWrapper::SetSearchLabel(SL_Empty); + SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::Empty); #endif const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent(); diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index d773d10edb26..2c8752c59d95 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -273,7 +273,7 @@ void SwView::ExecSearch(SfxRequest& rReq) if( !bQuiet ) { m_pWrtShell->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, m_pSrchItem->GetSearchString().toUtf8().getStr()); - SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound); + SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NotFound); } #endif m_bFound = false; @@ -394,7 +394,7 @@ void SwView::ExecSearch(SfxRequest& rReq) if( !bQuiet ) { m_pWrtShell->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, m_pSrchItem->GetSearchString().toUtf8().getStr()); - SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound); + SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NotFound); } #endif m_bFound = false; @@ -590,7 +590,7 @@ bool SwView::SearchAndWrap(bool bApi) { #if HAVE_FEATURE_DESKTOP m_pWrtShell->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, m_pSrchItem->GetSearchString().toUtf8().getStr()); - SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound); + SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NotFound); #endif } m_bFound = false; @@ -636,14 +636,14 @@ bool SwView::SearchAndWrap(bool bApi) if (m_bFound) { if (!bSrchBkwrd) - SvxSearchDialogWrapper::SetSearchLabel(SL_End); + SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::End); else - SvxSearchDialogWrapper::SetSearchLabel(SL_Start); + SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::Start); } else if(!bApi) { m_pWrtShell->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_SEARCH_NOT_FOUND, m_pSrchItem->GetSearchString().toUtf8().getStr()); - SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound); + SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::NotFound); } #endif return m_bFound; @@ -786,7 +786,7 @@ SwSearchOptions::SwSearchOptions( SwWrtShell* pSh, bool bBackward ) sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions ) { #if HAVE_FEATURE_DESKTOP - SvxSearchDialogWrapper::SetSearchLabel(SL_Empty); + SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::Empty); #endif bool bDoReplace = m_pSrchItem->GetCommand() == SvxSearchCmd::REPLACE || m_pSrchItem->GetCommand() == SvxSearchCmd::REPLACE_ALL; |