summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2020-10-29 14:47:09 +0100
committerLászló Németh <nemeth@numbertext.org>2020-10-30 19:08:29 +0100
commite64f9356df76c41e3c5c432984e11110ce1d25ca (patch)
tree81badada4b23ca04f380e27fa58315d7ac8a6350 /oox
parenta0b860ece9cd7f8d7cb55a6dc6991691ea68545a (diff)
tdf#126133 Chart OOXML import: set default text rotation to 0°
for the horizontal axis title, even if the position of the axis is left or right. With this, OOXML charts generated by third-party tools imported without bad rotated title text (as previously in commit fdb6d6ccf45e679ff3e369a876482b6801e08e25 [tdf#137734 Chart OOXML import: fix variable color charts], without bad variable colors). Change-Id: Id348fe037e4f1eb2d7253957224298aa95db5b15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105012 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/chart/axisconverter.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx
index 8599c68e6732..fa506e5a04dc 100644
--- a/oox/source/drawingml/chart/axisconverter.cxx
+++ b/oox/source/drawingml/chart/axisconverter.cxx
@@ -371,6 +371,10 @@ void AxisConverter::convertFromModel(
if( mrModel.mxTitle.is() && (rTypeGroups.front()->getTypeInfo().meTypeCategory != TYPECATEGORY_RADAR) )
{
Reference< XTitled > xTitled( xAxis, UNO_QUERY_THROW );
+ if (((nAxisIdx == API_X_AXIS && rTypeInfo.meTypeId != TYPEID_HORBAR)
+ || (nAxisIdx == API_Y_AXIS && rTypeInfo.meTypeId == TYPEID_HORBAR))
+ && (mrModel.mnAxisPos == XML_l || mrModel.mnAxisPos == XML_r))
+ mrModel.mxTitle->mnDefaultRotation = 0;
TitleConverter aTitleConv( *this, *mrModel.mxTitle );
aTitleConv.convertFromModel( xTitled, OoxResId(STR_DIAGRAM_AXISTITLE), OBJECTTYPE_AXISTITLE, nAxesSetIdx, nAxisIdx );
}