summaryrefslogtreecommitdiff
path: root/oox
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 /oox
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 'oox')
-rw-r--r--oox/source/drawingml/chart/axisconverter.cxx2
-rw-r--r--oox/source/export/chartexport.cxx2
2 files changed, 1 insertions, 3 deletions
diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx
index 0f6973b02ec4..9f2cc0f715dc 100644
--- a/oox/source/drawingml/chart/axisconverter.cxx
+++ b/oox/source/drawingml/chart/axisconverter.cxx
@@ -224,8 +224,6 @@ void AxisConverter::convertFromModel(
case API_Y_AXIS:
OSL_ENSURE( mrModel.mnTypeId == C_TOKEN( valAx ), "AxisConverter::convertFromModel - unexpected axis model type (must: c:valAx)" );
aScaleData.AxisType = isPercent(rTypeGroups) ? cssc2::AxisType::PERCENT : cssc2::AxisType::REALNUMBER;
- if( mrModel.mnCrossBetween != -1 )
- aScaleData.ShiftedCategoryPosition = mrModel.mnCrossBetween == XML_between;
break;
case API_Z_AXIS:
OSL_ENSURE( mrModel.mnTypeId == C_TOKEN( serAx ), "AxisConverter::convertFromModel - unexpected axis model type (must: c:serAx)" );
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index ee4d83766846..d51ab5191d33 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -251,7 +251,7 @@ static bool lcl_isCategoryAxisShifted(const Reference< chart2::XChartDocument >&
if( xAxis.is())
{
chart2::ScaleData aScaleData = xAxis->getScaleData();
- if( aScaleData.AxisType == AXIS_PRIMARY_Y )
+ if( aScaleData.Categories.is() )
{
isCategoryPositionShifted = aScaleData.ShiftedCategoryPosition;
break;