summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-12-21 13:00:31 +0100
committerMichael Meeks <michael.meeks@collabora.com>2017-12-21 20:41:13 +0100
commit9364ae836e6975da64abf87eb7c2b02e601e69db (patch)
treecb5391eeb1aedfe3818749e83a7070bd3ad398e6 /sw
parent236d245428ec290f9b5efe4cd68996a7d4e6509e (diff)
Revert the incomplete dialog tunneling, the API has changed completely.
Change-Id: I50fb8c83365cefb8c8e76096fe257d31970a68b4 Reviewed-on: https://gerrit.libreoffice.org/46927 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/unotxdoc.hxx20
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx194
2 files changed, 0 insertions, 214 deletions
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index e8a995ee3142..3f202c88ae54 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -70,7 +70,6 @@
#include <cppuhelper/implbase.hxx>
#include <vcl/event.hxx>
#include <vcl/ITiledRenderable.hxx>
-#include <vcl/IDialogRenderable.hxx>
#include <com/sun/star/tiledrendering/XTiledRenderable.hpp>
#include "unobaseclass.hxx"
@@ -132,7 +131,6 @@ class SW_DLLPUBLIC SwXTextDocument : public SwXTextDocumentBaseClass,
public SvxFmMSFactory,
public SfxBaseModel,
public vcl::ITiledRenderable,
- public vcl::IDialogRenderable,
public css::tiledrendering::XTiledRenderable
{
private:
@@ -431,24 +429,6 @@ public:
/// @see vcl::ITiledRenderable::getPostIts().
OUString getPostIts() override;
- void paintDialog(const vcl::DialogID& rDialogID, VirtualDevice& rDevice) override;
- void getDialogInfo(const vcl::DialogID& rDialogID, OUString& rDialogTitle, int& rWidth, int& rHeight) override;
- void paintActiveFloatingWindow(const vcl::DialogID& rDialogID, VirtualDevice& rDevice, int& nWidth, int& nHeight) override;
- void postDialogKeyEvent(const vcl::DialogID& rDialogID, int nType,
- int nCharCode, int nKeyCode) override;
-
- void postDialogMouseEvent(const vcl::DialogID& rDialogID, int nType, int nX, int nY,
- int nCount, int nButtons, int nModifier) override;
-
- void postDialogChildMouseEvent(const vcl::DialogID& rDialogID, int nType, int nX, int nY,
- int nCount, int nButtons, int nModifier) override;
-
- void notifyDialog(const vcl::DialogID& rDialogID,
- const OUString& rAction,
- const std::vector<vcl::LOKPayloadItem>& rPayload = std::vector<vcl::LOKPayloadItem>()) override;
-
- void notifyDialogChild(const vcl::DialogID& rDialogID, const OUString& rAction, const Point& rPos) override;
-
// css::tiledrendering::XTiledRenderable
virtual void SAL_CALL paintTile( const ::css::uno::Any& Parent, ::sal_Int32 nOutputWidth, ::sal_Int32 nOutputHeight, ::sal_Int32 nTilePosX, ::sal_Int32 nTilePosY, ::sal_Int32 nTileWidth, ::sal_Int32 nTileHeight ) override;
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index ce4988f6adc0..a6431a67975f 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3639,200 +3639,6 @@ void SAL_CALL SwXTextDocument::paintTile( const ::css::uno::Any& Parent, ::sal_I
#endif
}
-void SwXTextDocument::paintDialog(const vcl::DialogID& rDialogID, VirtualDevice& rDevice)
-{
- SfxViewFrame* pViewFrame = pDocShell->GetView()->GetViewFrame();
- SfxSlotPool* pSlotPool = SW_MOD()->GetSlotPool();
- const SfxSlot* pSlot = pSlotPool->GetUnoSlot(rDialogID);
- if (!pSlot)
- {
- SAL_WARN("lok.dialog", "No slot found for " << rDialogID);
- return;
- }
- SfxChildWindow* pChild = pViewFrame->GetChildWindow(pSlot->GetSlotId());
- if (!pChild)
- {
- pViewFrame->ToggleChildWindow(pSlot->GetSlotId());
- pChild = pViewFrame->GetChildWindow(pSlot->GetSlotId());
- if (!pChild)
- {
- SAL_WARN("lok.dialog", "Dialog " << rDialogID << " is not supported");
- return;
- }
- }
-
- Dialog* pDlg = static_cast<Dialog*>(pChild->GetWindow());
- // register the instance so that vcl::Dialog can emit LOK callbacks
- pDlg->registerDialogRenderable(this, rDialogID);
- pDlg->paintDialog(rDevice);
-}
-
-void SwXTextDocument::getDialogInfo(const vcl::DialogID& rDialogID, OUString& rDialogTitle, int& rWidth, int& rHeight)
-{
- SfxViewFrame* pViewFrame = pDocShell->GetView()->GetViewFrame();
- SfxSlotPool* pSlotPool = SW_MOD()->GetSlotPool();
- const SfxSlot* pSlot = pSlotPool->GetUnoSlot(rDialogID);
- if (!pSlot)
- {
- SAL_WARN("lok.dialog", "No slot found for " << rDialogID);
- return;
- }
- SfxChildWindow* pChild = pViewFrame->GetChildWindow(pSlot->GetSlotId());
- if (!pChild)
- return;
-
- Dialog* pDlg = static_cast<Dialog*>(pChild->GetWindow());
- rDialogTitle = pDlg->GetText();
- const Size aSize = pDlg->GetOptimalSize();
- rWidth = aSize.getWidth();
- rHeight = aSize.getHeight();
-}
-
-void SwXTextDocument::postDialogKeyEvent(const vcl::DialogID& rDialogID, int nType, int nCharCode, int nKeyCode)
-{
- SolarMutexGuard aGuard;
-
- // check if dialog is already open
- SfxViewFrame* pViewFrame = pDocShell->GetView()->GetViewFrame();
- SfxSlotPool* pSlotPool = SW_MOD()->GetSlotPool();
- const SfxSlot* pSlot = pSlotPool->GetUnoSlot(rDialogID);
- if (!pSlot)
- {
- SAL_WARN("lok.dialog", "No slot found for " << rDialogID);
- return;
- }
- SfxChildWindow* pChild = pViewFrame->GetChildWindow(pSlot->GetSlotId());
- if (pChild)
- {
- Dialog* pDialog = static_cast<Dialog*>(pChild->GetWindow());
- KeyEvent aEvent(nCharCode, nKeyCode, 0);
-
- switch (nType)
- {
- case LOK_KEYEVENT_KEYINPUT:
- pDialog->LOKKeyInput(aEvent);
- break;
- case LOK_KEYEVENT_KEYUP:
- pDialog->LOKKeyUp(aEvent);
- break;
- default:
- assert(false);
- break;
- }
- }
-}
-
-void SwXTextDocument::postDialogMouseEvent(const vcl::DialogID& rDialogID, int nType, int nX, int nY,
- int nCount, int nButtons, int nModifier)
-{
- SolarMutexGuard aGuard;
-
- // check if dialog is already open
- SfxViewFrame* pViewFrame = pDocShell->GetView()->GetViewFrame();
- SfxSlotPool* pSlotPool = SW_MOD()->GetSlotPool();
- const SfxSlot* pSlot = pSlotPool->GetUnoSlot(rDialogID);
- if (!pSlot)
- {
- SAL_WARN("lok.dialog", "No slot found for " << rDialogID);
- return;
- }
- SfxChildWindow* pChild = pViewFrame->GetChildWindow(pSlot->GetSlotId());
- if (pChild)
- {
- Dialog* pDialog = static_cast<Dialog*>(pChild->GetWindow());
- Point aPos(nX , nY);
- MouseEvent aEvent(aPos, nCount, MouseEventModifiers::SIMPLECLICK, nButtons, nModifier);
-
- switch (nType)
- {
- case LOK_MOUSEEVENT_MOUSEBUTTONDOWN:
- pDialog->LogicMouseButtonDown(aEvent);
- break;
- case LOK_MOUSEEVENT_MOUSEBUTTONUP:
- pDialog->LogicMouseButtonUp(aEvent);
- break;
- case LOK_MOUSEEVENT_MOUSEMOVE:
- pDialog->LogicMouseMove(aEvent);
- break;
- default:
- assert(false);
- break;
- }
- }
-}
-
-
-void SwXTextDocument::postDialogChildMouseEvent(const vcl::DialogID& rDialogID, int nType, int nX, int nY,
- int nCount, int nButtons, int nModifier)
-{
- SolarMutexGuard aGuard;
-
- // check if dialog is already open
- SfxViewFrame* pViewFrame = pDocShell->GetView()->GetViewFrame();
- SfxSlotPool* pSlotPool = SW_MOD()->GetSlotPool();
- const SfxSlot* pSlot = pSlotPool->GetUnoSlot(rDialogID);
- if (!pSlot)
- {
- SAL_WARN("lok.dialog", "No slot found for " << rDialogID);
- return;
- }
- SfxChildWindow* pChild = pViewFrame->GetChildWindow(pSlot->GetSlotId());
- if (pChild)
- {
- Dialog* pDialog = static_cast<Dialog*>(pChild->GetWindow());
- Point aPos(nX , nY);
- MouseEvent aEvent(aPos, nCount, MouseEventModifiers::SIMPLECLICK, nButtons, nModifier);
-
- switch (nType)
- {
- case LOK_MOUSEEVENT_MOUSEBUTTONDOWN:
- pDialog->LogicMouseButtonDownChild(aEvent);
- break;
- case LOK_MOUSEEVENT_MOUSEBUTTONUP:
- pDialog->LogicMouseButtonUpChild(aEvent);
- break;
- case LOK_MOUSEEVENT_MOUSEMOVE:
- pDialog->LogicMouseMoveChild(aEvent);
- break;
- default:
- assert(false);
- break;
- }
- }
-}
-
-void SwXTextDocument::notifyDialog(const vcl::DialogID& rDialogID,
- const OUString& rAction,
- const std::vector<vcl::LOKPayloadItem>& rPayload)
-{
- SfxLokHelper::notifyDialog(rDialogID, rAction, rPayload);
-}
-
-void SwXTextDocument::notifyDialogChild(const vcl::DialogID& rDialogID, const OUString& rAction, const Point& rPos)
-{
- SfxLokHelper::notifyDialogChild(rDialogID, rAction, rPos);
-}
-
-void SwXTextDocument::paintActiveFloatingWindow(const vcl::DialogID& rDialogID, VirtualDevice& rDevice, int& nWidth, int& nHeight)
-{
- SfxViewFrame* pViewFrame = pDocShell->GetView()->GetViewFrame();
- SfxSlotPool* pSlotPool = SW_MOD()->GetSlotPool();
- const SfxSlot* pSlot = pSlotPool->GetUnoSlot(rDialogID);
- if (!pSlot)
- {
- SAL_WARN("lok.dialog", "No slot found for " << rDialogID);
- return;
- }
- SfxChildWindow* pChild = pViewFrame->GetChildWindow(pSlot->GetSlotId());
- if (!pChild)
- return;
-
- Dialog* pDlg = static_cast<Dialog*>(pChild->GetWindow());
- const Size aSize = pDlg->PaintActiveFloatingWindow(rDevice);
- nWidth = aSize.getWidth();
- nHeight = aSize.getHeight();
-}
-
void * SAL_CALL SwXTextDocument::operator new( size_t t) throw()
{
return SwXTextDocumentBaseClass::operator new(t);