From 2903c5f59d257b6ab94f32df64513f2edf94fb0b Mon Sep 17 00:00:00 2001 From: Muthu Subramanian Date: Wed, 20 Mar 2013 17:39:30 +0530 Subject: n#734735: Use full available size for pie charts. --- chart2/source/view/main/ChartView.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'chart2') diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 859f1fde8d45..0a55a7ff2c82 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -1408,11 +1408,13 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& uno::Reference< drawing::XShapes > xSeriesTargetInFrontOfAxis(0); uno::Reference< drawing::XShapes > xSeriesTargetBehindAxis(0); VDiagram aVDiagram(xDiagram, aPreferredAspectRatio, nDimensionCount); + bool bIsPieOrDonut = lcl_IsPieOrDonut(xDiagram); {//create diagram aVDiagram.init(xDiagramPlusAxes_Shapes,xDiagramPlusAxes_Shapes,m_xShapeFactory); aVDiagram.createShapes(rAvailablePos,rAvailableSize); xSeriesTargetInFrontOfAxis = aVDiagram.getCoordinateRegion(); - if( !bUseFixedInnerSize ) + // It is preferrable to use full size than minimum for pie charts + if( !bIsPieOrDonut && !bUseFixedInnerSize ) aVDiagram.reduceToMimimumSize(); } @@ -1439,7 +1441,6 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& //use first coosys only so far; todo: calculate for more than one coosys if we have more in future //todo: this is just a workaround at the moment for pie and donut labels - bool bIsPieOrDonut = lcl_IsPieOrDonut(xDiagram); if( !bIsPieOrDonut && (!rVCooSysList.empty()) ) { VCoordinateSystem* pVCooSys = rVCooSysList[0]; -- cgit