diff options
author | Jan Holesovsky <kendy@collabora.com> | 2017-11-27 19:23:22 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-11-29 10:16:58 +0100 |
commit | d516c5c9819dcd7dc6dded2f8f9d9e44061b23c0 (patch) | |
tree | 0304dd3f677801f4d189fd29bc1b9e2b31f2c86a /desktop | |
parent | b4487b0fd22ce1fc595851f63a3f7bba36681f2c (diff) |
lokdialog: Move the LOKWindowId <-> VclPtr<Window> mapping to Window.
This allows registering & de-registering of non-sfx windows too, and makes the
Calc autofilter popup to appear.
Change-Id: I7cbbe94d208115aabcb6fa5f964646c7b7ce4c93
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index cf5827ecbebd..ece7600f178d 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1322,16 +1322,6 @@ ITiledRenderable* getTiledRenderable(LibreOfficeKitDocument* pThis) return dynamic_cast<ITiledRenderable*>(pDocument->mxComponent.get()); } -VclPtr<Window> findWindow(LibreOfficeKitDocument* pThis, unsigned nLOKWindowId) -{ - ITiledRenderable* pRenderable = getTiledRenderable(pThis); - - if (!pRenderable) - return VclPtr<Window>(); - - return pRenderable->findWindow(nLOKWindowId); -} - } // anonymous namespace // Wonder global state ... @@ -2265,7 +2255,7 @@ static void doc_postDialogKeyEvent(LibreOfficeKitDocument* pThis, unsigned nLOKW { SolarMutexGuard aGuard; - VclPtr<Window> pWindow = findWindow(pThis, nLOKWindowId); + VclPtr<Window> pWindow = vcl::Window::FindLOKWindow(nLOKWindowId); if (!pWindow) { gImpl->maLastExceptionMsg = "Document doesn't support dialog rendering, or window not found."; @@ -2443,7 +2433,7 @@ static void doc_postDialogMouseEvent(LibreOfficeKitDocument* pThis, unsigned nLO { SolarMutexGuard aGuard; - VclPtr<Window> pWindow = findWindow(pThis, nLOKWindowId); + VclPtr<Window> pWindow = vcl::Window::FindLOKWindow(nLOKWindowId); if (!pWindow) { gImpl->maLastExceptionMsg = "Document doesn't support dialog rendering, or window not found."; @@ -2474,7 +2464,7 @@ static void doc_postDialogChildMouseEvent(LibreOfficeKitDocument* pThis, unsigne { SolarMutexGuard aGuard; - VclPtr<Window> pWindow = findWindow(pThis, nLOKWindowId); + VclPtr<Window> pWindow = vcl::Window::FindLOKWindow(nLOKWindowId); if (!pWindow) { gImpl->maLastExceptionMsg = "Document doesn't support dialog rendering, or window not found."; @@ -3285,7 +3275,7 @@ static void doc_getDialogInfo(LibreOfficeKitDocument* pThis, unsigned nLOKWindow SolarMutexGuard aGuard; - VclPtr<Window> pWindow = findWindow(pThis, nLOKWindowId); + VclPtr<Window> pWindow = vcl::Window::FindLOKWindow(nLOKWindowId); if (!pWindow) { gImpl->maLastExceptionMsg = "Document doesn't support dialog rendering, or window not found."; @@ -3313,7 +3303,7 @@ static void doc_paintDialog(LibreOfficeKitDocument* pThis, unsigned nLOKWindowId { SolarMutexGuard aGuard; - VclPtr<Window> pWindow = findWindow(pThis, nLOKWindowId); + VclPtr<Window> pWindow = vcl::Window::FindLOKWindow(nLOKWindowId); if (!pWindow) { gImpl->maLastExceptionMsg = "Document doesn't support dialog rendering, or window not found."; @@ -3338,7 +3328,7 @@ static void doc_paintActiveFloatingWindow(LibreOfficeKitDocument* pThis, unsigne { SolarMutexGuard aGuard; - VclPtr<Window> pWindow = findWindow(pThis, nLOKWindowId); + VclPtr<Window> pWindow = vcl::Window::FindLOKWindow(nLOKWindowId); if (!pWindow) { gImpl->maLastExceptionMsg = "Document doesn't support dialog rendering, or window not found."; |