summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-25 16:23:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-29 06:45:42 +0000
commite6ffb539ee232ea0c679928ff456c1cf97429f63 (patch)
treee4b71a9bd49edba1a0f1c95f60f6da81433d1983 /svtools
parentbbc7ed9c379019f31dc7ac234cf83ea151601465 (diff)
loplugin:vclwidgets check for assigning from VclPt<T> to T*
Inspired by a recent bug report where we were assigning the result of VclPtr<T>::Create to a raw pointer. As a consequence, we also need to change various methods that were returning newly created Window subclasses via raw pointer, to instead return those via VclPtr Change-Id: I8118e0195a5b2b4780e646cfb0e151692e54ae2b Reviewed-on: https://gerrit.libreoffice.org/31318 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/hatchwindow/hatchwindow.cxx2
-rw-r--r--svtools/source/uno/genericunodialog.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/svtools/source/hatchwindow/hatchwindow.cxx b/svtools/source/hatchwindow/hatchwindow.cxx
index 148ff37d0d9f..e7216d25f256 100644
--- a/svtools/source/hatchwindow/hatchwindow.cxx
+++ b/svtools/source/hatchwindow/hatchwindow.cxx
@@ -45,7 +45,7 @@ void VCLXHatchWindow::initializeWindow( const uno::Reference< awt::XWindowPeer >
{
SolarMutexGuard aGuard;
- vcl::Window* pParent = nullptr;
+ VclPtr<vcl::Window> pParent;
VCLXWindow* pParentComponent = VCLXWindow::GetImplementation( xParent );
if ( pParentComponent )
diff --git a/svtools/source/uno/genericunodialog.cxx b/svtools/source/uno/genericunodialog.cxx
index 7f1b54b49fc5..1a6fab51fd62 100644
--- a/svtools/source/uno/genericunodialog.cxx
+++ b/svtools/source/uno/genericunodialog.cxx
@@ -168,7 +168,7 @@ bool OGenericUnoDialog::impl_ensureDialog_lck()
// get the parameters for the dialog from the current settings
// the parent window
- vcl::Window* pParent = nullptr;
+ VclPtr<vcl::Window> pParent;
VCLXWindow* pImplementation = VCLXWindow::GetImplementation(m_xParent);
if (pImplementation)
pParent = pImplementation->GetWindow();