diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-03 15:29:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-04 07:44:26 +0100 |
commit | 23255d395f40f6a20635b6f1c39e9d59a2047586 (patch) | |
tree | 53ee80f4e67518dc7d6a31a38baeb7ae059bc86c /dbaccess | |
parent | 3165f0ff32b002a6efbc61af4f778ba4075b496e (diff) |
elide unnecessary UNO_QUERY_THROW calls
Change-Id: I0d0fc57f352e9717e721416c8941cfcf48af24c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124650
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/genericcontroller.cxx | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 25be01ce1671..78d870efd670 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -2118,11 +2118,9 @@ uno::Reference< frame::XUntitledNumbers > ODatabaseDocument::impl_getUntitledHel TNumberedController::const_iterator aFind = m_aNumberedControllers.find(sModuleId); if ( aFind == m_aNumberedControllers.end() ) { - uno::Reference< frame::XModel > xThis(static_cast< frame::XModel* >(this), uno::UNO_QUERY_THROW); rtl::Reference<::comphelper::NumberedCollection> pHelper = new ::comphelper::NumberedCollection(); xNumberedControllers = pHelper; - - pHelper->setOwner (xThis); + pHelper->setOwner(uno::Reference< frame::XModel >(this)); m_aNumberedControllers.emplace( sModuleId,xNumberedControllers ); } diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index 6cb392b35192..7798af401275 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -1055,9 +1055,8 @@ Reference< XTitle > OGenericUnoController::impl_getTitleHelper_throw() if ( ! m_xTitleHelper.is ()) { Reference< XUntitledNumbers > xUntitledProvider(getPrivateModel(), UNO_QUERY ); - Reference< XController > xThis(static_cast< XController* >(this), UNO_QUERY_THROW); - m_xTitleHelper = new ::framework::TitleHelper( m_xContext, xThis, xUntitledProvider ); + m_xTitleHelper = new ::framework::TitleHelper( m_xContext, Reference< XController >(this), xUntitledProvider ); } return m_xTitleHelper; |