diff options
author | Ingrid Halama <iha@openoffice.org> | 2010-03-25 16:58:58 +0100 |
---|---|---|
committer | Ingrid Halama <iha@openoffice.org> | 2010-03-25 16:58:58 +0100 |
commit | fe03f2e6f1779db3e08bac64a3e3bed1562d0a24 (patch) | |
tree | dcf673aa65cbedb524deb10bb59b58b1379b7f2e | |
parent | 0dc23b7077efb78562b74a9cd96d9a1713b811dd (diff) |
chart45: #i80377# don't wrap wide legends so early
-rw-r--r-- | chart2/source/view/main/VLegend.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 1b6abd9bb812..b7af20e1e64d 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -678,11 +678,16 @@ void VLegend::createShapes( LegendExpansion eExpansion = LegendExpansion_HIGH; if( xLegendProp.is()) { - lcl_getProperties( xLegendProp, aLineFillProperties, aTextProperties, nMaxLabelWidth, - rPageSize ); - // get Expansion property xLegendProp->getPropertyValue( C2U( "Expansion" )) >>= eExpansion; + if( eExpansion == LegendExpansion_WIDE ) + { + //#i80377# + nMaxLabelWidth = (rAvailableSpace.Width * 5) / 6;//completely correct would be available width minus symbol size minus distances to page ... + } + + lcl_getProperties( xLegendProp, aLineFillProperties, aTextProperties, nMaxLabelWidth, + rPageSize ); } if( xBorder.is()) |