diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2015-07-31 22:14:41 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-10-07 09:07:48 +0000 |
commit | d52d448e7b34cb8c2457948489e6691049f4a571 (patch) | |
tree | 81cd0bb8391d32a243229c87f97ba4fb2ffd92d3 /xmloff | |
parent | 6dd8193524a8a0208d7b424e396095f8e409cbc5 (diff) |
tdf#88154 workaround and unit test
Fixed 45-degree layout for axis labels, too.
Change-Id: I9764e281aeee0a439fa9eec1e3b0df840221b72f
Reviewed-on: https://gerrit.libreoffice.org/18889
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/PropertyMap.hxx | 1 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLAxisContext.cxx | 7 | ||||
-rw-r--r-- | xmloff/source/core/xmltoken.cxx | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx index 0145bde7cbe9..4a22c479ab7c 100644 --- a/xmloff/source/chart/PropertyMap.hxx +++ b/xmloff/source/chart/PropertyMap.hxx @@ -184,6 +184,7 @@ const XMLPropertyMapEntry aXMLChartPropMap[] = MAP_ENTRY( "TextCanOverlap", CHART, XML_TEXT_OVERLAP, XML_TYPE_BOOL ), MAP_ENTRY_ODF12( "ReverseDirection", CHART, XML_REVERSE_DIRECTION, XML_TYPE_BOOL ), MAP_ENTRY( "TextBreak", TEXT, XML_LINE_BREAK, XML_TYPE_BOOL ), + MAP_ENTRY_ODF_EXT( "TryStaggeringFirst", LO_EXT, XML_TRY_STAGGERING_FIRST, XML_TYPE_BOOL ), MAP_ENTRY( "ArrangeOrder", CHART, XML_LABEL_ARRANGEMENT, XML_SCH_TYPE_AXIS_ARRANGEMENT ), MAP_SPECIAL( "NumberFormat", STYLE, XML_DATA_STYLE_NAME, XML_TYPE_NUMBER, XML_SCH_CONTEXT_SPECIAL_NUMBER_FORMAT ), MAP_ENTRY( "LinkNumberFormatToSource", CHART, XML_LINK_DATA_STYLE_TO_SOURCE, XML_TYPE_BOOL ), diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx index 8377650bf221..37709e0b4af1 100644 --- a/xmloff/source/chart/SchXMLAxisContext.cxx +++ b/xmloff/source/chart/SchXMLAxisContext.cxx @@ -459,6 +459,13 @@ void SchXMLAxisContext::CreateAxis() m_xAxisProps->setPropertyValue("DisplayLabels", aFalseBool ); + // Compatibility option: starting from LibreOffice 5.1 the rotated + // layout is preferred to staggering for axis labels. + // So the import default value for having compatibility with ODF + // documents created with erlier LibreOffice versions is `true`. + if( GetImport().getGeneratorVersion() != SvXMLImport::ProductVersionUnknown ) + m_xAxisProps->setPropertyValue("TryStaggeringFirst", aTrueBool ); + // #88077# AutoOrigin 'on' is default m_xAxisProps->setPropertyValue("AutoOrigin", aTrueBool ); diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index 63e4aff8703c..0d4ed2dd5577 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -1914,6 +1914,7 @@ namespace xmloff { namespace token { TOKEN( "transpose", XML_TRANSPOSE ), TOKEN( "true", XML_TRUE ), TOKEN( "truncate-on-overflow", XML_TRUNCATE_ON_OVERFLOW ), + TOKEN( "try-staggering-first", XML_TRY_STAGGERING_FIRST ), TOKEN( "ttb", XML_TTB ), TOKEN( "type", XML_TYPE ), TOKEN( "dot-dash", XML_DOT_DASH ), |