summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-09-30 09:40:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-30 11:24:33 +0200
commit3b8e53f66ffd4d631a850fe76250124dc4a195c3 (patch)
tree2613882a4876f0a66324b7e29e61c46b3ec451b0 /sc
parentd242a19dbdd53b7ae0b6a6ceacca6aa1b6ac54a9 (diff)
loplugin:constparams improve handling of pointer params
Change-Id: I4c0002e72703eded435bfe4985f5b0121bf8524b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122843 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/inc/lotattr.hxx2
-rw-r--r--sc/source/filter/lotus/lotattr.cxx2
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx2
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.hxx2
-rw-r--r--sc/source/ui/attrdlg/tabpages.cxx2
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx2
-rw-r--r--sc/source/ui/inc/dbdocfun.hxx2
-rw-r--r--sc/source/ui/inc/tabpages.hxx2
-rw-r--r--sc/source/ui/inc/xmlsourcedlg.hxx8
-rw-r--r--sc/source/ui/xmlsource/xmlsourcedlg.cxx10
12 files changed, 19 insertions, 19 deletions
diff --git a/sc/source/filter/inc/lotattr.hxx b/sc/source/filter/inc/lotattr.hxx
index b58b8c31eee7..475d46547e4a 100644
--- a/sc/source/filter/inc/lotattr.hxx
+++ b/sc/source/filter/inc/lotattr.hxx
@@ -121,7 +121,7 @@ class LotAttrTable
public:
LotAttrTable(LotusContext& rContext);
- void SetAttr(LotusContext& rContext, const SCCOL nColFirst, const SCCOL nColLast, const SCROW nRow, const LotAttrWK3& );
+ void SetAttr(const LotusContext& rContext, const SCCOL nColFirst, const SCCOL nColLast, const SCROW nRow, const LotAttrWK3& );
void Apply(LotusContext& rContext, const SCTAB nTabNum);
diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx
index 0fae3b719162..eaa6b4b61685 100644
--- a/sc/source/filter/lotus/lotattr.cxx
+++ b/sc/source/filter/lotus/lotattr.cxx
@@ -227,7 +227,7 @@ LotAttrTable::LotAttrTable(LotusContext& rContext):
{
}
-void LotAttrTable::SetAttr( LotusContext& rContext, const SCCOL nColFirst, const SCCOL nColLast, const SCROW nRow,
+void LotAttrTable::SetAttr( const LotusContext& rContext, const SCCOL nColFirst, const SCCOL nColLast, const SCROW nRow,
const LotAttrWK3& rAttr )
{
// With the current implementation of MAXCOLCOUNT>=1024 and nColFirst and
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
index e8090e02366e..90941e66a0f5 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
@@ -569,7 +569,7 @@ void ScXMLChangeTrackingImportHelper::SetMovementDependencies(ScMyMoveAction* pA
}
}
-void ScXMLChangeTrackingImportHelper::SetContentDependencies(const ScMyContentAction* pAction, ScChangeActionContent* pActContent, ScDocument& rDoc)
+void ScXMLChangeTrackingImportHelper::SetContentDependencies(const ScMyContentAction* pAction, ScChangeActionContent* pActContent, const ScDocument& rDoc)
{
if (!pActContent || !pAction->nPreviousAction)
return;
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx
index 182f36cf494a..d7c9f3664586 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx
@@ -209,7 +209,7 @@ public:
void SetDeletionDependencies(ScMyDelAction* pAction, ScChangeActionDel* pDelAct);
void SetMovementDependencies(ScMyMoveAction* pAction, ScChangeActionMove* pMoveAct);
- void SetContentDependencies(const ScMyContentAction* pAction, ScChangeActionContent* pActContent, ScDocument& rDoc);
+ void SetContentDependencies(const ScMyContentAction* pAction, ScChangeActionContent* pActContent, const ScDocument& rDoc);
void SetDependencies(ScMyBaseAction* pAction, ScDocument& rDoc);
void SetNewCell(const ScMyContentAction* pAction, ScDocument& rDoc);
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 79ea4631d5ac..1cf9ec4fdc37 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3711,7 +3711,7 @@ void ScXMLExport::exportAnnotationMeta( const uno::Reference < drawing::XShape >
}
}
-void ScXMLExport::WriteAnnotation(ScMyCell& rMyCell)
+void ScXMLExport::WriteAnnotation(const ScMyCell& rMyCell)
{
ScPostIt* pNote = pDoc->GetNote(rMyCell.maCellAddress);
if (!pNote)
diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx
index 88685b27f6a4..e4a165ab0511 100644
--- a/sc/source/filter/xml/xmlexprt.hxx
+++ b/sc/source/filter/xml/xmlexprt.hxx
@@ -178,7 +178,7 @@ class ScXMLExport : public SvXMLExport
void WriteEditCell(const EditTextObject* pText);
void WriteMultiLineFormulaResult(const ScFormulaCell* pCell);
void WriteAreaLink(const ScMyCell& rMyCell);
- void WriteAnnotation(ScMyCell& rMyCell);
+ void WriteAnnotation(const ScMyCell& rMyCell);
void WriteDetective(const ScMyCell& rMyCell);
void ExportShape(const css::uno::Reference < css::drawing::XShape >& xShape, css::awt::Point* pPoint);
void WriteShapes(const ScMyCell& rMyCell);
diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx
index 899a56b011d9..af0ed1d6ab9c 100644
--- a/sc/source/ui/attrdlg/tabpages.cxx
+++ b/sc/source/ui/attrdlg/tabpages.cxx
@@ -161,7 +161,7 @@ IMPL_LINK(ScTabPageProtection, HidePrintClickHdl, weld::Toggleable&, rBox, void)
ButtonClick(rBox);
}
-void ScTabPageProtection::ButtonClick(weld::Toggleable& rBox)
+void ScTabPageProtection::ButtonClick(const weld::Toggleable& rBox)
{
TriState eState = rBox.get_state();
if (eState == TRISTATE_INDET)
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index db9337c7d86b..097432b414e0 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -1396,7 +1396,7 @@ bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb
return true;
}
-bool ScDBDocFunc::RemovePivotTable(ScDPObject& rDPObj, bool bRecord, bool bApi)
+bool ScDBDocFunc::RemovePivotTable(const ScDPObject& rDPObj, bool bRecord, bool bApi)
{
ScDocShellModificator aModificator(rDocShell);
weld::WaitObject aWait(ScDocShell::GetActiveDialogParent());
diff --git a/sc/source/ui/inc/dbdocfun.hxx b/sc/source/ui/inc/dbdocfun.hxx
index a3ef18cd0cf0..780e523b5193 100644
--- a/sc/source/ui/inc/dbdocfun.hxx
+++ b/sc/source/ui/inc/dbdocfun.hxx
@@ -81,7 +81,7 @@ public:
bool DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewObj,
bool bRecord, bool bApi, bool bAllowMove = false );
- bool RemovePivotTable(ScDPObject& rDPObj, bool bRecord, bool bApi);
+ bool RemovePivotTable(const ScDPObject& rDPObj, bool bRecord, bool bApi);
bool CreatePivotTable(const ScDPObject& rDPObj, bool bRecord, bool bApi);
bool UpdatePivotTable(ScDPObject& rDPObj, bool bRecord, bool bApi);
diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx
index 8880f738f3f2..37d751523469 100644
--- a/sc/source/ui/inc/tabpages.hxx
+++ b/sc/source/ui/inc/tabpages.hxx
@@ -61,7 +61,7 @@ private:
DECL_LINK(HideCellClickHdl, weld::Toggleable&, void);
DECL_LINK(HideFormulaClickHdl, weld::Toggleable&, void);
DECL_LINK(HidePrintClickHdl, weld::Toggleable&, void);
- void ButtonClick(weld::Toggleable& rBox);
+ void ButtonClick(const weld::Toggleable& rBox);
void UpdateButtons();
};
diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx
index d4a030f78ecc..3d45d27a824d 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hxx
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -76,14 +76,14 @@ private:
void SelectSourceFile();
void LoadSourceFileStructure(const OUString& rPath);
void TreeItemSelected();
- void DefaultElementSelected(weld::TreeIter& rEntry);
- void RepeatElementSelected(weld::TreeIter& rEntry);
- void AttributeSelected(weld::TreeIter& rEntry);
+ void DefaultElementSelected(const weld::TreeIter& rEntry);
+ void RepeatElementSelected(const weld::TreeIter& rEntry);
+ void AttributeSelected(const weld::TreeIter& rEntry);
void SetNonLinkable();
void SetSingleLinkable();
void SetRangeLinkable();
- void SelectAllChildEntries(weld::TreeIter& rEntry);
+ void SelectAllChildEntries(const weld::TreeIter& rEntry);
/**
* Check if any of its parents is linked or repeated. The passed entry is
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 0bbfa9d200b8..12837914d314 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -209,7 +209,7 @@ namespace {
* the current entry position. The mapped cell position for a range link is
* stored with the reference entry.
*/
-std::unique_ptr<weld::TreeIter> getReferenceEntry(const weld::TreeView& rTree, weld::TreeIter& rCurEntry)
+std::unique_ptr<weld::TreeIter> getReferenceEntry(const weld::TreeView& rTree, const weld::TreeIter& rCurEntry)
{
std::unique_ptr<weld::TreeIter> xParent(rTree.make_iterator(&rCurEntry));
bool bParent = rTree.iter_parent(*xParent);
@@ -274,7 +274,7 @@ void ScXMLSourceDlg::TreeItemSelected()
}
}
-void ScXMLSourceDlg::DefaultElementSelected(weld::TreeIter& rEntry)
+void ScXMLSourceDlg::DefaultElementSelected(const weld::TreeIter& rEntry)
{
if (mxLbTree->iter_has_child(rEntry))
{
@@ -313,7 +313,7 @@ void ScXMLSourceDlg::DefaultElementSelected(weld::TreeIter& rEntry)
SetSingleLinkable();
}
-void ScXMLSourceDlg::RepeatElementSelected(weld::TreeIter& rEntry)
+void ScXMLSourceDlg::RepeatElementSelected(const weld::TreeIter& rEntry)
{
// Check all its parents first.
@@ -343,7 +343,7 @@ void ScXMLSourceDlg::RepeatElementSelected(weld::TreeIter& rEntry)
SetRangeLinkable();
}
-void ScXMLSourceDlg::AttributeSelected(weld::TreeIter& rEntry)
+void ScXMLSourceDlg::AttributeSelected(const weld::TreeIter& rEntry)
{
// Check all its parent elements and make sure non of them are linked nor
// repeat elements. In attribute's case, it's okay to have the immediate
@@ -384,7 +384,7 @@ void ScXMLSourceDlg::SetRangeLinkable()
mxMapGrid->set_sensitive(true);
}
-void ScXMLSourceDlg::SelectAllChildEntries(weld::TreeIter& rEntry)
+void ScXMLSourceDlg::SelectAllChildEntries(const weld::TreeIter& rEntry)
{
std::unique_ptr<weld::TreeIter> xChild(mxLbTree->make_iterator(&rEntry));
if (!mxLbTree->iter_children(*xChild))