diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-01-07 15:57:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-01-08 10:04:05 +0100 |
commit | 60150ef4b8fc1d0a30f20c3d9ed6ba0725da16a5 (patch) | |
tree | f88aff4014d4055b9a459676ad1f597556326de4 /xmloff | |
parent | 08c4ed96cc94df4a3859aa167e92e6f6da9c2ce7 (diff) |
cid#1560054 use RVO
Change-Id: I04644c9ca78930d42289368b9a596f44a14b7012
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161746
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/forms/formcellbinding.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/xmloff/source/forms/formcellbinding.cxx b/xmloff/source/forms/formcellbinding.cxx index 74075eaa0502..f9b352d03018 100644 --- a/xmloff/source/forms/formcellbinding.cxx +++ b/xmloff/source/forms/formcellbinding.cxx @@ -332,20 +332,18 @@ bool FormCellBindingHelper::doesComponentSupport( const Reference< XInterface >& Reference< XValueBinding > FormCellBindingHelper::getCurrentBinding( ) const { - Reference< XValueBinding > xBinding; Reference< XBindableValue > xBindable( m_xControlModel, UNO_QUERY ); if ( xBindable.is() ) - xBinding = xBindable->getValueBinding(); - return xBinding; + return xBindable->getValueBinding(); + return Reference<XValueBinding>(); } Reference< XListEntrySource > FormCellBindingHelper::getCurrentListSource( ) const { - Reference< XListEntrySource > xSource; Reference< XListEntrySink > xSink( m_xControlModel, UNO_QUERY ); - if ( xSink.is() ) - xSource = xSink->getListEntrySource(); - return xSource; + if (xSink.is()) + return xSink->getListEntrySource(); + return Reference<XListEntrySource>(); } void FormCellBindingHelper::setBinding( const Reference< XValueBinding >& _rxBinding ) |