summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@suse.com>2013-06-27 18:46:47 +0530
committerAndras Timar <atimar@suse.com>2013-07-08 13:53:54 -0700
commita3361f9bff7395a399319c69f815057f1293059a (patch)
tree0cfdc29e634a6fd04ff439533fad51a4069bca0c
parent22a22a0983ec9c95e5b471395fc1c5bb813bd0d2 (diff)
n#820273: Multilevel labels are rotated.
It looks odd when multilevel labels are rotated as well. This patch resets the rotation values for outer labels.
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index eb7efa8aea7e..eef8b920c9d2 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -1528,6 +1528,14 @@ void VCartesianAxis::updatePositions()
,static_cast<sal_Int32>(aTickScreenPos2D.getY()));
double fRotationAngleDegree = m_aAxisLabelProperties.fRotationAngleDegree;
+ if( nDepth > 0 )
+ {
+ /* Multi-level Labels: default to 0 or 90 */
+ if( pTickFactory2D->isHorizontalAxis() )
+ fRotationAngleDegree = 0.0;
+ else
+ fRotationAngleDegree = 90;
+ }
// #i78696# use mathematically correct rotation now
const double fRotationAnglePi(fRotationAngleDegree * (F_PI / -180.0));