summaryrefslogtreecommitdiff
path: root/chart2/source/controller/main/ControllerCommandDispatch.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <quikee@gmail.com>2013-06-30 22:27:07 +0200
committerTomaž Vajngerl <quikee@gmail.com>2013-07-03 21:46:46 +0200
commit7302c4f649827f70b116be266be76ae6f864b11f (patch)
tree9762e07998b2c2b93670cc80e7beab10b2db3ec0 /chart2/source/controller/main/ControllerCommandDispatch.cxx
parent01fc2a65b210d8521be3ba8f39116785e17e3063 (diff)
Change series and trendline pop-up to support more trendlines.
Conflicts: chart2/source/controller/main/ChartController_Window.cxx Change-Id: I70eb06d74670f54fa3792723711e9f73700f12ba
Diffstat (limited to 'chart2/source/controller/main/ControllerCommandDispatch.cxx')
-rw-r--r--chart2/source/controller/main/ControllerCommandDispatch.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index f4c1669c3753..6731998599c2 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -242,12 +242,12 @@ void ControllerState::update(
if( xRegCurveCnt.is())
{
uno::Reference< chart2::XRegressionCurve > xRegCurve( RegressionCurveHelper::getFirstCurveNotMeanValueLine( xRegCurveCnt ) );
- bMayFormatTrendline = bMayDeleteTrendline = xRegCurve.is();
+ // Trendline
+ bMayAddTrendline = true;
+
+ // Mean Value
bMayFormatMeanValue = bMayDeleteMeanValue = RegressionCurveHelper::hasMeanValueLine( xRegCurveCnt );
- bMayAddTrendline = ! bMayDeleteTrendline;
bMayAddMeanValue = ! bMayDeleteMeanValue;
- bMayFormatTrendlineEquation = bMayDeleteTrendlineEquation = RegressionCurveHelper::hasEquation( xRegCurve );
- bMayAddTrendlineEquation = !bMayDeleteTrendlineEquation;
}
}
@@ -275,8 +275,11 @@ void ControllerState::update(
if( aObjectType == OBJECTTYPE_DATA_CURVE )
{
bMayFormatTrendline = true;
+ bMayDeleteTrendline = true;
uno::Reference< chart2::XRegressionCurve > xRegCurve(
ObjectIdentifier::getObjectPropertySet( aSelObjCID, xModel ), uno::UNO_QUERY );
+
+ // Trendline Equation
bMayFormatTrendlineEquation = bMayDeleteTrendlineEquation = RegressionCurveHelper::hasEquation( xRegCurve );
bMayAddTrendlineEquation = !bMayDeleteTrendlineEquation;
}
@@ -286,10 +289,10 @@ void ControllerState::update(
bool bHasR2Value = false;
try
{
- uno::Reference< beans::XPropertySet > xEqProp(
+ uno::Reference< beans::XPropertySet > xEquationProperties(
ObjectIdentifier::getObjectPropertySet( aSelObjCID, xModel ), uno::UNO_QUERY );
- if( xEqProp.is())
- xEqProp->getPropertyValue( "ShowCorrelationCoefficient" ) >>= bHasR2Value;
+ if( xEquationProperties.is() )
+ xEquationProperties->getPropertyValue( "ShowCorrelationCoefficient" ) >>= bHasR2Value;
}
catch(const uno::RuntimeException& e)
{