summaryrefslogtreecommitdiff
path: root/chart2/source/view/charttypes
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-27 12:04:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-27 13:23:25 +0200
commit620d032b1807477ef1e2b547ce772c284aa0da50 (patch)
tree92abc1d89840f27dae0dfb27269688fba197ae3b /chart2/source/view/charttypes
parent370c71f5b1e2618c49881ac221993692143d4e58 (diff)
loplugin:constparams in chart2
Change-Id: Ic325b79f04e04aa19e08a60db30b982d90f04c80 Reviewed-on: https://gerrit.libreoffice.org/40480 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/view/charttypes')
-rw-r--r--chart2/source/view/charttypes/AreaChart.cxx10
-rw-r--r--chart2/source/view/charttypes/AreaChart.hxx10
-rw-r--r--chart2/source/view/charttypes/BarChart.cxx2
-rw-r--r--chart2/source/view/charttypes/BarChart.hxx2
-rw-r--r--chart2/source/view/charttypes/GL3DBarChart.cxx4
-rw-r--r--chart2/source/view/charttypes/NetChart.cxx6
-rw-r--r--chart2/source/view/charttypes/NetChart.hxx6
-rw-r--r--chart2/source/view/charttypes/PieChart.cxx6
-rw-r--r--chart2/source/view/charttypes/PieChart.hxx6
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx14
10 files changed, 33 insertions, 33 deletions
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index 2bedb8a64142..9ef01a23fbb2 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -240,7 +240,7 @@ void lcl_removeDuplicatePoints( drawing::PolyPolygonShape3D& rPolyPoly, Plotting
rPolyPoly=aTmp;
}
-bool AreaChart::create_stepped_line( drawing::PolyPolygonShape3D aStartPoly, chart2::CurveStyle eCurveStyle, PlottingPositionHelper* pPosHelper, drawing::PolyPolygonShape3D &aPoly )
+bool AreaChart::create_stepped_line( drawing::PolyPolygonShape3D aStartPoly, chart2::CurveStyle eCurveStyle, PlottingPositionHelper const * pPosHelper, drawing::PolyPolygonShape3D &aPoly )
{
sal_uInt32 nOuterCount = aStartPoly.SequenceX.getLength();
if ( !nOuterCount )
@@ -366,7 +366,7 @@ bool AreaChart::create_stepped_line( drawing::PolyPolygonShape3D aStartPoly, cha
}
bool AreaChart::impl_createLine( VDataSeries* pSeries
- , drawing::PolyPolygonShape3D* pSeriesPoly
+ , drawing::PolyPolygonShape3D const * pSeriesPoly
, PlottingPositionHelper* pPosHelper )
{
//return true if a line was created successfully
@@ -452,9 +452,9 @@ bool AreaChart::impl_createLine( VDataSeries* pSeries
}
bool AreaChart::impl_createArea( VDataSeries* pSeries
- , drawing::PolyPolygonShape3D* pSeriesPoly
- , drawing::PolyPolygonShape3D* pPreviousSeriesPoly
- , PlottingPositionHelper* pPosHelper )
+ , drawing::PolyPolygonShape3D const * pSeriesPoly
+ , drawing::PolyPolygonShape3D const * pPreviousSeriesPoly
+ , PlottingPositionHelper const * pPosHelper )
{
//return true if an area was created successfully
diff --git a/chart2/source/view/charttypes/AreaChart.hxx b/chart2/source/view/charttypes/AreaChart.hxx
index af8c4251c5b9..acc133667668 100644
--- a/chart2/source/view/charttypes/AreaChart.hxx
+++ b/chart2/source/view/charttypes/AreaChart.hxx
@@ -54,15 +54,15 @@ public:
private: //methods
void impl_createSeriesShapes();
bool impl_createArea( VDataSeries* pSeries
- , css::drawing::PolyPolygonShape3D* pSeriesPoly
- , css::drawing::PolyPolygonShape3D* pPreviousSeriesPoly
- , PlottingPositionHelper* pPosHelper );
+ , css::drawing::PolyPolygonShape3D const * pSeriesPoly
+ , css::drawing::PolyPolygonShape3D const * pPreviousSeriesPoly
+ , PlottingPositionHelper const * pPosHelper );
bool impl_createLine( VDataSeries* pSeries
- , css::drawing::PolyPolygonShape3D* pSeriesPoly
+ , css::drawing::PolyPolygonShape3D const * pSeriesPoly
, PlottingPositionHelper* pPosHelper );
static bool create_stepped_line( css::drawing::PolyPolygonShape3D aStartPoly
, css::chart2::CurveStyle eCurveStyle
- , PlottingPositionHelper* pPosHelper
+ , PlottingPositionHelper const * pPosHelper
, css::drawing::PolyPolygonShape3D &aPoly );
private: //member
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index 08b9d5a6c6bb..702b90f7569c 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -133,7 +133,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment(
LabelAlignment& rAlignment, sal_Int32 nLabelPlacement
, double fScaledX, double fScaledLowerYValue, double fScaledUpperYValue, double fScaledZ
, double fScaledLowerBarDepth, double fScaledUpperBarDepth, double fBaseValue
- , BarPositionHelper* pPosHelper
+ , BarPositionHelper const * pPosHelper
) const
{
double fX = fScaledX;
diff --git a/chart2/source/view/charttypes/BarChart.hxx b/chart2/source/view/charttypes/BarChart.hxx
index d276fa531eab..da6071802a90 100644
--- a/chart2/source/view/charttypes/BarChart.hxx
+++ b/chart2/source/view/charttypes/BarChart.hxx
@@ -56,7 +56,7 @@ private: //methods
LabelAlignment& rAlignment, sal_Int32 nLabelPlacement
, double fScaledX, double fScaledLowerYValue, double fScaledUpperYValue, double fScaledZ
, double fScaledLowerBarDepth, double fScaledUpperBarDepth, double fBaseValue
- , BarPositionHelper* pPosHelper ) const;
+ , BarPositionHelper const * pPosHelper ) const;
virtual PlottingPositionHelper& getPlottingPositionHelper( sal_Int32 nAxisIndex ) const override;//nAxisIndex indicates whether the position belongs to the main axis ( nAxisIndex==0 ) or secondary axis ( nAxisIndex==1 )
diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx
index 1eecec9f67f9..c0085bdf49df 100644
--- a/chart2/source/view/charttypes/GL3DBarChart.cxx
+++ b/chart2/source/view/charttypes/GL3DBarChart.cxx
@@ -1168,7 +1168,7 @@ void GL3DBarChart::updateRenderFPS()
glm::vec4(1.0f, 0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f));
}
-int GL3DBarChart::calcTimeInterval(TimeValue &startTime, TimeValue &endTime)
+int GL3DBarChart::calcTimeInterval(TimeValue const &startTime, TimeValue const &endTime)
{
TimeValue aTime;
aTime.Seconds = endTime.Seconds - startTime.Seconds - 1;
@@ -1215,7 +1215,7 @@ void GL3DBarChart::updateDataUpdateFPS()
addScreenTextShape(maDataUpdateFPS, glm::vec2(-0.77f, 0.92f), 0.07f, true, glm::vec4(1.0f, 0.0f, 0.0f, 0.0f));
}
-void GL3DBarChart::recordBarHistory(sal_uInt32 &nBarID, float &nVal)
+void GL3DBarChart::recordBarHistory(sal_uInt32 nBarID, float nVal)
{
std::deque<float>& aList = maBarHistory[nBarID];
if(aList.size() == HISTORY_NUM)
diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx
index ba896e3eb4e8..4ed5410c0729 100644
--- a/chart2/source/view/charttypes/NetChart.cxx
+++ b/chart2/source/view/charttypes/NetChart.cxx
@@ -118,7 +118,7 @@ drawing::Direction3D NetChart::getPreferredDiagramAspectRatio() const
bool NetChart::impl_createLine( VDataSeries* pSeries
, drawing::PolyPolygonShape3D* pSeriesPoly
- , PlottingPositionHelper* pPosHelper )
+ , PlottingPositionHelper const * pPosHelper )
{
//return true if a line was created successfully
uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShapeBackChild(pSeries, m_xSeriesTarget);
@@ -171,8 +171,8 @@ bool NetChart::impl_createLine( VDataSeries* pSeries
bool NetChart::impl_createArea( VDataSeries* pSeries
, drawing::PolyPolygonShape3D* pSeriesPoly
- , drawing::PolyPolygonShape3D* pPreviousSeriesPoly
- , PlottingPositionHelper* pPosHelper )
+ , drawing::PolyPolygonShape3D const * pPreviousSeriesPoly
+ , PlottingPositionHelper const * pPosHelper )
{
//return true if an area was created successfully
diff --git a/chart2/source/view/charttypes/NetChart.hxx b/chart2/source/view/charttypes/NetChart.hxx
index 626e9253097c..eecd2550b25a 100644
--- a/chart2/source/view/charttypes/NetChart.hxx
+++ b/chart2/source/view/charttypes/NetChart.hxx
@@ -55,11 +55,11 @@ private: //methods
void impl_createSeriesShapes();
bool impl_createArea( VDataSeries* pSeries
, css::drawing::PolyPolygonShape3D* pSeriesPoly
- , css::drawing::PolyPolygonShape3D* pPreviousSeriesPoly
- , PlottingPositionHelper* pPosHelper );
+ , css::drawing::PolyPolygonShape3D const * pPreviousSeriesPoly
+ , PlottingPositionHelper const * pPosHelper );
bool impl_createLine( VDataSeries* pSeries
, css::drawing::PolyPolygonShape3D* pSeriesPoly
- , PlottingPositionHelper* pPosHelper );
+ , PlottingPositionHelper const * pPosHelper );
private: //member
std::unique_ptr<PlottingPositionHelper> m_pMainPosHelper;
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index 72df0caf6566..84ad1938459d 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -217,7 +217,7 @@ bool PieChart::shouldSnapRectToUsedArea()
uno::Reference< drawing::XShape > PieChart::createDataPoint(
const uno::Reference<drawing::XShapes>& xTarget,
const uno::Reference<beans::XPropertySet>& xObjectProperties,
- tPropertyNameValueMap* pOverwritePropertiesMap,
+ tPropertyNameValueMap const * pOverwritePropertiesMap,
const ShapeParam& rParam )
{
//transform position:
@@ -995,7 +995,7 @@ bool PieChart::detectLabelOverlapsAndMove( const awt::Size& rPageSize )
/** Try to remove all overlaps that occur in the list of labels going from
* `pFirstBorder` to `pSecondBorder`
*/
-bool PieChart::tryMoveLabels( PieLabelInfo* pFirstBorder, PieLabelInfo* pSecondBorder
+bool PieChart::tryMoveLabels( PieLabelInfo const * pFirstBorder, PieLabelInfo const * pSecondBorder
, PieLabelInfo* pCenter
, bool bSingleCenter, bool& rbAlternativeMoveDirection, const awt::Size& rPageSize )
{
@@ -1263,7 +1263,7 @@ void PieChart::rearrangeLabelToAvoidOverlapIfRequested( const awt::Size& rPageSi
* 4. the top edge when 225 < alpha < 315.
*
**/
-bool PieChart::performLabelBestFitInnerPlacement(ShapeParam& rShapeParam, PieLabelInfo& rPieLabelInfo)
+bool PieChart::performLabelBestFitInnerPlacement(ShapeParam& rShapeParam, PieLabelInfo const & rPieLabelInfo)
{
SAL_INFO( "chart2.pie.label.bestfit.inside",
"** PieChart::performLabelBestFitInnerPlacement invoked **" );
diff --git a/chart2/source/view/charttypes/PieChart.hxx b/chart2/source/view/charttypes/PieChart.hxx
index dd6c5f2de600..1b39ba229ed0 100644
--- a/chart2/source/view/charttypes/PieChart.hxx
+++ b/chart2/source/view/charttypes/PieChart.hxx
@@ -68,7 +68,7 @@ private: //methods
createDataPoint(
const css::uno::Reference<css::drawing::XShapes>& xTarget,
const css::uno::Reference<css::beans::XPropertySet>& xObjectProperties,
- tPropertyNameValueMap* pOverWritePropertiesMap,
+ tPropertyNameValueMap const * pOverWritePropertiesMap,
const ShapeParam& rParam );
/** This method creates a text shape for a label of a data point.
@@ -102,11 +102,11 @@ private: //methods
bool detectLabelOverlapsAndMove(const css::awt::Size& rPageSize);//returns true when there might be more to do
void resetLabelPositionsToPreviousState();
struct PieLabelInfo;
- bool tryMoveLabels( PieLabelInfo* pFirstBorder, PieLabelInfo* pSecondBorder
+ bool tryMoveLabels( PieLabelInfo const * pFirstBorder, PieLabelInfo const * pSecondBorder
, PieLabelInfo* pCenter, bool bSingleCenter, bool& rbAlternativeMoveDirection
, const css::awt::Size& rPageSize );
- bool performLabelBestFitInnerPlacement(ShapeParam& rShapeParam, PieLabelInfo& rPieLabelInfo);
+ bool performLabelBestFitInnerPlacement(ShapeParam& rShapeParam, PieLabelInfo const & rPieLabelInfo);
static bool performLabelBestFitOuterPlacement(ShapeParam& rShapeParam, PieLabelInfo& rPieLabelInfo);
void performLabelBestFit(ShapeParam& rShapeParam, PieLabelInfo& rPieLabelInfo);
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index b4173b69fe41..589812594ff6 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -357,7 +357,7 @@ uno::Reference< drawing::XShapes > VSeriesPlotter::getErrorBarsGroupShape( VData
}
-OUString VSeriesPlotter::getLabelTextForValue( VDataSeries& rDataSeries
+OUString VSeriesPlotter::getLabelTextForValue( VDataSeries const & rDataSeries
, sal_Int32 nPointIndex
, double fValue
, bool bAsPercentage )
@@ -802,7 +802,7 @@ void lcl_AddErrorBottomLine( const drawing::Position3D& rPosition, ::basegfx::B2
::basegfx::B2DVector lcl_getErrorBarMainDirection(
const drawing::Position3D& rStart
, const drawing::Position3D& rBottomEnd
- , PlottingPositionHelper* pPosHelper
+ , PlottingPositionHelper const * pPosHelper
, const drawing::Position3D& rUnscaledLogicPosition
, bool bYError )
{
@@ -843,7 +843,7 @@ void lcl_AddErrorBottomLine( const drawing::Position3D& rPosition, ::basegfx::B2
return aMainDirection;
}
-drawing::Position3D lcl_transformMixedToScene( PlottingPositionHelper* pPosHelper
+drawing::Position3D lcl_transformMixedToScene( PlottingPositionHelper const * pPosHelper
, double fX /*scaled*/, double fY /*unscaled*/, double fZ /*unscaled*/, bool bClip )
{
if(!pPosHelper)
@@ -1024,7 +1024,7 @@ void VSeriesPlotter::createErrorBar_X( const drawing::Position3D& rUnscaledLogic
void VSeriesPlotter::createErrorBar_Y( const drawing::Position3D& rUnscaledLogicPosition
, VDataSeries& rVDataSeries, sal_Int32 nPointIndex
, const uno::Reference< drawing::XShapes >& xTarget
- , double* pfScaledLogicX )
+ , double const * pfScaledLogicX )
{
if(m_nDimension!=2)
return;
@@ -1043,7 +1043,7 @@ void VSeriesPlotter::createErrorBar_Y( const drawing::Position3D& rUnscaledLogic
}
}
-void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries& rVDataSeries,
+void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries const & rVDataSeries,
const uno::Reference< drawing::XShapes >& xTarget,
const uno::Reference< drawing::XShapes >& xEquationTarget,
bool bMaySkipPoints )
@@ -1192,7 +1192,7 @@ void VSeriesPlotter::createRegressionCurvesShapes( VDataSeries& rVDataSeries,
}
}
-sal_Int32 lcl_getOUStringMaxLineLength ( OUStringBuffer& aString )
+sal_Int32 lcl_getOUStringMaxLineLength ( OUStringBuffer const & aString )
{
const sal_Int32 nStringLength = aString.getLength();
sal_Int32 nMaxLineLength = 0;
@@ -1357,7 +1357,7 @@ void VSeriesPlotter::setMappedProperties(
const uno::Reference< drawing::XShape >& xTargetShape
, const uno::Reference< beans::XPropertySet >& xSource
, const tPropertyNameMap& rMap
- , tPropertyNameValueMap* pOverwriteMap )
+ , tPropertyNameValueMap const * pOverwriteMap )
{
uno::Reference< beans::XPropertySet > xTargetProp( xTargetShape, uno::UNO_QUERY );
PropertyMapper::setMappedProperties(xTargetProp,xSource,rMap,pOverwriteMap);