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 /chart2/source/model | |
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 'chart2/source/model')
-rw-r--r-- | chart2/source/model/main/Axis.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx index 7fcaaec81eef..79855d68ac44 100644 --- a/chart2/source/model/main/Axis.cxx +++ b/chart2/source/model/main/Axis.cxx @@ -83,7 +83,9 @@ enum PROP_AXIS_MARK_POSITION, PROP_AXIS_DISPLAY_UNITS, - PROP_AXIS_BUILTINUNIT + PROP_AXIS_BUILTINUNIT, + + PROP_AXIS_TRY_STAGGERING_FIRST }; void lcl_AddPropertiesToVector( @@ -210,6 +212,16 @@ void lcl_AddPropertiesToVector( cppu::UnoType<OUString>::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); + + // Compatibility option: starting from LibreOffice 5.1 the rotated + // layout is preferred to staggering for axis labels. + rOutProperties.push_back( + Property( "TryStaggeringFirst", + PROP_AXIS_TRY_STAGGERING_FIRST, + cppu::UnoType<bool>::get(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + } struct StaticAxisDefaults_Initializer @@ -246,6 +258,7 @@ private: ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_AXIS_MINOR_TICKMARKS, 0 /* CHAXIS_MARK_NONE */ ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_MARK_POSITION, ::com::sun::star::chart::ChartAxisMarkPosition_AT_LABELS_AND_AXIS ); ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_DISPLAY_UNITS, false ); + ::chart::PropertyHelper::setPropertyValueDefault( rOutMap, PROP_AXIS_TRY_STAGGERING_FIRST, false ); } }; |