diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-08-06 15:40:42 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-08-06 15:40:42 +0200 |
commit | b7a46a22b6a0a5429adec015255ce76e41dced41 (patch) | |
tree | d7bd13c985e9f9cd3daa050aed703a2086e7fa15 | |
parent | 3c01c88adc359102cb45f46e848bdb1ae652f573 (diff) |
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
<sberg> 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?"
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 32 |
1 files changed, 31 insertions, 1 deletions
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<VTitle> 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; } |