summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitEnums.h9
-rw-r--r--sd/source/ui/view/drviews1.cxx6
2 files changed, 14 insertions, 1 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index ba4db824e00c..bbcd5b90c239 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -148,7 +148,14 @@ typedef enum
* Clients should assume that data returned by an earlier
* lok::Document::getDocumentSize() call is no longer valid.
*/
- LOK_CALLBACK_PAGE_COUNT_CHANGED
+ LOK_CALLBACK_PAGE_COUNT_CHANGED,
+
+ /**
+ * The current part number is changed.
+ *
+ * Payload is a single 0-based integer.
+ */
+ LOK_CALLBACK_SET_PART
}
LibreOfficeKitCallbackType;
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 9aa19dabd03c..74a77c44b564 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -81,6 +81,7 @@
#include <sfx2/request.hxx>
#include <boost/bind.hpp>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
using namespace com::sun::star;
@@ -1098,6 +1099,11 @@ 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;
}