summaryrefslogtreecommitdiff
path: root/chart2/source/model/template/ChartTypeTemplate.cxx
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga991@gmail.com>2019-10-03 20:31:44 +0200
committerLászló Németh <nemeth@numbertext.org>2019-10-07 12:36:28 +0200
commit111c260ab2883b7906f1a66e222dbf4dc3c58c4f (patch)
tree1f558e1da5379fdc2103157f371307077d9a4d4a /chart2/source/model/template/ChartTypeTemplate.cxx
parent0a3704d172f3c721d7b217f9bafe026c457dab55 (diff)
tdf#127777 OOXML chart export: fix "CrossBetween" for not imported charts
Newly created or ODF charts were still exported incorrectly, because ShiftedCategoryPosition was stored in the view code. Now it is removed to the model using ChartTypeTemplate::adaptScales. See also commit 6027ec08fd5df2e09e34ff61b3777ad2cc8304b3 'tdf#127777 OOXML chart export: fix X axis position setting "CrossBetween"' Change-Id: I7cd69e311833bf9f24f3a600ee7c6312285a7738 Reviewed-on: https://gerrit.libreoffice.org/80160 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2/source/model/template/ChartTypeTemplate.cxx')
-rw-r--r--chart2/source/model/template/ChartTypeTemplate.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index c3710e45d7d4..c18851796ada 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -623,8 +623,11 @@ void ChartTypeTemplate::adaptScales(
aData.Categories = xCategories;
if(bSupportsCategories)
{
-
- Reference< XChartType > xChartType( getChartTypeForNewSeries(Sequence< Reference< XChartType > >() ));
+ Reference< XChartType > xChartType(getChartTypeForNewSeries(Sequence< Reference< XChartType > >()));
+ if( aData.AxisType == AxisType::CATEGORY )
+ {
+ aData.ShiftedCategoryPosition = ::chart::ChartTypeHelper::shiftCategoryPosAtXAxisPerDefault(xChartType);
+ }
bool bSupportsDates = ::chart::ChartTypeHelper::isSupportingDateAxis( xChartType, nDimensionX );
if( aData.AxisType != AxisType::CATEGORY && ( aData.AxisType != AxisType::DATE || !bSupportsDates) )
{