summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-03-27 14:36:47 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 13:13:27 +0100
commit7df35a2e92fa9fb548bbca0d0935f055e56e6d10 (patch)
tree30afd6654892fc8ef21f06f1368786728a9b17c3
parentrepair dialog related lifecycle bits. (diff)
downloadcore-7df35a2e92fa9fb548bbca0d0935f055e56e6d10.tar.gz
core-7df35a2e92fa9fb548bbca0d0935f055e56e6d10.zip
Unwind mpDialogParent oddness.
This pointer is used to pass extra information through dialog constructors, and (as such) if implemented with a VclPtr it causes us to take and then release a reference on our in-construction object, before it can return it's 'this' into the safety of its calling VclPtr<> constructor; not good. cf. Dialog::doDeferredInit vs. SystemWindow::loadUI. Change-Id: Idcab40cedcdebed560077cfaa1a14395e6e01cd6
-rw-r--r--include/vcl/dockwin.hxx2
-rw-r--r--include/vcl/syswin.hxx2
-rw-r--r--vcl/source/window/dialog.cxx2
-rw-r--r--vcl/source/window/syswin.cxx1
4 files changed, 3 insertions, 4 deletions
diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx
index 71c81818fa22..bd334ea09043 100644
--- a/include/vcl/dockwin.hxx
+++ b/include/vcl/dockwin.hxx
@@ -261,7 +261,7 @@ private:
mbIsCalculatingInitialLayoutSize:1,
mbInitialLayoutDone:1;
- VclPtr<vcl::Window> mpDialogParent;
+ vcl::Window *mpDialogParent; // deliberately not a VclPtr
SAL_DLLPRIVATE void ImplInitDockingWindowData();
SAL_DLLPRIVATE void setPosSizeOnContainee(Size aSize, Window &rBox);
diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx
index f90fb16bfeea..5609d57c6419 100644
--- a/include/vcl/syswin.hxx
+++ b/include/vcl/syswin.hxx
@@ -149,7 +149,7 @@ private:
Idle maLayoutIdle;
protected:
bool mbIsDefferedInit;
- VclPtr<vcl::Window> mpDialogParent;
+ vcl::Window *mpDialogParent; // deliberately not a VclPtr
public:
using Window::ImplIsInTaskPaneList;
SAL_DLLPRIVATE bool ImplIsInTaskPaneList( vcl::Window* pWin );
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 56c5dd4a4130..9ca9c30a1b40 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -488,7 +488,7 @@ OUString VclBuilderContainer::getUIRootDir()
//do the init. Find the real parent stashed in mpDialogParent.
void Dialog::doDeferredInit(WinBits nBits)
{
- VclPtr<vcl::Window> pParent = mpDialogParent;
+ vcl::Window *pParent = mpDialogParent;
mpDialogParent = NULL;
ImplInit(pParent, nBits);
mbIsDefferedInit = false;
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 9cb57f310b2e..99ac9bcb4fa4 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -119,7 +119,6 @@ void SystemWindow::dispose()
// as a SystemWindow (which it no longer is by then):
mpWindowImpl->mbSysWin = false;
disposeBuilder();
-
mpDialogParent.clear();
Window::dispose();
}