summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorPallavi Jadhav <pallavi.jadhav@synerzip.com>2013-12-04 15:03:00 +0530
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-12-11 17:12:21 +0000
commite516f8be79ddc9d845d8141075f7d558c25c1636 (patch)
tree191046b38b4398fb2c9235ada13c968b2f5c4ad2 /oox
parent784d3e2b49fb55bfc46723a99fd00d43f31e090a (diff)
fdo#72226: Fix for Stock chart Invalid RT
Issue : In chart1.xml, <c:chart> <c:plotArea> <c:stockChart> there are four types of series as Open,Low,High and Close. For Open series, <c:ser> <c:idx val="0" /> <c:order val="0" /> an attribute "val" should be 1 and not 0. i.e. index should start from 1 and not from 0. Implementation : - In ChartExport::exportCandleStickSeries(), Using idx variable, we are writing index value which should be greater than 0. So for idx=0, we are adding value 1 while writing index value. - Added Unit tese case for chart export Conflicts: chart2/qa/extras/chart2export.cxx Change-Id: I4d5ffefbc8fcf62b50c13ca1b3ed80290962fc4e Reviewed-on: https://gerrit.libreoffice.org/6925 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/chartexport.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 3768cd30a784..9655f3e6154d 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1626,6 +1626,7 @@ void ChartExport::exportCandleStickSeries(
Reference< chart2::XChartDocument > xNewDoc( getModel(), uno::UNO_QUERY );
const char* sSeries[] = {"values-first","values-max","values-min","values-last",0};
+
for( sal_Int32 idx = 0; sSeries[idx] != 0 ; idx++ )
{
Reference< chart2::data::XLabeledDataSequence > xLabeledSeq( lcl_getDataSequenceByRole( aSeqCnt, OUString::createFromAscii(sSeries[idx]) ) );
@@ -1639,11 +1640,12 @@ void ChartExport::exportCandleStickSeries(
FSEND );
// TODO: idx and order
+ // idx attribute should start from 1 and not from 0.
pFS->singleElement( FSNS( XML_c, XML_idx ),
- XML_val, I32S(idx),
+ XML_val, I32S(idx+1),
FSEND );
pFS->singleElement( FSNS( XML_c, XML_order ),
- XML_val, I32S(idx),
+ XML_val, I32S(idx+1),
FSEND );
// export label