diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-11 10:46:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-15 07:56:12 +0200 |
commit | fb1d3b580763a333bbbfe115d09e1b5cd8849675 (patch) | |
tree | 93cf0598c86ba188f69ab30425ffea856ea9886b /sc/source | |
parent | 40bc840da261fcc5652e5278dc2566b61f990884 (diff) |
loplugin:constfields in sc
Change-Id: If326175d571d15752efd1b63df45b2bc785f7541
Reviewed-on: https://gerrit.libreoffice.org/61653
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source')
281 files changed, 1222 insertions, 1226 deletions
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx index 25088b5a4106..48101b3849e4 100644 --- a/sc/source/core/data/bcaslot.cxx +++ b/sc/source/core/data/bcaslot.cxx @@ -63,10 +63,10 @@ struct ScSlotData { - SCROW nStartRow; // first row of this segment - SCROW nStopRow; // first row of next segment - SCSIZE nSlice; // slice size in this segment - SCSIZE nCumulated; // cumulated slots of previous segments + SCROW const nStartRow; // first row of this segment + SCROW const nStopRow; // first row of next segment + SCSIZE const nSlice; // slice size in this segment + SCSIZE const nCumulated; // cumulated slots of previous segments ScSlotData( SCROW r1, SCROW r2, SCSIZE s, SCSIZE c ) : nStartRow(r1), nStopRow(r2), nSlice(s), nCumulated(c) {} }; diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index 84b107853914..b83caa0af361 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -1322,7 +1322,7 @@ const OUStringLiteral a5Ratings[] = { }; struct ScIconSetBitmapMap { - ScIconSetType eType; + ScIconSetType const eType; const OUStringLiteral* pBitmaps; }; diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index e6987e55dbaf..40afd6974861 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -1248,7 +1248,7 @@ class CopyAsLinkHandler ScColumn& mrDestCol; sc::ColumnBlockPosition maDestPos; sc::ColumnBlockPosition* mpDestPos; - InsertDeleteFlags mnCopyFlags; + InsertDeleteFlags const mnCopyFlags; sc::StartListeningType meListenType; @@ -1384,10 +1384,10 @@ class CopyByCloneHandler sc::ColumnBlockPosition maDestPos; sc::ColumnBlockPosition* mpDestPos; svl::SharedStringPool* mpSharedStringPool; - InsertDeleteFlags mnCopyFlags; + InsertDeleteFlags const mnCopyFlags; sc::StartListeningType meListenType; - ScCloneFlags mnFormulaCellCloneFlags; + ScCloneFlags const mnFormulaCellCloneFlags; void setDefaultAttrToDest(size_t nRow) { @@ -1873,8 +1873,8 @@ void resetColumnPosition(sc::CellStoreType& rCells, SCCOL nCol) class NoteCaptionUpdater { - SCCOL mnCol; - SCTAB mnTab; + SCCOL const mnCol; + SCTAB const mnTab; public: NoteCaptionUpdater( SCCOL nCol, SCTAB nTab ) : mnCol(nCol), mnTab(nTab) {} @@ -2076,7 +2076,7 @@ public: class UpdateRefOnCopy { const sc::RefUpdateContext& mrCxt; - ScDocument* mpUndoDoc; + ScDocument* const mpUndoDoc; bool mbUpdated; public: @@ -2508,9 +2508,9 @@ class UpdateTransHandler { ScColumn& mrColumn; sc::CellStoreType::iterator miPos; - ScRange maSource; - ScAddress maDest; - ScDocument* mpUndoDoc; + ScRange const maSource; + ScAddress const maDest; + ScDocument* const mpUndoDoc; public: UpdateTransHandler(ScColumn& rColumn, const ScRange& rSource, const ScAddress& rDest, ScDocument* pUndoDoc) : mrColumn(rColumn), @@ -2531,9 +2531,9 @@ class UpdateGrowHandler { ScColumn& mrColumn; sc::CellStoreType::iterator miPos; - ScRange maArea; - SCCOL mnGrowX; - SCROW mnGrowY; + ScRange const maArea; + SCCOL const mnGrowX; + SCROW const mnGrowY; public: UpdateGrowHandler(ScColumn& rColumn, const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY) : mrColumn(rColumn), @@ -2555,7 +2555,7 @@ class InsertTabUpdater sc::RefUpdateInsertTabContext& mrCxt; sc::CellTextAttrStoreType& mrTextAttrs; sc::CellTextAttrStoreType::iterator miAttrPos; - SCTAB mnTab; + SCTAB const mnTab; bool mbModified; public: @@ -2588,7 +2588,7 @@ class DeleteTabUpdater sc::RefUpdateDeleteTabContext& mrCxt; sc::CellTextAttrStoreType& mrTextAttrs; sc::CellTextAttrStoreType::iterator miAttrPos; - SCTAB mnTab; + SCTAB const mnTab; bool mbModified; public: DeleteTabUpdater(sc::RefUpdateDeleteTabContext& rCxt, sc::CellTextAttrStoreType& rTextAttrs, SCTAB nTab) : @@ -2619,8 +2619,8 @@ class InsertAbsTabUpdater { sc::CellTextAttrStoreType& mrTextAttrs; sc::CellTextAttrStoreType::iterator miAttrPos; - SCTAB mnTab; - SCTAB mnNewPos; + SCTAB const mnTab; + SCTAB const mnNewPos; bool mbModified; public: InsertAbsTabUpdater(sc::CellTextAttrStoreType& rTextAttrs, SCTAB nTab, SCTAB nNewPos) : @@ -2652,7 +2652,7 @@ class MoveTabUpdater sc::RefUpdateMoveTabContext& mrCxt; sc::CellTextAttrStoreType& mrTextAttrs; sc::CellTextAttrStoreType::iterator miAttrPos; - SCTAB mnTab; + SCTAB const mnTab; bool mbModified; public: MoveTabUpdater(sc::RefUpdateMoveTabContext& rCxt, sc::CellTextAttrStoreType& rTextAttrs, SCTAB nTab) : @@ -2681,7 +2681,7 @@ public: class UpdateCompileHandler { - bool mbForceIfNameInUse:1; + bool const mbForceIfNameInUse:1; public: explicit UpdateCompileHandler(bool bForceIfNameInUse) : mbForceIfNameInUse(bForceIfNameInUse) {} @@ -2694,7 +2694,7 @@ public: class TabNoSetter { - SCTAB mnTab; + SCTAB const mnTab; public: explicit TabNoSetter(SCTAB nTab) : mnTab(nTab) {} @@ -2956,7 +2956,7 @@ class CompileErrorCellsHandler sc::CompileFormulaContext& mrCxt; ScColumn& mrColumn; sc::CellStoreType::iterator miPos; - FormulaError mnErrCode; + FormulaError const mnErrCode; bool mbCompiled; public: CompileErrorCellsHandler( sc::CompileFormulaContext& rCxt, ScColumn& rColumn, FormulaError nErrCode ) : @@ -2996,7 +2996,7 @@ public: class CalcAfterLoadHandler { sc::CompileFormulaContext& mrCxt; - bool mbStartListening; + bool const mbStartListening; public: CalcAfterLoadHandler( sc::CompileFormulaContext& rCxt, bool bStartListening ) : @@ -3023,7 +3023,7 @@ class FindEditCellsHandler { ScColumn& mrColumn; sc::CellTextAttrStoreType::iterator miAttrPos; - sc::CellStoreType::iterator miCellPos; + sc::CellStoreType::iterator const miCellPos; public: explicit FindEditCellsHandler(ScColumn& rCol) : @@ -3384,8 +3384,8 @@ class RemoveEmptyBroadcasterHandler { sc::ColumnSpanSet maSet; ScDocument& mrDoc; - SCCOL mnCol; - SCTAB mnTab; + SCCOL const mnCol; + SCTAB const mnTab; public: RemoveEmptyBroadcasterHandler( ScDocument& rDoc, SCCOL nCol, SCTAB nTab ) : diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index b9852ccc8778..07653661e13a 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -574,7 +574,7 @@ namespace { class MaxStrLenFinder { ScDocument& mrDoc; - sal_uInt32 mnFormat; + sal_uInt32 const mnFormat; OUString maMaxLenStr; sal_Int32 mnMaxLen; @@ -1036,8 +1036,8 @@ class StrEntries protected: struct StrEntry { - SCROW mnRow; - OUString maStr; + SCROW const mnRow; + OUString const maStr; StrEntry(SCROW nRow, const OUString& rStr) : mnRow(nRow), maStr(rStr) {} }; @@ -1121,7 +1121,7 @@ public: class TestTabRefAbsHandler { - SCTAB mnTab; + SCTAB const mnTab; bool mbTestResult; public: explicit TestTabRefAbsHandler(SCTAB nTab) : mnTab(nTab), mbTestResult(false) {} @@ -1767,12 +1767,12 @@ class CopyCellNotesHandler ScColumn& mrDestCol; sc::CellNoteStoreType& mrDestNotes; sc::CellNoteStoreType::iterator miPos; - SCTAB mnSrcTab; - SCCOL mnSrcCol; - SCTAB mnDestTab; - SCCOL mnDestCol; - SCROW mnDestOffset; /// Add this to the source row position to get the destination row. - bool mbCloneCaption; + SCTAB const mnSrcTab; + SCCOL const mnSrcCol; + SCTAB const mnDestTab; + SCCOL const mnDestCol; + SCROW const mnDestOffset; /// Add this to the source row position to get the destination row. + bool const mbCloneCaption; public: CopyCellNotesHandler( const ScColumn& rSrcCol, ScColumn& rDestCol, SCROW nDestOffset, bool bCloneCaption ) : @@ -2137,9 +2137,9 @@ namespace { class ToMatrixHandler { ScMatrix& mrMat; - SCCOL mnMatCol; - SCROW mnTopRow; - ScDocument* mpDoc; + SCCOL const mnMatCol; + SCROW const mnTopRow; + ScDocument* const mpDoc; svl::SharedStringPool& mrStrPool; public: ToMatrixHandler(ScMatrix& rMat, SCCOL nMatCol, SCROW nTopRow, ScDocument* pDoc) : @@ -2230,10 +2230,10 @@ struct CellBucket class FillMatrixHandler { ScMatrix& mrMat; - size_t mnMatCol; - size_t mnTopRow; + size_t const mnMatCol; + size_t const mnTopRow; - ScDocument* mpDoc; + ScDocument* const mpDoc; svl::SharedStringPool& mrPool; svl::SharedStringPool* mpPool; // if matrix is not in the same document diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 350b22912091..5cc446357e69 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -317,7 +317,7 @@ public: class DetachFormulaCellsHandler { - ScDocument* mpDoc; + ScDocument* const mpDoc; sc::EndListeningContext* mpCxt; public: @@ -553,10 +553,10 @@ class DeleteAreaHandler std::vector<ScFormulaCell*> maFormulaCells; sc::SingleColumnSpanSet maDeleteRanges; - bool mbNumeric:1; - bool mbString:1; - bool mbFormula:1; - bool mbDateTime:1; + bool const mbNumeric:1; + bool const mbString:1; + bool const mbFormula:1; + bool const mbDateTime:1; ScColumn& mrCol; public: @@ -809,7 +809,7 @@ class CopyAttrArrayByRange { ScAttrArray& mrDestAttrArray; ScAttrArray& mrSrcAttrArray; - long mnRowOffset; + long const mnRowOffset; public: CopyAttrArrayByRange(ScAttrArray& rDestAttrArray, ScAttrArray& rSrcAttrArray, long nRowOffset) : mrDestAttrArray(rDestAttrArray), mrSrcAttrArray(rSrcAttrArray), mnRowOffset(nRowOffset) {} @@ -826,11 +826,11 @@ class CopyCellsFromClipHandler sc::CopyFromClipContext& mrCxt; ScColumn& mrSrcCol; ScColumn& mrDestCol; - SCTAB mnTab; - SCCOL mnCol; - SCTAB mnSrcTab; - SCCOL mnSrcCol; - long mnRowOffset; + SCTAB const mnTab; + SCCOL const mnCol; + SCTAB const mnSrcTab; + SCCOL const mnSrcCol; + long const mnRowOffset; sc::ColumnBlockPosition maDestBlockPos; sc::ColumnBlockPosition* mpDestBlockPos; // to save it for next iteration. svl::SharedStringPool* mpSharedStringPool; @@ -1092,7 +1092,7 @@ class CopyTextAttrsFromClipHandler { sc::CellTextAttrStoreType& mrAttrs; sc::CellTextAttrStoreType::iterator miPos; - size_t mnDelta; + size_t const mnDelta; public: CopyTextAttrsFromClipHandler( sc::CellTextAttrStoreType& rAttrs, size_t nDelta ) : @@ -1258,10 +1258,10 @@ class MixDataHandler sc::CellStoreType maNewCells; sc::CellStoreType::iterator miNewCellsPos; - size_t mnRowOffset; - ScPasteFunc mnFunction; + size_t const mnRowOffset; + ScPasteFunc const mnFunction; - bool mbSkipEmpty; + bool const mbSkipEmpty; void doFunction( size_t nDestRow, double fVal1, double fVal2 ) { @@ -1636,7 +1636,7 @@ namespace { class StartListenersHandler { sc::StartListeningContext* mpCxt; - bool mbAllListeners; + bool const mbAllListeners; public: StartListenersHandler( sc::StartListeningContext& rCxt, bool bAllListeners ) : @@ -2198,8 +2198,8 @@ class StrCellIterator { typedef std::pair<sc::CellStoreType::const_iterator,size_t> PosType; PosType maPos; - sc::CellStoreType::const_iterator miBeg; - sc::CellStoreType::const_iterator miEnd; + sc::CellStoreType::const_iterator const miBeg; + sc::CellStoreType::const_iterator const miEnd; const ScDocument* mpDoc; public: StrCellIterator(const sc::CellStoreType& rCells, SCROW nStart, const ScDocument* pDoc) : @@ -2393,8 +2393,8 @@ class FormulaToValueHandler { struct Entry { - SCROW mnRow; - ScCellValue maValue; + SCROW const mnRow; + ScCellValue const maValue; Entry(SCROW nRow, double f) : mnRow(nRow), maValue(f) {} Entry(SCROW nRow, const svl::SharedString& rStr) : mnRow(nRow), maValue(rStr) {} @@ -2788,8 +2788,8 @@ class MaxStringLenHandler sal_Int32 mnMaxLen; const ScColumn& mrColumn; SvNumberFormatter* mpFormatter; - rtl_TextEncoding meCharSet; - bool mbOctetEncoding; + rtl_TextEncoding const meCharSet; + bool const mbOctetEncoding; void processCell(size_t nRow, ScRefCellValue& rCell) { diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index 3fac1ea00947..d751131251c8 100644 --- a/sc/source/core/data/column4.cxx +++ b/sc/source/core/data/column4.cxx @@ -655,7 +655,7 @@ public: class NoteCaptionCleaner { - bool mbPreserveData; + bool const mbPreserveData; public: explicit NoteCaptionCleaner( bool bPreserveData ) : mbPreserveData(bPreserveData) {} @@ -717,10 +717,10 @@ namespace { class NoteEntryCollector { std::vector<sc::NoteEntry>& mrNotes; - SCTAB mnTab; - SCCOL mnCol; - SCROW mnStartRow; - SCROW mnEndRow; + SCTAB const mnTab; + SCCOL const mnCol; + SCROW const mnStartRow; + SCROW const mnEndRow; public: NoteEntryCollector( std::vector<sc::NoteEntry>& rNotes, SCTAB nTab, SCCOL nCol, SCROW nStartRow = 0, SCROW nEndRow = MAXROW) : @@ -989,7 +989,7 @@ class ScriptTypeUpdater ScColumn& mrCol; sc::CellTextAttrStoreType& mrTextAttrs; sc::CellTextAttrStoreType::iterator miPosAttr; - ScConditionalFormatList* mpCFList; + ScConditionalFormatList* const mpCFList; SvNumberFormatter* mpFormatter; ScAddress maPos; bool mbUpdated; @@ -1130,8 +1130,8 @@ namespace { class FormulaColPosSetter { - SCCOL mnCol; - bool mbUpdateRefs; + SCCOL const mnCol; + bool const mbUpdateRefs; public: FormulaColPosSetter( SCCOL nCol, bool bUpdateRefs ) : mnCol(nCol), mbUpdateRefs(bUpdateRefs) {} @@ -1170,7 +1170,7 @@ namespace { class RelativeRefBoundChecker { std::vector<SCROW> maBounds; - ScRange maBoundRange; + ScRange const maBoundRange; public: explicit RelativeRefBoundChecker( const ScRange& rBoundRange ) : diff --git a/sc/source/core/data/columnspanset.cxx b/sc/source/core/data/columnspanset.cxx index b9651ce4ef05..c784fce1eecc 100644 --- a/sc/source/core/data/columnspanset.cxx +++ b/sc/source/core/data/columnspanset.cxx @@ -26,7 +26,7 @@ namespace { class ColumnScanner { ColumnSpanSet::ColumnSpansType& mrRanges; - bool mbVal; + bool const mbVal; public: ColumnScanner(ColumnSpanSet::ColumnSpansType& rRanges, bool bVal) : mrRanges(rRanges), mbVal(bVal) {} diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index dfe87dbe8298..db418e330154 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -1267,7 +1267,7 @@ bool ScQueryCellIterator::FindEqualOrSortedLastInRange( SCCOL& nFoundCol, struct BoolResetter { bool& mr; - bool mb; + bool const mb; BoolResetter( bool& r, bool b ) : mr(r), mb(r) { r = b; } ~BoolResetter() { mr = mb; } } aRangeLookupResetter( mpParam->mbRangeLookup, true); diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index d6e19993fd79..83adb2fecd0e 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -109,6 +109,8 @@ using namespace com::sun::star; +const sal_uInt16 ScDocument::nSrcVer = SC_CURRENT_VERSION; + ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) : mpCellStringPool(new svl::SharedStringPool(*ScGlobal::pCharClass)), mpDocLinkMgr(new sc::DocumentLinkManager(pDocShell)), @@ -133,7 +135,6 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) : nMacroInterpretLevel(0), nInterpreterTableOpLevel(0), maInterpreterContext( *this, nullptr ), - nSrcVer( SC_CURRENT_VERSION ), nFormulaTrackCount(0), eHardRecalcState(HardRecalcState::OFF), nVisibleTab( 0 ), diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index c4e20cdddfc0..4fe7bb85ce11 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -479,10 +479,10 @@ class IdleCalcTextWidthScope ScDocument& mrDoc; ScAddress& mrCalcPos; MapMode maOldMapMode; - sal_uInt64 mnStartTime; + sal_uInt64 const mnStartTime; ScStyleSheetPool* mpStylePool; - SfxStyleSearchBits mnOldSearchMask; - SfxStyleFamily meOldFamily; + SfxStyleSearchBits const mnOldSearchMask; + SfxStyleFamily const meOldFamily; bool mbNeedMore; bool mbProgress; diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index ee007742810f..5126ebbf417d 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -1241,8 +1241,8 @@ struct BroadcastRecalcOnRefMoveHandler } private: - sc::AutoCalcSwitch aSwitch; // first for ctor/dtor order, destroy second - ScBulkBroadcast aBulk; // second for ctor/dtor order, destroy first + sc::AutoCalcSwitch const aSwitch; // first for ctor/dtor order, destroy second + ScBulkBroadcast const aBulk; // second for ctor/dtor order, destroy first }; } diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx index e94bf3d3d0d3..c0f255cf0a76 100644 --- a/sc/source/core/data/document10.cxx +++ b/sc/source/core/data/document10.cxx @@ -657,8 +657,8 @@ ScRangeData* copyRangeName( const ScRangeData* pOldRangeData, ScDocument& rNewDo struct SheetIndex { - SCTAB mnSheet; - sal_uInt16 mnIndex; + SCTAB const mnSheet; + sal_uInt16 const mnIndex; SheetIndex( SCTAB nSheet, sal_uInt16 nIndex ) : mnSheet(nSheet < -1 ? -1 : nSheet), mnIndex(nIndex) {} bool operator<( const SheetIndex& r ) const diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx index 8354d29ded68..3c14a4bd5342 100644 --- a/sc/source/core/data/documentimport.cxx +++ b/sc/source/core/data/documentimport.cxx @@ -598,7 +598,7 @@ class CellStoreInitializer { sc::CellTextAttrStoreType maAttrs; sc::CellTextAttrStoreType::iterator miPos; - SvtScriptType mnScriptNumeric; + SvtScriptType const mnScriptNumeric; explicit Impl(const SvtScriptType nScriptNumeric) : maAttrs(MAXROWCOUNT), miPos(maAttrs.begin()), mnScriptNumeric(nScriptNumeric) @@ -606,8 +606,8 @@ class CellStoreInitializer }; ScDocumentImportImpl& mrDocImpl; - SCTAB mnTab; - SCCOL mnCol; + SCTAB const mnTab; + SCCOL const mnCol; public: CellStoreInitializer( ScDocumentImportImpl& rDocImpl, SCTAB nTab, SCCOL nCol ) : diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx index 018a7a36ae9c..9893729b3a0c 100644 --- a/sc/source/core/data/dpdimsave.cxx +++ b/sc/source/core/data/dpdimsave.cxx @@ -563,14 +563,14 @@ namespace { struct ScDPSaveGroupDimNameFunc { - OUString maDimName; + OUString const maDimName; explicit ScDPSaveGroupDimNameFunc( const OUString& rDimName ) : maDimName( rDimName ) {} bool operator()( const ScDPSaveGroupDimension& rGroupDim ) const { return rGroupDim.GetGroupDimName() == maDimName; } }; struct ScDPSaveGroupSourceNameFunc { - OUString maSrcDimName; + OUString const maSrcDimName; explicit ScDPSaveGroupSourceNameFunc( const OUString& rSrcDimName ) : maSrcDimName( rSrcDimName ) {} bool operator()( const ScDPSaveGroupDimension& rGroupDim ) const { return rGroupDim.GetSourceDimName() == maSrcDimName; } }; diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx index 92a6810d968d..b3f48124dfed 100644 --- a/sc/source/core/data/dpgroup.cxx +++ b/sc/source/core/data/dpgroup.cxx @@ -57,8 +57,8 @@ public: virtual bool match(const ScDPItemData &rCellData) const override; virtual std::vector<ScDPItemData> getMatchValues() const override; private: - std::vector<ScDPItemData> maValues; - ScDPNumGroupInfo maNumInfo; + std::vector<ScDPItemData> const maValues; + ScDPNumGroupInfo const maNumInfo; }; ScDPGroupNumFilter::ScDPGroupNumFilter(const std::vector<ScDPItemData>& rValues, const ScDPNumGroupInfo& rInfo) : @@ -116,9 +116,9 @@ public: virtual std::vector<ScDPItemData> getMatchValues() const override; private: - std::vector<ScDPItemData> maValues; - Date maNullDate; - ScDPNumGroupInfo maNumInfo; + std::vector<ScDPItemData> const maValues; + Date const maNullDate; + ScDPNumGroupInfo const maNumInfo; }; ScDPGroupDateFilter::ScDPGroupDateFilter( @@ -635,7 +635,7 @@ namespace { class FindCaseInsensitive { - ScDPItemData maValue; + ScDPItemData const maValue; public: explicit FindCaseInsensitive(const ScDPItemData& rVal) : maValue(rVal) {} diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index d68495127de7..02ffea06dd47 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -117,7 +117,7 @@ class DBConnector : public ScDPCache::DBConnector uno::Reference<sdbc::XRowSet> mxRowSet; uno::Reference<sdbc::XRow> mxRow; uno::Reference<sdbc::XResultSetMetaData> mxMetaData; - Date maNullDate; + Date const maNullDate; public: DBConnector(ScDPCache& rCache, const uno::Reference<sdbc::XRowSet>& xRowSet, const Date& rNullDate); @@ -557,7 +557,7 @@ namespace { class DisableGetPivotData { ScDPObject& mrDPObj; - bool mbOldState; + bool const mbOldState; public: DisableGetPivotData(ScDPObject& rObj, bool bOld) : mrDPObj(rObj), mbOldState(bOld) { @@ -572,7 +572,7 @@ public: class FindIntersectingTable { - ScRange maRange; + ScRange const maRange; public: explicit FindIntersectingTable(const ScRange& rRange) : maRange(rRange) {} @@ -584,10 +584,10 @@ public: class FindIntersectingTableByColumns { - SCCOL mnCol1; - SCCOL mnCol2; - SCROW mnRow; - SCTAB mnTab; + SCCOL const mnCol1; + SCCOL const mnCol2; + SCROW const mnRow; + SCTAB const mnTab; public: FindIntersectingTableByColumns(SCCOL nCol1, SCCOL nCol2, SCROW nRow, SCTAB nTab) : mnCol1(nCol1), mnCol2(nCol2), mnRow(nRow), mnTab(nTab) {} @@ -618,10 +618,10 @@ public: class FindIntersectingTableByRows { - SCCOL mnCol; - SCROW mnRow1; - SCROW mnRow2; - SCTAB mnTab; + SCCOL const mnCol; + SCROW const mnRow1; + SCROW const mnRow2; + SCTAB const mnTab; public: FindIntersectingTableByRows(SCCOL nCol, SCROW nRow1, SCROW nRow2, SCTAB nTab) : mnCol(nCol), mnRow1(nRow1), mnRow2(nRow2), mnTab(nTab) {} @@ -653,7 +653,7 @@ public: class AccumulateOutputRanges { ScRangeList maRanges; - SCTAB mnTab; + SCTAB const mnTab; public: explicit AccumulateOutputRanges(SCTAB nTab) : mnTab(nTab) {} AccumulateOutputRanges(const AccumulateOutputRanges& r) : maRanges(r.maRanges), mnTab(r.mnTab) {} @@ -1307,7 +1307,7 @@ namespace { class FindByName { - OUString maName; // must be all uppercase. + OUString const maName; // must be all uppercase. public: explicit FindByName(const OUString& rName) : maName(rName) {} bool operator() (const ScDPSaveDimension* pDim) const @@ -1490,7 +1490,7 @@ bool dequote( const OUString& rSource, sal_Int32 nStartPos, sal_Int32& rEndPos, struct ScGetPivotDataFunctionEntry { const sal_Char* pName; - sal_Int16 eFunc; + sal_Int16 const eFunc; }; bool parseFunction( const OUString& rList, sal_Int32 nStartPos, sal_Int32& rEndPos, sal_Int16& rFunc ) @@ -2143,8 +2143,8 @@ namespace { class FindByColumn { - SCCOL mnCol; - PivotFunc mnMask; + SCCOL const mnCol; + PivotFunc const mnMask; public: FindByColumn(SCCOL nCol, PivotFunc nMask) : mnCol(nCol), mnMask(nMask) {} bool operator() (const ScPivotField& r) const @@ -2612,7 +2612,7 @@ bool hasFieldColumn(const vector<ScPivotField>* pRefFields, SCCOL nCol) class FindByOriginalDim { - long mnDim; + long const mnDim; public: explicit FindByOriginalDim(long nDim) : mnDim(nDim) {} bool operator() (const ScPivotField& r) const @@ -3388,7 +3388,7 @@ namespace { */ class MatchByTable { - SCTAB mnTab; + SCTAB const mnTab; public: explicit MatchByTable(SCTAB nTab) : mnTab(nTab) {} diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index 8c2d529cdf6c..bb66f56c8b6e 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -112,20 +112,20 @@ namespace { class ScDPOutputImpl { ScDocument* mpDoc; - sal_uInt16 mnTab; + sal_uInt16 const mnTab; ::std::vector< bool > mbNeedLineCols; ::std::vector< SCCOL > mnCols; ::std::vector< bool > mbNeedLineRows; ::std::vector< SCROW > mnRows; - SCCOL mnTabStartCol; - SCROW mnTabStartRow; + SCCOL const mnTabStartCol; + SCROW const mnTabStartRow; SCCOL mnDataStartCol; SCROW mnDataStartRow; - SCCOL mnTabEndCol; - SCROW mnTabEndRow; + SCCOL const mnTabEndCol; + SCROW const mnTabEndRow; public: ScDPOutputImpl( ScDocument* pDoc, sal_uInt16 nTab, diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx index 7b9e9aa9c792..4ad5530a21b9 100644 --- a/sc/source/core/data/dptabres.cxx +++ b/sc/source/core/data/dptabres.cxx @@ -138,8 +138,8 @@ public: class ScDPRowMembersOrder { ScDPResultDimension& rDimension; - long nMeasure; - bool bAscending; + long const nMeasure; + bool const bAscending; public: ScDPRowMembersOrder( ScDPResultDimension& rDim, long nM, bool bAsc ) : @@ -154,8 +154,8 @@ public: class ScDPColMembersOrder { ScDPDataDimension& rDimension; - long nMeasure; - bool bAscending; + long const nMeasure; + bool const bAscending; public: ScDPColMembersOrder( ScDPDataDimension& rDim, long nM, bool bAsc ) : @@ -2676,7 +2676,7 @@ class ScDPGroupCompare private: const ScDPResultData* pResultData; const ScDPInitState& rInitState; - long nDimSource; + long const nDimSource; bool bIncludeAll; bool bIsBase; long nGroupBase; diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx index 4d52907cae35..d304e1f5c817 100644 --- a/sc/source/core/data/dptabsrc.cxx +++ b/sc/source/core/data/dptabsrc.cxx @@ -1879,7 +1879,7 @@ ScDPLevel* ScDPLevels::getByIndex(long nIndex) const class ScDPGlobalMembersOrder { ScDPLevel& rLevel; - bool bAscending; + bool const bAscending; public: ScDPGlobalMembersOrder( ScDPLevel& rLev, bool bAsc ) : diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx index 3a06da0b7c0d..a390101b12e7 100644 --- a/sc/source/core/data/fillinfo.cxx +++ b/sc/source/core/data/fillinfo.cxx @@ -121,7 +121,7 @@ namespace { class RowInfoFiller { ScDocument& mrDoc; - SCTAB mnTab; + SCTAB const mnTab; RowInfo* mpRowInfo; SCCOL mnArrX; SCSIZE mnArrY; diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 4066ce1adad2..ba3244793a72 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -313,8 +313,8 @@ lcl_checkRangeDimensions( class LessByReference { - ScAddress maPos; - DimensionSelector maFunc; + ScAddress const maPos; + DimensionSelector const maFunc; public: LessByReference(const ScAddress& rPos, const DimensionSelector& rFunc) : maPos(rPos), maFunc(rFunc) {} @@ -334,8 +334,8 @@ public: */ class AdjacentByReference { - ScAddress maPos; - DimensionSelector maFunc; + ScAddress const maPos; + DimensionSelector const maFunc; public: AdjacentByReference(const ScAddress& rPos, DimensionSelector aFunc) : maPos(rPos), maFunc(aFunc) {} @@ -477,9 +477,9 @@ void adjustDBRange(formula::FormulaToken* pToken, ScDocument& rNewDoc, const ScD struct AreaListenerKey { - ScRange maRange; - bool mbStartFixed; - bool mbEndFixed; + ScRange const maRange; + bool const mbStartFixed; + bool const mbEndFixed; AreaListenerKey( const ScRange& rRange, bool bStartFixed, bool bEndFixed ) : maRange(rRange), mbStartFixed(bStartFixed), mbEndFixed(bEndFixed) {} @@ -1425,7 +1425,7 @@ void ScFormulaCell::CalcAfterLoad( sc::CompileFormulaContext& rCxt, bool bStartL // DoubleRefs for binary operators were always a Matrix before version v5.0. // Now this is only the case when in an array formula, otherwise it's an implicit intersection - if ( pDocument->GetSrcVersion() < SC_MATRIX_DOUBLEREF && + if ( ScDocument::GetSrcVersion() < SC_MATRIX_DOUBLEREF && GetMatrixFlag() == ScMatrixMode::NONE && pCode->HasMatrixDoubleRefOps() ) { cMatrixFlag = ScMatrixMode::Formula; @@ -4618,7 +4618,7 @@ bool ScFormulaCell::InterpretFormulaGroupThreading(sc::FormulaLogger::GroupScope ScDocument* mpDocument; ScInterpreterContext* mpContext; const ScAddress& mrTopPos; - SCROW mnLength; + SCROW const mnLength; public: Executor(const std::shared_ptr<comphelper::ThreadTaskTag>& rTag, diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx index ef3f999208cf..afbcd765f01d 100644 --- a/sc/source/core/data/funcdesc.cxx +++ b/sc/source/core/data/funcdesc.cxx @@ -45,7 +45,7 @@ struct ScFuncDescCore /* * An opcode from include/formula/compiler.hxx */ - sal_uInt16 nOpCode; + sal_uInt16 const nOpCode; /* * Pointer to list of strings */ @@ -53,7 +53,7 @@ struct ScFuncDescCore /* * Count of list of strings */ - size_t nResourceLen; + size_t const nResourceLen; /* * 16-bit value: * @@ -66,11 +66,11 @@ struct ScFuncDescCore * Bit 2: boolean flag whether function is hidden in the Function * Wizard unless used in an expression. */ - sal_uInt16 nFunctionFlags; + sal_uInt16 const nFunctionFlags; /* * Function group (text, math, ...), one of ID_FUNCTION_GRP_... */ - sal_uInt16 nCategory; + sal_uInt16 const nCategory; /* * Help ID, HID_FUNC_... */ @@ -82,12 +82,12 @@ struct ScFuncDescCore * paired parameters, or PAIRED_VAR_ARGS+number if number of fixed * parameters and variable paired arguments following. */ - sal_uInt16 nArgs; + sal_uInt16 const nArgs; /* * For every parameter: * Boolean flag whether the parameter is optional. */ - sal_uInt8 aOptionalArgs[7]; + sal_uInt8 const aOptionalArgs[7]; }; class ScFuncRes diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index 1ef20908c947..512e6fda53e7 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -409,7 +409,7 @@ struct CaseInsensitiveNamePredicate : svl::StyleSheetPredicate } rtl::OUString mUppercaseName; - SfxStyleFamily mFamily; + SfxStyleFamily const mFamily; }; } diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index 9c37721660d0..7270025f0c03 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -152,7 +152,7 @@ struct SetRowHeightOnlyFunc : public OptimalHeightsFuncObjBase struct SetRowHeightRangeFunc : public OptimalHeightsFuncObjBase { ScTable* mpTab; - double mnPPTY; + double const mnPPTY; SetRowHeightRangeFunc(ScTable* pTab, double nPPTY) : mpTab(pTab), @@ -2031,7 +2031,7 @@ namespace { class SetTableIndex { - SCTAB mnTab; + SCTAB const mnTab; public: explicit SetTableIndex(SCTAB nTab) : mnTab(nTab) {} diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 53e9e78d66f0..e7e8b972d83e 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -73,7 +73,7 @@ namespace { class ColumnRegroupFormulaCells { ScColContainer& mrCols; - std::vector<ScAddress>* mpGroupPos; + std::vector<ScAddress>* const mpGroupPos; public: ColumnRegroupFormulaCells( ScColContainer& rCols, std::vector<ScAddress>* pGroupPos ) : @@ -759,12 +759,12 @@ namespace { class TransClipHandler { ScTable& mrClipTab; - SCTAB mnSrcTab; - SCCOL mnSrcCol; - size_t mnTopRow; - SCROW mnTransRow; - bool mbAsLink; - bool mbWasCut; + SCTAB const mnSrcTab; + SCCOL const mnSrcCol; + size_t const mnTopRow; + SCROW const mnTransRow; + bool const mbAsLink; + bool const mbWasCut; ScAddress getDestPos(size_t nRow) const { @@ -3584,8 +3584,8 @@ namespace { class OutlineArrayFinder { ScRange maRef; - SCCOL mnCol; - SCTAB mnTab; + SCCOL const mnCol; + SCTAB const mnTab; ScOutlineArray* mpArray; bool mbSizeChanged; diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 1717525e6b4d..f65787120aaf 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -261,7 +261,7 @@ private: std::vector<std::unique_ptr<ScSortInfo[]>> mvppInfo; SCCOLROW nStart; - SCCOLROW mnLastIndex; /// index of last non-empty cell position. + SCCOLROW const mnLastIndex; /// index of last non-empty cell position. std::vector<SCCOLROW> maOrderIndices; bool mbKeepQuery; @@ -598,8 +598,8 @@ struct SortedRowFlags struct PatternSpan { - SCROW mnRow1; - SCROW mnRow2; + SCROW const mnRow1; + SCROW const mnRow2; const ScPatternAttr* mpPattern; PatternSpan( SCROW nRow1, SCROW nRow2, const ScPatternAttr* pPat ) : @@ -646,7 +646,7 @@ namespace { template<typename Hint, typename ReorderMap, typename Index> class ReorderNotifier { - Hint maHint; + Hint const maHint; public: ReorderNotifier( const ReorderMap& rMap, SCTAB nTab, Index nPos1, Index nPos2 ) : maHint(rMap, nTab, nPos1, nPos2) {} @@ -2255,7 +2255,7 @@ class QueryEvaluator svl::SharedStringPool& mrStrPool; const ScTable& mrTab; const ScQueryParam& mrParam; - bool mpTestEqualCondition; + bool const mpTestEqualCondition; utl::TransliterationWrapper* mpTransliteration; CollatorWrapper* mpCollator; const bool mbMatchWholeCell; diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx index 88929c870564..52ed148664ca 100644 --- a/sc/source/core/data/validat.cxx +++ b/sc/source/core/data/validat.cxx @@ -611,7 +611,7 @@ class ScStringTokenIterator { public: explicit ScStringTokenIterator( const ScTokenArray& rTokArr ) : - maIter( rTokArr ), mbSkipEmpty( true ), mbOk( true ) {} + maIter( rTokArr ), mbOk( true ) {} /** Returns the string of the first string token or NULL on error or empty token array. */ rtl_uString* First(); @@ -624,7 +624,6 @@ public: private: svl::SharedString maCurString; /// Current string. FormulaTokenArrayPlainIterator maIter; - bool mbSkipEmpty; /// Ignore empty strings. bool mbOk; /// true = correct token or end of token array. }; @@ -652,7 +651,7 @@ rtl_uString* ScStringTokenIterator::Next() maCurString = pToken->GetString(); // string found but empty -> get next token; otherwise return it - return (mbSkipEmpty && maCurString.isValid() && maCurString.isEmpty()) ? Next() : maCurString.getData(); + return (maCurString.isValid() && maCurString.isEmpty()) ? Next() : maCurString.getData(); } /** Returns the number format of the passed cell, or the standard format. */ diff --git a/sc/source/core/inc/adiasync.hxx b/sc/source/core/inc/adiasync.hxx index bc0a22ee3315..f17f041af690 100644 --- a/sc/source/core/inc/adiasync.hxx +++ b/sc/source/core/inc/adiasync.hxx @@ -43,8 +43,8 @@ private: }; std::unique_ptr<ScAddInDocs> pDocs; // List of using documents LegacyFuncData* mpFuncData; // Pointer to data in collection - sal_uLong nHandle; // is casted from double to sal_uLong - ParamType meType; // result of type PTR_DOUBLE or PTR_STRING + sal_uLong const nHandle; // is casted from double to sal_uLong + ParamType const meType; // result of type PTR_DOUBLE or PTR_STRING bool bValid; // is value valid? public: diff --git a/sc/source/core/inc/arraysumfunctor.hxx b/sc/source/core/inc/arraysumfunctor.hxx index 86f346f89834..226962cf1f0f 100644 --- a/sc/source/core/inc/arraysumfunctor.hxx +++ b/sc/source/core/inc/arraysumfunctor.hxx @@ -32,7 +32,7 @@ struct ArraySumFunctor { private: const double* mpArray; - size_t mnSize; + size_t const mnSize; public: ArraySumFunctor(const double* pArray, size_t nSize) diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx index 3a2ef4d6568d..f8a74513bb5e 100644 --- a/sc/source/core/inc/bcaslot.hxx +++ b/sc/source/core/inc/bcaslot.hxx @@ -93,7 +93,7 @@ inline bool ScBroadcastArea::operator==( const ScBroadcastArea & rArea ) const struct ScBroadcastAreaEntry { - ScBroadcastArea* mpArea; + ScBroadcastArea* const mpArea; mutable bool mbErasure; ///< TRUE if marked for erasure in this set ScBroadcastAreaEntry( ScBroadcastArea* p ) : mpArea( p), mbErasure( false) {} @@ -350,7 +350,7 @@ public: class ScBulkBroadcast { ScBroadcastAreaSlotMachine* pBASM; - SfxHintId mnHintId; + SfxHintId const mnHintId; public: explicit ScBulkBroadcast( ScBroadcastAreaSlotMachine* p, SfxHintId nHintId ) : pBASM(p), diff --git a/sc/source/core/inc/cellkeytranslator.hxx b/sc/source/core/inc/cellkeytranslator.hxx index b728b1604bc6..3abee208c59e 100644 --- a/sc/source/core/inc/cellkeytranslator.hxx +++ b/sc/source/core/inc/cellkeytranslator.hxx @@ -33,7 +33,7 @@ struct TransItem; struct ScCellKeyword { const sal_Char* mpName; - OpCode meOpCode; + OpCode const meOpCode; const css::lang::Locale& mrLocale; ScCellKeyword(const sal_Char* pName, OpCode eOpCode, const css::lang::Locale& rLocale); diff --git a/sc/source/core/inc/doubleref.hxx b/sc/source/core/inc/doubleref.hxx index 3eb3d7ac7a97..7786104e8de2 100644 --- a/sc/source/core/inc/doubleref.hxx +++ b/sc/source/core/inc/doubleref.hxx @@ -87,7 +87,7 @@ protected: static void fillQueryOptions(ScQueryParamBase* pParam); private: - ScDocument* mpDoc; + ScDocument* const mpDoc; }; class ScDBInternalRange : public ScDBRangeBase @@ -128,7 +128,7 @@ public: virtual bool isRangeEqual(const ScRange& rRange) const override; private: - ScRange maRange; + ScRange const maRange; }; class ScDBExternalRange : public ScDBRangeBase diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index 211e71890b0e..1a93baa9c364 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -217,7 +217,7 @@ private: FormulaError mnStringNoValueError; // the error set in ConvertStringToValue() if no value SubtotalFlags mnSubTotalFlags; // flags for subtotal and aggregate functions sal_uInt8 cPar; // current count of parameters - bool bCalcAsShown; // precision as shown + bool const bCalcAsShown; // precision as shown bool bMatrixFormula; // formula cell is a matrix formula VolatileType meVolatileType; diff --git a/sc/source/core/inc/jumpmatrix.hxx b/sc/source/core/inc/jumpmatrix.hxx index 23c17a3b003f..7c8fbf558c30 100644 --- a/sc/source/core/inc/jumpmatrix.hxx +++ b/sc/source/core/inc/jumpmatrix.hxx @@ -61,13 +61,13 @@ class ScJumpMatrix ScMatrixRef pMat; // the results ScRefList mvRefList; // array of references result, if any ScTokenVec mvParams; // parameter stack - SCSIZE nCols; + SCSIZE const nCols; SCSIZE nRows; SCSIZE nCurCol; SCSIZE nCurRow; SCSIZE nResMatCols; SCSIZE nResMatRows; - OpCode meOp; + OpCode const meOp; bool bStarted; // Buffer result ranges to be able to set a range of identically typed diff --git a/sc/source/core/inc/poolhelp.hxx b/sc/source/core/inc/poolhelp.hxx index 914b760022b3..e6b71bd695b2 100644 --- a/sc/source/core/inc/poolhelp.hxx +++ b/sc/source/core/inc/poolhelp.hxx @@ -41,7 +41,7 @@ private: mutable std::unique_ptr<SvNumberFormatter> pFormTable; mutable SfxItemPool* pEditPool; // EditTextObjectPool mutable SfxItemPool* pEnginePool; // EditEnginePool - ScDocument* m_pSourceDoc; + ScDocument* const m_pSourceDoc; public: ScPoolHelper( ScDocument* pSourceDoc ); diff --git a/sc/source/core/inc/webservicelink.hxx b/sc/source/core/inc/webservicelink.hxx index 215a5ddb903e..8d7436283cb9 100644 --- a/sc/source/core/inc/webservicelink.hxx +++ b/sc/source/core/inc/webservicelink.hxx @@ -32,7 +32,7 @@ class ScWebServiceLink : public ::sfx2::SvBaseLink, public SvtBroadcaster { private: ScDocument* pDoc; - OUString aURL; // connection/ link data + OUString const aURL; // connection/ link data bool bHasResult; // is set aResult is useful OUString aResult; diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index f4d1c518d319..d6bfc428ccb8 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -1268,7 +1268,7 @@ protected: class Reduction : public SlidingFunctionBase { - int mnResultSize; + int const mnResultSize; public: explicit Reduction(int nResultSize) : mnResultSize(nResultSize) {} @@ -3293,8 +3293,8 @@ public: cl_mem GetResultBuffer() const { return mpResClmem; } private: - ScCalcConfig mCalcConfig; - FormulaTreeNodeRef mpRoot; + ScCalcConfig const mCalcConfig; + FormulaTreeNodeRef const mpRoot; SymbolTable mSyms; std::string mKernelSignature, mKernelHash; std::string mFullProgramSrc; @@ -3304,7 +3304,7 @@ private: std::set<std::string> inlineDecl; std::set<std::string> inlineFun; - int mnResultSize; + int const mnResultSize; }; DynamicKernel::DynamicKernel( const ScCalcConfig& config, const FormulaTreeNodeRef& r, int nResultSize ) : @@ -3672,9 +3672,9 @@ namespace { class CLInterpreterResult { - DynamicKernel* mpKernel; + DynamicKernel* const mpKernel; - SCROW mnGroupLength; + SCROW const mnGroupLength; cl_mem mpCLResBuf; double* mpResBuf; @@ -3740,7 +3740,7 @@ class CLInterpreterContext std::shared_ptr<DynamicKernel> mpKernelStore; /// for managed kernel instance. DynamicKernel* mpKernel; - SCROW mnGroupLength; + SCROW const mnGroupLength; public: explicit CLInterpreterContext(SCROW nGroupLength) diff --git a/sc/source/core/opencl/opbase.hxx b/sc/source/core/opencl/opbase.hxx index b12879c78c16..5833796726a1 100644 --- a/sc/source/core/opencl/opbase.hxx +++ b/sc/source/core/opencl/opbase.hxx @@ -35,7 +35,7 @@ public: std::string mMessage; std::string mFile; - int mLineNumber; + int const mLineNumber; }; /// Failed in marshaling @@ -47,7 +47,7 @@ public: std::string mFunction; cl_int mError; std::string mFile; - int mLineNumber; + int const mLineNumber; }; /// Inconsistent state @@ -57,7 +57,7 @@ public: Unhandled( const std::string& fn, int ln ); std::string mFile; - int mLineNumber; + int const mLineNumber; }; typedef std::shared_ptr<FormulaTreeNode> FormulaTreeNodeRef; @@ -76,7 +76,7 @@ public: } private: - formula::FormulaConstTokenRef mpCurrentFormula; + formula::FormulaConstTokenRef const mpCurrentFormula; }; /// (Partially) abstract base class for an operand @@ -125,7 +125,7 @@ public: protected: const ScCalcConfig& mCalcConfig; std::string mSymName; - FormulaTreeNodeRef mFormulaTree; + FormulaTreeNodeRef const mFormulaTree; }; typedef std::shared_ptr<DynamicKernelArgument> DynamicKernelArgumentRef; diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx index 21eb192526a7..9455bb778383 100644 --- a/sc/source/core/tool/callform.cxx +++ b/sc/source/core/tool/callform.cxx @@ -79,7 +79,7 @@ typedef void (CALLTYPE* Unadvice)( double& nHandle ); class ModuleData { friend class ModuleCollection; - OUString aName; + OUString const aName; std::unique_ptr<osl::Module> pInstance; public: ModuleData(const ModuleData&) = delete; diff --git a/sc/source/core/tool/cellkeytranslator.cxx b/sc/source/core/tool/cellkeytranslator.cxx index f2acda65ed1a..9eb0429fd69d 100644 --- a/sc/source/core/tool/cellkeytranslator.cxx +++ b/sc/source/core/tool/cellkeytranslator.cxx @@ -182,7 +182,7 @@ struct TransItem { const sal_Unicode* from; const sal_Char* to; - OpCode func; + OpCode const func; }; void ScCellKeywordTranslator::init() diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx index 69a38fbaa377..b55c6a57a089 100644 --- a/sc/source/core/tool/chartlis.cxx +++ b/sc/source/core/tool/chartlis.cxx @@ -284,7 +284,7 @@ private: private: ScDocument* mpDoc; ScChartListener& mrParent; - bool mbStart; + bool const mbStart; }; } diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 4fcb5fd93599..04e4c9048d74 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -4361,7 +4361,7 @@ namespace { class ExternalFileInserter { - ScAddress maPos; + ScAddress const maPos; ScExternalRefManager& mrRefMgr; public: ExternalFileInserter(const ScAddress& rPos, ScExternalRefManager& rRefMgr) : diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index e10135278e0a..17533332d90b 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -744,7 +744,7 @@ public: } private: - OUString maSearchName; + OUString const maSearchName; }; /** Set a numbered table column name at given nIndex, preventing duplicates, @@ -941,7 +941,7 @@ namespace { class FindByTable { - SCTAB mnTab; + SCTAB const mnTab; public: explicit FindByTable(SCTAB nTab) : mnTab(nTab) {} @@ -955,17 +955,17 @@ public: class UpdateRefFunc { - ScDocument* mpDoc; - UpdateRefMode meMode; - SCCOL mnCol1; - SCROW mnRow1; - SCTAB mnTab1; - SCCOL mnCol2; - SCROW mnRow2; - SCTAB mnTab2; - SCCOL mnDx; - SCROW mnDy; - SCTAB mnDz; + ScDocument* const mpDoc; + UpdateRefMode const meMode; + SCCOL const mnCol1; + SCROW const mnRow1; + SCTAB const mnTab1; + SCCOL const mnCol2; + SCROW const mnRow2; + SCTAB const mnTab2; + SCCOL const mnDx; + SCROW const mnDy; + SCTAB const mnDz; public: UpdateRefFunc(ScDocument* pDoc, UpdateRefMode eMode, @@ -985,8 +985,8 @@ public: class UpdateMoveTabFunc { - SCTAB mnOldTab; - SCTAB mnNewTab; + SCTAB const mnOldTab; + SCTAB const mnNewTab; public: UpdateMoveTabFunc(SCTAB nOld, SCTAB nNew) : mnOldTab(nOld), mnNewTab(nNew) {} void operator() (std::unique_ptr<ScDBData> const& p) @@ -997,10 +997,10 @@ public: class FindByCursor { - SCCOL mnCol; - SCROW mnRow; - SCTAB mnTab; - ScDBDataPortion mePortion; + SCCOL const mnCol; + SCROW const mnRow; + SCTAB const mnTab; + ScDBDataPortion const mePortion; public: FindByCursor(SCCOL nCol, SCROW nRow, SCTAB nTab, ScDBDataPortion ePortion) : mnCol(nCol), mnRow(nRow), mnTab(nTab), mePortion(ePortion) {} @@ -1026,7 +1026,7 @@ public: class FindByIndex { - sal_uInt16 mnIndex; + sal_uInt16 const mnIndex; public: explicit FindByIndex(sal_uInt16 nIndex) : mnIndex(nIndex) {} bool operator() (std::unique_ptr<ScDBData> const& p) const diff --git a/sc/source/core/tool/formulalogger.cxx b/sc/source/core/tool/formulalogger.cxx index ca049a04a0c1..af6c873a1ae7 100644 --- a/sc/source/core/tool/formulalogger.cxx +++ b/sc/source/core/tool/formulalogger.cxx @@ -63,11 +63,11 @@ struct FormulaLogger::GroupScope::Impl FormulaLogger& mrLogger; const ScDocument& mrDoc; - OUString maPrefix; + OUString const maPrefix; std::vector<OUString> maMessages; bool mbCalcComplete; - bool mbOutputEnabled; + bool const mbOutputEnabled; Impl( FormulaLogger& rLogger, const OUString& rPrefix, const ScDocument& rDoc, const ScFormulaCell& rCell, bool bOutputEnabled ) : diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 06a97d9e5893..e585073f1d1c 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -4671,7 +4671,7 @@ public: private: const ScMatrix& mrMat; - bool mbColVec; + bool const mbColVec; }; /** returns -1 when the matrix value is smaller than the query value, 0 when @@ -8860,8 +8860,8 @@ void ScInterpreter::ScLeft() } typedef struct { - UBlockCode from; - UBlockCode to; + UBlockCode const from; + UBlockCode const to; } UBlockScript; static const UBlockScript scriptList[] = { diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index a59a28ca501d..02242d9745bc 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -2243,7 +2243,7 @@ class ScTDistFunction : public ScDistFunc { ScInterpreter& rInt; double fp, fDF; - int nT; + int const nT; public: ScTDistFunction( ScInterpreter& rI, double fpVal, double fDFVal, int nType ) : diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx index 70e44ce83994..2567cdc4415d 100644 --- a/sc/source/core/tool/interpr8.cxx +++ b/sc/source/core/tool/interpr8.cxx @@ -73,7 +73,7 @@ static bool lcl_SortByX( const DataPoint &lhs, const DataPoint &rhs ) { return l class ScETSForecastCalculation { private: - SvNumberFormatter* mpFormatter; + SvNumberFormatter* const mpFormatter; std::vector< DataPoint > maRange; // data (X, Y) std::unique_ptr<double[]> mpBase; // calculated base value array std::unique_ptr<double[]> mpTrend; // calculated trend factor array diff --git a/sc/source/core/tool/queryparam.cxx b/sc/source/core/tool/queryparam.cxx index 6e2fefa3f323..17d05c5e8914 100644 --- a/sc/source/core/tool/queryparam.cxx +++ b/sc/source/core/tool/queryparam.cxx @@ -35,7 +35,7 @@ const size_t MAXQUERY = 8; class FindByField { - SCCOLROW mnField; + SCCOLROW const mnField; public: explicit FindByField(SCCOLROW nField) : mnField(nField) {} bool operator() (const std::unique_ptr<ScQueryEntry>& rpEntry) const diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index 0b3c832ee492..93fb0b6f7208 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -119,12 +119,12 @@ public: } private: OUString& mrStr; - ScRefFlags mnFlags; - ScDocument* mpDoc; - FormulaGrammar::AddressConvention meConv; - sal_Unicode mcDelim; + ScRefFlags const mnFlags; + ScDocument* const mpDoc; + FormulaGrammar::AddressConvention const meConv; + sal_Unicode const mcDelim; bool mbFirst; - bool mbFullAddressNotation; + bool const mbFullAddressNotation; }; } @@ -1347,7 +1347,7 @@ public: return false; } private: - ScDocument *mpDoc; + ScDocument * const mpDoc; }; void ScRangePairList::Join( const ScRangePair& r, bool bIsInList ) diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx index 034318eff13d..0db8757af207 100644 --- a/sc/source/core/tool/scmatrix.cxx +++ b/sc/source/core/tool/scmatrix.cxx @@ -2306,9 +2306,9 @@ template<typename T, typename U, typename return_type> struct MatrixIteratorWrapper { private: - typename T::const_iterator m_itBegin; - typename T::const_iterator m_itEnd; - U maOp; + typename T::const_iterator const m_itBegin; + typename T::const_iterator const m_itEnd; + U const maOp; public: MatrixIteratorWrapper(typename T::const_iterator const & itBegin, typename T::const_iterator const & itEnd, U const & aOp): m_itBegin(itBegin), diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 94009bc62eb0..7f1428daeac2 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -134,7 +134,7 @@ namespace struct TokenPointers { TokenPointerRange maPointerRange[2]; - bool mbSkipRelName; + bool const mbSkipRelName; TokenPointers( FormulaToken** pCode, sal_uInt16 nLen, FormulaToken** pRPN, sal_uInt16 nRPN, bool bSkipRelName = true ) : diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx index 323da2c2ee6a..b3ee0cc8311c 100644 --- a/sc/source/core/tool/userlist.cxx +++ b/sc/source/core/tool/userlist.cxx @@ -34,7 +34,7 @@ namespace { class FindByName { const OUString& mrName; - bool mbUpper; + bool const mbUpper; public: FindByName(const OUString& rName, bool bUpper) : mrName(rName), mbUpper(bUpper) {} bool operator() (const ScUserListData::SubStr& r) const diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx index 010591e4d65a..8d90a7840d67 100644 --- a/sc/source/filter/excel/xepivot.cxx +++ b/sc/source/filter/excel/xepivot.cxx @@ -1594,7 +1594,7 @@ public: virtual void Save( XclExpStream& rStrm ) override; private: XclExpPivotTableManager& mrPTMgr; - SCTAB mnScTab; + SCTAB const mnScTab; }; XclExpPivotRecWrapper::XclExpPivotRecWrapper( XclExpPivotTableManager& rPTMgr, SCTAB nScTab ) : diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx index 88688d9bfc7e..431074fbce50 100644 --- a/sc/source/filter/excel/xepivotxml.cxx +++ b/sc/source/filter/excel/xepivotxml.cxx @@ -531,7 +531,7 @@ namespace { struct DataField { - long mnPos; // field index in pivot cache. + long const mnPos; // field index in pivot cache. const ScDPSaveDimension* mpDim; DataField( long nPos, const ScDPSaveDimension* pDim ) : mnPos(nPos), mpDim(pDim) {} diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index b4cc6f4826f5..ddb2d9f8c0ea 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -137,7 +137,7 @@ class XclListColor { private: Color maColor; /// The color value of this palette entry. - sal_uInt32 mnColorId; /// Unique color ID for color reduction. + sal_uInt32 const mnColorId; /// Unique color ID for color reduction. sal_uInt32 mnWeight; /// Weighting for color reduction. bool mbBaseColor; /// true = Handle as base color, (don't remove/merge). @@ -1343,7 +1343,7 @@ size_t XclExpFontBuffer::Find( const XclFontData& rFontData ) /** Predicate for search algorithm. */ struct XclExpNumFmtPred { - sal_uInt32 mnScNumFmt; + sal_uInt32 const mnScNumFmt; explicit XclExpNumFmtPred( sal_uInt32 nScNumFmt ) : mnScNumFmt( nScNumFmt ) {} bool operator()( const XclExpNumFmt& rFormat ) const { return rFormat.mnScNumFmt == mnScNumFmt; } diff --git a/sc/source/filter/excel/xlpage.cxx b/sc/source/filter/excel/xlpage.cxx index 3a47286728f8..4a27ff173f9d 100644 --- a/sc/source/filter/excel/xlpage.cxx +++ b/sc/source/filter/excel/xlpage.cxx @@ -34,9 +34,9 @@ namespace{ struct XclPaperSize { - Paper mePaper; /// SVX paper size identifier. - long mnWidth; /// Paper width in twips. - long mnHeight; /// Paper height in twips. + Paper const mePaper; /// SVX paper size identifier. + long const mnWidth; /// Paper width in twips. + long const mnHeight; /// Paper height in twips. }; constexpr long in2twips(double n_inch) diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx index 59cde89bb3ca..45e6a555e97e 100644 --- a/sc/source/filter/excel/xlstyle.cxx +++ b/sc/source/filter/excel/xlstyle.cxx @@ -772,8 +772,8 @@ struct XclBuiltInFormat { sal_uInt16 mnXclNumFmt; /// Excel built-in index. const sal_Char* mpFormat; /// Format string, may be 0 (meOffset used then). - NfIndexTableOffset meOffset; /// SvNumberFormatter format index, if mpFormat==0. - sal_uInt16 mnXclReuseFmt; /// Use this Excel format, if meOffset==PRV_NF_INDEX_REUSE. + NfIndexTableOffset const meOffset; /// SvNumberFormatter format index, if mpFormat==0. + sal_uInt16 const mnXclReuseFmt; /// Use this Excel format, if meOffset==PRV_NF_INDEX_REUSE. }; /** Defines a literal Excel built-in number format. */ @@ -1400,7 +1400,7 @@ static const XclBuiltInFormat spBuiltInFormats_THAI[] = struct XclBuiltInFormatTable { LanguageType meLanguage; /// The language of this table. - LanguageType meParentLang; /// The language of the parent table. + LanguageType const meParentLang; /// The language of the parent table. const XclBuiltInFormat* mpFormats; /// The number format table. }; diff --git a/sc/source/filter/excel/xltoolbar.hxx b/sc/source/filter/excel/xltoolbar.hxx index 36e106696264..cb6e50bb754d 100644 --- a/sc/source/filter/excel/xltoolbar.hxx +++ b/sc/source/filter/excel/xltoolbar.hxx @@ -48,7 +48,7 @@ public: class ScCTB : public TBBase { - sal_uInt16 nViews; + sal_uInt16 const nViews; TB tb; std::vector<TBVisualData> rVisualData; sal_uInt32 ectbid; diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx index 5873270de48d..de285b34fb75 100644 --- a/sc/source/filter/excel/xltools.cxx +++ b/sc/source/filter/excel/xltools.cxx @@ -343,8 +343,8 @@ namespace { const struct XclCodePageEntry { - sal_uInt16 mnCodePage; - rtl_TextEncoding meTextEnc; + sal_uInt16 const mnCodePage; + rtl_TextEncoding const meTextEnc; } pCodePageTable[] = { @@ -391,14 +391,14 @@ struct XclCodePageEntry_CPPred { explicit XclCodePageEntry_CPPred( sal_uInt16 nCodePage ) : mnCodePage( nCodePage ) {} bool operator()( const XclCodePageEntry& rEntry ) const { return rEntry.mnCodePage == mnCodePage; } - sal_uInt16 mnCodePage; + sal_uInt16 const mnCodePage; }; struct XclCodePageEntry_TEPred { explicit XclCodePageEntry_TEPred( rtl_TextEncoding eTextEnc ) : meTextEnc( eTextEnc ) {} bool operator()( const XclCodePageEntry& rEntry ) const { return rEntry.meTextEnc == meTextEnc; } - rtl_TextEncoding meTextEnc; + rtl_TextEncoding const meTextEnc; }; } // namespace diff --git a/sc/source/filter/inc/XclExpChangeTrack.hxx b/sc/source/filter/inc/XclExpChangeTrack.hxx index 5ac54f447bee..50e46cd0df82 100644 --- a/sc/source/filter/inc/XclExpChangeTrack.hxx +++ b/sc/source/filter/inc/XclExpChangeTrack.hxx @@ -44,7 +44,7 @@ public: class XclExpUserBView : public ExcRecord { private: - XclExpString sUsername; + XclExpString const sUsername; sal_uInt8 aGUID[ 16 ]; virtual void SaveCont( XclExpStream& rStrm ) override; @@ -159,7 +159,7 @@ public: class XclExpChTrEmpty : public ExcRecord { private: - sal_uInt16 nRecNum; + sal_uInt16 const nRecNum; public: XclExpChTrEmpty( sal_uInt16 nNum ) : nRecNum( nNum ) {} @@ -188,8 +188,8 @@ public: class XclExpChTr0x0194 : public ExcRecord { private: - XclExpString sUsername; - DateTime aDateTime; + XclExpString const sUsername; + DateTime const aDateTime; virtual void SaveCont( XclExpStream& rStrm ) override; @@ -244,10 +244,10 @@ class XclExpChTrAction; class XclExpXmlChTrHeader : public ExcXmlRecord { - OUString maUserName; - DateTime maDateTime; + OUString const maUserName; + DateTime const maDateTime; sal_uInt8 maGUID[16]; - sal_Int32 mnLogNumber; + sal_Int32 const mnLogNumber; sal_uInt32 mnMinAction; sal_uInt32 mnMaxAction; @@ -269,8 +269,8 @@ public: class XclExpChTrInfo : public ExcRecord { private: - XclExpString sUsername; - DateTime aDateTime; + XclExpString const sUsername; + DateTime const aDateTime; sal_uInt8 aGUID[ 16 ]; virtual void SaveCont( XclExpStream& rStrm ) override; @@ -293,7 +293,7 @@ private: std::unique_ptr<sal_uInt16[]> pBuffer; sal_uInt16* pLast; - sal_uInt16 nBufSize; + sal_uInt16 const nBufSize; sal_uInt16 nLastId; public: @@ -341,12 +341,12 @@ public: class XclExpChTrAction : public ExcRecord { private: - OUString sUsername; + OUString const sUsername; DateTime aDateTime; sal_uInt32 nIndex; // action number std::unique_ptr<XclExpChTrAction> pAddAction; // additional record for this action - bool bAccepted; + bool const bAccepted; protected: const XclExpTabInfo& rTabInfo; // for table num export (sc num -> xcl num) @@ -465,7 +465,7 @@ class XclExpChTrCellContent final : public XclExpChTrAction, protected XclExpRoo std::unique_ptr<XclExpChTrData> pOldData; std::unique_ptr<XclExpChTrData> pNewData; sal_uInt16 nOldLength; // this is not the record size - ScAddress aPosition; + ScAddress const aPosition; static void MakeEmptyChTrData( std::unique_ptr<XclExpChTrData>& rpData ); @@ -522,7 +522,7 @@ public: class XclExpChTrInsertTab : public XclExpChTrAction, protected XclExpRoot { private: - SCTAB nTab; + SCTAB const nTab; protected: virtual void SaveActionData( XclExpStream& rStrm ) const override; @@ -545,7 +545,7 @@ public: class XclExpChTrMoveRange final : public XclExpChTrAction { ScRange aSourceRange; - ScRange aDestRange; + ScRange const aDestRange; virtual void SaveActionData( XclExpStream& rStrm ) const override; virtual void PrepareSaveAction( XclExpStream& rStrm ) const override; diff --git a/sc/source/filter/inc/commentsbuffer.hxx b/sc/source/filter/inc/commentsbuffer.hxx index e2d9f3255ac5..c80012a9ac68 100644 --- a/sc/source/filter/inc/commentsbuffer.hxx +++ b/sc/source/filter/inc/commentsbuffer.hxx @@ -39,7 +39,7 @@ struct CommentModel bool mbRowHidden; /// Comment cell's Row is Hidden sal_Int32 mnTHA; /// Horizontal Alignment sal_Int32 mnTVA; /// Vertical Alignment - css::awt::Rectangle maAnchor; /// Anchor parameters + css::awt::Rectangle const maAnchor; /// Anchor parameters explicit CommentModel(); }; diff --git a/sc/source/filter/inc/condformatbuffer.hxx b/sc/source/filter/inc/condformatbuffer.hxx index 26e246e75f8d..d67f648e8086 100644 --- a/sc/source/filter/inc/condformatbuffer.hxx +++ b/sc/source/filter/inc/condformatbuffer.hxx @@ -253,7 +253,7 @@ class ExtCfDataBarRule : public WorksheetHelper }; ExCfRuleModel maModel; RuleType mnRuleType; - ScDataBarFormatData* mpTarget; + ScDataBarFormatData* const mpTarget; public: ExtCfDataBarRule(ScDataBarFormatData* pTarget, const WorksheetHelper& rParent); @@ -276,7 +276,7 @@ public: private: std::vector< std::unique_ptr<ScFormatEntry> > maEntries; - ScRangeList maRange; + ScRangeList const maRange; }; typedef std::shared_ptr< CondFormat > CondFormatRef; diff --git a/sc/source/filter/inc/drawingfragment.hxx b/sc/source/filter/inc/drawingfragment.hxx index bcb68d9ba0b7..11d9b01a9f27 100644 --- a/sc/source/filter/inc/drawingfragment.hxx +++ b/sc/source/filter/inc/drawingfragment.hxx @@ -132,9 +132,9 @@ private: private: css::uno::Reference< css::container::XIndexContainer > mxCtrlFormIC; - sal_Int32 mnCtrlIndex; - sal_Int32 mnCtrlType; - sal_Int32 mnDropStyle; + sal_Int32 const mnCtrlIndex; + sal_Int32 const mnCtrlType; + sal_Int32 const mnDropStyle; }; class VmlDrawing : public ::oox::vml::Drawing, public WorksheetHelper @@ -187,7 +187,7 @@ private: const ::oox::vml::ShapeBase& rShape ) const; private: - ::oox::ole::ControlConverter maControlConv; + ::oox::ole::ControlConverter const maControlConv; ::oox::vml::TextFontModel maListBoxFont; }; diff --git a/sc/source/filter/inc/eeparser.hxx b/sc/source/filter/inc/eeparser.hxx index 3a1a44dac6f3..681ebb516f3b 100644 --- a/sc/source/filter/inc/eeparser.hxx +++ b/sc/source/filter/inc/eeparser.hxx @@ -100,7 +100,7 @@ class ScEEParser protected: EditEngine* pEdit; SfxItemPool* pPool; - SfxItemPool* pDocPool; + SfxItemPool* const pDocPool; std::vector<std::shared_ptr<ScEEParseEntry>> maList; std::shared_ptr<ScEEParseEntry> mxActEntry; ColWidthsMap maColWidths; diff --git a/sc/source/filter/inc/excdoc.hxx b/sc/source/filter/inc/excdoc.hxx index 0e7cbb798963..bef6e43756ef 100644 --- a/sc/source/filter/inc/excdoc.hxx +++ b/sc/source/filter/inc/excdoc.hxx @@ -48,8 +48,8 @@ private: XclExpRecordList<> aRecList; XclExpCellTableRef mxCellTable; - SCTAB mnScTab; // table number SC document - sal_uInt16 nExcTab; // table number Excel document + SCTAB const mnScTab; // table number SC document + sal_uInt16 const nExcTab; // table number Excel document XclExpNoteListRef mxNoteList; diff --git a/sc/source/filter/inc/excform.hxx b/sc/source/filter/inc/excform.hxx index 4851952b4f0c..cde21d76c12e 100644 --- a/sc/source/filter/inc/excform.hxx +++ b/sc/source/filter/inc/excform.hxx @@ -38,7 +38,7 @@ protected: static const sal_uInt16 nRowMask; - XclFunctionProvider maFuncProv; + XclFunctionProvider const maFuncProv; const XclBiff meBiff; void DoMulArgs( DefTokenId eId, sal_uInt8 nNumArgs ); diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx index dadeef2ae165..74a21cbfa563 100644 --- a/sc/source/filter/inc/excrecds.hxx +++ b/sc/source/filter/inc/excrecds.hxx @@ -175,7 +175,7 @@ class XclExpProtection : public XclExpBoolRecord class XclExpSheetProtection : public XclExpProtection { - SCTAB mnTab; + SCTAB const mnTab; public: XclExpSheetProtection(bool bValue, SCTAB nTab); virtual void SaveXml( XclExpXmlStream& rStrm ) override; @@ -238,7 +238,7 @@ protected: sal_uInt64 m_nStrPos; sal_uInt64 m_nOwnPos; // Position after # and Len sal_uInt16 nGrbit; - SCTAB nTab; + SCTAB const nTab; ExcBundlesheetBase(); @@ -310,10 +310,10 @@ public: virtual void SaveXml( XclExpXmlStream& rStrm ) override; private: - SCTAB mnScTab; + SCTAB const mnScTab; XclExpFilterManager* mpManager; - bool mbFitToPage; - Color maTabColor; + bool const mbFitToPage; + Color const maTabColor; }; class XclExpFiltermode : public XclExpEmptyRecord @@ -331,7 +331,7 @@ public: SCCOL GetColCount() const { return static_cast< SCCOL >( GetValue() ); } private: - ScAddress maStartPos; + ScAddress const maStartPos; }; class ExcFilterCondition diff --git a/sc/source/filter/inc/expbase.hxx b/sc/source/filter/inc/expbase.hxx index 554a01674c68..e8e233148897 100644 --- a/sc/source/filter/inc/expbase.hxx +++ b/sc/source/filter/inc/expbase.hxx @@ -32,7 +32,7 @@ class ScExportBase protected: SvStream& rStrm; - ScRange aRange; + ScRange const aRange; ScDocument* pDoc; SvNumberFormatter* pFormatter; std::unique_ptr<ScFieldEditEngine> diff --git a/sc/source/filter/inc/extlstcontext.hxx b/sc/source/filter/inc/extlstcontext.hxx index 84b08bd54a02..567ab3c93b5b 100644 --- a/sc/source/filter/inc/extlstcontext.hxx +++ b/sc/source/filter/inc/extlstcontext.hxx @@ -34,7 +34,7 @@ public: virtual void onStartElement( const AttributeList& rAttribs ) override; private: - ScDataBarFormatData* mpTarget; + ScDataBarFormatData* const mpTarget; bool mbFirstEntry; }; diff --git a/sc/source/filter/inc/formulabase.hxx b/sc/source/filter/inc/formulabase.hxx index fcc02dcd0c00..0ca479d88006 100644 --- a/sc/source/filter/inc/formulabase.hxx +++ b/sc/source/filter/inc/formulabase.hxx @@ -523,7 +523,7 @@ public: private: const FunctionParamInfo* mpParamInfo; const FunctionParamInfo* mpParamInfoEnd; - bool mbParamPairs; + bool const mbParamPairs; }; // Base function provider ===================================================== @@ -563,7 +563,7 @@ protected: private: typedef std::shared_ptr< FunctionProviderImpl > FunctionProviderImplRef; - FunctionProviderImplRef mxFuncImpl; /// Shared implementation between all copies of the provider. + FunctionProviderImplRef const mxFuncImpl; /// Shared implementation between all copies of the provider. }; // Op-code and function provider ============================================== @@ -598,7 +598,7 @@ public: private: typedef std::shared_ptr< OpCodeProviderImpl > OpCodeProviderImplRef; - OpCodeProviderImplRef mxOpCodeImpl; /// Shared implementation between all copies of the provider. + OpCodeProviderImplRef const mxOpCodeImpl; /// Shared implementation between all copies of the provider. }; // API formula parser wrapper ================================================= diff --git a/sc/source/filter/inc/formulabuffer.hxx b/sc/source/filter/inc/formulabuffer.hxx index 3d6a9f8d9b94..35c117315550 100644 --- a/sc/source/filter/inc/formulabuffer.hxx +++ b/sc/source/filter/inc/formulabuffer.hxx @@ -24,9 +24,9 @@ public: */ struct SharedFormulaEntry { - ScAddress maAddress; - OUString maTokenStr; - sal_Int32 mnSharedId; + ScAddress const maAddress; + OUString const maTokenStr; + sal_Int32 const mnSharedId; SharedFormulaEntry( const ScAddress& rAddress, @@ -38,10 +38,10 @@ public: */ struct SharedFormulaDesc { - ScAddress maAddress; - sal_Int32 mnSharedId; - OUString maCellValue; - sal_Int32 mnValueType; + ScAddress const maAddress; + sal_Int32 const mnSharedId; + OUString const maCellValue; + sal_Int32 const mnValueType; SharedFormulaDesc( const ScAddress& rAddr, sal_Int32 nSharedId, @@ -50,15 +50,15 @@ public: struct TokenAddressItem { - OUString maTokenStr; - ScAddress maAddress; + OUString const maTokenStr; + ScAddress const maAddress; TokenAddressItem( const OUString& rTokenStr, const ScAddress& rAddress ) : maTokenStr( rTokenStr ), maAddress( rAddress ) {} }; struct TokenRangeAddressItem { - TokenAddressItem maTokenAndAddress; - ScRange maRange; + TokenAddressItem const maTokenAndAddress; + ScRange const maRange; TokenRangeAddressItem( const TokenAddressItem& rTokenAndAddress, const ScRange& rRange ) : maTokenAndAddress( rTokenAndAddress ), maRange( rRange ) {} }; diff --git a/sc/source/filter/inc/fprogressbar.hxx b/sc/source/filter/inc/fprogressbar.hxx index ec2d1d8ac14f..42a4b50a1482 100644 --- a/sc/source/filter/inc/fprogressbar.hxx +++ b/sc/source/filter/inc/fprogressbar.hxx @@ -155,7 +155,7 @@ private: typedef ::std::unique_ptr< ScfProgressBar > ScfProgressBarPtr; ScfProgressBarPtr mxProgress; /// Pointer to sub progress bar for this segment. - std::size_t mnSize; /// Size of this segment. + std::size_t const mnSize; /// Size of this segment. std::size_t mnPos; /// Current position of this segment. explicit ScfProgressSegment( std::size_t nSize ); @@ -166,7 +166,7 @@ private: typedef std::vector< std::unique_ptr<ScfProgressSegment> > ScfSegmentList; ScfSegmentList maSegments; /// List of progress segments. - OUString maText; /// UI string for system progress. + OUString const maText; /// UI string for system progress. ScProgressPtr mxSysProgress; /// System progress bar. SfxObjectShell* mpDocShell; /// The document shell for the progress bar. diff --git a/sc/source/filter/inc/htmlexp.hxx b/sc/source/filter/inc/htmlexp.hxx index 93d77baf2ecf..f0507cc1738d 100644 --- a/sc/source/filter/inc/htmlexp.hxx +++ b/sc/source/filter/inc/htmlexp.hxx @@ -72,11 +72,11 @@ struct ScHTMLStyle struct ScHTMLGraphEntry { - ScRange aRange; // mapped range - Size aSize; // size in pixels - Size aSpace; // spacing in pixels - SdrObject* pObject; - bool bInCell; // if output is in cell + ScRange const aRange; // mapped range + Size const aSize; // size in pixels + Size const aSpace; // spacing in pixels + SdrObject* const pObject; + bool const bInCell; // if output is in cell bool bWritten; ScHTMLGraphEntry( SdrObject* pObj, const ScRange& rRange, @@ -109,7 +109,7 @@ class ScHTMLExport : public ScExportBase GraphEntryList aGraphList; ScHTMLStyle aHTMLStyle; OUString aBaseURL; - OUString aStreamPath; + OUString const aStreamPath; VclPtr<OutputDevice> pAppWin; // for Pixel-work FileNameMapPtr pFileNameMap; // for CopyLocalFileToINet OUString aNonConvertibleChars; // collect nonconvertible characters @@ -117,10 +117,10 @@ class ScHTMLExport : public ScExportBase SCTAB nUsedTables; short nIndent; sal_Char sIndent[nIndentMax+1]; - bool bAll; // whole document + bool const bAll; // whole document bool bTabHasGraphics; bool bTabAlignedLeft; - bool bCalcAsShown; + bool const bCalcAsShown; bool bCopyLocalFileToINet; bool bTableDataHeight; bool mbSkipImages; diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx index 8a1d26a89e2d..52e9c385c77f 100644 --- a/sc/source/filter/inc/htmlpars.hxx +++ b/sc/source/filter/inc/htmlpars.hxx @@ -97,18 +97,18 @@ typedef o3tl::sorted_vector<sal_uLong> ScHTMLColOffset; struct ScHTMLTableStackEntry { - ScRangeListRef xLockedList; + ScRangeListRef const xLockedList; std::shared_ptr<ScEEParseEntry> xCellEntry; ScHTMLColOffset* pLocalColOffset; - sal_uLong nFirstTableCell; - SCROW nRowCnt; - SCCOL nColCntStart; - SCCOL nMaxCol; - sal_uInt16 nTable; + sal_uLong const nFirstTableCell; + SCROW const nRowCnt; + SCCOL const nColCntStart; + SCCOL const nMaxCol; + sal_uInt16 const nTable; sal_uInt16 nTableWidth; sal_uInt16 nColOffset; - sal_uInt16 nColOffsetStart; - bool bFirstRow; + sal_uInt16 const nColOffsetStart; + bool const bFirstRow; ScHTMLTableStackEntry( const std::shared_ptr<ScEEParseEntry>& rE, const ScRangeListRef& rL, ScHTMLColOffset* pTO, sal_uLong nFTC, @@ -129,9 +129,9 @@ struct ScHTMLTableStackEntry struct ScHTMLAdjustStackEntry { - SCCOL nLastCol; - SCROW nNextRow; - SCROW nCurRow; + SCCOL const nLastCol; + SCROW const nNextRow; + SCROW const nCurRow; ScHTMLAdjustStackEntry( SCCOL nLCol, SCROW nNRow, SCROW nCRow ) : nLastCol( nLCol ), nNextRow( nNRow ), @@ -151,7 +151,7 @@ class ScHTMLLayoutParser : public ScHTMLParser { private: Size aPageSize; - OUString aBaseURL; + OUString const aBaseURL; ::std::stack< std::unique_ptr<ScHTMLTableStackEntry> > aTableStack; OUString aString; @@ -536,7 +536,7 @@ private: ScHTMLPos maDocBasePos; /// Resulting base address in a Calc document. ScHTMLParser* mpParser; bool mbBorderOn:1; /// true = Table borders on. - bool mbPreFormText:1; /// true = Table from preformatted text (<pre> tag). + bool const mbPreFormText:1; /// true = Table from preformatted text (<pre> tag). bool mbRowOn:1; /// true = Inside of <tr> </tr>. bool mbDataOn:1; /// true = Inside of <td> </td> or <th> </th>. bool mbPushEmptyLine:1; /// true = Insert empty line before current entry. diff --git a/sc/source/filter/inc/namebuff.hxx b/sc/source/filter/inc/namebuff.hxx index 4e76ef0cb414..5cc550bc7c16 100644 --- a/sc/source/filter/inc/namebuff.hxx +++ b/sc/source/filter/inc/namebuff.hxx @@ -33,8 +33,8 @@ class ScTokenArray; class StringHashEntry { private: - OUString aString; - sal_uInt32 nHash; + OUString const aString; + sal_uInt32 const nHash; static sal_uInt32 MakeHashCode( const OUString& ); public: @@ -74,9 +74,9 @@ class RangeNameBufferWK3 final private: struct Entry { - StringHashEntry aStrHashEntry; + StringHashEntry const aStrHashEntry; ScComplexRefData aScComplexRefDataRel; - OUString aScAbsName; + OUString const aScAbsName; sal_uInt16 nAbsInd; // == 0 -> no Abs-Name yet! sal_uInt16 nRelInd; bool bSingleRef; @@ -127,8 +127,8 @@ class ExtSheetBuffer : public ExcRoot private: struct Cont { - OUString aFile; - OUString aTab; + OUString const aFile; + OUString const aTab; sal_uInt16 nTabNum; // 0xFFFF -> not set yet // 0xFFFE -> tried to set, but failed // 0xFFFD -> should be in the same workbook, but not found @@ -163,7 +163,7 @@ inline ExtSheetBuffer::ExtSheetBuffer( RootData* p ) : ExcRoot( p ) struct ExtName { sal_uInt32 nStorageId; - sal_uInt16 nFlags; + sal_uInt16 const nFlags; ExtName( sal_uInt16 n ) : nStorageId( 0 ), nFlags( n ) {} diff --git a/sc/source/filter/inc/orcusfiltersimpl.hxx b/sc/source/filter/inc/orcusfiltersimpl.hxx index 48011504fc5b..1a27dc93ec1c 100644 --- a/sc/source/filter/inc/orcusfiltersimpl.hxx +++ b/sc/source/filter/inc/orcusfiltersimpl.hxx @@ -33,7 +33,7 @@ public: class ScOrcusXMLContextImpl : public ScOrcusXMLContext { ScDocument& mrDoc; - OUString maPath; + OUString const maPath; orcus::xmlns_repository maNsRepo; /// XML namespace repository for this context. diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx index 5afce3d33ae5..9d090b744619 100644 --- a/sc/source/filter/inc/orcusinterface.hxx +++ b/sc/source/filter/inc/orcusinterface.hxx @@ -84,7 +84,7 @@ class ScOrcusNamedExpression : public orcus::spreadsheet::iface::import_named_ex { ScDocumentImport& mrDoc; const ScOrcusGlobalSettings& mrGlobalSettings; - SCTAB mnTab; //< negative if global, else >= 0 for sheet-local named expressions. + SCTAB const mnTab; //< negative if global, else >= 0 for sheet-local named expressions. public: ScOrcusNamedExpression( ScDocumentImport& rDoc, const ScOrcusGlobalSettings& rGS, SCTAB nTab = -1 ); @@ -171,7 +171,7 @@ public: private: - SCTAB mnTab; + SCTAB const mnTab; ScDocument& mrDoc; std::unique_ptr<ScConditionalFormat> mpCurrentFormat; @@ -204,7 +204,7 @@ private: class ScOrcusSheetProperties : public orcus::spreadsheet::iface::import_sheet_properties { ScDocumentImport& mrDoc; - SCTAB mnTab; + SCTAB const mnTab; public: ScOrcusSheetProperties(SCTAB nTab, ScDocumentImport& rDoc); virtual ~ScOrcusSheetProperties() override; @@ -289,7 +289,7 @@ class ScOrcusSheet : public orcus::spreadsheet::iface::import_sheet friend class ScOrcusArrayFormula; ScDocumentImport& mrDoc; - SCTAB mnTab; + SCTAB const mnTab; ScOrcusFactory& mrFactory; ScOrcusStyles& mrStyles; sc::SharedFormulaGroups maFormulaGroups; @@ -588,7 +588,7 @@ class ScOrcusFactory : public orcus::spreadsheet::iface::import_factory Matrix }; - ScAddress maPos; + ScAddress const maPos; Type meType; OUString maStr1; diff --git a/sc/source/filter/inc/pagesettings.hxx b/sc/source/filter/inc/pagesettings.hxx index 71d09f373e8b..41b876d26480 100644 --- a/sc/source/filter/inc/pagesettings.hxx +++ b/sc/source/filter/inc/pagesettings.hxx @@ -143,8 +143,8 @@ public: private: struct HFHelperData { - sal_Int32 mnLeftPropId; - sal_Int32 mnRightPropId; + sal_Int32 const mnLeftPropId; + sal_Int32 const mnRightPropId; sal_Int32 mnHeight; sal_Int32 mnBodyDist; bool mbHasContent; diff --git a/sc/source/filter/inc/pivotcachebuffer.hxx b/sc/source/filter/inc/pivotcachebuffer.hxx index 3758ad4afdc5..4c016766c17b 100644 --- a/sc/source/filter/inc/pivotcachebuffer.hxx +++ b/sc/source/filter/inc/pivotcachebuffer.hxx @@ -190,7 +190,7 @@ struct PCFieldGroupModel /** Helper struct for mapping original item names from/to group item names. */ struct PivotCacheGroupItem { - OUString maOrigName; + OUString const maOrigName; OUString maGroupName; explicit PivotCacheGroupItem( const OUString& rItemName ) : diff --git a/sc/source/filter/inc/pivottablebuffer.hxx b/sc/source/filter/inc/pivottablebuffer.hxx index 083d434bfd58..75f8b78006ef 100644 --- a/sc/source/filter/inc/pivottablebuffer.hxx +++ b/sc/source/filter/inc/pivottablebuffer.hxx @@ -177,7 +177,7 @@ private: ItemModelVector maItems; /// All items of this field. PTFieldModel maModel; /// Pivot field settings. OUString maDPFieldName; /// Name of the field in DataPilot field collection. - sal_Int32 mnFieldIndex; /// Zero-based index of this field. + sal_Int32 const mnFieldIndex; /// Zero-based index of this field. }; struct PTFilterModel diff --git a/sc/source/filter/inc/qproform.hxx b/sc/source/filter/inc/qproform.hxx index cecb70d6ec55..d57cfefca43f 100644 --- a/sc/source/filter/inc/qproform.hxx +++ b/sc/source/filter/inc/qproform.hxx @@ -52,7 +52,7 @@ enum FUNC_TYPE class QProToSc : public ConverterBase { private: - TokenId mnAddToken; + TokenId const mnAddToken; SvStream& maIn; public: diff --git a/sc/source/filter/inc/root.hxx b/sc/source/filter/inc/root.hxx index e59893fba469..39fb408cf030 100644 --- a/sc/source/filter/inc/root.hxx +++ b/sc/source/filter/inc/root.hxx @@ -87,7 +87,7 @@ struct LOTUS_ROOT ScDocument* pDoc; LotusRangeList maRangeNames; ScRangeName* pScRangeName; - rtl_TextEncoding eCharsetQ; + rtl_TextEncoding const eCharsetQ; Lotus123Typ eFirstType; Lotus123Typ eActType; ScRange aActRange; diff --git a/sc/source/filter/inc/scenariobuffer.hxx b/sc/source/filter/inc/scenariobuffer.hxx index a9c802bf0124..7beca1ddb0c0 100644 --- a/sc/source/filter/inc/scenariobuffer.hxx +++ b/sc/source/filter/inc/scenariobuffer.hxx @@ -75,7 +75,7 @@ private: ScenarioCellVector maCells; /// Scenario cells. ScenarioModel maModel; /// Scenario model data. - sal_Int16 mnSheet; /// Index of the sheet this scenario is based on. + sal_Int16 const mnSheet; /// Index of the sheet this scenario is based on. }; struct SheetScenariosModel @@ -106,7 +106,7 @@ private: typedef RefVector< Scenario > ScenarioVector; ScenarioVector maScenarios; SheetScenariosModel maModel; - sal_Int16 mnSheet; + sal_Int16 const mnSheet; }; class ScenarioBuffer : public WorkbookHelper diff --git a/sc/source/filter/inc/sheetdatabuffer.hxx b/sc/source/filter/inc/sheetdatabuffer.hxx index 90ebe0ee1f4e..a54b40b89577 100644 --- a/sc/source/filter/inc/sheetdatabuffer.hxx +++ b/sc/source/filter/inc/sheetdatabuffer.hxx @@ -86,7 +86,7 @@ private: typedef ::std::map< sal_Int32, ValueRangeVector > ColSpanVectorMap; ColSpanVectorMap maColSpans; /// Buffered column spans, mapped by row index. - sal_Int32 mnCurrRow; /// Current row index used for buffered cell import. + sal_Int32 const mnCurrRow; /// Current row index used for buffered cell import. }; /** Manages the cell contents and cell formatting of a sheet. @@ -210,7 +210,7 @@ private: struct MergedRange { ScRange maRange; /// The formatted cell range. - sal_Int32 mnHorAlign; /// Horizontal alignment in the range. + sal_Int32 const mnHorAlign; /// Horizontal alignment in the range. explicit MergedRange( const ScRange& rRange ); explicit MergedRange( const ScAddress& rAddress, sal_Int32 nHorAlign ); diff --git a/sc/source/filter/inc/sheetdatacontext.hxx b/sc/source/filter/inc/sheetdatacontext.hxx index 83717637b6d6..5a9e6b778b41 100644 --- a/sc/source/filter/inc/sheetdatacontext.hxx +++ b/sc/source/filter/inc/sheetdatacontext.hxx @@ -42,7 +42,7 @@ struct SheetDataContextBase SheetDataBuffer& mrSheetData; /// The sheet data buffer for cell content and formatting. CellModel maCellData; /// Position, contents, formatting of current imported cell. CellFormulaModel maFmlaData; /// Settings for a cell formula. - sal_Int16 mnSheet; /// Index of the current sheet. + sal_Int16 const mnSheet; /// Index of the current sheet. explicit SheetDataContextBase( const WorksheetHelper& rHelper ); virtual ~SheetDataContextBase(); @@ -59,7 +59,7 @@ class SheetDataContext : public WorksheetContextBase, private SheetDataContextBa // forms the inner loop for bulk data parsing, and for the // duration of this we can drop the solar mutex. #if MULTI_THREAD_SHEET_PARSING - SolarMutexReleaser aReleaser; + SolarMutexReleaser const aReleaser; #endif public: diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx index ee2a42a5b4a3..aa0a4557bd5f 100644 --- a/sc/source/filter/inc/stylesbuffer.hxx +++ b/sc/source/filter/inc/stylesbuffer.hxx @@ -258,7 +258,7 @@ private: FontModel maModel; ApiFontData maApiData; ApiFontUsedFlags maUsedFlags; - bool mbDxf; + bool const mbDxf; }; typedef std::shared_ptr< Font > FontRef; @@ -459,7 +459,7 @@ private: private: BorderModel maModel; ApiBorderData maApiData; - bool mbDxf; + bool const mbDxf; }; typedef std::shared_ptr< Border > BorderRef; @@ -553,7 +553,7 @@ private: PatternModelRef mxPatternModel; GradientModelRef mxGradientModel; ApiSolidFillData maApiData; - bool mbDxf; + bool const mbDxf; }; typedef std::shared_ptr< Fill > FillRef; diff --git a/sc/source/filter/inc/stylesfragment.hxx b/sc/source/filter/inc/stylesfragment.hxx index a5fbc55bc6bf..9d342f59c50a 100644 --- a/sc/source/filter/inc/stylesfragment.hxx +++ b/sc/source/filter/inc/stylesfragment.hxx @@ -93,7 +93,7 @@ protected: private: XfRef mxXf; - bool mbCellXf; /// True = cell XF, false = style XF. + bool const mbCellXf; /// True = cell XF, false = style XF. }; class DxfContext : public WorkbookContextBase diff --git a/sc/source/filter/inc/worksheetbuffer.hxx b/sc/source/filter/inc/worksheetbuffer.hxx index 88addba088e7..73e7fbee3cbc 100644 --- a/sc/source/filter/inc/worksheetbuffer.hxx +++ b/sc/source/filter/inc/worksheetbuffer.hxx @@ -86,9 +86,9 @@ public: private: struct SheetInfo : public SheetInfoModel { - OUString maCalcName; - OUString maCalcQuotedName; - sal_Int16 mnCalcSheet; + OUString const maCalcName; + OUString const maCalcQuotedName; + sal_Int16 const mnCalcSheet; explicit SheetInfo( const SheetInfoModel& rModel, sal_Int16 nCalcSheet, const OUString& rCalcName ); }; diff --git a/sc/source/filter/inc/xcl97esc.hxx b/sc/source/filter/inc/xcl97esc.hxx index 18f519b0d89b..4b5b23b0d5e3 100644 --- a/sc/source/filter/inc/xcl97esc.hxx +++ b/sc/source/filter/inc/xcl97esc.hxx @@ -125,7 +125,7 @@ private: XclEscherClientTextbox* pAdditionalText; sal_uInt16 nAdditionalText; sal_uInt32 mnNextKey; - bool mbIsRootDff; + bool const mbIsRootDff; }; // --- class XclEscherHostAppData ------------------------------------ diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx index e957c677b0fe..7f2df1b43c47 100644 --- a/sc/source/filter/inc/xcl97rec.hxx +++ b/sc/source/filter/inc/xcl97rec.hxx @@ -72,7 +72,7 @@ public: private: static sal_Int32 mnDrawingMLCount, mnVmlCount; - SCTAB mnScTab; + SCTAB const mnScTab; XclEscherEx& mrEscherEx; std::unique_ptr<XclExpMsoDrawing> pMsodrawingPerSheet; @@ -94,9 +94,9 @@ protected: sal_uInt16 nObjId; sal_uInt16 nGrbit; SCTAB mnScTab; - bool bFirstOnSheet; + bool const bFirstOnSheet; - bool mbOwnEscher; /// true = Escher part created on the fly. + bool const mbOwnEscher; /// true = Escher part created on the fly. /** @param bOwnEscher If set to true, this object will create its escher data. See SetOwnEscher() for details. */ @@ -153,14 +153,14 @@ public: class XclObjComment : public XclObj { - ScAddress maScPos; + ScAddress const maScPos; // no need to use std::unique_ptr< SdrCaptionObj, SdrObjectFreeOp > - SdrCaptionObj* mpCaption; + SdrCaptionObj* const mpCaption; - bool mbVisible; - tools::Rectangle maFrom; - tools::Rectangle maTo; + bool const mbVisible; + tools::Rectangle const maFrom; + tools::Rectangle const maTo; public: XclObjComment( XclExpObjectManager& rObjMgr, @@ -181,7 +181,7 @@ public: class XclObjDropDown : public XclObj { private: - bool bIsFiltered; + bool const bIsFiltered; virtual void WriteSubRecs( XclExpStream& rStrm ) override; @@ -300,7 +300,7 @@ public: class ExcBundlesheet8 : public ExcBundlesheetBase { private: - OUString sUnicodeName; + OUString const sUnicodeName; XclExpString GetName() const { return XclExpString( sUnicodeName, XclStrFlags::EightBitLength );} virtual void SaveCont( XclExpStream& rStrm ) override; @@ -328,7 +328,7 @@ public: class XclCodename : public ExcRecord { private: - XclExpString aName; + XclExpString const aName; virtual void SaveCont( XclExpStream& rStrm ) override; public: XclCodename( const OUString& ); @@ -345,9 +345,9 @@ public: class ExcEScenarioCell { private: - sal_uInt16 nCol; - sal_uInt16 nRow; - XclExpString sText; + sal_uInt16 const nCol; + sal_uInt16 nRow; + XclExpString const sText; protected: public: diff --git a/sc/source/filter/inc/xecontent.hxx b/sc/source/filter/inc/xecontent.hxx index fccbf881d9c0..0c46c53039ed 100644 --- a/sc/source/filter/inc/xecontent.hxx +++ b/sc/source/filter/inc/xecontent.hxx @@ -125,7 +125,7 @@ private: private: typedef std::unique_ptr< SvStream > SvStreamPtr; - ScAddress maScPos; /// Position of the hyperlink. + ScAddress const maScPos; /// Position of the hyperlink. OUString m_Repr; /// Cell representation text. SvStreamPtr mxVarData; /// Buffer stream with variable data. sal_uInt32 mnFlags; /// Option flags. @@ -192,7 +192,7 @@ public: private: const ScCondDateFormatEntry& mrFormatEntry; - sal_Int32 mnPriority; + sal_Int32 const mnPriority; }; class XclExpCfvo : public XclExpRecord, protected XclExpRoot @@ -203,8 +203,8 @@ public: virtual void SaveXml( XclExpXmlStream& rStrm ) override; private: const ScColorScaleEntry& mrEntry; - ScAddress maSrcPos; - bool mbFirst; + ScAddress const maSrcPos; + bool const mbFirst; }; class XclExpColScaleCol : public XclExpRecord, protected XclExpRoot @@ -258,7 +258,7 @@ private: XclExpCfvoList maCfvoList; XclExpColScaleColList maColList; - sal_Int32 mnPriority; + sal_Int32 const mnPriority; }; class XclExpDataBar : public XclExpRecord, protected XclExpRoot @@ -273,8 +273,8 @@ private: std::unique_ptr<XclExpColScaleCol> mpCol; const ScDataBarFormat& mrFormat; - sal_Int32 mnPriority; - OString maGUID; + sal_Int32 const mnPriority; + OString const maGUID; }; class XclExpIconSet : public XclExpRecord, protected XclExpRoot @@ -288,7 +288,7 @@ private: XclExpCfvoList maCfvoList; const ScIconSetFormat& mrFormat; - sal_Int32 mnPriority; + sal_Int32 const mnPriority; }; /** Contains all conditional formats of a specific sheet. */ @@ -400,8 +400,8 @@ public: virtual void Save( XclExpStream& rStrm ) override; private: - XclExpString maDestRange; /// Destination range. - XclExpString maUrl; /// Source document URL. + XclExpString const maDestRange; /// Destination range. + XclExpString const maUrl; /// Source document URL. XclExpStringRef mxQryTables; /// List of source range names. sal_Int16 mnRefresh; /// Refresh time in minutes. bool mbEntireDoc; /// true = entire document. diff --git a/sc/source/filter/inc/xedbdata.hxx b/sc/source/filter/inc/xedbdata.hxx index 962f823084b6..7af0af6477c3 100644 --- a/sc/source/filter/inc/xedbdata.hxx +++ b/sc/source/filter/inc/xedbdata.hxx @@ -37,7 +37,7 @@ protected: struct Entry { const ScDBData* mpData; - sal_Int32 mnTableId; /// used as [n] in table[n].xml part name. + sal_Int32 const mnTableId; /// used as [n] in table[n].xml part name. Entry( const ScDBData* pData, sal_Int32 nTableId ); }; diff --git a/sc/source/filter/inc/xeescher.hxx b/sc/source/filter/inc/xeescher.hxx index c908675f3d2c..3a5a467419e9 100644 --- a/sc/source/filter/inc/xeescher.hxx +++ b/sc/source/filter/inc/xeescher.hxx @@ -79,7 +79,7 @@ private: virtual void ImplCalcAnchorRect( const tools::Rectangle& rRect, MapUnit eMapUnit ) override; private: - SCTAB mnScTab; /// Calc sheet index. + SCTAB const mnScTab; /// Calc sheet index. }; /** Represents the position (anchor) of a shape in an embedded draw page. */ @@ -94,9 +94,9 @@ private: virtual void ImplCalcAnchorRect( const tools::Rectangle& rRect, MapUnit eMapUnit ) override; private: - Size maPageSize; - sal_Int32 mnScaleX; - sal_Int32 mnScaleY; + Size const maPageSize; + sal_Int32 const mnScaleX; + sal_Int32 const mnScaleY; }; /** Represents the position (anchor) of a note object. */ @@ -126,7 +126,7 @@ private: protected: XclEscherEx& mrEscherEx; /// Reference to the DFF converter containing the DFF stream. - sal_uInt32 mnFragmentKey; /// The key of the DFF stream fragment to be written by this record. + sal_uInt32 const mnFragmentKey; /// The key of the DFF stream fragment to be written by this record. }; /** The MSODRAWINGGROUP record contains the DGGCONTAINER with global DFF data @@ -158,8 +158,8 @@ public: virtual void SaveXml( XclExpXmlStream& rStrm ) override; private: - Graphic maGraphic; /// The VCL graphic. - sal_uInt16 mnRecId; /// Record identifier for the IMGDATA record. + Graphic const maGraphic; /// The VCL graphic. + sal_uInt16 const mnRecId; /// Record identifier for the IMGDATA record. }; /** Helper class for form controls to manage spreadsheet links . */ @@ -238,7 +238,7 @@ private: virtual void WriteSubRecs( XclExpStream& rStrm ) override; private: - OUString maClassName; /// Class name of the control. + OUString const maClassName; /// Class name of the control. sal_uInt32 mnStrmStart; /// Start position in 'Ctls' stream. sal_uInt32 mnStrmSize; /// Size in 'Ctls' stream. }; @@ -374,7 +374,7 @@ public: virtual void SaveXml( XclExpXmlStream& rStrm ) override; private: - SCTAB mnTab; + SCTAB const mnTab; XclExpNoteList& mrNotes; }; @@ -439,9 +439,9 @@ public: virtual XclExpDffAnchorBase* CreateDffAnchor() const override; private: - Size maPageSize; - sal_Int32 mnScaleX; - sal_Int32 mnScaleY; + Size const maPageSize; + sal_Int32 const mnScaleX; + sal_Int32 const mnScaleY; }; #endif diff --git a/sc/source/filter/inc/xeextlst.hxx b/sc/source/filter/inc/xeextlst.hxx index 4d8ee7bdb930..8b9354b9ebe7 100644 --- a/sc/source/filter/inc/xeextlst.hxx +++ b/sc/source/filter/inc/xeextlst.hxx @@ -51,9 +51,9 @@ public: virtual void SaveXml( XclExpXmlStream& rStrm ) override; private: - ScColorScaleEntryType meType; + ScColorScaleEntryType const meType; OString maValue; - bool mbFirst; + bool const mbFirst; }; class XclExpExtNegativeColor @@ -63,7 +63,7 @@ public: void SaveXml( XclExpXmlStream& rStrm); private: - Color maColor; + Color const maColor; }; class XclExpExtAxisColor @@ -73,7 +73,7 @@ public: void SaveXml( XclExpXmlStream& rStrm ); private: - Color maAxisColor; + Color const maAxisColor; }; class XclExpExtIcon : public XclExpRecordBase, protected XclExpRoot @@ -130,9 +130,9 @@ public: private: XclExpRecordRef mxEntry; - OString maId; + OString const maId; const char* pType; - sal_Int32 mnPriority; + sal_Int32 const mnPriority; }; typedef std::shared_ptr<XclExpExt> XclExpExtRef; diff --git a/sc/source/filter/inc/xehelper.hxx b/sc/source/filter/inc/xehelper.hxx index 69b1f2e76ae7..9287fdf86da0 100644 --- a/sc/source/filter/inc/xehelper.hxx +++ b/sc/source/filter/inc/xehelper.hxx @@ -196,7 +196,7 @@ public: private: XclExpHyperlinkRef mxLinkRec; /// Created HLINK record. - ScAddress maScPos; /// Cell position to set at the HLINK record. + ScAddress const maScPos; /// Cell position to set at the HLINK record. OUString maUrlList; /// List with all processed URLs. bool mbMultipleUrls; /// true = Multiple URL fields processed. }; diff --git a/sc/source/filter/inc/xepage.hxx b/sc/source/filter/inc/xepage.hxx index 6fc206078885..b7747c2e9077 100644 --- a/sc/source/filter/inc/xepage.hxx +++ b/sc/source/filter/inc/xepage.hxx @@ -42,7 +42,7 @@ private: virtual void WriteBody( XclExpStream& rStrm ) override; private: - OUString maHdrString; /// Header or footer contents. + OUString const maHdrString; /// Header or footer contents. }; // General page settings ------------------------------------------------------ @@ -83,7 +83,7 @@ private: private: const ScfUInt16Vec& mrPageBreaks; /// Page settings data of current sheet. - sal_uInt16 mnMaxPos; /// Maximum row/column for BIFF8 page breaks. + sal_uInt16 const mnMaxPos; /// Maximum row/column for BIFF8 page breaks. }; // Page settings ============================================================== diff --git a/sc/source/filter/inc/xepivot.hxx b/sc/source/filter/inc/xepivot.hxx index 261c05297d38..443d2da11ce4 100644 --- a/sc/source/filter/inc/xepivot.hxx +++ b/sc/source/filter/inc/xepivot.hxx @@ -215,7 +215,7 @@ private: ScRange maOrigSrcRange; /// The original sheet source range. ScRange maExpSrcRange; /// The exported sheet source range. ScRange maDocSrcRange; /// The range used to build the cache fields and items. - sal_uInt16 mnListIdx; /// List index in pivot cache buffer. + sal_uInt16 const mnListIdx; /// List index in pivot cache buffer. bool mbValid; /// true = The cache is valid for export. }; diff --git a/sc/source/filter/inc/xepivotxml.hxx b/sc/source/filter/inc/xepivotxml.hxx index 2301cd300fbf..c1eede23e886 100644 --- a/sc/source/filter/inc/xepivotxml.hxx +++ b/sc/source/filter/inc/xepivotxml.hxx @@ -51,8 +51,8 @@ class XclExpXmlPivotTables : public XclExpRecordBase, protected XclExpRoot struct Entry { const ScDPObject* mpTable; - sal_Int32 mnCacheId; - sal_Int32 mnPivotId; /// used as [n] in pivotTable[n].xml part name. + sal_Int32 const mnCacheId; + sal_Int32 const mnPivotId; /// used as [n] in pivotTable[n].xml part name. Entry( const ScDPObject* pTable, sal_Int32 nCacheId, sal_Int32 nPivotId ); }; diff --git a/sc/source/filter/inc/xerecord.hxx b/sc/source/filter/inc/xerecord.hxx index dd968d92aa7b..0e3f019374c5 100644 --- a/sc/source/filter/inc/xerecord.hxx +++ b/sc/source/filter/inc/xerecord.hxx @@ -68,7 +68,7 @@ public: virtual ~XclExpXmlElementRecord() override; protected: - sal_Int32 mnElement; + sal_Int32 const mnElement; }; class XclExpXmlStartElementRecord : public XclExpXmlElementRecord @@ -255,8 +255,8 @@ private: virtual void WriteBody( XclExpStream& rStrm ) override; private: - bool mbValue; /// The record data. - sal_Int32 mnAttribute; /// The attribute to generate within SaveXml() + bool const mbValue; /// The record data. + sal_Int32 const mnAttribute; /// The attribute to generate within SaveXml() }; /** Record which exports a memory data array. */ @@ -292,7 +292,7 @@ public: virtual void Save( XclExpStream& rStrm ) override; private: - XclFutureRecType meRecType; + XclFutureRecType const meRecType; }; // List of records ============================================================ diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx index f8a7cb06a02d..5b10d6a1bf3c 100644 --- a/sc/source/filter/inc/xestream.hxx +++ b/sc/source/filter/inc/xestream.hxx @@ -354,7 +354,7 @@ private: std::stack< sax_fastparser::FSHelperPtr > maStreams; XclExpXmlPathToStateMap maOpenedStreamMap; - bool mbExportVBA; + bool const mbExportVBA; }; #endif diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx index 8ee42dbcb268..994108939fb8 100644 --- a/sc/source/filter/inc/xestyle.hxx +++ b/sc/source/filter/inc/xestyle.hxx @@ -253,9 +253,9 @@ private: /** Stores a core number format index with corresponding Excel format index. */ struct XclExpNumFmt { - sal_uInt32 mnScNumFmt; /// Core index of the number format. - sal_uInt16 mnXclNumFmt; /// Resulting Excel format index. - OUString maNumFmtString; /// format string + sal_uInt32 const mnScNumFmt; /// Core index of the number format. + sal_uInt16 const mnXclNumFmt; /// Resulting Excel format index. + OUString const maNumFmtString; /// format string explicit XclExpNumFmt( sal_uInt32 nScNumFmt, sal_uInt16 nXclNumFmt, const OUString& rFrmt ) : mnScNumFmt( nScNumFmt ), mnXclNumFmt( nXclNumFmt ), maNumFmtString( rFrmt ) {} @@ -298,7 +298,7 @@ private: SvNumberFormatterPtr mxFormatter; /// Special number formatter for conversion. XclExpNumFmtVec maFormatMap; /// Maps core formats to Excel indexes. std::unique_ptr<NfKeywordTable> mpKeywordTable; /// Replacement table. - sal_uInt32 mnStdFmt; /// Key for standard number format. + sal_uInt32 const mnStdFmt; /// Key for standard number format. sal_uInt16 mnXclOffset; /// Offset to first user defined format. }; @@ -543,10 +543,10 @@ private: virtual void WriteBody( XclExpStream& rStrm ) override; private: - OUString maName; /// Name of the cell style. + OUString const maName; /// Name of the cell style. XclExpXFId maXFId; /// XF identifier for style formatting. sal_uInt8 mnStyleId; /// Built-in style identifier. - sal_uInt8 mnLevel; /// Outline level for RowLevel and ColLevel styles. + sal_uInt8 const mnLevel; /// Outline level for RowLevel and ColLevel styles. }; /** Stores all XF records (cell formats and cell styles) in the document. diff --git a/sc/source/filter/inc/xetable.hxx b/sc/source/filter/inc/xetable.hxx index 96cbe9d6baf4..de398e614f89 100644 --- a/sc/source/filter/inc/xetable.hxx +++ b/sc/source/filter/inc/xetable.hxx @@ -55,7 +55,7 @@ private: virtual void WriteBody( XclExpStream& rStrm ) override; private: - XclExpStringRef mxResult; + XclExpStringRef const mxResult; }; // Additional records for special formula ranges @@ -118,7 +118,7 @@ private: virtual void WriteBody( XclExpStream& rStrm ) override; private: - XclTokenArrayRef mxTokArr; /// The token array of a matrix formula. + XclTokenArrayRef const mxTokArr; /// The token array of a matrix formula. }; typedef std::shared_ptr< XclExpArray > XclExpArrayRef; @@ -166,7 +166,7 @@ private: virtual void WriteBody( XclExpStream& rStrm ) override; private: - XclTokenArrayRef mxTokArr; /// The token array of a shared formula. + XclTokenArrayRef const mxTokArr; /// The token array of a shared formula. sal_uInt8 mnUsedCount; /// Number of FORMULA records referring to this record. }; @@ -237,7 +237,7 @@ private: sal_uInt32 mnColInpXclRow; /// Row index of column input cell. sal_uInt16 mnRowInpXclCol; /// Column index of row input cell. sal_uInt32 mnRowInpXclRow; /// Row index of row input cell. - sal_uInt8 mnScMode; /// Type of the multiple operation (Calc constant). + sal_uInt8 const mnScMode; /// Type of the multiple operation (Calc constant). bool mbValid; /// true = Contains valid references. }; @@ -368,7 +368,7 @@ private: virtual void WriteContents( XclExpStream& rStrm ) override; private: - double mfValue; /// The cell value. + double const mfValue; /// The cell value. }; /** Represents a BOOLERR record that describes a cell with a Boolean value. */ @@ -513,8 +513,8 @@ private: private: typedef ::std::vector< XclExpMultiXFId > XclExpMultiXFIdDeq; - sal_uInt16 mnMulRecId; /// Record ID for multiple record variant. - std::size_t mnContSize; /// Data size of contents for one cell + sal_uInt16 const mnMulRecId; /// Record ID for multiple record variant. + std::size_t const mnContSize; /// Data size of contents for one cell XclExpMultiXFIdDeq maXFIds; /// The XF identifiers of the cell formatting. }; @@ -882,14 +882,14 @@ private: typedef XclExpRecordList< XclExpCellBase > XclExpCellList; XclExpCellList maCellList; /// List of cell records for this row. - sal_uInt32 mnXclRow; /// Excel row index of this row. + sal_uInt32 const mnXclRow; /// Excel row index of this row. sal_uInt16 mnHeight; /// Row height in twips. sal_uInt16 mnFlags; /// Flags for the ROW record. sal_uInt16 mnXFIndex; /// Default row formatting. sal_uInt8 mnOutlineLevel; /// Outline Level of row (for OOXML) sal_uInt32 mnXclRowRpt; sal_uInt32 mnCurrentRow; - bool mbAlwaysEmpty; /// true = Do not add blank cells in Finalize(). + bool const mbAlwaysEmpty; /// true = Do not add blank cells in Finalize(). bool mbEnabled; /// true = Write this ROW record. }; @@ -1003,7 +1003,7 @@ private: XclExpShrfmlaBuffer maShrfmlaBfr; /// Buffer for SHRFMLA records. XclExpTableopBuffer maTableopBfr; /// Buffer for TABLEOP records. XclExpDefrowhRef mxDefrowheight; /// DEFROWHEIGHT record for default row format. - XclExpRecordRef mxGuts; /// GUTS record for outline areas. + XclExpRecordRef const mxGuts; /// GUTS record for outline areas. XclExpNoteListRef mxNoteList; /// List of NOTE records. XclExpMergedcellsRef mxMergedcells; /// MERGEDCELLS record for merged cell ranges. XclExpHyperlinkRef mxHyperlinkList; /// List of HLINK records. diff --git a/sc/source/filter/inc/xeview.hxx b/sc/source/filter/inc/xeview.hxx index 0e4176e98083..4416417ea623 100644 --- a/sc/source/filter/inc/xeview.hxx +++ b/sc/source/filter/inc/xeview.hxx @@ -57,10 +57,10 @@ private: virtual void WriteBody( XclExpStream& rStrm ) override; private: - Color maGridColor; /// Grid color (<=BIFF5). + Color const maGridColor; /// Grid color (<=BIFF5). sal_uInt32 mnGridColorId; /// Color ID of grid color (>=BIFF8). sal_uInt16 mnFlags; /// Option flags. - XclAddress maFirstXclPos; /// First visible cell. + XclAddress const maFirstXclPos; /// First visible cell. sal_uInt16 mnNormalZoom; /// Zoom factor for normal view. sal_uInt16 mnPageZoom; /// Zoom factor for pagebreak preview. }; @@ -98,8 +98,8 @@ private: sal_uInt16 mnSplitX; /// Split X position, or frozen column. sal_uInt32 mnSplitY; /// Split Y position, or frozen row. XclAddress maSecondXclPos; /// First visible cell in additional panes. - sal_uInt8 mnActivePane; /// Active pane (with cell cursor). - bool mbFrozenPanes; /// true = "frozen" panes; false = "split" window. + sal_uInt8 const mnActivePane; /// Active pane (with cell cursor). + bool const mbFrozenPanes; /// true = "frozen" panes; false = "split" window. }; /** Represents a SELECTION record with selection data for a pane. */ diff --git a/sc/source/filter/inc/xicontent.hxx b/sc/source/filter/inc/xicontent.hxx index 4a6b53dc8fa1..371cc72ca120 100644 --- a/sc/source/filter/inc/xicontent.hxx +++ b/sc/source/filter/inc/xicontent.hxx @@ -139,7 +139,7 @@ private: ScRangeList maRanges; /// Destination cell ranges. ScCondFmtPtr mxScCondFmt; /// Calc conditional format. - sal_uInt32 mnFormatIndex; /// Index of this conditional format in list. + sal_uInt32 const mnFormatIndex; /// Index of this conditional format in list. sal_uInt16 mnCondCount; /// Number of conditions to be inserted. sal_uInt16 mnCondIndex; /// Condition index to be inserted next. }; @@ -222,7 +222,7 @@ private: OUString maURL; /// Source document URL. OUString maTables; /// List of source range names. - ScRange maDestRange; /// Destination range. + ScRange const maDestRange; /// Destination range. XclImpWebQueryMode meMode; /// Current mode of the web query. sal_uInt16 mnRefresh; /// Refresh time in minutes. }; diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx index 9ad15a4b4f5e..f984725ef4df 100644 --- a/sc/source/filter/inc/xiescher.hxx +++ b/sc/source/filter/inc/xiescher.hxx @@ -431,7 +431,7 @@ private: typedef std::shared_ptr< XclImpChart > XclImpChartRef; XclImpChartRef mxChart; /// The chart itself (BOF/EOF substream data). - bool mbOwnTab; /// true = own sheet; false = embedded object. + bool const mbOwnTab; /// true = own sheet; false = embedded object. }; /** A note object, which is a specialized text box object. */ @@ -492,7 +492,7 @@ private: private: const XclImpRoot& mrRoot; /// Not derived from XclImpRoot to allow multiple inheritance. std::shared_ptr< ScRange > mxSrcRange; /// Source data range in the Calc document. - XclCtrlBindMode meBindMode; /// Value binding mode. + XclCtrlBindMode const meBindMode; /// Value binding mode. }; /** Base class for textbox based form controls. */ @@ -1100,7 +1100,7 @@ private: XclImpObjMapById maObjMapId; /// Maps BIFF8 drawing objects to object ID. XclImpObjTextMap maTextMap; /// Maps BIFF8 TXO textbox data to DFF stream position. ScfUInt16Vec maSkipObjs; /// IDs of all objects to be skipped. - bool mbOleObjs; /// True = draw model supports OLE objects. + bool const mbOleObjs; /// True = draw model supports OLE objects. }; /** Drawing manager of a single sheet. */ @@ -1200,7 +1200,7 @@ private: typedef std::unique_ptr<SvMemoryStream> SvMemoryStreamPtr; SvMemoryStream maDummyStrm; /// Dummy DGG stream for DFF manager. - XclImpSimpleDffConverter maDffConv; /// DFF converter used to resolve palette colors. + XclImpSimpleDffConverter const maDffConv; /// DFF converter used to resolve palette colors. SvMemoryStreamPtr mxMemStrm; /// Helper stream. }; diff --git a/sc/source/filter/inc/xiname.hxx b/sc/source/filter/inc/xiname.hxx index 658d81e195a3..9260e0b0d41c 100644 --- a/sc/source/filter/inc/xiname.hxx +++ b/sc/source/filter/inc/xiname.hxx @@ -67,7 +67,7 @@ private: SCTAB mnScTab; /// Calc sheet index of local names. ScRangeData::Type meNameType; sal_uInt16 mnXclTab; - sal_uInt16 mnNameIndex; + sal_uInt16 const mnNameIndex; bool mbVBName:1; /// true = Visual Basic procedure or function. bool mbMacro:1; /// Whether it's a user-defined macro. diff --git a/sc/source/filter/inc/xistream.hxx b/sc/source/filter/inc/xistream.hxx index 58d9176fb643..a2baae681283 100644 --- a/sc/source/filter/inc/xistream.hxx +++ b/sc/source/filter/inc/xistream.hxx @@ -114,8 +114,8 @@ private: private: ::msfilter::MSCodec_XorXLS95 maCodec; /// Crypto algorithm implementation. css::uno::Sequence< css::beans::NamedValue > maEncryptionData; - sal_uInt16 mnKey; - sal_uInt16 mnHash; + sal_uInt16 const mnKey; + sal_uInt16 const mnHash; }; /** Decrypts BIFF8 stream contents using the given document identifier. */ diff --git a/sc/source/filter/inc/xladdress.hxx b/sc/source/filter/inc/xladdress.hxx index 76e60e1e30d0..141faeb6c71f 100644 --- a/sc/source/filter/inc/xladdress.hxx +++ b/sc/source/filter/inc/xladdress.hxx @@ -152,9 +152,9 @@ public: protected: XclTracer& mrTracer; /// Tracer for invalid addresses. - ScAddress maMaxPos; /// Default maximum position. - sal_uInt16 mnMaxCol; /// Maximum column index, as 16-bit value. - sal_uInt32 mnMaxRow; /// Maximum row index. + ScAddress const maMaxPos; /// Default maximum position. + sal_uInt16 const mnMaxCol; /// Maximum column index, as 16-bit value. + sal_uInt32 const mnMaxRow; /// Maximum row index. bool mbColTrunc; /// Flag for "columns truncated" warning box. bool mbRowTrunc; /// Flag for "rows truncated" warning box. bool mbTabTrunc; /// Flag for "tables truncated" warning box. diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx index 1da9057df893..e14979461f4d 100644 --- a/sc/source/filter/inc/xlchart.hxx +++ b/sc/source/filter/inc/xlchart.hxx @@ -1131,14 +1131,14 @@ enum XclChFrameType struct XclChFormatInfo { XclChObjectType meObjType; /// Object type for automatic format. - XclChPropertyMode mePropMode; /// Property mode for property set helper. - sal_uInt16 mnAutoLineColorIdx; /// Automatic line color index. - sal_Int16 mnAutoLineWeight; /// Automatic line weight (hairline, single, ...). - sal_uInt16 mnAutoPattColorIdx; /// Automatic fill pattern color index. - XclChFrameType meDefFrameType; /// Default format type for missing frame objects. - bool mbCreateDefFrame; /// true = Create missing frame objects on import. - bool mbDeleteDefFrame; /// true = Delete default frame formatting on export. - bool mbIsFrame; /// true = Object is a frame, false = Object is a line. + XclChPropertyMode const mePropMode; /// Property mode for property set helper. + sal_uInt16 const mnAutoLineColorIdx; /// Automatic line color index. + sal_Int16 const mnAutoLineWeight; /// Automatic line weight (hairline, single, ...). + sal_uInt16 const mnAutoPattColorIdx; /// Automatic fill pattern color index. + XclChFrameType const meDefFrameType; /// Default format type for missing frame objects. + bool const mbCreateDefFrame; /// true = Create missing frame objects on import. + bool const mbDeleteDefFrame; /// true = Delete default frame formatting on export. + bool const mbIsFrame; /// true = Object is a frame, false = Object is a line. }; /** Provides access to chart auto formatting for all available object types. */ @@ -1293,8 +1293,8 @@ public: private: css::uno::Reference< css::lang::XMultiServiceFactory > mxFactory; /// Factory to create the container. css::uno::Reference< css::container::XNameContainer > mxContainer; /// Container for the objects. - OUString maServiceName; /// Service name to create the container. - OUString maObjNameBase; /// Base of names for inserted objects. + OUString const maServiceName; /// Service name to create the container. + OUString const maObjNameBase; /// Base of names for inserted objects. sal_Int32 mnIndex; /// Index to create unique identifiers. }; @@ -1399,8 +1399,8 @@ struct XclChRootData css::uno::Reference< css::chart2::XChartDocument > mxChartDoc; /// The chart document. tools::Rectangle maChartRect; /// Position and size of the chart shape. - XclChTypeProvRef mxTypeInfoProv; /// Provides info about chart types. - XclChFmtInfoProvRef mxFmtInfoProv; /// Provides info about auto formatting. + XclChTypeProvRef const mxTypeInfoProv; /// Provides info about chart types. + XclChFmtInfoProvRef const mxFmtInfoProv; /// Provides info about auto formatting. XclChObjectTableRef mxLineDashTable; /// Container for line dash styles. XclChObjectTableRef mxGradientTable; /// Container for gradient fill styles. XclChObjectTableRef mxHatchTable; /// Container for hatch fill styles. diff --git a/sc/source/filter/inc/xlformula.hxx b/sc/source/filter/inc/xlformula.hxx index e97f6b61fafb..07a584c46d58 100644 --- a/sc/source/filter/inc/xlformula.hxx +++ b/sc/source/filter/inc/xlformula.hxx @@ -275,9 +275,9 @@ enum XclFuncParamConv */ struct XclFuncParamInfo { - XclFuncParamValidity meValid; /// Parameter validity. - XclFuncParamConv meConv; /// Token class conversion type. - bool mbValType; /// Data type (false = REFTYPE, true = VALTYPE). + XclFuncParamValidity meValid; /// Parameter validity. + XclFuncParamConv meConv; /// Token class conversion type. + bool mbValType; /// Data type (false = REFTYPE, true = VALTYPE). }; // Function data ============================================================== @@ -312,11 +312,11 @@ struct XclFunctionInfo { OpCode meOpCode; /// Calc function opcode. sal_uInt16 mnXclFunc; /// Excel function index. - sal_uInt8 mnMinParamCount; /// Minimum number of parameters. - sal_uInt8 mnMaxParamCount; /// Maximum number of parameters. - sal_uInt8 mnRetClass; /// Token class of the return value. - XclFuncParamInfo mpParamInfos[ EXC_FUNCINFO_PARAMINFO_COUNT ]; /// Information for all parameters. - sal_uInt8 mnFlags; /// Additional flags (EXC_FUNCFLAG_* constants). + sal_uInt8 const mnMinParamCount; /// Minimum number of parameters. + sal_uInt8 const mnMaxParamCount; /// Maximum number of parameters. + sal_uInt8 const mnRetClass; /// Token class of the return value. + XclFuncParamInfo const mpParamInfos[ EXC_FUNCINFO_PARAMINFO_COUNT ]; /// Information for all parameters. + sal_uInt8 const mnFlags; /// Additional flags (EXC_FUNCFLAG_* constants). const sal_Char* mpcMacroName; /** Function name, if simulated by a macro call (UTF-8) EXC_FUNCFLAG_ADDINEQUIV is 0; or programmatical add-in name @@ -411,7 +411,7 @@ public: private: ScfUInt8Vec maTokVec; /// Byte vector containing token data. ScfUInt8Vec maExtDataVec; /// Byte vector containing extended data (arrays, stacked NLRs). - bool mbVolatile; /// True = Formula contains volatile function. + bool const mbVolatile; /// True = Formula contains volatile function. }; typedef std::shared_ptr< XclTokenArray > XclTokenArrayRef; diff --git a/sc/source/filter/inc/xlpivot.hxx b/sc/source/filter/inc/xlpivot.hxx index d9f04ca98942..a2f3a2741b93 100644 --- a/sc/source/filter/inc/xlpivot.hxx +++ b/sc/source/filter/inc/xlpivot.hxx @@ -515,7 +515,7 @@ public: protected: XclPCFieldInfo maFieldInfo; /// Pivot cache field info (SXFIELD record). XclPCFieldType meFieldType; /// Type of this pivot cache field. - sal_uInt16 mnFieldIdx; /// Own field index in pivot cache. + sal_uInt16 const mnFieldIdx; /// Own field index in pivot cache. ScfUInt16Vec maGroupOrder; /// Order of items in a grouping field (SXGROUPINFO record). XclPCNumGroupInfo maNumGroupInfo; /// Info for numeric grouping (SXNUMGROUP record). }; diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx index 1b799d845b87..8b1a0bfd8a98 100644 --- a/sc/source/filter/inc/xlroot.hxx +++ b/sc/source/filter/inc/xlroot.hxx @@ -72,21 +72,21 @@ struct XclRootData typedef std::shared_ptr< XclTracer > XclTracerRef; typedef std::shared_ptr< RootData > RootDataRef; - XclBiff meBiff; /// Current BIFF version. + XclBiff const meBiff; /// Current BIFF version. XclOutput meOutput; /// Current Output format. SfxMedium& mrMedium; /// The medium to import from. - tools::SvRef<SotStorage> mxRootStrg; /// The root OLE storage of imported/exported file. + tools::SvRef<SotStorage> const mxRootStrg; /// The root OLE storage of imported/exported file. ScDocument& mrDoc; /// The source or destination document. OUString maDocUrl; /// Document URL of imported/exported file. OUString maBasePath; /// Base path of imported/exported file (path of maDocUrl). OUString maUserName; /// Current user name. static const OUStringLiteral gaDefPassword; /// The default password used for stream encryption. rtl_TextEncoding meTextEnc; /// Text encoding to import/export byte strings. - LanguageType meSysLang; /// System language. + LanguageType const meSysLang; /// System language. LanguageType meDocLang; /// Document language (import: from file, export: from system). LanguageType meUILang; /// UI language (import: from file, export: from system). sal_Int16 mnDefApiScript; /// Default script type for blank cells (API constant). - ScAddress maScMaxPos; /// Highest Calc cell position. + ScAddress const maScMaxPos; /// Highest Calc cell position. ScAddress maXclMaxPos; /// Highest Excel cell position. ScAddress maMaxPos; /// Highest position valid in Calc and Excel. diff --git a/sc/source/filter/oox/drawingfragment.cxx b/sc/source/filter/oox/drawingfragment.cxx index b091318bed45..012cf615a342 100644 --- a/sc/source/filter/oox/drawingfragment.cxx +++ b/sc/source/filter/oox/drawingfragment.cxx @@ -316,8 +316,8 @@ public: bool operator()( const ::oox::vml::ShapeBase& rShape ) const; private: - sal_Int32 mnCol; - sal_Int32 mnRow; + sal_Int32 const mnCol; + sal_Int32 const mnRow; }; VmlFindNoteFunc::VmlFindNoteFunc( const ScAddress& rPos ) : diff --git a/sc/source/filter/oox/excelvbaproject.cxx b/sc/source/filter/oox/excelvbaproject.cxx index 1f8c24807597..959097b32417 100644 --- a/sc/source/filter/oox/excelvbaproject.cxx +++ b/sc/source/filter/oox/excelvbaproject.cxx @@ -54,7 +54,7 @@ namespace { struct SheetCodeNameInfo { PropertySet maSheetProps; /// Property set of the sheet without codename. - OUString maPrefix; /// Prefix for the codename to be generated. + OUString const maPrefix; /// Prefix for the codename to be generated. explicit SheetCodeNameInfo( const PropertySet& rSheetProps, const OUString& rPrefix ) : maSheetProps( rSheetProps ), maPrefix( rPrefix ) {} diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx index 9e81b37c55c5..57bfb35b65eb 100644 --- a/sc/source/filter/oox/formulabase.cxx +++ b/sc/source/filter/oox/formulabase.cxx @@ -177,13 +177,13 @@ struct FunctionData { const sal_Char* mpcOdfFuncName; /// ODF function name. const sal_Char* mpcOoxFuncName; /// OOXML function name. - sal_uInt16 mnBiff12FuncId; /// BIFF12 function identifier. - sal_uInt16 mnBiffFuncId; /// BIFF2-BIFF8 function identifier. - sal_uInt8 mnMinParamCount; /// Minimum number of parameters. - sal_uInt8 mnMaxParamCount; /// Maximum number of parameters. - sal_uInt8 mnRetClass; /// BIFF token class of the return value. - FunctionParamInfo mpParamInfos[ FUNCINFO_PARAMINFOCOUNT ]; /// Information about all parameters. - FuncFlags mnFlags; /// Additional flags. + sal_uInt16 const mnBiff12FuncId; /// BIFF12 function identifier. + sal_uInt16 const mnBiffFuncId; /// BIFF2-BIFF8 function identifier. + sal_uInt8 const mnMinParamCount; /// Minimum number of parameters. + sal_uInt8 const mnMaxParamCount; /// Maximum number of parameters. + sal_uInt8 const mnRetClass; /// BIFF token class of the return value. + FunctionParamInfo const mpParamInfos[ FUNCINFO_PARAMINFOCOUNT ]; /// Information about all parameters. + FuncFlags const mnFlags; /// Additional flags. bool isSupported(bool bImportFilter) const; }; diff --git a/sc/source/filter/oox/numberformatsbuffer.cxx b/sc/source/filter/oox/numberformatsbuffer.cxx index 3fc0e6dbe4ac..a40fbfa9065e 100644 --- a/sc/source/filter/oox/numberformatsbuffer.cxx +++ b/sc/source/filter/oox/numberformatsbuffer.cxx @@ -57,8 +57,8 @@ struct BuiltinFormat { sal_Int32 mnNumFmtId; /// Built-in number format index. const sal_Char* mpcFmtCode; /// Format string, UTF-8, may be 0 (mnPredefId is used then). - sal_Int16 mnPredefId; /// Predefined format index, if mpcFmtCode is 0. - sal_Int32 mnReuseId; /// Use this format, if mpcFmtCode is 0 and mnPredefId is -1. + sal_Int16 const mnPredefId; /// Predefined format index, if mpcFmtCode is 0. + sal_Int32 const mnReuseId; /// Use this format, if mpcFmtCode is 0 and mnPredefId is -1. }; /** Defines a literal built-in number format. */ @@ -1857,7 +1857,7 @@ public: private: Reference< XNumberFormats > mxNumFmts; - Locale maEnUsLocale; + Locale const maEnUsLocale; }; NumberFormatFinalizer::NumberFormatFinalizer( const WorkbookHelper& rHelper ) : diff --git a/sc/source/filter/oox/revisionfragment.cxx b/sc/source/filter/oox/revisionfragment.cxx index e63487b0c1db..bc1c58d48121 100644 --- a/sc/source/filter/oox/revisionfragment.cxx +++ b/sc/source/filter/oox/revisionfragment.cxx @@ -51,7 +51,7 @@ enum RevisionType */ class RCCCellValueContext : public WorkbookContextBase { - sal_Int32 mnSheetIndex; + sal_Int32 const mnSheetIndex; ScAddress& mrPos; ScCellValue& mrCellValue; sal_Int32 mnType; diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index 14f020c96509..3132e4c86b11 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -388,7 +388,7 @@ private: bool mbFastRowProgress; /// Do we have a progress bar thread ? ISegmentProgressBarRef mxRowProgress; /// Progress bar for row/cell processing. ISegmentProgressBarRef mxFinalProgress; /// Progress bar for finalization. - WorksheetType meSheetType; /// Type of this sheet. + WorksheetType const meSheetType; /// Type of this sheet. Reference< XSpreadsheet > mxSheet; /// Reference to the current sheet. bool mbHasDefWidth; /// True = default column width is set from defaultColWidth attribute. }; diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx index cbabe68da023..b43abd99e799 100644 --- a/sc/source/filter/orcus/interface.cxx +++ b/sc/source/filter/orcus/interface.cxx @@ -310,7 +310,7 @@ orcus::spreadsheet::iface::import_sheet* ScOrcusFactory::append_sheet( class FindSheetByIndex { - SCTAB mnTab; + SCTAB const mnTab; public: explicit FindSheetByIndex(SCTAB nTab) : mnTab(nTab) {} bool operator() (const std::unique_ptr<ScOrcusSheet>& rSheet) const diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx index 0382228f3ecc..14c84e8510b9 100644 --- a/sc/source/filter/qpro/qproform.cxx +++ b/sc/source/filter/qpro/qproform.cxx @@ -398,8 +398,8 @@ ConvErr QProToSc::Convert( std::unique_ptr<ScTokenArray>& pArray ) static const struct { - DefTokenId nToken; - FUNC_TYPE nType; + DefTokenId const nToken; + FUNC_TYPE const nType; } aFuncMap[] = { { ocPush, FT_ConstFloat }, { ocPush, FT_Cref }, diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx index 587cf654d2d8..e18b82ebc888 100644 --- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx +++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx @@ -39,15 +39,15 @@ struct ScMyActionInfo struct ScMyCellInfo { ScCellValue maCell; - OUString sFormulaAddress; - OUString sFormula; - OUString sInputString; - double fValue; - sal_Int32 nMatrixCols; - sal_Int32 nMatrixRows; - formula::FormulaGrammar::Grammar eGrammar; - sal_uInt16 nType; - ScMatrixMode nMatrixFlag; + OUString const sFormulaAddress; + OUString const sFormula; + OUString sInputString; + double const fValue; + sal_Int32 const nMatrixCols; + sal_Int32 const nMatrixRows; + formula::FormulaGrammar::Grammar const eGrammar; + sal_uInt16 const nType; + ScMatrixMode const nMatrixFlag; ScMyCellInfo( const ScCellValue& rCell, const OUString& sFormulaAddress, const OUString& sFormula, @@ -61,7 +61,7 @@ struct ScMyCellInfo struct ScMyDeleted { - sal_uInt32 nID = 0; + sal_uInt32 const nID = 0; std::unique_ptr<ScMyCellInfo> pCellInfo; ScMyDeleted(sal_uInt32 id, std::unique_ptr<ScMyCellInfo> p) : nID(id), pCellInfo(std::move(p)) {} @@ -69,7 +69,7 @@ struct ScMyDeleted struct ScMyGenerated { - ScBigRange aBigRange; + ScBigRange const aBigRange; sal_uInt32 nID = 0; std::unique_ptr<ScMyCellInfo> pCellInfo; @@ -79,8 +79,8 @@ struct ScMyGenerated struct ScMyInsertionCutOff { - sal_uInt32 nID; - sal_Int32 nPosition; + sal_uInt32 const nID; + sal_Int32 const nPosition; ScMyInsertionCutOff(const sal_uInt32 nTempID, const sal_Int32 nTempPosition) : nID(nTempID), nPosition(nTempPosition) {} @@ -88,9 +88,9 @@ struct ScMyInsertionCutOff struct ScMyMoveCutOff { - sal_uInt32 nID; - sal_Int32 nStartPosition; - sal_Int32 nEndPosition; + sal_uInt32 const nID; + sal_Int32 const nStartPosition; + sal_Int32 const nEndPosition; ScMyMoveCutOff(const sal_uInt32 nTempID, const sal_Int32 nStartPos, const sal_Int32 nEndPos) : nID(nTempID), nStartPosition(nStartPos), nEndPosition(nEndPos) {} @@ -114,7 +114,7 @@ struct ScMyBaseAction sal_uInt32 nActionNumber; sal_uInt32 nRejectingNumber; sal_uInt32 nPreviousAction; - ScChangeActionType nActionType; + ScChangeActionType const nActionType; ScChangeActionState nActionState; explicit ScMyBaseAction(const ScChangeActionType nActionType); diff --git a/sc/source/filter/xml/XMLCodeNameProvider.cxx b/sc/source/filter/xml/XMLCodeNameProvider.cxx index 7b8e1a259a99..ef8f829bcbb1 100644 --- a/sc/source/filter/xml/XMLCodeNameProvider.cxx +++ b/sc/source/filter/xml/XMLCodeNameProvider.cxx @@ -47,10 +47,11 @@ bool XMLCodeNameProvider::_getCodeName( const uno::Any& aAny, OUString& rCodeNam return false; } +static constexpr OUStringLiteral gsDocName( "*doc*" ); +static constexpr OUStringLiteral gsCodeNameProp( "CodeName" ); + XMLCodeNameProvider::XMLCodeNameProvider( ScDocument* pDoc ) : - mpDoc( pDoc ), - msDocName( "*doc*" ), - msCodeNameProp( "CodeName" ) + mpDoc( pDoc ) { } @@ -60,7 +61,7 @@ XMLCodeNameProvider::~XMLCodeNameProvider() sal_Bool SAL_CALL XMLCodeNameProvider::hasByName( const OUString& aName ) { - if( aName == msDocName ) + if( aName == gsDocName ) return !mpDoc->GetCodeName().isEmpty(); SCTAB nCount = mpDoc->GetTableCount(); @@ -81,8 +82,8 @@ uno::Any SAL_CALL XMLCodeNameProvider::getByName( const OUString& aName ) { uno::Any aRet; uno::Sequence<beans::PropertyValue> aProps(1); - aProps[0].Name = msCodeNameProp; - if( aName == msDocName ) + aProps[0].Name = gsCodeNameProp; + if( aName == gsDocName ) { OUString sUCodeName( mpDoc->GetCodeName() ); aProps[0].Value <<= sUCodeName; @@ -113,7 +114,7 @@ uno::Sequence< OUString > SAL_CALL XMLCodeNameProvider::getElementNames( ) aNames.reserve(nCount); if( !mpDoc->GetCodeName().isEmpty() ) - aNames.push_back(msDocName); + aNames.push_back(gsDocName); OUString sSheetName, sCodeName; for( SCTAB i = 0; i < nCount; i++ ) diff --git a/sc/source/filter/xml/XMLCodeNameProvider.hxx b/sc/source/filter/xml/XMLCodeNameProvider.hxx index e0e2156b7e15..499d45d9b005 100644 --- a/sc/source/filter/xml/XMLCodeNameProvider.hxx +++ b/sc/source/filter/xml/XMLCodeNameProvider.hxx @@ -27,9 +27,7 @@ class ScDocument; class XMLCodeNameProvider : public ::cppu::WeakImplHelper< css::container::XNameAccess > { - ScDocument* mpDoc; - OUString msDocName; - OUString msCodeNameProp; + ScDocument* const mpDoc; static bool _getCodeName( const css::uno::Any& aAny, OUString& rCodeName ); diff --git a/sc/source/filter/xml/XMLConverter.cxx b/sc/source/filter/xml/XMLConverter.cxx index b0bfb34fc848..faa292eea4a6 100644 --- a/sc/source/filter/xml/XMLConverter.cxx +++ b/sc/source/filter/xml/XMLConverter.cxx @@ -354,12 +354,12 @@ enum ScXMLConditionTokenType struct ScXMLConditionInfo { - ScXMLConditionToken meToken; - ScXMLConditionTokenType meType; - sheet::ValidationType meValidation; - sheet::ConditionOperator meOperator; + ScXMLConditionToken const meToken; + ScXMLConditionTokenType const meType; + sheet::ValidationType const meValidation; + sheet::ConditionOperator const meOperator; const sal_Char* mpcIdentifier; - sal_Int32 mnIdentLength; + sal_Int32 const mnIdentLength; }; static const ScXMLConditionInfo spConditionInfos[] = diff --git a/sc/source/filter/xml/XMLDDELinksContext.hxx b/sc/source/filter/xml/XMLDDELinksContext.hxx index 713c9ac66b94..f369d5b5a34b 100644 --- a/sc/source/filter/xml/XMLDDELinksContext.hxx +++ b/sc/source/filter/xml/XMLDDELinksContext.hxx @@ -95,7 +95,7 @@ public: class ScXMLDDETableContext : public ScXMLImportContext { - ScXMLDDELinkContext* pDDELink; + ScXMLDDELinkContext* const pDDELink; public: ScXMLDDETableContext( ScXMLImport& rImport, diff --git a/sc/source/filter/xml/XMLDetectiveContext.hxx b/sc/source/filter/xml/XMLDetectiveContext.hxx index 9a21b017c64f..3fb0b2a7b6dc 100644 --- a/sc/source/filter/xml/XMLDetectiveContext.hxx +++ b/sc/source/filter/xml/XMLDetectiveContext.hxx @@ -75,7 +75,7 @@ public: class ScXMLDetectiveContext : public ScXMLImportContext { private: - ScMyImpDetectiveObjVec* pDetectiveObjVec; + ScMyImpDetectiveObjVec* const pDetectiveObjVec; public: ScXMLDetectiveContext( diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx index 187d63383723..3860d1f74095 100644 --- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx +++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx @@ -180,7 +180,7 @@ namespace { class WriteDatabaseRange { ScXMLExport& mrExport; - ScDocument* mpDoc; + ScDocument* const mpDoc; sal_Int32 mnCounter; ScDBCollection::RangeType meRangeType; public: diff --git a/sc/source/filter/xml/XMLExportSharedData.hxx b/sc/source/filter/xml/XMLExportSharedData.hxx index a328310f10be..3724d55c9ed5 100644 --- a/sc/source/filter/xml/XMLExportSharedData.hxx +++ b/sc/source/filter/xml/XMLExportSharedData.hxx @@ -53,7 +53,7 @@ class ScMySharedData std::unique_ptr<ScMyShapesContainer> pShapesContainer; std::unique_ptr<ScMyDetectiveObjContainer> pDetectiveObjContainer; std::unique_ptr<ScMyNoteShapesContainer> pNoteShapes; - sal_Int32 nTableCount; + sal_Int32 const nTableCount; public: explicit ScMySharedData(const sal_Int32 nTableCount); ~ScMySharedData(); diff --git a/sc/source/filter/xml/XMLStylesImportHelper.hxx b/sc/source/filter/xml/XMLStylesImportHelper.hxx index 62b36fb681db..b4f944d66ed7 100644 --- a/sc/source/filter/xml/XMLStylesImportHelper.hxx +++ b/sc/source/filter/xml/XMLStylesImportHelper.hxx @@ -34,8 +34,8 @@ class ScXMLImport; struct ScMyStyleNumberFormat { - OUString sStyleName; - sal_Int32 nNumberFormat; + OUString const sStyleName; + sal_Int32 const nNumberFormat; explicit ScMyStyleNumberFormat(const OUString& rStyleName) : sStyleName(rStyleName), nNumberFormat(-1) {} diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx index a43614c5e774..32e32556a30c 100644 --- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx +++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx @@ -108,7 +108,7 @@ public: class ScXMLDependingsContext : public ScXMLImportContext { - ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper; + ScXMLChangeTrackingImportHelper* const pChangeTrackingImportHelper; public: ScXMLDependingsContext( ScXMLImport& rImport, @@ -129,7 +129,7 @@ public: class ScXMLDeletionsContext : public ScXMLImportContext { - ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper; + ScXMLChangeTrackingImportHelper* const pChangeTrackingImportHelper; public: ScXMLDeletionsContext( ScXMLImport& rImport, @@ -144,12 +144,12 @@ class ScXMLChangeCellContext; class ScXMLChangeTextPContext : public ScXMLImportContext { css::uno::Reference< css::xml::sax::XAttributeList> xAttrList; - OUString sLName; + OUString const sLName; OUStringBuffer sText; ScXMLChangeCellContext* pChangeCellContext; rtl::Reference<SvXMLImportContext> pTextPContext; - sal_uInt16 nPrefix; + sal_uInt16 const nPrefix; public: @@ -287,7 +287,7 @@ public: class ScXMLCutOffsContext : public ScXMLImportContext { - ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper; + ScXMLChangeTrackingImportHelper* const pChangeTrackingImportHelper; public: ScXMLCutOffsContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, diff --git a/sc/source/filter/xml/cachedattraccess.hxx b/sc/source/filter/xml/cachedattraccess.hxx index ce07299e729d..6dbe4e4f1aa5 100644 --- a/sc/source/filter/xml/cachedattraccess.hxx +++ b/sc/source/filter/xml/cachedattraccess.hxx @@ -23,7 +23,7 @@ class ScXMLCachedRowAttrAccess { struct Cache { - sal_Int32 mnTab; + sal_Int32 const mnTab; sal_Int32 mnRow1; sal_Int32 mnRow2; bool mbValue; @@ -39,7 +39,7 @@ public: private: Cache maHidden; Cache maFiltered; - ScDocument* mpDoc; + ScDocument* const mpDoc; }; #endif diff --git a/sc/source/filter/xml/editattributemap.hxx b/sc/source/filter/xml/editattributemap.hxx index 636b38c71137..9bad09d3cc95 100644 --- a/sc/source/filter/xml/editattributemap.hxx +++ b/sc/source/filter/xml/editattributemap.hxx @@ -23,11 +23,11 @@ class ScXMLEditAttributeMap public: struct Entry { - sal_uInt16 nmXMLNS; + sal_uInt16 const nmXMLNS; const char* mpXMLName; const char* mpAPIName; - sal_uInt16 mnItemID; - sal_uInt8 mnFlag; + sal_uInt16 const mnItemID; + sal_uInt8 const mnFlag; }; ScXMLEditAttributeMap(); diff --git a/sc/source/filter/xml/pivotsource.hxx b/sc/source/filter/xml/pivotsource.hxx index e729ef44de2d..faf0a4e06e45 100644 --- a/sc/source/filter/xml/pivotsource.hxx +++ b/sc/source/filter/xml/pivotsource.hxx @@ -37,24 +37,24 @@ struct PivotTableSources struct SheetSource { - ScDPObject* mpDP; - ScSheetSourceDesc maDesc; + ScDPObject* const mpDP; + ScSheetSourceDesc const maDesc; SheetSource( ScDPObject* pObj, const ScSheetSourceDesc& rDesc ); }; struct DBSource { - ScDPObject* mpDP; - ScImportSourceDesc maDesc; + ScDPObject* const mpDP; + ScImportSourceDesc const maDesc; DBSource( ScDPObject* pObj, const ScImportSourceDesc& rDesc ); }; struct ServiceSource { - ScDPObject* mpDP; - ScDPServiceDesc maDesc; + ScDPObject* const mpDP; + ScDPServiceDesc const maDesc; ServiceSource( ScDPObject* pObj, const ScDPServiceDesc& rDesc ); }; diff --git a/sc/source/filter/xml/xmlannoi.hxx b/sc/source/filter/xml/xmlannoi.hxx index 21b78e94cb34..3a06a828ba4f 100644 --- a/sc/source/filter/xml/xmlannoi.hxx +++ b/sc/source/filter/xml/xmlannoi.hxx @@ -32,9 +32,9 @@ class ScXMLTableRowCellContext; struct ScXMLAnnotationStyleEntry { - sal_uInt16 mnFamily; - OUString maName; - ESelection maSelection; + sal_uInt16 const mnFamily; + OUString const maName; + ESelection const maSelection; ScXMLAnnotationStyleEntry( sal_uInt16 nFam, const OUString& rNam, const ESelection& rSel ) : mnFamily( nFam ), diff --git a/sc/source/filter/xml/xmlcelli.hxx b/sc/source/filter/xml/xmlcelli.hxx index 00f4122cdf3a..9b5b82e4ae62 100644 --- a/sc/source/filter/xml/xmlcelli.hxx +++ b/sc/source/filter/xml/xmlcelli.hxx @@ -85,7 +85,7 @@ class ScXMLTableRowCellContext : public ScXMLImportContext sal_Int16 nCellType; bool bIsMerged; bool bIsMatrix; - bool bIsCovered; + bool const bIsCovered; bool bIsEmpty; bool mbNewValueType; bool mbErrorValue; diff --git a/sc/source/filter/xml/xmlcoli.hxx b/sc/source/filter/xml/xmlcoli.hxx index 9b839098d7ac..c43577f0e871 100644 --- a/sc/source/filter/xml/xmlcoli.hxx +++ b/sc/source/filter/xml/xmlcoli.hxx @@ -50,8 +50,8 @@ class ScXMLTableColsContext : public ScXMLImportContext sal_Int32 nHeaderEndCol; sal_Int32 nGroupStartCol; sal_Int32 nGroupEndCol; - bool bHeader; - bool bGroup; + bool const bHeader; + bool const bGroup; bool bGroupDisplay; public: diff --git a/sc/source/filter/xml/xmlcondformat.hxx b/sc/source/filter/xml/xmlcondformat.hxx index 3281ac7ae3f3..0adff7657fea 100644 --- a/sc/source/filter/xml/xmlcondformat.hxx +++ b/sc/source/filter/xml/xmlcondformat.hxx @@ -102,7 +102,7 @@ public: private: ScDataBarFormatData* mpFormatData; - ScConditionalFormat* mpParent; + ScConditionalFormat* const mpParent; sal_Int32 mnIndex; }; @@ -110,7 +110,7 @@ private: class ScXMLIconSetFormatContext : public ScXMLImportContext { ScIconSetFormatData* mpFormatData; - ScConditionalFormat* mpParent; + ScConditionalFormat* const mpParent; public: ScXMLIconSetFormatContext( ScXMLImport& rImport, diff --git a/sc/source/filter/xml/xmldpimp.hxx b/sc/source/filter/xml/xmldpimp.hxx index b99dd73d38eb..a2c6cbe45b4f 100644 --- a/sc/source/filter/xml/xmldpimp.hxx +++ b/sc/source/filter/xml/xmldpimp.hxx @@ -384,7 +384,7 @@ public: class ScXMLDataPilotMembersContext : public ScXMLImportContext { - ScXMLDataPilotFieldContext* pDataPilotField; + ScXMLDataPilotFieldContext* const pDataPilotField; public: diff --git a/sc/source/filter/xml/xmlfilti.hxx b/sc/source/filter/xml/xmlfilti.hxx index fb9fac0302a5..bc32f81fb2e1 100644 --- a/sc/source/filter/xml/xmlfilti.hxx +++ b/sc/source/filter/xml/xmlfilti.hxx @@ -39,7 +39,7 @@ class ScXMLFilterContext : public ScXMLImportContext { struct ConnStackItem { - bool mbOr; + bool const mbOr; int mnCondCount; explicit ConnStackItem(bool bOr); }; diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 3d321ca29382..8c5f649aeee5 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -659,14 +659,15 @@ SvXMLImportContext *ScXMLImport::CreateFastContext( sal_Int32 nElement, return pContext; } +static constexpr OUStringLiteral gsNumberFormat(SC_UNONAME_NUMFMT); +static constexpr OUStringLiteral gsLocale(SC_LOCALE); +static constexpr OUStringLiteral gsCellStyle(SC_UNONAME_CELLSTYL); + ScXMLImport::ScXMLImport( const css::uno::Reference< css::uno::XComponentContext >& rContext, OUString const & implementationName, SvXMLImportFlags nImportFlag) : SvXMLImport( rContext, implementationName, nImportFlag ), pDoc( nullptr ), - sNumberFormat(SC_UNONAME_NUMFMT), - sLocale(SC_LOCALE), - sCellStyle(SC_UNONAME_CELLSTYL), mpPostProcessData(nullptr), aTables(*this), sPrevStyleName(), @@ -1167,7 +1168,7 @@ sal_Int32 ScXMLImport::SetCurrencySymbol(const sal_Int32 nKey, const OUString& r if (xProperties.is()) { lang::Locale aLocale; - if (GetDocument() && (xProperties->getPropertyValue(sLocale) >>= aLocale)) + if (GetDocument() && (xProperties->getPropertyValue(gsLocale) >>= aLocale)) { { ScXMLImport::MutexGuard aGuard(*this); @@ -1267,7 +1268,7 @@ void ScXMLImport::SetType(const uno::Reference <beans::XPropertySet>& rPropertie if ((nCellType != util::NumberFormat::TEXT) && (nCellType != util::NumberFormat::UNDEFINED)) { if (rNumberFormat == -1) - rProperties->getPropertyValue( sNumberFormat ) >>= rNumberFormat; + rProperties->getPropertyValue( gsNumberFormat ) >>= rNumberFormat; OSL_ENSURE(rNumberFormat != -1, "no NumberFormat"); bool bIsStandard; // sCurrentCurrency may be the ISO code abbreviation if the currency @@ -1305,18 +1306,18 @@ void ScXMLImport::SetType(const uno::Reference <beans::XPropertySet>& rPropertie if (nCellType != util::NumberFormat::CURRENCY) { lang::Locale aLocale; - if ( xNumberFormatProperties->getPropertyValue(sLocale) >>= aLocale ) + if ( xNumberFormatProperties->getPropertyValue(gsLocale) >>= aLocale ) { if (!xNumberFormatTypes.is()) xNumberFormatTypes.set(uno::Reference <util::XNumberFormatTypes>(xNumberFormats, uno::UNO_QUERY)); - rProperties->setPropertyValue( sNumberFormat, uno::makeAny(xNumberFormatTypes->getStandardFormat(nCellType, aLocale)) ); + rProperties->setPropertyValue( gsNumberFormat, uno::makeAny(xNumberFormatTypes->getStandardFormat(nCellType, aLocale)) ); } } else if (!rCurrency.isEmpty() && !sCurrentCurrency.isEmpty()) { if (sCurrentCurrency != rCurrency) if (!IsCurrencySymbol(rNumberFormat, sCurrentCurrency, rCurrency)) - rProperties->setPropertyValue( sNumberFormat, uno::makeAny(SetCurrencySymbol(rNumberFormat, rCurrency))); + rProperties->setPropertyValue( gsNumberFormat, uno::makeAny(SetCurrencySymbol(rNumberFormat, rCurrency))); } } } @@ -1330,7 +1331,7 @@ void ScXMLImport::SetType(const uno::Reference <beans::XPropertySet>& rPropertie { if ((nCellType == util::NumberFormat::CURRENCY) && !rCurrency.isEmpty() && !sCurrentCurrency.isEmpty() && sCurrentCurrency != rCurrency && !IsCurrencySymbol(rNumberFormat, sCurrentCurrency, rCurrency)) - rProperties->setPropertyValue( sNumberFormat, uno::makeAny(SetCurrencySymbol(rNumberFormat, rCurrency))); + rProperties->setPropertyValue( gsNumberFormat, uno::makeAny(SetCurrencySymbol(rNumberFormat, rCurrency))); } } } @@ -1398,7 +1399,7 @@ void ScXMLImport::SetStyleToRanges() } else { - xProperties->setPropertyValue(sCellStyle, uno::makeAny(GetStyleDisplayName( XML_STYLE_FAMILY_TABLE_CELL, sPrevStyleName ))); + xProperties->setPropertyValue(gsCellStyle, uno::makeAny(GetStyleDisplayName( XML_STYLE_FAMILY_TABLE_CELL, sPrevStyleName ))); sal_Int32 nNumberFormat(GetStyleNumberFormats()->GetStyleNumberFormat(sPrevStyleName)); bool bInsert(nNumberFormat == -1); SetType(xProperties, nNumberFormat, nPrevCellType, sPrevCurrency); @@ -1627,7 +1628,7 @@ namespace { class RangeNameInserter { - ScDocument* mpDoc; + ScDocument* const mpDoc; ScRangeName& mrRangeName; public: diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx index bccf395f798c..bd3ba747368f 100644 --- a/sc/source/filter/xml/xmlimprt.hxx +++ b/sc/source/filter/xml/xmlimprt.hxx @@ -196,9 +196,9 @@ typedef ::std::list<std::unique_ptr<ScMyNamedExpression>> ScMyNamedExpressions; struct ScMyLabelRange { - OUString sLabelRangeStr; - OUString sDataRangeStr; - bool bColumnOrientation; + OUString const sLabelRangeStr; + OUString const sDataRangeStr; + bool const bColumnOrientation; }; typedef std::list< std::unique_ptr<const ScMyLabelRange> > ScMyLabelRanges; @@ -246,9 +246,6 @@ class ScXMLImport: public SvXMLImport mutable std::unique_ptr<ScXMLEditAttributeMap> mpEditAttrMap; std::unique_ptr<ScXMLChangeTrackingImportHelper> pChangeTrackingImportHelper; std::unique_ptr<ScMyStylesImportHelper> pStylesImportHelper; - OUString sNumberFormat; - OUString sLocale; - OUString sCellStyle; rtl::Reference < XMLPropertyHandlerFactory > xScPropHdlFactory; rtl::Reference < XMLPropertySetMapper > xCellStylesPropertySetMapper; diff --git a/sc/source/filter/xml/xmlnexpi.hxx b/sc/source/filter/xml/xmlnexpi.hxx index 8601ee9a4eb2..6824c7b73041 100644 --- a/sc/source/filter/xml/xmlnexpi.hxx +++ b/sc/source/filter/xml/xmlnexpi.hxx @@ -66,7 +66,7 @@ public: virtual void insert(ScMyNamedExpression* pExp) override; private: ScXMLImport& mrImport; - SCTAB mnTab; + SCTAB const mnTab; }; ScXMLNamedExpressionsContext( diff --git a/sc/source/filter/xml/xmlrowi.hxx b/sc/source/filter/xml/xmlrowi.hxx index 56cb9f6cc96f..c67cfcfeeb39 100644 --- a/sc/source/filter/xml/xmlrowi.hxx +++ b/sc/source/filter/xml/xmlrowi.hxx @@ -51,8 +51,8 @@ class ScXMLTableRowsContext : public ScXMLImportContext { SCROW nHeaderStartRow; SCROW nGroupStartRow; - bool bHeader; - bool bGroup; + bool const bHeader; + bool const bGroup; bool bGroupDisplay; public: diff --git a/sc/source/filter/xml/xmlstyli.hxx b/sc/source/filter/xml/xmlstyli.hxx index 1babf9cd5bfb..3e5907d63b63 100644 --- a/sc/source/filter/xml/xmlstyli.hxx +++ b/sc/source/filter/xml/xmlstyli.hxx @@ -130,7 +130,7 @@ class XMLTableStylesContext : public SvXMLStylesContext sal_Int32 nConditionalFormatIndex; sal_Int32 nCellStyleIndex; sal_Int32 nMasterPageNameIndex; - bool bAutoStyles; + bool const bAutoStyles; rtl::Reference < SvXMLImportPropertyMapper > xCellImpPropMapper; rtl::Reference < SvXMLImportPropertyMapper > xColumnImpPropMapper; diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index ace156f82e9a..6966e9ac9428 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -110,13 +110,9 @@ ScAccessibleShapeData::~ScAccessibleShapeData() struct ScShapeDataLess { - OUString msLayerId; - OUString msZOrder; - ScShapeDataLess() - : msLayerId( "LayerID" ), - msZOrder( "ZOrder" ) - { - } + static constexpr OUStringLiteral gsLayerId = "LayerID"; + static constexpr OUStringLiteral gsZOrder = "ZOrder"; + static void ConvertLayerId(sal_Int16& rLayerID) // changes the number of the LayerId so it the accessibility order { // note: MSVC 2017 ICE's if this is written as "switch" so use "if" @@ -137,13 +133,13 @@ struct ScShapeDataLess rLayerID = 3; } } - bool LessThanSheet(const ScAccessibleShapeData* pData) const + static bool LessThanSheet(const ScAccessibleShapeData* pData) { bool bResult(false); uno::Reference< beans::XPropertySet> xProps(pData->xShape, uno::UNO_QUERY); if (xProps.is()) { - uno::Any aPropAny = xProps->getPropertyValue(msLayerId); + uno::Any aPropAny = xProps->getPropertyValue(gsLayerId); sal_Int16 nLayerID = 0; if( aPropAny >>= nLayerID ) { @@ -162,17 +158,17 @@ struct ScShapeDataLess uno::Reference< beans::XPropertySet> xProps2(pData2->xShape, uno::UNO_QUERY); if (xProps1.is() && xProps2.is()) { - uno::Any aPropAny1 = xProps1->getPropertyValue(msLayerId); - uno::Any aPropAny2 = xProps2->getPropertyValue(msLayerId); + uno::Any aPropAny1 = xProps1->getPropertyValue(gsLayerId); + uno::Any aPropAny2 = xProps2->getPropertyValue(gsLayerId); sal_Int16 nLayerID1(0); sal_Int16 nLayerID2(0); if( (aPropAny1 >>= nLayerID1) && (aPropAny2 >>= nLayerID2) ) { if (nLayerID1 == nLayerID2) { - uno::Any aAny1 = xProps1->getPropertyValue(msZOrder); + uno::Any aAny1 = xProps1->getPropertyValue(gsZOrder); sal_Int32 nZOrder1 = 0; - uno::Any aAny2 = xProps2->getPropertyValue(msZOrder); + uno::Any aAny2 = xProps2->getPropertyValue(gsZOrder); sal_Int32 nZOrder2 = 0; if ( (aAny1 >>= nZOrder1) && (aAny2 >>= nZOrder2) ) bResult = (nZOrder1 < nZOrder2); @@ -196,6 +192,11 @@ struct ScShapeDataLess } }; +#if !HAVE_CPP_INLINE_VARIABLES +constexpr OUStringLiteral ScShapeDataLess::gsLayerId; +constexpr OUStringLiteral ScShapeDataLess::gsZOrder; +#endif + struct DeselectShape { void operator() (const ScAccessibleShapeData* pAccShapeData) const @@ -297,7 +298,7 @@ private: mutable sal_uInt32 mnShapesSelected; ScTabViewShell* mpViewShell; ScAccessibleDocument* mpAccessibleDocument; - ScSplitPos meSplitPos; + ScSplitPos const meSplitPos; void FillShapes(std::vector < uno::Reference < drawing::XShape > >& rShapes) const; bool FindSelectedShapesChanges(const css::uno::Reference<css::drawing::XShapes>& xShapes) const; diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx index 84cdfe7df845..8fe872f73da4 100644 --- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx @@ -97,7 +97,7 @@ public: private: ScPreviewShell* mpViewShell; - ScAccessibleDocumentPagePreview* mpAccDoc; + ScAccessibleDocumentPagePreview* const mpAccDoc; typedef std::vector<ScAccNote> ScAccNotes; mutable ScAccNotes maNotes; mutable ScAccNotes maMarks; @@ -258,7 +258,7 @@ uno::Reference<XAccessible> ScNotesChildren::GetChild(sal_Int32 nIndex) const struct ScPointFound { - tools::Rectangle maPoint; + tools::Rectangle const maPoint; sal_Int32 mnParagraphs; explicit ScPointFound(const Point& rPoint) : maPoint(rPoint, Size(0, 0)), mnParagraphs(0) {} bool operator() (const ScAccNote& rNote) @@ -416,7 +416,7 @@ sal_Int32 ScNotesChildren::CheckChanges(const ScPreviewLocationData& rData, struct ScChildGone { - ScAccessibleDocumentPagePreview* mpAccDoc; + ScAccessibleDocumentPagePreview* const mpAccDoc; explicit ScChildGone(ScAccessibleDocumentPagePreview* pAccDoc) : mpAccDoc(pAccDoc) {} void operator() (const uno::Reference<XAccessible>& xAccessible) const { @@ -434,7 +434,7 @@ struct ScChildGone struct ScChildNew { - ScAccessibleDocumentPagePreview* mpAccDoc; + ScAccessibleDocumentPagePreview* const mpAccDoc; explicit ScChildNew(ScAccessibleDocumentPagePreview* pAccDoc) : mpAccDoc(pAccDoc) {} void operator() (const uno::Reference<XAccessible>& xAccessible) const { @@ -635,7 +635,7 @@ public: void SetDrawBroadcaster(); private: - ScAccessibleDocumentPagePreview* mpAccDoc; + ScAccessibleDocumentPagePreview* const mpAccDoc; ScPreviewShell* mpViewShell; ScShapeRangeVec maShapeRanges; @@ -927,7 +927,7 @@ uno::Reference<XAccessible> ScShapeChildren::GetControl(sal_Int32 nIndex) const struct ScShapePointFound { - Point maPoint; + Point const maPoint; explicit ScShapePointFound(const awt::Point& rPoint) : maPoint(VCLPoint(rPoint)) {} bool operator() (const ScShapeChild& rShape) { diff --git a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx index 79de53138b64..2edec7eb6391 100644 --- a/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx +++ b/sc/source/ui/Accessibility/AccessibleFilterMenu.cxx @@ -72,7 +72,7 @@ public: } private: Reference<XAccessibleEventListener> mxListener; - bool mbAdd; + bool const mbAdd; }; } diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx index a38b609a3b1c..ecb5622c9319 100644 --- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx +++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx @@ -93,7 +93,6 @@ struct ScZoomSliderWnd::ScZoomSliderWnd_Impl sal_uInt16 mnCurrentZoom; sal_uInt16 mnMinZoom; sal_uInt16 mnMaxZoom; - sal_uInt16 mnSliderCenter; std::vector< long > maSnappingPointOffsets; std::vector< sal_uInt16 > maSnappingPointZooms; Image maSliderButton; @@ -105,7 +104,6 @@ struct ScZoomSliderWnd::ScZoomSliderWnd_Impl mnCurrentZoom( nCurrentZoom ), mnMinZoom( 10 ), mnMaxZoom( 400 ), - mnSliderCenter( 100 ), maSnappingPointOffsets(), maSnappingPointZooms(), maSliderButton(), @@ -116,6 +114,8 @@ struct ScZoomSliderWnd::ScZoomSliderWnd_Impl } }; +static constexpr sal_uInt16 gnSliderCenter(100); + const long nButtonWidth = 10; const long nButtonHeight = 10; const long nIncDecWidth = 11; @@ -160,7 +160,7 @@ sal_uInt16 ScZoomSliderWnd::Offset2Zoom( long nOffset ) const if( nOffset < nControlWidth / 2 ) { // first half of slider - const long nFirstHalfRange = mpImpl->mnSliderCenter - mpImpl->mnMinZoom; + const long nFirstHalfRange = gnSliderCenter - mpImpl->mnMinZoom; const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset; const long nZoomPerSliderPixel = (1000 * nFirstHalfRange) / nHalfSliderWidth; const long nOffsetToSliderLeft = nOffset - nSliderXOffset; @@ -169,11 +169,11 @@ sal_uInt16 ScZoomSliderWnd::Offset2Zoom( long nOffset ) const else { // second half of slider - const long nSecondHalfRange = mpImpl->mnMaxZoom - mpImpl->mnSliderCenter; + const long nSecondHalfRange = mpImpl->mnMaxZoom - gnSliderCenter; const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset; const long nZoomPerSliderPixel = 1000 * nSecondHalfRange / nHalfSliderWidth; const long nOffsetToSliderCenter = nOffset - nControlWidth/2; - nRet = mpImpl->mnSliderCenter + sal_uInt16( nOffsetToSliderCenter * nZoomPerSliderPixel / 1000 ); + nRet = gnSliderCenter + sal_uInt16( nOffsetToSliderCenter * nZoomPerSliderPixel / 1000 ); } } @@ -193,18 +193,18 @@ long ScZoomSliderWnd::Zoom2Offset( sal_uInt16 nCurrentZoom ) const long nRect = nSliderXOffset; const long nHalfSliderWidth = nControlWidth/2 - nSliderXOffset; - if( nCurrentZoom <= mpImpl->mnSliderCenter ) + if( nCurrentZoom <= gnSliderCenter ) { nCurrentZoom = nCurrentZoom - mpImpl->mnMinZoom; - const long nFirstHalfRange = mpImpl->mnSliderCenter - mpImpl->mnMinZoom; + const long nFirstHalfRange = gnSliderCenter - mpImpl->mnMinZoom; const long nSliderPixelPerZoomPercent = 1000 * nHalfSliderWidth / nFirstHalfRange; const long nOffset = (nSliderPixelPerZoomPercent * nCurrentZoom) / 1000; nRect += nOffset; } else { - nCurrentZoom = nCurrentZoom - mpImpl->mnSliderCenter; - const long nSecondHalfRange = mpImpl->mnMaxZoom - mpImpl->mnSliderCenter; + nCurrentZoom = nCurrentZoom - gnSliderCenter; + const long nSecondHalfRange = mpImpl->mnMaxZoom - gnSliderCenter; const long nSliderPixelPerZoomPercent = 1000 * nHalfSliderWidth / nSecondHalfRange; const long nOffset = (nSliderPixelPerZoomPercent * nCurrentZoom) / 1000; nRect += nHalfSliderWidth + nOffset; @@ -338,9 +338,9 @@ void ScZoomSliderWnd::UpdateFromItem( const SvxZoomSliderItem* pZoomSliderItem ) mpImpl->mnMaxZoom = pZoomSliderItem->GetMaxZoom(); OSL_ENSURE( mpImpl->mnMinZoom <= mpImpl->mnCurrentZoom && - mpImpl->mnMinZoom < mpImpl->mnSliderCenter && + mpImpl->mnMinZoom < gnSliderCenter && mpImpl->mnMaxZoom >= mpImpl->mnCurrentZoom && - mpImpl->mnMaxZoom > mpImpl->mnSliderCenter, + mpImpl->mnMaxZoom > gnSliderCenter, "Looks like the zoom slider item is corrupted" ); const css::uno::Sequence < sal_Int32 > rSnappingPoints = pZoomSliderItem->GetSnappingPoints(); mpImpl->maSnappingPointOffsets.clear(); diff --git a/sc/source/ui/dataprovider/dataprovider.cxx b/sc/source/ui/dataprovider/dataprovider.cxx index 6a7016fd43f6..8c13add177e4 100644 --- a/sc/source/ui/dataprovider/dataprovider.cxx +++ b/sc/source/ui/dataprovider/dataprovider.cxx @@ -63,7 +63,6 @@ ExternalDataSource::ExternalDataSource(const OUString& rURL, const OUString& rProvider, ScDocument* pDoc) : maURL(rURL) , maProvider(rProvider) - , mnUpdateFrequency(0.0) , mpDoc(pDoc) { } @@ -136,7 +135,7 @@ void ExternalDataSource::setDBData(const OUString& rDBName) double ExternalDataSource::getUpdateFrequency() const { - return mnUpdateFrequency; + return 0; } ScDBDataManager* ExternalDataSource::getDBManager() diff --git a/sc/source/ui/dataprovider/htmldataprovider.cxx b/sc/source/ui/dataprovider/htmldataprovider.cxx index b83a046f0d36..d5b1903d93ff 100644 --- a/sc/source/ui/dataprovider/htmldataprovider.cxx +++ b/sc/source/ui/dataprovider/htmldataprovider.cxx @@ -25,10 +25,10 @@ namespace sc { class HTMLFetchThread : public salhelper::Thread { ScDocument& mrDocument; - OUString maURL; - OUString maID; + OUString const maURL; + OUString const maID; const std::vector<std::shared_ptr<sc::DataTransformation>> maDataTransformations; - std::function<void()> maImportFinishedHdl; + std::function<void()> const maImportFinishedHdl; void handleTable(xmlNodePtr pTable); void handleRow(xmlNodePtr pRow, SCROW nRow); diff --git a/sc/source/ui/dataprovider/htmldataprovider.hxx b/sc/source/ui/dataprovider/htmldataprovider.hxx index 7589b28b37a5..ae211850c9a3 100644 --- a/sc/source/ui/dataprovider/htmldataprovider.hxx +++ b/sc/source/ui/dataprovider/htmldataprovider.hxx @@ -21,7 +21,7 @@ class HTMLDataProvider : public DataProvider { private: - ScDocument* mpDocument; + ScDocument* const mpDocument; rtl::Reference<HTMLFetchThread> mxHTMLFetchThread; ScDocumentUniquePtr mpDoc; diff --git a/sc/source/ui/dataprovider/xmldataprovider.cxx b/sc/source/ui/dataprovider/xmldataprovider.cxx index 95c5e467e1f2..67bd92e3ddad 100644 --- a/sc/source/ui/dataprovider/xmldataprovider.cxx +++ b/sc/source/ui/dataprovider/xmldataprovider.cxx @@ -23,12 +23,12 @@ namespace sc class XMLFetchThread : public salhelper::Thread { ScDocument& mrDocument; - OUString maURL; - OUString maID; + OUString const maURL; + OUString const maID; ScOrcusImportXMLParam maParam; std::unique_ptr<ScOrcusXMLContext> mpXMLContext; const std::vector<std::shared_ptr<sc::DataTransformation>> maDataTransformations; - std::function<void()> maImportFinishedHdl; + std::function<void()> const maImportFinishedHdl; public: XMLFetchThread(ScDocument& rDoc, const OUString&, const ScOrcusImportXMLParam& rParam, diff --git a/sc/source/ui/dataprovider/xmldataprovider.hxx b/sc/source/ui/dataprovider/xmldataprovider.hxx index 286d6aa120c2..fef995522019 100644 --- a/sc/source/ui/dataprovider/xmldataprovider.hxx +++ b/sc/source/ui/dataprovider/xmldataprovider.hxx @@ -20,7 +20,7 @@ class DataTransformation; class XMLDataProvider : public DataProvider { private: - ScDocument* mpDocument; + ScDocument* const mpDocument; rtl::Reference<XMLFetchThread> mxXMLFetchThread; ScDocumentUniquePtr mpDoc; diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index f5b63fd3a48f..bff66aa2609e 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -47,7 +47,7 @@ struct Func_SetType { - sal_Int32 mnType; + sal_Int32 const mnType; explicit Func_SetType( sal_Int32 nType ) : mnType( nType ) {} void operator()( ScCsvColState& rState ) const { rState.mnType = mnType; } @@ -55,7 +55,7 @@ struct Func_SetType struct Func_Select { - bool mbSelect; + bool const mbSelect; explicit Func_Select( bool bSelect ) : mbSelect( bSelect ) {} void operator()( ScCsvColState& rState ) const { rState.Select( mbSelect ); } diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index ac3293403fd5..cddaf40e997b 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -285,6 +285,8 @@ static void lcl_SaveSeparators( aItem.PutProperties(aNames, aValues); } +static constexpr OUStringLiteral gaTextSepList(SCSTR_TEXTSEP); + ScImportAsciiDlg::ScImportAsciiDlg( vcl::Window* pParent, const OUString& aDatName, SvStream* pInStream, ScImportAsciiCall eCall ) : ModalDialog (pParent, "TextImportCsvDialog", @@ -294,7 +296,6 @@ ScImportAsciiDlg::ScImportAsciiDlg( vcl::Window* pParent, const OUString& aDatNa mnRowPosCount(0), - aTextSepList(SCSTR_TEXTSEP), mcTextSep ( ScAsciiOptions::cDefaultTextSep ), meCall(eCall), mbDetectSpaceSep(eCall != SC_TEXTTOCOLUMNS) @@ -431,7 +432,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( vcl::Window* pParent, const OUString& aDatNa pNfRow->SetModifyHdl( LINK( this, ScImportAsciiDlg, FirstRowHdl ) ); // *** Separator characters *** - lcl_FillCombo( *pCbTextSep, aTextSepList, mcTextSep ); + lcl_FillCombo( *pCbTextSep, gaTextSepList, mcTextSep ); pCbTextSep->SetText( sTextSeparators ); Link<Edit&,void> aSeparatorHdl = LINK( this, ScImportAsciiDlg, SeparatorEditHdl ); @@ -646,7 +647,7 @@ void ScImportAsciiDlg::GetOptions( ScAsciiOptions& rOpt ) rOpt.SetFieldSeps( GetSeparators() ); rOpt.SetMergeSeps( pCkbAsOnce->IsChecked() ); rOpt.SetRemoveSpace( pCkbRemoveSpace->IsChecked() ); - rOpt.SetTextSep( lcl_CharFromCombo( *pCbTextSep, aTextSepList ) ); + rOpt.SetTextSep( lcl_CharFromCombo( *pCbTextSep, gaTextSepList ) ); } rOpt.SetQuotedAsText(pCkbQuotedAsText->IsChecked()); @@ -776,7 +777,7 @@ void ScImportAsciiDlg::SeparatorHdl( const Control* pCtrl ) OUString aOldFldSeps( maFieldSeparators); maFieldSeparators = GetSeparators(); sal_Unicode cOldSep = mcTextSep; - mcTextSep = lcl_CharFromCombo( *pCbTextSep, aTextSepList ); + mcTextSep = lcl_CharFromCombo( *pCbTextSep, gaTextSepList ); // Any separator changed may result in completely different lines due to // embedded line breaks. if (cOldSep != mcTextSep || aOldFldSeps != maFieldSeparators) 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<SvStream> 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<DataStream, o3tl::default_delete<DataStream>> mpDataStream; std::atomic<sfx2::LinkManager*> 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; diff --git a/sc/source/ui/inc/AccessibilityHints.hxx b/sc/source/ui/inc/AccessibilityHints.hxx index 3a289dd1db87..3b47217d6fbf 100644 --- a/sc/source/ui/inc/AccessibilityHints.hxx +++ b/sc/source/ui/inc/AccessibilityHints.hxx @@ -38,7 +38,7 @@ public: class ScAccGridWinFocusLostHint : public ScAccWinFocusLostHint { - ScSplitPos eOldGridWin; + ScSplitPos const eOldGridWin; public: ScAccGridWinFocusLostHint( ScSplitPos eOldGridWin ); virtual ~ScAccGridWinFocusLostHint() override; @@ -48,7 +48,7 @@ public: class ScAccGridWinFocusGotHint : public ScAccWinFocusGotHint { - ScSplitPos eNewGridWin; + ScSplitPos const eNewGridWin; public: ScAccGridWinFocusGotHint( ScSplitPos eNewGridWin ); virtual ~ScAccGridWinFocusGotHint() override; diff --git a/sc/source/ui/inc/AccessibleCellBase.hxx b/sc/source/ui/inc/AccessibleCellBase.hxx index 78b5316f7799..442ff773640e 100644 --- a/sc/source/ui/inc/AccessibleCellBase.hxx +++ b/sc/source/ui/inc/AccessibleCellBase.hxx @@ -114,7 +114,7 @@ protected: ScDocument* mpDoc; - sal_Int32 mnIndex; + sal_Int32 const mnIndex; private: virtual bool IsEditable( diff --git a/sc/source/ui/inc/AccessibleContextBase.hxx b/sc/source/ui/inc/AccessibleContextBase.hxx index c5b4f66179a1..d616fa708e54 100644 --- a/sc/source/ui/inc/AccessibleContextBase.hxx +++ b/sc/source/ui/inc/AccessibleContextBase.hxx @@ -284,7 +284,7 @@ private: /** This is the role of this object. */ - sal_Int16 maRole; + sal_Int16 const maRole; }; #endif diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx index 4dd0ed01ef05..d2c5de0997ce 100644 --- a/sc/source/ui/inc/AccessibleCsvControl.hxx +++ b/sc/source/ui/inc/AccessibleCsvControl.hxx @@ -472,9 +472,9 @@ protected: private: OUString maCellText; /// The text contents of this cell. - sal_Int32 mnLine; /// The grid line index (core index). - sal_uInt32 mnColumn; /// The grid column index (core index). - sal_Int32 mnIndex; /// The index of the cell in the table. + sal_Int32 const mnLine; /// The grid line index (core index). + sal_uInt32 const mnColumn; /// The grid column index (core index). + sal_Int32 const mnIndex; /// The index of the cell in the table. public: explicit ScAccessibleCsvCell( diff --git a/sc/source/ui/inc/AccessibleDocument.hxx b/sc/source/ui/inc/AccessibleDocument.hxx index e2ada8048adf..c3441465121c 100644 --- a/sc/source/ui/inc/AccessibleDocument.hxx +++ b/sc/source/ui/inc/AccessibleDocument.hxx @@ -227,7 +227,7 @@ protected: private: ScTabViewShell* mpViewShell; - ScSplitPos meSplitPos; + ScSplitPos const meSplitPos; rtl::Reference<ScAccessibleSpreadsheet> mpAccessibleSpreadsheet; std::unique_ptr<ScChildrenShapes> mpChildrenShapes; ScAccessibleEditObject* mpTempAccEdit; diff --git a/sc/source/ui/inc/AccessibleEditObject.hxx b/sc/source/ui/inc/AccessibleEditObject.hxx index fe6aa89a87a7..7fb9c6c1b569 100644 --- a/sc/source/ui/inc/AccessibleEditObject.hxx +++ b/sc/source/ui/inc/AccessibleEditObject.hxx @@ -164,7 +164,7 @@ private: std::unique_ptr<accessibility::AccessibleTextHelper> mpTextHelper; EditView* mpEditView; VclPtr<vcl::Window> mpWindow; - EditObjectType meObjectType; + EditObjectType const meObjectType; bool mbHasFocus; bool IsDefunc( diff --git a/sc/source/ui/inc/AccessiblePageHeader.hxx b/sc/source/ui/inc/AccessiblePageHeader.hxx index ac1b8ea2c403..b0ec25cc8143 100644 --- a/sc/source/ui/inc/AccessiblePageHeader.hxx +++ b/sc/source/ui/inc/AccessiblePageHeader.hxx @@ -77,8 +77,8 @@ protected: private: ScPreviewShell* mpViewShell; - sal_Int32 mnIndex; - bool mbHeader; + sal_Int32 const mnIndex; + bool const mbHeader; std::vector< rtl::Reference<ScAccessiblePageHeaderArea> > maAreas; sal_Int32 mnChildCount; diff --git a/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx b/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx index e579dd7a1b33..1217e7b5af57 100644 --- a/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx +++ b/sc/source/ui/inc/AccessiblePreviewHeaderCell.hxx @@ -115,7 +115,7 @@ protected: private: ScPreviewShell* mpViewShell; accessibility::AccessibleTextHelper* mpTextHelper; - sal_Int32 mnIndex; + sal_Int32 const mnIndex; ScAddress maCellPos; bool mbColumnHeader; bool mbRowHeader; diff --git a/sc/source/ui/inc/AccessiblePreviewTable.hxx b/sc/source/ui/inc/AccessiblePreviewTable.hxx index 54d7b92f8190..212f0244f5b5 100644 --- a/sc/source/ui/inc/AccessiblePreviewTable.hxx +++ b/sc/source/ui/inc/AccessiblePreviewTable.hxx @@ -123,7 +123,7 @@ protected: private: ScPreviewShell* mpViewShell; - sal_Int32 mnIndex; + sal_Int32 const mnIndex; mutable std::unique_ptr<ScPreviewTableInfo> mpTableInfo; bool IsDefunc( diff --git a/sc/source/ui/inc/AccessibleSpreadsheet.hxx b/sc/source/ui/inc/AccessibleSpreadsheet.hxx index 613d749f3376..ab7a070fd48f 100644 --- a/sc/source/ui/inc/AccessibleSpreadsheet.hxx +++ b/sc/source/ui/inc/AccessibleSpreadsheet.hxx @@ -221,7 +221,7 @@ private: ScSplitPos meSplitPos; ScAddress maActiveCell; SCTAB mnTab; - bool mbIsSpreadsheet; + bool const mbIsSpreadsheet; bool mbDelIns; bool mbIsFocusSend; diff --git a/sc/source/ui/inc/AccessibleTableBase.hxx b/sc/source/ui/inc/AccessibleTableBase.hxx index 1c3ba06ec137..2655fe67f0d7 100644 --- a/sc/source/ui/inc/AccessibleTableBase.hxx +++ b/sc/source/ui/inc/AccessibleTableBase.hxx @@ -226,7 +226,7 @@ public: protected: /// contains the range of the table, because it could be a subrange of the complete table - ScRange maRange; + ScRange const maRange; ScDocument* mpDoc; diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx index aa222531282a..ec9e1a8f4411 100644 --- a/sc/source/ui/inc/AccessibleText.hxx +++ b/sc/source/ui/inc/AccessibleText.hxx @@ -92,7 +92,7 @@ public: private: std::unique_ptr<ScViewForwarder> mpViewForwarder; ScTabViewShell* mpViewShell; - ScSplitPos meSplitPos; + ScSplitPos const meSplitPos; ScAccessibleCell* mpAccessibleCell; using ScAccessibleCellBaseTextData::GetDocShell; @@ -189,9 +189,9 @@ public: private: std::unique_ptr<ScPreviewViewForwarder> mpViewForwarder; ScPreviewShell* mpViewShell; - OUString maText; - bool mbColHeader; - bool mbRowHeader; + OUString const maText; + bool const mbColHeader; + bool const mbRowHeader; using ScAccessibleCellBaseTextData::GetDocShell; static ScDocShell* GetDocShell(ScPreviewShell* pViewShell); @@ -221,7 +221,7 @@ private: ScDocShell* mpDocSh; const EditTextObject* mpEditObj; bool mbDataValid; - SvxAdjust meAdjust; + SvxAdjust const meAdjust; }; class ScAccessibleNoteTextData : public ScAccessibleTextData @@ -246,9 +246,9 @@ private: std::unique_ptr<ScEditEngineDefaulter> mpEditEngine; std::unique_ptr<SvxEditEngineForwarder> mpForwarder; ScDocShell* mpDocSh; - OUString msText; - ScAddress maCellPos; - bool mbMarkNote; + OUString const msText; + ScAddress const maCellPos; + bool const mbMarkNote; bool mbDataValid; }; @@ -262,8 +262,8 @@ private: EditEngine* mpEditEngine; TextForwarderPtr mpTextForwarder; ViewForwarderPtr mpViewForwarder; - OUString maCellText; - Size maCellSize; + OUString const maCellText; + Size const maCellSize; public: explicit ScAccessibleCsvTextData( diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx b/sc/source/ui/inc/PivotLayoutDialog.hxx index 96d6218adb3d..c35693609105 100644 --- a/sc/source/ui/inc/PivotLayoutDialog.hxx +++ b/sc/source/ui/inc/PivotLayoutDialog.hxx @@ -27,7 +27,7 @@ class ScItemValue final { public: - OUString maName; + OUString const maName; ScPivotFuncData maFunctionData; ScItemValue* mpOriginalItemValue; @@ -46,9 +46,9 @@ public: private: ScViewData* mpViewData; - ScDocument* mpDocument; + ScDocument* const mpDocument; - bool mbNewPivotTable; + bool const mbNewPivotTable; VclPtr<ScPivotLayoutTreeListLabel> mpListBoxField; VclPtr<ScPivotLayoutTreeList> mpListBoxPage; @@ -82,7 +82,7 @@ private: VclPtr<CancelButton> mpBtnCancel; VclPtr<formula::RefEdit> mpActiveEdit; - ScAddress::Details maAddressDetails; + ScAddress::Details const maAddressDetails; bool mbDialogLostFocus; DECL_LINK(CancelClicked, Button*, void); diff --git a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx index e1c4da9311f8..7719a679105e 100644 --- a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx +++ b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx @@ -53,8 +53,8 @@ private: VclPtr<CloseButton> mpButtonClose; // Data - ScViewData* mpViewData; - ScDocument* mpDoc; + ScViewData* const mpViewData; + ScDocument* const mpDoc; ScRange maInputRange; diff --git a/sc/source/ui/inc/SamplingDialog.hxx b/sc/source/ui/inc/SamplingDialog.hxx index 39504e3c186b..8446227c9d41 100644 --- a/sc/source/ui/inc/SamplingDialog.hxx +++ b/sc/source/ui/inc/SamplingDialog.hxx @@ -53,14 +53,14 @@ private: VclPtr<formula::RefEdit> mpActiveEdit; // Data - ScViewData* mViewData; - ScDocument* mDocument; + ScViewData* const mViewData; + ScDocument* const mDocument; - ScRange mInputRange; - ScAddress::Details mAddressDetails; - ScAddress mOutputAddress; + ScRange mInputRange; + ScAddress::Details const mAddressDetails; + ScAddress mOutputAddress; - ScAddress mCurrentAddress; + ScAddress const mCurrentAddress; bool mDialogLostFocus; diff --git a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx index c74be8514c53..683d24112c77 100644 --- a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx +++ b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx @@ -56,13 +56,13 @@ protected: VclPtr<RadioButton> mpGroupByRowsRadio; // Data - ScViewData* mViewData; - ScDocument* mDocument; + ScViewData* const mViewData; + ScDocument* const mDocument; - ScRange mInputRange; - ScAddress::Details mAddressDetails; - ScAddress mOutputAddress; - GroupedBy mGroupedBy; + ScRange mInputRange; + ScAddress::Details const mAddressDetails; + ScAddress mOutputAddress; + GroupedBy mGroupedBy; static ScRangeList MakeColumnRangeList(SCTAB aTab, ScAddress const & aStart, ScAddress const & aEnd); static ScRangeList MakeRowRangeList(SCTAB aTab, ScAddress const & aStart, ScAddress const & aEnd); @@ -72,8 +72,8 @@ private: VclPtr<OKButton> mpButtonOk; VclPtr<formula::RefEdit> mpActiveEdit; - ScAddress mCurrentAddress; - bool mDialogLostFocus; + ScAddress const mCurrentAddress; + bool mDialogLostFocus; void Init(); void GetRangeFromSelection(); diff --git a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx index f154acc7cd9f..ea6fadbe7a97 100644 --- a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx +++ b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx @@ -59,15 +59,15 @@ protected: VclPtr<formula::RefButton> mpOutputRangeButton; // Data - ScViewData* mViewData; - ScDocument* mDocument; + ScViewData* const mViewData; + ScDocument* const mDocument; - ScRange mVariable1Range; - ScRange mVariable2Range; + ScRange mVariable1Range; + ScRange mVariable2Range; - ScAddress::Details mAddressDetails; - ScAddress mOutputAddress; - GroupedBy mGroupedBy; + ScAddress::Details const mAddressDetails; + ScAddress mOutputAddress; + GroupedBy mGroupedBy; private: // Widgets @@ -77,8 +77,8 @@ private: VclPtr<RadioButton> mpGroupByRowsRadio; VclPtr<formula::RefEdit> mpActiveEdit; - ScAddress mCurrentAddress; - bool mDialogLostFocus; + ScAddress const mCurrentAddress; + bool mDialogLostFocus; void Init(); void GetRangeFromSelection(); diff --git a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx index c52cf2838fb0..a5d1176a8bae 100644 --- a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx +++ b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx @@ -25,7 +25,7 @@ class FormulaTemplate { private: OUString mTemplate; - ScDocument* mpDoc; + ScDocument* const mpDoc; bool mbUse3D; typedef std::map<OUString, ScRange> RangeReplacementMap; @@ -58,7 +58,7 @@ public: std::vector<ScAddress> mAddressStack; ScAddress mCurrentAddress; - ScAddress mMinimumAddress; + ScAddress const mMinimumAddress; ScAddress mMaximumAddress; AddressWalker(const ScAddress& aInitialAddress); @@ -79,7 +79,7 @@ class AddressWalkerWriter : public AddressWalker public: ScDocShell* mpDocShell; ScDocument* mpDocument; - formula::FormulaGrammar::Grammar meGrammar; + formula::FormulaGrammar::Grammar const meGrammar; AddressWalkerWriter(const ScAddress& aInitialAddress, ScDocShell* pDocShell, ScDocument* pDocument, formula::FormulaGrammar::Grammar eGrammar ); @@ -95,8 +95,8 @@ public: class DataCellIterator final { private: - ScRange mInputRange; - bool mByColumn; + ScRange const mInputRange; + bool const mByColumn; SCCOL mCol; SCROW mRow; @@ -113,7 +113,7 @@ public: class DataRangeIterator { protected: - ScRange mInputRange; + ScRange const mInputRange; sal_Int32 mIndex; public: diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx index 2cca8dcc3416..a1d52b400387 100644 --- a/sc/source/ui/inc/acredlin.hxx +++ b/sc/source/ui/inc/acredlin.hxx @@ -72,13 +72,13 @@ class ScAcceptChgDlg final : public SfxModelessDialog OUString aStrMove; OUString aStrContent; OUString aStrReject; - OUString aStrAllAccepted; - OUString aStrAllRejected; - OUString aStrNoEntry; - OUString aStrContentWithChild; - OUString aStrChildContent; - OUString aStrChildOrgContent; - OUString aStrEmpty; + OUString const aStrAllAccepted; + OUString const aStrAllRejected; + OUString const aStrNoEntry; + OUString const aStrContentWithChild; + OUString const aStrChildContent; + OUString const aStrChildOrgContent; + OUString const aStrEmpty; OUString aUnknown; sal_uLong nAcceptCount; sal_uLong nRejectCount; diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index 084f15e1b62c..d868083031cc 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -47,7 +47,7 @@ class ScFormulaReferenceHelper VclPtr<formula::RefEdit> m_pRefEdit; // active input field VclPtr<formula::RefButton> m_pRefBtn; // associated button VclPtr<vcl::Window> m_pWindow; - SfxBindings* m_pBindings; + SfxBindings* const m_pBindings; ::std::unique_ptr<Accelerator> m_pAccel; // for Enter/Escape ::std::vector<VclPtr<vcl::Window> > m_aHiddenWidgets; // vector of hidden Controls @@ -113,7 +113,7 @@ public: private: ScFormulaReferenceHelper m_aHelper; - SfxBindings* m_pMyBindings; + SfxBindings* const m_pMyBindings; VclPtr<vcl::Window> m_pActiveWin; Idle m_aIdle; diff --git a/sc/source/ui/inc/areasave.hxx b/sc/source/ui/inc/areasave.hxx index a21a5b4f0073..cf4cbc587810 100644 --- a/sc/source/ui/inc/areasave.hxx +++ b/sc/source/ui/inc/areasave.hxx @@ -30,12 +30,12 @@ class ScAreaLink; class ScAreaLinkSaver { private: - OUString aFileName; - OUString aFilterName; - OUString aOptions; - OUString aSourceArea; - ScRange aDestArea; - sal_uLong nRefresh; + OUString const aFileName; + OUString const aFilterName; + OUString const aOptions; + OUString const aSourceArea; + ScRange const aDestArea; + sal_uLong const nRefresh; public: ScAreaLinkSaver( const ScAreaLink& rSource ); diff --git a/sc/source/ui/inc/autostyl.hxx b/sc/source/ui/inc/autostyl.hxx index d84f7a2a077e..8c951603c8ce 100644 --- a/sc/source/ui/inc/autostyl.hxx +++ b/sc/source/ui/inc/autostyl.hxx @@ -39,10 +39,10 @@ struct ScAutoStyleData }; struct ScAutoStyleInitData { - ScRange aRange; - OUString aStyle1; - sal_uLong nTimeout; - OUString aStyle2; + ScRange const aRange; + OUString const aStyle1; + sal_uLong const nTimeout; + OUString const aStyle2; ScAutoStyleInitData( const ScRange& rR, const OUString& rSt1, sal_uLong nT, const OUString& rSt2 ) : aRange(rR), aStyle1(rSt1), nTimeout(nT), aStyle2(rSt2) {} diff --git a/sc/source/ui/inc/cellmergeoption.hxx b/sc/source/ui/inc/cellmergeoption.hxx index 282cf9a585be..4d88d6194186 100644 --- a/sc/source/ui/inc/cellmergeoption.hxx +++ b/sc/source/ui/inc/cellmergeoption.hxx @@ -23,7 +23,7 @@ struct ScCellMergeOption SCROW mnStartRow; SCCOL mnEndCol; SCROW mnEndRow; - bool mbCenter; + bool const mbCenter; explicit ScCellMergeOption(const ScRange& rRange); explicit ScCellMergeOption(SCCOL nStartCol, SCROW nStartRow, diff --git a/sc/source/ui/inc/colorformat.hxx b/sc/source/ui/inc/colorformat.hxx index 8838418cfc18..00cc4e798f9e 100644 --- a/sc/source/ui/inc/colorformat.hxx +++ b/sc/source/ui/inc/colorformat.hxx @@ -46,8 +46,8 @@ private: OUString maStrWarnSameValue; SvNumberFormatter* mpNumberFormatter; - ScDocument* mpDoc; - ScAddress maPos; + ScDocument* const mpDoc; + ScAddress const maPos; DECL_LINK(OkBtnHdl, Button*, void); DECL_LINK(TypeSelectHdl, ListBox&, void); diff --git a/sc/source/ui/inc/colrowba.hxx b/sc/source/ui/inc/colrowba.hxx index b5f793fea0ac..fe5e0e24d75a 100644 --- a/sc/source/ui/inc/colrowba.hxx +++ b/sc/source/ui/inc/colrowba.hxx @@ -29,7 +29,7 @@ class ScTabView; class ScColBar : public ScHeaderControl { - ScHSplitPos meWhich; + ScHSplitPos const meWhich; ScHeaderFunctionSet* mpFuncSet; public: @@ -59,7 +59,7 @@ public: class ScRowBar : public ScHeaderControl { - ScVSplitPos meWhich; + ScVSplitPos const meWhich; ScHeaderFunctionSet* mpFuncSet; public: diff --git a/sc/source/ui/inc/condformatdlgentry.hxx b/sc/source/ui/inc/condformatdlgentry.hxx index 086c7c7ee6ed..53cf931c8a71 100644 --- a/sc/source/ui/inc/condformatdlgentry.hxx +++ b/sc/source/ui/inc/condformatdlgentry.hxx @@ -53,7 +53,7 @@ private: VclPtr<FixedText> maFtCondNr; VclPtr<FixedText> maFtCondition; - OUString maStrCondition; + OUString const maStrCondition; protected: VclPtr<ListBox> maLbType; diff --git a/sc/source/ui/inc/condformatdlgitem.hxx b/sc/source/ui/inc/condformatdlgitem.hxx index 149bf6d61351..89523b9c237b 100644 --- a/sc/source/ui/inc/condformatdlgitem.hxx +++ b/sc/source/ui/inc/condformatdlgitem.hxx @@ -61,9 +61,9 @@ public: private: std::shared_ptr<ScConditionalFormatList> mpCondFormats; - sal_Int32 mnItem; + sal_Int32 const mnItem; condformat::dialog::ScCondFormatDialogType meDialogType; - bool mbManaged; + bool const mbManaged; }; #endif diff --git a/sc/source/ui/inc/condformatmgr.hxx b/sc/source/ui/inc/condformatmgr.hxx index 369bfb679f5f..fec437fd6fa1 100644 --- a/sc/source/ui/inc/condformatmgr.hxx +++ b/sc/source/ui/inc/condformatmgr.hxx @@ -32,7 +32,7 @@ private: OUString createEntryString(const ScConditionalFormat& rFormat); void setColSizes(); - ScDocument* mpDoc; + ScDocument* const mpDoc; ScConditionalFormatList* mpFormatList; std::map<SvTreeListEntry*, sal_Int32> maMapLBoxEntryToCondIndex; diff --git a/sc/source/ui/inc/condformatuno.hxx b/sc/source/ui/inc/condformatuno.hxx index 4ee0adc680af..65ce1e4a70f7 100644 --- a/sc/source/ui/inc/condformatuno.hxx +++ b/sc/source/ui/inc/condformatuno.hxx @@ -70,7 +70,7 @@ public: ScConditionalFormatList* getCoreObject(); private: - SCTAB mnTab; + SCTAB const mnTab; ScDocShell* mpDocShell; }; @@ -120,8 +120,8 @@ public: private: rtl::Reference<ScCondFormatsObj> mxCondFormatList; ScDocShell* mpDocShell; - SfxItemPropertySet maPropSet; - sal_Int32 mnKey; + SfxItemPropertySet const maPropSet; + sal_Int32 const mnKey; }; class ScConditionEntryObj : public cppu::WeakImplHelper<css::beans::XPropertySet, @@ -157,7 +157,7 @@ public: private: ScDocShell* mpDocShell; rtl::Reference<ScCondFormatObj> mxParent; - SfxItemPropertySet maPropSet; + SfxItemPropertySet const maPropSet; const ScCondFormatEntry* mpFormat; }; @@ -193,7 +193,7 @@ public: private: rtl::Reference<ScCondFormatObj> mxParent; - SfxItemPropertySet maPropSet; + SfxItemPropertySet const maPropSet; const ScColorScaleFormat* mpFormat; }; @@ -220,7 +220,7 @@ private: ScColorScaleEntry* getCoreObject(); rtl::Reference<ScColorScaleFormatObj> mxParent; - size_t mnPos; + size_t const mnPos; }; class ScDataBarFormatObj : public cppu::WeakImplHelper<css::beans::XPropertySet, @@ -254,7 +254,7 @@ public: private: rtl::Reference<ScCondFormatObj> mxParent; - SfxItemPropertySet maPropSet; + SfxItemPropertySet const maPropSet; const ScDataBarFormat* mpFormat; }; @@ -277,7 +277,7 @@ private: ScColorScaleEntry* getCoreObject(); rtl::Reference<ScDataBarFormatObj> mxParent; - size_t mnPos; + size_t const mnPos; }; class ScIconSetFormatObj : public cppu::WeakImplHelper<css::beans::XPropertySet, @@ -311,7 +311,7 @@ public: private: rtl::Reference<ScCondFormatObj> mxParent; - SfxItemPropertySet maPropSet; + SfxItemPropertySet const maPropSet; const ScIconSetFormat* mpFormat; }; @@ -334,7 +334,7 @@ private: ScColorScaleEntry* getCoreObject(); rtl::Reference<ScIconSetFormatObj> mxParent; - size_t mnPos; + size_t const mnPos; }; class ScCondDateFormatObj : public cppu::WeakImplHelper<css::beans::XPropertySet, @@ -369,7 +369,7 @@ public: private: rtl::Reference<ScCondFormatObj> mxParent; - SfxItemPropertySet maPropSet; + SfxItemPropertySet const maPropSet; const ScCondDateFormatEntry* mpFormat; }; diff --git a/sc/source/ui/inc/conflictsdlg.hxx b/sc/source/ui/inc/conflictsdlg.hxx index 96b5414b31df..67d7aab30183 100644 --- a/sc/source/ui/inc/conflictsdlg.hxx +++ b/sc/source/ui/inc/conflictsdlg.hxx @@ -75,11 +75,11 @@ public: class ScConflictsFinder final { private: - ScChangeTrack* mpTrack; - sal_uLong mnStartShared; - sal_uLong mnEndShared; - sal_uLong mnStartOwn; - sal_uLong mnEndOwn; + ScChangeTrack* const mpTrack; + sal_uLong const mnStartShared; + sal_uLong const mnEndShared; + sal_uLong const mnStartOwn; + sal_uLong const mnEndOwn; ScConflictsList& mrConflictsList; static bool DoActionsIntersect( const ScChangeAction* pAction1, const ScChangeAction* pAction2 ); @@ -122,13 +122,13 @@ private: VclPtr<PushButton> m_pBtnKeepAllMine; VclPtr<PushButton> m_pBtnKeepAllOthers; - OUString maStrTitleConflict; - OUString maStrUnknownUser; + OUString const maStrTitleConflict; + OUString const maStrUnknownUser; - ScViewData* mpViewData; + ScViewData* const mpViewData; ScDocument* mpOwnDoc; ScChangeTrack* mpOwnTrack; - ScDocument* mpSharedDoc; + ScDocument* const mpSharedDoc; ScChangeTrack* mpSharedTrack; ScConflictsList& mrConflictsList; diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx index 5c6429e8825c..d4cab7300678 100644 --- a/sc/source/ui/inc/consdlg.hxx +++ b/sc/source/ui/inc/consdlg.hxx @@ -72,15 +72,15 @@ private: VclPtr<PushButton> pBtnAdd; VclPtr<PushButton> pBtnRemove; - OUString aStrUndefined; + OUString const aStrUndefined; - ScConsolidateParam theConsData; + ScConsolidateParam const theConsData; ScViewData& rViewData; - ScDocument* pDoc; + ScDocument* const pDoc; std::unique_ptr<ScRangeUtil> pRangeUtil; std::unique_ptr<ScAreaData[]> pAreaData; size_t nAreaDataCount; - sal_uInt16 nWhichCons; + sal_uInt16 const nWhichCons; VclPtr<formula::RefEdit> pRefInputEdit; bool bDlgLostFocus; diff --git a/sc/source/ui/inc/crnrdlg.hxx b/sc/source/ui/inc/crnrdlg.hxx index ff1b346208c7..23b332b2ab58 100644 --- a/sc/source/ui/inc/crnrdlg.hxx +++ b/sc/source/ui/inc/crnrdlg.hxx @@ -67,7 +67,7 @@ private: typedef std::unordered_map< OUString, ScRange > NameRangeMap; NameRangeMap aRangeMap; - ScViewData* pViewData; + ScViewData* const pViewData; ScDocument* pDoc; VclPtr<formula::RefEdit> pEdActive; bool bDlgLostFocus; diff --git a/sc/source/ui/inc/csvcontrol.hxx b/sc/source/ui/inc/csvcontrol.hxx index 9c348fa9c2b1..7ef77ef1b9dc 100644 --- a/sc/source/ui/inc/csvcontrol.hxx +++ b/sc/source/ui/inc/csvcontrol.hxx @@ -135,7 +135,7 @@ struct ScCsvLayoutData sal_Int32 mnColCursor; /// Position of grid column cursor. mutable sal_Int32 mnNoRepaint; /// >0 = no repaint. - bool mbAppRTL; /// true = application in RTL mode. + bool const mbAppRTL; /// true = application in RTL mode. explicit ScCsvLayoutData(); diff --git a/sc/source/ui/inc/csvgrid.hxx b/sc/source/ui/inc/csvgrid.hxx index 3dfe6abfc6fd..2fc364f650a2 100644 --- a/sc/source/ui/inc/csvgrid.hxx +++ b/sc/source/ui/inc/csvgrid.hxx @@ -76,7 +76,7 @@ private: Color maSelectColor; /// Header color of selected columns. ScEditEnginePtr mpEditEngine; /// For drawing cell texts. - vcl::Font maHeaderFont; /// Font for column and row headers. + vcl::Font const maHeaderFont; /// Font for column and row headers. vcl::Font maMonoFont; /// Monospace font for data cells. Size maWinSize; /// Size of the control. Size maEdEngSize; /// Paper size for edit engine. diff --git a/sc/source/ui/inc/dataprovider.hxx b/sc/source/ui/inc/dataprovider.hxx index 9f1d0a179e51..a3311e7fde80 100644 --- a/sc/source/ui/inc/dataprovider.hxx +++ b/sc/source/ui/inc/dataprovider.hxx @@ -47,7 +47,7 @@ class DataTransformation; class CSVFetchThread : public salhelper::Thread { ScDocument& mrDocument; - OUString maURL; + OUString const maURL; bool mbTerminate; osl::Mutex maMtxTerminate; @@ -56,7 +56,7 @@ class CSVFetchThread : public salhelper::Thread std::vector<std::shared_ptr<sc::DataTransformation>> maDataTransformations; - std::function<void()> maImportFinishedHdl; + std::function<void()> const maImportFinishedHdl; public: @@ -104,7 +104,7 @@ public: class CSVDataProvider : public DataProvider { rtl::Reference<CSVFetchThread> mxCSVFetchThread; - ScDocument* mpDocument; + ScDocument* const mpDocument; ScDocumentUniquePtr mpDoc; void Refresh(); diff --git a/sc/source/ui/inc/datatransformation.hxx b/sc/source/ui/inc/datatransformation.hxx index a8c54dabbd59..8077dce93e9d 100644 --- a/sc/source/ui/inc/datatransformation.hxx +++ b/sc/source/ui/inc/datatransformation.hxx @@ -62,7 +62,7 @@ public: class SC_DLLPUBLIC ColumnRemoveTransformation : public DataTransformation { - std::set<SCCOL> maColumns; + std::set<SCCOL> const maColumns; public: @@ -75,8 +75,8 @@ public: class SC_DLLPUBLIC SplitColumnTransformation : public DataTransformation { - SCCOL mnCol; - sal_Unicode mcSeparator; + SCCOL const mnCol; + sal_Unicode const mcSeparator; public: @@ -89,7 +89,7 @@ public: class SC_DLLPUBLIC MergeColumnTransformation : public DataTransformation { - std::set<SCCOL> maColumns; + std::set<SCCOL> const maColumns; OUString maMergeString; public: @@ -103,7 +103,7 @@ public: class SC_DLLPUBLIC SortTransformation : public DataTransformation { - ScSortParam maSortParam; + ScSortParam const maSortParam; public: SortTransformation(const ScSortParam& rParam); @@ -114,8 +114,8 @@ public: class SC_DLLPUBLIC TextTransformation : public DataTransformation { - std::set<SCCOL> mnCol; - TEXT_TRANSFORM_TYPE maType; + std::set<SCCOL> const mnCol; + TEXT_TRANSFORM_TYPE const maType; public: TextTransformation(const std::set<SCCOL>& nCol, const TEXT_TRANSFORM_TYPE rType); @@ -127,8 +127,8 @@ class SC_DLLPUBLIC TextTransformation : public DataTransformation class SC_DLLPUBLIC AggregateFunction : public DataTransformation { - std::set<SCCOL> maColumns; - AGGREGATE_FUNCTION maType; + std::set<SCCOL> const maColumns; + AGGREGATE_FUNCTION const maType; public: AggregateFunction(const std::set<SCCOL>& rColumns, const AGGREGATE_FUNCTION rType); @@ -140,9 +140,9 @@ class SC_DLLPUBLIC AggregateFunction : public DataTransformation class SC_DLLPUBLIC NumberTransformation : public DataTransformation { - std::set<SCCOL> mnCol; - NUMBER_TRANSFORM_TYPE maType; - int maPrecision; + std::set<SCCOL> const mnCol; + NUMBER_TRANSFORM_TYPE const maType; + int const maPrecision; public: NumberTransformation(const std::set<SCCOL>& nCol, const NUMBER_TRANSFORM_TYPE rType); @@ -157,8 +157,8 @@ class SC_DLLPUBLIC NumberTransformation : public DataTransformation class SC_DLLPUBLIC ReplaceNullTransformation : public DataTransformation { - std::set<SCCOL> mnCol; - OUString msReplaceWith; + std::set<SCCOL> const mnCol; + OUString const msReplaceWith; public: ReplaceNullTransformation(const std::set<SCCOL>& nCol, const OUString& sReplaceWith); @@ -170,8 +170,8 @@ class SC_DLLPUBLIC ReplaceNullTransformation : public DataTransformation class SC_DLLPUBLIC DateTimeTransformation : public DataTransformation { - std::set<SCCOL> mnCol; - DATETIME_TRANSFORMATION_TYPE maType; + std::set<SCCOL> const mnCol; + DATETIME_TRANSFORMATION_TYPE const maType; public: DateTimeTransformation(const std::set<SCCOL>& nCol, diff --git a/sc/source/ui/inc/dbnamdlg.hxx b/sc/source/ui/inc/dbnamdlg.hxx index 4c04a25d3c6f..70b41eab3836 100644 --- a/sc/source/ui/inc/dbnamdlg.hxx +++ b/sc/source/ui/inc/dbnamdlg.hxx @@ -77,9 +77,9 @@ private: OUString aStrOperations; ScViewData* pViewData; - ScDocument* pDoc; + ScDocument* const pDoc; bool bRefInputMode; - ScAddress::Details aAddrDetails; + ScAddress::Details const aAddrDetails; ScDBCollection aLocalDbCol; ScRange theCurArea; diff --git a/sc/source/ui/inc/dpgroupdlg.hxx b/sc/source/ui/inc/dpgroupdlg.hxx index 42ab6e6c7341..0a8ad0ffe795 100644 --- a/sc/source/ui/inc/dpgroupdlg.hxx +++ b/sc/source/ui/inc/dpgroupdlg.hxx @@ -85,7 +85,7 @@ private: private: VclPtr<DateField> mpEdValue; - Date maNullDate; + Date const maNullDate; }; class ScDPNumGroupDlg : public ModalDialog diff --git a/sc/source/ui/inc/drwtrans.hxx b/sc/source/ui/inc/drwtrans.hxx index 0a4dcb952e28..b2604df48d3c 100644 --- a/sc/source/ui/inc/drwtrans.hxx +++ b/sc/source/ui/inc/drwtrans.hxx @@ -61,7 +61,7 @@ private: ScRangeListVector m_aProtectedChartRangesVector; - OUString maShellID; + OUString const maShellID; void InitDocShell(); SdrOle2Obj* GetSingleObject(); diff --git a/sc/source/ui/inc/foptmgr.hxx b/sc/source/ui/inc/foptmgr.hxx index bc1ef9b3ecbb..01ff63e6e712 100644 --- a/sc/source/ui/inc/foptmgr.hxx +++ b/sc/source/ui/inc/foptmgr.hxx @@ -54,8 +54,8 @@ public: bool VerifyPosStr ( const OUString& rPosStr ) const; private: - ScViewData* pViewData; - ScDocument* pDoc; + ScViewData* const pViewData; + ScDocument* const pDoc; VclPtr<CheckBox> pBtnCase; VclPtr<CheckBox> pBtnRegExp; diff --git a/sc/source/ui/inc/fupoor.hxx b/sc/source/ui/inc/fupoor.hxx index c00f64ef7341..74bdc96d2308 100644 --- a/sc/source/ui/inc/fupoor.hxx +++ b/sc/source/ui/inc/fupoor.hxx @@ -47,7 +47,7 @@ protected: VclPtr<vcl::Window> pWindow; SdrModel* pDrDoc; - SfxRequest aSfxRequest; + SfxRequest const aSfxRequest; VclPtr<Dialog> pDialog; Timer aScrollTimer; // for Autoscrolling diff --git a/sc/source/ui/inc/gridmerg.hxx b/sc/source/ui/inc/gridmerg.hxx index a6c484afa7f3..70cd96dfe8aa 100644 --- a/sc/source/ui/inc/gridmerg.hxx +++ b/sc/source/ui/inc/gridmerg.hxx @@ -26,8 +26,8 @@ class ScGridMerger { private: VclPtr<OutputDevice> pDev; - long nOneX; - long nOneY; + long const nOneX; + long const nOneY; long nFixStart; long nFixEnd; long nVarStart; diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index b44976272721..487559143a0c 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -134,7 +134,7 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou std::unique_ptr<sc::SpellCheckContext> mpSpellCheckCxt; ScViewData* pViewData; - ScSplitPos eWhich; + ScSplitPos const eWhich; ScHSplitPos eHWhich; ScVSplitPos eVWhich; diff --git a/sc/source/ui/inc/hdrcont.hxx b/sc/source/ui/inc/hdrcont.hxx index 39da558aec72..03bbb265d244 100644 --- a/sc/source/ui/inc/hdrcont.hxx +++ b/sc/source/ui/inc/hdrcont.hxx @@ -39,13 +39,13 @@ private: vcl::Font aBoldFont; bool bBoldSet; - bool bVertical; // Vertical = Row header + bool const bVertical; // Vertical = Row header long nWidth; long nSmallWidth; long nBigWidth; - SCCOLROW nSize; + SCCOLROW const nSize; SCCOLROW nMarkStart; SCCOLROW nMarkEnd; diff --git a/sc/source/ui/inc/hiranges.hxx b/sc/source/ui/inc/hiranges.hxx index ae4738f085c4..425f2466c44c 100644 --- a/sc/source/ui/inc/hiranges.hxx +++ b/sc/source/ui/inc/hiranges.hxx @@ -26,8 +26,8 @@ struct ScHighlightEntry { - ScRange aRef; - Color aColor; + ScRange const aRef; + Color const aColor; ScHighlightEntry( const ScRange& rR, const Color& rC ) : aRef(rR), aColor(rC) {} diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx index e297c1b7498a..f33d777bb97e 100644 --- a/sc/source/ui/inc/impex.hxx +++ b/sc/source/ui/inc/impex.hxx @@ -56,14 +56,14 @@ class ScImportExport OUString aNonConvertibleChars; OUString maFilterOptions; sal_uLong nSizeLimit; - SCROW nMaxImportRow; + SCROW const nMaxImportRow; sal_Unicode cSep; // Separator sal_Unicode cStr; // String Delimiter bool bFormulas; // Formula in Text? bool bIncludeFiltered; // include filtered rows? (default true) bool bAll; // no selection bool bSingle; // Single selection - bool bUndo; // with Undo? + bool const bUndo; // with Undo? bool bOverflowRow; // too many rows bool bOverflowCol; // too many columns bool bOverflowCell; // too much data for a cell diff --git a/sc/source/ui/inc/msgpool.hxx b/sc/source/ui/inc/msgpool.hxx index 476e19a6291d..76a56ac6b162 100644 --- a/sc/source/ui/inc/msgpool.hxx +++ b/sc/source/ui/inc/msgpool.hxx @@ -46,7 +46,7 @@ class ScMessagePool: public SfxItemPool ScCondFormatDlgItem aCondFormatDlgItem; std::vector<SfxPoolItem*> mvPoolDefaults; - ScDocumentPool* pDocPool; + ScDocumentPool* const pDocPool; public: ScMessagePool(); diff --git a/sc/source/ui/inc/namedefdlg.hxx b/sc/source/ui/inc/namedefdlg.hxx index e879d1380e89..7d5885045d2a 100644 --- a/sc/source/ui/inc/namedefdlg.hxx +++ b/sc/source/ui/inc/namedefdlg.hxx @@ -42,11 +42,11 @@ private: VclPtr<PushButton> m_pBtnCancel; VclPtr<FixedText> m_pFtInfo; - bool mbUndo; //if true we need to add an undo action after creating a range name + bool const mbUndo; //if true we need to add an undo action after creating a range name ScDocument* mpDoc; ScDocShell* mpDocShell; - ScAddress maCursorPos; + ScAddress const maCursorPos; OUString maStrInfoDefault; const OUString maGlobalNameStr; const OUString maErrInvalidNameStr; diff --git a/sc/source/ui/inc/namemgrtable.hxx b/sc/source/ui/inc/namemgrtable.hxx index 1e9b2cd09c55..c429dc8b6d3d 100644 --- a/sc/source/ui/inc/namemgrtable.hxx +++ b/sc/source/ui/inc/namemgrtable.hxx @@ -44,7 +44,7 @@ public: }; private: - OUString maGlobalString; + OUString const maGlobalString; // should be const because we should not modify it here const std::map<OUString, std::unique_ptr<ScRangeName>>& m_RangeMap; diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx index c2f28289d6fd..4f6a639586ec 100644 --- a/sc/source/ui/inc/navipi.hxx +++ b/sc/source/ui/inc/navipi.hxx @@ -189,12 +189,12 @@ private: Size aExpandedSize; Idle aContentIdle; - OUString aStrDragMode; - OUString aStrDisplay; + OUString const aStrDragMode; + OUString const aStrDisplay; OUString aStrActive; OUString aStrNotActive; OUString aStrHidden; - OUString aStrActiveWin; + OUString const aStrActiveWin; sal_uInt16 nZoomId; sal_uInt16 nChangeRootId; diff --git a/sc/source/ui/inc/notemark.hxx b/sc/source/ui/inc/notemark.hxx index a8a7fd8d01dc..c53ead3fce2c 100644 --- a/sc/source/ui/inc/notemark.hxx +++ b/sc/source/ui/inc/notemark.hxx @@ -37,13 +37,13 @@ private: VclPtr<vcl::Window> m_pBottomWin; VclPtr<vcl::Window> m_pDiagWin; ScDocument* m_pDoc; - ScAddress m_aDocPos; - OUString m_aUserText; + ScAddress const m_aDocPos; + OUString const m_aUserText; tools::Rectangle m_aVisRect; Timer m_aTimer; - MapMode m_aMapMode; - bool m_bLeft; - bool m_bByKeyboard; + MapMode const m_aMapMode; + bool const m_bLeft; + bool const m_bByKeyboard; tools::Rectangle m_aRect; ScDrawView* m_pDrawView; diff --git a/sc/source/ui/inc/olinewin.hxx b/sc/source/ui/inc/olinewin.hxx index 2fce780ba218..daf40d437532 100644 --- a/sc/source/ui/inc/olinewin.hxx +++ b/sc/source/ui/inc/olinewin.hxx @@ -33,8 +33,8 @@ class ScOutlineWindow : public vcl::Window { private: ScViewData& mrViewData; /// View data containing the document. - ScSplitPos meWhich; /// Which area in split window. - bool mbHoriz; /// true = Horizontal orientation. + ScSplitPos const meWhich; /// Which area in split window. + bool const mbHoriz; /// true = Horizontal orientation. bool mbMirrorEntries; /// true = mirror the order of entries (including header) bool mbMirrorLevels; /// true = mirror the order of levels, including the border diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx index 989fe26819a9..99122297b28d 100644 --- a/sc/source/ui/inc/optsolver.hxx +++ b/sc/source/ui/inc/optsolver.hxx @@ -60,15 +60,15 @@ struct ScOptConditionRow /// All settings from the dialog, saved with the DocShell for the next call class ScOptSolverSave { - OUString maObjective; - bool mbMax; - bool mbMin; - bool mbValue; - OUString maTarget; - OUString maVariable; - std::vector<ScOptConditionRow> maConditions; - OUString maEngine; - css::uno::Sequence<css::beans::PropertyValue> maProperties; + OUString const maObjective; + bool const mbMax; + bool const mbMin; + bool const mbValue; + OUString const maTarget; + OUString const maVariable; + std::vector<ScOptConditionRow> const maConditions; + OUString const maEngine; + css::uno::Sequence<css::beans::PropertyValue> const maProperties; public: ScOptSolverSave( const OUString& rObjective, bool bMax, bool bMin, bool bValue, @@ -154,8 +154,8 @@ private: VclPtr<PushButton> m_pBtnCancel; VclPtr<PushButton> m_pBtnSolve; - OUString maInputError; - OUString maConditionError; + OUString const maInputError; + OUString const maConditionError; ScDocShell* mpDocShell; ScDocument& mrDoc; diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx index e915a71e0aed..b833eec20333 100644 --- a/sc/source/ui/inc/output.hxx +++ b/sc/source/ui/inc/output.hxx @@ -80,12 +80,12 @@ private: class DrawEditParam { public: - SvxCellHorJustify meHorJustAttr; ///< alignment attribute + SvxCellHorJustify const meHorJustAttr; ///< alignment attribute SvxCellHorJustify meHorJustContext; ///< context depending on attribute, content and direction SvxCellHorJustify meHorJustResult; ///< result for EditEngine SvxCellVerJustify meVerJust; - SvxCellJustifyMethod meHorJustMethod; - SvxCellJustifyMethod meVerJustMethod; + SvxCellJustifyMethod const meHorJustMethod; + SvxCellJustifyMethod const meVerJustMethod; SvxCellOrientation meOrient; SCSIZE mnArrY; SCCOL mnX; @@ -94,8 +94,8 @@ private: long mnPosX; long mnPosY; long mnInitPosX; - bool mbBreak:1; - bool mbCellIsValue:1; + bool const mbBreak:1; + bool const mbCellIsValue:1; bool mbAsianVertical:1; bool mbPixelToLogic:1; bool mbHyphenatorSet:1; @@ -147,25 +147,25 @@ private: VclPtr<OutputDevice> pFmtDevice; // reference for text formatting ScTableInfo& mrTabInfo; RowInfo* pRowInfo; // Info block - SCSIZE nArrCount; // occupied lines in info block + SCSIZE const nArrCount; // occupied lines in info block ScDocument* mpDoc; // Document SCTAB nTab; // sheet - long nScrX; // Output Startpos. (Pixel) - long nScrY; + long const nScrX; // Output Startpos. (Pixel) + long const nScrY; long nScrW; // Output size (Pixel) long nScrH; long nMirrorW; // Visible output width for mirroring (default: nScrW) - SCCOL nX1; // Start-/End coordinates - SCROW nY1; // ( incl. hidden ) - SCCOL nX2; - SCROW nY2; + SCCOL const nX1; // Start-/End coordinates + SCROW const nY1; // ( incl. hidden ) + SCCOL const nX2; + SCROW const nY2; SCCOL nVisX1; // Start-/End coordinates SCROW nVisY1; // ( visible range ) SCCOL nVisX2; SCROW nVisY2; - ScOutputType eType; // Screen/Printer ... - double mnPPTX; // Pixel per Twips - double mnPPTY; + ScOutputType const eType; // Screen/Printer ... + double const mnPPTX; // Pixel per Twips + double const mnPPTY; Fraction aZoomX; Fraction aZoomY; @@ -183,7 +183,7 @@ private: bool bSolidBackground; // white instead of transparent bool mbUseStyleColor; - bool mbForceAutoColor; + bool const mbForceAutoColor; bool mbSyntaxMode; // Syntax highlighting std::unique_ptr<Color> pValueColor; diff --git a/sc/source/ui/inc/pfiltdlg.hxx b/sc/source/ui/inc/pfiltdlg.hxx index 31d7b04d73a6..7b4537d02004 100644 --- a/sc/source/ui/inc/pfiltdlg.hxx +++ b/sc/source/ui/inc/pfiltdlg.hxx @@ -75,7 +75,7 @@ private: std::unique_ptr<ScQueryItem> pOutItem; ScViewData* pViewData; ScDocument* pDoc; - SCTAB nSrcTab; + SCTAB const nSrcTab; VclPtr<ComboBox> aValueEdArr[3]; VclPtr<ListBox> aFieldLbArr[3]; diff --git a/sc/source/ui/inc/prevloc.hxx b/sc/source/ui/inc/prevloc.hxx index 7022f4dbe387..b6657ef854eb 100644 --- a/sc/source/ui/inc/prevloc.hxx +++ b/sc/source/ui/inc/prevloc.hxx @@ -92,7 +92,7 @@ public: typedef std::list<std::unique_ptr<ScPreviewLocationEntry>> Entries_t; private: VclPtr<OutputDevice> pWindow; - ScDocument* pDoc; + ScDocument* const pDoc; MapMode aCellMapMode; MapMode aDrawMapMode[SC_PREVIEW_MAXRANGES]; tools::Rectangle aDrawRectangle[SC_PREVIEW_MAXRANGES]; diff --git a/sc/source/ui/inc/retypepassdlg.hxx b/sc/source/ui/inc/retypepassdlg.hxx index 8bcab45ffcba..650ae66176b2 100644 --- a/sc/source/ui/inc/retypepassdlg.hxx +++ b/sc/source/ui/inc/retypepassdlg.hxx @@ -78,10 +78,10 @@ private: std::vector<VclPtr<VclHBox>> maSheets; - OUString maTextNotProtected; - OUString maTextNotPassProtected; - OUString maTextHashBad; - OUString maTextHashGood; + OUString const maTextNotProtected; + OUString const maTextNotPassProtected; + OUString const maTextHashBad; + OUString const maTextHashGood; DECL_LINK( OKHdl, Button*, void ); DECL_LINK( RetypeBtnHdl, Button*, void ); @@ -112,7 +112,7 @@ private: void CheckPasswordInput(); private: - ScPassHashProtectable* m_pProtected; + ScPassHashProtectable* const m_pProtected; std::unique_ptr<weld::Button> m_xBtnOk; diff --git a/sc/source/ui/inc/rfindlst.hxx b/sc/source/ui/inc/rfindlst.hxx index 2dda7f545ff3..46c030409415 100644 --- a/sc/source/ui/inc/rfindlst.hxx +++ b/sc/source/ui/inc/rfindlst.hxx @@ -28,7 +28,7 @@ struct ScRangeFindData { ScRange aRef; - ScRefFlags nFlags; + ScRefFlags const nFlags; sal_Int32 nSelStart; sal_Int32 nSelEnd; Color nColor; @@ -40,7 +40,7 @@ struct ScRangeFindData class ScRangeFindList { std::vector<ScRangeFindData> maEntries; - OUString aDocName; + OUString const aDocName; bool bHidden; sal_uInt16 nIndexColor; diff --git a/sc/source/ui/inc/scendlg.hxx b/sc/source/ui/inc/scendlg.hxx index 3d5ecf4ce7e5..67b997059a61 100644 --- a/sc/source/ui/inc/scendlg.hxx +++ b/sc/source/ui/inc/scendlg.hxx @@ -53,7 +53,7 @@ private: VclPtr<CheckBox> m_pCbProtect; VclPtr<OKButton> m_pBtnOk; const OUString aDefScenarioName; - bool bIsEdit; + bool const bIsEdit; DECL_LINK( OkHdl, Button*, void); DECL_LINK( EnableHdl, Button*, void ); diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx index 25956d0780e4..850d992b4471 100644 --- a/sc/source/ui/inc/scuiasciiopt.hxx +++ b/sc/source/ui/inc/scuiasciiopt.hxx @@ -82,13 +82,12 @@ class ScImportAsciiDlg : public ModalDialog VclPtr<ScCsvTableBox> mpTableBox; - OUString aTextSepList; OUString maFieldSeparators; // selected field separators sal_Unicode mcTextSep; rtl_TextEncoding meCharSet; /// Selected char set. bool mbCharSetSystem; /// Is System char set selected? - ScImportAsciiCall meCall; /// How the dialog is called (see asciiopt.hxx) + ScImportAsciiCall const meCall; /// How the dialog is called (see asciiopt.hxx) bool mbDetectSpaceSep; /// Whether to detect a possible space separator. public: diff --git a/sc/source/ui/inc/scuiautofmt.hxx b/sc/source/ui/inc/scuiautofmt.hxx index 67adc8a6c7e1..a00beb1e68de 100644 --- a/sc/source/ui/inc/scuiautofmt.hxx +++ b/sc/source/ui/inc/scuiautofmt.hxx @@ -47,11 +47,11 @@ private: VclPtr<CheckBox> m_pBtnPattern; VclPtr<CheckBox> m_pBtnAlignment; VclPtr<CheckBox> m_pBtnAdjust; - OUString aStrTitle; - OUString aStrLabel; - OUString aStrClose; - OUString aStrDelMsg; - OUString aStrRename; + OUString const aStrTitle; + OUString const aStrLabel; + OUString const aStrClose; + OUString const aStrDelMsg; + OUString const aStrRename; ScAutoFormat* pFormat; const ScAutoFormatData* pSelFmtData; diff --git a/sc/source/ui/inc/scuiimoptdlg.hxx b/sc/source/ui/inc/scuiimoptdlg.hxx index fdc70bc026ab..e4202eeb0575 100644 --- a/sc/source/ui/inc/scuiimoptdlg.hxx +++ b/sc/source/ui/inc/scuiimoptdlg.hxx @@ -62,7 +62,7 @@ private: std::unique_ptr<ScDelimiterTable> pFieldSepTab; std::unique_ptr<ScDelimiterTable> pTextSepTab; - bool m_bIsAsciiImport; + bool const m_bIsAsciiImport; private: sal_uInt16 GetCodeFromCombo( const ComboBox& rEd ) const; diff --git a/sc/source/ui/inc/scuitphfedit.hxx b/sc/source/ui/inc/scuitphfedit.hxx index 6c34d6ba7ddd..50cf77089460 100644 --- a/sc/source/ui/inc/scuitphfedit.hxx +++ b/sc/source/ui/inc/scuitphfedit.hxx @@ -84,7 +84,7 @@ private: ScEditWindow * m_pEditFocus; ///one of m_pWndLeft, m_pWndCenter, m_pWndRight - sal_uInt16 nWhich; + sal_uInt16 const nWhich; DECL_LINK( ObjectSelectHdl, ScEditWindow&, void ); diff --git a/sc/source/ui/inc/searchresults.hxx b/sc/source/ui/inc/searchresults.hxx index c50a12225727..843cb980f05e 100644 --- a/sc/source/ui/inc/searchresults.hxx +++ b/sc/source/ui/inc/searchresults.hxx @@ -24,8 +24,8 @@ class SearchResultsDlg : public ModelessDialog { VclPtr<SvSimpleTable> mpList; VclPtr<FixedText> mpSearchResults; - OUString aSkipped; - SfxBindings* mpBindings; + OUString const aSkipped; + SfxBindings* const mpBindings; ScDocument* mpDoc; DECL_LINK( ListSelectHdl, SvTreeListBox*, void ); diff --git a/sc/source/ui/inc/sortkeydlg.hxx b/sc/source/ui/inc/sortkeydlg.hxx index 396b3be9376c..faddd6a92925 100644 --- a/sc/source/ui/inc/sortkeydlg.hxx +++ b/sc/source/ui/inc/sortkeydlg.hxx @@ -40,7 +40,7 @@ class ScSortKeyWindow public: ScSortKeyItems m_aSortKeyItems; private: - weld::Container* m_pBox; + weld::Container* const m_pBox; public: ScSortKeyWindow(weld::Container* pBox); diff --git a/sc/source/ui/inc/spelleng.hxx b/sc/source/ui/inc/spelleng.hxx index ca3912f0c2fc..cec0676459a2 100644 --- a/sc/source/ui/inc/spelleng.hxx +++ b/sc/source/ui/inc/spelleng.hxx @@ -75,7 +75,7 @@ protected: // for usage in derived classes ScDocument& mrDoc; private: - ScSelectionState maSelState; /// Selection data of the document. + ScSelectionState const maSelState; /// Selection data of the document. ScDocument* mpUndoDoc; /// Document stores all old cells for UNDO action. ScDocument* mpRedoDoc; /// Document stores all new cells for REDO action. LanguageType meCurrLang; /// Current cell language. @@ -144,7 +144,7 @@ protected: virtual bool NeedsConversion() override; private: - ScConversionParam maConvParam; /// Conversion parameters. + ScConversionParam const maConvParam; /// Conversion parameters. }; #endif diff --git a/sc/source/ui/inc/spellparam.hxx b/sc/source/ui/inc/spellparam.hxx index af1537a33b9d..6495a796ac5f 100644 --- a/sc/source/ui/inc/spellparam.hxx +++ b/sc/source/ui/inc/spellparam.hxx @@ -60,13 +60,13 @@ public: bool IsInteractive() const { return mbIsInteractive; } private: - ScConversionType meConvType; /// Type of the conversion. - LanguageType meSourceLang; /// Source language for conversion. - LanguageType meTargetLang; /// Target language for conversion. - vcl::Font maTargetFont; /// Target font to be used if language has to be changed. - sal_Int32 mnOptions; /// Conversion options. - bool mbUseTargetFont; /// True = Use maTargetFont to change font during conversion. - bool mbIsInteractive; /// True = Text conversion has (specific) dialog that may be raised. + ScConversionType const meConvType; /// Type of the conversion. + LanguageType const meSourceLang; /// Source language for conversion. + LanguageType const meTargetLang; /// Target language for conversion. + vcl::Font maTargetFont; /// Target font to be used if language has to be changed. + sal_Int32 mnOptions; /// Conversion options. + bool const mbUseTargetFont; /// True = Use maTargetFont to change font during conversion. + bool const mbIsInteractive; /// True = Text conversion has (specific) dialog that may be raised. }; #endif diff --git a/sc/source/ui/inc/tabopdlg.hxx b/sc/source/ui/inc/tabopdlg.hxx index 2833d8e3d38a..65b8dece561f 100644 --- a/sc/source/ui/inc/tabopdlg.hxx +++ b/sc/source/ui/inc/tabopdlg.hxx @@ -72,7 +72,7 @@ private: ScRefAddress theRowCell; ScRefAddress theColCell; - ScDocument* pDoc; + ScDocument* const pDoc; const SCTAB nCurTab; VclPtr<formula::RefEdit> pEdActive; bool bDlgLostFocus; diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index 8ce857b54d20..344eda24850e 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -75,8 +75,8 @@ enum HeaderType class ScCornerButton : public vcl::Window { private: - ScViewData* pViewData; - bool bAdd; + ScViewData* const pViewData; + bool const bAdd; protected: virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; @@ -123,7 +123,7 @@ private: void Modifier(ScGridWindow* pWin); private: - ScTabViewShell* mpThisViewShell; + ScTabViewShell* const mpThisViewShell; std::array<VclPtr<ScGridWindow>, 4> const & mpGridWin; EditView* mpOtherEditView; int nTotalWindows; diff --git a/sc/source/ui/inc/target.hxx b/sc/source/ui/inc/target.hxx index 6c42308a6ac9..755591835b9e 100644 --- a/sc/source/ui/inc/target.hxx +++ b/sc/source/ui/inc/target.hxx @@ -27,7 +27,7 @@ class ScTabViewShell; class ScTabViewTarget : public SfxRepeatTarget { private: - ScTabViewShell* pViewShell; + ScTabViewShell* const pViewShell; public: diff --git a/sc/source/ui/inc/tbzoomsliderctrl.hxx b/sc/source/ui/inc/tbzoomsliderctrl.hxx index 9782ad17ad77..e81f913d7dac 100644 --- a/sc/source/ui/inc/tbzoomsliderctrl.hxx +++ b/sc/source/ui/inc/tbzoomsliderctrl.hxx @@ -41,7 +41,7 @@ class ScZoomSliderWnd: public vcl::Window private: struct ScZoomSliderWnd_Impl; std::unique_ptr<ScZoomSliderWnd_Impl> mpImpl; - Size aLogicalSize; + Size const aLogicalSize; css::uno::Reference<css::frame::XDispatchProvider> m_xDispatchProvider; sal_uInt16 Offset2Zoom(long nOffset) const; diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx index b8fbc732b3bb..f2a3e33284ac 100644 --- a/sc/source/ui/inc/tpcalc.hxx +++ b/sc/source/ui/inc/tpcalc.hxx @@ -71,7 +71,7 @@ private: std::unique_ptr<ScDocOptions> pOldOptions; std::unique_ptr<ScDocOptions> pLocalOptions; - sal_uInt16 nWhichCalc; + sal_uInt16 const nWhichCalc; private: void Init(); diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx index 95a7629f7d09..1e4c2b15788e 100644 --- a/sc/source/ui/inc/tpsort.hxx +++ b/sc/source/ui/inc/tpsort.hxx @@ -63,9 +63,9 @@ protected: private: Idle m_aIdle; - OUString aStrUndefined; - OUString aStrColumn; - OUString aStrRow; + OUString const aStrUndefined; + OUString const aStrColumn; + OUString const aStrRow; const sal_uInt16 nWhichSort; ScViewData* pViewData; @@ -116,9 +116,9 @@ protected: virtual DeactivateRC DeactivatePage ( SfxItemSet* pSet ) override; private: - OUString aStrRowLabel; - OUString aStrColLabel; - OUString aStrUndefined; + OUString const aStrRowLabel; + OUString const aStrColLabel; + OUString const aStrUndefined; const sal_uInt16 nWhichSort; ScSortParam aSortData; diff --git a/sc/source/ui/inc/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx index 735c4a489f81..c3d0094fc949 100644 --- a/sc/source/ui/inc/uiitems.hxx +++ b/sc/source/ui/inc/uiitems.hxx @@ -44,10 +44,10 @@ struct ScQueryParam; class ScInputStatusItem : public SfxPoolItem { - ScAddress aCursorPos; - ScAddress aStartPos; - ScAddress aEndPos; - OUString aString; + ScAddress const aCursorPos; + ScAddress const aStartPos; + ScAddress const aEndPos; + OUString const aString; std::unique_ptr<EditTextObject> pEditData; const std::vector<editeng::MisspellRanges>* mpMisspellRanges; @@ -84,9 +84,9 @@ public: class ScTablesHint : public SfxHint { - sal_uInt16 nId; - SCTAB nTab1; - SCTAB nTab2; + sal_uInt16 const nId; + SCTAB const nTab1; + SCTAB const nTab2; public: ScTablesHint(sal_uInt16 nNewId, SCTAB nTable1, SCTAB nTable2=0); @@ -99,8 +99,8 @@ public: class ScEditViewHint : public SfxHint { - ScEditEngineDefaulter* pEditEngine; - ScAddress aCursorPos; + ScEditEngineDefaulter* const pEditEngine; + ScAddress const aCursorPos; public: ScEditViewHint() = delete; @@ -115,7 +115,7 @@ public: class ScIndexHint : public SfxHint { - sal_uInt16 nIndex; + sal_uInt16 const nIndex; public: ScIndexHint(SfxHintId nNewId, sal_uInt16 nIdx); @@ -143,7 +143,7 @@ public: const ScSortParam& GetSortData () const { return theSortData; } private: - ScViewData* pViewData; + ScViewData* const pViewData; ScSortParam theSortData; }; @@ -169,7 +169,7 @@ public: private: std::unique_ptr<ScQueryParam> mpQueryData; - ScViewData* pViewData; + ScViewData* const pViewData; ScRange aAdvSource; bool bIsAdvanced; }; @@ -191,7 +191,7 @@ public: const ScSubTotalParam& GetSubTotalData() const { return theSubTotalData; } private: - ScViewData* pViewData; + ScViewData* const pViewData; ScSubTotalParam theSubTotalData; }; diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx index 1c2c707f1010..0057d549bfa4 100644 --- a/sc/source/ui/inc/undobase.hxx +++ b/sc/source/ui/inc/undobase.hxx @@ -89,7 +89,7 @@ public: protected: ScRange aBlockRange; std::unique_ptr<SdrUndoAction> pDrawUndo; - ScBlockUndoMode eMode; + ScBlockUndoMode const eMode; void BeginUndo(); void EndUndo(); @@ -124,7 +124,7 @@ class ScDBFuncUndo: public ScSimpleUndo { protected: std::unique_ptr<ScDBData> pAutoDBRange; - ScRange aOriginalRange; + ScRange const aOriginalRange; public: ScDBFuncUndo( ScDocShell* pDocSh, const ScRange& rOriginal ); @@ -150,7 +150,7 @@ protected: std::unique_ptr<SdrUndoAction> pDrawUndo; ScDocumentUniquePtr pRefUndoDoc; std::unique_ptr<ScRefUndoData> pRefUndoData; - ScMoveUndoMode eMode; + ScMoveUndoMode const eMode; void BeginUndo(); void EndUndo(); diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx index 0eb80137c926..93a8db996bf8 100644 --- a/sc/source/ui/inc/undoblk.hxx +++ b/sc/source/ui/inc/undoblk.hxx @@ -60,14 +60,14 @@ public: private: ScRange aEffRange; - SCTAB nCount; + SCTAB const nCount; std::unique_ptr<SCTAB[]> pTabs; std::unique_ptr<SCTAB[]> pScenarios; sal_uLong nEndChangeAction; - InsCellCmd eCmd; - bool bPartOfPaste; + InsCellCmd const eCmd; + bool const bPartOfPaste; std::unique_ptr<SfxUndoAction> pPasteUndo; @@ -93,14 +93,14 @@ public: private: ScRange aEffRange; - SCTAB nCount; + SCTAB const nCount; std::unique_ptr<SCTAB[]> pTabs; std::unique_ptr<SCTAB[]> pScenarios; sal_uLong nStartChangeAction; sal_uLong nEndChangeAction; - DelCellCmd eCmd; + DelCellCmd const eCmd; void DoChange ( const bool bUndo ); void SetChangeTrack(); @@ -125,9 +125,9 @@ public: virtual OUString GetComment() const override; private: - bool mbRows:1; - bool mbRefresh:1; - SCTAB nTab; + bool const mbRows:1; + bool const mbRefresh:1; + SCTAB const nTab; std::vector<sc::ColRowSpan> maSpans; sal_uLong nStartChangeAction; sal_uLong nEndChangeAction; @@ -154,10 +154,10 @@ public: virtual OUString GetComment() const override; private: - ScMarkData aMarkData; + ScMarkData const aMarkData; ScDocumentUniquePtr pUndoDoc; - ScRange aExtendedRange; + ScRange const aExtendedRange; sal_uLong nStartChangeAction; sal_uLong nEndChangeAction; @@ -205,7 +205,7 @@ private: ScMarkData aMarkData; ScDocumentUniquePtr pUndoDoc; ScDocumentUniquePtr pRedoDoc; - InsertDeleteFlags nFlags; + InsertDeleteFlags const nFlags; std::unique_ptr<ScRefUndoData> pRefUndoData; std::unique_ptr<ScRefUndoData> pRefRedoData; sal_uLong nStartChangeAction; @@ -237,12 +237,12 @@ private: sal_uInt16 mnPaintExtFlags; ScRangeList maPaintRanges; - ScRange aSrcRange; + ScRange const aSrcRange; ScRange aDestRange; sal_uLong nStartChangeAction; sal_uLong nEndChangeAction; - bool bCut; - bool bKeepScenarioFlags; + bool const bCut; + bool const bKeepScenarioFlags; void PaintArea( ScRange aRange, sal_uInt16 nExtFlags ) const; void DoUndo( ScRange aRange ); @@ -272,14 +272,14 @@ public: private: std::shared_ptr<DataSpansType> mpDataSpans; // Spans of non-empty cells. - ScRange aRange; + ScRange const aRange; ScMarkData aMarkData; ScDocumentUniquePtr pUndoDoc; // Block mark and deleted data std::unique_ptr<SdrUndoAction> pDrawUndo; // Deleted objects sal_uLong nStartChangeAction; sal_uLong nEndChangeAction; - InsertDeleteFlags nFlags; - bool bMulti; // Multi selection + InsertDeleteFlags const nFlags; + bool const bMulti; // Multi selection void DoChange( const bool bUndo ); void SetChangeTrack(); @@ -304,18 +304,18 @@ public: virtual OUString GetComment() const override; private: - ScRange aRange; + ScRange const aRange; ScMarkData aMarkData; ScDocumentUniquePtr pUndoDoc; // Block mark and deleted data sal_uLong nStartChangeAction; sal_uLong nEndChangeAction; - InsertDeleteFlags nFlags; - ScPasteFunc nFunction; - SCTAB nSrcTab; - bool bMulti; // Multi selection - bool bSkipEmpty; - bool bAsLink; + InsertDeleteFlags const nFlags; + ScPasteFunc const nFunction; + SCTAB const nSrcTab; + bool const bMulti; // Multi selection + bool const bSkipEmpty; + bool const bAsLink; void DoChange( const bool bUndo ); void SetChangeTrack(); @@ -345,11 +345,11 @@ public: ScEditDataArray* GetDataArray(); private: ScMarkData aMarkData; - ScRange aRange; + ScRange const aRange; ScRange aRangeCover; std::unique_ptr<ScEditDataArray> mpDataArray; ScDocumentUniquePtr pUndoDoc; - bool bMulti; + bool const bMulti; ScPatternAttr* pApplyPattern; SvxBoxItem* pLineOuter; SvxBoxInfoItem* pLineInner; @@ -380,17 +380,17 @@ public: virtual OUString GetComment() const override; private: - ScMarkData aMarkData; - SCCOLROW nStart; - SCCOLROW nEnd; - SCTAB nStartTab; - SCTAB nEndTab; + ScMarkData aMarkData; + SCCOLROW const nStart; + SCCOLROW const nEnd; + SCTAB const nStartTab; + SCTAB const nEndTab; ScDocumentUniquePtr pUndoDoc; std::unique_ptr<ScOutlineTable> pUndoTab; - std::vector<sc::ColRowSpan> maRanges; - sal_uInt16 nNewSize; - bool bWidth; - ScSizeMode eMode; + std::vector<sc::ColRowSpan> const maRanges; + sal_uInt16 const nNewSize; + bool const bWidth; + ScSizeMode const eMode; std::unique_ptr<SdrUndoAction> pDrawUndo; }; @@ -413,16 +413,16 @@ public: virtual OUString GetComment() const override; private: - ScRange aSource; - ScMarkData aMarkData; + ScRange const aSource; + ScMarkData aMarkData; ScDocumentUniquePtr - pUndoDoc; - FillDir eFillDir; - FillCmd eFillCmd; - FillDateCmd eFillDateCmd; - double fStartValue; - double fStepValue; - double fMaxValue; + pUndoDoc; + FillDir const eFillDir; + FillCmd const eFillCmd; + FillDateCmd const eFillDateCmd; + double const fStartValue; + double const fStepValue; + double const fMaxValue; sal_uLong nStartChangeAction; sal_uLong nEndChangeAction; @@ -445,8 +445,8 @@ public: virtual OUString GetComment() const override; private: - ScCellMergeOption maOption; - bool mbMergeContents; // Merge contents in Redo(). + ScCellMergeOption const maOption; + bool const mbMergeContents; // Merge contents in Redo(). ScDocumentUniquePtr mxUndoDoc; // when data is merged std::unique_ptr<SdrUndoAction> mpDrawUndo; @@ -471,10 +471,10 @@ public: private: ScDocumentUniquePtr - pUndoDoc; // deleted data - ScMarkData aMarkData; - bool bSize; - sal_uInt16 nFormatNo; + pUndoDoc; // deleted data + ScMarkData aMarkData; + bool const bSize; + sal_uInt16 const nFormatNo; }; class ScUndoReplace: public ScSimpleUndo @@ -495,9 +495,9 @@ public: virtual OUString GetComment() const override; private: - ScAddress aCursorPos; - ScMarkData aMarkData; - OUString aUndoStr; // Data at single selection + ScAddress const aCursorPos; + ScMarkData const aMarkData; + OUString const aUndoStr; // Data at single selection ScDocumentUniquePtr pUndoDoc; // Block mark and deleted data std::unique_ptr<SvxSearchItem> pSearchItem; sal_uLong nStartChangeAction; @@ -528,14 +528,14 @@ public: virtual OUString GetComment() const override; private: - ScRange aRange; + ScRange const aRange; ScDocumentUniquePtr pUndoDoc; // Deleted data - ScRefAddress theFormulaCell; - ScRefAddress theFormulaEnd; - ScRefAddress theRowCell; - ScRefAddress theColCell; - ScTabOpParam::Mode meMode; + ScRefAddress const theFormulaCell; + ScRefAddress const theFormulaEnd; + ScRefAddress const theRowCell; + ScRefAddress const theColCell; + ScTabOpParam::Mode const meMode; }; class ScUndoConversion : public ScSimpleUndo @@ -556,14 +556,14 @@ public: virtual OUString GetComment() const override; private: - ScMarkData aMarkData; - ScAddress aCursorPos; - ScDocumentUniquePtr pUndoDoc; // Block mark and deleted data - ScAddress aNewCursorPos; - ScDocumentUniquePtr pRedoDoc; // Block mark and new data - sal_uLong nStartChangeAction; - sal_uLong nEndChangeAction; - ScConversionParam maConvParam; /// Conversion type and parameters. + ScMarkData aMarkData; + ScAddress const aCursorPos; + ScDocumentUniquePtr pUndoDoc; // Block mark and deleted data + ScAddress const aNewCursorPos; + ScDocumentUniquePtr pRedoDoc; // Block mark and new data + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; + ScConversionParam const maConvParam; /// Conversion type and parameters. void DoChange( ScDocument* pRefDoc, const ScAddress& rCursorPos ); void SetChangeTrack(); @@ -588,8 +588,8 @@ private: ScMarkData aMarkData; ScDocumentUniquePtr pUndoDoc; ScDocumentUniquePtr pRedoDoc; - ScRange aRange; - bool bMulti; + ScRange const aRange; + bool const bMulti; sal_uLong nStartChangeAction; sal_uLong nEndChangeAction; @@ -612,8 +612,8 @@ public: virtual OUString GetComment() const override; private: - ScDocumentUniquePtr xUndoDoc; - ScDocumentUniquePtr xRedoDoc; + ScDocumentUniquePtr const xUndoDoc; + ScDocumentUniquePtr const xRedoDoc; void DoChange( ScDocument* pSrcDoc ) const; }; @@ -634,9 +634,9 @@ public: private: void DoChange(ScDocument* pDoc); - ScDocumentUniquePtr mpUndoDoc; - ScDocumentUniquePtr mpRedoDoc; - ScRange maRange; + ScDocumentUniquePtr const mpUndoDoc; + ScDocumentUniquePtr const mpRedoDoc; + ScRange const maRange; }; class ScUndoConditionalFormatList : public ScSimpleUndo @@ -655,9 +655,9 @@ public: private: void DoChange(const ScDocument* pDoc); - ScDocumentUniquePtr mpUndoDoc; - ScDocumentUniquePtr mpRedoDoc; - SCTAB mnTab; + ScDocumentUniquePtr const mpUndoDoc; + ScDocumentUniquePtr const mpRedoDoc; + SCTAB const mnTab; }; class ScUndoUseScenario: public ScSimpleUndo @@ -681,7 +681,7 @@ private: pUndoDoc; ScRange aRange; ScMarkData aMarkData; - OUString aName; + OUString const aName; }; class ScUndoSelectionStyle: public ScSimpleUndo @@ -705,8 +705,8 @@ private: ScMarkData aMarkData; ScDocumentUniquePtr pUndoDoc; - OUString aStyleName; - ScRange aRange; + OUString const aStyleName; + ScRange const aRange; void DoChange( const bool bUndo ); }; @@ -748,7 +748,7 @@ public: private: ScDocumentUniquePtr pUndoDoc; - OUString aFormula; + OUString const aFormula; sal_uLong nStartChangeAction; sal_uLong nEndChangeAction; @@ -773,12 +773,12 @@ public: virtual OUString GetComment() const override; private: - OUString aDocName; + OUString const aDocName; OUString aFltName; - OUString aOptions; + OUString const aOptions; OUString aAreaName; - ScRange aRange; - sal_uLong nRefreshDelay; + ScRange const aRange; + sal_uLong const nRefreshDelay; }; class ScUndoRemoveAreaLink : public ScSimpleUndo @@ -799,12 +799,12 @@ public: virtual OUString GetComment() const override; private: - OUString aDocName; + OUString const aDocName; OUString aFltName; - OUString aOptions; + OUString const aOptions; OUString aAreaName; - ScRange aRange; - sal_uLong nRefreshDelay; + ScRange const aRange; + sal_uLong const nRefreshDelay; }; class ScUndoUpdateAreaLink : public ScSimpleUndo //! also change BlockUndo? @@ -830,21 +830,21 @@ public: virtual OUString GetComment() const override; private: - OUString aOldDoc; - OUString aOldFlt; - OUString aOldOpt; - OUString aOldArea; - ScRange aOldRange; - OUString aNewDoc; - OUString aNewFlt; - OUString aNewOpt; - OUString aNewArea; - ScRange aNewRange; + OUString const aOldDoc; + OUString const aOldFlt; + OUString const aOldOpt; + OUString const aOldArea; + ScRange const aOldRange; + OUString const aNewDoc; + OUString const aNewFlt; + OUString const aNewOpt; + OUString const aNewArea; + ScRange const aNewRange; ScDocumentUniquePtr xUndoDoc; ScDocumentUniquePtr xRedoDoc; - sal_uLong nOldRefresh; - sal_uLong nNewRefresh; - bool bWithInsert; + sal_uLong const nOldRefresh; + sal_uLong const nNewRefresh; + bool const bWithInsert; void DoChange( const bool bUndo ) const; }; @@ -867,7 +867,7 @@ private: ScMarkData aMarkData; ScDocumentUniquePtr pUndoDoc; - bool bIsIncrement; + bool const bIsIncrement; }; class ScUndoTransliterate: public ScBlockUndo @@ -888,7 +888,7 @@ private: ScMarkData aMarkData; ScDocumentUniquePtr pUndoDoc; - TransliterationFlags + TransliterationFlags const nTransliterationType; }; @@ -929,9 +929,8 @@ public: virtual OUString GetComment() const override; private: - SCTAB nTab; - ScDocumentUniquePtr - pUndoDoc; + SCTAB const nTab; + ScDocumentUniquePtr pUndoDoc; }; class ScUndoRemoveMerge: public ScBlockUndo diff --git a/sc/source/ui/inc/undocell.hxx b/sc/source/ui/inc/undocell.hxx index 76ed55a83647..5785ac841c63 100644 --- a/sc/source/ui/inc/undocell.hxx +++ b/sc/source/ui/inc/undocell.hxx @@ -47,7 +47,7 @@ class ScUndoSdrCaptionObj: public SdrUndoAction { protected: SdrObjList* m_pObjList; - sal_uInt32 m_nOrdNum; + sal_uInt32 const m_nOrdNum; std::shared_ptr< SdrCaptionObj > m_pCaptionObj; void UnmarkObject(); @@ -110,9 +110,9 @@ public: void SetEditData( std::unique_ptr<EditTextObject> pOld, std::unique_ptr<EditTextObject> pNew ); private: - SCCOL nCol; - SCROW nRow; - SCTAB nTab; + SCCOL const nCol; + SCROW const nRow; + SCTAB const nTab; ScPatternAttr* pOldPattern; ScPatternAttr* pNewPattern; ScPatternAttr* pApplyPattern; @@ -152,10 +152,10 @@ public: private: ValuesType maOldValues; - OUString maNewString; + OUString const maNewString; std::unique_ptr<EditTextObject> mpNewEditData; sal_uLong mnEndChangeAction; - ScAddress maPos; + ScAddress const maPos; void DoChange() const; void SetChangeTrack(); @@ -178,10 +178,10 @@ public: virtual OUString GetComment() const override; private: - ScAddress aPos; - ScCellValue maOldCell; - double nValue; - sal_uLong nEndChangeAction; + ScAddress const aPos; + ScCellValue const maOldCell; + double const nValue; + sal_uLong nEndChangeAction; void SetChangeTrack(); }; @@ -205,9 +205,9 @@ private: void MoveCursorToCell(); private: - ScAddress maPos; - ScCellValue maOldValue; - ScCellValue maNewValue; + ScAddress const maPos; + ScCellValue const maOldValue; + ScCellValue const maNewValue; sal_uLong mnEndChangeAction; }; @@ -227,11 +227,11 @@ public: virtual OUString GetComment() const override; private: - SCCOL nCol; - SCROW nRow; - SCTAB nTab; - bool bColumn; // Column or row break - bool bInsert; // Insert or Delete + SCCOL const nCol; + SCROW const nRow; + SCTAB const nTab; + bool const bColumn; // Column or row break + bool const bInsert; // Insert or Delete void DoChange( bool bInsert ) const; }; @@ -251,11 +251,11 @@ public: virtual OUString GetComment() const override; private: - SCTAB nTab; - sal_uInt16 nOldScale; - sal_uInt16 nOldPages; - sal_uInt16 nNewScale; - sal_uInt16 nNewPages; + SCTAB const nTab; + sal_uInt16 const nOldScale; + sal_uInt16 const nOldPages; + sal_uInt16 const nNewScale; + sal_uInt16 const nNewPages; void DoChange( bool bUndo ); }; @@ -276,13 +276,13 @@ public: virtual OUString GetComment() const override; private: - SCCOL nCol; - SCROW nRow; - SCTAB nTab; + SCCOL const nCol; + SCROW const nRow; + SCTAB const nTab; sal_uLong nEndChangeAction; - ScCellValue maOldText; - ScCellValue maNewText; + ScCellValue const maOldText; + ScCellValue const maNewText; void DoChange( bool bUndo, const ScCellValue& rText ); void SetChangeTrack( const ScCellValue& rOldCell ); @@ -323,7 +323,7 @@ private: void DoRemoveNote( const ScNoteData& rNoteData ); private: - ScAddress maPos; + ScAddress const maPos; ScNoteData maOldData; ScNoteData maNewData; std::unique_ptr<SdrUndoAction> mpDrawUndo; @@ -344,8 +344,8 @@ public: virtual OUString GetComment() const override; private: - ScAddress maPos; - bool mbShown; + ScAddress const maPos; + bool const mbShown; }; class ScUndoDetective: public ScSimpleUndo @@ -389,7 +389,7 @@ public: private: std::unique_ptr<ScRangeName> pOldRanges; std::unique_ptr<ScRangeName> pNewRanges; - SCTAB mnTab; + SCTAB const mnTab; void DoChange( bool bUndo ); }; @@ -398,7 +398,7 @@ namespace sc { class UndoSetCells : public ScSimpleUndo { - ScAddress maTopPos; + ScAddress const maTopPos; CellValues maOldValues; CellValues maNewValues; diff --git a/sc/source/ui/inc/undodat.hxx b/sc/source/ui/inc/undodat.hxx index 18b2ba6fd0dd..5a3035d86017 100644 --- a/sc/source/ui/inc/undodat.hxx +++ b/sc/source/ui/inc/undodat.hxx @@ -57,15 +57,15 @@ public: virtual OUString GetComment() const override; private: - SCCOLROW nStart; - SCCOLROW nEnd; - SCTAB nTab; + SCCOLROW const nStart; + SCCOLROW const nEnd; + SCTAB const nTab; ScDocumentUniquePtr - pUndoDoc; - bool bColumns; - sal_uInt16 nLevel; - sal_uInt16 nEntry; - bool bShow; + pUndoDoc; + bool const bColumns; + sal_uInt16 const nLevel; + sal_uInt16 const nEntry; + bool const bShow; }; class ScUndoMakeOutline: public ScSimpleUndo @@ -86,12 +86,12 @@ public: virtual OUString GetComment() const override; private: - ScAddress aBlockStart; - ScAddress aBlockEnd; + ScAddress const aBlockStart; + ScAddress const aBlockEnd; std::unique_ptr<ScOutlineTable> - pUndoTable; - bool bColumns; - bool bMake; + pUndoTable; + bool const bColumns; + bool const bMake; }; class ScUndoOutlineLevel: public ScSimpleUndo @@ -110,13 +110,13 @@ public: virtual OUString GetComment() const override; private: - SCCOLROW nStart; - SCCOLROW nEnd; - SCTAB nTab; - ScDocumentUniquePtr xUndoDoc; + SCCOLROW const nStart; + SCCOLROW const nEnd; + SCTAB const nTab; + ScDocumentUniquePtr xUndoDoc; std::unique_ptr<ScOutlineTable> xUndoTable; - bool bColumns; - sal_uInt16 nLevel; + bool const bColumns; + sal_uInt16 const nLevel; }; class ScUndoOutlineBlock: public ScSimpleUndo @@ -136,11 +136,11 @@ public: virtual OUString GetComment() const override; private: - ScAddress aBlockStart; - ScAddress aBlockEnd; - ScDocumentUniquePtr xUndoDoc; + ScAddress const aBlockStart; + ScAddress const aBlockEnd; + ScDocumentUniquePtr xUndoDoc; std::unique_ptr<ScOutlineTable> xUndoTable; - bool bShow; + bool const bShow; }; class ScUndoRemoveAllOutlines: public ScSimpleUndo @@ -159,9 +159,9 @@ public: virtual OUString GetComment() const override; private: - ScAddress aBlockStart; - ScAddress aBlockEnd; - ScDocumentUniquePtr xUndoDoc; + ScAddress const aBlockStart; + ScAddress const aBlockEnd; + ScDocumentUniquePtr xUndoDoc; std::unique_ptr<ScOutlineTable> xUndoTable; }; @@ -181,9 +181,9 @@ public: virtual OUString GetComment() const override; private: - ScAddress aBlockStart; - ScAddress aBlockEnd; - ScDocumentUniquePtr xUndoDoc; + ScAddress const aBlockStart; + ScAddress const aBlockEnd; + ScDocumentUniquePtr xUndoDoc; std::unique_ptr<ScOutlineTable> xUndoTable; }; @@ -203,10 +203,10 @@ public: virtual OUString GetComment() const override; private: - SCTAB nTab; - ScSubTotalParam aParam; // The original passed parameter - SCROW nNewEndRow; // Size of result - ScDocumentUniquePtr xUndoDoc; + SCTAB const nTab; + ScSubTotalParam const aParam; // The original passed parameter + SCROW const nNewEndRow; // Size of result + ScDocumentUniquePtr xUndoDoc; std::unique_ptr<ScOutlineTable> xUndoTable; std::unique_ptr<ScRangeName> xUndoRange; std::unique_ptr<ScDBCollection> xUndoDB; @@ -230,22 +230,22 @@ public: private: std::unique_ptr<SdrUndoAction> pDrawUndo; - SCTAB nTab; - ScQueryParam aQueryParam; - ScDocumentUniquePtr xUndoDoc; + SCTAB const nTab; + ScQueryParam const aQueryParam; + ScDocumentUniquePtr xUndoDoc; std::unique_ptr<ScDBCollection> xUndoDB; // due to source and target range - ScRange aOldDest; - ScRange aAdvSource; - bool bIsAdvanced; - bool bDestArea; - bool bDoSize; + ScRange aOldDest; + ScRange aAdvSource; + bool bIsAdvanced; + bool bDestArea; + bool const bDoSize; }; class ScUndoAutoFilter: public ScDBFuncUndo { private: - OUString aDBName; - bool bFilterSet; + OUString const aDBName; + bool const bFilterSet; void DoChange( bool bUndo ); @@ -299,16 +299,16 @@ public: virtual OUString GetComment() const override; private: - SCTAB nTab; - ScImportParam aImportParam; - SCCOL nEndCol; - SCROW nEndRow; - ScDocumentUniquePtr xUndoDoc; - ScDocumentUniquePtr xRedoDoc; + SCTAB const nTab; + ScImportParam const aImportParam; + SCCOL const nEndCol; + SCROW const nEndRow; + ScDocumentUniquePtr xUndoDoc; + ScDocumentUniquePtr xRedoDoc; std::unique_ptr<ScDBData> xUndoDBData; std::unique_ptr<ScDBData> xRedoDBData; - SCCOL nFormulaCols; - bool bRedoFilled; + SCCOL const nFormulaCols; + bool bRedoFilled; }; class ScUndoRepeatDB: public ScSimpleUndo @@ -329,17 +329,17 @@ public: virtual OUString GetComment() const override; private: - ScAddress aBlockStart; - ScAddress aBlockEnd; - SCROW nNewEndRow; - ScAddress aCursorPos; - ScDocumentUniquePtr xUndoDoc; + ScAddress const aBlockStart; + ScAddress const aBlockEnd; + SCROW const nNewEndRow; + ScAddress const aCursorPos; + ScDocumentUniquePtr xUndoDoc; std::unique_ptr<ScOutlineTable> xUndoTable; std::unique_ptr<ScRangeName> xUndoRange; std::unique_ptr<ScDBCollection> xUndoDB; - ScRange aOldQuery; - ScRange aNewQuery; - bool bQuerySize; + ScRange aOldQuery; + ScRange aNewQuery; + bool bQuerySize; }; class ScUndoDataPilot: public ScSimpleUndo @@ -362,7 +362,7 @@ private: ScDocumentUniquePtr xNewUndoDoc; std::unique_ptr<ScDPObject> xOldDPObject; std::unique_ptr<ScDPObject> xNewDPObject; - bool bAllowMove; + bool const bAllowMove; }; class ScUndoConsolidate: public ScSimpleUndo @@ -382,11 +382,11 @@ public: virtual OUString GetComment() const override; private: - ScArea aDestArea; - ScDocumentUniquePtr xUndoDoc; - ScConsolidateParam aParam; - bool bInsRef; - SCSIZE nInsertCount; + ScArea const aDestArea; + ScDocumentUniquePtr xUndoDoc; + ScConsolidateParam const aParam; + bool const bInsRef; + SCSIZE const nInsertCount; std::unique_ptr<ScOutlineTable> xUndoTab; std::unique_ptr<ScDBData> xUndoData; }; @@ -410,15 +410,15 @@ public: virtual OUString GetComment() const override; private: - OUString aChartName; + OUString const aChartName; ScRangeListRef aOldRangeListRef; bool bOldColHeaders; bool bOldRowHeaders; // ScRange aNewRange; ScRangeListRef aNewRangeListRef; - bool bNewColHeaders; - bool bNewRowHeaders; - bool bAddRange; + bool const bNewColHeaders; + bool const bNewRowHeaders; + bool const bAddRange; void Init(); }; @@ -441,7 +441,7 @@ public: private: std::unique_ptr<ScMarkData> mxMarkData; - ScDocumentUniquePtr xUndoDoc; + ScDocumentUniquePtr const xUndoDoc; ScDocumentUniquePtr xRedoDoc; std::unique_ptr<ScRefUndoData> xRefUndoData; std::unique_ptr<ScRefUndoData> xRefRedoData; diff --git a/sc/source/ui/inc/undosort.hxx b/sc/source/ui/inc/undosort.hxx index d44827ffad5e..83b3a624a111 100644 --- a/sc/source/ui/inc/undosort.hxx +++ b/sc/source/ui/inc/undosort.hxx @@ -17,7 +17,7 @@ namespace sc { class UndoSort : public ScSimpleUndo { - ReorderParam maParam; + ReorderParam const maParam; public: UndoSort( ScDocShell* pDocSh, const ReorderParam& rParam ); diff --git a/sc/source/ui/inc/undostyl.hxx b/sc/source/ui/inc/undostyl.hxx index 972905cd031f..c5d5f425a919 100644 --- a/sc/source/ui/inc/undostyl.hxx +++ b/sc/source/ui/inc/undostyl.hxx @@ -49,9 +49,9 @@ public: class ScUndoModifyStyle: public ScSimpleUndo { private: - SfxStyleFamily eFamily; - ScStyleSaveData aOldData; - ScStyleSaveData aNewData; + SfxStyleFamily const eFamily; + ScStyleSaveData const aOldData; + ScStyleSaveData const aNewData; static void DoChange( ScDocShell* pDocSh, const OUString& rName, SfxStyleFamily eStyleFamily, @@ -91,13 +91,13 @@ private: struct ApplyStyleEntry { SCTAB mnTab; - OUString maOldStyle; + OUString const maOldStyle; explicit ApplyStyleEntry( SCTAB nTab, const OUString& rOldStyle ); }; typedef ::std::vector< ApplyStyleEntry > ApplyStyleVec; ApplyStyleVec maEntries; - OUString maNewStyle; + OUString const maNewStyle; }; #endif diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx index 31866fb6a9cc..e7df53065f46 100644 --- a/sc/source/ui/inc/undotab.hxx +++ b/sc/source/ui/inc/undotab.hxx @@ -55,11 +55,11 @@ public: virtual OUString GetComment() const override; private: - OUString sNewName; + OUString const sNewName; std::unique_ptr<SdrUndoAction> pDrawUndo; - sal_uLong nEndChangeAction; - SCTAB nTab; - bool bAppend; + sal_uLong nEndChangeAction; + SCTAB const nTab; + bool const bAppend; void SetChangeTrack(); }; @@ -84,9 +84,9 @@ private: std::unique_ptr<SdrUndoAction> pDrawUndo; std::vector<OUString> aNameList; - sal_uLong nStartChangeAction; - sal_uLong nEndChangeAction; - SCTAB nTab; + sal_uLong nStartChangeAction; + sal_uLong nEndChangeAction; + SCTAB const nTab; void SetChangeTrack(); }; @@ -134,7 +134,7 @@ public: virtual OUString GetComment() const override; private: - SCTAB nTab; + SCTAB const nTab; OUString sOldName; OUString sNewName; @@ -242,12 +242,12 @@ public: private: std::unique_ptr<ScMarkData> mpMarkData; - SCTAB nSrcTab; - SCTAB nDestTab; - OUString aName; - OUString aComment; - Color aColor; - ScScenarioFlags nFlags; + SCTAB const nSrcTab; + SCTAB const nDestTab; + OUString const aName; + OUString const aComment; + Color const aColor; + ScScenarioFlags const nFlags; std::unique_ptr<SdrUndoAction> pDrawUndo; }; @@ -267,8 +267,8 @@ public: virtual OUString GetComment() const override; private: - SCTAB nTab; - SCTAB nCount; + SCTAB const nTab; + SCTAB const nCount; ScDocumentUniquePtr xRedoDoc; std::unique_ptr<SdrUndoAction> pDrawUndo; @@ -291,7 +291,7 @@ public: virtual OUString GetComment() const override; private: - OUString aDocName; + OUString const aDocName; OUString aFltName; OUString aOptions; sal_uLong nRefreshDelay; @@ -323,8 +323,8 @@ public: virtual OUString GetComment() const override; private: - std::vector<SCTAB> undoTabs; - bool bShow; + std::vector<SCTAB> const undoTabs; + bool const bShow; void DoChange( bool bShow ) const; }; @@ -367,7 +367,7 @@ public: virtual OUString GetComment() const override; private: - SCTAB mnTab; + SCTAB const mnTab; ::std::unique_ptr<ScTableProtection> mpProtectSettings; void DoProtect(bool bProtect); @@ -416,15 +416,15 @@ public: virtual OUString GetComment() const override; private: - SCTAB nTab; - OUString aOldName; - OUString aNewName; - OUString aOldComment; - OUString aNewComment; - Color aOldColor; - Color aNewColor; - ScScenarioFlags nOldFlags; - ScScenarioFlags nNewFlags; + SCTAB const nTab; + OUString const aOldName; + OUString const aNewName; + OUString const aOldComment; + OUString const aNewComment; + Color const aOldColor; + Color const aNewColor; + ScScenarioFlags const nOldFlags; + ScScenarioFlags const nNewFlags; }; class ScUndoRenameObject: public ScSimpleUndo @@ -444,9 +444,9 @@ public: virtual OUString GetComment() const override; private: - OUString aPersistName; // to find object (works only for OLE objects) - OUString aOldName; - OUString aNewName; + OUString const aPersistName; // to find object (works only for OLE objects) + OUString const aOldName; + OUString const aNewName; SdrObject* GetObject(); }; @@ -465,8 +465,8 @@ public: virtual OUString GetComment() const override; private: - SCTAB nTab; - bool bRTL; + SCTAB const nTab; + bool const bRTL; void DoChange( bool bNew ); }; diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx index 1faf86bbd510..413c03c1a505 100644 --- a/sc/source/ui/inc/validate.hxx +++ b/sc/source/ui/inc/validate.hxx @@ -116,12 +116,12 @@ private: VclPtr<formula::RefEdit> m_pEdMax; VclPtr<FixedText> m_pFtHint; /// Hint text for cell range validity. - OUString maStrMin; - OUString maStrMax; - OUString maStrValue; - OUString maStrFormula; - OUString maStrRange; - OUString maStrList; + OUString const maStrMin; + OUString const maStrMax; + OUString const maStrValue; + OUString const maStrFormula; + OUString const maStrRange; + OUString const maStrList; sal_Unicode mcFmlaSep; /// List separator in formulas. DECL_LINK( EditSetFocusHdl, Control&, void ); @@ -171,7 +171,7 @@ class ScValidationDlg { typedef ScRefHdlrImpl<ScValidationDlg, SfxTabDialog, false> ScValidationDlgBase; - ScTabViewShell *m_pTabVwSh; + ScTabViewShell * const m_pTabVwSh; VclPtr<VclHBox> m_pHBox; sal_uInt16 m_nValuePageId; bool m_bOwnRefHdlr:1; diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index 4e1c5f46a761..80235f836a07 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -155,7 +155,7 @@ class ScBoundsProvider typedef ScPositionHelper::value_type value_type; typedef SCCOLROW index_type; - ScDocument* pDoc; + ScDocument* const pDoc; const SCTAB nTab; const bool bColumnHeader; const index_type MAX_INDEX; diff --git a/sc/source/ui/miscdlgs/dataproviderdlg.cxx b/sc/source/ui/miscdlgs/dataproviderdlg.cxx index 8686a16a468d..54a1e88a9249 100644 --- a/sc/source/ui/miscdlgs/dataproviderdlg.cxx +++ b/sc/source/ui/miscdlgs/dataproviderdlg.cxx @@ -35,7 +35,7 @@ class ScDataProviderBaseControl : public VclContainer, OUString maURL; OUString maID; - Link<Window*, void> maImportCallback; + Link<Window*, void> const maImportCallback; DECL_LINK(ProviderSelectHdl, ListBox&, void); DECL_LINK(IDEditHdl, Edit&, void); @@ -182,9 +182,9 @@ namespace { struct MenuData { - int nMenuID; + int const nMenuID; const char* aMenuName; - std::function<void(ScDataProviderDlg*)> maCallback; + std::function<void(ScDataProviderDlg*)> const maCallback; }; MenuData aStartData[] = { diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx index adad329bb363..9df3f424d885 100644 --- a/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx +++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx @@ -93,7 +93,7 @@ private: bool mbMultiDisable : 1; vcl::EnumContext maContext; - SfxBindings* mpBindings; + SfxBindings* const mpBindings; DECL_LINK( MFLeftIndentMdyHdl, Edit&, void ); DECL_LINK( CBOXMergnCellClkHdl, Button*, void ); diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx index 0618d87286e3..c4d403f26040 100644 --- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx +++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx @@ -87,16 +87,16 @@ private: ::sfx2::sidebar::ControllerItem maBorderBLTRControl; // images - Image maIMGCellBorder; - Image maIMGLineStyle1; - Image maIMGLineStyle2; - Image maIMGLineStyle3; - Image maIMGLineStyle4; - Image maIMGLineStyle5; - Image maIMGLineStyle6; - Image maIMGLineStyle7; - Image maIMGLineStyle8; - Image maIMGLineStyle9; + Image const maIMGCellBorder; + Image const maIMGLineStyle1; + Image const maIMGLineStyle2; + Image const maIMGLineStyle3; + Image const maIMGLineStyle4; + Image const maIMGLineStyle5; + Image const maIMGLineStyle6; + Image const maIMGLineStyle7; + Image const maIMGLineStyle8; + Image const maIMGLineStyle9; // BorderStyle defines sal_uInt16 mnInWidth; @@ -130,7 +130,7 @@ private: VclPtr<CellBorderStylePopup> mxCellBorderStylePopup; vcl::EnumContext maContext; - SfxBindings* mpBindings; + SfxBindings* const mpBindings; DECL_LINK(TbxCellBorderSelectHdl, ToolBox*, void); DECL_LINK(TbxLineStyleSelectHdl, ToolBox*, void); diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx index ce4a7203e91c..b3a9453b5b58 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx @@ -83,7 +83,7 @@ private: sal_Int32 mnCategorySelected; vcl::EnumContext maContext; - SfxBindings* mpBindings; + SfxBindings* const mpBindings; DECL_LINK(NumFormatSelectHdl, ListBox&, void); DECL_LINK(NumFormatValueHdl, Edit&, void); diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx index a138a097c48e..bc905ef89e63 100644 --- a/sc/source/ui/undo/undobase.cxx +++ b/sc/source/ui/undo/undobase.cxx @@ -103,7 +103,7 @@ namespace { private: ScDocument& m_rDoc; - bool m_bUndoEnabled; + bool const m_bUndoEnabled; public: explicit DisableUndoGuard(ScDocShell *pDocShell) : m_rDoc(pDocShell->GetDocument()) diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 605cc701c9a1..7e4a4faee2fe 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -1320,7 +1320,7 @@ namespace { class DataChangeNotifier { - ScHint maHint; + ScHint const maHint; public: DataChangeNotifier() : maHint(SfxHintId::ScDataChanged, ScAddress()) {} diff --git a/sc/source/ui/unoobj/cellvaluebinding.hxx b/sc/source/ui/unoobj/cellvaluebinding.hxx index 4527177dbb49..0d9e3e7d6747 100644 --- a/sc/source/ui/unoobj/cellvaluebinding.hxx +++ b/sc/source/ui/unoobj/cellvaluebinding.hxx @@ -70,7 +70,7 @@ namespace calc ::comphelper::OInterfaceContainerHelper2 m_aModifyListeners; /// our modify listeners bool m_bInitialized; /// has XInitialization::initialize been called? - bool m_bListPos; /// constructed as ListPositionCellBinding? + bool const m_bListPos; /// constructed as ListPositionCellBinding? public: OCellValueBinding( diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 79ec21b2596d..ead395b7f5b8 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -493,7 +493,7 @@ private: GlueType meGlue; SCCOL mnStartCol; SCROW mnStartRow; - ScDocument* mpDoc; + ScDocument* const mpDoc; bool mbColHeaders:1; bool mbRowHeaders:1; bool mbDummyUpperLeft:1; @@ -1334,7 +1334,7 @@ bool lcl_addUpperLeftCornerIfMissing(vector<ScTokenRef>& rRefTokens, class ShrinkRefTokenToDataRange { - ScDocument* mpDoc; + ScDocument* const mpDoc; public: explicit ShrinkRefTokenToDataRange(ScDocument* pDoc) : mpDoc(pDoc) {} void operator() (const ScTokenRef& rRef) diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx index 25647bc747b0..c0126179be85 100644 --- a/sc/source/ui/unoobj/condformatuno.cxx +++ b/sc/source/ui/unoobj/condformatuno.cxx @@ -76,8 +76,8 @@ const SfxItemPropertyMapEntry* getConditionEntryrPropSet() struct ConditionEntryApiMap { - ScConditionMode eMode; - sal_Int32 nApiMode; + ScConditionMode const eMode; + sal_Int32 const nApiMode; }; ConditionEntryApiMap aConditionEntryMap[] = @@ -127,8 +127,8 @@ const SfxItemPropertyMapEntry* getColorScalePropSet() struct ColorScaleEntryTypeApiMap { - ScColorScaleEntryType eType; - sal_Int32 nApiType; + ScColorScaleEntryType const eType; + sal_Int32 const nApiType; }; ColorScaleEntryTypeApiMap aColorScaleEntryTypeMap[] = @@ -176,8 +176,8 @@ const SfxItemPropertyMapEntry* getDataBarPropSet() struct DataBarAxisApiMap { - databar::ScAxisPosition ePos; - sal_Int32 nApiPos; + databar::ScAxisPosition const ePos; + sal_Int32 const nApiPos; }; DataBarAxisApiMap aDataBarAxisMap[] = @@ -189,8 +189,8 @@ DataBarAxisApiMap aDataBarAxisMap[] = struct DataBarEntryTypeApiMap { - ScColorScaleEntryType eType; - sal_Int32 nApiType; + ScColorScaleEntryType const eType; + sal_Int32 const nApiType; }; DataBarEntryTypeApiMap aDataBarEntryTypeMap[] = @@ -227,8 +227,8 @@ const SfxItemPropertyMapEntry* getIconSetPropSet() struct IconSetTypeApiMap { - ScIconSetType eType; - sal_Int32 nApiType; + ScIconSetType const eType; + sal_Int32 const nApiType; }; const IconSetTypeApiMap aIconSetApiMap[] = @@ -256,8 +256,8 @@ const IconSetTypeApiMap aIconSetApiMap[] = struct IconSetEntryTypeApiMap { - ScColorScaleEntryType eType; - sal_Int32 nApiType; + ScColorScaleEntryType const eType; + sal_Int32 const nApiType; }; IconSetEntryTypeApiMap aIconSetEntryTypeMap[] = @@ -288,8 +288,8 @@ const SfxItemPropertyMapEntry* getCondDatePropSet() struct DateTypeApiMap { - condformat::ScCondFormatDateType eType; - sal_Int32 nApiType; + condformat::ScCondFormatDateType const eType; + sal_Int32 const nApiType; }; DateTypeApiMap aDateTypeApiMap[] = diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index 12d15581ed9f..b0c564daff49 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -388,7 +388,7 @@ class SequencesContainer long& mrDocRow; bool mbOverflow; bool mbArgError; - ScDocument* mpDoc; + ScDocument* const mpDoc; ScTokenArray& mrTokenArr; public: diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx index 969c93dd69c9..2260f93295a2 100644 --- a/sc/source/ui/unoobj/servuno.cxx +++ b/sc/source/ui/unoobj/servuno.cxx @@ -250,7 +250,7 @@ using Type = ScServiceProvider::Type; struct ProvNamesId_Type { const char * pName; - ScServiceProvider::Type nType; + ScServiceProvider::Type const nType; }; const ProvNamesId_Type aProvNamesId[] = diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index bf0d87d60038..49ce7146ccd1 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -1314,7 +1314,7 @@ SdrObject* ScShapeObj::GetSdrObject() const throw() class ShapeUnoEventAccessImpl : public ::cppu::WeakImplHelper< container::XNameReplace > { private: - ScShapeObj* mpShape; + ScShapeObj* const mpShape; ScMacroInfo* getInfo( bool bCreate ) { diff --git a/sc/source/ui/vba/vbaassistant.cxx b/sc/source/ui/vba/vbaassistant.cxx index 13b586d232b4..583d32ce9502 100644 --- a/sc/source/ui/vba/vbaassistant.cxx +++ b/sc/source/ui/vba/vbaassistant.cxx @@ -28,8 +28,9 @@ using namespace ooo::vba; using namespace ooo::vba::office::MsoAnimationType; -ScVbaAssistant::ScVbaAssistant( const uno::Reference< XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext ): ScVbaAssistantImpl_BASE(rParent, rContext), -m_sName( "Clippit" ) +static constexpr OUStringLiteral g_sName = "Clippit"; + +ScVbaAssistant::ScVbaAssistant( const uno::Reference< XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext ): ScVbaAssistantImpl_BASE(rParent, rContext) { m_bIsVisible = false; m_nPointsLeft = 795; @@ -95,7 +96,7 @@ ScVbaAssistant::setAnimation( ::sal_Int32 _animation ) OUString SAL_CALL ScVbaAssistant::Name( ) { - return m_sName; + return g_sName; } OUString diff --git a/sc/source/ui/vba/vbaassistant.hxx b/sc/source/ui/vba/vbaassistant.hxx index d6d95a6c01c7..25eb414e3025 100644 --- a/sc/source/ui/vba/vbaassistant.hxx +++ b/sc/source/ui/vba/vbaassistant.hxx @@ -36,7 +36,6 @@ private: bool m_bIsVisible; sal_Int32 m_nPointsLeft; sal_Int32 m_nPointsTop; - OUString m_sName; sal_Int32 m_nAnimation; public: ScVbaAssistant( const css::uno::Reference< ov::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext ); diff --git a/sc/source/ui/vba/vbaaxis.hxx b/sc/source/ui/vba/vbaaxis.hxx index 88004a31514b..93b92552f36a 100644 --- a/sc/source/ui/vba/vbaaxis.hxx +++ b/sc/source/ui/vba/vbaaxis.hxx @@ -30,7 +30,7 @@ class ScVbaAxis : public ScVbaAxis_BASE css::uno::Reference< ov::excel::XChart > moChartParent; css::uno::Reference< css::beans::XPropertySet > mxPropertySet; sal_Int32 mnType; - sal_Int32 mnGroup; + sal_Int32 const mnGroup; bool bCrossesAreCustomized; /// @throws css::uno::RuntimeException ScVbaChart* getChartPtr(); diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx index 46dc73a71611..5bf4bdf9b2d9 100644 --- a/sc/source/ui/vba/vbaborders.cxx +++ b/sc/source/ui/vba/vbaborders.cxx @@ -53,7 +53,7 @@ class ScVbaBorder : public ScVbaBorder_Base { private: uno::Reference< beans::XPropertySet > m_xProps; - sal_Int32 m_LineType; + sal_Int32 const m_LineType; ScVbaPalette m_Palette; void setBorderLine( const table::BorderLine& rBorderLine ) { diff --git a/sc/source/ui/vba/vbacharacters.hxx b/sc/source/ui/vba/vbacharacters.hxx index 9a7bd69229f2..1c7d34d06a23 100644 --- a/sc/source/ui/vba/vbacharacters.hxx +++ b/sc/source/ui/vba/vbacharacters.hxx @@ -32,9 +32,9 @@ class ScVbaCharacters : public ScVbaCharacters_BASE private: css::uno::Reference< css::text::XTextRange > m_xTextRange; css::uno::Reference< css::text::XSimpleText > m_xSimpleText; - ScVbaPalette m_aPalette; + ScVbaPalette const m_aPalette; // Add because of MSO has different behavior. - bool bReplace; + bool const bReplace; public: /// @throws css::lang::IllegalArgumentException /// @throws css::uno::RuntimeException diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx index 400f6459fa3b..5225cb722dc1 100644 --- a/sc/source/ui/vba/vbaeventshelper.cxx +++ b/sc/source/ui/vba/vbaeventshelper.cxx @@ -172,7 +172,7 @@ private: ::osl::Mutex maMutex; ScVbaEventsHelper& mrVbaEvents; uno::Reference< frame::XModel > mxModel; - ScDocShell* mpDocShell; + ScDocShell* const mpDocShell; WindowControllerMap maControllers; /// Maps VCL top windows to their controllers. std::multiset< VclPtr<vcl::Window> > m_PostedWindows; /// Keeps processWindowResizeEvent windows from being deleted between postWindowResizeEvent and processWindowResizeEvent VclPtr<vcl::Window> mpActiveWindow; /// Currently activated window, to prevent multiple (de)activation. diff --git a/sc/source/ui/vba/vbafiledialog.hxx b/sc/source/ui/vba/vbafiledialog.hxx index 202eefa020e0..f35a227dc84b 100644 --- a/sc/source/ui/vba/vbafiledialog.hxx +++ b/sc/source/ui/vba/vbafiledialog.hxx @@ -30,7 +30,7 @@ typedef InheritedHelperInterfaceWeakImpl< ov::excel::XFileDialog > ScVbaFileDial class ScVbaFileDialog : public ScVbaFileDialog_BASE { private: - sal_Int32 m_nType; + sal_Int32 const m_nType; OUString m_sTitle; OUString m_sInitialFileName; css::uno::Reference< ov::excel::XFileDialogSelectedItems> m_xItems; diff --git a/sc/source/ui/vba/vbafont.hxx b/sc/source/ui/vba/vbafont.hxx index 35c0891b74b9..5b7e923668d7 100644 --- a/sc/source/ui/vba/vbafont.hxx +++ b/sc/source/ui/vba/vbafont.hxx @@ -33,7 +33,7 @@ typedef cppu::ImplInheritanceHelper< VbaFontBase, ov::excel::XFont > ScVbaFont_B class ScVbaFont : public ScVbaFont_BASE { - ScCellRangeObj* mpRangeObj; + ScCellRangeObj* const mpRangeObj; SfxItemSet* GetDataSet(); public: /// @throws css::uno::RuntimeException diff --git a/sc/source/ui/vba/vbaformat.hxx b/sc/source/ui/vba/vbaformat.hxx index d8bbc897e225..e89b516bcdc1 100644 --- a/sc/source/ui/vba/vbaformat.hxx +++ b/sc/source/ui/vba/vbaformat.hxx @@ -37,7 +37,7 @@ template< typename... Ifc > class ScVbaFormat : public InheritedHelperInterfaceWeakImpl< Ifc... > { typedef InheritedHelperInterfaceWeakImpl< Ifc... > ScVbaFormat_BASE; - css::lang::Locale m_aDefaultLocale; + css::lang::Locale const m_aDefaultLocale; protected: css::uno::Reference< css::beans::XPropertySet > mxPropertySet; css::uno::Reference< css::util::XNumberFormatsSupplier > mxNumberFormatsSupplier; @@ -45,7 +45,7 @@ protected: css::uno::Reference< css::util::XNumberFormatTypes > xNumberFormatTypes; css::uno::Reference< css::frame::XModel > mxModel; css::uno::Reference< css::beans::XPropertyState > xPropertyState; - bool mbCheckAmbiguoity; + bool const mbCheckAmbiguoity; bool mbAddIndent; /// @throws css::script::BasicErrorException bool isAmbiguous(const OUString& _sPropertyName); diff --git a/sc/source/ui/vba/vbahyperlinks.cxx b/sc/source/ui/vba/vbahyperlinks.cxx index 7e46e38a1c6d..a1b613442b20 100644 --- a/sc/source/ui/vba/vbahyperlinks.cxx +++ b/sc/source/ui/vba/vbahyperlinks.cxx @@ -52,7 +52,7 @@ struct EqualAnchorFunctor { uno::Reference< excel::XRange > mxAnchorRange; uno::Reference< msforms::XShape > mxAnchorShape; - sal_Int32 mnType; + sal_Int32 const mnType; /// @throws uno::RuntimeException explicit EqualAnchorFunctor( const uno::Reference< excel::XHyperlink >& rxHlink ); /// @throws uno::RuntimeException diff --git a/sc/source/ui/vba/vbainterior.hxx b/sc/source/ui/vba/vbainterior.hxx index 4d253d7c0e87..6840997b245f 100644 --- a/sc/source/ui/vba/vbainterior.hxx +++ b/sc/source/ui/vba/vbainterior.hxx @@ -36,7 +36,7 @@ typedef InheritedHelperInterfaceWeakImpl< ov::excel::XInterior > ScVbaInterior_B class ScVbaInterior final : public ScVbaInterior_BASE { css::uno::Reference< css::beans::XPropertySet > m_xProps; - ScDocument* m_pScDoc; + ScDocument* const m_pScDoc; Color m_aPattColor; sal_Int32 m_nPattern; diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx index 3ffea92358ff..268a4f77a669 100644 --- a/sc/source/ui/vba/vbapagebreaks.cxx +++ b/sc/source/ui/vba/vbapagebreaks.cxx @@ -30,7 +30,7 @@ private: uno::Reference< XHelperInterface > mxParent; uno::Reference< uno::XComponentContext > mxContext; uno::Reference< sheet::XSheetPageBreak > mxSheetPageBreak; - bool m_bColumn; + bool const m_bColumn; public: RangePageBreaks( const uno::Reference< XHelperInterface >& xParent, diff --git a/sc/source/ui/vba/vbapalette.hxx b/sc/source/ui/vba/vbapalette.hxx index 8a643837488e..bb76ee8e9f75 100644 --- a/sc/source/ui/vba/vbapalette.hxx +++ b/sc/source/ui/vba/vbapalette.hxx @@ -32,7 +32,7 @@ class SfxObjectShell; class ScVbaPalette { private: - SfxObjectShell* m_pShell; + SfxObjectShell* const m_pShell; public: explicit ScVbaPalette( SfxObjectShell* pShell ) : m_pShell( pShell ) {} explicit ScVbaPalette( const css::uno::Reference< css::frame::XModel >& rxModel ); diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index a806f89ddade..2c2fd50ccbab 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -337,8 +337,8 @@ public: class RangesEnumerationImpl : public EnumerationHelperImpl { - bool mbIsRows; - bool mbIsColumns; + bool const mbIsRows; + bool const mbIsColumns; public: /// @throws uno::RuntimeException RangesEnumerationImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, bool bIsRows, bool bIsColumns ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mbIsRows( bIsRows ), mbIsColumns( bIsColumns ) {} @@ -350,8 +350,8 @@ public: class ScVbaRangeAreas : public ScVbaCollectionBaseImpl { - bool mbIsRows; - bool mbIsColumns; + bool const mbIsRows; + bool const mbIsColumns; public: ScVbaRangeAreas( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess, bool bIsRows, bool bIsColumns ) : ScVbaCollectionBaseImpl( xParent, xContext, xIndexAccess ), mbIsRows( bIsRows ), mbIsColumns( bIsColumns ) {} @@ -594,9 +594,9 @@ public: struct CellPos { CellPos( sal_Int32 nRow, sal_Int32 nCol, sal_Int32 nArea ):m_nRow(nRow), m_nCol(nCol), m_nArea( nArea ) {}; -sal_Int32 m_nRow; -sal_Int32 m_nCol; -sal_Int32 m_nArea; +sal_Int32 const m_nRow; +sal_Int32 const m_nCol; +sal_Int32 const m_nArea; }; typedef ::cppu::WeakImplHelper< container::XEnumeration > CellsEnumeration_BASE; @@ -610,7 +610,7 @@ typedef ::std::vector< CellPos > vCellPos; class ColumnsRowEnumeration: public CellsEnumeration_BASE { uno::Reference< excel::XRange > mxRange; - sal_Int32 mMaxElems; + sal_Int32 const mMaxElems; sal_Int32 mCurElem; public: @@ -697,7 +697,7 @@ static const char CELLSTYLE[] = "CellStyle"; class CellValueSetter : public ValueSetter { protected: - uno::Any maValue; + uno::Any const maValue; public: explicit CellValueSetter( const uno::Any& aValue ); virtual bool processValue( const uno::Any& aValue, const uno::Reference< table::XCell >& xCell ) override; @@ -859,8 +859,8 @@ void CellValueGetter::visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< class CellFormulaValueSetter : public CellValueSetter { private: - ScDocument* m_pDoc; - formula::FormulaGrammar::Grammar m_eGrammar; + ScDocument* const m_pDoc; + formula::FormulaGrammar::Grammar const m_eGrammar; public: CellFormulaValueSetter( const uno::Any& aValue, ScDocument* pDoc, formula::FormulaGrammar::Grammar eGram ):CellValueSetter( aValue ), m_pDoc( pDoc ), m_eGrammar( eGram ){} protected: @@ -908,8 +908,8 @@ protected: class CellFormulaValueGetter : public CellValueGetter { private: - ScDocument* m_pDoc; - formula::FormulaGrammar::Grammar m_eGrammar; + ScDocument* const m_pDoc; + formula::FormulaGrammar::Grammar const m_eGrammar; public: CellFormulaValueGetter(ScDocument* pDoc, formula::FormulaGrammar::Grammar eGram ) : CellValueGetter( ), m_pDoc( pDoc ), m_eGrammar( eGram ) {} virtual void visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< table::XCell >& xCell ) override diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx index 67e83f5e7aab..52ec4ac70e3e 100644 --- a/sc/source/ui/vba/vbarange.hxx +++ b/sc/source/ui/vba/vbarange.hxx @@ -80,8 +80,8 @@ class ScVbaRange : public ScVbaRange_BASE css::uno::Reference< ov::XCollection > m_Borders; css::uno::Reference< css::table::XCellRange > mxRange; css::uno::Reference< css::sheet::XSheetCellRangeContainer > mxRanges; - bool mbIsRows; - bool mbIsColumns; + bool const mbIsRows; + bool const mbIsColumns; css::uno::Reference< ov::excel::XValidation > m_xValidation; /// @throws css::uno::RuntimeException double getCalcColWidth(const css::table::CellRangeAddress&); diff --git a/sc/source/ui/vba/vbasheetobject.hxx b/sc/source/ui/vba/vbasheetobject.hxx index 481490f97ae8..357309e1a0f5 100644 --- a/sc/source/ui/vba/vbasheetobject.hxx +++ b/sc/source/ui/vba/vbasheetobject.hxx @@ -71,7 +71,7 @@ private: void setFullString( const OUString& rString ); private: - ScVbaPalette maPalette; + ScVbaPalette const maPalette; css::uno::Reference< css::beans::XPropertySet > mxPropSet; sal_Int32 mnStart; sal_Int32 mnLength; @@ -122,7 +122,7 @@ protected: virtual void implSetDefaultProperties(); protected: - ScVbaPalette maPalette; + ScVbaPalette const maPalette; css::uno::Reference< css::frame::XModel > mxModel; css::uno::Reference< css::drawing::XShape > mxShape; css::uno::Reference< css::beans::XPropertySet > mxShapeProps; diff --git a/sc/source/ui/vba/vbasheetobjects.cxx b/sc/source/ui/vba/vbasheetobjects.cxx index e70dd8220bb4..e5fb39b4abfa 100644 --- a/sc/source/ui/vba/vbasheetobjects.cxx +++ b/sc/source/ui/vba/vbasheetobjects.cxx @@ -386,7 +386,7 @@ protected: protected: uno::Reference< container::XIndexContainer > mxFormIC; - OUString maModelServiceName; + OUString const maModelServiceName; sal_Int16 /* css::form::FormComponentType */ meType; }; diff --git a/sc/source/ui/vba/vbatitle.hxx b/sc/source/ui/vba/vbatitle.hxx index 228c57553c72..240fa21bd9e6 100644 --- a/sc/source/ui/vba/vbatitle.hxx +++ b/sc/source/ui/vba/vbatitle.hxx @@ -40,7 +40,7 @@ protected: css::uno::Reference< css::drawing::XShape > xTitleShape; css::uno::Reference< css::beans::XPropertySet > xShapePropertySet; std::unique_ptr<ov::ShapeHelper> oShapeHelper; - ScVbaPalette m_Palette; + ScVbaPalette const m_Palette; public: TitleImpl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx index 1ed953d9e778..2edd688eea8e 100644 --- a/sc/source/ui/vba/vbawindows.cxx +++ b/sc/source/ui/vba/vbawindows.cxx @@ -96,7 +96,7 @@ public: class WindowEnumImpl : public WindowComponentEnumImpl { - uno::Any m_aApplication; + uno::Any const m_aApplication; public: WindowEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Any& aApplication ): WindowComponentEnumImpl( xContext ), m_aApplication( aApplication ) {} virtual uno::Any SAL_CALL nextElement( ) override diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index a74bb99e49b2..8baad38731e2 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -1637,7 +1637,7 @@ static void lcl_MoveToEnd( ScDPSaveDimension& rDim, const OUString& rItemName ) struct ScOUStringCollate { - CollatorWrapper* mpCollator; + CollatorWrapper* const mpCollator; explicit ScOUStringCollate(CollatorWrapper* pColl) : mpCollator(pColl) {} diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx index b3cb3e660f2a..ef904f54b97f 100644 --- a/sc/source/ui/view/drawvie4.cxx +++ b/sc/source/ui/view/drawvie4.cxx @@ -285,7 +285,7 @@ public: class CopyRangeData { ScDocument* mpSrc; - ScDocument* mpDest; + ScDocument* const mpDest; public: CopyRangeData(ScDocument* pSrc, ScDocument* pDest) : mpSrc(pSrc), mpDest(pDest) {} diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index fdcdf2da7e5b..14df2e3676aa 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -200,13 +200,13 @@ class ScFilterListBox : public ListBox { private: VclPtr<ScGridWindow> pGridWin; - SCCOL nCol; - SCROW nRow; + SCCOL const nCol; + SCROW const nRow; bool bInit; bool bCancelled; bool bInSelect; sal_uLong nSel; - ScFilterBoxMode eMode; + ScFilterBoxMode const eMode; protected: void SelectHdl(); @@ -565,7 +565,7 @@ struct AutoFilterData : public ScCheckListMenuWindow::ExtendedData class AutoFilterAction : public ScMenuFloatingWindow::Action { VclPtr<ScGridWindow> mpWindow; - ScGridWindow::AutoFilterMode meMode; + ScGridWindow::AutoFilterMode const meMode; public: AutoFilterAction(ScGridWindow* p, ScGridWindow::AutoFilterMode eMode) : mpWindow(p), meMode(eMode) {} @@ -578,7 +578,7 @@ public: class AutoFilterPopupEndAction : public ScMenuFloatingWindow::Action { VclPtr<ScGridWindow> mpWindow; - ScAddress maPos; + ScAddress const maPos; public: AutoFilterPopupEndAction(ScGridWindow* p, const ScAddress& rPos) : mpWindow(p), maPos(rPos) {} diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx index 4adfc1e32f5d..3864714bb752 100644 --- a/sc/source/ui/view/gridwin2.cxx +++ b/sc/source/ui/view/gridwin2.cxx @@ -427,9 +427,9 @@ public: } private: - ScDPObject* mpDPObject; - long mnDimIndex; - SortType meType; + ScDPObject* const mpDPObject; + long const mnDimIndex; + SortType const meType; sal_uInt16 mnUserListIndex; ScTabViewShell* mpViewShell; }; diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 40c66bb6de99..a9023e063411 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -123,7 +123,7 @@ class ScDrawStringsVars bool bRepeat; bool bShrink; - bool bPixelToLogic; + bool const bPixelToLogic; bool bCellContrast; Color aBackConfigColor; // used for ScPatternAttr::GetFont calls @@ -2793,7 +2793,7 @@ public: private: tools::Rectangle maRect; VclPtr<OutputDevice> mpDev; - bool mbMetaFile; + bool const mbMetaFile; }; // Returns needed width in current units; sets rNeededPixel to needed width in pixels diff --git a/sc/source/ui/view/prevloc.cxx b/sc/source/ui/view/prevloc.cxx index 6f6aea7aeb2d..259c5786ea6e 100644 --- a/sc/source/ui/view/prevloc.cxx +++ b/sc/source/ui/view/prevloc.cxx @@ -40,11 +40,11 @@ enum ScPreviewLocationType struct ScPreviewLocationEntry { - ScPreviewLocationType eType; - tools::Rectangle aPixelRect; - ScRange aCellRange; - bool bRepeatCol; - bool bRepeatRow; + ScPreviewLocationType const eType; + tools::Rectangle const aPixelRect; + ScRange const aCellRange; + bool const bRepeatCol; + bool const bRepeatRow; ScPreviewLocationEntry( ScPreviewLocationType eNewType, const tools::Rectangle& rPixel, const ScRange& rRange, bool bRepCol, bool bRepRow ) : diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 342a84755220..d4e88c791f21 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -103,7 +103,7 @@ void ScTabViewShell::ConnectObject( const SdrOle2Obj* pObj ) class PopupCallback : public cppu::WeakImplHelper<css::awt::XCallback> { ScTabViewShell* m_pViewShell; - SdrOle2Obj* m_pObject; + SdrOle2Obj* const m_pObject; public: explicit PopupCallback(ScTabViewShell* pViewShell, SdrOle2Obj* pObject) |