summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorVinaya Mandke <vinaya.mandke@synerzip.com>2013-10-23 14:25:19 +0530
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-10-30 11:21:00 +0000
commit9239dc026ae31d38e495c7031b1e55cab4aebe9a (patch)
tree7f5ea2d5d95b3ee5536b680e148d8e1e7cb10520 /xmloff
parent72b954df59d64fa47f6380e4322243401afb683f (diff)
Fix for Chart Series Names
For Docx files, the chart series names (labels) were rendered incorrectly and hence exported incorrectly. In place of the correct label, the series name for next series was displayed. Change-Id: I988571d76d9c706ac2f7693881198bb604ec3fa8 Change-Id: I52631bc62fce46a43298c284cb11c2e8916fabe3 Reviewed-on: https://gerrit.libreoffice.org/6350 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index aa05e7b225a2..533c873a08b3 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -2589,6 +2589,7 @@ void SchXMLExportHelper_Impl::exportSeries(
OUString aFirstXDomainRange;
OUString aFirstYDomainRange;
+ bool modifyLabelRange = false;
std::vector< XMLPropertyState > aPropertyStates;
@@ -2734,11 +2735,17 @@ void SchXMLExportHelper_Impl::exportSeries(
// #i75297# allow empty series, export empty range to have all ranges on import
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_VALUES_CELL_RANGE_ADDRESS, OUString());
- if( xLabelSeq.is())
+ if( xLabelSeq.is()) {
+ OUString aRange = xLabelSeq->getSourceRangeRepresentation();
+ if ( nSeriesIdx == 0 && aRange.compareToAscii("label 1") == 0)
+ modifyLabelRange = true;
+ if (modifyLabelRange)
+ aRange = OUString("label ") + OUString::number(aRange.copy( OUString("label").getLength()).toInt32() - 1);
mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_LABEL_CELL_ADDRESS,
lcl_ConvertRange(
- xLabelSeq->getSourceRangeRepresentation(),
+ aRange,
xNewDoc ));
+ }
if( xLabelSeq.is() || xValuesSeq.is() )
aSeriesLabelValuesPair = tLabelValuesDataPair( xLabelSeq, xValuesSeq );