From fb1d3b580763a333bbbfe115d09e1b5cd8849675 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 11 Oct 2018 10:46:10 +0200 Subject: loplugin:constfields in sc Change-Id: If326175d571d15752efd1b63df45b2bc785f7541 Reviewed-on: https://gerrit.libreoffice.org/61653 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/ui/docshell/autostyl.cxx | 4 ++-- sc/source/ui/docshell/datastream.cxx | 4 ++-- sc/source/ui/docshell/docfunc.cxx | 4 ++-- sc/source/ui/docshell/documentlinkmgr.cxx | 2 +- sc/source/ui/docshell/externalrefmgr.cxx | 10 +++++----- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'sc/source/ui/docshell') diff --git a/sc/source/ui/docshell/autostyl.cxx b/sc/source/ui/docshell/autostyl.cxx index a60ef3f4aaf7..d7db2e4a7d5a 100644 --- a/sc/source/ui/docshell/autostyl.cxx +++ b/sc/source/ui/docshell/autostyl.cxx @@ -33,7 +33,7 @@ namespace { class FindByRange { - ScRange maRange; + ScRange const maRange; public: explicit FindByRange(const ScRange& r) : maRange(r) {} bool operator() (const ScAutoStyleData& rData) const { return rData.aRange == maRange; } @@ -41,7 +41,7 @@ public: class FindByTimeout { - sal_uLong mnTimeout; + sal_uLong const mnTimeout; public: explicit FindByTimeout(sal_uLong n) : mnTimeout(n) {} bool operator() (const ScAutoStyleData& rData) const { return rData.nTimeout >= mnTimeout; } diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx index 698d99e3e55f..bbbed185ef35 100644 --- a/sc/source/ui/docshell/datastream.cxx +++ b/sc/source/ui/docshell/datastream.cxx @@ -54,7 +54,7 @@ double getNow() class CSVHandler { DataStream::Line& mrLine; - size_t mnColCount; + size_t const mnColCount; size_t mnCols; const char* mpLineHead; @@ -96,7 +96,7 @@ namespace datastreams { class ReaderThread : public salhelper::Thread { std::unique_ptr mpStream; - size_t mnColCount; + size_t const mnColCount; bool mbTerminate; osl::Mutex maMtxTerminate; diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 02eb818caaf7..dbc9ce389f37 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -1043,8 +1043,8 @@ void ScDocFunc::NotifyInputHandler( const ScAddress& rPos ) struct ScMyRememberItem { - sal_Int32 nIndex; - SfxItemSet aItemSet; + sal_Int32 const nIndex; + SfxItemSet const aItemSet; ScMyRememberItem(const SfxItemSet& rItemSet, sal_Int32 nTempIndex) : nIndex(nTempIndex), aItemSet(rItemSet) {} diff --git a/sc/source/ui/docshell/documentlinkmgr.cxx b/sc/source/ui/docshell/documentlinkmgr.cxx index 0bdcc03534d0..e38ad8ad94e3 100644 --- a/sc/source/ui/docshell/documentlinkmgr.cxx +++ b/sc/source/ui/docshell/documentlinkmgr.cxx @@ -35,7 +35,7 @@ namespace sc { struct DocumentLinkManagerImpl { - SfxObjectShell* mpShell; + SfxObjectShell* const mpShell; std::unique_ptr> mpDataStream; std::atomic mpLinkManager; diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 94b582556564..6085573db08b 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -97,7 +97,7 @@ public: } private: - OUString maSearchName; + OUString const maSearchName; }; class FindSrcFileByName @@ -128,8 +128,8 @@ public: p->notify(mnFileId, meType); } private: - sal_uInt16 mnFileId; - ScExternalRefManager::LinkUpdateType meType; + sal_uInt16 const mnFileId; + ScExternalRefManager::LinkUpdateType const meType; }; struct UpdateFormulaCell @@ -164,7 +164,7 @@ public: r.second.erase(mpCell); } private: - ScFormulaCell* mpCell; + ScFormulaCell* const mpCell; }; class ConvertFormulaToStatic @@ -2819,7 +2819,7 @@ class RefCacheFiller : public sc::ColumnSpanSet::ColumnAction ScExternalRefCache& mrRefCache; ScExternalRefCache::TableTypeRef mpRefTab; - sal_uInt16 mnFileId; + sal_uInt16 const mnFileId; ScColumn* mpCurCol; sc::ColumnBlockConstPosition maBlockPos; -- cgit