[Libreoffice-commits] core.git: forms/source include/svx include/test sc/inc sc/source sdext/source sd/source soltools/cpp svx/source test/source vcl/inc vcl/unx writerperfect/source

Noel Grandin noel.grandin at collabora.co.uk
Thu Dec 7 06:23:56 UTC 2017


 forms/source/richtext/richtextengine.cxx               |    2 
 forms/source/richtext/richtextengine.hxx               |    2 
 include/svx/colorwindow.hxx                            |    2 
 include/test/sheet/xmultipleoperation.hxx              |    2 
 sc/inc/colorscale.hxx                                  |    4 
 sc/inc/column.hxx                                      |    2 
 sc/inc/compare.hxx                                     |    2 
 sc/inc/dptabres.hxx                                    |    2 
 sc/inc/dputil.hxx                                      |    2 
 sc/inc/drwlayer.hxx                                    |    2 
 sc/inc/formulacell.hxx                                 |    4 
 sc/inc/tokenarray.hxx                                  |    4 
 sc/source/core/data/colorscale.cxx                     |    4 
 sc/source/core/data/column3.cxx                        |    2 
 sc/source/core/data/dpdimsave.cxx                      |    2 
 sc/source/core/data/dptabres.cxx                       |    2 
 sc/source/core/data/dputil.cxx                         |    2 
 sc/source/core/data/drwlayer.cxx                       |    2 
 sc/source/core/data/formulacell.cxx                    |    6 -
 sc/source/core/tool/autoform.cxx                       |    2 
 sc/source/core/tool/compare.cxx                        |    2 
 sc/source/core/tool/formulagroup.cxx                   |    2 
 sc/source/core/tool/interpr8.cxx                       |   10 +-
 sc/source/core/tool/token.cxx                          |    4 
 sc/source/filter/excel/xepivotxml.cxx                  |    2 
 sc/source/filter/html/htmlpars.cxx                     |    4 
 sc/source/filter/inc/htmlpars.hxx                      |    6 -
 sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx |   12 +-
 sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx |    4 
 sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx |   14 +--
 sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx |   14 +--
 sc/source/filter/xml/XMLStylesExportHelper.cxx         |    2 
 sc/source/filter/xml/XMLStylesExportHelper.hxx         |    2 
 sc/source/ui/docshell/docsh5.cxx                       |    2 
 sc/source/ui/inc/output.hxx                            |    2 
 sc/source/ui/vba/vbarange.cxx                          |    2 
 sc/source/ui/vba/vbarange.hxx                          |    2 
 sc/source/ui/view/cellsh2.cxx                          |    2 
 sc/source/ui/view/gridwin.cxx                          |    4 
 sc/source/ui/view/gridwin_dbgutil.cxx                  |    2 
 sc/source/ui/view/output2.cxx                          |   72 ++++++++---------
 sc/source/ui/view/reffact.cxx                          |    2 
 sd/source/ui/func/fupage.cxx                           |    2 
 sd/source/ui/inc/fupage.hxx                            |    2 
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx  |    4 
 sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx       |    4 
 sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx       |    4 
 soltools/cpp/_tokens.c                                 |    4 
 soltools/cpp/cpp.h                                     |    2 
 svx/source/tbxctrls/tbcontrl.cxx                       |    2 
 test/source/sheet/xmultipleoperation.cxx               |    2 
 vcl/inc/unx/wmadaptor.hxx                              |    2 
 vcl/unx/generic/app/wmadaptor.cxx                      |    2 
 writerperfect/source/writer/exp/xmlfmt.cxx             |    4 
 54 files changed, 127 insertions(+), 127 deletions(-)

New commits:
commit be354a2abd27548405caf97fdbc814b5a6b06995
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Dec 6 16:18:58 2017 +0200

    loplugin:constparams
    
    Change-Id: Ia322ecf8f80b28c58ec33d17ca9607401a92534b
    Reviewed-on: https://gerrit.libreoffice.org/45959
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/forms/source/richtext/richtextengine.cxx b/forms/source/richtext/richtextengine.cxx
index 0f583441e832..740996b76a78 100644
--- a/forms/source/richtext/richtextengine.cxx
+++ b/forms/source/richtext/richtextengine.cxx
@@ -113,7 +113,7 @@ namespace frm
     }
 
 
-    void RichTextEngine::revokeEngineStatusListener( IEngineStatusListener* _pListener )
+    void RichTextEngine::revokeEngineStatusListener( IEngineStatusListener const * _pListener )
     {
         ::std::vector< IEngineStatusListener* >::iterator aPos = ::std::find_if(
             m_aStatusListeners.begin(),
diff --git a/forms/source/richtext/richtextengine.hxx b/forms/source/richtext/richtextengine.hxx
index e71189907e4f..21175a4165be 100644
--- a/forms/source/richtext/richtextengine.hxx
+++ b/forms/source/richtext/richtextengine.hxx
@@ -53,7 +53,7 @@ namespace frm
 
         // for multiplexing the StatusChanged events of the edit engine
         void registerEngineStatusListener( IEngineStatusListener* _pListener );
-        void revokeEngineStatusListener( IEngineStatusListener* _pListener );
+        void revokeEngineStatusListener( IEngineStatusListener const * _pListener );
 
         SfxItemPool* getPool() { return m_pEnginePool; }
 
diff --git a/include/svx/colorwindow.hxx b/include/svx/colorwindow.hxx
index 467acf31aaae..24a83c140e8a 100644
--- a/include/svx/colorwindow.hxx
+++ b/include/svx/colorwindow.hxx
@@ -80,7 +80,7 @@ private:
 
 public:
     SvxColorWindow(const OUString& rCommand,
-                   std::shared_ptr<PaletteManager>& rPaletteManager,
+                   std::shared_ptr<PaletteManager> const & rPaletteManager,
                    BorderColorStatus& rBorderColorStatus,
                    sal_uInt16 nSlotId,
                    const css::uno::Reference< css::frame::XFrame >& rFrame,
diff --git a/include/test/sheet/xmultipleoperation.hxx b/include/test/sheet/xmultipleoperation.hxx
index 50d4d144edc1..b775ddfcb324 100644
--- a/include/test/sheet/xmultipleoperation.hxx
+++ b/include/test/sheet/xmultipleoperation.hxx
@@ -30,7 +30,7 @@ protected:
     ~XMultipleOperation() {}
 
 private:
-    void fillCells(css::uno::Reference<css::sheet::XSpreadsheet>&);
+    void fillCells(css::uno::Reference<css::sheet::XSpreadsheet> const&);
 };
 }
 
diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index 19f00d7087e8..0ed8a82d14e3 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -66,8 +66,8 @@ public:
             formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_DEFAULT);
 
     void UpdateReference( const sc::RefUpdateContext& rCxt );
-    void UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt );
-    void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt );
+    void UpdateInsertTab( const sc::RefUpdateInsertTabContext& rCxt );
+    void UpdateDeleteTab( const sc::RefUpdateDeleteTabContext& rCxt );
     void UpdateMoveTab( const sc::RefUpdateMoveTabContext& rCxt );
 
     const ScTokenArray* GetFormula() const;
diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx
index c9c55e85b92e..60dfd3edf1d6 100644
--- a/sc/inc/column.hxx
+++ b/sc/inc/column.hxx
@@ -323,7 +323,7 @@ public:
 
     bool SetString(
         SCROW nRow, SCTAB nTab, const OUString& rString, formula::FormulaGrammar::AddressConvention eConv,
-        ScSetStringParam* pParam = nullptr );
+        const ScSetStringParam* pParam = nullptr );
 
     void SetEditText( SCROW nRow, EditTextObject* pEditText );
     void SetEditText( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, EditTextObject* pEditText );
diff --git a/sc/inc/compare.hxx b/sc/inc/compare.hxx
index d67ba0027112..bdd86c1cdf54 100644
--- a/sc/inc/compare.hxx
+++ b/sc/inc/compare.hxx
@@ -69,7 +69,7 @@ private:
         rComp.mbIgnoreCase.
  */
 double CompareFunc( const Compare& rComp, CompareOptions* pOptions = nullptr );
-double CompareFunc( const Compare::Cell& rCell1, double fCell2, CompareOptions* pOptions );
+double CompareFunc( const Compare::Cell& rCell1, double fCell2, const CompareOptions* pOptions );
 double CompareFunc( double fCell1, double fCell2 );
 
 /**
diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx
index a0f8048f82ce..97274c1d659b 100644
--- a/sc/inc/dptabres.hxx
+++ b/sc/inc/dptabres.hxx
@@ -520,7 +520,7 @@ private:
 
     ScDPResultMember*        FindMember(   SCROW  iData ) const;
     ScDPResultMember*        AddMember( const ScDPParentDimData& aData );
-    ScDPResultMember*        InsertMember( ScDPParentDimData* pMemberData );
+    ScDPResultMember*        InsertMember( const ScDPParentDimData* pMemberData );
     void                                  InitWithMembers( LateInitParams& rParams,
                                                             const ::std::vector< SCROW >& pItemData,
                                                             size_t  nPos,
diff --git a/sc/inc/dputil.hxx b/sc/inc/dputil.hxx
index aec2b19e9c10..3f44ba57e296 100644
--- a/sc/inc/dputil.hxx
+++ b/sc/inc/dputil.hxx
@@ -47,7 +47,7 @@ public:
 
     static sal_Int32 getDatePartValue(
         double fValue, const ScDPNumGroupInfo* pInfo, sal_Int32 nDatePart,
-        SvNumberFormatter* pFormatter);
+        const SvNumberFormatter* pFormatter);
 
     static OUString getDisplayedMeasureName(const OUString& rName, ScSubTotalFunc eFunc);
 
diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx
index 8f0a1aa25132..3da85abe939a 100644
--- a/sc/inc/drwlayer.hxx
+++ b/sc/inc/drwlayer.hxx
@@ -201,7 +201,7 @@ public:
     // Image-Map
     static ScIMapInfo* GetIMapInfo( const SdrObject* pObj );
 
-    static IMapObject* GetHitIMapObject( SdrObject* pObject,
+    static IMapObject* GetHitIMapObject( const SdrObject* pObject,
                             const Point& rWinPoint, const vcl::Window& rCmpWnd );
 
     static ScMacroInfo* GetMacroInfo( SdrObject* pObj, bool bCreate = false );
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index e75416de8e56..cdb67a3e27fc 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -283,9 +283,9 @@ public:
 
     void            UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
 
-    void            UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt );
+    void            UpdateInsertTab( const sc::RefUpdateInsertTabContext& rCxt );
     void            UpdateInsertTabAbs(SCTAB nTable);
-    void            UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt );
+    void            UpdateDeleteTab( const sc::RefUpdateDeleteTabContext& rCxt );
     void            UpdateMoveTab( const sc::RefUpdateMoveTabContext& rCxt, SCTAB nTabNo );
     bool            TestTabRefAbs(SCTAB nTable);
     void            UpdateCompile( bool bForceIfNameInUse );
diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx
index 927b77bc5ffd..071497e75323 100644
--- a/sc/inc/tokenarray.hxx
+++ b/sc/inc/tokenarray.hxx
@@ -207,9 +207,9 @@ public:
      *
      * @return true if at least one reference has changed its sheet reference.
      */
-    sc::RefUpdateResult AdjustReferenceOnDeletedTab( sc::RefUpdateDeleteTabContext& rCxt, const ScAddress& rOldPos );
+    sc::RefUpdateResult AdjustReferenceOnDeletedTab( const sc::RefUpdateDeleteTabContext& rCxt, const ScAddress& rOldPos );
 
-    sc::RefUpdateResult AdjustReferenceOnInsertedTab( sc::RefUpdateInsertTabContext& rCxt, const ScAddress& rOldPos );
+    sc::RefUpdateResult AdjustReferenceOnInsertedTab( const sc::RefUpdateInsertTabContext& rCxt, const ScAddress& rOldPos );
 
     sc::RefUpdateResult AdjustReferenceOnMovedTab( const sc::RefUpdateMoveTabContext& rCxt, const ScAddress& rOldPos );
 
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index df484f328c58..ac582ec49905 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -241,7 +241,7 @@ void ScColorScaleEntry::UpdateReference( const sc::RefUpdateContext& rCxt )
     SetRepaintCallback(mpFormat);
 }
 
-void ScColorScaleEntry::UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt )
+void ScColorScaleEntry::UpdateInsertTab( const sc::RefUpdateInsertTabContext& rCxt )
 {
     if (!mpCell)
         return;
@@ -251,7 +251,7 @@ void ScColorScaleEntry::UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt )
     SetRepaintCallback(mpFormat);
 }
 
-void ScColorScaleEntry::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt )
+void ScColorScaleEntry::UpdateDeleteTab( const sc::RefUpdateDeleteTabContext& rCxt )
 {
     if (!mpCell)
         return;
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 397fe3310087..178793b5cf69 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -1850,7 +1850,7 @@ bool ScColumn::ParseString(
  */
 bool ScColumn::SetString( SCROW nRow, SCTAB nTabP, const OUString& rString,
                           formula::FormulaGrammar::AddressConvention eConv,
-                          ScSetStringParam* pParam )
+                          const ScSetStringParam* pParam )
 {
     if (!ValidRow(nRow))
         return false;
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx
index 1775600af7c9..9c368ab62364 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -282,7 +282,7 @@ inline bool isInteger(double fValue)
 
 void fillDateGroupDimension(
     ScDPCache& rCache, ScDPNumGroupInfo& rDateInfo, long nSourceDim, long nGroupDim,
-    sal_Int32 nDatePart, SvNumberFormatter* pFormatter)
+    sal_Int32 nDatePart, const SvNumberFormatter* pFormatter)
 {
     // Auto min/max is only used for "Years" part, but the loop is always
     // needed.
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 2389e3d91dd0..e7bae87f6fc1 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -3981,7 +3981,7 @@ ScDPResultMember* ScDPResultDimension::AddMember(const ScDPParentDimData &aData
     return pMember;
 }
 
-ScDPResultMember* ScDPResultDimension::InsertMember(ScDPParentDimData *pMemberData)
+ScDPResultMember* ScDPResultDimension::InsertMember(const ScDPParentDimData *pMemberData)
 {
     SCROW  nInsert = 0;
     if ( !lcl_SearchMember( maMemberArray, pMemberData->mnOrder , nInsert ) )
diff --git a/sc/source/core/data/dputil.cxx b/sc/source/core/data/dputil.cxx
index 41694403ec2b..ed8d097b08f3 100644
--- a/sc/source/core/data/dputil.cxx
+++ b/sc/source/core/data/dputil.cxx
@@ -293,7 +293,7 @@ OUString ScDPUtil::getNumGroupName(
 
 sal_Int32 ScDPUtil::getDatePartValue(
     double fValue, const ScDPNumGroupInfo* pInfo, sal_Int32 nDatePart,
-    SvNumberFormatter* pFormatter)
+    const SvNumberFormatter* pFormatter)
 {
     // Start and end are inclusive
     // (End date without a time value is included, with a time value it's not)
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 2b0d6e6f867d..f4b94965aa97 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -2057,7 +2057,7 @@ ScIMapInfo* ScDrawLayer::GetIMapInfo( const SdrObject* pObj )
     return static_cast<ScIMapInfo*>(GetFirstUserDataOfType(pObj, SC_UD_IMAPDATA));
 }
 
-IMapObject* ScDrawLayer::GetHitIMapObject( SdrObject* pObj,
+IMapObject* ScDrawLayer::GetHitIMapObject( const SdrObject* pObj,
                                           const Point& rWinPoint, const vcl::Window& rCmpWnd )
 {
     const MapMode       aMap100( MapUnit::Map100thMM );
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 2f541d8514c7..955be80b4c59 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -3445,7 +3445,7 @@ bool ScFormulaCell::UpdateReference(
     return false;
 }
 
-void ScFormulaCell::UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt )
+void ScFormulaCell::UpdateInsertTab( const sc::RefUpdateInsertTabContext& rCxt )
 {
     // Adjust tokens only when it's not grouped or grouped top cell.
     bool bAdjustCode = !mxGroup || mxGroup->mpTopCell == this;
@@ -3475,7 +3475,7 @@ void ScFormulaCell::UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt )
     // no StartListeningTo because the new sheets have not been inserted yet.
 }
 
-void ScFormulaCell::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt )
+void ScFormulaCell::UpdateDeleteTab( const sc::RefUpdateDeleteTabContext& rCxt )
 {
     // Adjust tokens only when it's not grouped or grouped top cell.
     bool bAdjustCode = !mxGroup || mxGroup->mpTopCell == this;
@@ -4376,7 +4376,7 @@ bool ScFormulaCell::InterpretFormulaGroup()
             SCROW mnLength;
 
         public:
-            Executor(std::shared_ptr<comphelper::ThreadTaskTag>& rTag,
+            Executor(const std::shared_ptr<comphelper::ThreadTaskTag>& rTag,
                      unsigned nThisThread,
                      unsigned nThreadsTotal,
                      ScDocument* pDocument2,
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 371cf8c2347f..0153760e846d 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -104,7 +104,7 @@ namespace
     }
 
     /// Write an AutoFormatSwBlob to stream.
-    SvStream& WriteAutoFormatSwBlob(SvStream &stream, AutoFormatSwBlob &blob)
+    SvStream& WriteAutoFormatSwBlob(SvStream &stream, const AutoFormatSwBlob &blob)
     {
         const sal_uInt64 endOfBlob = stream.Tell() + sizeof(sal_uInt64) + blob.size;
         stream.WriteUInt64( endOfBlob );
diff --git a/sc/source/core/tool/compare.cxx b/sc/source/core/tool/compare.cxx
index 9075cb8ade15..c85b85f41295 100644
--- a/sc/source/core/tool/compare.cxx
+++ b/sc/source/core/tool/compare.cxx
@@ -222,7 +222,7 @@ double CompareFunc( const Compare& rComp, CompareOptions* pOptions )
     return fRes;
 }
 
-double CompareFunc( const Compare::Cell& rCell1, double fCell2, CompareOptions* pOptions )
+double CompareFunc( const Compare::Cell& rCell1, double fCell2, const CompareOptions* pOptions )
 {
     // Keep DoubleError if encountered
     // #i40539# if bEmpty is set, bVal/nVal are uninitialized
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx
index b8b1ef1a79a8..1c2d3d7ce727 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -334,7 +334,7 @@ bool FormulaGroupInterpreterSoftware::interpret(ScDocument& rDoc, const ScAddres
     class Executor : public comphelper::ThreadTask
     {
     public:
-        Executor(std::shared_ptr<comphelper::ThreadTaskTag>& rTag,
+        Executor(const std::shared_ptr<comphelper::ThreadTaskTag>& rTag,
                  ScTokenArray& rCode2,
                  ScAddress aBatchTopPos,
                  const ScAddress& rTopPos2,
diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index fa87be067f89..2161e916b7f5 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -116,7 +116,7 @@ private:
 public:
     ScETSForecastCalculation( SCSIZE nSize, SvNumberFormatter* pFormatter );
 
-    bool PreprocessDataRange( const ScMatrixRef& rMatX, const ScMatrixRef& rMatY, int& rSmplInPrd,
+    bool PreprocessDataRange( const ScMatrixRef& rMatX, const ScMatrixRef& rMatY, int nSmplInPrd,
                               bool bDataCompletion, int nAggregation, const ScMatrixRef& rTMat,
                               ScETSType eETSType );
     FormulaError GetError() { return mnErrorValue; };
@@ -153,11 +153,11 @@ ScETSForecastCalculation::ScETSForecastCalculation( SCSIZE nSize, SvNumberFormat
     maRange.reserve( mnCount );
 }
 
-bool ScETSForecastCalculation::PreprocessDataRange( const ScMatrixRef& rMatX, const ScMatrixRef& rMatY, int& rSmplInPrd,
+bool ScETSForecastCalculation::PreprocessDataRange( const ScMatrixRef& rMatX, const ScMatrixRef& rMatY, int nSmplInPrd,
                                                     bool bDataCompletion, int nAggregation, const ScMatrixRef& rTMat,
                                                     ScETSType eETSType )
 {
-    bEDS = ( rSmplInPrd == 0 );
+    bEDS = ( nSmplInPrd == 0 );
     bAdditive = ( eETSType == etsAdd || eETSType == etsPIAdd || eETSType == etsStatAdd );
 
     // maRange needs to be sorted by X
@@ -366,8 +366,8 @@ bool ScETSForecastCalculation::PreprocessDataRange( const ScMatrixRef& rMatX, co
         }
     }
 
-    if ( rSmplInPrd != 1 )
-        mnSmplInPrd = rSmplInPrd;
+    if ( nSmplInPrd != 1 )
+        mnSmplInPrd = nSmplInPrd;
     else
     {
          mnSmplInPrd = CalcPeriodLen();
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 55cbb9f1a7fc..c1736c3bbbe9 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -4162,7 +4162,7 @@ bool adjustDoubleRefOnDeleteTab(ScComplexRefData& rRef, SCTAB nDelPos, SCTAB nSh
 
 }
 
-sc::RefUpdateResult ScTokenArray::AdjustReferenceOnDeletedTab( sc::RefUpdateDeleteTabContext& rCxt, const ScAddress& rOldPos )
+sc::RefUpdateResult ScTokenArray::AdjustReferenceOnDeletedTab( const sc::RefUpdateDeleteTabContext& rCxt, const ScAddress& rOldPos )
 {
     sc::RefUpdateResult aRes;
     ScAddress aNewPos = rOldPos;
@@ -4235,7 +4235,7 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceOnDeletedTab( sc::RefUpdateDele
     return aRes;
 }
 
-sc::RefUpdateResult ScTokenArray::AdjustReferenceOnInsertedTab( sc::RefUpdateInsertTabContext& rCxt, const ScAddress& rOldPos )
+sc::RefUpdateResult ScTokenArray::AdjustReferenceOnInsertedTab( const sc::RefUpdateInsertTabContext& rCxt, const ScAddress& rOldPos )
 {
     sc::RefUpdateResult aRes;
     ScAddress aNewPos = rOldPos;
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx
index 40b728f4fe35..a7e88479c4e1 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -185,7 +185,7 @@ namespace {
  * fSerialDateTime - a number representing the number of days since 1900-Jan-0 (integer portion of the number),
  * plus a fractional portion of a 24 hour day (fractional portion of the number).
  */
-OUString GetExcelFormattedDate( double fSerialDateTime, SvNumberFormatter& rFormatter )
+OUString GetExcelFormattedDate( double fSerialDateTime, const SvNumberFormatter& rFormatter )
 {
     //::sax::Converter::convertDateTime(sBuf, (DateTime(rFormatter.GetNullDate()) + fSerialDateTime).GetUNODateTime(), 0, true);
     css::util::DateTime aUDateTime = (DateTime(rFormatter.GetNullDate()) + fSerialDateTime).GetUNODateTime();
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 3ecdcc8de976..33ad390b1c0b 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -294,7 +294,7 @@ const ScHTMLTable* ScHTMLLayoutParser::GetGlobalTable() const
     return nullptr;
 }
 
-void ScHTMLLayoutParser::NewActEntry( ScEEParseEntry* pE )
+void ScHTMLLayoutParser::NewActEntry( const ScEEParseEntry* pE )
 {
     ScEEParser::NewActEntry( pE );
     if ( pE )
@@ -617,7 +617,7 @@ void ScHTMLLayoutParser::Adjust()
     }
 }
 
-sal_uInt16 ScHTMLLayoutParser::GetWidth( ScEEParseEntry* pE )
+sal_uInt16 ScHTMLLayoutParser::GetWidth( const ScEEParseEntry* pE )
 {
     if ( pE->nWidth )
         return pE->nWidth;
diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx
index 46bd7d7de699..17e84a5969d6 100644
--- a/sc/source/filter/inc/htmlpars.hxx
+++ b/sc/source/filter/inc/htmlpars.hxx
@@ -109,7 +109,7 @@ struct ScHTMLTableStackEntry
     sal_uInt16          nColOffset;
     sal_uInt16          nColOffsetStart;
     bool                bFirstRow;
-                        ScHTMLTableStackEntry( std::shared_ptr<ScEEParseEntry>& rE,
+                        ScHTMLTableStackEntry( const std::shared_ptr<ScEEParseEntry>& rE,
                                 const ScRangeListRef& rL, ScHTMLColOffset* pTO,
                                 sal_uLong nFTC,
                                 SCROW nRow,
@@ -175,7 +175,7 @@ private:
     bool                bInTitle:1;
 
     DECL_LINK( HTMLImportHdl, HtmlImportInfo&, void );
-    void                NewActEntry( ScEEParseEntry* );
+    void                NewActEntry( const ScEEParseEntry* );
     static void         EntryEnd( ScEEParseEntry*, const ESelection& );
     void                ProcToken( HtmlImportInfo* );
     void                CloseEntry( const HtmlImportInfo* );
@@ -192,7 +192,7 @@ private:
     static void         ModifyOffset( ScHTMLColOffset*, sal_uInt16& nOldOffset,
                                     sal_uInt16& nNewOffset, sal_uInt16 nOffsetTol );
     void                Colonize( ScEEParseEntry* );
-    sal_uInt16          GetWidth( ScEEParseEntry* );
+    sal_uInt16          GetWidth( const ScEEParseEntry* );
     void                SetWidths();
     void                Adjust();
 
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
index 5f7f3d77e806..ffb75272c9df 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
@@ -388,7 +388,7 @@ void ScChangeTrackingExportHelper::WriteCell(const ScCellValue& rCell, const OUS
     }
 }
 
-void ScChangeTrackingExportHelper::WriteContentChange(ScChangeAction* pAction)
+void ScChangeTrackingExportHelper::WriteContentChange(const ScChangeAction* pAction)
 {
     SvXMLElementExport aElemChange(rExport, XML_NAMESPACE_TABLE, XML_CELL_CONTENT_CHANGE, true, true);
     const ScChangeAction* pConstAction = pAction;
@@ -396,13 +396,13 @@ void ScChangeTrackingExportHelper::WriteContentChange(ScChangeAction* pAction)
     WriteChangeInfo(pAction);
     WriteDependings(pAction);
     {
-        ScChangeActionContent* pPrevAction = static_cast<ScChangeActionContent*>(pAction)->GetPrevContent();
+        const ScChangeActionContent* pPrevAction = static_cast<const ScChangeActionContent*>(pAction)->GetPrevContent();
         if (pPrevAction)
             rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_ID, GetChangeID(pPrevAction->GetActionNumber()));
         SvXMLElementExport aElemPrev(rExport, XML_NAMESPACE_TABLE, XML_PREVIOUS, true, true);
         OUString sValue;
-        static_cast<ScChangeActionContent*>(pAction)->GetOldString(sValue, rExport.GetDocument());
-        WriteCell(static_cast<ScChangeActionContent*>(pAction)->GetOldCell(), sValue);
+        static_cast<const ScChangeActionContent*>(pAction)->GetOldString(sValue, rExport.GetDocument());
+        WriteCell(static_cast<const ScChangeActionContent*>(pAction)->GetOldCell(), sValue);
     }
 }
 
@@ -583,9 +583,9 @@ void ScChangeTrackingExportHelper::WriteDeletion(ScChangeAction* pAction)
     WriteCutOffs(pDelAction);
 }
 
-void ScChangeTrackingExportHelper::WriteMovement(ScChangeAction* pAction)
+void ScChangeTrackingExportHelper::WriteMovement(const ScChangeAction* pAction)
 {
-    const ScChangeActionMove* pMoveAction = static_cast<ScChangeActionMove*> (pAction);
+    const ScChangeActionMove* pMoveAction = static_cast<const ScChangeActionMove*> (pAction);
     SvXMLElementExport aElemChange(rExport, XML_NAMESPACE_TABLE, XML_MOVEMENT, true, true);
     WriteBigRange(pMoveAction->GetFromRange(), XML_SOURCE_RANGE_ADDRESS);
     WriteBigRange(pMoveAction->GetBigRange(), XML_TARGET_RANGE_ADDRESS);
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx
index dd8cf285cc1e..11344abc327d 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx
@@ -65,13 +65,13 @@ class ScChangeTrackingExportHelper
     void WriteFormulaCell(const ScCellValue& rCell, const OUString& sValue);
     void WriteCell(const ScCellValue& rCell, const OUString& sValue);
 
-    void WriteContentChange(ScChangeAction* pAction);
+    void WriteContentChange(const ScChangeAction* pAction);
     void AddInsertionAttributes(const ScChangeAction* pAction);
     void WriteInsertion(const ScChangeAction* pAction);
     void AddDeletionAttributes(const ScChangeActionDel* pAction);
     void WriteCutOffs(const ScChangeActionDel* pAction);
     void WriteDeletion(ScChangeAction* pAction);
-    void WriteMovement(ScChangeAction* pAction);
+    void WriteMovement(const ScChangeAction* pAction);
     void WriteRejection(const ScChangeAction* pAction);
 
     void CollectCellAutoStyles(const ScCellValue& rCell);
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
index e9938fa11bc6..df77e3e6cfe8 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
@@ -439,7 +439,7 @@ void ScXMLChangeTrackingImportHelper::ConvertInfo(const ScMyActionInfo& aInfo, O
         rUser = aInfo.sUser; // shouldn't happen
 }
 
-ScChangeAction* ScXMLChangeTrackingImportHelper::CreateInsertAction(ScMyInsAction* pAction)
+ScChangeAction* ScXMLChangeTrackingImportHelper::CreateInsertAction(const ScMyInsAction* pAction)
 {
     DateTime aDateTime( Date(0), tools::Time(0) );
     OUString aUser;
@@ -452,7 +452,7 @@ ScChangeAction* ScXMLChangeTrackingImportHelper::CreateInsertAction(ScMyInsActio
     return pNewAction;
 }
 
-ScChangeAction* ScXMLChangeTrackingImportHelper::CreateDeleteAction(ScMyDelAction* pAction)
+ScChangeAction* ScXMLChangeTrackingImportHelper::CreateDeleteAction(const ScMyDelAction* pAction)
 {
     DateTime aDateTime( Date(0), tools::Time(0) );
     OUString aUser;
@@ -465,7 +465,7 @@ ScChangeAction* ScXMLChangeTrackingImportHelper::CreateDeleteAction(ScMyDelActio
     return pNewAction;
 }
 
-ScChangeAction* ScXMLChangeTrackingImportHelper::CreateMoveAction(ScMyMoveAction* pAction)
+ScChangeAction* ScXMLChangeTrackingImportHelper::CreateMoveAction(const ScMyMoveAction* pAction)
 {
     OSL_ENSURE(pAction->pMoveRanges, "no move ranges");
     if (pAction->pMoveRanges)
@@ -483,7 +483,7 @@ ScChangeAction* ScXMLChangeTrackingImportHelper::CreateMoveAction(ScMyMoveAction
     return nullptr;
 }
 
-ScChangeAction* ScXMLChangeTrackingImportHelper::CreateRejectionAction(ScMyRejAction* pAction)
+ScChangeAction* ScXMLChangeTrackingImportHelper::CreateRejectionAction(const ScMyRejAction* pAction)
 {
     DateTime aDateTime( Date(0), tools::Time(0) );
     OUString aUser;
@@ -496,7 +496,7 @@ ScChangeAction* ScXMLChangeTrackingImportHelper::CreateRejectionAction(ScMyRejAc
     return pNewAction;
 }
 
-ScChangeAction* ScXMLChangeTrackingImportHelper::CreateContentAction(ScMyContentAction* pAction)
+ScChangeAction* ScXMLChangeTrackingImportHelper::CreateContentAction(const ScMyContentAction* pAction)
 {
     ScCellValue aCell;
     OUString sInputString;
@@ -629,7 +629,7 @@ void ScXMLChangeTrackingImportHelper::SetMovementDependencies(ScMyMoveAction* pA
     }
 }
 
-void ScXMLChangeTrackingImportHelper::SetContentDependencies(ScMyContentAction* pAction, ScChangeActionContent* pActContent)
+void ScXMLChangeTrackingImportHelper::SetContentDependencies(const ScMyContentAction* pAction, ScChangeActionContent* pActContent)
 {
     if (!pAction->nPreviousAction)
         return;
@@ -708,7 +708,7 @@ void ScXMLChangeTrackingImportHelper::SetDependencies(ScMyBaseAction* pAction)
     }
 }
 
-void ScXMLChangeTrackingImportHelper::SetNewCell(ScMyContentAction* pAction)
+void ScXMLChangeTrackingImportHelper::SetNewCell(const ScMyContentAction* pAction)
 {
     ScChangeAction* pChangeAction = pTrack->GetAction(pAction->nActionNumber);
     if (pChangeAction)
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx
index 28b234c9c85c..2fc3cbd070c5 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx
@@ -185,11 +185,11 @@ class ScXMLChangeTrackingImportHelper
 
 private:
     void ConvertInfo(const ScMyActionInfo& aInfo, OUString& rUser, DateTime& aDateTime);
-    ScChangeAction* CreateInsertAction(ScMyInsAction* pAction);
-    ScChangeAction* CreateDeleteAction(ScMyDelAction* pAction);
-    ScChangeAction* CreateMoveAction(ScMyMoveAction* pAction);
-    ScChangeAction* CreateRejectionAction(ScMyRejAction* pAction);
-    ScChangeAction* CreateContentAction(ScMyContentAction* pAction);
+    ScChangeAction* CreateInsertAction(const ScMyInsAction* pAction);
+    ScChangeAction* CreateDeleteAction(const ScMyDelAction* pAction);
+    ScChangeAction* CreateMoveAction(const ScMyMoveAction* pAction);
+    ScChangeAction* CreateRejectionAction(const ScMyRejAction* pAction);
+    ScChangeAction* CreateContentAction(const ScMyContentAction* pAction);
 
     void CreateGeneratedActions(ScMyGeneratedList& rList);
 
@@ -223,10 +223,10 @@ public:
 
     void SetDeletionDependencies(ScMyDelAction* pAction, ScChangeActionDel* pDelAct);
     void SetMovementDependencies(ScMyMoveAction* pAction, ScChangeActionMove* pMoveAct);
-    void SetContentDependencies(ScMyContentAction* pAction, ScChangeActionContent* pActContent);
+    void SetContentDependencies(const ScMyContentAction* pAction, ScChangeActionContent* pActContent);
     void SetDependencies(ScMyBaseAction* pAction);
 
-    void SetNewCell(ScMyContentAction* pAction);
+    void SetNewCell(const ScMyContentAction* pAction);
 
     void CreateChangeTrack(ScDocument* pDoc);
 };
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index dd6b115d4df4..ed299f896ce8 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -572,7 +572,7 @@ void ScRowFormatRanges::AddRange(const sal_Int32 nPrevStartCol, const sal_Int32
     }
 }
 
-void ScRowFormatRanges::AddRange(ScMyRowFormatRange& rFormatRange)
+void ScRowFormatRanges::AddRange(const ScMyRowFormatRange& rFormatRange)
 {
     OSL_ENSURE(pColDefaults, "no column defaults");
     if (!pColDefaults)
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.hxx b/sc/source/filter/xml/XMLStylesExportHelper.hxx
index 46e51dffb8b9..6012a5b7e324 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.hxx
@@ -151,7 +151,7 @@ public:
 
     void SetColDefaults(const ScMyDefaultStyleList* pDefaults) { pColDefaults = pDefaults; }
     void Clear();
-    void AddRange(ScMyRowFormatRange& rFormatRange);
+    void AddRange(const ScMyRowFormatRange& rFormatRange);
     bool GetNext(ScMyRowFormatRange& rFormatRange);
     sal_Int32 GetMaxRows() const;
     sal_Int32 GetSize() const { return nSize;}
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index dd39f53522d8..6921f0b353ea 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -470,7 +470,7 @@ void ScDocShell::RefreshPivotTables( const ScRange& rSource )
     }
 }
 
-static OUString lcl_GetAreaName( ScDocument* pDoc, ScArea* pArea )
+static OUString lcl_GetAreaName( ScDocument* pDoc, const ScArea* pArea )
 {
     ScDBData* pData = pDoc->GetDBAtArea( pArea->nTab, pArea->nColStart, pArea->nRowStart,
                                                         pArea->nColEnd, pArea->nRowEnd );
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index a59b3937264b..f23dabae3de0 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -210,7 +210,7 @@ private:
 
     bool            GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
                                     SCCOL& rOverX, SCROW& rOverY, bool bVisRowChanged );
-    bool IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY );
+    bool IsEmptyCellText( const RowInfo* pThisRowInfo, SCCOL nX, SCROW nY );
     void GetVisibleCell( SCCOL nCol, SCROW nRow, SCTAB nTab, ScRefCellValue& rCell );
 
     bool IsAvailable( SCCOL nX, SCROW nY );
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index c8bc5ac351a8..510d5ec0da7d 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1143,7 +1143,7 @@ public:
 };
 
 bool
-ScVbaRange::getCellRangesForAddress( ScRefFlags& rResFlags, const OUString& sAddress, ScDocShell* pDocSh, ScRangeList& rCellRanges, formula::FormulaGrammar::AddressConvention& eConv, char cDelimiter )
+ScVbaRange::getCellRangesForAddress( ScRefFlags& rResFlags, const OUString& sAddress, ScDocShell* pDocSh, ScRangeList& rCellRanges, formula::FormulaGrammar::AddressConvention eConv, char cDelimiter )
 {
 
     if ( pDocSh )
diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx
index 2cf745c82759..ea8bf703d10e 100644
--- a/sc/source/ui/vba/vbarange.hxx
+++ b/sc/source/ui/vba/vbarange.hxx
@@ -308,7 +308,7 @@ public:
 //     * we shouldn't need hacks like this below
     /// @throws css::uno::RuntimeException
     static css::uno::Reference< ov::excel::XRange > ApplicationRange( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 );
-    static bool getCellRangesForAddress(ScRefFlags &rResFlags, const OUString& sAddress, ScDocShell* pDocSh, ScRangeList& rCellRanges, formula::FormulaGrammar::AddressConvention& eConv, char cDelimiter );
+    static bool getCellRangesForAddress(ScRefFlags &rResFlags, const OUString& sAddress, ScDocShell* pDocSh, ScRangeList& rCellRanges, formula::FormulaGrammar::AddressConvention eConv, char cDelimiter );
     virtual sal_Bool SAL_CALL GoalSeek( const css::uno::Any& Goal, const css::uno::Reference< ov::excel::XRange >& ChangingCell ) override;
     virtual css::uno::Reference< ov::excel::XRange > SAL_CALL SpecialCells( const css::uno::Any& _oType, const css::uno::Any& _oValue) override;
     // XErrorQuery
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index bd654de87e95..3f81e5385d9c 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -130,7 +130,7 @@ static bool lcl_GetTextToColumnsRange( const ScViewData* pData, ScRange& rRange,
     return bRet;
 }
 
-static bool lcl_GetSortParam( const ScViewData* pData, ScSortParam& rSortParam )
+static bool lcl_GetSortParam( const ScViewData* pData, const ScSortParam& rSortParam )
 {
     ScTabViewShell* pTabViewShell   = pData->GetViewShell();
     ScDBData*   pDBData             = pTabViewShell->GetDBData();
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index d19d5a4c5abc..df026bf60549 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -370,12 +370,12 @@ static void lcl_UnLockComment( ScDrawView* pView, const Point& rPos, const ScVie
 }
 
 static bool lcl_GetHyperlinkCell(
-    ScDocument* pDoc, SCCOL& rPosX, SCROW& rPosY, SCTAB nTab, ScRefCellValue& rCell, OUString& rURL )
+    ScDocument* pDoc, SCCOL& rPosX, SCROW nPosY, SCTAB nTab, ScRefCellValue& rCell, OUString& rURL )
 {
     bool bFound = false;
     do
     {
-        ScAddress aPos(rPosX, rPosY, nTab);
+        ScAddress aPos(rPosX, nPosY, nTab);
         rCell.assign(*pDoc, aPos);
         if (rCell.isEmpty())
         {
diff --git a/sc/source/ui/view/gridwin_dbgutil.cxx b/sc/source/ui/view/gridwin_dbgutil.cxx
index c8285ae40a17..e6cd83a73a84 100644
--- a/sc/source/ui/view/gridwin_dbgutil.cxx
+++ b/sc/source/ui/view/gridwin_dbgutil.cxx
@@ -27,7 +27,7 @@ std::ostream& operator<<(std::ostream& rStrm, const ScAddress& rAddr)
     return rStrm;
 }
 
-void dumpScDrawObjData(const ScGridWindow& rWindow, ScDrawObjData& rData, MapUnit eMapUnit)
+void dumpScDrawObjData(const ScGridWindow& rWindow, const ScDrawObjData& rData, MapUnit eMapUnit)
 {
     const Point& rStartOffset = rData.maStartOffset;
     Point aStartOffsetPixel = rWindow.LogicToPixel(rStartOffset, MapMode(eMapUnit));
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 8195ad00fab6..effa25a89b13 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -981,79 +981,79 @@ bool ScOutputData::GetMergeOrigin( SCCOL nX, SCROW nY, SCSIZE nArrY,
     return true;
 }
 
-inline bool StringDiffer( const ScPatternAttr*& rpOldPattern, const ScPatternAttr*& rpNewPattern )
+inline bool StringDiffer( const ScPatternAttr*& rpOldPattern, const ScPatternAttr* pNewPattern )
 {
-    OSL_ENSURE( rpNewPattern, "pNewPattern" );
+    OSL_ENSURE( pNewPattern, "pNewPattern" );
 
-    if ( rpNewPattern == rpOldPattern )
+    if ( pNewPattern == rpOldPattern )
         return false;
     else if ( !rpOldPattern )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_FONT ) != &rpOldPattern->GetItem( ATTR_FONT ) )
+    else if ( &pNewPattern->GetItem( ATTR_FONT ) != &rpOldPattern->GetItem( ATTR_FONT ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_CJK_FONT ) != &rpOldPattern->GetItem( ATTR_CJK_FONT ) )
+    else if ( &pNewPattern->GetItem( ATTR_CJK_FONT ) != &rpOldPattern->GetItem( ATTR_CJK_FONT ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_CTL_FONT ) != &rpOldPattern->GetItem( ATTR_CTL_FONT ) )
+    else if ( &pNewPattern->GetItem( ATTR_CTL_FONT ) != &rpOldPattern->GetItem( ATTR_CTL_FONT ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_FONT_HEIGHT ) != &rpOldPattern->GetItem( ATTR_FONT_HEIGHT ) )
+    else if ( &pNewPattern->GetItem( ATTR_FONT_HEIGHT ) != &rpOldPattern->GetItem( ATTR_FONT_HEIGHT ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_CJK_FONT_HEIGHT ) != &rpOldPattern->GetItem( ATTR_CJK_FONT_HEIGHT ) )
+    else if ( &pNewPattern->GetItem( ATTR_CJK_FONT_HEIGHT ) != &rpOldPattern->GetItem( ATTR_CJK_FONT_HEIGHT ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_CTL_FONT_HEIGHT ) != &rpOldPattern->GetItem( ATTR_CTL_FONT_HEIGHT ) )
+    else if ( &pNewPattern->GetItem( ATTR_CTL_FONT_HEIGHT ) != &rpOldPattern->GetItem( ATTR_CTL_FONT_HEIGHT ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_FONT_WEIGHT ) != &rpOldPattern->GetItem( ATTR_FONT_WEIGHT ) )
+    else if ( &pNewPattern->GetItem( ATTR_FONT_WEIGHT ) != &rpOldPattern->GetItem( ATTR_FONT_WEIGHT ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_CJK_FONT_WEIGHT ) != &rpOldPattern->GetItem( ATTR_CJK_FONT_WEIGHT ) )
+    else if ( &pNewPattern->GetItem( ATTR_CJK_FONT_WEIGHT ) != &rpOldPattern->GetItem( ATTR_CJK_FONT_WEIGHT ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_CTL_FONT_WEIGHT ) != &rpOldPattern->GetItem( ATTR_CTL_FONT_WEIGHT ) )
+    else if ( &pNewPattern->GetItem( ATTR_CTL_FONT_WEIGHT ) != &rpOldPattern->GetItem( ATTR_CTL_FONT_WEIGHT ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_FONT_POSTURE ) != &rpOldPattern->GetItem( ATTR_FONT_POSTURE ) )
+    else if ( &pNewPattern->GetItem( ATTR_FONT_POSTURE ) != &rpOldPattern->GetItem( ATTR_FONT_POSTURE ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_CJK_FONT_POSTURE ) != &rpOldPattern->GetItem( ATTR_CJK_FONT_POSTURE ) )
+    else if ( &pNewPattern->GetItem( ATTR_CJK_FONT_POSTURE ) != &rpOldPattern->GetItem( ATTR_CJK_FONT_POSTURE ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_CTL_FONT_POSTURE ) != &rpOldPattern->GetItem( ATTR_CTL_FONT_POSTURE ) )
+    else if ( &pNewPattern->GetItem( ATTR_CTL_FONT_POSTURE ) != &rpOldPattern->GetItem( ATTR_CTL_FONT_POSTURE ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_FONT_UNDERLINE ) != &rpOldPattern->GetItem( ATTR_FONT_UNDERLINE ) )
+    else if ( &pNewPattern->GetItem( ATTR_FONT_UNDERLINE ) != &rpOldPattern->GetItem( ATTR_FONT_UNDERLINE ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_FONT_OVERLINE ) != &rpOldPattern->GetItem( ATTR_FONT_OVERLINE ) )
+    else if ( &pNewPattern->GetItem( ATTR_FONT_OVERLINE ) != &rpOldPattern->GetItem( ATTR_FONT_OVERLINE ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_FONT_WORDLINE ) != &rpOldPattern->GetItem( ATTR_FONT_WORDLINE ) )
+    else if ( &pNewPattern->GetItem( ATTR_FONT_WORDLINE ) != &rpOldPattern->GetItem( ATTR_FONT_WORDLINE ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_FONT_CROSSEDOUT ) != &rpOldPattern->GetItem( ATTR_FONT_CROSSEDOUT ) )
+    else if ( &pNewPattern->GetItem( ATTR_FONT_CROSSEDOUT ) != &rpOldPattern->GetItem( ATTR_FONT_CROSSEDOUT ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_FONT_CONTOUR ) != &rpOldPattern->GetItem( ATTR_FONT_CONTOUR ) )
+    else if ( &pNewPattern->GetItem( ATTR_FONT_CONTOUR ) != &rpOldPattern->GetItem( ATTR_FONT_CONTOUR ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_FONT_SHADOWED ) != &rpOldPattern->GetItem( ATTR_FONT_SHADOWED ) )
+    else if ( &pNewPattern->GetItem( ATTR_FONT_SHADOWED ) != &rpOldPattern->GetItem( ATTR_FONT_SHADOWED ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_FONT_COLOR ) != &rpOldPattern->GetItem( ATTR_FONT_COLOR ) )
+    else if ( &pNewPattern->GetItem( ATTR_FONT_COLOR ) != &rpOldPattern->GetItem( ATTR_FONT_COLOR ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_HOR_JUSTIFY ) != &rpOldPattern->GetItem( ATTR_HOR_JUSTIFY ) )
+    else if ( &pNewPattern->GetItem( ATTR_HOR_JUSTIFY ) != &rpOldPattern->GetItem( ATTR_HOR_JUSTIFY ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_HOR_JUSTIFY_METHOD ) != &rpOldPattern->GetItem( ATTR_HOR_JUSTIFY_METHOD ) )
+    else if ( &pNewPattern->GetItem( ATTR_HOR_JUSTIFY_METHOD ) != &rpOldPattern->GetItem( ATTR_HOR_JUSTIFY_METHOD ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_VER_JUSTIFY ) != &rpOldPattern->GetItem( ATTR_VER_JUSTIFY ) )
+    else if ( &pNewPattern->GetItem( ATTR_VER_JUSTIFY ) != &rpOldPattern->GetItem( ATTR_VER_JUSTIFY ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_VER_JUSTIFY_METHOD ) != &rpOldPattern->GetItem( ATTR_VER_JUSTIFY_METHOD ) )
+    else if ( &pNewPattern->GetItem( ATTR_VER_JUSTIFY_METHOD ) != &rpOldPattern->GetItem( ATTR_VER_JUSTIFY_METHOD ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_STACKED ) != &rpOldPattern->GetItem( ATTR_STACKED ) )
+    else if ( &pNewPattern->GetItem( ATTR_STACKED ) != &rpOldPattern->GetItem( ATTR_STACKED ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_LINEBREAK ) != &rpOldPattern->GetItem( ATTR_LINEBREAK ) )
+    else if ( &pNewPattern->GetItem( ATTR_LINEBREAK ) != &rpOldPattern->GetItem( ATTR_LINEBREAK ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_MARGIN ) != &rpOldPattern->GetItem( ATTR_MARGIN ) )
+    else if ( &pNewPattern->GetItem( ATTR_MARGIN ) != &rpOldPattern->GetItem( ATTR_MARGIN ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_ROTATE_VALUE ) != &rpOldPattern->GetItem( ATTR_ROTATE_VALUE ) )
+    else if ( &pNewPattern->GetItem( ATTR_ROTATE_VALUE ) != &rpOldPattern->GetItem( ATTR_ROTATE_VALUE ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_FORBIDDEN_RULES ) != &rpOldPattern->GetItem( ATTR_FORBIDDEN_RULES ) )
+    else if ( &pNewPattern->GetItem( ATTR_FORBIDDEN_RULES ) != &rpOldPattern->GetItem( ATTR_FORBIDDEN_RULES ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_FONT_EMPHASISMARK ) != &rpOldPattern->GetItem( ATTR_FONT_EMPHASISMARK ) )
+    else if ( &pNewPattern->GetItem( ATTR_FONT_EMPHASISMARK ) != &rpOldPattern->GetItem( ATTR_FONT_EMPHASISMARK ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_FONT_RELIEF ) != &rpOldPattern->GetItem( ATTR_FONT_RELIEF ) )
+    else if ( &pNewPattern->GetItem( ATTR_FONT_RELIEF ) != &rpOldPattern->GetItem( ATTR_FONT_RELIEF ) )
         return true;
-    else if ( &rpNewPattern->GetItem( ATTR_BACKGROUND ) != &rpOldPattern->GetItem( ATTR_BACKGROUND ) )
+    else if ( &pNewPattern->GetItem( ATTR_BACKGROUND ) != &rpOldPattern->GetItem( ATTR_BACKGROUND ) )
         return true;    // needed with automatic text color
     else
     {
-        rpOldPattern = rpNewPattern;
+        rpOldPattern = pNewPattern;
         return false;
     }
 }
@@ -1075,7 +1075,7 @@ inline bool IsAmbiguousScript( SvtScriptType nScript )
              nScript != SvtScriptType::COMPLEX );
 }
 
-bool ScOutputData::IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY )
+bool ScOutputData::IsEmptyCellText( const RowInfo* pThisRowInfo, SCCOL nX, SCROW nY )
 {
     // pThisRowInfo may be NULL
 
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 8a7bb28adec9..c4c0d419f9c4 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -78,7 +78,7 @@ namespace
     Class::Class( vcl::Window*               pParentP,                   \
                     sal_uInt16              nId,                        \
                     SfxBindings*        p,                          \
-                    SfxChildWinInfo*    pInfo )                     \
+                    SfxChildWinInfo*  pInfo )                     \
         : SfxChildWindow(pParentP, nId)                             \
     {                                                               \
         /************************************************************************************/\
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 8f05c7b90727..30a3f95b153e 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -203,7 +203,7 @@ void MergePageBackgroundFilling(SdPage *pPage, SdStyleSheet *pStyleSheet, bool b
     }
 }
 
-const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
+const SfxItemSet* FuPage::ExecuteDialog( vcl::Window const * pParent )
 {
     if (!mpDrawViewShell)
         return nullptr;
diff --git a/sd/source/ui/inc/fupage.hxx b/sd/source/ui/inc/fupage.hxx
index 03721ea41e2e..b1912e3576fa 100644
--- a/sd/source/ui/inc/fupage.hxx
+++ b/sd/source/ui/inc/fupage.hxx
@@ -41,7 +41,7 @@ class FuPage
     virtual void Activate() override;
     virtual void Deactivate() override;
 
-    const SfxItemSet* ExecuteDialog( vcl::Window* pParent );
+    const SfxItemSet* ExecuteDialog( vcl::Window const * pParent );
 
 protected:
     virtual ~FuPage() override;
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index fa763df01918..85647b6a3c22 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -337,8 +337,8 @@ void writePng_( OutputBuffer&     o_rOutputBuf,
                 Stream*           str,
                 int               width,
                 int               height,
-                GfxRGB&           zeroColor,
-                GfxRGB&           oneColor,
+                GfxRGB const &    zeroColor,
+                GfxRGB const &    oneColor,
                 bool              bIsMask,
                 bool              bWithLinefeed )
 {
diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
index 3caed120648e..08ff1958ad63 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
@@ -177,8 +177,8 @@ void PngHelper::createPng( OutputBuffer&     o_rOutputBuf,
                            Stream*           str,
                            int               width,
                            int               height,
-                           GfxRGB&           zeroColor,
-                           GfxRGB&           oneColor,
+                           GfxRGB const &    zeroColor,
+                           GfxRGB const &    oneColor,
                            bool              bIsMask
                            )
 {
diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx
index e26de3774bff..865428d4da03 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx
@@ -59,8 +59,8 @@ namespace pdfi
                                Stream*           str,
                                int               width,
                                int               height,
-                               GfxRGB&           zeroColor,
-                               GfxRGB&           oneColor,
+                               GfxRGB const &    zeroColor,
+                               GfxRGB const &    oneColor,
                                bool              bIsMask
                                );
         static void createPng( OutputBuffer& o_rOutputBuf,
diff --git a/soltools/cpp/_tokens.c b/soltools/cpp/_tokens.c
index 4c73421b92da..c099f7ae1f89 100644
--- a/soltools/cpp/_tokens.c
+++ b/soltools/cpp/_tokens.c
@@ -67,7 +67,7 @@ static unsigned char toLatin1[256] =
 #define MASK    "\\x%x"
 
 int
-    memcpy_EBCDIC( char * pwbuf, uchar *p, int len )
+    memcpy_EBCDIC( char * pwbuf, uchar const *p, int len )
 {
     int currpos = 0;
     int processedchars = 0;
@@ -266,7 +266,7 @@ void
  * make sure there is WS before trp->tp, if tokens might merge in the output
  */
 void
-    makespace(Tokenrow * trp, Token * ntp)
+    makespace(Tokenrow * trp, Token const * ntp)
 {
     uchar *tt;
     Token *tp = trp->tp;
diff --git a/soltools/cpp/cpp.h b/soltools/cpp/cpp.h
index 36b867679d15..64c37ad07899 100644
--- a/soltools/cpp/cpp.h
+++ b/soltools/cpp/cpp.h
@@ -218,7 +218,7 @@ void genline(void);
 void genimport(char const *, int, char const *, int);
 void genwrap(int);
 void setempty(Tokenrow *);
-void makespace(Tokenrow *, Token *);
+void makespace(Tokenrow *, Token const *);
 char *outnum(char *, int);
 int digit(int);
 uchar *newstring(uchar const *, size_t, size_t);
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index efd6c4861f4e..cb4432f61d86 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1245,7 +1245,7 @@ void SvxFontNameBox_Impl::Select()
 }
 
 SvxColorWindow::SvxColorWindow(const OUString&            rCommand,
-                               std::shared_ptr<PaletteManager>& rPaletteManager,
+                               std::shared_ptr<PaletteManager> const & rPaletteManager,
                                BorderColorStatus&         rBorderColorStatus,
                                sal_uInt16                 nSlotId,
                                const Reference< XFrame >& rFrame,
diff --git a/test/source/sheet/xmultipleoperation.cxx b/test/source/sheet/xmultipleoperation.cxx
index 5f5f100ea247..e68204861890 100644
--- a/test/source/sheet/xmultipleoperation.cxx
+++ b/test/source/sheet/xmultipleoperation.cxx
@@ -81,7 +81,7 @@ void XMultipleOperation::testSetTableOperation()
                                  xSheet->getCellByPosition(3, 3)->getValue());
 }
 
-void XMultipleOperation::fillCells(uno::Reference<sheet::XSpreadsheet>& xSheet)
+void XMultipleOperation::fillCells(uno::Reference<sheet::XSpreadsheet> const& xSheet)
 {
     for (unsigned int i = 1; i < 5; i++)
     {
diff --git a/vcl/inc/unx/wmadaptor.hxx b/vcl/inc/unx/wmadaptor.hxx
index 506d6617b0e1..6f7f4caaa85c 100644
--- a/vcl/inc/unx/wmadaptor.hxx
+++ b/vcl/inc/unx/wmadaptor.hxx
@@ -293,7 +293,7 @@ public:
      *  _NET_ACTIVE_WINDOW message to the frame. The frame
      *  has to be mapped
      */
-    void activateWindow( X11SalFrame *pFrame, Time nTimestamp );
+    void activateWindow( X11SalFrame const *pFrame, Time nTimestamp );
 };
 
 } // namespace
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index a124cd0e05d6..56e06f691c66 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -2276,7 +2276,7 @@ void WMAdaptor::answerPing( X11SalFrame const * i_pFrame, XClientMessageEvent co
     }
 }
 
-void WMAdaptor::activateWindow( X11SalFrame *pFrame, Time nTimestamp )
+void WMAdaptor::activateWindow( X11SalFrame const *pFrame, Time nTimestamp )
 {
     if (!pFrame->bMapped_)
         return;
diff --git a/writerperfect/source/writer/exp/xmlfmt.cxx b/writerperfect/source/writer/exp/xmlfmt.cxx
index e33f299f5c0e..333ad7751c35 100644
--- a/writerperfect/source/writer/exp/xmlfmt.cxx
+++ b/writerperfect/source/writer/exp/xmlfmt.cxx
@@ -102,7 +102,7 @@ private:
 class XMLFontFaceUriContext : public XMLImportContext
 {
 public:
-    XMLFontFaceUriContext(XMLImport &rImport, XMLFontFaceContext &rFontFace);
+    XMLFontFaceUriContext(XMLImport &rImport, XMLFontFaceContext const &rFontFace);
     void SAL_CALL startElement(const OUString &rName, const css::uno::Reference<css::xml::sax::XAttributeList> &xAttribs) override;
     void SAL_CALL endElement(const OUString &rName) override;
 
@@ -145,7 +145,7 @@ void XMLFontFaceFormatContext::startElement(const OUString &/*rName*/, const css
     }
 }
 
-XMLFontFaceUriContext::XMLFontFaceUriContext(XMLImport &rImport, XMLFontFaceContext &rFontFace)
+XMLFontFaceUriContext::XMLFontFaceUriContext(XMLImport &rImport, XMLFontFaceContext const &rFontFace)
     : XMLImportContext(rImport)
 {
     OString aNameU8 = OUStringToOString(rFontFace.maName, RTL_TEXTENCODING_UTF8);


More information about the Libreoffice-commits mailing list