summaryrefslogtreecommitdiffstats
path: root/chart2/source/tools/RegressionCurveHelper.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-09-11 16:06:18 +0000
committerKurt Zenker <kz@openoffice.org>2009-09-11 16:06:18 +0000
commit921ff4b99a018c4d45c6d8d810fc96130c1b3a70 (patch)
tree21ae48e21f773e75d8152a1b0a0fcfdef4e74f1c /chart2/source/tools/RegressionCurveHelper.cxx
parentCWS-TOOLING: integrate CWS koheimultirangecopy (diff)
downloadcore-921ff4b99a018c4d45c6d8d810fc96130c1b3a70.tar.gz
core-921ff4b99a018c4d45c6d8d810fc96130c1b3a70.zip
CWS-TOOLING: integrate CWS chartuseability01
2009-09-07 17:26:44 +0200 iha r275906 : CWS-TOOLING: rebase CWS chartuseability01 to trunk@275801 (milestone: DEV300:m57) 2009-08-27 13:48:16 +0200 iha r275481 : #7049# listbox to select chart elements 2009-08-27 11:54:53 +0200 iha r275464 : #i58163# #i69422# #i102820# enhance chart context menu 2009-08-26 16:49:58 +0200 iha r275435 : #i102820# added missing case 'floor' 2009-08-26 15:33:51 +0200 iha r275427 : #i102820# make 'insert legend' work properly 2009-08-25 16:35:00 +0200 ufi r275369 : i104087 2009-08-25 15:12:17 +0200 iha r275360 : #i104087# 'Object Properties' -> 'Format Selection' 2009-08-25 15:11:31 +0200 iha r275359 : #i104087# 'Object Properties' -> 'Format Selection' 2009-08-25 15:11:15 +0200 iha r275358 : #i104087# 'Object Properties' -> 'Format Selection' 2009-08-25 11:57:43 +0200 iha r275344 : #i104087# changed behavior of insert menu 2009-08-18 12:53:54 +0200 oc r275093 : #i104082,104086,104089# multiple changes because of changed chartUI 2009-08-10 16:46:17 +0200 ufi r274824 : i104083 i104087 i104090 2009-08-07 14:04:34 +0200 iha r274763 : #7049# listbox to select chart elements 2009-08-07 13:06:05 +0200 iha r274760 : #7049# listbox to select chart elements 2009-08-07 13:05:06 +0200 iha r274759 : #7049# listbox to select chart elements 2009-08-07 12:32:31 +0200 iha r274756 : #i58163# #i69422# #i102820# enhance chart context menu 2009-08-07 12:31:54 +0200 iha r274755 : #i58163# #i69422# #i102820# enhance chart context menu 2009-08-06 19:00:48 +0200 iha r274742 : #i103593# make insert menu behavior selection dependent 2009-08-06 19:00:14 +0200 iha r274741 : #i103593# make insert menu behavior selection dependent 2009-08-06 15:34:01 +0200 iha r274731 : #i58163# #i69422# #i102820# enhance chart context menu 2009-08-06 14:39:20 +0200 iha r274728 : #i86146# ease adding R-squared value with an equation 2009-08-06 14:37:02 +0200 iha r274727 : #i86146# ease adding R-squared value with an equation 2009-08-06 13:37:54 +0200 iha r274724 : #i86146# ease adding R-squared value with an equation 2009-08-06 13:37:15 +0200 iha r274723 : #i86146# ease adding R-squared value with an equation 2009-08-06 13:04:27 +0200 iha r274722 : #i103593# make insert menu behavior selection dependent 2009-08-06 13:03:35 +0200 iha r274721 : #i103593# make insert menu behavior selection dependent 2009-08-05 18:26:31 +0200 iha r274693 : #i104033# inconsistent wording 'error indicator' <-> 'error bar' 2009-08-05 16:51:45 +0200 iha r274688 : #i104028# rename font tabpage 'Characters'->'Font' 2009-08-05 16:30:21 +0200 iha r274685 : #i58163# #i69422# #i102820# enhance chart context menu 2009-08-05 15:34:11 +0200 iha r274680 : #i58163# #i69422# #i102820# enhance chart context menu 2009-08-05 15:32:43 +0200 iha r274679 : #i58163# #i69422# #i102820# enhance chart context menu 2009-08-05 15:31:26 +0200 iha r274678 : #i58163# #i69422# #i102820# enhance chart context menu 2009-08-05 15:17:51 +0200 iha r274676 : #i58163# #i69422# #i102820# enhance chart context menu 2009-08-05 15:16:22 +0200 iha r274675 : #i58163# #i69422# #i102820# enhance chart context menu 2009-08-05 14:58:59 +0200 iha r274674 : #7049# listbox to select chart elements 2009-08-05 14:33:54 +0200 iha r274669 : #7049# listbox to select chart elements 2009-08-05 14:22:17 +0200 iha r274665 : #7049# listbox to select chart elements 2009-08-05 13:21:05 +0200 iha r274656 : #i102820# offer insertion of several elements in context menu also if nothing is selected 2009-08-05 11:56:06 +0200 iha r274647 : #7049# listbox to select chart elements 2009-08-05 11:43:40 +0200 iha r274645 : #7049# listbox to select chart elements 2009-07-24 19:46:50 +0200 iha r274318 : #i58163# #i69422# #i102820# enhance chart context menu 2009-07-24 16:23:13 +0200 iha r274313 : #i58163# #i69422# #i102820# enhance chart context menu 2009-07-24 16:13:22 +0200 iha r274311 : #i58163# #i69422# #i102820# enhance chart context menu
Diffstat (limited to 'chart2/source/tools/RegressionCurveHelper.cxx')
-rw-r--r--chart2/source/tools/RegressionCurveHelper.cxx51
1 files changed, 51 insertions, 0 deletions
diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx
index 7686b2c7009d..8a4fd8ce4f7e 100644
--- a/chart2/source/tools/RegressionCurveHelper.cxx
+++ b/chart2/source/tools/RegressionCurveHelper.cxx
@@ -457,6 +457,39 @@ bool RegressionCurveHelper::removeAllExceptMeanValueLine(
return bRemovedSomething;
}
+void RegressionCurveHelper::removeEquations(
+ uno::Reference< chart2::XRegressionCurveContainer > & xRegCnt )
+{
+ if( xRegCnt.is())
+ {
+ try
+ {
+ uno::Sequence< uno::Reference< chart2::XRegressionCurve > > aCurves(
+ xRegCnt->getRegressionCurves());
+ for( sal_Int32 i = 0; i < aCurves.getLength(); ++i )
+ {
+ if( !isMeanValueLine( aCurves[i] ) )
+ {
+ uno::Reference< chart2::XRegressionCurve > xRegCurve( aCurves[ i ] );
+ if( xRegCurve.is() )
+ {
+ uno::Reference< beans::XPropertySet > xEqProp( xRegCurve->getEquationProperties() ) ;
+ if( xEqProp.is())
+ {
+ xEqProp->setPropertyValue( C2U("ShowEquation"), uno::makeAny( false ));
+ xEqProp->setPropertyValue( C2U("ShowCorrelationCoefficient"), uno::makeAny( false ));
+ }
+ }
+ }
+ }
+ }
+ catch( uno::Exception & ex )
+ {
+ ASSERT_EXCEPTION( ex );
+ }
+ }
+}
+
// static
void RegressionCurveHelper::replaceOrAddCurveAndReduceToOne(
tRegressionType eType,
@@ -683,6 +716,24 @@ sal_Int32 RegressionCurveHelper::getRegressionCurveIndex(
return -1;
}
+bool RegressionCurveHelper::hasEquation( const Reference< chart2::XRegressionCurve > & xCurve )
+{
+ bool bHasEquation = false;
+ if( xCurve.is())
+ {
+ uno::Reference< beans::XPropertySet > xEquationProp( xCurve->getEquationProperties());
+ if( xEquationProp.is())
+ {
+ bool bShowEquation = false;
+ bool bShowCoefficient = false;
+ xEquationProp->getPropertyValue( C2U("ShowEquation")) >>= bShowEquation;
+ xEquationProp->getPropertyValue( C2U("ShowCorrelationCoefficient")) >>= bShowCoefficient;
+ bHasEquation = bShowEquation || bShowCoefficient;
+ }
+ }
+ return bHasEquation;
+}
+
//.............................................................................
} //namespace chart
//.............................................................................