From 00f2787a4a68633206635743298926bf2e65a8fa Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 11 Feb 2015 14:42:23 +0200 Subject: vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133 Conflicts: sw/qa/tiledrendering/tiledrendering.cxx --- vcl/workben/outdevgrind.cxx | 4 ++-- vcl/workben/svdem.cxx | 6 +++--- vcl/workben/svpclient.cxx | 6 +++--- vcl/workben/svptest.cxx | 7 ++++--- vcl/workben/vcldemo.cxx | 6 +++--- 5 files changed, 15 insertions(+), 14 deletions(-) (limited to 'vcl/workben') diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx index 72869d1d507a..cf7a0d0ea8a2 100644 --- a/vcl/workben/outdevgrind.cxx +++ b/vcl/workben/outdevgrind.cxx @@ -898,8 +898,8 @@ sal_uInt16 GrindApp::Exception( sal_uInt16 nError ) int GrindApp::Main() { - TestWindow aWindow; - aWindow.Execute(); + VclPtr aWindow(new TestWindow); + aWindow->Execute(); return 0; } diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx index a06bf5cc13d7..6b2e233f9c78 100644 --- a/vcl/workben/svdem.cxx +++ b/vcl/workben/svdem.cxx @@ -81,9 +81,9 @@ public: void Main() { - MyWin aMainWin( NULL, WB_APP | WB_STDWORK ); - aMainWin.SetText(OUString("VCL - Workbench")); - aMainWin.Show(); + VclPtr aMainWin(new MyWin(NULL, WB_APP | WB_STDWORK) ); + aMainWin->SetText(OUString("VCL - Workbench")); + aMainWin->Show(); Application::Execute(); } diff --git a/vcl/workben/svpclient.cxx b/vcl/workben/svpclient.cxx index 708efb9144d3..7bbcdf2144f0 100644 --- a/vcl/workben/svpclient.cxx +++ b/vcl/workben/svpclient.cxx @@ -120,9 +120,9 @@ public: void Main() { - MyWin aMainWin( NULL, WB_STDWORK ); - aMainWin.SetText( OUString( "SvpClient" ) ); - aMainWin.Show(); + VclPtr aMainWin(new MyWin(NULL, WB_STDWORK) ); + aMainWin->SetText( OUString( "SvpClient" ) ); + aMainWin->Show(); Application::Execute(); } diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx index ebf716c3abd1..ea6988633d94 100644 --- a/vcl/workben/svptest.cxx +++ b/vcl/workben/svptest.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include @@ -90,9 +91,9 @@ public: void Main() { - MyWin aMainWin( NULL, WB_APP | WB_STDWORK ); - aMainWin.SetText( OUString( "VCL - Workbench" ) ); - aMainWin.Show(); + VclPtr aMainWin(new MyWin(NULL, WB_APP | WB_STDWORK) ); + aMainWin->SetText( OUString( "VCL - Workbench" ) ); + aMainWin->Show(); Application::Execute(); } diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 9860d7d20c84..14a57805beae 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -1609,18 +1609,18 @@ public: } } - DemoWin aMainWin(aRenderer, bThreads); + VclPtr aMainWin(new DemoWin(aRenderer, bThreads)); std::unique_ptr xWidgets; std::unique_ptr xPopup; - aMainWin.SetText("Interactive VCL demo #1"); + aMainWin->SetText("Interactive VCL demo #1"); if (bWidgets) xWidgets.reset(new DemoWidgets()); else if (bPopup) xPopup.reset(new DemoPopup()); else - aMainWin.Show(); + aMainWin->Show(); Application::Execute(); } -- cgit