diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-25 16:23:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-29 06:45:42 +0000 |
commit | e6ffb539ee232ea0c679928ff456c1cf97429f63 (patch) | |
tree | e4b71a9bd49edba1a0f1c95f60f6da81433d1983 /forms | |
parent | bbc7ed9c379019f31dc7ac234cf83ea151601465 (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 'forms')
-rw-r--r-- | forms/source/richtext/richtextcontrol.cxx | 2 | ||||
-rw-r--r-- | forms/source/solar/component/navbarcontrol.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index a9f8775c415e..4d2916dee931 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -175,7 +175,7 @@ namespace frm { VCLXWindow* pParentXWin = VCLXWindow::GetImplementation( _rParentPeer ); if ( pParentXWin ) - pParentWin = pParentXWin->GetWindow(); + pParentWin = pParentXWin->GetWindow().get(); DBG_ASSERT( pParentWin, "ORichTextControl::createPeer: could not obtain the VCL-level parent window!" ); } diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx index c12b0e289118..cd0f1c33fe47 100644 --- a/forms/source/solar/component/navbarcontrol.cxx +++ b/forms/source/solar/component/navbarcontrol.cxx @@ -126,7 +126,7 @@ namespace frm { VCLXWindow* pParentXWin = VCLXWindow::GetImplementation( _rParentPeer ); if ( pParentXWin ) - pParentWin = pParentXWin->GetWindow(); + pParentWin = pParentXWin->GetWindow().get(); DBG_ASSERT( pParentWin, "ONavigationBarControl::createPeer: could not obtain the VCL-level parent window!" ); } |