summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-03-10 21:53:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-03-11 10:05:39 +0100
commit69b5f0b6579c6574a8fe68ab2a64208ec767db55 (patch)
tree1fafea3a72e113d0a915a1f79a2f4b3406d695a0 /sc
parent4015b22dbc10bc246a3ef704d8b75e8f8cdca519 (diff)
loplugin:constparams
Change-Id: I5f184f93dbdb414514855c85c9dc1624e7ec8636 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131337 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/Sparkline.hxx2
-rw-r--r--sc/inc/document.hxx2
-rw-r--r--sc/source/core/data/Sparkline.cxx2
-rw-r--r--sc/source/core/data/document.cxx4
-rw-r--r--sc/source/filter/oox/SparklineFragment.cxx2
-rw-r--r--sc/source/ui/inc/gridwin.hxx2
-rw-r--r--sc/source/ui/sidebar/CellLineStyleValueSet.cxx2
-rw-r--r--sc/source/ui/sidebar/CellLineStyleValueSet.hxx2
-rw-r--r--sc/source/ui/view/gridwin4.cxx2
9 files changed, 10 insertions, 10 deletions
diff --git a/sc/inc/Sparkline.hxx b/sc/inc/Sparkline.hxx
index 0c5a9deeb774..89e306a984b1 100644
--- a/sc/inc/Sparkline.hxx
+++ b/sc/inc/Sparkline.hxx
@@ -30,7 +30,7 @@ private:
std::shared_ptr<SparklineGroup> m_pSparklineGroup;
public:
- Sparkline(std::shared_ptr<SparklineGroup>& pSparklineGroup);
+ Sparkline(const std::shared_ptr<SparklineGroup>& pSparklineGroup);
Sparkline(const Sparkline&) = delete;
Sparkline& operator=(const Sparkline&) = delete;
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 734e2d0dcd75..226583afe567 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1254,7 +1254,7 @@ public:
/** Spaklines */
SC_DLLPUBLIC sc::Sparkline* GetSparkline(ScAddress const & rPosition);
- SC_DLLPUBLIC sc::Sparkline* CreateSparkline(ScAddress const & rPosition, std::shared_ptr<sc::SparklineGroup> & pSparklineGroup);
+ SC_DLLPUBLIC sc::Sparkline* CreateSparkline(ScAddress const & rPosition, const std::shared_ptr<sc::SparklineGroup> & pSparklineGroup);
/** Notes **/
SC_DLLPUBLIC ScPostIt* GetNote(const ScAddress& rPos);
diff --git a/sc/source/core/data/Sparkline.cxx b/sc/source/core/data/Sparkline.cxx
index 301fda820ff2..44d5645030d3 100644
--- a/sc/source/core/data/Sparkline.cxx
+++ b/sc/source/core/data/Sparkline.cxx
@@ -13,7 +13,7 @@
namespace sc
{
-Sparkline::Sparkline(std::shared_ptr<SparklineGroup>& pSparklineGroup)
+Sparkline::Sparkline(const std::shared_ptr<SparklineGroup>& pSparklineGroup)
: m_pSparklineGroup(pSparklineGroup)
{
}
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 8563fef63d38..d520c0be5a7a 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -5201,7 +5201,7 @@ void ScDocument::GetSelectionFrame( const ScMarkData& rMark,
rLineInner.SetValid( SvxBoxInfoItemValidFlags::VERT, ( aFlags.nVert != SC_LINE_DONTCARE ) );
}
-static HasAttrFlags OptimizeHasAttrib( HasAttrFlags nMask, ScDocumentPool* pPool )
+static HasAttrFlags OptimizeHasAttrib( HasAttrFlags nMask, const ScDocumentPool* pPool )
{
if ( nMask & HasAttrFlags::Rotate )
{
@@ -6579,7 +6579,7 @@ sc::Sparkline* ScDocument::GetSparkline(ScAddress const& rPosition)
return nullptr;
}
-sc::Sparkline* ScDocument::CreateSparkline(ScAddress const & rPosition, std::shared_ptr<sc::SparklineGroup> & pSparklineGroup)
+sc::Sparkline* ScDocument::CreateSparkline(ScAddress const & rPosition, const std::shared_ptr<sc::SparklineGroup> & pSparklineGroup)
{
std::unique_ptr<sc::Sparkline> pSparkline(new sc::Sparkline(pSparklineGroup));
sc::Sparkline* pCreated = pSparkline.get();
diff --git a/sc/source/filter/oox/SparklineFragment.cxx b/sc/source/filter/oox/SparklineFragment.cxx
index 2a73fb9a81c4..54ef0df3c6ec 100644
--- a/sc/source/filter/oox/SparklineFragment.cxx
+++ b/sc/source/filter/oox/SparklineFragment.cxx
@@ -57,7 +57,7 @@ namespace
}
void addColorsToSparklineGroup(sc::SparklineGroup& rSparklineGroup, sal_Int32 nElement,
- const AttributeList& rAttribs, ThemeBuffer& rThemeBuffer)
+ const AttributeList& rAttribs, const ThemeBuffer& rThemeBuffer)
{
switch (nElement)
{
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 988bf55d2a17..b4117736484e 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -418,7 +418,7 @@ public:
tools::Long nDimIndex, ScDPObject* pDPObj);
void DrawButtons(SCCOL nX1, SCCOL nX2, const ScTableInfo& rTabInfo, OutputDevice* pContentDev,
- ScLokRTLContext* pLokRTLContext);
+ const ScLokRTLContext* pLokRTLContext);
using Window::Draw;
void Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
index 11eb55723745..d7c9e9b3ced5 100644
--- a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
+++ b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
@@ -71,7 +71,7 @@ void CellLineStyleValueSet::SetSelItem(sal_uInt16 nSel)
}
}
-tools::Long CellLineStyleValueSet::GetMaxTextWidth(vcl::RenderContext* pDev)
+tools::Long CellLineStyleValueSet::GetMaxTextWidth(const vcl::RenderContext* pDev)
{
if (mnMaxTextWidth > 0)
return mnMaxTextWidth;
diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.hxx b/sc/source/ui/sidebar/CellLineStyleValueSet.hxx
index 5ab78f0137ff..79dd08fb3960 100644
--- a/sc/source/ui/sidebar/CellLineStyleValueSet.hxx
+++ b/sc/source/ui/sidebar/CellLineStyleValueSet.hxx
@@ -38,7 +38,7 @@ public:
void SetUnit(const OUString* str);
void SetSelItem(sal_uInt16 nSel);
- tools::Long GetMaxTextWidth(vcl::RenderContext* pDev);
+ tools::Long GetMaxTextWidth(const vcl::RenderContext* pDev);
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
virtual void UserDraw(const UserDrawEvent& rUDEvt) override;
};
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 9b8d5c634b25..3598d5794828 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -2008,7 +2008,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
}
}
-void ScGridWindow::DrawButtons(SCCOL nX1, SCCOL nX2, const ScTableInfo& rTabInfo, OutputDevice* pContentDev, ScLokRTLContext* pLokRTLContext)
+void ScGridWindow::DrawButtons(SCCOL nX1, SCCOL nX2, const ScTableInfo& rTabInfo, OutputDevice* pContentDev, const ScLokRTLContext* pLokRTLContext)
{
aComboButton.SetOutputDevice( pContentDev );