summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-01-03 09:19:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-01-03 12:38:12 +0100
commitad51b6c85da5fd2e12130f453bcd5dbc8bf83f0e (patch)
tree0072226caef17ff2d615a5e66e70f9730ac600ba
parentuse more SvxShape in chart2 (diff)
downloadcore-ad51b6c85da5fd2e12130f453bcd5dbc8bf83f0e.tar.gz
core-ad51b6c85da5fd2e12130f453bcd5dbc8bf83f0e.zip
no need to pass around a ShapeFactory instance
since the methods are all static now Change-Id: I4296a22f0d9ce86df8f1b36c4a1babc7e9d5c070 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127883 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--chart2/source/view/axes/VAxisBase.cxx4
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx2
-rw-r--r--chart2/source/view/axes/VCartesianCoordinateSystem.cxx4
-rw-r--r--chart2/source/view/axes/VCoordinateSystem.cxx4
-rw-r--r--chart2/source/view/axes/VPolarCoordinateSystem.cxx4
-rw-r--r--chart2/source/view/axes/VPolarGrid.cxx4
-rw-r--r--chart2/source/view/axes/VPolarRadiusAxis.cxx7
-rw-r--r--chart2/source/view/axes/VPolarRadiusAxis.hxx1
-rw-r--r--chart2/source/view/charttypes/AreaChart.cxx4
-rw-r--r--chart2/source/view/charttypes/BarChart.cxx4
-rw-r--r--chart2/source/view/charttypes/BubbleChart.cxx4
-rw-r--r--chart2/source/view/charttypes/CandleStickChart.cxx4
-rw-r--r--chart2/source/view/charttypes/NetChart.cxx4
-rw-r--r--chart2/source/view/charttypes/PieChart.cxx4
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx6
-rw-r--r--chart2/source/view/diagram/VDiagram.cxx18
-rw-r--r--chart2/source/view/inc/LegendEntryProvider.hxx1
-rw-r--r--chart2/source/view/inc/PlotterBase.hxx3
-rw-r--r--chart2/source/view/inc/VCoordinateSystem.hxx2
-rw-r--r--chart2/source/view/inc/VDiagram.hxx5
-rw-r--r--chart2/source/view/inc/VSeriesPlotter.hxx2
-rw-r--r--chart2/source/view/main/ChartView.cxx35
-rw-r--r--chart2/source/view/main/PlotterBase.cxx11
-rw-r--r--chart2/source/view/main/VButton.cxx4
-rw-r--r--chart2/source/view/main/VButton.hxx4
-rw-r--r--chart2/source/view/main/VLegend.cxx13
-rw-r--r--chart2/source/view/main/VLegend.hxx2
-rw-r--r--chart2/source/view/main/VTitle.cxx2
-rw-r--r--chart2/source/view/main/VTitle.hxx2
29 files changed, 58 insertions, 106 deletions
diff --git a/chart2/source/view/axes/VAxisBase.cxx b/chart2/source/view/axes/VAxisBase.cxx
index a7c186745f56..3844a1074df9 100644
--- a/chart2/source/view/axes/VAxisBase.cxx
+++ b/chart2/source/view/axes/VAxisBase.cxx
@@ -132,8 +132,8 @@ bool VAxisBase::isAnythingToDraw()
if( !m_aAxisProperties.m_xAxisModel.is() )
return false;
- OSL_ENSURE(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"Axis is not proper initialized");
- if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()))
+ OSL_ENSURE(m_xLogicTarget.is()&&m_xFinalTarget.is(),"Axis is not proper initialized");
+ if(!(m_xLogicTarget.is()&&m_xFinalTarget.is()))
return false;
uno::Reference< beans::XPropertySet > xProps( m_aAxisProperties.m_xAxisModel, uno::UNO_QUERY );
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index e6d72b45f666..be2b09a53cd2 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -1119,7 +1119,7 @@ B2DVector VCartesianAxis::getScreenPosition( double fLogicX, double fLogicY, dou
drawing::Position3D aScenePos = m_pPosHelper->transformLogicToScene( fLogicX, fLogicY, fLogicZ, true );
if(m_nDimension==3)
{
- if (m_xLogicTarget.is() && m_pShapeFactory)
+ if (m_xLogicTarget.is())
{
tPropertyNameMap aDummyPropertyNameMap;
rtl::Reference<Svx3DExtrudeObject> xShape3DAnchor = ShapeFactory::createCube( m_xLogicTarget
diff --git a/chart2/source/view/axes/VCartesianCoordinateSystem.cxx b/chart2/source/view/axes/VCartesianCoordinateSystem.cxx
index e7fe42a87124..0cf62c2946be 100644
--- a/chart2/source/view/axes/VCartesianCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VCartesianCoordinateSystem.cxx
@@ -87,7 +87,7 @@ void VCartesianCoordinateSystem::createGridShapes()
, getExplicitIncrement(nDimensionIndex,nAxisIndex) );
aGrid.set3DWallPositions( m_eLeftWallPos, m_eBackWallPos, m_eBottomPos );
- aGrid.initPlotter(m_xLogicTargetForGrids,m_xFinalTarget,m_xShapeFactory
+ aGrid.initPlotter(m_xLogicTargetForGrids,m_xFinalTarget
, createCIDForGrid( nDimensionIndex,nAxisIndex ) );
if(nDimensionCount==2)
aGrid.setTransformationSceneToScreen( m_aMatrixSceneToScreen );
@@ -182,7 +182,7 @@ void VCartesianCoordinateSystem::initVAxisInList()
sal_Int32 nDimensionIndex = elem.first.first;
sal_Int32 nAxisIndex = elem.first.second;
pVAxis->setExplicitScaleAndIncrement( getExplicitScale( nDimensionIndex, nAxisIndex ), getExplicitIncrement( nDimensionIndex, nAxisIndex ) );
- pVAxis->initPlotter(m_xLogicTargetForAxes,m_xFinalTarget,m_xShapeFactory
+ pVAxis->initPlotter(m_xLogicTargetForAxes,m_xFinalTarget
, createCIDForAxis( nDimensionIndex, nAxisIndex ) );
if(nDimensionCount==2)
pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx
index 785bc955f602..236d5dbc2892 100644
--- a/chart2/source/view/axes/VCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VCoordinateSystem.cxx
@@ -85,10 +85,9 @@ VCoordinateSystem::~VCoordinateSystem()
void VCoordinateSystem::initPlottingTargets( const rtl::Reference< SvxShapeGroupAnyD >& xLogicTarget
, const rtl::Reference< SvxShapeGroupAnyD >& xFinalTarget
- , const Reference< lang::XMultiServiceFactory >& xShapeFactory
, rtl::Reference<SvxShapeGroupAnyD>& xLogicTargetForSeriesBehindAxis )
{
- OSL_PRECOND(xLogicTarget.is()&&xFinalTarget.is()&&xShapeFactory.is(),"no proper initialization parameters");
+ OSL_PRECOND(xLogicTarget.is()&&xFinalTarget.is(),"no proper initialization parameters");
//is only allowed to be called once
sal_Int32 nDimensionCount = m_xCooSysModel->getDimension();
@@ -108,7 +107,6 @@ void VCoordinateSystem::initPlottingTargets( const rtl::Reference< SvxShapeGrou
m_xLogicTargetForAxes = ShapeFactory::createGroup3D( xLogicTarget );
}
m_xFinalTarget = xFinalTarget;
- m_xShapeFactory = xShapeFactory;
}
void VCoordinateSystem::setParticle( const OUString& rCooSysParticle )
diff --git a/chart2/source/view/axes/VPolarCoordinateSystem.cxx b/chart2/source/view/axes/VPolarCoordinateSystem.cxx
index 16c2d152f96a..75e7d3897ed3 100644
--- a/chart2/source/view/axes/VPolarCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VPolarCoordinateSystem.cxx
@@ -119,7 +119,7 @@ void VPolarCoordinateSystem::initVAxisInList()
sal_Int32 nDimensionIndex = elem.first.first;
sal_Int32 nAxisIndex = elem.first.second;
pVAxis->setExplicitScaleAndIncrement( getExplicitScale( nDimensionIndex, nAxisIndex ), getExplicitIncrement(nDimensionIndex, nAxisIndex) );
- pVAxis->initPlotter(m_xLogicTargetForAxes,m_xFinalTarget,m_xShapeFactory
+ pVAxis->initPlotter(m_xLogicTargetForAxes,m_xFinalTarget
, createCIDForAxis( nDimensionIndex, nAxisIndex ) );
VPolarAxis* pVPolarAxis = dynamic_cast< VPolarAxis* >( pVAxis );
if( pVPolarAxis )
@@ -175,7 +175,7 @@ void VPolarCoordinateSystem::createGridShapes()
VPolarGrid aGrid(nDimensionIndex,nDimensionCount,getGridListFromAxis( xAxis ));
aGrid.setIncrements( getExplicitIncrements( nDimensionIndex, nAxisIndex ) );
- aGrid.initPlotter(m_xLogicTargetForGrids,m_xFinalTarget,m_xShapeFactory
+ aGrid.initPlotter(m_xLogicTargetForGrids,m_xFinalTarget
, createCIDForGrid( nDimensionIndex, nAxisIndex ) );
if(nDimensionCount==2)
aGrid.setTransformationSceneToScreen( m_aMatrixSceneToScreen );
diff --git a/chart2/source/view/axes/VPolarGrid.cxx b/chart2/source/view/axes/VPolarGrid.cxx
index 188042449c8f..f64349d97662 100644
--- a/chart2/source/view/axes/VPolarGrid.cxx
+++ b/chart2/source/view/axes/VPolarGrid.cxx
@@ -217,8 +217,8 @@ void VPolarGrid::create2DRadiusGrid( const rtl::Reference<SvxShapeGroupAnyD>& xL
void VPolarGrid::createShapes()
{
- OSL_PRECOND(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"Axis is not proper initialized");
- if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()))
+ OSL_PRECOND(m_xLogicTarget.is()&&m_xFinalTarget.is(),"Axis is not proper initialized");
+ if(!(m_xLogicTarget.is()&&m_xFinalTarget.is()))
return;
if(!m_aGridPropertiesList.hasElements())
return;
diff --git a/chart2/source/view/axes/VPolarRadiusAxis.cxx b/chart2/source/view/axes/VPolarRadiusAxis.cxx
index 04ed5b1d0273..73e153705db6 100644
--- a/chart2/source/view/axes/VPolarRadiusAxis.cxx
+++ b/chart2/source/view/axes/VPolarRadiusAxis.cxx
@@ -64,11 +64,10 @@ void VPolarRadiusAxis::setExplicitScaleAndIncrement(
void VPolarRadiusAxis::initPlotter( const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget
, const rtl::Reference<SvxShapeGroupAnyD>& xFinalTarget
- , const uno::Reference< lang::XMultiServiceFactory >& xShapeFactory
, const OUString& rCID )
{
- VPolarAxis::initPlotter( xLogicTarget, xFinalTarget, xShapeFactory, rCID );
- m_apAxisWithLabels->initPlotter( xLogicTarget, xFinalTarget, xShapeFactory, rCID );
+ VPolarAxis::initPlotter( xLogicTarget, xFinalTarget, rCID );
+ m_apAxisWithLabels->initPlotter( xLogicTarget, xFinalTarget, rCID );
}
void VPolarRadiusAxis::setScales( std::vector< ExplicitScaleData >&& rScales, bool bSwapXAndYAxis )
@@ -152,7 +151,7 @@ void VPolarRadiusAxis::createShapes()
VCartesianAxis aAxis(aAxisProperties,m_xNumberFormatsSupplier
,1,2,new PolarPlottingPositionHelper());
aAxis.setExplicitScaleAndIncrement( m_aScale, m_aIncrement );
- aAxis.initPlotter(m_xLogicTarget,m_xFinalTarget,m_xShapeFactory, m_aCID );
+ aAxis.initPlotter(m_xLogicTarget,m_xFinalTarget, m_aCID );
aAxis.setTransformationSceneToScreen( B3DHomMatrixToHomogenMatrix( m_aMatrixScreenToScene ) );
aAxis.setScales( std::vector(m_pPosHelper->getScales()), false );
aAxis.initAxisLabelProperties(m_aAxisLabelProperties.m_aFontReferenceSize,m_aAxisLabelProperties.m_aMaximumSpaceForLabels);
diff --git a/chart2/source/view/axes/VPolarRadiusAxis.hxx b/chart2/source/view/axes/VPolarRadiusAxis.hxx
index 36cc0b250c6b..b2450e236268 100644
--- a/chart2/source/view/axes/VPolarRadiusAxis.hxx
+++ b/chart2/source/view/axes/VPolarRadiusAxis.hxx
@@ -37,7 +37,6 @@ public:
virtual void initPlotter(
const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget
, const rtl::Reference<SvxShapeGroupAnyD>& xFinalTarget
- , const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory
, const OUString& rCID
) override;
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index f141d09a64e4..a07d175f9c52 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -615,8 +615,8 @@ void AreaChart::createShapes()
if( officecfg::Office::Compatibility::View::ReverseSeriesOrderAreaAndNetChart::get() && m_nDimension == 2 && ( m_bArea || !m_bCategoryXAxis ) )
lcl_reorderSeries( m_aZSlots );
- OSL_ENSURE(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"AreaChart is not proper initialized");
- if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()))
+ OSL_ENSURE(m_xLogicTarget.is()&&m_xFinalTarget.is(),"AreaChart is not proper initialized");
+ if(!(m_xLogicTarget.is()&&m_xFinalTarget.is()))
return;
//the text labels should be always on top of the other series shapes
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index c7582f07eefc..a106e95a2823 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -451,8 +451,8 @@ void BarChart::createShapes()
if( m_aZSlots.empty() ) //no series
return;
- OSL_ENSURE(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"BarChart is not proper initialized");
- if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()))
+ OSL_ENSURE(m_xLogicTarget.is()&&m_xFinalTarget.is(),"BarChart is not proper initialized");
+ if(!(m_xLogicTarget.is()&&m_xFinalTarget.is()))
return;
//the text labels should be always on top of the other series shapes
diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx
index 782d91b9762c..c65010db0404 100644
--- a/chart2/source/view/charttypes/BubbleChart.cxx
+++ b/chart2/source/view/charttypes/BubbleChart.cxx
@@ -163,8 +163,8 @@ void BubbleChart::createShapes()
if( m_aZSlots.empty() ) //no series
return;
- OSL_ENSURE(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"BubbleChart is not proper initialized");
- if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()))
+ OSL_ENSURE(m_xLogicTarget.is()&&m_xFinalTarget.is(),"BubbleChart is not proper initialized");
+ if(!(m_xLogicTarget.is()&&m_xFinalTarget.is()))
return;
//therefore create an own group for the texts and the error bars to move them to front
diff --git a/chart2/source/view/charttypes/CandleStickChart.cxx b/chart2/source/view/charttypes/CandleStickChart.cxx
index 0c678ed744f3..6aed1d7ca3c2 100644
--- a/chart2/source/view/charttypes/CandleStickChart.cxx
+++ b/chart2/source/view/charttypes/CandleStickChart.cxx
@@ -78,8 +78,8 @@ void CandleStickChart::createShapes()
if( m_nDimension!=2 )
return;
- OSL_ENSURE(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"CandleStickChart is not proper initialized");
- if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()))
+ OSL_ENSURE(m_xLogicTarget.is()&&m_xFinalTarget.is(),"CandleStickChart is not proper initialized");
+ if(!(m_xLogicTarget.is()&&m_xFinalTarget.is()))
return;
//the text labels should be always on top of the other series shapes
diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx
index 210843dce479..a1553a18e344 100644
--- a/chart2/source/view/charttypes/NetChart.cxx
+++ b/chart2/source/view/charttypes/NetChart.cxx
@@ -324,8 +324,8 @@ void NetChart::createShapes()
if (officecfg::Office::Compatibility::View::ReverseSeriesOrderAreaAndNetChart::get() && m_bArea)
lcl_reorderSeries( m_aZSlots );
- OSL_ENSURE(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is(),"NetChart is not proper initialized");
- if(!(m_pShapeFactory&&m_xLogicTarget.is()&&m_xFinalTarget.is()))
+ OSL_ENSURE(m_xLogicTarget.is()&&m_xFinalTarget.is(),"NetChart is not proper initialized");
+ if(!(m_xLogicTarget.is()&&m_xFinalTarget.is()))
return;
//the text labels should be always on top of the other series shapes
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index 9acf1e961fb7..d2d13c4a7564 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -664,8 +664,8 @@ void PieChart::createShapes()
///( a member of a VDiagram object); this initialization occurs in
///`ChartView::impl_createDiagramAndContent`.
- OSL_ENSURE(m_pShapeFactory && m_xLogicTarget.is() && m_xFinalTarget.is(), "PieChart is not properly initialized.");
- if (!m_pShapeFactory || !m_xLogicTarget.is() || !m_xFinalTarget.is())
+ OSL_ENSURE(m_xLogicTarget.is() && m_xFinalTarget.is(), "PieChart is not properly initialized.");
+ if (!m_xLogicTarget.is() || !m_xFinalTarget.is())
return;
///the text labels should be always on top of the other series shapes
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 92f6b2144184..3605a6829493 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -2363,7 +2363,6 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntries(
, LegendPosition eLegendPosition
, const Reference< beans::XPropertySet >& xTextProperties
, const rtl::Reference<SvxShapeGroupAnyD>& xTarget
- , const Reference< lang::XMultiServiceFactory >& xShapeFactory
, const Reference< uno::XComponentContext >& xContext
, ChartModel& rModel
)
@@ -2407,7 +2406,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntries(
std::vector<ViewLegendEntry> aSeriesEntries(
createLegendEntriesForSeries(
rEntryKeyAspectRatio, *pSeries, xTextProperties,
- xTarget, xShapeFactory, xContext));
+ xTarget, xContext));
//add series entries to the result now
@@ -2640,13 +2639,12 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
, const VDataSeries& rSeries
, const Reference< beans::XPropertySet >& xTextProperties
, const rtl::Reference<SvxShapeGroupAnyD>& xTarget
- , const Reference< lang::XMultiServiceFactory >& xShapeFactory
, const Reference< uno::XComponentContext >& xContext
)
{
std::vector< ViewLegendEntry > aResult;
- if( ! ( xShapeFactory.is() && xTarget.is() && xContext.is() ) )
+ if( ! ( xTarget.is() && xContext.is() ) )
return aResult;
try
diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx
index 871e2fbab29c..c0fa685aad7d 100644
--- a/chart2/source/view/diagram/VDiagram.cxx
+++ b/chart2/source/view/diagram/VDiagram.cxx
@@ -43,8 +43,7 @@ using namespace ::com::sun::star::chart2;
VDiagram::VDiagram(
const uno::Reference<XDiagram> & xDiagram, const drawing::Direction3D& rPreferredAspectRatio,
sal_Int32 nDimension )
- : m_pShapeFactory(nullptr)
- , m_nDimensionCount(nDimension)
+ : m_nDimensionCount(nDimension)
, m_xDiagram(xDiagram)
, m_aPreferredAspectRatio(rPreferredAspectRatio)
, m_fXAnglePi(0)
@@ -74,14 +73,9 @@ VDiagram::~VDiagram()
{
}
-void VDiagram::init(
- const rtl::Reference<SvxShapeGroupAnyD>& xTarget, const uno::Reference< lang::XMultiServiceFactory >& xFactory )
+void VDiagram::init( const rtl::Reference<SvxShapeGroupAnyD>& xTarget )
{
- OSL_PRECOND(xFactory.is(), "no proper initialization parameters");
-
m_xTarget = xTarget;
- m_xShapeFactory = xFactory;
- m_pShapeFactory = ShapeFactory::getOrCreateShapeFactory(xFactory);
}
void VDiagram::createShapes( const awt::Point& rPos, const awt::Size& rSize )
@@ -137,8 +131,8 @@ void VDiagram::createShapes( const awt::Point& rPos, const awt::Size& rSize )
void VDiagram::createShapes_2d()
{
- OSL_PRECOND(m_pShapeFactory && m_xTarget.is() && m_xShapeFactory.is(), "is not proper initialized");
- if (!m_pShapeFactory || !m_xTarget.is() || !m_xShapeFactory.is())
+ OSL_PRECOND(m_xTarget.is(), "is not proper initialized");
+ if (!m_xTarget.is())
return;
//create group shape
@@ -440,8 +434,8 @@ void VDiagram::adjustAspectRatio3d( const awt::Size& rAvailableSize )
void VDiagram::createShapes_3d()
{
- OSL_PRECOND(m_pShapeFactory && m_xTarget.is() && m_xShapeFactory.is(), "is not proper initialized");
- if (!m_pShapeFactory || !m_xTarget.is() || !m_xShapeFactory.is())
+ OSL_PRECOND(m_xTarget.is(), "is not proper initialized");
+ if (!m_xTarget.is())
return;
//create shape
diff --git a/chart2/source/view/inc/LegendEntryProvider.hxx b/chart2/source/view/inc/LegendEntryProvider.hxx
index b5ffb5e356fe..e695a7af86c9 100644
--- a/chart2/source/view/inc/LegendEntryProvider.hxx
+++ b/chart2/source/view/inc/LegendEntryProvider.hxx
@@ -76,7 +76,6 @@ public:
css::chart2::LegendPosition eLegendPosition,
const css::uno::Reference< css::beans::XPropertySet >& xTextProperties,
const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
- const css::uno::Reference< css::lang::XMultiServiceFactory >& xShapeFactory,
const css::uno::Reference< css::uno::XComponentContext >& xContext,
ChartModel& rModel
) = 0;
diff --git a/chart2/source/view/inc/PlotterBase.hxx b/chart2/source/view/inc/PlotterBase.hxx
index 1d553e5c68d3..bb377c76167d 100644
--- a/chart2/source/view/inc/PlotterBase.hxx
+++ b/chart2/source/view/inc/PlotterBase.hxx
@@ -50,7 +50,6 @@ public:
virtual void initPlotter(
const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget
, const rtl::Reference<SvxShapeGroupAnyD>& xFinalTarget
- , const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory
, const OUString& rCID
);
@@ -70,8 +69,6 @@ protected: //methods
protected: //member
rtl::Reference< SvxShapeGroupAnyD > m_xLogicTarget;
rtl::Reference< SvxShapeGroupAnyD > m_xFinalTarget;
- css::uno::Reference< css::lang::XMultiServiceFactory> m_xShapeFactory;
- ShapeFactory* m_pShapeFactory;
OUString m_aCID;
const sal_Int32 m_nDimension;
diff --git a/chart2/source/view/inc/VCoordinateSystem.hxx b/chart2/source/view/inc/VCoordinateSystem.hxx
index e958b7248c0d..e4a3cdbcf4b5 100644
--- a/chart2/source/view/inc/VCoordinateSystem.hxx
+++ b/chart2/source/view/inc/VCoordinateSystem.hxx
@@ -59,7 +59,6 @@ public:
void initPlottingTargets(
const rtl::Reference< SvxShapeGroupAnyD >& xLogicTarget
, const rtl::Reference< SvxShapeGroupAnyD >& xFinalTarget
- , const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory
, rtl::Reference<SvxShapeGroupAnyD>& xLogicTargetForSeriesBehindAxis );
void setParticle( const OUString& rCooSysParticle );
@@ -170,7 +169,6 @@ protected: //member
rtl::Reference<SvxShapeGroupAnyD> m_xLogicTargetForGrids;
rtl::Reference<SvxShapeGroupAnyD> m_xLogicTargetForAxes;
rtl::Reference<SvxShapeGroupAnyD> m_xFinalTarget;
- css::uno::Reference< css::lang::XMultiServiceFactory> m_xShapeFactory;
css::drawing::HomogenMatrix m_aMatrixSceneToScreen;
CuboidPlanePosition m_eLeftWallPos;
diff --git a/chart2/source/view/inc/VDiagram.hxx b/chart2/source/view/inc/VDiagram.hxx
index 6e18280079ac..b508cdba88e0 100644
--- a/chart2/source/view/inc/VDiagram.hxx
+++ b/chart2/source/view/inc/VDiagram.hxx
@@ -51,8 +51,7 @@ public: //methods
~VDiagram();
void init(
- const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
- const css::uno::Reference<css::lang::XMultiServiceFactory>& xFactory );
+ const rtl::Reference<SvxShapeGroupAnyD>& xTarget );
void createShapes( const css::awt::Point& rPos
, const css::awt::Size& rSize );
@@ -87,8 +86,6 @@ private: //members
VDiagram(const VDiagram& rD) = delete;
rtl::Reference<SvxShapeGroupAnyD> m_xTarget;
- css::uno::Reference< css::lang::XMultiServiceFactory> m_xShapeFactory;
- ShapeFactory* m_pShapeFactory;
// this is the surrounding shape which contains floor, wall and coordinate
rtl::Reference<SvxShapeGroupAnyD> m_xOuterGroupShape;
diff --git a/chart2/source/view/inc/VSeriesPlotter.hxx b/chart2/source/view/inc/VSeriesPlotter.hxx
index 93b09cb32d59..a19050a5540a 100644
--- a/chart2/source/view/inc/VSeriesPlotter.hxx
+++ b/chart2/source/view/inc/VSeriesPlotter.hxx
@@ -187,7 +187,6 @@ public:
css::chart2::LegendPosition eLegendPosition,
const css::uno::Reference< css::beans::XPropertySet >& xTextProperties,
const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
- const css::uno::Reference< css::lang::XMultiServiceFactory >& xShapeFactory,
const css::uno::Reference< css::uno::XComponentContext >& xContext,
ChartModel& rModel
) override;
@@ -213,7 +212,6 @@ public:
const VDataSeries& rSeries,
const css::uno::Reference< css::beans::XPropertySet >& xTextProperties,
const rtl::Reference<SvxShapeGroupAnyD>& xTarget,
- const css::uno::Reference< css::lang::XMultiServiceFactory >& xShapeFactory,
const css::uno::Reference< css::uno::XComponentContext >& xContext
);
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 97fd3ab42dab..0f023d6e4358 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1444,7 +1444,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
rtl::Reference<SvxShapeGroupAnyD> xSeriesTargetBehindAxis;
VDiagram aVDiagram(xDiagram, aPreferredAspectRatio, nDimensionCount);
{//create diagram
- aVDiagram.init(rParam.mxDiagramWithAxesShapes, m_xShapeFactory);
+ aVDiagram.init(rParam.mxDiagramWithAxesShapes);
aVDiagram.createShapes(
awt::Point(rParam.maRemainingSpace.X, rParam.maRemainingSpace.Y),
awt::Size(rParam.maRemainingSpace.Width, rParam.maRemainingSpace.Height));
@@ -1464,7 +1464,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
for( nC=0; nC < rVCooSysList.size(); nC++)
{
VCoordinateSystem* pVCooSys = rVCooSysList[nC].get();
- pVCooSys->initPlottingTargets(xSeriesTargetInFrontOfAxis,xTextTargetShapes,m_xShapeFactory,xSeriesTargetBehindAxis);
+ pVCooSys->initPlottingTargets(xSeriesTargetInFrontOfAxis,xTextTargetShapes,xSeriesTargetBehindAxis);
pVCooSys->setTransformationSceneToScreen( B3DHomMatrixToHomogenMatrix(
createTransformationSceneToScreen( aVDiagram.getCurrentRectangle() ) ));
@@ -1544,7 +1544,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
xSeriesTarget = xSeriesTargetBehindAxis;
OSL_ENSURE( !bIsPieOrDonut, "not implemented yet! - during a complete recreation this shape is destroyed so no series can be created anymore" );
}
- pSeriesPlotter->initPlotter( xSeriesTarget,xTextTargetShapes,m_xShapeFactory,OUString() );
+ pSeriesPlotter->initPlotter( xSeriesTarget,xTextTargetShapes,OUString() );
pSeriesPlotter->setPageReferenceSize( rPageSize );
VCoordinateSystem* pVCooSys = lcl_getCooSysForPlotter( rVCooSysList, pSeriesPlotter );
if(nDimensionCount==2)
@@ -2067,7 +2067,6 @@ void changePositionOfAxisTitle( VTitle* pVTitle, TitleAlignment eAlignment
std::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
, const rtl::Reference<SvxShapeGroupAnyD>& xPageShapes
- , const uno::Reference< lang::XMultiServiceFactory>& xShapeFactory
, ChartModel& rModel
, awt::Rectangle& rRemainingSpace
, const awt::Size & rPageSize
@@ -2121,7 +2120,7 @@ std::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
}
apVTitle = std::make_shared<VTitle>(xTitle);
OUString aCID = ObjectIdentifier::createClassifiedIdentifierForObject(xTitle, rModel);
- apVTitle->init(xPageShapes, xShapeFactory, aCID);
+ apVTitle->init(xPageShapes, aCID);
apVTitle->createShapes(awt::Point(0, 0), rPageSize, aTextMaxWidth, bYAxisTitle);
awt::Size aTitleUnrotatedSize = apVTitle->getUnrotatedSize();
awt::Size aTitleSize = apVTitle->getFinalSize();
@@ -2201,7 +2200,6 @@ std::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
bool lcl_createLegend( const uno::Reference< XLegend > & xLegend
, const rtl::Reference<SvxShapeGroupAnyD>& xPageShapes
- , const uno::Reference< lang::XMultiServiceFactory>& xShapeFactory
, const uno::Reference< uno::XComponentContext > & xContext
, awt::Rectangle & rRemainingSpace
, const awt::Size & rPageSize
@@ -2214,7 +2212,7 @@ bool lcl_createLegend( const uno::Reference< XLegend > & xLegend
awt::Size rDefaultLegendSize;
VLegend aVLegend( xLegend, xContext, std::move(rLegendEntryProviderList),
- xPageShapes, xShapeFactory, rModel);
+ xPageShapes, rModel);
aVLegend.setDefaultWritingMode( nDefaultWritingMode );
aVLegend.createShapes( awt::Size( rRemainingSpace.Width, rRemainingSpace.Height ),
rPageSize, rDefaultLegendSize );
@@ -2223,7 +2221,6 @@ bool lcl_createLegend( const uno::Reference< XLegend > & xLegend
}
void lcl_createButtons(const rtl::Reference<SvxShapeGroupAnyD>& xPageShapes,
- const uno::Reference<lang::XMultiServiceFactory>& xShapeFactory,
ChartModel& rModel,
awt::Rectangle& rRemainingSpace)
{
@@ -2245,7 +2242,7 @@ void lcl_createButtons(const rtl::Reference<SvxShapeGroupAnyD>& xPageShapes,
for (css::chart2::data::PivotTableFieldEntry const & rPageFieldEntry : aPivotFieldEntries)
{
VButton aButton;
- aButton.init(xPageShapes, xShapeFactory);
+ aButton.init(xPageShapes);
awt::Point aNewPosition(rRemainingSpace.X + x + 100, rRemainingSpace.Y + 100);
sal_Int32 nDimensionIndex = rPageFieldEntry.DimensionIndex;
OUString aFieldOutputDescription = xPivotTableDataProvider->getFieldOutputDescription(nDimensionIndex);
@@ -2273,7 +2270,7 @@ void lcl_createButtons(const rtl::Reference<SvxShapeGroupAnyD>& xPageShapes,
for (css::chart2::data::PivotTableFieldEntry const & rRowFieldEntry : aPivotFieldEntries)
{
VButton aButton;
- aButton.init(xPageShapes, xShapeFactory);
+ aButton.init(xPageShapes);
awt::Point aNewPosition(rRemainingSpace.X + x + 100,
rRemainingSpace.Y + rRemainingSpace.Height - aSize.Height - 100);
aButton.setLabel(rRowFieldEntry.Name);
@@ -2913,16 +2910,16 @@ void ChartView::createShapes2D( const awt::Size& rPageSize )
bool bAutoPositionDummy = true;
// create buttons
- lcl_createButtons(mxRootShape, m_xShapeFactory, mrChartModel, aParam.maRemainingSpace);
+ lcl_createButtons(mxRootShape, mrChartModel, aParam.maRemainingSpace);
lcl_createTitle(
- TitleHelper::MAIN_TITLE, mxRootShape, m_xShapeFactory, mrChartModel,
+ TitleHelper::MAIN_TITLE, mxRootShape, mrChartModel,
aParam.maRemainingSpace, rPageSize, ALIGN_TOP, bAutoPositionDummy);
if (!bHasRelativeSize && (aParam.maRemainingSpace.Width <= 0 || aParam.maRemainingSpace.Height <= 0))
return;
lcl_createTitle(
- TitleHelper::SUB_TITLE, mxRootShape, m_xShapeFactory, mrChartModel,
+ TitleHelper::SUB_TITLE, mxRootShape, mrChartModel,
aParam.maRemainingSpace, rPageSize, ALIGN_TOP, bAutoPositionDummy );
if (!bHasRelativeSize && (aParam.maRemainingSpace.Width <= 0 || aParam.maRemainingSpace.Height <= 0))
return;
@@ -2948,7 +2945,7 @@ void ChartView::createShapes2D( const awt::Size& rPageSize )
}
lcl_createLegend(
- LegendHelper::getLegend( mrChartModel ), mxRootShape, m_xShapeFactory, m_xCC,
+ LegendHelper::getLegend( mrChartModel ), mxRootShape, m_xCC,
aParam.maRemainingSpace, rPageSize, mrChartModel, aParam.mpSeriesPlotterContainer->getLegendEntryProviderList(),
lcl_getDefaultWritingModeFromPool( m_pDrawModelWrapper ) );
@@ -3026,19 +3023,19 @@ bool ChartView::createAxisTitleShapes2D( CreateShapeParam2D& rParam, const css::
sal_Int32 nDimension = DiagramHelper::getDimension( xDiagram );
if( ChartTypeHelper::isSupportingMainAxis( xChartType, nDimension, 0 ) )
- rParam.mpVTitleX = lcl_createTitle( TitleHelper::TITLE_AT_STANDARD_X_AXIS_POSITION, mxRootShape, m_xShapeFactory, mrChartModel
+ rParam.mpVTitleX = lcl_createTitle( TitleHelper::TITLE_AT_STANDARD_X_AXIS_POSITION, mxRootShape, mrChartModel
, rParam.maRemainingSpace, rPageSize, ALIGN_BOTTOM, rParam.mbAutoPosTitleX );
if (!bHasRelativeSize && (rParam.maRemainingSpace.Width <= 0 || rParam.maRemainingSpace.Height <= 0))
return false;
if( ChartTypeHelper::isSupportingMainAxis( xChartType, nDimension, 1 ) )
- rParam.mpVTitleY = lcl_createTitle( TitleHelper::TITLE_AT_STANDARD_Y_AXIS_POSITION, mxRootShape, m_xShapeFactory, mrChartModel
+ rParam.mpVTitleY = lcl_createTitle( TitleHelper::TITLE_AT_STANDARD_Y_AXIS_POSITION, mxRootShape, mrChartModel
, rParam.maRemainingSpace, rPageSize, ALIGN_LEFT, rParam.mbAutoPosTitleY );
if (!bHasRelativeSize && (rParam.maRemainingSpace.Width <= 0 || rParam.maRemainingSpace.Height <= 0))
return false;
if( ChartTypeHelper::isSupportingMainAxis( xChartType, nDimension, 2 ) )
- rParam.mpVTitleZ = lcl_createTitle( TitleHelper::Z_AXIS_TITLE, mxRootShape, m_xShapeFactory, mrChartModel
+ rParam.mpVTitleZ = lcl_createTitle( TitleHelper::Z_AXIS_TITLE, mxRootShape, mrChartModel
, rParam.maRemainingSpace, rPageSize, ALIGN_RIGHT, rParam.mbAutoPosTitleZ );
if (!bHasRelativeSize && (rParam.maRemainingSpace.Width <= 0 || rParam.maRemainingSpace.Height <= 0))
return false;
@@ -3047,13 +3044,13 @@ bool ChartView::createAxisTitleShapes2D( CreateShapeParam2D& rParam, const css::
bool bIsVertical = DiagramHelper::getVertical( xDiagram, bDummy, bDummy );
if( ChartTypeHelper::isSupportingSecondaryAxis( xChartType, nDimension ) )
- rParam.mpVTitleSecondX = lcl_createTitle( TitleHelper::SECONDARY_X_AXIS_TITLE, mxRootShape, m_xShapeFactory, mrChartModel
+ rParam.mpVTitleSecondX = lcl_createTitle( TitleHelper::SECONDARY_X_AXIS_TITLE, mxRootShape, mrChartModel
, rParam.maRemainingSpace, rPageSize, bIsVertical? ALIGN_RIGHT : ALIGN_TOP, rParam.mbAutoPosSecondTitleX );
if (!bHasRelativeSize && (rParam.maRemainingSpace.Width <= 0 || rParam.maRemainingSpace.Height <= 0))
return false;
if( ChartTypeHelper::isSupportingSecondaryAxis( xChartType, nDimension ) )
- rParam.mpVTitleSecondY = lcl_createTitle( TitleHelper::SECONDARY_Y_AXIS_TITLE, mxRootShape, m_xShapeFactory, mrChartModel
+ rParam.mpVTitleSecondY = lcl_createTitle( TitleHelper::SECONDARY_Y_AXIS_TITLE, mxRootShape, mrChartModel
, rParam.maRemainingSpace, rPageSize, bIsVertical? ALIGN_TOP : ALIGN_RIGHT, rParam.mbAutoPosSecondTitleY );
if (!bHasRelativeSize && (rParam.maRemainingSpace.Width <= 0 || rParam.maRemainingSpace.Height <= 0))
return false;
diff --git a/chart2/source/view/main/PlotterBase.cxx b/chart2/source/view/main/PlotterBase.cxx
index 93c80ca1574e..a706f1600fc6 100644
--- a/chart2/source/view/main/PlotterBase.cxx
+++ b/chart2/source/view/main/PlotterBase.cxx
@@ -28,23 +28,19 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::chart2;
PlotterBase::PlotterBase( sal_Int32 nDimensionCount )
- : m_pShapeFactory(nullptr)
- , m_nDimension(nDimensionCount)
+ : m_nDimension(nDimensionCount)
, m_pPosHelper(nullptr)
{
}
void PlotterBase::initPlotter( const rtl::Reference<SvxShapeGroupAnyD>& xLogicTarget
, const rtl::Reference<SvxShapeGroupAnyD>& xFinalTarget
- , const uno::Reference< lang::XMultiServiceFactory >& xShapeFactory
, const OUString& rCID )
{
- OSL_PRECOND(xLogicTarget.is()&&xFinalTarget.is()&&xShapeFactory.is(),"no proper initialization parameters");
+ OSL_PRECOND(xLogicTarget.is()&&xFinalTarget.is(),"no proper initialization parameters");
//is only allowed to be called once
m_xLogicTarget = xLogicTarget;
m_xFinalTarget = xFinalTarget;
- m_xShapeFactory = xShapeFactory;
- m_pShapeFactory = ShapeFactory::getOrCreateShapeFactory(xShapeFactory);
m_aCID = rCID;
}
@@ -76,9 +72,6 @@ rtl::Reference<SvxShapeGroupAnyD> PlotterBase::createGroupShape(
const rtl::Reference<SvxShapeGroupAnyD>& xTarget
, const OUString& rName )
{
- if(!m_xShapeFactory.is())
- return nullptr;
-
if(m_nDimension==2)
{
//create and add to target
diff --git a/chart2/source/view/main/VButton.cxx b/chart2/source/view/main/VButton.cxx
index 7894c5796b51..c53b4dc75282 100644
--- a/chart2/source/view/main/VButton.cxx
+++ b/chart2/source/view/main/VButton.cxx
@@ -35,11 +35,9 @@ VButton::VButton()
{
}
-void VButton::init(const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage,
- const uno::Reference<lang::XMultiServiceFactory>& xFactory)
+void VButton::init(const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage)
{
m_xTarget = xTargetPage;
- m_xShapeFactory = xFactory;
}
rtl::Reference<SvxShapePolyPolygon> VButton::createTriangle(awt::Size aSize)
diff --git a/chart2/source/view/main/VButton.hxx b/chart2/source/view/main/VButton.hxx
index f0c587386831..87017f36901a 100644
--- a/chart2/source/view/main/VButton.hxx
+++ b/chart2/source/view/main/VButton.hxx
@@ -27,7 +27,6 @@ namespace chart
class VButton final
{
private:
- css::uno::Reference<css::lang::XMultiServiceFactory> m_xShapeFactory;
rtl::Reference<SvxShapeGroupAnyD> m_xTarget;
rtl::Reference<SvxShapeGroup> m_xShape;
OUString m_sLabel;
@@ -44,8 +43,7 @@ private:
public:
VButton();
- void init(const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage,
- const css::uno::Reference<css::lang::XMultiServiceFactory>& xFactory);
+ void init(const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage);
void createShapes(const css::uno::Reference<css::beans::XPropertySet>& xTextProp);
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 9ed83a77b086..4b81cbdbd30b 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -821,7 +821,6 @@ bool lcl_shouldSymbolsBePlacedOnTheLeftSide( const Reference< beans::XPropertySe
std::vector<std::shared_ptr<VButton>> lcl_createButtons(
rtl::Reference<SvxShapeGroupAnyD> const & xLegendContainer,
- uno::Reference<lang::XMultiServiceFactory> const & xShapeFactory,
ChartModel& rModel, bool bPlaceButtonsVertically, tools::Long & nUsedHeight)
{
std::vector<std::shared_ptr<VButton>> aButtons;
@@ -842,7 +841,7 @@ std::vector<std::shared_ptr<VButton>> lcl_createButtons(
{
auto pButton = std::make_shared<VButton>();
aButtons.push_back(pButton);
- pButton->init(xLegendContainer, xShapeFactory);
+ pButton->init(xLegendContainer);
awt::Point aNewPosition(x, y);
pButton->setLabel(sColumnFieldEntry.Name);
pButton->setCID("FieldButton.Column." + OUString::number(sColumnFieldEntry.DimensionIndex));
@@ -876,10 +875,8 @@ VLegend::VLegend(
const Reference< uno::XComponentContext > & xContext,
std::vector< LegendEntryProvider* >&& rLegendEntryProviderList,
const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage,
- const Reference< lang::XMultiServiceFactory >& xFactory,
ChartModel& rModel )
: m_xTarget(xTargetPage)
- , m_xShapeFactory(xFactory)
, m_xLegend(xLegend)
, mrModel(rModel)
, m_xContext(xContext)
@@ -917,9 +914,7 @@ void VLegend::createShapes(
const awt::Size & rPageSize,
awt::Size & rDefaultLegendSize )
{
- if(! (m_xLegend.is() &&
- m_xShapeFactory.is() &&
- m_xTarget.is()))
+ if(! (m_xLegend.is() && m_xTarget.is()))
return;
try
@@ -993,7 +988,7 @@ void VLegend::createShapes(
{
std::vector<ViewLegendEntry> aNewEntries = pLegendEntryProvider->createLegendEntries(
aMaxSymbolExtent, eLegendPosition, xLegendProp,
- xLegendContainer, m_xShapeFactory, m_xContext, mrModel);
+ xLegendContainer, m_xContext, mrModel);
aViewEntries.insert( aViewEntries.end(), aNewEntries.begin(), aNewEntries.end() );
}
}
@@ -1011,7 +1006,7 @@ void VLegend::createShapes(
eLegendPosition != LegendPosition_PAGE_END &&
eExpansion != css::chart::ChartLegendExpansion_WIDE);
- std::vector<std::shared_ptr<VButton>> aButtons = lcl_createButtons(xLegendContainer, m_xShapeFactory, mrModel, bPlaceButtonsVertically, nUsedButtonHeight);
+ std::vector<std::shared_ptr<VButton>> aButtons = lcl_createButtons(xLegendContainer, mrModel, bPlaceButtonsVertically, nUsedButtonHeight);
// A custom size includes the size we used for buttons already, so we need to
// subtract that from the size that is available for the legend
diff --git a/chart2/source/view/main/VLegend.hxx b/chart2/source/view/main/VLegend.hxx
index 6750cc780465..c8931ce9f931 100644
--- a/chart2/source/view/main/VLegend.hxx
+++ b/chart2/source/view/main/VLegend.hxx
@@ -44,7 +44,6 @@ public:
const css::uno::Reference< css::uno::XComponentContext > & xContext,
std::vector< LegendEntryProvider* >&& rLegendEntryProviderList,
const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage,
- const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory,
ChartModel& rModel );
void setDefaultWritingMode( sal_Int16 nDefaultWritingMode );
@@ -72,7 +71,6 @@ public:
private:
rtl::Reference<SvxShapeGroupAnyD> m_xTarget;
- css::uno::Reference< css::lang::XMultiServiceFactory> m_xShapeFactory;
css::uno::Reference< css::chart2::XLegend > m_xLegend;
rtl::Reference< SvxShapeGroup > m_xShape;
diff --git a/chart2/source/view/main/VTitle.cxx b/chart2/source/view/main/VTitle.cxx
index 16c09cc08bd8..4d90a2fb7503 100644
--- a/chart2/source/view/main/VTitle.cxx
+++ b/chart2/source/view/main/VTitle.cxx
@@ -44,11 +44,9 @@ VTitle::~VTitle()
void VTitle::init(
const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage
- , const uno::Reference< lang::XMultiServiceFactory >& xFactory
, const OUString& rCID )
{
m_xTarget = xTargetPage;
- m_xShapeFactory = xFactory;
m_aCID = rCID;
}
diff --git a/chart2/source/view/main/VTitle.hxx b/chart2/source/view/main/VTitle.hxx
index 69b7edd0cfb4..566128b95a3b 100644
--- a/chart2/source/view/main/VTitle.hxx
+++ b/chart2/source/view/main/VTitle.hxx
@@ -42,7 +42,6 @@ public:
~VTitle();
void init( const rtl::Reference<SvxShapeGroupAnyD>& xTargetPage
- , const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory
, const OUString& rCID );
void createShapes( const css::awt::Point& rPos
@@ -59,7 +58,6 @@ public:
private:
rtl::Reference<SvxShapeGroupAnyD> m_xTarget;
- css::uno::Reference< css::lang::XMultiServiceFactory> m_xShapeFactory;
css::uno::Reference< css::chart2::XTitle > m_xTitle;
rtl::Reference<SvxShapeText> m_xShape;
OUString m_aCID;