diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-25 16:23:17 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-02-18 00:45:43 +0100 |
commit | 390e951b78288e082361c386ff5c6618d917c333 (patch) | |
tree | de4f00b80ba6183f2678d6582d98d65a94b93aa7 /extensions | |
parent | 599719217423e8468cc54cc74e7850b8a867120b (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>
(cherry picked from commit e6ffb539ee232ea0c679928ff456c1cf97429f63)
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/dbpilots/gridwizard.cxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/defaulthelpprovider.cxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/formlinkdialog.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/handlerhelper.cxx | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx index 698318bdae73..8be4a22e91e9 100644 --- a/extensions/source/dbpilots/gridwizard.cxx +++ b/extensions/source/dbpilots/gridwizard.cxx @@ -390,7 +390,7 @@ namespace dbp IMPL_LINK(OGridFieldsSelection, OnEntryDoubleClicked, ListBox&, _rList, void) { - PushButton* pSimulateButton = m_pExistFields == &_rList ? m_pSelectOne : m_pDeselectOne; + PushButton* pSimulateButton = m_pExistFields == &_rList ? m_pSelectOne.get() : m_pDeselectOne.get(); if (pSimulateButton->IsEnabled()) { OnMoveOneEntry( pSimulateButton ); diff --git a/extensions/source/propctrlr/defaulthelpprovider.cxx b/extensions/source/propctrlr/defaulthelpprovider.cxx index f85e849e39af..776dabfab267 100644 --- a/extensions/source/propctrlr/defaulthelpprovider.cxx +++ b/extensions/source/propctrlr/defaulthelpprovider.cxx @@ -154,7 +154,7 @@ namespace pcr try { Reference< XWindow > xControlWindow( _rxControl->getControlWindow(), UNO_QUERY_THROW ); - pControlWindow = VCLUnoHelper::GetWindow( xControlWindow ); + pControlWindow = VCLUnoHelper::GetWindow( xControlWindow ).get(); } catch( const Exception& ) { diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx index dfaf22fdae94..b665f7a090c0 100644 --- a/extensions/source/propctrlr/formlinkdialog.cxx +++ b/extensions/source/propctrlr/formlinkdialog.cxx @@ -122,7 +122,7 @@ namespace pcr void FieldLinkRow::fillList( LinkParticipant _eWhich, const Sequence< OUString >& _rFieldNames ) { - ComboBox* pBox = ( _eWhich == eDetailField ) ? m_pDetailColumn : m_pMasterColumn; + ComboBox* pBox = ( _eWhich == eDetailField ) ? m_pDetailColumn.get() : m_pMasterColumn.get(); const OUString* pFieldName = _rFieldNames.getConstArray(); const OUString* pFieldNameEnd = pFieldName + _rFieldNames.getLength(); @@ -141,7 +141,7 @@ namespace pcr void FieldLinkRow::SetFieldName( LinkParticipant _eWhich, const OUString& _rName ) { - ComboBox* pBox = ( _eWhich == eDetailField ) ? m_pDetailColumn : m_pMasterColumn; + ComboBox* pBox = ( _eWhich == eDetailField ) ? m_pDetailColumn.get() : m_pMasterColumn.get(); pBox->SetText( _rName ); } diff --git a/extensions/source/propctrlr/handlerhelper.cxx b/extensions/source/propctrlr/handlerhelper.cxx index a4feb71ee2bd..d2e21a2dc5ac 100644 --- a/extensions/source/propctrlr/handlerhelper.cxx +++ b/extensions/source/propctrlr/handlerhelper.cxx @@ -287,7 +287,7 @@ namespace pcr try { Reference< XWindow > xInspectorWindow( _rContext->getValueByName( "DialogParentWindow" ), UNO_QUERY_THROW ); - pInspectorWindow = VCLUnoHelper::GetWindow( xInspectorWindow ); + pInspectorWindow = VCLUnoHelper::GetWindow( xInspectorWindow ).get(); } catch( const Exception& ) { |