diff options
author | Muthu Subramanian <sumuthu@suse.com> | 2013-07-25 11:19:53 +0530 |
---|---|---|
committer | Muthu Subramanian <sumuthu@suse.com> | 2013-07-25 11:28:13 +0530 |
commit | 1543cf5eb67810108e87e8ea73f08d51223a9957 (patch) | |
tree | 5f3e94deddeddd62a2eb856c2fccf684ebd92b76 /chart2 | |
parent | e0e236c49c441b43d7c0a19077250a3016be4c64 (diff) |
n#827332: Charts shrink when there are no legends.
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/main/VLegend.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 2bc9a65895ba..6296c0151482 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -944,12 +944,14 @@ void VLegend::createShapes( bool bSymbolsLeftSide = lcl_shouldSymbolsBePlacedOnTheLeftSide( xLegendProp, m_nDefaultWritingMode ); - // place entries - aLegendSize = lcl_placeLegendEntries( aViewEntries, eExpansion, bSymbolsLeftSide, fViewFontSize, aMaxSymbolExtent - , aTextProperties, xLegendContainer, m_xShapeFactory, aLegendSize ); + if( aViewEntries.size() ) { + // place entries + aLegendSize = lcl_placeLegendEntries( aViewEntries, eExpansion, bSymbolsLeftSide, fViewFontSize, aMaxSymbolExtent, + aTextProperties, xLegendContainer, m_xShapeFactory, aLegendSize ); - if( xBorder.is() ) - xBorder->setSize( aLegendSize ); + if( xBorder.is() ) + xBorder->setSize( aLegendSize ); + } } } catch( const uno::Exception & ex ) |