diff options
author | Jan Holesovsky <kendy@collabora.com> | 2017-11-24 18:50:05 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-11-28 19:49:18 +0100 |
commit | 80d9696eb76e69101996c7a35ffec4c247e079d8 (patch) | |
tree | 2594fea36623214f7be95ada417e2813bbc9a8ed /sw/source/uibase | |
parent | 42777e61a4060b7b78795a5bb89e3155327a2555 (diff) |
lokdialog: Move the painting down to Window, and enable Calc and Impress.
Tested with .uno:FormatCellDialog in Calc, Impress not tested.
Change-Id: I6d911c29616988db0625be9e2a63cf2172c69ee8
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 117 |
1 files changed, 2 insertions, 115 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index be7df40f4619..f92e720a34e8 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3711,123 +3711,10 @@ void SAL_CALL SwXTextDocument::paintTile( const ::css::uno::Any& Parent, ::sal_I #endif } -void SwXTextDocument::paintDialog(const vcl::LOKWindowId& rLOKWindowId, VirtualDevice& rDevice) +VclPtr<vcl::Window> SwXTextDocument::findWindow(vcl::LOKWindowId nLOKWindowId) const { SfxViewShell* pViewShell = SfxViewShell::Current(); - VclPtr<Dialog> pDlg = pViewShell->GetOpenedDlg(rLOKWindowId); - if (pDlg) - pDlg->paintDialog(rDevice); -} - -void SwXTextDocument::getDialogInfo(const vcl::LOKWindowId& rLOKWindowId, OUString& rDialogTitle, int& rWidth, int& rHeight) -{ - SfxViewShell* pViewShell = SfxViewShell::Current(); - VclPtr<Dialog> pDlg = pViewShell->GetOpenedDlg(rLOKWindowId); - if (pDlg) - { - rDialogTitle = pDlg->GetText(); - const Size aSize = pDlg->GetOptimalSize(); - rWidth = aSize.getWidth(); - rHeight = aSize.getHeight(); - } -} - -void SwXTextDocument::postDialogKeyEvent(const vcl::LOKWindowId& rLOKWindowId, int nType, int nCharCode, int nKeyCode) -{ - SolarMutexGuard aGuard; - - SfxViewShell* pViewShell = SfxViewShell::Current(); - VclPtr<Dialog> pDialog = pViewShell->GetOpenedDlg(rLOKWindowId); - if (pDialog) - { - 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::LOKWindowId& rLOKWindowId, int nType, int nX, int nY, - int nCount, int nButtons, int nModifier) -{ - SolarMutexGuard aGuard; - - SfxViewShell* pViewShell = SfxViewShell::Current(); - VclPtr<Dialog> pDialog = pViewShell->GetOpenedDlg(rLOKWindowId); - if (pDialog) - { - 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::LOKWindowId& rLOKWindowId, int nType, int nX, int nY, - int nCount, int nButtons, int nModifier) -{ - SolarMutexGuard aGuard; - - SfxViewShell* pViewShell = SfxViewShell::Current(); - VclPtr<Dialog> pDialog = pViewShell->GetOpenedDlg(rLOKWindowId); - if (pDialog) - { - 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::paintActiveFloatingWindow(const vcl::LOKWindowId& rLOKWindowId, VirtualDevice& rDevice, int& nWidth, int& nHeight) -{ - SfxViewShell* pViewShell = SfxViewShell::Current(); - VclPtr<Dialog> pDialog = pViewShell->GetOpenedDlg(rLOKWindowId); - if (pDialog) - { - const Size aSize = pDialog->PaintActiveFloatingWindow(rDevice); - nWidth = aSize.getWidth(); - nHeight = aSize.getHeight(); - } + return pViewShell->GetOpenedDlg(nLOKWindowId); } void * SAL_CALL SwXTextDocument::operator new( size_t t) throw() |