summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-11-27 19:23:22 +0100
committerJan Holesovsky <kendy@collabora.com>2017-11-28 19:49:27 +0100
commiteba961f518774d467b03c5a77828a2a7c21b42ed (patch)
treeae65a0d16ae85e5a4227e7a8b34f9df115ba94bb /desktop
parent57c0ccf77627b485e8ed05cad295c4eef5eb16e4 (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.cxx22
1 files changed, 6 insertions, 16 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2770575a9e0d..8d61d405f501 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1342,16 +1342,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 ...
@@ -2285,7 +2275,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.";
@@ -2463,7 +2453,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.";
@@ -2494,7 +2484,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.";
@@ -3305,7 +3295,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.";
@@ -3333,7 +3323,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.";
@@ -3358,7 +3348,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.";