diff options
author | Ingrid Halama [iha] <Ingrid.Halama@oracle.com> | 2011-02-01 17:20:47 +0100 |
---|---|---|
committer | Ingrid Halama [iha] <Ingrid.Halama@oracle.com> | 2011-02-01 17:20:47 +0100 |
commit | dc8e53e3a26667df93dba87deb81b1b461490516 (patch) | |
tree | c90530bd756e76f8d8ad59af31a4f7e163b07702 /chart2 | |
parent | 0cae34e7acd9e3d5d1720f84535729204f20e647 (diff) |
chart52: #28670# make the legend within charts resizeable - part 6
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/main/VLegend.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index c24e26bc9410..988ea5ad8bb5 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -261,7 +261,7 @@ void lcl_collectColumnWidths( std::vector< sal_Int32 >& rColumnWidths, const sal } void lcl_collectRowHeighs( std::vector< sal_Int32 >& rRowHeights, const sal_Int32 nNumberOfRows, const sal_Int32 nNumberOfColumns - , const ::std::vector< Reference< drawing::XShape > > aTextShapes, const awt::Size& aMaxSymbolExtent ) + , const ::std::vector< Reference< drawing::XShape > > aTextShapes ) { // calculate maximum height for each row // and collect column widths @@ -435,7 +435,7 @@ awt::Size lcl_placeLegendEntries( nNumberOfRows = nCurrentRow+1; //check if there is not enough space so that some entries must be removed - lcl_collectRowHeighs( aRowHeights, nNumberOfRows, nNumberOfColumns, aTextShapes, aMaxSymbolExtent ); + lcl_collectRowHeighs( aRowHeights, nNumberOfRows, nNumberOfColumns, aTextShapes ); nTextLineHeight = lcl_getTextLineHeight( aRowHeights, nNumberOfRows, fViewFontSize ); sal_Int32 nSumHeight = 0; for( sal_Int32 nR=0; nR<nNumberOfRows; nR++ ) @@ -491,7 +491,7 @@ awt::Size lcl_placeLegendEntries( for( sal_Int32 nC=0; nC<nNumberOfColumns; nC++ ) nSumWidth += aColumnWidths[nC]; nRemainingSpace = rAvailableSpace.Width - nSumWidth; - if( nRemainingSpace>0 ) + if( nRemainingSpace>=0 ) { sal_Int32 nNormalSpacingWidth = 2*nXPadding+(nNumberOfColumns-1)*nXOffset; if( nRemainingSpace < nNormalSpacingWidth ) @@ -563,7 +563,7 @@ awt::Size lcl_placeLegendEntries( if( eExpansion != ::com::sun::star::chart::ChartLegendExpansion_CUSTOM ) { lcl_collectColumnWidths( aColumnWidths, nNumberOfRows, nNumberOfColumns, aTextShapes, aMaxSymbolExtent ); - lcl_collectRowHeighs( aRowHeights, nNumberOfRows, nNumberOfColumns, aTextShapes, aMaxSymbolExtent ); + lcl_collectRowHeighs( aRowHeights, nNumberOfRows, nNumberOfColumns, aTextShapes ); nTextLineHeight = lcl_getTextLineHeight( aRowHeights, nNumberOfRows, fViewFontSize ); } |