diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2010-05-10 16:24:13 +0200 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2010-05-10 16:24:13 +0200 |
commit | ea24f338e61432731081b6e74a0be32988ede1cb (patch) | |
tree | 15b86e1b50831d407ab894be07d5a6567e66d6a9 /chart2/source/controller | |
parent | 99e46c632f56ce632e861299c32d99e363640da1 (diff) | |
parent | 5e8eba45ee34b992e1acc6ca91fe17c2d96541f9 (diff) |
CWS-TOOLING: integrate CWS chart45
Diffstat (limited to 'chart2/source/controller')
4 files changed, 20 insertions, 6 deletions
diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx index 253699f4595c..062dcc1a129d 100644 --- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx @@ -303,7 +303,9 @@ ChartDataWrapper::ChartDataWrapper( ::boost::shared_ptr< Chart2ModelContact > sp m_spChart2ModelContact( spChart2ModelContact ), m_aEventListenerContainer( m_aMutex ) { + osl_incrementInterlockedCount( &m_refCount ); initDataAccess(); + osl_decrementInterlockedCount( &m_refCount ); } ChartDataWrapper::ChartDataWrapper( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact, @@ -311,8 +313,10 @@ ChartDataWrapper::ChartDataWrapper( ::boost::shared_ptr< Chart2ModelContact > sp m_spChart2ModelContact( spChart2ModelContact ), m_aEventListenerContainer( m_aMutex ) { + osl_incrementInterlockedCount( &m_refCount ); lcl_AllOperator aOperator( xNewData ); applyData( aOperator ); + osl_decrementInterlockedCount( &m_refCount ); } ChartDataWrapper::~ChartDataWrapper() @@ -482,7 +486,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 ); } } @@ -547,6 +552,7 @@ void ChartDataWrapper::applyData( lcl_Operator& rDataOperator ) if( !bHasCategories && rDataOperator.setsCategories( bUseColumns ) ) bHasCategories = true; + aRangeString = C2U("all"); uno::Sequence< beans::PropertyValue > aArguments( DataSourceHelper::createArguments( aRangeString, aSequenceMapping, bUseColumns, bFirstCellAsLabel, bHasCategories ) ); diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index 7822c8c1cc21..6049be7e3199 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -774,6 +774,7 @@ void ChartController::execute_Tracking( const TrackingEvent& /* rTEvt */ ) void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) { ControllerLockGuard aCLGuard( m_aModel->getModel()); + bool bMouseUpWithoutMouseDown = !m_bWaitingForMouseUp; m_bWaitingForMouseUp = false; bool bNotifySelectionChange = false; { @@ -907,9 +908,8 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt ) else m_aSelection.resetPossibleSelectionAfterSingleClickWasEnsured(); } - else if( isDoubleClick(rMEvt) ) + else if( isDoubleClick(rMEvt) && !bMouseUpWithoutMouseDown /*#i106966#*/ ) { - // #i12587# support for shapes in chart Point aMousePixel = rMEvt.GetPosPixel(); execute_DoubleClick( &aMousePixel ); } @@ -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/ShapeToolbarController.cxx b/chart2/source/controller/main/ShapeToolbarController.cxx index a8a6cfba20ff..9c6ed747e1d5 100644 --- a/chart2/source/controller/main/ShapeToolbarController.cxx +++ b/chart2/source/controller/main/ShapeToolbarController.cxx @@ -56,7 +56,7 @@ namespace chart ::rtl::OUString ShapeToolbarController::getImplementationName_Static() throw (uno::RuntimeException) { - return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.comp.ShapeToolbarController" ) ); + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart2.ShapeToolbarController" ) ); } Sequence< ::rtl::OUString > ShapeToolbarController::getSupportedServiceNames_Static() throw (uno::RuntimeException) 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 ); + } } } |