summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/salvtables.cxx7
-rw-r--r--vcl/source/window/layout.cxx14
-rw-r--r--vcl/source/window/syswin.cxx3
3 files changed, 19 insertions, 5 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 4c5636372a48..ffa6f084dc25 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -27,7 +27,7 @@
#include <salbmp.hxx>
#include <salobj.hxx>
#include <salmenu.hxx>
-
+#include <vcl/layout.hxx>
SalFrame::SalFrame()
: m_bPaintsBlocked(false)
@@ -93,6 +93,11 @@ void SalInstance::DestroyMenuItem( SalMenuItem* pItem )
OSL_ENSURE( pItem == 0, "DestroyMenu called with non-native menus" );
}
+VclPtr<MessageDialogImpl> SalInstance::CreateSalDialog(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription)
+{
+ return VclPtr<VclMessageDialog>::Create(pParent, rID, rUIXMLDescription);
+}
+
SalTimer::~SalTimer()
{
}
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;