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.off@gmail.com>
Context
- Change in core[master]: Show meaningful title for search key not found infobox, fdo#... · Robert Roth (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.