Kaydet (Commit) 90ffbdf7 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

sd: Notify about the part change (when searching) only once.

Change-Id: Iae0e3fa0ec86898f17bc4b595075c3a2384ecfb2
üst 1afa39b1
......@@ -717,6 +717,17 @@ bool Outliner::SearchAndReplaceOnce()
mpDrawDocument->GetDocSh()->SetWaitCursor( false );
// notify LibreOfficeKit about changed page
if (pViewShell && pViewShell->GetDoc()->isTiledRendering() &&
mbStringFound && pViewShell->ISA(DrawViewShell))
{
::boost::shared_ptr<DrawViewShell> pDrawViewShell(::boost::dynamic_pointer_cast<DrawViewShell>(pViewShell));
sal_uInt16 nSelectedPage = pDrawViewShell->GetCurPageId();
OString aPayload = OString::number(nSelectedPage);
pViewShell->GetDoc()->libreOfficeKitCallback(LOK_CALLBACK_SET_PART, aPayload.getStr());
}
return mbEndOfSearch;
}
......
......@@ -81,7 +81,6 @@
#include <sfx2/request.hxx>
#include <boost/bind.hpp>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
using namespace com::sun::star;
......@@ -1099,11 +1098,6 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
mpDrawView->AdjustMarkHdl();
}
if (bOK)
{
OString aPayload = OString::number(nSelectedPage);
GetDoc()->libreOfficeKitCallback(LOK_CALLBACK_SET_PART, aPayload.getStr());
}
return bOK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment