diff options
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/genericcontroller.cxx | 3 | ||||
-rw-r--r-- | filter/source/config/cache/cacheupdatelistener.cxx | 2 | ||||
-rw-r--r-- | framework/source/fwe/helper/titlehelper.cxx | 2 | ||||
-rw-r--r-- | framework/source/services/frame.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/core/api/ReportDefinition.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/view/sfxbasecontroller.cxx | 4 |
8 files changed, 11 insertions, 22 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; diff --git a/filter/source/config/cache/cacheupdatelistener.cxx b/filter/source/config/cache/cacheupdatelistener.cxx index 6de64e00c46a..9616d7373df1 100644 --- a/filter/source/config/cache/cacheupdatelistener.cxx +++ b/filter/source/config/cache/cacheupdatelistener.cxx @@ -55,7 +55,7 @@ void CacheUpdateListener::startListening() if (!xNotifier.is()) return; - css::uno::Reference< css::util::XChangesListener > xThis(static_cast< css::util::XChangesListener* >(this), css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::util::XChangesListener > xThis(this); xNotifier->addChangesListener(xThis); } diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx index 5c4d07e69caa..dfd695eab3a1 100644 --- a/framework/source/fwe/helper/titlehelper.cxx +++ b/framework/source/fwe/helper/titlehelper.cxx @@ -650,7 +650,7 @@ void TitleHelper::impl_setSubTitle (const css::uno::Reference< css::frame::XTitl css::uno::Reference< css::frame::XTitleChangeBroadcaster > xOldBroadcaster(xOldSubTitle , css::uno::UNO_QUERY ); css::uno::Reference< css::frame::XTitleChangeBroadcaster > xNewBroadcaster(xSubTitle , css::uno::UNO_QUERY ); - css::uno::Reference< css::frame::XTitleChangeListener > xThis (static_cast< css::frame::XTitleChangeListener* >(this), css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::frame::XTitleChangeListener > xThis(this); if (xOldBroadcaster.is()) xOldBroadcaster->removeTitleChangeListener (xThis); diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index 9f45e891ff13..d27cea6942d5 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -1848,9 +1848,7 @@ void SAL_CALL XFrameImpl::setLayoutManager(const css::uno::Reference<css::uno::X css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL XFrameImpl::getPropertySetInfo() { checkDisposed(); - css::uno::Reference< css::beans::XPropertySetInfo > xInfo( - static_cast< css::beans::XPropertySetInfo* >(this), css::uno::UNO_QUERY_THROW); - return xInfo; + return css::uno::Reference< css::beans::XPropertySetInfo >(this); } void SAL_CALL XFrameImpl::setPropertyValue(const OUString& sProperty, diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 36babe9b72a0..7bc13e65ae51 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -2486,9 +2486,8 @@ uno::Reference< frame::XTitle > OReportDefinition::impl_getTitleHelper_throw() if ( ! m_pImpl->m_xTitleHelper.is ()) { uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(m_aProps->m_xContext); - uno::Reference< frame::XModel > xThis(static_cast< frame::XModel* >(this), uno::UNO_QUERY_THROW); - m_pImpl->m_xTitleHelper = new ::framework::TitleHelper( m_aProps->m_xContext, xThis, + m_pImpl->m_xTitleHelper = new ::framework::TitleHelper( m_aProps->m_xContext, uno::Reference< frame::XModel >(this), uno::Reference<frame::XUntitledNumbers>(xDesktop, uno::UNO_QUERY_THROW) ); } @@ -2504,11 +2503,10 @@ uno::Reference< frame::XUntitledNumbers > OReportDefinition::impl_getUntitledHel if ( ! m_pImpl->m_xNumberedControllers.is ()) { - uno::Reference< frame::XModel > xThis(static_cast< frame::XModel* >(this), uno::UNO_QUERY_THROW); rtl::Reference<::comphelper::NumberedCollection> pHelper = new ::comphelper::NumberedCollection(); m_pImpl->m_xNumberedControllers = pHelper; - pHelper->setOwner (xThis); + pHelper->setOwner (uno::Reference< frame::XModel >(this)); pHelper->setUntitledPrefix (" : "); } diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 88d87f18da4b..28afbd7e5bad 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -3926,9 +3926,8 @@ Reference< frame::XTitle > SfxBaseModel::impl_getTitleHelper () { Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); Reference< frame::XUntitledNumbers > xDesktop( frame::Desktop::create(xContext), UNO_QUERY_THROW); - Reference< frame::XModel > xThis (static_cast< frame::XModel* >(this), UNO_QUERY_THROW); - m_pData->m_xTitleHelper = new ::framework::TitleHelper(xContext, xThis, xDesktop); + m_pData->m_xTitleHelper = new ::framework::TitleHelper(xContext, Reference< frame::XModel >(this), xDesktop); } return m_pData->m_xTitleHelper; @@ -3941,12 +3940,9 @@ Reference< frame::XUntitledNumbers > SfxBaseModel::impl_getUntitledHelper () if ( ! m_pData->m_xNumberedControllers.is ()) { - Reference< frame::XModel > xThis (static_cast< frame::XModel* >(this), UNO_QUERY_THROW); rtl::Reference<::comphelper::NumberedCollection> pHelper = new ::comphelper::NumberedCollection(); - m_pData->m_xNumberedControllers = pHelper; - - pHelper->setOwner (xThis); + pHelper->setOwner (Reference< frame::XModel >(this)); pHelper->setUntitledPrefix (" : "); } diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index 279797646018..b6abf029dc67 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -1425,9 +1425,9 @@ Reference< frame::XTitle > SfxBaseController::impl_getTitleHelper () { Reference< frame::XModel > xModel = getModel (); Reference< frame::XUntitledNumbers > xUntitledProvider(xModel , uno::UNO_QUERY ); - Reference< frame::XController > xThis (static_cast< frame::XController* >(this), uno::UNO_QUERY_THROW); - m_pData->m_xTitleHelper = new ::framework::TitleHelper(::comphelper::getProcessComponentContext(), xThis, xUntitledProvider); + m_pData->m_xTitleHelper = new ::framework::TitleHelper(::comphelper::getProcessComponentContext(), + Reference< frame::XController >(this), xUntitledProvider); } return m_pData->m_xTitleHelper; |