summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-05-28 12:12:37 +0200
committerJan Holesovsky <kendy@collabora.com>2015-05-28 12:13:41 +0200
commit90ffbdf7346364b096c5ada6415b8536d929670a (patch)
tree7e811fa7f9c066503351d35d7a46106d8f8ffa1c /sd
parent1afa39b1e9a4ce1cdab866a29a637283ed6792a9 (diff)
sd: Notify about the part change (when searching) only once.
Change-Id: Iae0e3fa0ec86898f17bc4b595075c3a2384ecfb2
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/Outliner.cxx11
-rw-r--r--sd/source/ui/view/drviews1.cxx6
2 files changed, 11 insertions, 6 deletions
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 60873d00a0ef..da24d0e1452f 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 74a77c44b564..9aa19dabd03c 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;
}