summaryrefslogtreecommitdiff
path: root/extensions
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 /extensions
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 'extensions')
-rw-r--r--extensions/source/dbpilots/gridwizard.cxx2
-rw-r--r--extensions/source/propctrlr/defaulthelpprovider.cxx2
-rw-r--r--extensions/source/propctrlr/formlinkdialog.cxx4
-rw-r--r--extensions/source/propctrlr/handlerhelper.cxx2
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& )
{