summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-09-19 16:41:41 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-09-19 18:43:51 -0400
commit9396f59a3c3012cc7514d50f1b3f6476cb73ca9d (patch)
tree24ecc80947f58b0e30b2be1b9cf1021bfb653348
parent21c92bb25cb67c589adb3799d07a9703c6ce83d3 (diff)
Finally, move the group shape object for the diagram with axes to the param.
Change-Id: I134275076256bb1b5441ae7804eacaaaa689d171
-rw-r--r--chart2/inc/ChartView.hxx7
-rw-r--r--chart2/source/view/main/ChartView.cxx21
2 files changed, 14 insertions, 14 deletions
diff --git a/chart2/inc/ChartView.hxx b/chart2/inc/ChartView.hxx
index 1d9041474525..dc3d495532af 100644
--- a/chart2/inc/ChartView.hxx
+++ b/chart2/inc/ChartView.hxx
@@ -222,10 +222,9 @@ private: //methods
void render();
- ::com::sun::star::awt::Rectangle impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlotterContainer
- , const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes>& xDiagramPlusAxes_Shapes
- , const CreateShapeParam2D& rParam
- , const ::com::sun::star::awt::Size& rPageSize );
+ css::awt::Rectangle impl_createDiagramAndContent(
+ SeriesPlotterContainer& rSeriesPlotterContainer,
+ const CreateShapeParam2D& rParam, const css::awt::Size& rPageSize );
DECL_LINK( UpdateTimeBased, void* );
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index a40799f92530..747ebe874636 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -144,6 +144,8 @@ struct CreateShapeParam2D
css::uno::Reference<css::drawing::XShape> mxMarkHandles;
css::uno::Reference<css::drawing::XShape> mxPlotAreaWithAxes;
+ css::uno::Reference<css::drawing::XShapes> mxDiagramWithAxesShapes;
+
bool mbAutoPosTitleX;
bool mbAutoPosTitleY;
bool mbAutoPosTitleZ;
@@ -1430,10 +1432,9 @@ sal_Int16 lcl_getDefaultWritingModeFromPool( const boost::shared_ptr<DrawModelWr
} //end anonymous namespace
-awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer& rSeriesPlotterContainer
- , const uno::Reference< drawing::XShapes>& xDiagramPlusAxes_Shapes
- , const CreateShapeParam2D& rParam
- , const awt::Size& rPageSize )
+awt::Rectangle ChartView::impl_createDiagramAndContent(
+ SeriesPlotterContainer& rSeriesPlotterContainer,
+ const CreateShapeParam2D& rParam, const awt::Size& rPageSize )
{
//return the used rectangle
awt::Rectangle aUsedOuterRect(rParam.maRemainingSpace.X, rParam.maRemainingSpace.Y, 0, 0);
@@ -1490,7 +1491,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer&
VDiagram aVDiagram(xDiagram, aPreferredAspectRatio, nDimensionCount);
bool bIsPieOrDonut = lcl_IsPieOrDonut(xDiagram);
{//create diagram
- aVDiagram.init(xDiagramPlusAxes_Shapes, m_xShapeFactory);
+ aVDiagram.init(rParam.mxDiagramWithAxesShapes, m_xShapeFactory);
aVDiagram.createShapes(
awt::Point(rParam.maRemainingSpace.X, rParam.maRemainingSpace.Y),
awt::Size(rParam.maRemainingSpace.Width, rParam.maRemainingSpace.Height));
@@ -1501,7 +1502,8 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer&
aVDiagram.reduceToMimimumSize();
}
- uno::Reference< drawing::XShapes > xTextTargetShapes( AbstractShapeFactory::getOrCreateShapeFactory(m_xShapeFactory)->createGroup2D(xDiagramPlusAxes_Shapes) );
+ uno::Reference< drawing::XShapes > xTextTargetShapes =
+ AbstractShapeFactory::getOrCreateShapeFactory(m_xShapeFactory)->createGroup2D(rParam.mxDiagramWithAxesShapes);
// - create axis and grids for all coordinate systems
@@ -1519,7 +1521,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( SeriesPlotterContainer&
//calculate resulting size respecting axis label layout and fontscaling
- uno::Reference< drawing::XShape > xBoundingShape( xDiagramPlusAxes_Shapes, uno::UNO_QUERY );
+ uno::Reference< drawing::XShape > xBoundingShape(rParam.mxDiagramWithAxesShapes, uno::UNO_QUERY);
::basegfx::B2IRectangle aConsumedOuterRect;
//use first coosys only so far; todo: calculate for more than one coosys if we have more in future
@@ -3035,7 +3037,7 @@ void ChartView::createShapes2D( const awt::Size& rPageSize )
xDiagramPlusAxesPlusMarkHandlesGroup_Shapes, awt::Size(0, 0));
AbstractShapeFactory::setShapeName(aParam.mxPlotAreaWithAxes, "PlotAreaIncludingAxes");
- uno::Reference< drawing::XShapes > xDiagramPlusAxes_Shapes( pShapeFactory->createGroup2D(xDiagramPlusAxesPlusMarkHandlesGroup_Shapes ) );
+ aParam.mxDiagramWithAxesShapes = pShapeFactory->createGroup2D(xDiagramPlusAxesPlusMarkHandlesGroup_Shapes);
bool bAutoPositionDummy = true;
@@ -3091,8 +3093,7 @@ void ChartView::createShapes2D( const awt::Size& rPageSize )
awt::Point aAvailablePosDia(aParam.maRemainingSpace.X, aParam.maRemainingSpace.Y);
awt::Size aAvailableSizeForDiagram(aParam.maRemainingSpace.Width, aParam.maRemainingSpace.Height);
- awt::Rectangle aUsedOuterRect = impl_createDiagramAndContent(
- aSeriesPlotterContainer, xDiagramPlusAxes_Shapes, aParam, rPageSize);
+ awt::Rectangle aUsedOuterRect = impl_createDiagramAndContent(aSeriesPlotterContainer, aParam, rPageSize);
if (aParam.mxPlotAreaWithAxes.is())
{