diff options
author | Tünde Tóth <tundeth@gmail.com> | 2020-07-10 11:42:08 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-07-13 11:30:24 +0200 |
commit | 02c4b116cc927688fde8401413b126df72fc9b43 (patch) | |
tree | 9bf96deb07dda7e5aec7c0380b3c9db8abbb9aac /chart2 | |
parent | 7b156d37cfc92292323694ec064fe51ae57b3257 (diff) |
tdf#134676 Chart OOXML import: fix X axis title width
Set length of the horizontal axis title box is about
to 80% of the length of the chart area, to avoid of
collision of axis titles, like MSO does.
Change-Id: Ie01308e2ddc8c1c4d19f812231ede21ff939cb98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98484
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index a6c09be30b1d..a70738adb906 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2145,6 +2145,12 @@ std::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType aTextMaxWidth.Width = static_cast<sal_Int32>(rPageSize.Width * 0.8); aTextMaxWidth.Height = static_cast<sal_Int32>(rPageSize.Height * 0.5); } + else if (eType == TitleHelper::X_AXIS_TITLE || eType == TitleHelper::SECONDARY_X_AXIS_TITLE + || eType == TitleHelper::TITLE_AT_STANDARD_X_AXIS_POSITION) + { + aTextMaxWidth.Width = static_cast<sal_Int32>(rPageSize.Width * 0.8); + aTextMaxWidth.Height = static_cast<sal_Int32>(rPageSize.Height * 0.2); + } else if (eType == TitleHelper::Y_AXIS_TITLE || eType == TitleHelper::SECONDARY_Y_AXIS_TITLE || eType == TitleHelper::TITLE_AT_STANDARD_Y_AXIS_POSITION) { |