summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
authorTünde Tóth <tundeth@gmail.com>2019-11-27 10:24:50 +0100
committerBalazs Varga <balazs.varga991@gmail.com>2020-04-28 08:02:59 +0200
commitcbe6c4929c9da28ce5553ce31782027d5111ed16 (patch)
treeeecf79a698de01d502f9ad4d23698a775bda83d5 /chart2/source
parentf94caa1ad48a0aad061cf3aa41ba45c5348ecfe4 (diff)
tdf#127811 tdf#127813 Introduce compatibility key for the data series
order of filled net and normal area charts. The data series of filled net and normal area charts are drawn in reversed order in LibreOffice but not in Microsoft Office. Default value is true to keep current behavior. Change-Id: I07adac814597b756878d74610d028f07327f7214 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/83897 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga991@gmail.com>
Diffstat (limited to 'chart2/source')
-rw-r--r--chart2/source/view/charttypes/AreaChart.cxx4
-rw-r--r--chart2/source/view/charttypes/NetChart.cxx4
2 files changed, 6 insertions, 2 deletions
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index 74e852533345..0d7e88936d8f 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -43,6 +43,7 @@
#include <com/sun/star/drawing/DoubleSequence.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <officecfg/Office/Compatibility.hxx>
namespace chart
{
@@ -606,7 +607,8 @@ void AreaChart::createShapes()
if( m_aZSlots.empty() ) //no series
return;
- if( m_nDimension == 2 && ( m_bArea || !m_bCategoryXAxis ) )
+ //tdf#127813 Don't reverse the series in OOXML-heavy environments
+ if( officecfg::Office::Compatibility::View::ReverseSeriesOrderAreaAndNetChart::get() && m_nDimension == 2 && ( m_bArea || !m_bCategoryXAxis ) )
lcl_reorderSeries( m_aZSlots );
OSL_ENSURE(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"AreaChart is not proper initialized");
diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx
index 3fea8f9ac403..2205351dfd0d 100644
--- a/chart2/source/view/charttypes/NetChart.cxx
+++ b/chart2/source/view/charttypes/NetChart.cxx
@@ -36,6 +36,7 @@
#include <osl/diagnose.h>
#include <com/sun/star/drawing/XShapes.hpp>
+#include <officecfg/Office/Compatibility.hxx>
namespace chart
{
@@ -318,7 +319,8 @@ void NetChart::createShapes()
if( m_aZSlots.empty() ) //no series
return;
- if( m_bArea )
+ //tdf#127813 Don't reverse the series in OOXML-heavy environments
+ if (officecfg::Office::Compatibility::View::ReverseSeriesOrderAreaAndNetChart::get() && m_bArea)
lcl_reorderSeries( m_aZSlots );
OSL_ENSURE(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"NetChart is not proper initialized");