summaryrefslogtreecommitdiff
path: root/chart2/source/controller
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller')
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx3
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx6
-rw-r--r--chart2/source/controller/main/UndoManager.cxx6
3 files changed, 12 insertions, 3 deletions
diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
index 253699f4595c..cad005b9c06a 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
@@ -482,7 +482,8 @@ void ChartDataWrapper::fireChartDataChangeEvent(
uno::Reference<
::com::sun::star::chart::XChartDataChangeEventListener > xListener(
aIter.next(), uno::UNO_QUERY );
- xListener->chartDataChanged( aEvent );
+ if( xListener.is() )
+ xListener->chartDataChanged( aEvent );
}
}
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index 22ac22cd7c73..6049be7e3199 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -1714,7 +1714,11 @@ bool ChartController::requestQuickHelp(
lang::EventObject aEvent( xSelectionSupplier );
::cppu::OInterfaceIteratorHelper aIt( *pIC );
while( aIt.hasMoreElements() )
- (static_cast< view::XSelectionChangeListener*>(aIt.next()))->selectionChanged( aEvent );
+ {
+ uno::Reference< view::XSelectionChangeListener > xListener( aIt.next(), uno::UNO_QUERY );
+ if( xListener.is() )
+ xListener->selectionChanged( aEvent );
+ }
}
}
diff --git a/chart2/source/controller/main/UndoManager.cxx b/chart2/source/controller/main/UndoManager.cxx
index 34157503e629..21e27922b1c8 100644
--- a/chart2/source/controller/main/UndoManager.cxx
+++ b/chart2/source/controller/main/UndoManager.cxx
@@ -108,7 +108,11 @@ void ModifyBroadcaster::fireEvent()
lang::EventObject aEvent( static_cast< lang::XComponent* >( this ) );
::cppu::OInterfaceIteratorHelper aIt( *pIC );
while( aIt.hasMoreElements() )
- (static_cast< util::XModifyListener*>(aIt.next()))->modified( aEvent );
+ {
+ uno::Reference< util::XModifyListener > xListener( aIt.next(), uno::UNO_QUERY );
+ if( xListener.is() )
+ xListener->modified( aEvent );
+ }
}
}