sc/inc/recursionhelper.hxx              |    4 ++--
 sc/inc/refdata.hxx                      |   12 ++++++------
 sc/source/core/tool/compiler.cxx        |   24 ++++++++++++------------
 sc/source/core/tool/interpr1.cxx        |    2 +-
 sc/source/core/tool/recursionhelper.cxx |    2 +-
 sc/source/core/tool/refdata.cxx         |   12 ++++++------
 sc/source/core/tool/token.cxx           |   12 ++++++------
 sc/source/filter/excel/excel.cxx        |    2 +-
 sc/source/filter/excel/xilink.cxx       |    2 +-
 sc/source/filter/inc/xeextlst.hxx       |    2 +-
 sc/source/filter/inc/xilink.hxx         |    2 +-
 sc/source/filter/oox/formulabuffer.cxx  |    2 +-
 sc/source/filter/xml/xmlcelli.cxx       |    2 +-
 sc/source/filter/xml/xmlcelli.hxx       |    2 +-
 sc/source/ui/app/inputhdl.cxx           |    2 +-
 sc/source/ui/cctrl/checklistmenu.cxx    |    2 +-
 sc/source/ui/dbgui/csvruler.cxx         |    2 +-
 sc/source/ui/docshell/docfunc.cxx       |    2 +-
 sc/source/ui/drawfunc/drawsh.cxx        |    2 +-
 sc/source/ui/inc/csvruler.hxx           |    2 +-
 sc/source/ui/inc/inputhdl.hxx           |    2 +-
 sc/source/ui/inc/tabvwsh.hxx            |    6 +++---
 sc/source/ui/inc/viewdata.hxx           |    8 ++++----
 sc/source/ui/view/tabvwshc.cxx          |    6 +++---
 sc/source/ui/view/viewdata.cxx          |    8 ++++----
 25 files changed, 62 insertions(+), 62 deletions(-)

New commits:
commit 4bc31abb56f806ee399344160ce0d7c27af48f5e
Author:     Noel <noelgran...@gmail.com>
AuthorDate: Tue Oct 6 15:32:12 2020 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Oct 6 18:37:07 2020 +0200

    loplugin:const* make some params and methods const
    
    Change-Id: If621bb2585fda4afef4be9a189c7f4c00008d358
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104029
    Tested-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sc/inc/recursionhelper.hxx b/sc/inc/recursionhelper.hxx
index 48508ec61e64..d6ba2a3ca8ab 100644
--- a/sc/inc/recursionhelper.hxx
+++ b/sc/inc/recursionhelper.hxx
@@ -113,7 +113,7 @@ public:
     /** Detects a simple cycle involving formula-groups and singleton 
formula-cells. */
     bool PushFormulaGroup(ScFormulaCell* pCell);
     void PopFormulaGroup();
-    bool AnyCycleMemberInDependencyEvalMode(ScFormulaCell* pCell);
+    bool AnyCycleMemberInDependencyEvalMode(const ScFormulaCell* pCell);
     bool AnyParentFGInCycle();
     void SetFormulaGroupDepEvalMode(bool bSet);
     // When dependency computation detects a cycle, it may not compute proper 
cell values.
@@ -126,7 +126,7 @@ public:
     void CleanTemporaryGroupCells();
 
     void SetFormulaGroupSet(o3tl::sorted_vector<ScFormulaCellGroup*>* pSet) { 
pFGSet = pSet; }
-    bool HasFormulaGroupSet() { return pFGSet != nullptr; }
+    bool HasFormulaGroupSet() const { return pFGSet != nullptr; }
     bool CheckFGIndependence(ScFormulaCellGroup* pFG);
     void SetGroupsIndependent(bool bSet) { bGroupsIndependent = bSet; }
     bool AreGroupsIndependent() { return bGroupsIndependent; }
diff --git a/sc/inc/refdata.hxx b/sc/inc/refdata.hxx
index 4688793d6447..a2c9313b607e 100644
--- a/sc/inc/refdata.hxx
+++ b/sc/inc/refdata.hxx
@@ -101,9 +101,9 @@ public:
         loaded. */
     bool ValidExternal(const ScDocument& rDoc) const;
 
-    ScAddress toAbs( ScSheetLimits& rLimits, const ScAddress& rPos ) const;
+    ScAddress toAbs( const ScSheetLimits& rLimits, const ScAddress& rPos ) 
const;
     ScAddress toAbs( const ScDocument& rDoc, const ScAddress& rPos ) const;
-    void SetAddress( ScSheetLimits& rLimits, const ScAddress& rAddr, const 
ScAddress& rPos );
+    void SetAddress( const ScSheetLimits& rLimits, const ScAddress& rAddr, 
const ScAddress& rPos );
     SCROW Row() const;
     SCCOL Col() const;
     SCTAB Tab() const;
@@ -168,12 +168,12 @@ struct ScComplexRefData
         return Ref1.Col() == 0 && Ref2.Col() == MAXCOL && !Ref1.IsColRel() && 
!Ref2.IsColRel();
     }
 
-    SC_DLLPUBLIC ScRange toAbs( ScSheetLimits& rLimits, const ScAddress& rPos 
) const;
+    SC_DLLPUBLIC ScRange toAbs( const ScSheetLimits& rLimits, const ScAddress& 
rPos ) const;
     SC_DLLPUBLIC ScRange toAbs( const ScDocument& rDoc, const ScAddress& rPos 
) const;
 
     /** Set a new range, assuming that the ordering of the range matches the
         ordering of the reference data flags already set. */
-    void SetRange( ScSheetLimits& rLimits, const ScRange& rRange, const 
ScAddress& rPos );
+    void SetRange( const ScSheetLimits& rLimits, const ScRange& rRange, const 
ScAddress& rPos );
 
     /** Adjust ordering (front-top-left/rear-bottom-right) to a new position. 
*/
     void PutInOrder( const ScAddress& rPos );
@@ -183,8 +183,8 @@ struct ScComplexRefData
     /** Enlarge range if reference passed is not within existing range.
         ScAddress position is used to calculate absolute references from
         relative references. */
-    ScComplexRefData& Extend( ScSheetLimits& rLimits, const ScSingleRefData & 
rRef, const ScAddress & rPos );
-    ScComplexRefData& Extend( ScSheetLimits& rLimits, const ScComplexRefData & 
rRef, const ScAddress & rPos );
+    ScComplexRefData& Extend( const ScSheetLimits& rLimits, const 
ScSingleRefData & rRef, const ScAddress & rPos );
+    ScComplexRefData& Extend( const ScSheetLimits& rLimits, const 
ScComplexRefData & rRef, const ScAddress & rPos );
 
     /** Increment or decrement end column unless or until sticky.
         @see ScRange::IncEndColSticky()
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 98ff152e30a9..e235e199bc76 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -736,8 +736,8 @@ namespace {
 struct Convention_A1 : public ScCompiler::Convention
 {
     explicit Convention_A1( FormulaGrammar::AddressConvention eConv ) : 
ScCompiler::Convention( eConv ) { }
-    static void MakeColStr( ScSheetLimits& rLimits, OUStringBuffer& rBuffer, 
SCCOL nCol );
-    static void MakeRowStr( ScSheetLimits& rLimits, OUStringBuffer& rBuffer, 
SCROW nRow );
+    static void MakeColStr( const ScSheetLimits& rLimits, OUStringBuffer& 
rBuffer, SCCOL nCol );
+    static void MakeRowStr( const ScSheetLimits& rLimits, OUStringBuffer& 
rBuffer, SCROW nRow );
 
     ParseResult parseAnyToken( const OUString& rFormula,
                                sal_Int32 nSrcPos,
@@ -767,7 +767,7 @@ struct Convention_A1 : public ScCompiler::Convention
 
 }
 
-void Convention_A1::MakeColStr( ScSheetLimits& rLimits, OUStringBuffer& 
rBuffer, SCCOL nCol )
+void Convention_A1::MakeColStr( const ScSheetLimits& rLimits, OUStringBuffer& 
rBuffer, SCCOL nCol )
 {
     if ( !rLimits.ValidCol(nCol) )
         rBuffer.append(ScResId(STR_NO_REF_TABLE));
@@ -775,7 +775,7 @@ void Convention_A1::MakeColStr( ScSheetLimits& rLimits, 
OUStringBuffer& rBuffer,
         ::ScColToAlpha( rBuffer, nCol);
 }
 
-void Convention_A1::MakeRowStr( ScSheetLimits& rLimits, OUStringBuffer& 
rBuffer, SCROW nRow )
+void Convention_A1::MakeRowStr( const ScSheetLimits& rLimits, OUStringBuffer& 
rBuffer, SCROW nRow )
 {
     if ( !rLimits.ValidRow(nRow) )
         rBuffer.append(ScResId(STR_NO_REF_TABLE));
@@ -807,7 +807,7 @@ struct ConventionOOO_A1 : public Convention_A1
     };
 
     static void MakeOneRefStrImpl(
-        ScSheetLimits& rLimits, OUStringBuffer& rBuffer,
+        const ScSheetLimits& rLimits, OUStringBuffer& rBuffer,
         const OUString& rErrRef, const std::vector<OUString>& rTabNames,
         const ScSingleRefData& rRef, const ScAddress& rAbsRef,
         bool bForceTab, bool bODF, SingletonDisplay eSingletonDisplay )
@@ -858,7 +858,7 @@ struct ConventionOOO_A1 : public Convention_A1
         }
     }
 
-    static SingletonDisplay getSingletonDisplay( ScSheetLimits& rLimits, const 
ScAddress& rAbs1, const ScAddress& rAbs2,
+    static SingletonDisplay getSingletonDisplay( const ScSheetLimits& rLimits, 
const ScAddress& rAbs1, const ScAddress& rAbs2,
             const ScComplexRefData& rRef, bool bFromRangeName )
     {
         // If any part is error, display as such.
@@ -943,7 +943,7 @@ struct ConventionOOO_A1 : public Convention_A1
     }
 
     static bool makeExternalSingleRefStr(
-        ScSheetLimits& rLimits,
+        const ScSheetLimits& rLimits,
         OUStringBuffer& rBuffer, const OUString& rFileName, const OUString& 
rTabName,
         const ScSingleRefData& rRef, const ScAddress& rPos, bool 
bDisplayTabName, bool bEncodeUrl )
     {
@@ -976,7 +976,7 @@ struct ConventionOOO_A1 : public Convention_A1
     }
 
     static void makeExternalRefStrImpl(
-        ScSheetLimits& rLimits,
+        const ScSheetLimits& rLimits,
         OUStringBuffer& rBuffer, const ScAddress& rPos, const OUString& 
rFileName,
         const OUString& rTabName, const ScSingleRefData& rRef, bool bODF )
     {
@@ -998,7 +998,7 @@ struct ConventionOOO_A1 : public Convention_A1
     }
 
     static void makeExternalRefStrImpl(
-        ScSheetLimits& rLimits,
+        const ScSheetLimits& rLimits,
         OUStringBuffer& rBuffer, const ScAddress& rPos, const OUString& 
rFileName,
         const std::vector<OUString>& rTabNames, const OUString& rTabName,
         const ScComplexRefData& rRef, bool bODF )
@@ -1123,7 +1123,7 @@ struct ConventionXL
     }
 
     static void GetTab(
-        ScSheetLimits& rLimits,
+        const ScSheetLimits& rLimits,
         const ScAddress& rPos, const std::vector<OUString>& rTabNames,
         const ScSingleRefData& rRef, OUString& rTabName )
     {
@@ -1136,7 +1136,7 @@ struct ConventionXL
         rTabName = rTabNames[aAbs.Tab()];
     }
 
-    static void MakeTabStr( ScSheetLimits& rLimits, OUStringBuffer& rBuf,
+    static void MakeTabStr( const ScSheetLimits& rLimits, OUStringBuffer& rBuf,
                             const ScAddress& rPos,
                             const std::vector<OUString>& rTabNames,
                             const ScComplexRefData& rRef,
@@ -1292,7 +1292,7 @@ struct ConventionXL_A1 : public Convention_A1, public 
ConventionXL
     ConventionXL_A1() : Convention_A1( FormulaGrammar::CONV_XL_A1 ) { }
     explicit ConventionXL_A1( FormulaGrammar::AddressConvention eConv ) : 
Convention_A1( eConv ) { }
 
-    static void makeSingleCellStr( ScSheetLimits& rLimits, OUStringBuffer& 
rBuf, const ScSingleRefData& rRef, const ScAddress& rAbs )
+    static void makeSingleCellStr( const ScSheetLimits& rLimits, 
OUStringBuffer& rBuf, const ScSingleRefData& rRef, const ScAddress& rAbs )
     {
         if (!rRef.IsColRel())
             rBuf.append('$');
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 42bdee5716f9..9eeddab062f7 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2232,7 +2232,7 @@ static bool lcl_FormatHasOpenPar( const SvNumberformat* 
pFormat )
 
 namespace {
 
-void getFormatString(SvNumberFormatter* pFormatter, sal_uLong nFormat, 
OUString& rFmtStr)
+void getFormatString(const SvNumberFormatter* pFormatter, sal_uLong nFormat, 
OUString& rFmtStr)
 {
     rFmtStr = pFormatter->GetCalcCellReturn( nFormat);
 }
diff --git a/sc/source/core/tool/recursionhelper.cxx 
b/sc/source/core/tool/recursionhelper.cxx
index d50fca1d87f2..59601f37a0a6 100644
--- a/sc/source/core/tool/recursionhelper.cxx
+++ b/sc/source/core/tool/recursionhelper.cxx
@@ -150,7 +150,7 @@ void ScRecursionHelper::PopFormulaGroup()
     aInDependencyEvalMode.pop_back();
 }
 
-bool ScRecursionHelper::AnyCycleMemberInDependencyEvalMode(ScFormulaCell* 
pCell)
+bool ScRecursionHelper::AnyCycleMemberInDependencyEvalMode(const 
ScFormulaCell* pCell)
 {
     assert(pCell);
 
diff --git a/sc/source/core/tool/refdata.cxx b/sc/source/core/tool/refdata.cxx
index 7457d97411d9..59a224dbcfbd 100644
--- a/sc/source/core/tool/refdata.cxx
+++ b/sc/source/core/tool/refdata.cxx
@@ -190,7 +190,7 @@ ScAddress ScSingleRefData::toAbs( const ScDocument& rDoc, 
const ScAddress& rPos
     return toAbs(rDoc.GetSheetLimits(), rPos);
 }
 
-ScAddress ScSingleRefData::toAbs( ScSheetLimits& rLimits, const ScAddress& 
rPos ) const
+ScAddress ScSingleRefData::toAbs( const ScSheetLimits& rLimits, const 
ScAddress& rPos ) const
 {
     SCCOL nRetCol = Flags.bColRel ? mnCol + rPos.Col() : mnCol;
     SCROW nRetRow = Flags.bRowRel ? mnRow + rPos.Row() : mnRow;
@@ -210,7 +210,7 @@ ScAddress ScSingleRefData::toAbs( ScSheetLimits& rLimits, 
const ScAddress& rPos
     return aAbs;
 }
 
-void ScSingleRefData::SetAddress( ScSheetLimits& rLimits, const ScAddress& 
rAddr, const ScAddress& rPos )
+void ScSingleRefData::SetAddress( const ScSheetLimits& rLimits, const 
ScAddress& rAddr, const ScAddress& rPos )
 {
     if (Flags.bColRel)
         mnCol = rAddr.Col() - rPos.Col();
@@ -391,7 +391,7 @@ void ScComplexRefData::InitFromRefAddresses( const 
ScDocument& rDoc, const ScRef
     SetRange( rDoc.GetSheetLimits(), ScRange( rRef1.GetAddress(), 
rRef2.GetAddress()), rPos);
 }
 
-ScComplexRefData& ScComplexRefData::Extend( ScSheetLimits& rLimits, const 
ScSingleRefData & rRef, const ScAddress & rPos )
+ScComplexRefData& ScComplexRefData::Extend( const ScSheetLimits& rLimits, 
const ScSingleRefData & rRef, const ScAddress & rPos )
 {
     bool bInherit3D = (Ref1.IsFlag3D() && !Ref2.IsFlag3D() && 
!rRef.IsFlag3D());
     ScRange aAbsRange = toAbs(rLimits, rPos);
@@ -470,7 +470,7 @@ ScComplexRefData& ScComplexRefData::Extend( ScSheetLimits& 
rLimits, const ScSing
     return *this;
 }
 
-ScComplexRefData& ScComplexRefData::Extend( ScSheetLimits& rLimits, const 
ScComplexRefData & rRef, const ScAddress & rPos )
+ScComplexRefData& ScComplexRefData::Extend( const ScSheetLimits& rLimits, 
const ScComplexRefData & rRef, const ScAddress & rPos )
 {
     return Extend( rLimits, rRef.Ref1, rPos).Extend( rLimits, rRef.Ref2, rPos);
 }
@@ -490,12 +490,12 @@ ScRange ScComplexRefData::toAbs( const ScDocument& rDoc, 
const ScAddress& rPos )
     return toAbs(rDoc.GetSheetLimits(), rPos);
 }
 
-ScRange ScComplexRefData::toAbs( ScSheetLimits& rLimits, const ScAddress& rPos 
) const
+ScRange ScComplexRefData::toAbs( const ScSheetLimits& rLimits, const 
ScAddress& rPos ) const
 {
     return ScRange(Ref1.toAbs(rLimits, rPos), Ref2.toAbs(rLimits, rPos));
 }
 
-void ScComplexRefData::SetRange( ScSheetLimits& rLimits, const ScRange& 
rRange, const ScAddress& rPos )
+void ScComplexRefData::SetRange( const ScSheetLimits& rLimits, const ScRange& 
rRange, const ScAddress& rPos )
 {
     Ref1.SetAddress(rLimits, rRange.aStart, rPos);
     Ref2.SetAddress(rLimits, rRange.aEnd, rPos);
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 550787285724..859b44327a78 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -429,7 +429,7 @@ FormulaToken* ScRawToken::CreateToken(ScSheetLimits& 
rLimits) const
 namespace {
 
 //  TextEqual: if same formula entered (for optimization in sort)
-bool checkTextEqual( ScSheetLimits& rLimits, const FormulaToken& _rToken1, 
const FormulaToken& _rToken2 )
+bool checkTextEqual( const ScSheetLimits& rLimits, const FormulaToken& 
_rToken1, const FormulaToken& _rToken2 )
 {
     assert(
         (_rToken1.GetType() == svSingleRef || _rToken1.GetType() == 
svDoubleRef)
@@ -4033,7 +4033,7 @@ sc::RefUpdateResult 
ScTokenArray::AdjustReferenceInMovedName( const sc::RefUpdat
 
 namespace {
 
-bool adjustSingleRefOnDeletedTab( ScSheetLimits& rLimits, ScSingleRefData& 
rRef, SCTAB nDelPos, SCTAB nSheets, const ScAddress& rOldPos, const ScAddress& 
rNewPos )
+bool adjustSingleRefOnDeletedTab( const ScSheetLimits& rLimits, 
ScSingleRefData& rRef, SCTAB nDelPos, SCTAB nSheets, const ScAddress& rOldPos, 
const ScAddress& rNewPos )
 {
     ScAddress aAbs = rRef.toAbs(rLimits, rOldPos);
     if (nDelPos <= aAbs.Tab() && aAbs.Tab() < nDelPos + nSheets)
@@ -4059,7 +4059,7 @@ bool adjustSingleRefOnDeletedTab( ScSheetLimits& rLimits, 
ScSingleRefData& rRef,
     return false;
 }
 
-bool adjustSingleRefOnInsertedTab( ScSheetLimits& rLimits, ScSingleRefData& 
rRef, SCTAB nInsPos, SCTAB nSheets, const ScAddress& rOldPos, const ScAddress& 
rNewPos )
+bool adjustSingleRefOnInsertedTab( const ScSheetLimits& rLimits, 
ScSingleRefData& rRef, SCTAB nInsPos, SCTAB nSheets, const ScAddress& rOldPos, 
const ScAddress& rNewPos )
 {
     ScAddress aAbs = rRef.toAbs(rLimits, rOldPos);
     if (nInsPos <= aAbs.Tab())
@@ -4079,7 +4079,7 @@ bool adjustSingleRefOnInsertedTab( ScSheetLimits& 
rLimits, ScSingleRefData& rRef
     return false;
 }
 
-bool adjustDoubleRefOnDeleteTab(ScSheetLimits& rLimits, ScComplexRefData& 
rRef, SCTAB nDelPos, SCTAB nSheets, const ScAddress& rOldPos, const ScAddress& 
rNewPos)
+bool adjustDoubleRefOnDeleteTab(const ScSheetLimits& rLimits, 
ScComplexRefData& rRef, SCTAB nDelPos, SCTAB nSheets, const ScAddress& rOldPos, 
const ScAddress& rNewPos)
 {
     ScSingleRefData& rRef1 = rRef.Ref1;
     ScSingleRefData& rRef2 = rRef.Ref2;
@@ -4474,7 +4474,7 @@ void ScTokenArray::AdjustReferenceOnCopy( const 
ScAddress& rNewPos )
 
 namespace {
 
-void clearTabDeletedFlag( ScSheetLimits& rLimits, ScSingleRefData& rRef, const 
ScAddress& rPos, SCTAB nStartTab, SCTAB nEndTab )
+void clearTabDeletedFlag( const ScSheetLimits& rLimits, ScSingleRefData& rRef, 
const ScAddress& rPos, SCTAB nStartTab, SCTAB nEndTab )
 {
     if (!rRef.IsTabDeleted())
         return;
@@ -4521,7 +4521,7 @@ void ScTokenArray::ClearTabDeleted( const ScAddress& 
rPos, SCTAB nStartTab, SCTA
 namespace {
 
 void checkBounds(
-    ScSheetLimits& rLimits,
+    const ScSheetLimits& rLimits,
     const ScAddress& rPos, SCROW nGroupLen, const ScRange& rCheckRange,
     const ScSingleRefData& rRef, std::vector<SCROW>& rBounds, const ScRange* 
pDeletedRange )
 {
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index 1e2c61233a2c..b3bd251fff82 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -79,7 +79,7 @@ static void lcl_getListOfStreams(SotStorage * pStorage, 
comphelper::SequenceAsHa
     }
 }
 
-static tools::SvRef<SotStorage> lcl_DRMDecrypt(SfxMedium& rMedium, 
tools::SvRef<SotStorage>& rStorage, std::shared_ptr<SvStream>& rNewStorageStrm)
+static tools::SvRef<SotStorage> lcl_DRMDecrypt(const SfxMedium& rMedium, const 
tools::SvRef<SotStorage>& rStorage, std::shared_ptr<SvStream>& rNewStorageStrm)
 {
     tools::SvRef<SotStorage> aNewStorage;
 
diff --git a/sc/source/filter/excel/xilink.cxx 
b/sc/source/filter/excel/xilink.cxx
index eaa42ea0de0b..d71d07ea0099 100644
--- a/sc/source/filter/excel/xilink.cxx
+++ b/sc/source/filter/excel/xilink.cxx
@@ -468,7 +468,7 @@ bool extractSheetAndRange(const OUString& rName, OUString& 
rSheet, OUString& rRa
 
 }
 
-bool XclImpExtName::CreateOleData(ScDocument& rDoc, const OUString& rUrl,
+bool XclImpExtName::CreateOleData(const ScDocument& rDoc, const OUString& rUrl,
                                   sal_uInt16& rFileId, OUString& rTabName, 
ScRange& rRange) const
 {
     if (!mpMOper)
diff --git a/sc/source/filter/inc/xeextlst.hxx 
b/sc/source/filter/inc/xeextlst.hxx
index a88b823e49a9..b72b5155aad4 100644
--- a/sc/source/filter/inc/xeextlst.hxx
+++ b/sc/source/filter/inc/xeextlst.hxx
@@ -195,7 +195,7 @@ public:
     virtual void SaveXml( XclExpXmlStream& rStrm ) override;
 
     void AddRecord( XclExpExt* pEntry );
-    void AddRecord( XclExpExtRef& aEntry ) { AddRecord(aEntry.get()); }
+    void AddRecord( const XclExpExtRef& aEntry ) { AddRecord(aEntry.get()); }
 
     XclExpExt* GetItem( XclExpExtType eType );
 
diff --git a/sc/source/filter/inc/xilink.hxx b/sc/source/filter/inc/xilink.hxx
index a13c57ca4c73..7dae2d026f4a 100644
--- a/sc/source/filter/inc/xilink.hxx
+++ b/sc/source/filter/inc/xilink.hxx
@@ -141,7 +141,7 @@ public:
      * reference, since OLE link doesn't work cross-platform, and is not very
      * reliable even on Windows.
      */
-    bool CreateOleData(ScDocument& rDoc, const OUString& rUrl,
+    bool CreateOleData(const ScDocument& rDoc, const OUString& rUrl,
                        sal_uInt16& rFileId, OUString& rTabName, ScRange& 
rRange) const;
 
     bool                HasFormulaTokens() const;
diff --git a/sc/source/filter/oox/formulabuffer.cxx 
b/sc/source/filter/oox/formulabuffer.cxx
index 486ee3cf7d7d..d9a8cdb0d194 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -54,7 +54,7 @@ public:
         Item() : mnRow(-1), mpCell(nullptr) {}
     };
 
-    explicit CachedTokenArray( ScDocument& rDoc ) :
+    explicit CachedTokenArray( const ScDocument& rDoc ) :
         maCxt(rDoc, formula::FormulaGrammar::GRAM_OOXML) {}
 
     Item* get( const ScAddress& rPos, const OUString& rFormula )
diff --git a/sc/source/filter/xml/xmlcelli.cxx 
b/sc/source/filter/xml/xmlcelli.cxx
index ecaf9445be8c..6763ecf081d0 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -100,7 +100,7 @@
 using namespace com::sun::star;
 using namespace xmloff::token;
 
-ScXMLTableRowCellContext::ParaFormat::ParaFormat(ScEditEngineDefaulter& 
rEditEngine) :
+ScXMLTableRowCellContext::ParaFormat::ParaFormat(const ScEditEngineDefaulter& 
rEditEngine) :
     maItemSet(rEditEngine.GetEmptyItemSet()) {}
 
 ScXMLTableRowCellContext::Field::Field(std::unique_ptr<SvxFieldData> pData) : 
mpData(std::move(pData)) {}
diff --git a/sc/source/filter/xml/xmlcelli.hxx 
b/sc/source/filter/xml/xmlcelli.hxx
index 85a951535b51..35ab79944c10 100644
--- a/sc/source/filter/xml/xmlcelli.hxx
+++ b/sc/source/filter/xml/xmlcelli.hxx
@@ -43,7 +43,7 @@ class ScXMLTableRowCellContext : public ScXMLImportContext
         SfxItemSet maItemSet;
         ESelection maSelection;
 
-        explicit ParaFormat(ScEditEngineDefaulter& rEditEngine);
+        explicit ParaFormat(const ScEditEngineDefaulter& rEditEngine);
     };
 
     struct Field
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 987c4630b1a5..f1c1fb64a667 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -428,7 +428,7 @@ handle_r1c1:
     }
 }
 
-ReferenceMark ScInputHandler::GetReferenceMark( ScViewData& rViewData, 
ScDocShell* pDocSh,
+ReferenceMark ScInputHandler::GetReferenceMark( const ScViewData& rViewData, 
ScDocShell* pDocSh,
                                     long nX1, long nX2, long nY1, long nY2,
                                     long nTab, const Color& rColor )
 {
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index 2edb5f50b1fe..3d27f8b02d13 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1169,7 +1169,7 @@ IMPL_LINK(ScCheckListMenuControl, KeyInputHdl, const 
KeyEvent&, rKEvt, bool)
 
 namespace
 {
-    void insertMember(weld::TreeView& rView, weld::TreeIter& rIter, const 
ScCheckListMember& rMember)
+    void insertMember(weld::TreeView& rView, const weld::TreeIter& rIter, 
const ScCheckListMember& rMember)
     {
         OUString aLabel = rMember.maName;
         if (aLabel.isEmpty())
diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx
index e686537ad68e..94e733ee7c1b 100644
--- a/sc/source/ui/dbgui/csvruler.cxx
+++ b/sc/source/ui/dbgui/csvruler.cxx
@@ -90,7 +90,7 @@ static void save_FixedWidthList(const ScCsvSplits& rSplits)
     aItem.PutProperties(aNames, aValues);
 }
 
-ScCsvRuler::ScCsvRuler(ScCsvLayoutData& rData, ScCsvTableBox* pTableBox)
+ScCsvRuler::ScCsvRuler(const ScCsvLayoutData& rData, ScCsvTableBox* pTableBox)
     : ScCsvControl(rData)
     , mpTableBox(pTableBox)
     , mnPosCursorLast(1)
diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index 36f676ddbf52..b0229c4c20f6 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -4472,7 +4472,7 @@ namespace {
  * Expand the fill range as necessary, to allow copying of adjacent cell(s)
  * even when those cells are not in the original range.
  */
-void adjustFillRangeForAdjacentCopy(ScDocument &rDoc, ScRange& rRange, FillDir 
eDir)
+void adjustFillRangeForAdjacentCopy(const ScDocument &rDoc, ScRange& rRange, 
FillDir eDir)
 {
     switch (eDir)
     {
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 161f88a0cb2e..76470eb90caa 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -64,7 +64,7 @@ SFX_IMPL_INTERFACE(ScDrawShell, SfxShell)
 
 namespace
 {
-    void lcl_convertStringArguments(sal_uInt16 nSlot, 
std::unique_ptr<SfxItemSet>& pArgs)
+    void lcl_convertStringArguments(sal_uInt16 nSlot, const 
std::unique_ptr<SfxItemSet>& pArgs)
     {
         Color aColor;
         const SfxPoolItem* pItem = nullptr;
diff --git a/sc/source/ui/inc/csvruler.hxx b/sc/source/ui/inc/csvruler.hxx
index 0913ac09271f..ad917313a1c9 100644
--- a/sc/source/ui/inc/csvruler.hxx
+++ b/sc/source/ui/inc/csvruler.hxx
@@ -58,7 +58,7 @@ private:
     bool                        mbTracking;         /// If currently mouse 
tracking
 
 public:
-    explicit ScCsvRuler(ScCsvLayoutData& rData, ScCsvTableBox* pTableBox);
+    explicit ScCsvRuler(const ScCsvLayoutData& rData, ScCsvTableBox* 
pTableBox);
     virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
     ScCsvTableBox* GetTableBox() { return mpTableBox; }
     virtual ~ScCsvRuler() override;
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index e2c5521c8590..b18e111af547 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -284,7 +284,7 @@ public:
 
     static void     SetAutoComplete(bool bSet)  { bAutoComplete = bSet; }
 
-    static ReferenceMark GetReferenceMark( ScViewData& rViewData, ScDocShell* 
pDocSh,
+    static ReferenceMark GetReferenceMark( const ScViewData& rViewData, 
ScDocShell* pDocSh,
                                     long nX1, long nX2, long nY1, long nY2,
                                     long nTab, const Color& rColor );
 
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 47874cb06320..3f1342bd8322 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -388,11 +388,11 @@ public:
     /// See SfxViewShell::NotifyCursor().
     void NotifyCursor(SfxViewShell* pViewShell) const override;
     /// Emits a LOK_CALLBACK_INVALIDATE_HEADER for all views whose current tab 
is equal to nCurrentTabIndex
-    static void notifyAllViewsHeaderInvalidation(SfxViewShell* pForViewShell, 
HeaderType eHeaderType, SCTAB nCurrentTabIndex);
-    static bool isAnyEditViewInRange(SfxViewShell* pForViewShell, bool 
bColumns, SCCOLROW nStart, SCCOLROW nEnd);
+    static void notifyAllViewsHeaderInvalidation(const SfxViewShell* 
pForViewShell, HeaderType eHeaderType, SCTAB nCurrentTabIndex);
+    static bool isAnyEditViewInRange(const SfxViewShell* pForViewShell, bool 
bColumns, SCCOLROW nStart, SCCOLROW nEnd);
     /// Emits a LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY for all views whose 
current tab
     /// is equal to nCurrentTabIndex
-    static void notifyAllViewsSheetGeomInvalidation(SfxViewShell* 
pForViewShell, bool bColumns, bool bRows, bool bSizes,
+    static void notifyAllViewsSheetGeomInvalidation(const SfxViewShell* 
pForViewShell, bool bColumns, bool bRows, bool bSizes,
                                                     bool bHidden, bool 
bFiltered, bool bGroups, SCTAB nCurrentTabIndex);
     css::uno::Reference<css::drawing::XShapes> getSelectedXShapes();
     static  css::uno::Reference<css::datatransfer::XTransferable2> 
GetClipData(vcl::Window* pWin);
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index e679309ef413..2b98731870f2 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -137,8 +137,8 @@ private:
     std::set<value_type, Comp> mData;
 
 public:
-    ScPositionHelper(ScDocument *pDoc, bool bColumn);
-    void setDocument(ScDocument& rDoc, bool bColumn);
+    ScPositionHelper(const ScDocument *pDoc, bool bColumn);
+    void setDocument(const ScDocument& rDoc, bool bColumn);
 
     void insert(index_type nIndex, long nPos);
     void removeByIndex(index_type nIndex);
@@ -245,9 +245,9 @@ private:
 
     bool            bShowGrid;                  // per sheet show grid lines 
option.
     bool            mbOldCursorValid;           // "virtual" Cursor position 
when combined
-                    ScViewDataTable(ScDocument *pDoc = nullptr);
+                    ScViewDataTable(const ScDocument *pDoc = nullptr);
 
-    void            InitData(ScDocument& rDoc);
+    void            InitData(const ScDocument& rDoc);
     void            WriteUserDataSequence(
                         css::uno::Sequence <css::beans::PropertyValue>& 
rSettings,
                         const ScViewData& rViewData, SCTAB nTab ) const;
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 4fe603fd2b6d..f208a07af7af 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -496,7 +496,7 @@ css::uno::Reference<css::datatransfer::XTransferable2> 
ScTabViewShell::GetClipDa
     return xTransferable;
 }
 
-void ScTabViewShell::notifyAllViewsHeaderInvalidation(SfxViewShell* 
pForViewShell, HeaderType eHeaderType, SCTAB nCurrentTabIndex)
+void ScTabViewShell::notifyAllViewsHeaderInvalidation(const SfxViewShell* 
pForViewShell, HeaderType eHeaderType, SCTAB nCurrentTabIndex)
 {
     if (!comphelper::LibreOfficeKit::isActive())
         return;
@@ -528,7 +528,7 @@ void 
ScTabViewShell::notifyAllViewsHeaderInvalidation(SfxViewShell* pForViewShel
     }
 }
 
-bool ScTabViewShell::isAnyEditViewInRange(SfxViewShell* pForViewShell, bool 
bColumns, SCCOLROW nStart, SCCOLROW nEnd)
+bool ScTabViewShell::isAnyEditViewInRange(const SfxViewShell* pForViewShell, 
bool bColumns, SCCOLROW nStart, SCCOLROW nEnd)
 {
     if (comphelper::LibreOfficeKit::isActive())
     {
@@ -553,7 +553,7 @@ bool ScTabViewShell::isAnyEditViewInRange(SfxViewShell* 
pForViewShell, bool bCol
     return false;
 }
 
-void ScTabViewShell::notifyAllViewsSheetGeomInvalidation(SfxViewShell* 
pForViewShell, bool bColumns,
+void ScTabViewShell::notifyAllViewsSheetGeomInvalidation(const SfxViewShell* 
pForViewShell, bool bColumns,
                                                          bool bRows, bool 
bSizes, bool bHidden, bool bFiltered,
                                                          bool bGroups, SCTAB 
nCurrentTabIndex)
 {
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index b101997e81ca..e3a1e54002bd 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -118,13 +118,13 @@ bool ScPositionHelper::Comp::operator() (const 
value_type& rValue1, const value_
     }
 }
 
-ScPositionHelper::ScPositionHelper(ScDocument *pDoc, bool bColumn)
+ScPositionHelper::ScPositionHelper(const ScDocument *pDoc, bool bColumn)
     : MAX_INDEX(bColumn ? (pDoc ? pDoc->MaxCol() : -1) : MAXTILEDROW)
 {
     mData.insert(std::make_pair(-1, 0));
 }
 
-void ScPositionHelper::setDocument(ScDocument& rDoc, bool bColumn)
+void ScPositionHelper::setDocument(const ScDocument& rDoc, bool bColumn)
 {
     MAX_INDEX = bColumn ? rDoc.MaxCol() : MAXTILEDROW;
 }
@@ -480,7 +480,7 @@ void ScBoundsProvider::GetIndexTowards(
     }
 }
 
-ScViewDataTable::ScViewDataTable(ScDocument *pDoc) :
+ScViewDataTable::ScViewDataTable(const ScDocument *pDoc) :
                 eZoomType( SvxZoomType::PERCENT ),
                 aZoomX( 1,1 ),
                 aZoomY( 1,1 ),
@@ -514,7 +514,7 @@ ScViewDataTable::ScViewDataTable(ScDocument *pDoc) :
     nPixPosY[0]=nPixPosY[1]=0;
 }
 
-void ScViewDataTable::InitData(ScDocument& rDoc)
+void ScViewDataTable::InitData(const ScDocument& rDoc)
 {
     aWidthHelper.setDocument(rDoc, true);
     aHeightHelper.setDocument(rDoc, false);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to