Commits

Anonymous committed f3e04c3

findbar02: fix the bug that the Find&Replace dialog affects the state of the find text box.

Comments (0)

Files changed (2)

sc/source/ui/view/viewfun2.cxx

 		if (pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab, rMark, aUndoStr, pUndoDoc ) )
 		{
 			bFound = sal_True;
-            if (xFindTexBoxListener.is())
+            if (bIsApi && xFindTexBoxListener.is())
             {
                 aEvent.FeatureURL.Complete = SEARCH_RESULT_FOUND;
                 xFindTexBoxListener->statusChanged(aEvent);
 				aBox.Execute();
 			}
 
-            if (xFindTexBoxListener.is())
+            if (bIsApi && xFindTexBoxListener.is())
             {
                 aEvent.FeatureURL.Complete = SEARCH_RESULT_NOT_FOUND;
                 xFindTexBoxListener->statusChanged(aEvent);
 
 	if ( bFound )
 	{
-        if (xFindTexBoxListener.is())
+        if (bIsApi && xFindTexBoxListener.is())
         {
             if (bRestartSeaching)
             {

sw/source/ui/uiview/viewsrch.cxx

 #include <sfx2/request.hxx>
 #include <svx/srchdlg.hxx>
 #include <svx/tbunosearchcontrollers.hxx>
+#include <vcl/help.hxx>
 #include <vcl/msgbox.hxx>
 #include <vcl/wrkwin.hxx>
 #include "editeng/unolingu.hxx"
 	if( FUNC_Search( aOpts ) )
 	{
 		bFound = sal_True;
-        if (xFindTexBoxListener.is())
+        if (bApi && xFindTexBoxListener.is())
         {
             aEvent.FeatureURL.Complete = SEARCH_RESULT_FOUND;
             xFindTexBoxListener->statusChanged(aEvent);
 		if( FUNC_Search( aOpts ) )
 		{
 			bFound = sal_True;
-            if (xFindTexBoxListener.is())
+            if (bApi && xFindTexBoxListener.is())
             {
                 aEvent.FeatureURL.Complete = SEARCH_RESULT_FOUND;
                 xFindTexBoxListener->statusChanged(aEvent);
 	delete pWait;
 	if ( bFound )
     {
-        if (xFindTexBoxListener.is())
+        if (bApi && xFindTexBoxListener.is())
         {
             if (!bSrchBkwrd)
                 aEvent.FeatureURL.Complete = SEARCH_FROM_START;