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
diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx
index 71c8181..bd334ea 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 f90fb16..5609d57 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 56c5dd4..9ca9c30 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 9cb57f3..99ac9bc 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();
}