diff options
Diffstat (limited to 'chart2/source/controller/main/ChartController_Tools.cxx')
-rw-r--r-- | chart2/source/controller/main/ChartController_Tools.cxx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx index ed0776d94c79..6eb592da4e08 100644 --- a/chart2/source/controller/main/ChartController_Tools.cxx +++ b/chart2/source/controller/main/ChartController_Tools.cxx @@ -979,6 +979,36 @@ void ChartController::executeDispatch_FillGradient(OUString sJSONGradient) } } +void ChartController::executeDispatch_LineColor(sal_uInt32 nColor) +{ + try + { + OUString aCID( m_aSelection.getSelectedCID() ); + const uno::Reference< frame::XModel >& xChartModel = getModel(); + if( xChartModel.is() ) + { + Reference< beans::XPropertySet > xPropSet( + ObjectIdentifier::getObjectPropertySet( aCID, xChartModel ) ); + + ObjectType eType = ObjectIdentifier::getObjectType(aCID); + if (eType == OBJECTTYPE_DIAGRAM) + { + css::uno::Reference<css::chart2::XDiagram> xDiagram( + xPropSet, css::uno::UNO_QUERY); + if (xDiagram.is()) + xPropSet.set(xDiagram->getWall()); + } + + if( xPropSet.is() ) + xPropSet->setPropertyValue( "LineColor", css::uno::makeAny( Color(nColor) ) ); + } + } + catch( const uno::Exception& ) + { + DBG_UNHANDLED_EXCEPTION( "chart2" ); + } +} + void ChartController::executeDispatch_LOKSetTextSelection(int nType, int nX, int nY) { if (!m_pDrawViewWrapper) |