Hi, I have submitted a patch for review:
https://gerrit.libreoffice.org/1888 To pull it, you can do: git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/88/1888/1 Show meaningful title for search key not found infobox, fdo#59865 Change-Id: I5c99fc98552be705ddcb163320521620bdcbf7ef --- M sw/source/ui/uiview/viewsrch.cxx 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx index 9cad97b..8e1f9c3 100644 --- a/sw/source/ui/uiview/viewsrch.cxx +++ b/sw/source/ui/uiview/viewsrch.cxx @@ -37,6 +37,8 @@ #include <sal/macros.h> #include <sfx2/request.hxx> #include <svx/srchdlg.hxx> +#include <svx/dialmgr.hxx> +#include <svx/dialogs.hrc> #include <vcl/msgbox.hxx> #include <vcl/wrkwin.hxx> #include "editeng/unolingu.hxx" @@ -85,6 +87,21 @@ else pWin = 0; return pWin; +} + +inline void ShowNotFoundInfoBox( SvxSearchDialog* pSrchDlg ) +{ + Window* pParentWindow = GetParentWindow( pSrchDlg ); + InfoBox aBox( pParentWindow, SW_RES(MSG_NOT_FOUND)); + if (pParentWindow) + { + aBox.SetText(pParentWindow->GetText()); + } + else + { + aBox.SetText(SVX_RESSTR(RID_SVXSTR_FINDBAR_FIND)); + } + aBox.Execute(); } void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage) @@ -211,8 +228,7 @@ { if( !bApi ) { - Window* pParentWindow = GetParentWindow( pSrchDlg ); - InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute(); + ShowNotFoundInfoBox( pSrchDlg ); } bFound = sal_False; } @@ -311,8 +327,7 @@ { if( !bApi ) { - Window* pParentWindow = GetParentWindow( pSrchDlg ); - InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute(); + ShowNotFoundInfoBox( pSrchDlg ); } bFound = sal_False; return; @@ -483,8 +498,7 @@ pWrtShell->EndAllAction(); if( !bApi ) { - Window* pParentWindow = GetParentWindow( pSrchDlg ); - InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute(); + ShowNotFoundInfoBox( pSrchDlg ); } bFound = sal_False; pWrtShell->Pop(); @@ -528,8 +542,7 @@ return bFound; if(!bApi) { - Window* pParentWindow = GetParentWindow( pSrchDlg ); - InfoBox( pParentWindow, SW_RES(MSG_NOT_FOUND)).Execute(); + ShowNotFoundInfoBox( pSrchDlg ); } return bFound = sal_False; } -- To view, visit https://gerrit.libreoffice.org/1888 To unsubscribe, visit https://gerrit.libreoffice.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5c99fc98552be705ddcb163320521620bdcbf7ef Gerrit-PatchSet: 1 Gerrit-Project: core Gerrit-Branch: master Gerrit-Owner: Robert Roth <robert.roth....@gmail.com> _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice