summaryrefslogtreecommitdiff
path: root/chart2/source/model
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2010-05-10 16:24:13 +0200
committerIvo Hinkelmann <ihi@openoffice.org>2010-05-10 16:24:13 +0200
commitea24f338e61432731081b6e74a0be32988ede1cb (patch)
tree15b86e1b50831d407ab894be07d5a6567e66d6a9 /chart2/source/model
parent99e46c632f56ce632e861299c32d99e363640da1 (diff)
parent5e8eba45ee34b992e1acc6ca91fe17c2d96541f9 (diff)
CWS-TOOLING: integrate CWS chart45
Diffstat (limited to 'chart2/source/model')
-rw-r--r--chart2/source/model/main/ChartModel.cxx6
-rw-r--r--chart2/source/model/main/ChartModel_Persistence.cxx13
-rw-r--r--chart2/source/model/main/DataSeries.cxx14
3 files changed, 17 insertions, 16 deletions
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index dc0931f41fc4..2a34844c169d 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -230,7 +230,11 @@ void SAL_CALL ChartModel::impl_notifyCloseListeners()
lang::EventObject aEvent( static_cast< lang::XComponent*>(this) );
::cppu::OInterfaceIteratorHelper aIt( *pIC );
while( aIt.hasMoreElements() )
- (static_cast< util::XCloseListener*>(aIt.next()))->notifyClosing( aEvent );
+ {
+ uno::Reference< util::XCloseListener > xListener( aIt.next(), uno::UNO_QUERY );
+ if( xListener.is() )
+ xListener->notifyClosing( aEvent );
+ }
}
}
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx
index 4f864ae0fd1c..113be99915cb 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -697,7 +697,11 @@ void SAL_CALL ChartModel::impl_notifyModifiedListeners()
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 );
+ }
}
}
@@ -827,8 +831,11 @@ void SAL_CALL ChartModel::impl_notifyStorageChangeListeners()
{
::cppu::OInterfaceIteratorHelper aIt( *pIC );
while( aIt.hasMoreElements() )
- (static_cast< document::XStorageChangeListener* >(aIt.next()))->notifyStorageChange(
- static_cast< ::cppu::OWeakObject* >( this ), m_xStorage );
+ {
+ uno::Reference< document::XStorageChangeListener > xListener( aIt.next(), uno::UNO_QUERY );
+ if( xListener.is() )
+ xListener->notifyStorageChange( static_cast< ::cppu::OWeakObject* >( this ), m_xStorage );
+ }
}
}
diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx
index 4faca33e936c..bdb46665004f 100644
--- a/chart2/source/model/main/DataSeries.cxx
+++ b/chart2/source/model/main/DataSeries.cxx
@@ -116,13 +116,6 @@ void lcl_CloneAttributedDataPoints(
}
}
-bool lcl_isInternalData( const Reference< chart2::data::XLabeledDataSequence > & xLSeq )
-{
- Reference< lang::XServiceInfo > xServiceInfo( xLSeq, uno::UNO_QUERY );
- return ( xServiceInfo.is() && xServiceInfo->getImplementationName().equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM("com.sun.star.comp.chart2.LabeledDataSequence")));
-}
-
} // anonymous namespace
// ----------------------------------------
@@ -146,11 +139,8 @@ DataSeries::DataSeries( const DataSeries & rOther ) :
{
if( ! rOther.m_aDataSequences.empty())
{
- if( lcl_isInternalData( rOther.m_aDataSequences.front()))
- CloneHelper::CloneRefVector< tDataSequenceContainer::value_type >(
- rOther.m_aDataSequences, m_aDataSequences );
- else
- m_aDataSequences = rOther.m_aDataSequences;
+ CloneHelper::CloneRefVector< tDataSequenceContainer::value_type >(
+ rOther.m_aDataSequences, m_aDataSequences );
ModifyListenerHelper::addListenerToAllElements( m_aDataSequences, m_xModifyEventForwarder );
}