From f8d3314f198b70c64a4f45e701fa38151207950f Mon Sep 17 00:00:00 2001 From: Balazs Varga Date: Wed, 22 Aug 2018 11:15:45 +0200 Subject: tdf#94502 Fix overlap export of Stacked Bar Chart to *.xlsx Export the Overlap value with 100% for stacked charts, because the default overlap value of the Bar/Column chart is 0% and LibreOffice do nothing with the overlap value in Stacked Chart case, unlike the MS Office. Change-Id: If4e20b88c2b1180f68a8d2b610c407d674a8498b Reviewed-on: https://gerrit.libreoffice.org/59448 Reviewed-by: Markus Mohrhard Tested-by: Jenkins (cherry picked from commit 17c2b0af97f73b9103be982b15d7111b3980e027) --- oox/source/export/chartexport.cxx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'oox') diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index e7dbcf90d4c2..a6bd3b4c0618 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -1471,9 +1471,24 @@ void ChartExport::exportBarChart( const Reference< chart2::XChartType >& xChartT if( aBarPositionSequence.getLength() ) { sal_Int32 nOverlap = aBarPositionSequence[0]; - pFS->singleElement( FSNS( XML_c, XML_overlap ), + // Stacked/Percent Bar/Column chart Overlap-workaround + // Export the Overlap value with 100% for stacked charts, + // because the default overlap value of the Bar/Column chart is 0% and + // LibreOffice do nothing with the overlap value in Stacked charts case, + // unlike the MS Office, which is interpreted differently. + if( ( mbStacked || mbPercent ) && nOverlap != 100 ) + { + nOverlap = 100; + pFS->singleElement( FSNS( XML_c, XML_overlap ), + XML_val, I32S( nOverlap ), + FSEND ); + } + else // Normal bar chart + { + pFS->singleElement( FSNS( XML_c, XML_overlap ), XML_val, I32S( nOverlap ), FSEND ); + } } } -- cgit ion value='distro/collabora/cd-5.3-3.4'>distro/collabora/cd-5.3-3.4 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2020-07-17lcms2: update to 2.11 and use VC2019 solutionJan-Marek Glogowski