sd/source/ui/view/Outliner.cxx | 11 +++++++++++ sd/source/ui/view/drviews1.cxx | 6 ------ 2 files changed, 11 insertions(+), 6 deletions(-)
New commits: commit 90ffbdf7346364b096c5ada6415b8536d929670a Author: Jan Holesovsky <ke...@collabora.com> Date: Thu May 28 12:12:37 2015 +0200 sd: Notify about the part change (when searching) only once. Change-Id: Iae0e3fa0ec86898f17bc4b595075c3a2384ecfb2 diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 60873d0..da24d0e 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -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; } diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 74a77c4..9aa19da 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits