diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-22 13:12:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-22 20:54:46 +0200 |
commit | 66e32324f6441818612f088cfa5c8082c8ceea32 (patch) | |
tree | 9117ab96f16b30ca8b5f098afd71c0b1ba6d2beb /sc/inc | |
parent | b622db74f0dcb32cb1d64f1ad1a365bd45106443 (diff) |
loplugin:constparam in sc part1
Change-Id: I82fba7ebb3b4f018721642c96bbfa615c6a382c3
Reviewed-on: https://gerrit.libreoffice.org/41419
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/colorscale.hxx | 6 | ||||
-rw-r--r-- | sc/inc/column.hxx | 4 | ||||
-rw-r--r-- | sc/inc/conditio.hxx | 4 | ||||
-rw-r--r-- | sc/inc/docpool.hxx | 2 | ||||
-rw-r--r-- | sc/inc/document.hxx | 26 | ||||
-rw-r--r-- | sc/inc/documentimport.hxx | 2 | ||||
-rw-r--r-- | sc/inc/dpobject.hxx | 6 | ||||
-rw-r--r-- | sc/inc/dpsdbtab.hxx | 2 | ||||
-rw-r--r-- | sc/inc/dpshttab.hxx | 2 | ||||
-rw-r--r-- | sc/inc/dptabdat.hxx | 2 | ||||
-rw-r--r-- | sc/inc/dptabres.hxx | 2 | ||||
-rw-r--r-- | sc/inc/dptabsrc.hxx | 2 | ||||
-rw-r--r-- | sc/inc/drwlayer.hxx | 12 | ||||
-rw-r--r-- | sc/inc/formulacell.hxx | 2 | ||||
-rw-r--r-- | sc/inc/global.hxx | 6 |
15 files changed, 40 insertions, 40 deletions
diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx index ad702f6980a6..4fe901e8387d 100644 --- a/sc/inc/colorscale.hxx +++ b/sc/inc/colorscale.hxx @@ -65,7 +65,7 @@ public: void SetFormula(const OUString& rFormula, ScDocument* pDoc, const ScAddress& rAddr, formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_DEFAULT); - void UpdateReference( sc::RefUpdateContext& rCxt ); + void UpdateReference( const sc::RefUpdateContext& rCxt ); void UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt ); void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt ); void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt ); @@ -258,7 +258,7 @@ private: double GetMaxValue() const; void calcMinMax(double& nMin, double& nMax) const; - double CalcValue(double nMin, double nMax, ScColorScaleEntries::const_iterator& rItr) const; + double CalcValue(double nMin, double nMax, const ScColorScaleEntries::const_iterator& rItr) const; public: ScColorScaleFormat(ScDocument* pDoc); ScColorScaleFormat(ScDocument* pDoc, const ScColorScaleFormat& rFormat); @@ -400,7 +400,7 @@ private: double GetMinValue() const; double GetMaxValue() const; - double CalcValue(double nMin, double nMax, ScIconSetFormat::const_iterator& itr) const; + double CalcValue(double nMin, double nMax, const ScIconSetFormat::const_iterator& itr) const; std::unique_ptr<ScIconSetFormatData> mpFormatData; }; diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index db72912cbcb2..b9b5b01f3fe2 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -171,7 +171,7 @@ friend class sc::CellStoreEvent; bool ParseString( ScCellValue& rCell, SCROW nRow, SCTAB nTab, const OUString& rString, formula::FormulaGrammar::AddressConvention eConv, - ScSetStringParam* pParam ); + const ScSetStringParam* pParam ); public: @@ -296,7 +296,7 @@ public: ScAttrIterator* CreateAttrIterator( SCROW nStartRow, SCROW nEndRow ) const; void UpdateSelectionFunction( - const ScRangeList& rRanges, ScFunctionData& rData, ScFlatBoolRowSegments& rHiddenRows ); + const ScRangeList& rRanges, ScFunctionData& rData, const ScFlatBoolRowSegments& rHiddenRows ); void CopyToColumn( sc::CopyToDocContext& rCxt, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked, diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx index 23e5a69752d4..27acc6e0d668 100644 --- a/sc/inc/conditio.hxx +++ b/sc/inc/conditio.hxx @@ -93,7 +93,7 @@ private: ScDocument* mpDoc; std::function<void()> maCallbackFunction; - void startListening(ScTokenArray* pTokens, const ScRange& rPos); + void startListening(const ScTokenArray* pTokens, const ScRange& rPos); public: explicit ScFormulaListener(ScFormulaCell* pCell); @@ -104,7 +104,7 @@ public: bool NeedsRepaint() const; - void addTokenArray(ScTokenArray* pTokens, const ScRange& rRange); + void addTokenArray(const ScTokenArray* pTokens, const ScRange& rRange); void stopListening(); void setCallback(const std::function<void()>& aCallbackFunction); }; diff --git a/sc/inc/docpool.hxx b/sc/inc/docpool.hxx index 064481952fcc..a62a03f296ac 100644 --- a/sc/inc/docpool.hxx +++ b/sc/inc/docpool.hxx @@ -43,7 +43,7 @@ public: virtual const SfxPoolItem& Put( const SfxPoolItem&, sal_uInt16 nWhich = 0 ) override; - void StyleDeleted( ScStyleSheet* pStyle ); // delete templates(?) in organizer + void StyleDeleted( const ScStyleSheet* pStyle ); // delete templates(?) in organizer void CellStyleCreated( const OUString& rName, ScDocument* pDoc ); virtual bool GetPresentation( const SfxPoolItem& rItem, MapUnit ePresentationMetric, diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index e832cc381099..67e8ed4a3ba3 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -880,7 +880,7 @@ public: SC_DLLPUBLIC ScExternalRefManager* GetExternalRefManager() const; bool IsInExternalReferenceMarking() const; void MarkUsedExternalReferences(); - bool MarkUsedExternalReferences( ScTokenArray& rArr, const ScAddress& rPos ); + bool MarkUsedExternalReferences( const ScTokenArray& rArr, const ScAddress& rPos ); /** Returns the pool containing external formula parsers. Creates the pool on first call. */ @@ -1210,7 +1210,7 @@ public: SfxItemSet* GetPreviewFont() { return pPreviewFont; } SfxItemSet* GetPreviewFont( SCCOL nCol, SCROW nRow, SCTAB nTab ); const ScMarkData& GetPreviewSelection() const { return maPreviewSelection; } - void SetPreviewSelection( ScMarkData& rSel ); + void SetPreviewSelection( const ScMarkData& rSel ); ScStyleSheet* GetPreviewCellStyle() { return pPreviewCellStyle; } ScStyleSheet* GetPreviewCellStyle( SCCOL nCol, SCROW nRow, SCTAB nTab ); void SetPreviewCellStyle( ScStyleSheet* pStyle ) { pPreviewCellStyle = pStyle; } @@ -1509,11 +1509,11 @@ public: void TransliterateText( const ScMarkData& rMultiMark, TransliterationFlags nType ); - SC_DLLPUBLIC void InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2, + SC_DLLPUBLIC void InitUndo( const ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2, bool bColInfo = false, bool bRowInfo = false ); void AddUndoTab( SCTAB nTab1, SCTAB nTab2, bool bColInfo = false, bool bRowInfo = false ); - SC_DLLPUBLIC void InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSelection, + SC_DLLPUBLIC void InitUndoSelected( const ScDocument* pSrcDoc, const ScMarkData& rTabSelection, bool bColInfo = false, bool bRowInfo = false ); // don't use anymore: @@ -1868,7 +1868,7 @@ public: void UpdStlShtPtrsFrmNms(); void StylesToNames(); - SC_DLLPUBLIC void CopyStdStylesFrom( ScDocument* pSrcDoc ); + SC_DLLPUBLIC void CopyStdStylesFrom( const ScDocument* pSrcDoc ); sal_uLong GetSrcVersion() const { return nSrcVer; } @@ -1929,7 +1929,7 @@ public: void ReplaceStyle( const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRow, SCTAB nTab, - ScMarkData& rMark); + const ScMarkData& rMark); void InvalidateTextWidth( const OUString& rStyleName ); void InvalidateTextWidth( SCTAB nTab ); @@ -2039,7 +2039,7 @@ private: void FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nOtherEndRow, bool bColumns, ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab, - SCCOLROW nEndCol, SCCOLROW* pTranslate, + SCCOLROW nEndCol, const SCCOLROW* pTranslate, ScProgress* pProgress, sal_uLong nProAdd ); DECL_LINK(TrackTimeHdl, Timer *, void); @@ -2104,8 +2104,8 @@ public: bool IsTrackFormulasPending() const { return mbTrackFormulasPending; } void FinalTrackFormulas( SfxHintId nHintId ); bool IsFinalTrackFormulas() const { return mbFinalTrackFormulas; } - bool IsInFormulaTree( ScFormulaCell* pCell ) const; - bool IsInFormulaTrack( ScFormulaCell* pCell ) const; + bool IsInFormulaTree( const ScFormulaCell* pCell ) const; + bool IsInFormulaTrack( const ScFormulaCell* pCell ) const; HardRecalcState GetHardRecalcState() { return eHardRecalcState; } void SetHardRecalcState( HardRecalcState eVal ) { eHardRecalcState = eVal; } void StartAllListeners(); @@ -2236,7 +2236,7 @@ public: void InvalidateStyleSheetUsage() { bStyleSheetUsageInvalid = true; } void SC_DLLPUBLIC GetSortParam( ScSortParam& rParam, SCTAB nTab ); - void SC_DLLPUBLIC SetSortParam( ScSortParam& rParam, SCTAB nTab ); + void SC_DLLPUBLIC SetSortParam( const ScSortParam& rParam, SCTAB nTab ); void SetVbaEventProcessor( const css::uno::Reference< css::script::vba::XVBAEventProcessor >& rxVbaEvents ) { mxVbaEvents = rxVbaEvents; } @@ -2331,7 +2331,7 @@ private: class NumFmtMergeHandler { public: - explicit NumFmtMergeHandler(ScDocument* pDoc, ScDocument* pSrcDoc); + explicit NumFmtMergeHandler(ScDocument* pDoc, const ScDocument* pSrcDoc); ~NumFmtMergeHandler(); private: @@ -2342,7 +2342,7 @@ private: ScTable* FetchTable( SCTAB nTab ); const ScTable* FetchTable( SCTAB nTab ) const; - void MergeNumberFormatter(ScDocument* pSrcDoc); + void MergeNumberFormatter(const ScDocument* pSrcDoc); void ImplCreateOptions(); // Suggestion: switch to on-demand? void ImplDeleteOptions(); @@ -2373,7 +2373,7 @@ private: SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const; void ReservePatternCount( SCTAB nTab, SCCOL nCol, SCSIZE nReserve ); - void SharePooledResources( ScDocument* pSrcDoc ); + void SharePooledResources( const ScDocument* pSrcDoc ); void EndListeningIntersectedGroup( sc::EndListeningContext& rCxt, const ScAddress& rPos, std::vector<ScAddress>* pGroupPos ); diff --git a/sc/inc/documentimport.hxx b/sc/inc/documentimport.hxx index 96dbc12db20f..5762d77a2ee4 100644 --- a/sc/inc/documentimport.hxx +++ b/sc/inc/documentimport.hxx @@ -88,7 +88,7 @@ public: void setOriginDate(sal_uInt16 nYear, sal_uInt16 nMonth, sal_uInt16 nDay); void setAutoInput(const ScAddress& rPos, const OUString& rStr, - ScSetStringParam* pStringParam = nullptr); + const ScSetStringParam* pStringParam = nullptr); void setNumericCell(const ScAddress& rPos, double fVal); void setStringCell(const ScAddress& rPos, const OUString& rStr); void setEditCell(const ScAddress& rPos, EditTextObject* pEditText); diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index 3623d0715f59..1f1546204e6f 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -363,8 +363,8 @@ public: ScDPCollection(const ScDPCollection& r); ~ScDPCollection(); - const char* ReloadCache(ScDPObject* pDPObj, std::set<ScDPObject*>& rRefs); - bool ReloadGroupsInCache(ScDPObject* pDPObj, std::set<ScDPObject*>& rRefs); + const char* ReloadCache(const ScDPObject* pDPObj, std::set<ScDPObject*>& rRefs); + bool ReloadGroupsInCache(const ScDPObject* pDPObj, std::set<ScDPObject*>& rRefs); SC_DLLPUBLIC bool GetReferenceGroups(const ScDPObject& rDPObj, const ScDPDimensionSaveData** pGroups) const; SC_DLLPUBLIC size_t GetCount() const; @@ -388,7 +388,7 @@ public: */ OUString CreateNewName() const; - void FreeTable(ScDPObject* pDPObj); + void FreeTable(const ScDPObject* pDPObj); SC_DLLPUBLIC bool InsertNewTable(ScDPObject* pDPObj); SC_DLLPUBLIC bool HasTable(const ScDPObject* pDPObj) const; diff --git a/sc/inc/dpsdbtab.hxx b/sc/inc/dpsdbtab.hxx index 7c284961423a..24658e12d21b 100644 --- a/sc/inc/dpsdbtab.hxx +++ b/sc/inc/dpsdbtab.hxx @@ -61,7 +61,7 @@ class ScDatabaseDPData : public ScDPTableData private: ScDPFilteredCache aCacheTable; public: - ScDatabaseDPData(ScDocument* pDoc, const ScDPCache& rCache); + ScDatabaseDPData(const ScDocument* pDoc, const ScDPCache& rCache); virtual ~ScDatabaseDPData() override; virtual long GetColumnCount() override; diff --git a/sc/inc/dpshttab.hxx b/sc/inc/dpshttab.hxx index 388522b8a213..03653d36208e 100644 --- a/sc/inc/dpshttab.hxx +++ b/sc/inc/dpshttab.hxx @@ -98,7 +98,7 @@ private: ScDPFilteredCache aCacheTable; public: - ScSheetDPData(ScDocument* pD, const ScSheetSourceDesc& rDesc, const ScDPCache& rCache); + ScSheetDPData(const ScDocument* pD, const ScSheetSourceDesc& rDesc, const ScDPCache& rCache); virtual ~ScSheetDPData() override; virtual long GetColumnCount() override; diff --git a/sc/inc/dptabdat.hxx b/sc/inc/dptabdat.hxx index 0f8a0f0e0da6..d9682c437181 100644 --- a/sc/inc/dptabdat.hxx +++ b/sc/inc/dptabdat.hxx @@ -96,7 +96,7 @@ public: ScDPTableData(const ScDPTableData&) = delete; const ScDPTableData& operator=(const ScDPTableData&) = delete; - ScDPTableData(ScDocument* pDoc); + ScDPTableData(const ScDocument* pDoc); virtual ~ScDPTableData(); OUString GetFormattedString(long nDim, const ScDPItemData& rItem, bool bLocaleIndependent) const; diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx index 5abd47579ef0..40a0d9aa0a18 100644 --- a/sc/inc/dptabres.hxx +++ b/sc/inc/dptabres.hxx @@ -331,7 +331,7 @@ public: bool HasCommonElement( SCROW nFirstDataId, long nFirstIndex, const ScDPItemData& rSecondData, long nSecondIndex ) const; - ResultMembers* GetDimResultMembers(long nDim, ScDPDimension* pDim, ScDPLevel* pLevel) const; + ResultMembers* GetDimResultMembers(long nDim, const ScDPDimension* pDim, ScDPLevel* pLevel) const; const ScDPSource& GetSource() const { return mrSource;} }; diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx index af44e96b008c..3d6af78e5cd6 100644 --- a/sc/inc/dptabsrc.hxx +++ b/sc/inc/dptabsrc.hxx @@ -176,7 +176,7 @@ public: long GetSourceDim(long nDim); const css::uno::Sequence<css::sheet::MemberResult>* - GetMemberResults( ScDPLevel* pLevel ); + GetMemberResults( const ScDPLevel* pLevel ); ScDPDimensions* GetDimensionsObject(); diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx index aab7d34424e9..8f0a1aa25132 100644 --- a/sc/inc/drwlayer.hxx +++ b/sc/inc/drwlayer.hxx @@ -105,7 +105,7 @@ private: SCCOL nDx,SCROW nDy, bool bUpdateNoteCaptionPos ); void RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegativePage, bool bUpdateNoteCaptionPos ); - void ResizeLastRectFromAnchor( SdrObject* pObj, ScDrawObjData& rData, bool bUseLogicRect, bool bNegativePage, bool bCanResize, bool bHiddenAsZero = true ); + void ResizeLastRectFromAnchor( const SdrObject* pObj, ScDrawObjData& rData, bool bUseLogicRect, bool bNegativePage, bool bCanResize, bool bHiddenAsZero = true ); public: ScDrawLayer( ScDocument* pDocument, const OUString& rName ); @@ -161,11 +161,11 @@ public: /** Returns the rectangle for the passed cell address in 1/100 mm. @param bMergedCell True = regards merged cells. False = use single column/row size. */ - static tools::Rectangle GetCellRect( ScDocument& rDoc, const ScAddress& rPos, bool bMergedCell ); + static tools::Rectangle GetCellRect( const ScDocument& rDoc, const ScAddress& rPos, bool bMergedCell ); // GetVisibleName: name for navigator etc: GetPersistName or GetName // (ChartListenerCollection etc. must use GetPersistName directly) - static OUString GetVisibleName( SdrObject* pObj ); + static OUString GetVisibleName( const SdrObject* pObj ); SdrObject* GetNamedObject( const OUString& rName, sal_uInt16 nId, SCTAB& rFoundTab ) const; // if pnCounter != NULL, the search for a name starts with this index + 1, @@ -178,9 +178,9 @@ public: static void SetCellAnchored( SdrObject&, const ScDrawObjData &rAnchor ); static void SetVisualCellAnchored( SdrObject&, const ScDrawObjData &rAnchor ); // Updates rAnchor based on position of rObj - static void GetCellAnchorFromPosition( SdrObject &rObj, ScDrawObjData &rAnchor, const ScDocument &rDoc, SCTAB nTab, bool bUseLogicRect = true, bool bHiddenAsZero = true ); + static void GetCellAnchorFromPosition( const SdrObject &rObj, ScDrawObjData &rAnchor, const ScDocument &rDoc, SCTAB nTab, bool bUseLogicRect = true, bool bHiddenAsZero = true ); static void SetCellAnchoredFromPosition( SdrObject &rObj, const ScDocument &rDoc, SCTAB nTab ); - static void UpdateCellAnchorFromPositionEnd( SdrObject &rObj, ScDrawObjData &rAnchor, const ScDocument &rDoc, SCTAB nTab, bool bUseLogicRect = true ); + static void UpdateCellAnchorFromPositionEnd( const SdrObject &rObj, ScDrawObjData &rAnchor, const ScDocument &rDoc, SCTAB nTab, bool bUseLogicRect = true ); static ScAnchorType GetAnchorType( const SdrObject& ); // positions for detektive lines @@ -199,7 +199,7 @@ public: static ScDrawObjData* GetNoteCaptionData( SdrObject* pObj, SCTAB nTab ); // Image-Map - static ScIMapInfo* GetIMapInfo( SdrObject* pObj ); + static ScIMapInfo* GetIMapInfo( const SdrObject* pObj ); static IMapObject* GetHitIMapObject( SdrObject* pObject, const Point& rWinPoint, const vcl::Window& rCmpWnd ); diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index b765afe0fd37..a7843f875f7d 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -410,7 +410,7 @@ public: const ScFormulaCellGroupRef& GetCellGroup() const { return mxGroup;} void SetCellGroup( const ScFormulaCellGroupRef &xRef ); - CompareState CompareByTokenArray( ScFormulaCell& rOther ) const; + CompareState CompareByTokenArray( const ScFormulaCell& rOther ) const; bool InterpretFormulaGroup(); bool InterpretInvariantFormulaGroup(); diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index 861467f09862..66633f53e4da 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -572,7 +572,7 @@ public: /// Open the specified URL. static void OpenURL(const OUString& rURL, const OUString& rTarget); SC_DLLPUBLIC static OUString GetAbsDocName( const OUString& rFileName, - SfxObjectShell* pShell ); + const SfxObjectShell* pShell ); SC_DLLPUBLIC static OUString GetDocTabName( const OUString& rFileName, const OUString& rTabName ); SC_DLLPUBLIC static sal_uInt32 GetStandardFormat( SvNumberFormatter&, sal_uInt32 nFormat, short nType ); @@ -593,7 +593,7 @@ public: static void InitAddIns(); static void Clear(); // at the end of the program - static void InitTextHeight(SfxItemPool* pPool); + static void InitTextHeight(const SfxItemPool* pPool); static SvxBrushItem* GetEmptyBrushItem() { return pEmptyBrushItem; } static SvxBrushItem* GetButtonBrushItem(); static SvxBrushItem* GetProtectedBrushItem() { return pProtectedBrushItem; } @@ -682,7 +682,7 @@ public: /** Adds a language item to the item set, if the number format item contains a language that differs from its parent's language. */ - SC_DLLPUBLIC static void AddLanguage( SfxItemSet& rSet, SvNumberFormatter& rFormatter ); + SC_DLLPUBLIC static void AddLanguage( SfxItemSet& rSet, const SvNumberFormatter& rFormatter ); /** Obtain the ordinal suffix for a number according to the system locale */ static OUString GetOrdinalSuffix( sal_Int32 nNumber); |