diff options
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/inc/ChartController.hxx | 1 | ||||
-rw-r--r-- | chart2/source/controller/main/ChartController.cxx | 9 | ||||
-rw-r--r-- | chart2/source/controller/main/ChartController_Tools.cxx | 20 |
3 files changed, 30 insertions, 0 deletions
diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx index 6b4d7782be89..6894ab3b3592 100644 --- a/chart2/source/controller/inc/ChartController.hxx +++ b/chart2/source/controller/inc/ChartController.hxx @@ -502,6 +502,7 @@ private: void executeDispatch_LOKSetTextSelection(int nType, int nX, int nY); void executeDispatch_LOKPieSegmentDragging(int nOffset); + void executeDispatch_FillColor(sal_uInt32 nColor); void sendPopupRequest(OUString const & rCID, tools::Rectangle aRectangle); diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx index 96ec317defa6..c2dc975d02f2 100644 --- a/chart2/source/controller/main/ChartController.cxx +++ b/chart2/source/controller/main/ChartController.cxx @@ -1104,6 +1104,15 @@ void SAL_CALL ChartController::dispatch( this->executeDispatch_PositionAndSize(&rArgs); } } + else if(aCommand == "FillColor") + { + if (rArgs.getLength() > 0) + { + sal_uInt32 nColor = -1; + rArgs[0].Value >>= nColor; + this->executeDispatch_FillColor(nColor); + } + } else if(aCommand == "Paste") this->executeDispatch_Paste(); else if(aCommand == "Copy" ) diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index 74f7e9ab6f79..646aaf535b17 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -932,6 +932,26 @@ void ChartController::executeDispatch_ToggleGridVertical() } } +void ChartController::executeDispatch_FillColor(sal_uInt32 nColor) +{ + try + { + OUString aCID( m_aSelection.getSelectedCID() ); + const uno::Reference< frame::XModel >& xChartModel = getModel(); + if( xChartModel.is() ) + { + Reference< beans::XPropertySet > xPointProperties( + ObjectIdentifier::getObjectPropertySet( aCID, xChartModel ) ); + if( xPointProperties.is() ) + xPointProperties->setPropertyValue( "FillColor", uno::Any( nColor ) ); + } + } + catch( const uno::Exception & ex ) + { + SAL_WARN( "chart2", "Exception caught. " << ex ); + } +} + void ChartController::executeDispatch_LOKSetTextSelection(int nType, int nX, int nY) { if (m_pDrawViewWrapper) |