diff options
author | Ingrid Halama <iha@openoffice.org> | 2010-10-27 19:06:03 +0200 |
---|---|---|
committer | Ingrid Halama <iha@openoffice.org> | 2010-10-27 19:06:03 +0200 |
commit | db36cee77def18c36b2316fee9eac05ff7c9b2d2 (patch) | |
tree | f0533f0917c04f4b3b2a862bf8999a40d3514753 /chart2/source/view/axes | |
parent | a82a5b6191de8e8dad9f55f0f7da57732a0bef14 (diff) |
chartextensibility: #i115276# improve layout of hierarchical axis labels
Diffstat (limited to 'chart2/source/view/axes')
-rw-r--r-- | chart2/source/view/axes/VCartesianAxis.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index 991c87e3a2ef..7594018826b5 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -757,6 +757,20 @@ bool VCartesianAxis::createTextShapes( recordMaximumTextSize( pTickInfo->xTextShape, rAxisLabelProperties.fRotationAngleDegree ); + //better rotate if single words are broken apart + if( nLimitedSpaceForText>0 && !rAxisLabelProperties.bOverlapAllowed + && ::rtl::math::approxEqual( rAxisLabelProperties.fRotationAngleDegree, 0.0 ) + && m_aAxisProperties.m_bComplexCategories + && lcl_hasWordBreak( pTickInfo->xTextShape ) ) + { + rAxisLabelProperties.fRotationAngleDegree = 90; + rAxisLabelProperties.bLineBreakAllowed = false; + m_aAxisLabelProperties.fRotationAngleDegree = rAxisLabelProperties.fRotationAngleDegree; + m_aAxisLabelProperties.bLineBreakAllowed = false; + removeTextShapesFromTicks(); + return false; + } + //if NO OVERLAP -> remove overlapping shapes if( pLastVisibleNeighbourTickInfo && !rAxisLabelProperties.bOverlapAllowed ) { |