include/svx/dialogs.hrc | 1 include/svx/srchdlg.hxx | 5 - sc/inc/globstr.hrc | 7 - sc/source/ui/src/globstr.src | 24 ------ sc/source/ui/view/viewfun2.cxx | 41 +--------- sc/uiconfig/scalc/toolbar/findbar.xml | 2 svx/source/dialog/srchdlg.cxx | 132 +++++----------------------------- svx/source/dialog/srchdlg.src | 4 + svx/uiconfig/ui/findreplacedialog.ui | 15 --- sw/inc/mdiexp.hxx | 3 sw/source/core/crsr/viscrs.cxx | 3 sw/source/ui/docvw/edtwin3.cxx | 5 - sw/source/ui/inc/view.hxx | 2 sw/source/ui/uiview/view.hrc | 2 sw/source/ui/uiview/viewsrch.cxx | 35 ++------- 15 files changed, 51 insertions(+), 230 deletions(-)
New commits: commit d50e08b4e18ad6fa8b4078df6e23ffbaf47e708c Author: Matúš Kukan <matus.ku...@collabora.com> Date: Wed Feb 5 13:47:45 2014 +0100 fdo#74132: Do not interrupt search in Calc. Extending f25cdaa78d5e7d200fbaf31cce9895bab7c5ee63 "fdo#74132: Do not interrupt search in Writer." for Calc. Change-Id: I3a7e5070300993d2811a79f17cb1b2edb0355c44 diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index e0d7095..cc31b77 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -242,6 +242,7 @@ #define RID_SVXSTR_LANGUAGE_ALL (RID_SVX_START + 15) // Strings from the search dialog +#define RID_SVXSTR_SEARCH_END_SHEET (RID_SVX_START + 71) #define RID_SVXSTR_SEARCH_END (RID_SVX_START + 79) #define RID_SVXSTR_SEARCH_STYLES (RID_SVX_START + 80) #define RID_SVXSTR_SEARCH (RID_SVX_START + 81) diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx index 50f7d63..07cf330 100644 --- a/include/svx/srchdlg.hxx +++ b/include/svx/srchdlg.hxx @@ -82,8 +82,9 @@ public: enum SearchLabel { SL_Empty, - SL_NotFound, - SL_End + SL_End, + SL_EndSheet, + SL_NotFound }; class SvxSearchDialog; diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc index f02ef51..c402de2 100644 --- a/sc/inc/globstr.hrc +++ b/sc/inc/globstr.hrc @@ -89,7 +89,6 @@ #define STR_MSSG_INSERTCELLS_0 50 #define STR_MSSG_DELETECELLS_0 51 #define STR_MSSG_MERGECELLS_0 52 -#define STR_MSSG_SEARCHANDREPLACE_0 53 #define STR_MSSG_SOLVE_0 54 #define STR_MSSG_SOLVE_1 55 #define STR_MSSG_SOLVE_2 56 @@ -301,9 +300,6 @@ #define STR_NAMECONFLICT 223 #define STR_ERR_AUTOFILTER 224 -#define STR_MSSG_SEARCHANDREPLACE_1 225 -#define STR_MSSG_SEARCHANDREPLACE_2 226 -#define STR_MSSG_SEARCHANDREPLACE_3 227 #define STR_CREATENAME_REPLACE 228 #define STR_CREATENAME_MARKERR 229 @@ -476,9 +472,6 @@ #define STR_CLOSE_ERROR_LINK 351 #define STR_UNDO_RANGENAMES 352 -#define STR_MSSG_SEARCHANDREPLACE_4 353 -#define STR_MSSG_SEARCHANDREPLACE_5 354 - #define STR_UNDO_RESIZEMATRIX 355 #define STR_TIP_RESIZEMATRIX 356 diff --git a/sc/source/ui/src/globstr.src b/sc/source/ui/src/globstr.src index 1944470..47c5d94 100644 --- a/sc/source/ui/src/globstr.src +++ b/sc/source/ui/src/globstr.src @@ -437,10 +437,6 @@ Resource RID_GLOBSTR { Text [ en-US ] = "Ranges containing merged cells can only be sorted without formats." ; }; - String STR_MSSG_SEARCHANDREPLACE_0 - { - Text [ en-US ] = "Search key not found." ; - }; String STR_MSSG_SOLVE_0 { Text [ en-US ] = "Goal Seek succeeded. Result: " ; @@ -1189,26 +1185,6 @@ Resource RID_GLOBSTR { Text [ en-US ] = "AutoFilter not possible" ; }; - String STR_MSSG_SEARCHANDREPLACE_1 - { - Text [ en-US ] = "%PRODUCTNAME Calc has searched to the beginning of the sheet. Do you want to continue at the end?" ; - }; - String STR_MSSG_SEARCHANDREPLACE_2 - { - Text [ en-US ] = "%PRODUCTNAME Calc has searched to the end of the sheet. Do you want to continue at the beginning?" ; - }; - String STR_MSSG_SEARCHANDREPLACE_3 - { - Text [ en-US ] = "Find & Replace" ; - }; - String STR_MSSG_SEARCHANDREPLACE_4 - { - Text [ en-US ] = "%PRODUCTNAME Calc has searched to the beginning of the document. Do you want to continue at the end?" ; - }; - String STR_MSSG_SEARCHANDREPLACE_5 - { - Text [ en-US ] = "%PRODUCTNAME Calc has searched to the end of the document. Do you want to continue at the beginning?" ; - }; String STR_CREATENAME_REPLACE { Text [ en-US ] = "Replace existing definition of #?" ; diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 76afd32..8d32061 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -34,6 +34,7 @@ #include <sfx2/viewfrm.hxx> #include <svl/stritem.hxx> #include <svl/zforlist.hxx> +#include <svx/srchdlg.hxx> #include <svx/svdview.hxx> #include <vcl/msgbox.hxx> #include <vcl/waitobj.hxx> @@ -1552,6 +1553,7 @@ void ScViewFunc::AutoFormat( sal_uInt16 nFormatNo, sal_Bool bRecord ) sal_Bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, sal_Bool bAddUndo, sal_Bool bIsApi ) { + SvxSearchDialogWrapper::SetSearchLabel(SL_Empty); ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); ScMarkData& rMark = GetViewData()->GetMarkData(); @@ -1657,37 +1659,14 @@ sal_Bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, nCommand == SVX_SEARCHCMD_REPLACE) ) { bFirst = false; - sal_uInt16 nRetVal; GetFrameWin()->LeaveWait(); - if ( bIsApi ) - nRetVal = RET_NO; - else + if (!bIsApi) { - // search dialog as parent (if available) - Window* pParent = GetParentOrChild(SID_SEARCH_DLG); - sal_uInt16 nStrId; - if ( pSearchItem->GetBackward() ) - { - if ( nStartTab == nEndTab ) - nStrId = STR_MSSG_SEARCHANDREPLACE_1; - else - nStrId = STR_MSSG_SEARCHANDREPLACE_4; - } + if ( nStartTab == nEndTab ) + SvxSearchDialogWrapper::SetSearchLabel(SL_EndSheet); else - { - if ( nStartTab == nEndTab ) - nStrId = STR_MSSG_SEARCHANDREPLACE_2; - else - nStrId = STR_MSSG_SEARCHANDREPLACE_5; - } - MessBox aBox( pParent, WinBits(WB_YES_NO | WB_DEF_YES), - ScGlobal::GetRscString( STR_MSSG_SEARCHANDREPLACE_3 ), - ScGlobal::GetRscString( nStrId ) ); - nRetVal = aBox.Execute(); - } + SvxSearchDialogWrapper::SetSearchLabel(SL_End); - if ( nRetVal == RET_YES ) - { ScDocument::GetSearchAndReplaceStart( *pSearchItem, nCol, nRow ); if (pSearchItem->GetBackward()) nTab = nEndTab; @@ -1708,13 +1687,7 @@ sal_Bool ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, GetFrameWin()->LeaveWait(); if (!bIsApi) - { - // search dialog as parent if available - Window* pParent = GetParentOrChild(SID_SEARCH_DLG); - // "nothing found" - InfoBox aBox( pParent, ScGlobal::GetRscString( STR_MSSG_SEARCHANDREPLACE_0 ) ); - aBox.Execute(); - } + SvxSearchDialogWrapper::SetSearchLabel(SL_NotFound); break; // break 'while (TRUE)' } diff --git a/sc/uiconfig/scalc/toolbar/findbar.xml b/sc/uiconfig/scalc/toolbar/findbar.xml index 4e8ec6b..807ffbf 100644 --- a/sc/uiconfig/scalc/toolbar/findbar.xml +++ b/sc/uiconfig/scalc/toolbar/findbar.xml @@ -26,4 +26,6 @@ <toolbar:toolbaritem xlink:href=".uno:MatchCase"/> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:SearchDialog"/> + <toolbar:toolbarseparator/> + <toolbar:toolbaritem xlink:href=".uno:SearchLabel"/> </toolbar:toolbar> diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 4e6b23e..cd79324 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -2270,6 +2270,8 @@ void SvxSearchDialogWrapper::SetSearchLabel(const SearchLabel& rSL) OUString sStr; if (rSL == SL_End) sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_END); + else if (rSL == SL_EndSheet) + sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_END_SHEET); else if (rSL == SL_NotFound) sStr = SVX_RESSTR(RID_SVXSTR_SEARCH_NOT_FOUND); diff --git a/svx/source/dialog/srchdlg.src b/svx/source/dialog/srchdlg.src index 18b5e11..c0fd4e5 100644 --- a/svx/source/dialog/srchdlg.src +++ b/svx/source/dialog/srchdlg.src @@ -46,6 +46,10 @@ String RID_SVXSTR_SEARCH_END { Text [ en-US ] = "Reached the end of the document" ; }; +String RID_SVXSTR_SEARCH_END_SHEET +{ + Text [ en-US ] = "Reached the end of the sheet" ; +}; String RID_SVXSTR_SEARCH_NOT_FOUND { Text [ en-US ] = "Search key not found" ; commit 4784e94cec2e8f96a08add2f19f482057058b2eb Author: Matúš Kukan <matus.ku...@collabora.com> Date: Tue Feb 4 18:16:37 2014 +0100 GetSearchDialog() returns SvxSearchDialog; and use it in more places too. diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx index fe7b902..4c715c7 100644 --- a/sw/inc/mdiexp.hxx +++ b/sw/inc/mdiexp.hxx @@ -26,7 +26,6 @@ class SwRect; class Size; -class Dialog; class SwViewShell; class SwDoc; class SwDocShell; @@ -52,8 +51,6 @@ void RescheduleProgress( SwDocShell *pDocShell ); void EnableCmdInterface(sal_Bool bEnable = sal_True); -Dialog* GetSearchDialog(); - void RepaintPagePreview( SwViewShell* pVwSh, const SwRect& rRect ); // ndgrf.cxx diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index d88c3a9..0d410f8 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -40,6 +40,7 @@ #include <mdiexp.hxx> #include <wrtsh.hxx> #include <comcore.hrc> +#include <view.hxx> #include <svx/sdr/overlay/overlaymanager.hxx> #include <svx/sdrpaintwindow.hxx> @@ -584,7 +585,7 @@ SwCursor* SwShellCrsr::Create( SwPaM* pRing ) const short SwShellCrsr::MaxReplaceArived() { short nRet = RET_YES; - Window* pDlg = ::GetSearchDialog(); + Window* pDlg = (Window*) SwView::GetSearchDialog(); if( pDlg ) { // Terminate old actions. The table-frames get constructed and diff --git a/sw/source/ui/docvw/edtwin3.cxx b/sw/source/ui/docvw/edtwin3.cxx index 1ca1025..36ea5e4 100644 --- a/sw/source/ui/docvw/edtwin3.cxx +++ b/sw/source/ui/docvw/edtwin3.cxx @@ -130,11 +130,6 @@ void SwAccessibilityScrollMDI(SwViewShell* pVwSh, const SwRect& rRect , sal_uInt } -Dialog* GetSearchDialog() -{ - return SwView::GetSearchDialog(); -} - TblChgMode GetTblChgDefaultMode() { SwModuleOptions* pOpt = SW_MOD()->GetModuleConfig(); diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index d6b6822..2bcb9b5 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -483,7 +483,7 @@ public: void CheckVisArea(); void RecheckBrowseMode(); - static Dialog* GetSearchDialog(); + static SvxSearchDialog* GetSearchDialog(); static sal_uInt16 GetMoveType(); static void SetMoveType(sal_uInt16 nSet); diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx index f9ca081..1f66823 100644 --- a/sw/source/ui/uiview/viewsrch.cxx +++ b/sw/source/ui/uiview/viewsrch.cxx @@ -77,22 +77,15 @@ struct SwSearchOptions SwSearchOptions( SwWrtShell* pSh, sal_Bool bBackward ); }; -static Window* GetParentWindow( SvxSearchDialog* m_pSrchDlg ) +static Window* GetParentWindow( SvxSearchDialog* pSrchDlg ) { - Window* pWin; - if( m_pSrchDlg && m_pSrchDlg->IsVisible() ) - pWin = m_pSrchDlg; - else - pWin = 0; - return pWin; + return pSrchDlg && pSrchDlg->IsVisible() ? pSrchDlg : 0; } void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage) { const SfxItemSet* pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = 0; - const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId(); - SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId); sal_Bool bQuiet = sal_False; if(pArgs && SFX_ITEM_SET == pArgs->GetItemState(SID_SEARCH_QUIET, sal_False, &pItem)) bQuiet = ((const SfxBoolItem*) pItem)->GetValue(); @@ -135,9 +128,9 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage) DELETEZ( m_pSrchList ); DELETEZ( m_pReplList ); - if ( pWrp ) + m_pSrchDlg = GetSearchDialog(); + if (m_pSrchDlg) { - m_pSrchDlg = static_cast <SvxSearchDialog*> (pWrp->getDialog ()); // We will remember the search-/replace items. const SearchAttrItemList* pList = m_pSrchDlg->GetSearchItemList(); if( pList && pList->Count() ) @@ -156,14 +149,9 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage) { if(FID_SEARCH_NOW == nSlot && !rReq.IsAPI()) SwView::SetMoveType(NID_SRCH_REP); - if ( pWrp ) - { - m_pSrchDlg = static_cast <SvxSearchDialog*> (pWrp->getDialog ()); - } - else - m_pSrchDlg = 0; } + m_pSrchDlg = GetSearchDialog(); if (m_pSrchDlg) { DELETEZ( m_pSrchList ); @@ -503,10 +491,6 @@ sal_Bool SwView::SearchAndWrap(sal_Bool bApi) else m_bExtra = !m_bExtra; - const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId(); - SvxSearchDialogWrapper *pDlgWrp = (SvxSearchDialogWrapper*)GetViewFrame()->GetChildWindow(nId); - m_pSrchDlg = pDlgWrp ? static_cast <SvxSearchDialog*> (pDlgWrp->getDialog ()) : 0; - // If starting position is at the end or beginning of the document. if (aOpts.bDontWrap) { @@ -775,14 +759,11 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions ) return nFound; } -Dialog* SwView::GetSearchDialog() +SvxSearchDialog* SwView::GetSearchDialog() { const sal_uInt16 nId = SvxSearchDialogWrapper::GetChildWindowId(); - SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*)SfxViewFrame::Current()->GetChildWindow(nId); - if ( pWrp ) - m_pSrchDlg = pWrp->getDialog (); - else - m_pSrchDlg = 0; + SvxSearchDialogWrapper *pWrp = (SvxSearchDialogWrapper*) SfxViewFrame::Current()->GetChildWindow(nId); + m_pSrchDlg = pWrp ? pWrp->getDialog () : 0; return m_pSrchDlg; } commit ac789ae775d30e97e13da6e82360f47d9d9cdff2 Author: Matúš Kukan <matus.ku...@collabora.com> Date: Tue Feb 4 18:12:19 2014 +0100 MSG_SEARCH_FOO unused Change-Id: I61ed39e3fc6ba1a6fe024693683f32a6a7ca88f1 diff --git a/sw/source/ui/uiview/view.hrc b/sw/source/ui/uiview/view.hrc index 8e7a729..aa55887e 100644 --- a/sw/source/ui/uiview/view.hrc +++ b/sw/source/ui/uiview/view.hrc @@ -30,8 +30,6 @@ #define STR_EDIT_FOOTNOTE (RC_VIEW_BEGIN + 14) -#define MSG_SEARCH_START (RC_VIEW_BEGIN + 17) -#define MSG_SEARCH_END (RC_VIEW_BEGIN + 18) #define STR_NB_REPLACED (RC_VIEW_BEGIN + 20) #define MSG_SCAN_NOSOURCE (RC_VIEW_BEGIN + 21) commit bd07555b6d7e69e0c9f51de2b969f59368673bcc Author: Matúš Kukan <matus.ku...@collabora.com> Date: Tue Feb 4 17:07:09 2014 +0100 SvxSearchDialog: Remove always false bMultiLineEdit. Seems to be at least from 5c4b13d1bea4aedb72677f0317d5334638c03918. 'searchformat' and 'replaceformat' becomes then unused too. Change-Id: Id5276e22478e5f863c12eadd7a7172d80ea685bb diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index dd93615..4e6b23e 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -105,11 +105,7 @@ namespace struct SearchDlg_Impl { - FixedText* m_pSearchFormats; - FixedText* m_pReplaceFormats; - - sal_Bool bMultiLineEdit : 1, - bSaveToModule : 1, + sal_Bool bSaveToModule : 1, bFocusOnSearch : 1; sal_uInt16* pRanges; Timer aSelectionTimer; @@ -119,16 +115,11 @@ struct SearchDlg_Impl util::URL aCommand1URL; util::URL aCommand2URL; - SearchDlg_Impl( SvxSearchDialog* pParent ) - : bMultiLineEdit(false) - , bSaveToModule(true) + SearchDlg_Impl() + : bSaveToModule(true) , bFocusOnSearch(true) , pRanges(NULL) { - pParent->get(m_pSearchFormats, "searchformat"); - m_pSearchFormats->SetStyle(m_pSearchFormats->GetStyle() | WB_PATHELLIPSIS); - pParent->get(m_pReplaceFormats, "replaceformat"); - m_pReplaceFormats->SetStyle(m_pReplaceFormats->GetStyle() | WB_PATHELLIPSIS); aCommand1URL.Complete = aCommand1URL.Main = "vnd.sun.search:SearchViaComponent1"; aCommand1URL.Protocol = "vnd.sun.search:"; aCommand1URL.Path = "SearchViaComponent1"; @@ -373,7 +364,7 @@ SvxSearchDialog::~SvxSearchDialog() void SvxSearchDialog::Construct_Impl() { // temporary to avoid incompatibility - pImpl = new SearchDlg_Impl( this ); + pImpl = new SearchDlg_Impl(); pImpl->aSelectionTimer.SetTimeout( 500 ); pImpl->aSelectionTimer.SetTimeoutHdl( LINK( this, SvxSearchDialog, TimeoutHdl_Impl ) ); @@ -592,10 +583,7 @@ void SvxSearchDialog::InitControls_Impl() Link aLink = LINK( this, SvxSearchDialog, FocusHdl_Impl ); m_pSearchLB->SetGetFocusHdl( aLink ); - pImpl->m_pSearchFormats->SetGetFocusHdl( aLink ); - m_pReplaceLB->SetGetFocusHdl( aLink ); - pImpl->m_pReplaceFormats->SetGetFocusHdl( aLink ); aLink = LINK( this, SvxSearchDialog, LoseFocusHdl_Impl ); m_pSearchLB->SetLoseFocusHdl( aLink ); @@ -735,31 +723,6 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern ) bWriter = ( pSearchItem->GetAppFlag() == SVX_SEARCHAPP_WRITER ); - pImpl->bMultiLineEdit = sal_False; - - if ( !pImpl->bMultiLineEdit ) - { - pImpl->m_pSearchFormats->Hide(); - m_pSearchAttrText->Show(); - pImpl->m_pReplaceFormats->Hide(); - m_pReplaceAttrText->Show(); - } - else - { - OUString aText = m_pSearchAttrText->GetText(); - m_pSearchAttrText->Hide(); - - if ( !aText.isEmpty() ) - pImpl->m_pSearchFormats->SetText( aText ); - pImpl->m_pSearchFormats->Show(); - aText = m_pReplaceAttrText->GetText(); - m_pReplaceAttrText->Hide(); - - if ( !aText.isEmpty() ) - pImpl->m_pReplaceFormats->SetText( aText ); - pImpl->m_pReplaceFormats->Show(); - } - if ( ( nModifyFlag & MODIFY_WORD ) == 0 ) m_pWordBtn->Check( pSearchItem->GetWordOnly() ); if ( ( nModifyFlag & MODIFY_EXACT ) == 0 ) @@ -979,14 +942,8 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern ) else EnableControl_Impl(m_pWordBtn); - OUString aSrchAttrTxt; - - if ( pImpl->bMultiLineEdit ) - aSrchAttrTxt = pImpl->m_pSearchFormats->GetText(); - else - aSrchAttrTxt = m_pSearchAttrText->GetText(); - - bDisableSearch = m_pSearchLB->GetText().isEmpty() && aSrchAttrTxt.isEmpty(); + bDisableSearch = m_pSearchLB->GetText().isEmpty() && + m_pSearchAttrText->GetText().isEmpty(); } FocusHdl_Impl(m_pSearchLB); @@ -1014,8 +971,7 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern ) } } - if ( ( !pImpl->bMultiLineEdit && !m_pSearchAttrText->GetText().isEmpty() ) || - ( pImpl->bMultiLineEdit && !pImpl->m_pSearchFormats->GetText().isEmpty() ) ) + if (!m_pSearchAttrText->GetText().isEmpty()) EnableControl_Impl(m_pNoFormatBtn); else m_pNoFormatBtn->Disable(); @@ -1070,10 +1026,7 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet, { pSearchList->Put( *pSSet ); - if ( !pImpl->bMultiLineEdit ) - m_pSearchAttrText->SetText( BuildAttrText_Impl( aDesc, sal_True ) ); - else - pImpl->m_pSearchFormats->SetText( BuildAttrText_Impl( aDesc, sal_True ) ); + m_pSearchAttrText->SetText( BuildAttrText_Impl( aDesc, sal_True ) ); if ( !aDesc.isEmpty() ) bFormat |= sal_True; @@ -1089,10 +1042,7 @@ void SvxSearchDialog::InitAttrList_Impl( const SfxItemSet* pSSet, { pReplaceList->Put( *pRSet ); - if ( !pImpl->bMultiLineEdit ) - m_pReplaceAttrText->SetText( BuildAttrText_Impl( aDesc, sal_False ) ); - else - pImpl->m_pReplaceFormats->SetText( BuildAttrText_Impl( aDesc, sal_False ) ); + m_pReplaceAttrText->SetText( BuildAttrText_Impl( aDesc, sal_False ) ); if ( !aDesc.isEmpty() ) bFormat |= sal_True; @@ -1403,12 +1353,7 @@ IMPL_LINK( SvxSearchDialog, ModifyHdl_Impl, ComboBox *, pEd ) sal_Int32 nReplTxtLen = 0; if (bAllowEmptySearch) nReplTxtLen = m_pReplaceLB->GetText().getLength(); - sal_Int32 nAttrTxtLen = 0; - - if ( !pImpl->bMultiLineEdit ) - nAttrTxtLen = m_pSearchAttrText->GetText().getLength(); - else - nAttrTxtLen = pImpl->m_pSearchFormats->GetText().getLength(); + sal_Int32 nAttrTxtLen = m_pSearchAttrText->GetText().getLength(); if (nSrchTxtLen || nReplTxtLen || nAttrTxtLen) { @@ -1483,16 +1428,8 @@ IMPL_LINK_NOARG(SvxSearchDialog, TemplateHdl_Impl) m_pSearchLB->Hide(); m_pReplaceLB->Hide(); - if ( !pImpl->bMultiLineEdit ) - { - m_pSearchAttrText->SetText( sDesc ); - m_pReplaceAttrText->SetText( sDesc ); - } - else - { - pImpl->m_pSearchFormats->SetText( sDesc ); - pImpl->m_pReplaceFormats->SetText( sDesc ); - } + m_pSearchAttrText->SetText( sDesc ); + m_pReplaceAttrText->SetText( sDesc ); } m_pFormatBtn->Disable(); m_pNoFormatBtn->Disable(); @@ -1512,16 +1449,8 @@ IMPL_LINK_NOARG(SvxSearchDialog, TemplateHdl_Impl) m_pSearchTmplLB->Hide(); m_pReplaceTmplLB->Hide(); - if ( !pImpl->bMultiLineEdit ) - { - m_pSearchAttrText->SetText( BuildAttrText_Impl( sDesc, sal_True ) ); - m_pReplaceAttrText->SetText( BuildAttrText_Impl( sDesc, sal_False ) ); - } - else - { - pImpl->m_pSearchFormats->SetText( BuildAttrText_Impl( sDesc, sal_True ) ); - pImpl->m_pReplaceFormats->SetText( BuildAttrText_Impl( sDesc, sal_False ) ); - } + m_pSearchAttrText->SetText( BuildAttrText_Impl( sDesc, sal_True ) ); + m_pReplaceAttrText->SetText( BuildAttrText_Impl( sDesc, sal_False ) ); EnableControl_Impl(m_pFormatBtn); EnableControl_Impl(m_pAttributeBtn); @@ -1828,13 +1757,9 @@ void SvxSearchDialog::SetItem_Impl( const SvxSearchItem* pItem ) IMPL_LINK( SvxSearchDialog, FocusHdl_Impl, Control *, pCtrl ) { - sal_Int32 nTxtLen; - if ( !pImpl->bMultiLineEdit ) - nTxtLen = m_pSearchAttrText->GetText().getLength(); - else - nTxtLen = pImpl->m_pSearchFormats->GetText().getLength(); + sal_Int32 nTxtLen = m_pSearchAttrText->GetText().getLength(); - if ( pCtrl == m_pSearchLB || pCtrl == pImpl->m_pSearchFormats ) + if ( pCtrl == m_pSearchLB ) { if ( pCtrl->HasChildPathFocus() ) pImpl->bFocusOnSearch = sal_True; @@ -1853,8 +1778,7 @@ IMPL_LINK( SvxSearchDialog, FocusHdl_Impl, Control *, pCtrl ) pCtrl = m_pReplaceLB; bSearch = sal_False; - if ( ( !pImpl->bMultiLineEdit && !m_pReplaceAttrText->GetText().isEmpty() ) || - ( pImpl->bMultiLineEdit && !pImpl->m_pReplaceFormats->GetText().isEmpty() ) ) + if (!m_pReplaceAttrText->GetText().isEmpty()) EnableControl_Impl(m_pNoFormatBtn); else m_pNoFormatBtn->Disable(); @@ -2020,18 +1944,12 @@ IMPL_LINK_NOARG(SvxSearchDialog, NoFormatHdl_Impl) if ( bSearch ) { - if ( !pImpl->bMultiLineEdit ) - m_pSearchAttrText->SetText( "" ); - else - pImpl->m_pSearchFormats->SetText( "" ); + m_pSearchAttrText->SetText( "" ); pSearchList->Clear(); } else { - if ( !pImpl->bMultiLineEdit ) - m_pReplaceAttrText->SetText( "" ); - else - pImpl->m_pReplaceFormats->SetText( "" ); + m_pReplaceAttrText->SetText( "" ); pReplaceList->Clear(); } pImpl->bSaveToModule = sal_False; @@ -2164,18 +2082,12 @@ void SvxSearchDialog::PaintAttrText_Impl() if ( bSearch ) { - if ( !pImpl->bMultiLineEdit ) - m_pSearchAttrText->SetText( aDesc ); - else - pImpl->m_pSearchFormats->SetText( aDesc ); + m_pSearchAttrText->SetText( aDesc ); FocusHdl_Impl(m_pSearchLB); } else { - if ( !pImpl->bMultiLineEdit ) - m_pReplaceAttrText->SetText( aDesc ); - else - pImpl->m_pReplaceFormats->SetText( aDesc ); + m_pReplaceAttrText->SetText( aDesc ); FocusHdl_Impl(m_pReplaceLB); } } diff --git a/svx/uiconfig/ui/findreplacedialog.ui b/svx/uiconfig/ui/findreplacedialog.ui index fb50f07..3808196 100644 --- a/svx/uiconfig/ui/findreplacedialog.ui +++ b/svx/uiconfig/ui/findreplacedialog.ui @@ -375,21 +375,6 @@ <property name="position">0</property> </packing> </child> - <child> - <object class="GtkLabel" id="replaceformat"> - <property name="width_request">1</property> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> - <property name="hexpand">True</property> - <property name="xalign">0</property> - <property name="wrap">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> </object> <packing> <property name="left_attach">0</property>
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits