Kaydet (Commit) 9239dc02 authored tarafından Vinaya Mandke's avatar Vinaya Mandke Kaydeden (comit) Markus Mohrhard

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/6350Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 72b954df
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment