From b7a46a22b6a0a5429adec015255ce76e41dced41 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 6 Aug 2014 15:40:42 +0200 Subject: Revert "bnc#886540: Let's not push the available area down when no titles are there." This reverts commit b398ed8e3f95b75705bb2e53d49589ef7fdbb1c7: "Aug 06 10:11:53 moggi, b398ed8e3f95b75705bb2e53d49589ef7fdbb1c7 broke CppunitTest_chart2_xshape, very many attributes in chart2/qa/extras/xshape/data/reference/fdo75075.xml have wrong values now; what's the best way to fix? manually fixing fdo75075.xml (assuming the new values are even correct?) looks /very/ tedious. better revert the commit for now?" --- chart2/source/view/main/ChartView.cxx | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'chart2/source') diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 902705b9ccfe..9086abc46295 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2301,7 +2301,37 @@ boost::shared_ptr lcl_createTitle( TitleHelper::eTitleType eType break; } } - + else + { + // #i109336# Improve auto positioning in chart + switch ( eAlignment ) + { + case ALIGN_TOP: + { + rRemainingSpace.Y += nYDistance; + rRemainingSpace.Height -= nYDistance; + } + break; + case ALIGN_BOTTOM: + { + rRemainingSpace.Height -= nYDistance; + } + break; + case ALIGN_LEFT: + { + rRemainingSpace.X += nXDistance; + rRemainingSpace.Width -= nXDistance; + } + break; + case ALIGN_RIGHT: + { + rRemainingSpace.Width -= nXDistance; + } + break; + default: + break; + } + } return apVTitle; } -- cgit