diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-08-07 10:47:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-07 17:17:25 +0200 |
commit | 773a7b57fa99bdda9cde59937cd1987384ae533a (patch) | |
tree | 9909d560e9c14ccd9963ee4eb58a74f4f3ea6288 /chart2 | |
parent | e20d997eb3eb5c81af907718989aba4a6f9fc950 (diff) |
no need to use UNO_QUERY here
Change-Id: I1bfe8238d7c08f27d2b21f9fe79712aba045c812
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120152
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/main/ChartController_Window.cxx | 4 | ||||
-rw-r--r-- | chart2/source/model/main/ChartModel.cxx | 4 | ||||
-rw-r--r-- | chart2/source/model/main/ChartModel_Persistence.cxx | 9 | ||||
-rw-r--r-- | chart2/source/tools/LifeTime.cxx | 9 | ||||
-rw-r--r-- | chart2/source/tools/RangeHighlighter.cxx | 4 | ||||
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 4 |
6 files changed, 10 insertions, 24 deletions
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index a63da0791c30..024cbe5bf589 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1760,9 +1760,7 @@ void ChartController::impl_notifySelectionChangeListeners() ::cppu::OInterfaceIteratorHelper aIt( *pIC ); while( aIt.hasMoreElements() ) { - uno::Reference< view::XSelectionChangeListener > xListener( aIt.next(), uno::UNO_QUERY ); - if( xListener.is() ) - xListener->selectionChanged( aEvent ); + static_cast< view::XSelectionChangeListener* >( aIt.next() )->selectionChanged( aEvent ); } } } diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index 01bf592f7f34..b36d2becb6f3 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -251,9 +251,7 @@ void ChartModel::impl_notifyCloseListeners() ::cppu::OInterfaceIteratorHelper aIt( *pIC ); while( aIt.hasMoreElements() ) { - uno::Reference< util::XCloseListener > xListener( aIt.next(), uno::UNO_QUERY ); - if( xListener.is() ) - xListener->notifyClosing( aEvent ); + static_cast< util::XCloseListener* >( aIt.next() )->notifyClosing( aEvent ); } } } diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx index b0bf0d1050a4..b3166c32bd9b 100644 --- a/chart2/source/model/main/ChartModel_Persistence.cxx +++ b/chart2/source/model/main/ChartModel_Persistence.cxx @@ -654,9 +654,7 @@ void ChartModel::impl_notifyModifiedListeners() ::cppu::OInterfaceIteratorHelper aIt( *pIC ); while( aIt.hasMoreElements() ) { - uno::Reference< util::XModifyListener > xListener( aIt.next(), uno::UNO_QUERY ); - if( xListener.is() ) - xListener->modified( aEvent ); + static_cast< util::XModifyListener* >( aIt.next() )->modified( aEvent ); } } } @@ -790,9 +788,8 @@ void ChartModel::impl_notifyStorageChangeListeners() ::cppu::OInterfaceIteratorHelper aIt( *pIC ); while( aIt.hasMoreElements() ) { - uno::Reference< document::XStorageChangeListener > xListener( aIt.next(), uno::UNO_QUERY ); - if( xListener.is() ) - xListener->notifyStorageChange( static_cast< ::cppu::OWeakObject* >( this ), m_xStorage ); + static_cast< document::XStorageChangeListener* >( aIt.next() ) + ->notifyStorageChange( static_cast< ::cppu::OWeakObject* >( this ), m_xStorage ); } } } diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx index 5817db73a2e1..c705405c8913 100644 --- a/chart2/source/tools/LifeTime.cxx +++ b/chart2/source/tools/LifeTime.cxx @@ -226,9 +226,8 @@ bool CloseableLifeTimeManager::g_close_startTryClose(bool bDeliverOwnership) ::cppu::OInterfaceIteratorHelper aIt( *pIC ); while( aIt.hasMoreElements() ) { - uno::Reference< util::XCloseListener > xCloseListener( aIt.next(), uno::UNO_QUERY ); - if(xCloseListener.is()) - xCloseListener->queryClosing( aEvent, bDeliverOwnership ); + static_cast< util::XCloseListener* >( aIt.next() ) + ->queryClosing( aEvent, bDeliverOwnership ); } } } @@ -336,9 +335,7 @@ void CloseableLifeTimeManager::impl_doClose() ::cppu::OInterfaceIteratorHelper aIt( *pIC ); while( aIt.hasMoreElements() ) { - uno::Reference< util::XCloseListener > xListener( aIt.next(), uno::UNO_QUERY ); - if( xListener.is() ) - xListener->notifyClosing( aEvent ); + static_cast< util::XCloseListener* >( aIt.next() )->notifyClosing( aEvent ); } } } diff --git a/chart2/source/tools/RangeHighlighter.cxx b/chart2/source/tools/RangeHighlighter.cxx index b326d0bacce9..fb0e75f4b738 100644 --- a/chart2/source/tools/RangeHighlighter.cxx +++ b/chart2/source/tools/RangeHighlighter.cxx @@ -341,9 +341,7 @@ void RangeHighlighter::fireSelectionEvent() ::cppu::OInterfaceIteratorHelper aIt( *pIC ); while( aIt.hasMoreElements() ) { - uno::Reference< view::XSelectionChangeListener > xListener( aIt.next(), uno::UNO_QUERY ); - if( xListener.is() ) - xListener->selectionChanged( aEvent ); + static_cast< view::XSelectionChangeListener* >( aIt.next() )->selectionChanged( aEvent ); } } } diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 4d393fde9725..a5db1f26b69d 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2622,9 +2622,7 @@ void ChartView::impl_notifyModeChangeListener( const OUString& rNewMode ) ::cppu::OInterfaceIteratorHelper aIt( *pIC ); while( aIt.hasMoreElements() ) { - uno::Reference< util::XModeChangeListener > xListener( aIt.next(), uno::UNO_QUERY ); - if( xListener.is() ) - xListener->modeChanged( aEvent ); + static_cast< util::XModeChangeListener* >( aIt.next() )->modeChanged( aEvent ); } } } |