summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/layout.cxx14
-rw-r--r--vcl/source/window/syswin.cxx3
2 files changed, 13 insertions, 4 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index cf44b0930f0d..d8aab933664e 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -14,6 +14,8 @@
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include "window.h"
+#include "svdata.hxx"
+#include "salinst.hxx"
VclContainer::VclContainer(vcl::Window *pParent, WinBits nStyle)
: Window(WINDOW_CONTAINER)
@@ -1978,9 +1980,8 @@ MessageDialogImpl::~MessageDialogImpl()
MessageDialog::MessageDialog(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription)
{
-// SalFrame* pParentFrame = pParent ? pParent->mpWindowImpl->mpFrame : NULL;
-// m_pImpl = pSVData->mpDefInst->CreateChildFrame( pSystemParentData, nFrameStyle | SAL_FRAME_STYLE_PLUG );
- m_pImpl = new VclMessageDialog(pParent, rID, rUIXMLDescription);
+ ImplSVData* pSVData = ImplGetSVData();
+ m_xImpl = pSVData->mpDefInst->CreateSalDialog(pParent, rID, rUIXMLDescription);
}
MessageDialog::MessageDialog(vcl::Window* pParent, const OUString &rMessage, VclMessageType eMessageType,
@@ -1988,7 +1989,12 @@ MessageDialog::MessageDialog(vcl::Window* pParent, const OUString &rMessage, Vcl
{
// SalFrame* pParentFrame = pParent ? pParent->mpWindowImpl->mpFrame : NULL;
// m_pImpl = pSVData->mpDefInst->CreateChildFrame( pSystemParentData, nFrameStyle | SAL_FRAME_STYLE_PLUG );
- m_pImpl = new VclMessageDialog(pParent, rMessage, eMessageType, eButtonsType);
+ m_xImpl = VclPtr<VclMessageDialog>::Create(pParent, rMessage, eMessageType, eButtonsType);
+}
+
+MessageDialog::~MessageDialog()
+{
+ disposeOnce();
}
void VclMessageDialog::create_owned_areas()
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index c08a60168a93..0bc02e5e0614 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -93,6 +93,7 @@ SystemWindow::SystemWindow(WindowType nType)
: Window(nType)
, mbIsDefferedInit(false)
{
+ fprintf(stderr, "SystemWindow ctor %p\n", this);
Init();
}
@@ -106,11 +107,13 @@ void SystemWindow::loadUI(vcl::Window* pParent, const OString& rID, const OUStri
SystemWindow::~SystemWindow()
{
+ fprintf(stderr, "SystemWindow dtor %p\n", this);
disposeOnce();
}
void SystemWindow::dispose()
{
+ fprintf(stderr, "SystemWindow dispose %p\n", this);
maLayoutIdle.Stop();
delete mpImplData;
mpImplData = NULL;