diff options
author | obo <obo@openoffice.org> | 2011-03-16 09:56:18 +0100 |
---|---|---|
committer | obo <obo@openoffice.org> | 2011-03-16 09:56:18 +0100 |
commit | 2e1e4666b895718793821417d54e903611e5fb56 (patch) | |
tree | f0b7f93ba0917994d1c6e6b237dca4377ce9ef1b | |
parent | 195be5f6983a898b4cb2488caf4574aa428c4906 (diff) | |
parent | 68d57351e34095c8c76bd3335e7143879b4b313e (diff) |
CWS-TOOLING: integrate CWS chart55ooo/DEV300_m103
-rw-r--r-- | chart2/source/controller/main/ChartController_Position.cxx | 11 | ||||
-rw-r--r-- | chart2/source/view/axes/ScaleAutomatism.cxx | 28 | ||||
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | chart2/source/view/main/VLegend.cxx | 4 | ||||
-rw-r--r-- | sc/inc/chart2uno.hxx | 64 | ||||
-rw-r--r-- | sc/source/ui/unoobj/chart2uno.cxx | 188 |
6 files changed, 83 insertions, 219 deletions
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx index 03783add9..b2b13af9e 100644 --- a/chart2/source/controller/main/ChartController_Position.cxx +++ b/chart2/source/controller/main/ChartController_Position.cxx @@ -62,7 +62,7 @@ using namespace ::com::sun::star::chart2; //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, Rectangle& rPosAndSize, const awt::Size aOriginalSize ) +void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, awt::Rectangle& rPosAndSize, const awt::Size aOriginalSize ) { long nPosX(0); long nPosY(0); @@ -121,7 +121,7 @@ void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, Rectangle& r break; } - rPosAndSize = Rectangle(Point(nPosX,nPosY),Size(nSizX,nSizY)); + rPosAndSize = awt::Rectangle(nPosX,nPosY,nSizX,nSizY); } void SAL_CALL ChartController::executeDispatch_PositionAndSize() @@ -166,19 +166,18 @@ void SAL_CALL ChartController::executeDispatch_PositionAndSize() const SfxItemSet* pOutItemSet = pDlg->GetOutputItemSet(); if(pOutItemSet) { - Rectangle aObjectRect; + awt::Rectangle aObjectRect; aItemSet.Put(*pOutItemSet);//overwrite old values with new values (-> all items are set) lcl_getPositionAndSizeFromItemSet( aItemSet, aObjectRect, aSelectedSize ); awt::Size aPageSize( ChartModelHelper::getPageSize( getModel() ) ); - Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height ); + awt::Rectangle aPageRect( 0,0,aPageSize.Width,aPageSize.Height ); bool bChanged = false; if ( eObjectType == OBJECTTYPE_LEGEND ) bChanged = DiagramHelper::switchDiagramPositioningToExcludingPositioning( getModel(), false , true ); bool bMoved = PositionAndSizeHelper::moveObject( m_aSelection.getSelectedCID(), getModel() - , awt::Rectangle(aObjectRect.getX(),aObjectRect.getY(),aObjectRect.getWidth(),aObjectRect.getHeight()) - , awt::Rectangle(aPageRect.getX(),aPageRect.getY(),aPageRect.getWidth(),aPageRect.getHeight()) ); + , aObjectRect, aPageRect ); if( bMoved || bChanged ) aUndoGuard.commit(); } diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx index d4fa3c193..c009cfbc4 100644 --- a/chart2/source/view/axes/ScaleAutomatism.cxx +++ b/chart2/source/view/axes/ScaleAutomatism.cxx @@ -49,9 +49,16 @@ using ::com::sun::star::chart::TimeUnit::MONTH; using ::com::sun::star::chart::TimeUnit::YEAR; const sal_Int32 MAXIMUM_MANUAL_INCREMENT_COUNT = 500; -const sal_Int32 MAXIMUM_AUTO_INCREMENT_COUNT = 10; const sal_Int32 MAXIMUM_SUB_INCREMENT_COUNT = 100; +sal_Int32 lcl_getMaximumAutoIncrementCount( sal_Int32 nAxisType ) +{ + sal_Int32 nMaximumAutoIncrementCount = 10; + if( nAxisType==AxisType::DATE ) + nMaximumAutoIncrementCount = MAXIMUM_MANUAL_INCREMENT_COUNT; + return nMaximumAutoIncrementCount; +} + namespace { @@ -102,7 +109,7 @@ ScaleAutomatism::ScaleAutomatism( const ScaleData& rSourceScale, const Date& rNu : m_aSourceScale( rSourceScale ) , m_fValueMinimum( 0.0 ) , m_fValueMaximum( 0.0 ) - , m_nMaximumAutoMainIncrementCount( MAXIMUM_AUTO_INCREMENT_COUNT ) + , m_nMaximumAutoMainIncrementCount( lcl_getMaximumAutoIncrementCount( rSourceScale.AxisType ) ) , m_bExpandBorderToIncrementRhythm( false ) , m_bExpandIfValuesCloseToBorder( false ) , m_bExpandWideValuesToZero( false ) @@ -149,8 +156,8 @@ void ScaleAutomatism::setMaximumAutoMainIncrementCount( sal_Int32 nMaximumAutoMa { if( nMaximumAutoMainIncrementCount < 2 ) m_nMaximumAutoMainIncrementCount = 2; //#i82006 - else if( nMaximumAutoMainIncrementCount > MAXIMUM_AUTO_INCREMENT_COUNT ) - m_nMaximumAutoMainIncrementCount = MAXIMUM_AUTO_INCREMENT_COUNT; + else if( nMaximumAutoMainIncrementCount > lcl_getMaximumAutoIncrementCount( m_aSourceScale.AxisType ) ) + m_nMaximumAutoMainIncrementCount = lcl_getMaximumAutoIncrementCount( m_aSourceScale.AxisType ); else m_nMaximumAutoMainIncrementCount = nMaximumAutoMainIncrementCount; } @@ -692,6 +699,19 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForDateTimeAxis( nNumer = static_cast<sal_Int32>( rtl::math::approxCeil( nIntervalDays/nDaysPerInterval ) ); if(nNumer<=0) nNumer=1; + if( rExplicitIncrement.MajorTimeInterval.TimeUnit == DAY ) + { + if( nNumer>2 && nNumer<7 ) + nNumer=7; + else if( nNumer>7 ) + { + rExplicitIncrement.MajorTimeInterval.TimeUnit = MONTH; + nDaysPerInterval = 31.0; + nNumer = static_cast<sal_Int32>( rtl::math::approxCeil( nIntervalDays/nDaysPerInterval ) ); + if(nNumer<=0) + nNumer=1; + } + } rExplicitIncrement.MajorTimeInterval.Number = nNumer; nMainIncrementCount = nDayCount/(nNumer*nDaysPerInterval); } diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 79d489e12..cd7b1fa06 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2198,12 +2198,9 @@ std::auto_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType } uno::Reference< XTitle > xTitle( TitleHelper::getTitle( eType, xChartModel ) ); - if(xTitle.is()) + rtl::OUString aCompleteString( TitleHelper::getCompleteString( xTitle ) ); + if( aCompleteString.getLength() != 0 ) { - rtl::OUString aCompleteString( TitleHelper::getCompleteString( xTitle ) ); - if ( aCompleteString.getLength() == 0 ) - return apVTitle;//don't create empty titles as the resulting diagram position is wrong then - //create title apVTitle = std::auto_ptr<VTitle>(new VTitle(xTitle)); rtl::OUString aCID( ObjectIdentifier::createClassifiedIdentifierForObject( xTitle, xChartModel ) ); diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 65011e699..0a3cfd4a6 100644..100755 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -918,8 +918,8 @@ void VLegend::createShapes( RelativeSize aRelativeSize; if ((xLegendProp->getPropertyValue( C2U( "RelativeSize" )) >>= aRelativeSize)) { - aLegendSize.Width = aRelativeSize.Primary * rPageSize.Width; - aLegendSize.Height = aRelativeSize.Secondary * rPageSize.Height; + aLegendSize.Width = ::rtl::math::approxCeil( aRelativeSize.Primary * rPageSize.Width ); + aLegendSize.Height = ::rtl::math::approxCeil( aRelativeSize.Secondary * rPageSize.Height ); } else eExpansion = ::com::sun::star::chart::ChartLegendExpansion_HIGH; diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx index fe4e63499..4dfa7e694 100644 --- a/sc/inc/chart2uno.hxx +++ b/sc/inc/chart2uno.hxx @@ -241,70 +241,6 @@ private: }; -// LabeledDataSequence ======================================================= - -class ScChart2LabeledDataSequence : public - ::cppu::WeakImplHelper4< - ::com::sun::star::chart2::data::XLabeledDataSequence, - ::com::sun::star::util::XCloneable, - ::com::sun::star::util::XModifyBroadcaster, - ::com::sun::star::lang::XServiceInfo >, - SfxListener -{ -public: - - explicit ScChart2LabeledDataSequence( ScDocument* pDoc ); - virtual ~ScChart2LabeledDataSequence(); - - // SfxListener ----------------------------------------------------------- - - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); - - // XLabeledDataSequence -------------------------------------------------- - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getValues() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setValues( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence ) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL getLabel() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setLabel( - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >& xSequence ) - throw (::com::sun::star::uno::RuntimeException); - - // XCloneable ------------------------------------------------------------ - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone() - throw (::com::sun::star::uno::RuntimeException); - - // XModifyBroadcaster ---------------------------------------------------- - - virtual void SAL_CALL addModifyListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeModifyListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) - throw (::com::sun::star::uno::RuntimeException); - - // XServiceInfo ---------------------------------------------------------- - - virtual ::rtl::OUString SAL_CALL getImplementationName() throw( - ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& - rServiceName) throw( ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL - getSupportedServiceNames() throw( - ::com::sun::star::uno::RuntimeException); - -private: - ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::data::XDataSequence > m_aData; - ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::data::XDataSequence > m_aLabel; - ScDocument* m_pDocument; -}; - // DataSequence ============================================================== class ScChart2DataSequence : public diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index a61f32b5f..2f4c1939d 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -53,6 +53,7 @@ #include <com/sun/star/table/CellAddress.hpp> #include <com/sun/star/text/XText.hpp> #include <comphelper/extract.hxx> +#include <comphelper/processfactory.hxx> #include <vector> #include <list> @@ -62,8 +63,6 @@ SC_SIMPLE_SERVICE_INFO( ScChart2DataProvider, "ScChart2DataProvider", "com.sun.star.chart2.data.DataProvider") SC_SIMPLE_SERVICE_INFO( ScChart2DataSource, "ScChart2DataSource", "com.sun.star.chart2.data.DataSource") -SC_SIMPLE_SERVICE_INFO( ScChart2LabeledDataSequence, "ScChart2LabeledDataSequence", - "com.sun.star.chart2.data.LabeledDataSequence") SC_SIMPLE_SERVICE_INFO( ScChart2DataSequence, "ScChart2DataSequence", "com.sun.star.chart2.data.DataSequence") #if USE_CHART2_EMPTYDATASEQUENCE @@ -1051,27 +1050,40 @@ void ScChart2DataProvider::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint namespace { -ScChart2LabeledDataSequence* lcl_createScChart2DataSequenceFromTokens( auto_ptr< vector<ScSharedTokenRef> > pValueTokens, auto_ptr< vector<ScSharedTokenRef> > pLabelTokens, - ScDocument* pDoc, const uno::Reference < chart2::data::XDataProvider >& xDP, bool bIncludeHiddenCells ) +Reference< chart2::data::XLabeledDataSequence > lcl_createLabeledDataSequenceFromTokens( + auto_ptr< vector< ScSharedTokenRef > > pValueTokens, auto_ptr< vector< ScSharedTokenRef > > pLabelTokens, + ScDocument* pDoc, const Reference< chart2::data::XDataProvider >& xDP, bool bIncludeHiddenCells ) { - ScChart2LabeledDataSequence* pRet = 0; + Reference< chart2::data::XLabeledDataSequence > xResult; bool bHasValues = pValueTokens.get() && !pValueTokens->empty(); bool bHasLabel = pLabelTokens.get() && !pLabelTokens->empty(); if( bHasValues || bHasLabel ) { - pRet = new ScChart2LabeledDataSequence(pDoc); - if(bHasValues) + try { - uno::Reference < chart2::data::XDataSequence > xSeq(new ScChart2DataSequence(pDoc, xDP, pValueTokens.release(), bIncludeHiddenCells)); - pRet->setValues(xSeq); + Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + if ( xContext.is() ) + { + xResult.set( xContext->getServiceManager()->createInstanceWithContext( + ::rtl::OUString::createFromAscii( "com.sun.star.chart2.data.LabeledDataSequence" ), + xContext ), uno::UNO_QUERY_THROW ); + } + if ( bHasValues ) + { + Reference< chart2::data::XDataSequence > xSeq( new ScChart2DataSequence( pDoc, xDP, pValueTokens.release(), bIncludeHiddenCells ) ); + xResult->setValues( xSeq ); + } + if ( bHasLabel ) + { + Reference< chart2::data::XDataSequence > xLabelSeq( new ScChart2DataSequence( pDoc, xDP, pLabelTokens.release(), bIncludeHiddenCells ) ); + xResult->setLabel( xLabelSeq ); + } } - if(bHasLabel) + catch( const uno::Exception& ) { - uno::Reference < chart2::data::XDataSequence > xLabelSeq(new ScChart2DataSequence(pDoc, xDP, pLabelTokens.release(), bIncludeHiddenCells)); - pRet->setLabel(xLabelSeq); } } - return pRet; + return xResult; } //---------------------------------------------------- @@ -1474,7 +1486,7 @@ ScChart2DataProvider::createDataSource( return xResult; ScChart2DataSource* pDS = NULL; - std::list < ScChart2LabeledDataSequence* > aSeqs; + ::std::list< Reference< chart2::data::XLabeledDataSequence > > aSeqs; // Fill Categories if( bCategories ) @@ -1488,9 +1500,12 @@ ScChart2DataProvider::createDataSource( auto_ptr< vector<ScSharedTokenRef> > pLabelTokens(NULL); pLabelTokens.reset(pChartMap->getLeftUpperCornerRanges()); - ScChart2LabeledDataSequence* pCategories = lcl_createScChart2DataSequenceFromTokens( pValueTokens, pLabelTokens, m_pDocument, this, m_bIncludeHiddenCells );//ownership of pointers is transfered! - if( pCategories ) - aSeqs.push_back(pCategories); + Reference< chart2::data::XLabeledDataSequence > xCategories = lcl_createLabeledDataSequenceFromTokens( + pValueTokens, pLabelTokens, m_pDocument, this, m_bIncludeHiddenCells ); //ownership of pointers is transfered! + if ( xCategories.is() ) + { + aSeqs.push_back( xCategories ); + } } // Fill Serieses (values and label) @@ -1509,42 +1524,47 @@ ScChart2DataProvider::createDataSource( pValueTokens.reset(pChartMap->getDataRowRanges(static_cast<SCROW>(i))); pLabelTokens.reset(pChartMap->getRowHeaderRanges(static_cast<SCROW>(i))); } - ScChart2LabeledDataSequence* pChartSeries = lcl_createScChart2DataSequenceFromTokens( pValueTokens, pLabelTokens, m_pDocument, this, m_bIncludeHiddenCells ); //ownership of pointers is transfered! - if( pChartSeries ) - aSeqs.push_back(pChartSeries); + Reference< chart2::data::XLabeledDataSequence > xChartSeries = lcl_createLabeledDataSequenceFromTokens( + pValueTokens, pLabelTokens, m_pDocument, this, m_bIncludeHiddenCells ); //ownership of pointers is transfered! + if ( xChartSeries.is() ) + { + aSeqs.push_back( xChartSeries ); + } } pDS = new ScChart2DataSource(m_pDocument); - std::list < ScChart2LabeledDataSequence* >::iterator aItr(aSeqs.begin()); - std::list < ScChart2LabeledDataSequence* >::iterator aEndItr(aSeqs.end()); + ::std::list< Reference< chart2::data::XLabeledDataSequence > >::iterator aItr( aSeqs.begin() ); + ::std::list< Reference< chart2::data::XLabeledDataSequence > >::iterator aEndItr( aSeqs.end() ); //reorder labeled sequences according to aSequenceMapping - std::vector< ScChart2LabeledDataSequence* > aSeqVector; + ::std::vector< Reference< chart2::data::XLabeledDataSequence > > aSeqVector; while(aItr != aEndItr) { aSeqVector.push_back(*aItr); ++aItr; } - std::map< sal_Int32, ScChart2LabeledDataSequence* > aSequenceMap; + ::std::map< sal_Int32, Reference< chart2::data::XLabeledDataSequence > > aSequenceMap; for( sal_Int32 nNewIndex = 0; nNewIndex < aSequenceMapping.getLength(); nNewIndex++ ) { // note: assuming that the values in the sequence mapping are always non-negative - std::vector< ScChart2LabeledDataSequence* >::size_type nOldIndex( static_cast< sal_uInt32 >( aSequenceMapping[nNewIndex] )); + ::std::vector< Reference< chart2::data::XLabeledDataSequence > >::size_type nOldIndex( static_cast< sal_uInt32 >( aSequenceMapping[nNewIndex] ) ); if( nOldIndex < aSeqVector.size() ) { pDS->AddLabeledSequence( aSeqVector[nOldIndex] ); aSeqVector[nOldIndex] = 0; } - } - std::vector< ScChart2LabeledDataSequence* >::iterator aVectorItr(aSeqVector.begin()); - std::vector< ScChart2LabeledDataSequence* >::iterator aVectorEndItr(aSeqVector.end()); + ::std::vector< Reference< chart2::data::XLabeledDataSequence > >::iterator aVectorItr( aSeqVector.begin() ); + ::std::vector< Reference< chart2::data::XLabeledDataSequence > >::iterator aVectorEndItr( aSeqVector.end() ); while(aVectorItr != aVectorEndItr) { - if(*aVectorItr) - pDS->AddLabeledSequence(*aVectorItr); + Reference< chart2::data::XLabeledDataSequence > xSeq( *aVectorItr ); + if ( xSeq.is() ) + { + pDS->AddLabeledSequence( xSeq ); + } ++aVectorItr; } @@ -2321,114 +2341,6 @@ void ScChart2DataSource::AddLabeledSequence(const uno::Reference < chart2::data: m_aLabeledSequences.push_back(xNew); } -// LabeledDataSequence ======================================================= - -ScChart2LabeledDataSequence::ScChart2LabeledDataSequence( - ScDocument* pDoc ) : - m_pDocument( pDoc ) -{ - if ( m_pDocument ) - m_pDocument->AddUnoObject( *this); -} - -ScChart2LabeledDataSequence::~ScChart2LabeledDataSequence() -{ - if ( m_pDocument ) - m_pDocument->RemoveUnoObject( *this); -} - -// SfxListener ----------------------------------------------------------- - -void ScChart2LabeledDataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint) -{ - if ( rHint.ISA( SfxSimpleHint ) && - ((const SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING ) - { - ScUnoGuard aGuard; - m_pDocument = NULL; - } -} - -// XLabeledDataSequence -------------------------------------------------- - -uno::Reference< chart2::data::XDataSequence > SAL_CALL ScChart2LabeledDataSequence::getValues() - throw (uno::RuntimeException) -{ - ScUnoGuard aGuard; - return m_aData; -} - -void SAL_CALL ScChart2LabeledDataSequence::setValues( - const uno::Reference< chart2::data::XDataSequence >& xSequence ) - throw (uno::RuntimeException) -{ - ScUnoGuard aGuard; - m_aData = xSequence; -} - -uno::Reference< chart2::data::XDataSequence > SAL_CALL ScChart2LabeledDataSequence::getLabel() - throw (uno::RuntimeException) -{ - ScUnoGuard aGuard; - return m_aLabel; -} - -void SAL_CALL ScChart2LabeledDataSequence::setLabel( - const uno::Reference< chart2::data::XDataSequence >& xSequence ) - throw (uno::RuntimeException) -{ - ScUnoGuard aGuard; - m_aLabel = xSequence; -} - -// XCloneable ================================================================ - -uno::Reference< util::XCloneable > SAL_CALL ScChart2LabeledDataSequence::createClone() - throw (uno::RuntimeException) -{ - ScUnoGuard aGuard; - uno::Reference< util::XCloneable > xToClone(m_aData, uno::UNO_QUERY); - if (xToClone.is()) - { - ScChart2LabeledDataSequence* pRet = new ScChart2LabeledDataSequence(m_pDocument); - uno::Reference< chart2::data::XDataSequence > xSequence(xToClone->createClone(), uno::UNO_QUERY); - pRet->setValues(xSequence); - xToClone.set(m_aLabel, uno::UNO_QUERY); - if(xToClone.is()) - { - xSequence.set(xToClone->createClone(), uno::UNO_QUERY); - pRet->setLabel(xSequence); - } - return pRet; - } - return NULL; -} - -// XModifyBroadcaster ======================================================== - -void SAL_CALL ScChart2LabeledDataSequence::addModifyListener( const uno::Reference< util::XModifyListener >& aListener ) - throw (uno::RuntimeException) -{ - // quick'n dirty: just add the listener to each DataSequence - - uno::Reference<util::XModifyBroadcaster> xDataBroadcaster( m_aData, uno::UNO_QUERY ); - if ( xDataBroadcaster.is() ) - xDataBroadcaster->addModifyListener( aListener ); - uno::Reference<util::XModifyBroadcaster> xLabelBroadcaster( m_aLabel, uno::UNO_QUERY ); - if ( xLabelBroadcaster.is() ) - xLabelBroadcaster->addModifyListener( aListener ); -} - -void SAL_CALL ScChart2LabeledDataSequence::removeModifyListener( const uno::Reference< util::XModifyListener >& aListener ) - throw (uno::RuntimeException) -{ - uno::Reference<util::XModifyBroadcaster> xDataBroadcaster( m_aData, uno::UNO_QUERY ); - if ( xDataBroadcaster.is() ) - xDataBroadcaster->removeModifyListener( aListener ); - uno::Reference<util::XModifyBroadcaster> xLabelBroadcaster( m_aLabel, uno::UNO_QUERY ); - if ( xLabelBroadcaster.is() ) - xLabelBroadcaster->removeModifyListener( aListener ); -} // DataSequence ============================================================== |