summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-09-17 10:58:56 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-09-21 07:30:23 +0200
commitc74ccac7cd94eba052d21cf74e03e214d58942e4 (patch)
treea5d88cbb74b4854011fe63de88f6598893baef58 /include
parent714257af17f74f8bcb5acceaebb0d0f4b3be3231 (diff)
sfx2: add SfxViewShell::libreOfficeKitViewCallback()
This is similar to the existing LOK callback, the difference is that the existing one assumes there is only one SfxViewShell instance at the same time. This newer callback is precisely per-view, so model notifications can invoke all view callbacks, while view notifications can invoke only the callback of the relevant view. This is just the framework, all actual client code has to be still ported over (and then the existing callback can be removed). Change-Id: I3d8f27740c69fcf6ffbbdce12db2ea088321493d
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/viewsh.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index e88203d3a641..70f393134b70 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -39,6 +39,8 @@
#include <o3tl/typed_flags_set.hxx>
#include <vcl/vclptr.hxx>
#include <sfx2/tabdlg.hxx>
+#define LOK_USE_UNSTABLE_API
+#include <LibreOfficeKit/LibreOfficeKitTypes.h>
class SfxBaseController;
class Size;
@@ -315,6 +317,11 @@ public:
SAL_DLLPRIVATE void TakeOwnership_Impl();
SAL_DLLPRIVATE void TakeFrameOwnership_Impl();
SAL_DLLPRIVATE bool ExecKey_Impl(const KeyEvent& aKey);
+
+ /// The actual implementation of the lok::Document::registerViewCallback() API.
+ void registerLibreOfficeKitViewCallback(LibreOfficeKitCallback pCallback, void* pLibreOfficeKitData);
+ /// Invokes the registered callback, if there are any.
+ void libreOfficeKitViewCallback(int nType, const char* pPayload) const;
};