summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuthu Subramanian <sumuthu@suse.com>2013-03-20 17:39:30 +0530
committerMuthu Subramanian <sumuthu@suse.com>2013-03-20 19:31:07 +0530
commitc775a572fa2071fa7c98819233f1d5b3224e9b74 (patch)
tree04616972d0496a8f09441d3f40b5505046bae32b
parentdf3ec1cd965bc6f34846cd86f303f3473e672031 (diff)
n#734735: Use full available size for pie charts.
-rw-r--r--chart2/source/view/main/ChartView.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 8399d8ba7225..bd4806dc57fe 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1406,11 +1406,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();
}
@@ -1437,7 +1439,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];