diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-11-14 18:45:02 +0530 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-11-16 10:13:32 +0100 |
commit | 9c2a2aff948cf8b14e4f35a5637ae07c2a2f687c (patch) | |
tree | 20b46e02963734e91db78de112d1d531cc12288b /include | |
parent | 135b86cee45d20fbd8b1253954443be07d7f4abc (diff) |
lokdialog: Expose cursor visible status
Change the notifyDialog API a bit. Use a std::vector to keep track of
each payload item that needs to be fed to the resulting JSON.
Change-Id: If3229a88d2df5368e14290a0e80ebe6206780639
Reviewed-on: https://gerrit.libreoffice.org/44722
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/sfx2/lokhelper.hxx | 5 | ||||
-rw-r--r-- | include/vcl/IDialogRenderable.hxx | 6 | ||||
-rw-r--r-- | include/vcl/dialog.hxx | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx index 01d519173c2a..a98c65cc02a2 100644 --- a/include/sfx2/lokhelper.hxx +++ b/include/sfx2/lokhelper.hxx @@ -10,6 +10,7 @@ #ifndef INCLUDED_SFX2_LOKHELPER_HXX #define INCLUDED_SFX2_LOKHELPER_HXX +#include <vcl/IDialogRenderable.hxx> #include <sfx2/dllapi.h> #include <sfx2/viewsh.hxx> #include <cstddef> @@ -41,7 +42,9 @@ public: /// Same as notifyOtherViews(), but works on a selected "other" view, not on all of them. static void notifyOtherView(SfxViewShell* pThisView, SfxViewShell* pOtherView, int nType, const OString& rKey, const OString& rPayload); /// Emits a LOK_CALLBACK_DIALOG - static void notifyDialog(const OUString& rPayload, const OUString& rAction, const Rectangle* rRect); + static void notifyDialog(const OUString& rDialogId, + const OUString& rAction, + const std::vector<vcl::LOKPayloadItem>& rPayload); /// Emits a LOK_CALLBACK_DIALOG_CHILD static void notifyDialogChild(const OUString& rDialogID, const OUString& rAction, const Point& rPos); /// Emits a LOK_CALLBACK_INVALIDATE_TILES, but tweaks it according to setOptionalFeatures() if needed. diff --git a/include/vcl/IDialogRenderable.hxx b/include/vcl/IDialogRenderable.hxx index 357926b40446..b02a701c01b7 100644 --- a/include/vcl/IDialogRenderable.hxx +++ b/include/vcl/IDialogRenderable.hxx @@ -23,6 +23,8 @@ namespace vcl { +typedef std::pair<const OString, const OString> LOKPayloadItem; + typedef OUString DialogID; class VCL_DLLPUBLIC IDialogRenderable @@ -47,7 +49,9 @@ public: int nCount, int nButtons, int nModifier) = 0; // Callbacks - virtual void notifyDialog(const DialogID& rDialogID, const OUString& rAction, const Rectangle* rRect) = 0; + virtual void notifyDialog(const DialogID& rDialogID, + const OUString& rAction, + const std::vector<LOKPayloadItem>& rPayload = std::vector<LOKPayloadItem>()) = 0; virtual void notifyDialogChild(const DialogID& rDialogID, const OUString& rAction, const Point& rPos) = 0; }; diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx index e1cb91d1dac1..74e5323c4996 100644 --- a/include/vcl/dialog.hxx +++ b/include/vcl/dialog.hxx @@ -87,7 +87,7 @@ public: void LOKKeyInput(const KeyEvent& rKeyEvent); void LOKKeyUp(const KeyEvent& rKeyEvent); - void LOKCursorInvalidate(const Rectangle& rRect); + void LOKCursor(const OUString& rAction, const std::vector<vcl::LOKPayloadItem>& rPayload); protected: explicit Dialog( WindowType nType ); |