summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2021-01-05 09:19:40 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-01-08 19:58:53 +0100
commit7517ec45b928fff56ba4526d5877a9ed71d500a7 (patch)
tree8adf1699fe20537b3ce90b370288cb7d6747f631 /oox
parent74b6e9d45a7f97c8723f638a784017be99f3a8c2 (diff)
tdf138773 Chart OOXML import: set text overlap to false
of category axis label, if the rotation is undefined in xml, to avoid e.g. missing rotation of them. Regression from commit: 21620f9d2f50e66dffc45a5afb539edb8d54434c (tdf#138194 Chart OOXML import: set text break to true) Change-Id: I5b03614eca547a206afc0d8118e3f6c055ed5348 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108792 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 2752fd1b665694a4db3a4e34c7fdc8780a86492e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108992 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/chart/axisconverter.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx
index 8f062d001eeb..1a8e23024612 100644
--- a/oox/source/drawingml/chart/axisconverter.cxx
+++ b/oox/source/drawingml/chart/axisconverter.cxx
@@ -38,6 +38,7 @@
#include <drawingml/chart/titleconverter.hxx>
#include <drawingml/chart/typegroupconverter.hxx>
#include <drawingml/lineproperties.hxx>
+#include <drawingml/textbody.hxx>
#include <oox/token/namespaces.hxx>
#include <oox/token/properties.hxx>
#include <oox/token/tokens.hxx>
@@ -270,7 +271,11 @@ void AxisConverter::convertFromModel(const Reference<XCoordinateSystem>& rxCoord
}
else
{
- aAxisProp.setProperty(PROP_TextOverlap, true);
+ // do not overlap text when the rotation is undefined in xml
+ bool bTextOverlap
+ = mrModel.mxTextProp.is()
+ && mrModel.mxTextProp->getTextProperties().moRotation.has();
+ aAxisProp.setProperty(PROP_TextOverlap, bTextOverlap);
/* do not break text into several lines unless the rotation is 0 degree,
or the rotation is 90 degree and the inner size of the chart is not fixed,
or the rotation is 270 degree and the inner size of the chart is not fixed */