summaryrefslogtreecommitdiff
path: root/include/sfx2
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-11-22 22:25:20 +0530
committerJan Holesovsky <kendy@collabora.com>2017-11-29 10:16:53 +0100
commit871eb68e14631d22aeb00ec33f0e5d801291942e (patch)
treed1f3407d7f94dc18461bce7d1260f56db5209637 /include/sfx2
parent2d508dcc9d6e9d589af32a76468ef3247f8c6674 (diff)
lokdialog: Changed dialog painting to allow for modal dialogs
Split IDialogNotifier from IDialogRenderable and make SfxViewShell implement it. We now just send the dialog UNO command to the backend and wait for core to emit a 'created' dialog callback which signals dialog creation in the backend. The client is then supposed to send the paint commands for rendering the dialog. Change-Id: I1bfbce83c17955fa0212408376d6bcd1b2d2d1dd
Diffstat (limited to 'include/sfx2')
-rw-r--r--include/sfx2/lokhelper.hxx2
-rw-r--r--include/sfx2/viewsh.hxx13
2 files changed, 13 insertions, 2 deletions
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index e22017c8eccc..93d61fc311fa 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -44,7 +44,7 @@ public:
/// Emits a LOK_CALLBACK_DIALOG
static void notifyDialog(const OUString& rDialogId,
const OUString& rAction,
- const std::vector<vcl::LOKPayloadItem>& rPayload);
+ const std::vector<vcl::LOKPayloadItem>& rPayload = std::vector<vcl::LOKPayloadItem>());
/// 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/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 65975dc8e27d..ed0ea3f3817b 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -34,6 +34,8 @@
#include <cppuhelper/interfacecontainer.hxx>
#include <sfx2/shell.hxx>
#include <tools/gen.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/IDialogRenderable.hxx>
#include <vcl/errcode.hxx>
#include <vcl/jobset.hxx>
#include <o3tl/typed_flags_set.hxx>
@@ -140,7 +142,7 @@ template<class T> bool checkSfxViewShell(const SfxViewShell* pShell)
return dynamic_cast<const T*>(pShell) != nullptr;
}
-class SFX2_DLLPUBLIC SfxViewShell: public SfxShell, public SfxListener, public OutlinerViewShell
+class SFX2_DLLPUBLIC SfxViewShell: public SfxShell, public SfxListener, public OutlinerViewShell, public vcl::IDialogNotifier
{
friend class SfxViewFrame;
friend class SfxBaseController;
@@ -151,6 +153,7 @@ friend class SfxPrinterController;
VclPtr<vcl::Window> pWindow;
bool bNoNewWindow;
bool mbPrinterSettingsModified;
+ std::vector<std::pair<vcl::DialogID, VclPtr<Dialog> > > maOpenedDialogs;
protected:
virtual void Activate(bool IsMDIActivate) override;
@@ -219,6 +222,14 @@ public:
virtual SfxShell* GetFormShell() { return nullptr; };
virtual const SfxShell* GetFormShell() const { return nullptr; };
+ void RegisterDlg(const vcl::DialogID& rDialogId, VclPtr<Dialog> pDlg);
+ VclPtr<Dialog> GetOpenedDlg(const vcl::DialogID& rDialogId);
+ void UnregisterDlg(const vcl::DialogID& rDialogId);
+
+ // IDialogNotifier
+ virtual void notifyDialog(const vcl::DialogID& rDialogID, const OUString& rAction, const std::vector<vcl::LOKPayloadItem>& rPayload = std::vector<vcl::LOKPayloadItem>()) override;
+ virtual void notifyDialogChild(const vcl::DialogID& rDialogID, const OUString& rAction, const Point& rPos) override;
+
// Focus, KeyInput, Cursor
virtual void ShowCursor( bool bOn = true );
virtual bool KeyInput( const KeyEvent &rKeyEvent );