[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.1' - chart2/source

Muthu Subramanian sumuthu at suse.com
Thu Oct 17 04:38:02 PDT 2013


 chart2/source/view/main/VLegend.cxx |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 7f7853f5165423b990eae3229dc8edad206433e3
Author: Muthu Subramanian <sumuthu at suse.com>
Date:   Thu Jul 25 11:19:53 2013 +0530

    n#827332: Charts shrink when there are no legends.

diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 2bc9a65..6296c01 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 )


More information about the Libreoffice-commits mailing list