sc/inc/colorscale.hxx | 6 +++--- sc/inc/column.hxx | 4 ++-- sc/inc/conditio.hxx | 4 ++-- sc/inc/docpool.hxx | 2 +- sc/inc/document.hxx | 26 +++++++++++++------------- sc/inc/documentimport.hxx | 2 +- sc/inc/dpobject.hxx | 6 +++--- sc/inc/dpsdbtab.hxx | 2 +- sc/inc/dpshttab.hxx | 2 +- sc/inc/dptabdat.hxx | 2 +- sc/inc/dptabres.hxx | 2 +- sc/inc/dptabsrc.hxx | 2 +- sc/inc/drwlayer.hxx | 12 ++++++------ sc/inc/formulacell.hxx | 2 +- sc/inc/global.hxx | 6 +++--- sc/source/core/data/colorscale.cxx | 10 +++++----- sc/source/core/data/column.cxx | 2 +- sc/source/core/data/column2.cxx | 2 +- sc/source/core/data/column3.cxx | 2 +- sc/source/core/data/column4.cxx | 2 +- sc/source/core/data/conditio.cxx | 4 ++-- sc/source/core/data/dociter.cxx | 2 +- sc/source/core/data/docpool.cxx | 2 +- sc/source/core/data/documen2.cxx | 2 +- sc/source/core/data/documen3.cxx | 2 +- sc/source/core/data/documen4.cxx | 6 +++--- sc/source/core/data/documen7.cxx | 4 ++-- sc/source/core/data/documen8.cxx | 2 +- sc/source/core/data/document.cxx | 8 ++++---- sc/source/core/data/document10.cxx | 2 +- sc/source/core/data/documentimport.cxx | 2 +- sc/source/core/data/dpcache.cxx | 4 ++-- sc/source/core/data/dpobject.cxx | 8 ++++---- sc/source/core/data/dpoutput.cxx | 2 +- sc/source/core/data/dpsdbtab.cxx | 2 +- sc/source/core/data/dpshttab.cxx | 2 +- sc/source/core/data/dptabdat.cxx | 2 +- sc/source/core/data/dptabres.cxx | 2 +- sc/source/core/data/dptabsrc.cxx | 2 +- sc/source/core/data/drwlayer.cxx | 20 ++++++++++---------- sc/source/core/data/fillinfo.cxx | 8 ++++---- sc/source/core/data/formulacell.cxx | 8 ++++---- sc/source/core/data/global.cxx | 4 ++-- sc/source/core/data/global2.cxx | 2 +- sc/source/ui/inc/docsh.hxx | 4 ++-- 45 files changed, 102 insertions(+), 102 deletions(-)
New commits: commit 66e32324f6441818612f088cfa5c8082c8ceea32 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Tue Aug 22 13:12:06 2017 +0200 loplugin:constparam in sc part1 Change-Id: I82fba7ebb3b4f018721642c96bbfa615c6a382c3 Reviewed-on: https://gerrit.libreoffice.org/41419 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> 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); diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index 54edf124e9cd..a5b56bd114d4 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -36,7 +36,7 @@ ScFormulaListener::ScFormulaListener(ScDocument* pDoc): { } -void ScFormulaListener::startListening(ScTokenArray* pArr, const ScRange& rRange) +void ScFormulaListener::startListening(const ScTokenArray* pArr, const ScRange& rRange) { if (!pArr || mpDoc->IsClipOrUndo()) return; @@ -88,7 +88,7 @@ void ScFormulaListener::startListening(ScTokenArray* pArr, const ScRange& rRange } } -void ScFormulaListener::addTokenArray(ScTokenArray* pArray, const ScRange& rRange) +void ScFormulaListener::addTokenArray(const ScTokenArray* pArray, const ScRange& rRange) { startListening(pArray, rRange); } @@ -231,7 +231,7 @@ void ScColorScaleEntry::SetValue(double nValue) mpCell.reset(); } -void ScColorScaleEntry::UpdateReference( sc::RefUpdateContext& rCxt ) +void ScColorScaleEntry::UpdateReference( const sc::RefUpdateContext& rCxt ) { if (!mpCell) return; @@ -499,7 +499,7 @@ double GetPercentile( const std::vector<double>& rArray, double fPercentile ) } -double ScColorScaleFormat::CalcValue(double nMin, double nMax, ScColorScaleEntries::const_iterator& itr) const +double ScColorScaleFormat::CalcValue(double nMin, double nMax, const ScColorScaleEntries::const_iterator& itr) const { switch((*itr)->GetType()) { @@ -1109,7 +1109,7 @@ double ScIconSetFormat::GetMaxValue() const } } -double ScIconSetFormat::CalcValue(double nMin, double nMax, ScIconSetFormat::const_iterator& itr) const +double ScIconSetFormat::CalcValue(double nMin, double nMax, const ScIconSetFormat::const_iterator& itr) const { switch ((*itr)->GetType()) { diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 3d6e316e6222..4b0a5655d462 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -3350,7 +3350,7 @@ public: RemoveEmptyBroadcasterHandler( ScDocument& rDoc, SCCOL nCol, SCTAB nTab ) : maSet(false), mrDoc(rDoc), mnCol(nCol), mnTab(nTab) {} - void operator() ( size_t nRow, SvtBroadcaster* pBroadcaster ) + void operator() ( size_t nRow, const SvtBroadcaster* pBroadcaster ) { if (!pBroadcaster->HasListeners()) maSet.set(mnTab, mnCol, nRow, true); diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 7a7591f3b032..33b7cd71bb40 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -3268,7 +3268,7 @@ public: // multiple selections: void ScColumn::UpdateSelectionFunction( - const ScRangeList& rRanges, ScFunctionData& rData, ScFlatBoolRowSegments& rHiddenRows ) + const ScRangeList& rRanges, ScFunctionData& rData, const ScFlatBoolRowSegments& rHiddenRows ) { sc::SingleColumnSpanSet aSpanSet; aSpanSet.scan(rRanges, nTab, nCol); // mark all selected rows. diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 3afc14dd15d4..fcd529e14aff 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -1681,7 +1681,7 @@ void applyTextNumFormat( ScColumn& rCol, SCROW nRow, SvNumberFormatter* pFormatt bool ScColumn::ParseString( ScCellValue& rCell, SCROW nRow, SCTAB nTabP, const OUString& rString, formula::FormulaGrammar::AddressConvention eConv, - ScSetStringParam* pParam ) + const ScSetStringParam* pParam ) { if (rString.isEmpty()) return false; diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index 1d4d8293d856..1fcc84f20b79 100644 --- a/sc/source/core/data/column4.cxx +++ b/sc/source/core/data/column4.cxx @@ -641,7 +641,7 @@ class NoteCaptionCreator public: NoteCaptionCreator( SCTAB nTab, SCCOL nCol ) : maPos(nCol,0,nTab) {} - void operator() ( size_t nRow, ScPostIt* p ) + void operator() ( size_t nRow, const ScPostIt* p ) { maPos.SetRow(nRow); p->GetOrCreateCaption(maPos); diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index 86a57b3ec1b8..8d19b4438acc 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -80,7 +80,7 @@ void ScFormatEntry::endRendering() { } -static bool lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, sal_uInt16 nRecursion = 0 ) +static bool lcl_HasRelRef( ScDocument* pDoc, const ScTokenArray* pFormula, sal_uInt16 nRecursion = 0 ) { if (pFormula) { @@ -145,7 +145,7 @@ static bool lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, sal_uInt16 namespace { -void start_listen_to(ScFormulaListener& rListener, ScTokenArray* pTokens, const ScRangeList& rRangeList) +void start_listen_to(ScFormulaListener& rListener, const ScTokenArray* pTokens, const ScRangeList& rRangeList) { size_t n = rRangeList.size(); for (size_t i = 0; i < n; ++i) diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index 74ebcd147b01..1aa2a1c3e2d3 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -76,7 +76,7 @@ void decBlock(std::pair<Iter, size_t>& rPos) void ScAttrArray_IterGetNumberFormat( sal_uLong& nFormat, const ScAttrArray*& rpArr, SCROW& nAttrEndRow, const ScAttrArray* pNewArr, SCROW nRow, - ScDocument* pDoc ) + const ScDocument* pDoc ) { if ( rpArr != pNewArr || nAttrEndRow < nRow ) { diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx index f42ab0b39ba7..707919fa6549 100644 --- a/sc/source/core/data/docpool.cxx +++ b/sc/source/core/data/docpool.cxx @@ -354,7 +354,7 @@ const SfxPoolItem& ScDocumentPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWh return rNew; } -void ScDocumentPool::StyleDeleted( ScStyleSheet* pStyle ) +void ScDocumentPool::StyleDeleted( const ScStyleSheet* pStyle ) { sal_uInt32 nCount = GetItemCount2(ATTR_PATTERN); for (sal_uInt32 i=0; i<nCount; i++) diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index cf35dd866f5c..79ffe638ceb8 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -1437,7 +1437,7 @@ void ScDocument::SetPreviewFont( SfxItemSet* pFont ) pPreviewFont = pFont; } -void ScDocument::SetPreviewSelection( ScMarkData& rSel ) +void ScDocument::SetPreviewSelection( const ScMarkData& rSel ) { maPreviewSelection = rSel; } diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index 92370a719325..95cbf6b0c1d1 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -2086,7 +2086,7 @@ void ScDocument::GetSortParam( ScSortParam& rParam, SCTAB nTab ) rParam = mSheetSortParams[ nTab ]; } -void ScDocument::SetSortParam( ScSortParam& rParam, SCTAB nTab ) +void ScDocument::SetSortParam( const ScSortParam& rParam, SCTAB nTab ) { mSheetSortParams[ nTab ] = rParam; } diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx index a0faba4cdc72..2941198f426d 100644 --- a/sc/source/core/data/documen4.cxx +++ b/sc/source/core/data/documen4.cxx @@ -471,7 +471,7 @@ bool setCacheTableReferenced(formula::FormulaToken& rToken, ScExternalRefManager } -bool ScDocument::MarkUsedExternalReferences( ScTokenArray& rArr, const ScAddress& rPos ) +bool ScDocument::MarkUsedExternalReferences( const ScTokenArray& rArr, const ScAddress& rPos ) { if (!rArr.GetLen()) return false; @@ -534,7 +534,7 @@ bool ScDocument::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab, void ScDocument::ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRow, SCTAB nTab, - ScMarkData& rMark) + const ScMarkData& rMark) { if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) maTabs[nTab]->ReplaceStyle(rSearchItem, nCol, nRow, rMark, true/*bIsUndoP*/); @@ -1007,7 +1007,7 @@ sal_uInt16 ScDocument::ColDifferences( SCCOL nThisCol, SCTAB nThisTab, void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW nOtherEndRow, bool bColumns, ScDocument& rOtherDoc, SCTAB nThisTab, SCTAB nOtherTab, - SCCOLROW nEndCol, SCCOLROW* pTranslate, ScProgress* pProgress, sal_uLong nProAdd ) + SCCOLROW nEndCol, const SCCOLROW* pTranslate, ScProgress* pProgress, sal_uLong nProAdd ) { // bColumns=true: rows are columns and vice versa diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx index b613166eac1a..342fff0c5664 100644 --- a/sc/source/core/data/documen7.cxx +++ b/sc/source/core/data/documen7.cxx @@ -348,7 +348,7 @@ void ScDocument::RemoveFromFormulaTree( ScFormulaCell* pCell ) } } -bool ScDocument::IsInFormulaTree( ScFormulaCell* pCell ) const +bool ScDocument::IsInFormulaTree( const ScFormulaCell* pCell ) const { return pCell->GetPrevious() || pFormulaTree == pCell; } @@ -528,7 +528,7 @@ void ScDocument::RemoveFromFormulaTrack( ScFormulaCell* pCell ) } } -bool ScDocument::IsInFormulaTrack( ScFormulaCell* pCell ) const +bool ScDocument::IsInFormulaTrack( const ScFormulaCell* pCell ) const { return pCell->GetPreviousTrack() || pFormulaTrack == pCell; } diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 4fe960637044..dcf506dcc109 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -294,7 +294,7 @@ void ScDocument::ModifyStyleSheet( SfxStyleSheetBase& rStyleSheet, } } -void ScDocument::CopyStdStylesFrom( ScDocument* pSrcDoc ) +void ScDocument::CopyStdStylesFrom( const ScDocument* pSrcDoc ) { // number format exchange list has to be handled here, too NumFmtMergeHandler aNumFmtMergeHdl(this, pSrcDoc); diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index f7f29794aed5..5f1278f8c268 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -1955,7 +1955,7 @@ void ScDocument::DeleteAreaTab( const ScRange& rRange, InsertDeleteFlags nDelFla nTab, nDelFlag ); } -void ScDocument::InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSelection, +void ScDocument::InitUndoSelected( const ScDocument* pSrcDoc, const ScMarkData& rTabSelection, bool bColInfo, bool bRowInfo ) { if (bIsUndo) @@ -1987,7 +1987,7 @@ void ScDocument::InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSe } } -void ScDocument::InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2, +void ScDocument::InitUndo( const ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2, bool bColInfo, bool bRowInfo ) { if (!bIsUndo) @@ -2435,7 +2435,7 @@ void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClip copyUsedNamesToClip(pClipDoc->GetRangeName(), pRangeName, aUsedGlobalNames); } -ScDocument::NumFmtMergeHandler::NumFmtMergeHandler(ScDocument* pDoc, ScDocument* pSrcDoc) : +ScDocument::NumFmtMergeHandler::NumFmtMergeHandler(ScDocument* pDoc, const ScDocument* pSrcDoc) : mpDoc(pDoc) { mpDoc->MergeNumberFormatter(pSrcDoc); @@ -2518,7 +2518,7 @@ const ScTable* ScDocument::FetchTable( SCTAB nTab ) const return maTabs[nTab]; } -void ScDocument::MergeNumberFormatter(ScDocument* pSrcDoc) +void ScDocument::MergeNumberFormatter(const ScDocument* pSrcDoc) { SvNumberFormatter* pThisFormatter = xPoolHelper->GetFormTable(); SvNumberFormatter* pOtherFormatter = pSrcDoc->xPoolHelper->GetFormTable(); diff --git a/sc/source/core/data/document10.cxx b/sc/source/core/data/document10.cxx index 1c7ffedb7b7e..78b5a8f7d8e7 100644 --- a/sc/source/core/data/document10.cxx +++ b/sc/source/core/data/document10.cxx @@ -334,7 +334,7 @@ void ScDocument::CompileHybridFormula() } } -void ScDocument::SharePooledResources( ScDocument* pSrcDoc ) +void ScDocument::SharePooledResources( const ScDocument* pSrcDoc ) { xPoolHelper = pSrcDoc->xPoolHelper; mpCellStringPool = pSrcDoc->mpCellStringPool; diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx index dd061648e485..98f9d852fed0 100644 --- a/sc/source/core/data/documentimport.cxx +++ b/sc/source/core/data/documentimport.cxx @@ -173,7 +173,7 @@ void ScDocumentImport::setOriginDate(sal_uInt16 nYear, sal_uInt16 nMonth, sal_uI mpImpl->mrDoc.pDocOptions->SetDate(nDay, nMonth, nYear); } -void ScDocumentImport::setAutoInput(const ScAddress& rPos, const OUString& rStr, ScSetStringParam* pStringParam) +void ScDocumentImport::setAutoInput(const ScAddress& rPos, const OUString& rStr, const ScSetStringParam* pStringParam) { ScTable* pTab = mpImpl->mrDoc.FetchTable(rPos.Tab()); if (!pTab) diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index 9030d7307682..59eed87330c9 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -147,7 +147,7 @@ OUString createLabelString( const ScDocument* pDoc, SCCOL nCol, const ScRefCellV } void initFromCell( - ScDPCache::StringSetType& rStrPool, ScDocument* pDoc, const ScAddress& rPos, + ScDPCache::StringSetType& rStrPool, const ScDocument* pDoc, const ScAddress& rPos, const ScRefCellValue& rCell, ScDPItemData& rData, sal_uInt32& rNumFormat) { OUString aDocStr = rCell.getRawString(pDoc); @@ -1380,7 +1380,7 @@ namespace { struct ClearGroupItems { - void operator() (std::unique_ptr<ScDPCache::Field>& r) const + void operator() (const std::unique_ptr<ScDPCache::Field>& r) const { r->mpGroup.reset(); } diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 5a646bb17947..7627a9746cc4 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -943,7 +943,7 @@ ScRange ScDPObject::GetOutputRangeByType( sal_Int32 nType ) const return pOutput->GetOutputRange(nType); } -static bool lcl_HasButton( ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab ) +static bool lcl_HasButton( const ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nTab ) { return static_cast<const ScMergeFlagAttr*>(pDoc->GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG ))->HasPivotButton(); } @@ -3401,7 +3401,7 @@ public: } -const char* ScDPCollection::ReloadCache(ScDPObject* pDPObj, std::set<ScDPObject*>& rRefs) +const char* ScDPCollection::ReloadCache(const ScDPObject* pDPObj, std::set<ScDPObject*>& rRefs) { if (!pDPObj) return STR_ERR_DATAPILOTSOURCE; @@ -3465,7 +3465,7 @@ const char* ScDPCollection::ReloadCache(ScDPObject* pDPObj, std::set<ScDPObject* return nullptr; } -bool ScDPCollection::ReloadGroupsInCache(ScDPObject* pDPObj, std::set<ScDPObject*>& rRefs) +bool ScDPCollection::ReloadGroupsInCache(const ScDPObject* pDPObj, std::set<ScDPObject*>& rRefs) { if (!pDPObj) return false; @@ -3764,7 +3764,7 @@ OUString ScDPCollection::CreateNewName() const return OUString(); // should not happen } -void ScDPCollection::FreeTable(ScDPObject* pDPObject) +void ScDPCollection::FreeTable(const ScDPObject* pDPObject) { const ScRange& rOutRange = pDPObject->GetOutRange(); const ScAddress& s = rOutRange.aStart; diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx index d5b465c8a502..0643c2c2e890 100644 --- a/sc/source/core/data/dpoutput.cxx +++ b/sc/source/core/data/dpoutput.cxx @@ -86,7 +86,7 @@ struct ScDPOutLevelData bool mbDataLayout:1; bool mbPageDim:1; - ScDPOutLevelData(long nDim, long nHier, long nLevel, long nDimPos, sal_uInt32 nSrcNumFmt, uno::Sequence<sheet::MemberResult> &aResult, + ScDPOutLevelData(long nDim, long nHier, long nLevel, long nDimPos, sal_uInt32 nSrcNumFmt, const uno::Sequence<sheet::MemberResult> &aResult, const OUString &aName, const OUString &aCaption, double fValue, bool bHasHiddenMember, bool bDataLayout, bool bPageDim) : mnDim(nDim), mnHier(nHier), mnLevel(nLevel), mnDimPos(nDimPos), mnSrcNumFmt(nSrcNumFmt), maResult(aResult), maName(aName), maCaption(aCaption), mfValue(fValue), mbHasHiddenMember(bHasHiddenMember), mbDataLayout(bDataLayout), diff --git a/sc/source/core/data/dpsdbtab.cxx b/sc/source/core/data/dpsdbtab.cxx index 499f6ad6b249..712f3b9995f4 100644 --- a/sc/source/core/data/dpsdbtab.cxx +++ b/sc/source/core/data/dpsdbtab.cxx @@ -62,7 +62,7 @@ const ScDPCache* ScImportSourceDesc::CreateCache(const ScDPDimensionSaveData* pD } ScDatabaseDPData::ScDatabaseDPData( - ScDocument* pDoc, const ScDPCache& rCache) : + const ScDocument* pDoc, const ScDPCache& rCache) : ScDPTableData(pDoc), aCacheTable(rCache) { diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx index 74088de9832d..e3a21da620ad 100644 --- a/sc/source/core/data/dpshttab.cxx +++ b/sc/source/core/data/dpshttab.cxx @@ -39,7 +39,7 @@ using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Sequence; using ::std::vector; -ScSheetDPData::ScSheetDPData(ScDocument* pD, const ScSheetSourceDesc& rDesc, const ScDPCache& rCache) : +ScSheetDPData::ScSheetDPData(const ScDocument* pD, const ScSheetSourceDesc& rDesc, const ScDPCache& rCache) : ScDPTableData(pD), aQuery ( rDesc.GetQueryParam() ), bIgnoreEmptyRows( false ), diff --git a/sc/source/core/data/dptabdat.cxx b/sc/source/core/data/dptabdat.cxx index 1481849cc19c..461e1a3d41fb 100644 --- a/sc/source/core/data/dptabdat.cxx +++ b/sc/source/core/data/dptabdat.cxx @@ -42,7 +42,7 @@ ScDPTableData::CalcInfo::CalcInfo() : { } -ScDPTableData::ScDPTableData(ScDocument* pDoc) : +ScDPTableData::ScDPTableData(const ScDocument* pDoc) : mpDoc(pDoc) { nLastDateVal = nLastHier = nLastLevel = nLastRet = -1; // invalid diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx index cd7b483702a6..1519e5186e52 100644 --- a/sc/source/core/data/dptabres.cxx +++ b/sc/source/core/data/dptabres.cxx @@ -908,7 +908,7 @@ bool ScDPResultData::HasCommonElement( SCROW nFirstDataId, long nFirstIndex, return false; } -ResultMembers* ScDPResultData::GetDimResultMembers(long nDim, ScDPDimension* pDim, ScDPLevel* pLevel) const +ResultMembers* ScDPResultData::GetDimResultMembers(long nDim, const ScDPDimension* pDim, ScDPLevel* pLevel) const { if (nDim < static_cast<long>(maDimMembers.size()) && maDimMembers[nDim]) return maDimMembers[nDim]; diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx index be7ad0473dac..20e95b37cd98 100644 --- a/sc/source/core/data/dptabsrc.cxx +++ b/sc/source/core/data/dptabsrc.cxx @@ -1071,7 +1071,7 @@ void ScDPSource::FillMemberResults() } } -const uno::Sequence<sheet::MemberResult>* ScDPSource::GetMemberResults( ScDPLevel* pLevel ) +const uno::Sequence<sheet::MemberResult>* ScDPSource::GetMemberResults( const ScDPLevel* pLevel ) { FillMemberResults(); diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 16833568b511..2242a6d53744 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -611,7 +611,7 @@ namespace return aRect; } - Point lcl_calcAvailableDiff(ScDocument &rDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, const Point &aWantedDiff) + Point lcl_calcAvailableDiff(const ScDocument &rDoc, SCCOL nCol, SCROW nRow, SCTAB nTab, const Point &aWantedDiff) { Point aAvailableDiff(aWantedDiff); long nHeight = static_cast<long>(rDoc.GetRowHeight( nRow, nTab ) * HMM_PER_TWIPS); @@ -631,7 +631,7 @@ namespace static_cast<long>(aRange.getMaxX()), static_cast<long>(aRange.getMaxY())); } } -void ScDrawLayer::ResizeLastRectFromAnchor( SdrObject* pObj, ScDrawObjData& rData, bool bUseLogicRect, bool bNegativePage, bool bCanResize, bool bHiddenAsZero ) +void ScDrawLayer::ResizeLastRectFromAnchor( const SdrObject* pObj, ScDrawObjData& rData, bool bUseLogicRect, bool bNegativePage, bool bCanResize, bool bHiddenAsZero ) { rData.maLastRect = ( bUseLogicRect ? pObj->GetLogicRect() : pObj->GetSnapRect() ); SCCOL nCol1 = rData.maStart.Col(); @@ -1697,7 +1697,7 @@ void ScDrawLayer::MirrorRectRTL( tools::Rectangle& rRect ) rRect.Right() = -nTemp; } -tools::Rectangle ScDrawLayer::GetCellRect( ScDocument& rDoc, const ScAddress& rPos, bool bMergedCell ) +tools::Rectangle ScDrawLayer::GetCellRect( const ScDocument& rDoc, const ScAddress& rPos, bool bMergedCell ) { tools::Rectangle aCellRect; OSL_ENSURE( ValidColRowTab( rPos.Col(), rPos.Row(), rPos.Tab() ), "ScDrawLayer::GetCellRect - invalid cell address" ); @@ -1738,7 +1738,7 @@ tools::Rectangle ScDrawLayer::GetCellRect( ScDocument& rDoc, const ScAddress& rP return aCellRect; } -OUString ScDrawLayer::GetVisibleName( SdrObject* pObj ) +OUString ScDrawLayer::GetVisibleName( const SdrObject* pObj ) { OUString aName = pObj->GetName(); if ( pObj->GetObjIdentifier() == OBJ_OLE2 ) @@ -1749,19 +1749,19 @@ OUString ScDrawLayer::GetVisibleName( SdrObject* pObj ) // in the Navigator at all. if ( aName.isEmpty() ) - aName = static_cast<SdrOle2Obj*>(pObj)->GetPersistName(); + aName = static_cast<const SdrOle2Obj*>(pObj)->GetPersistName(); } return aName; } -inline bool IsNamedObject( SdrObject* pObj, const OUString& rName ) +inline bool IsNamedObject( const SdrObject* pObj, const OUString& rName ) { // sal_True if rName is the object's Name or PersistName // (used to find a named object) return ( pObj->GetName() == rName || ( pObj->GetObjIdentifier() == OBJ_OLE2 && - static_cast<SdrOle2Obj*>(pObj)->GetPersistName() == rName ) ); + static_cast<const SdrOle2Obj*>(pObj)->GetPersistName() == rName ) ); } SdrObject* ScDrawLayer::GetNamedObject( const OUString& rName, sal_uInt16 nId, SCTAB& rFoundTab ) const @@ -1908,7 +1908,7 @@ void ScDrawLayer::SetCellAnchoredFromPosition( SdrObject &rObj, const ScDocument } } -void ScDrawLayer::GetCellAnchorFromPosition( SdrObject &rObj, ScDrawObjData &rAnchor, const ScDocument &rDoc, SCTAB nTab, bool bUseLogicRect, bool bHiddenAsZero ) +void ScDrawLayer::GetCellAnchorFromPosition( const SdrObject &rObj, ScDrawObjData &rAnchor, const ScDocument &rDoc, SCTAB nTab, bool bUseLogicRect, bool bHiddenAsZero ) { tools::Rectangle aObjRect( bUseLogicRect ? rObj.GetLogicRect() : rObj.GetSnapRect() ); ScRange aRange = rDoc.GetRange( nTab, aObjRect, bHiddenAsZero ); @@ -1935,7 +1935,7 @@ void ScDrawLayer::GetCellAnchorFromPosition( SdrObject &rObj, ScDrawObjData &rAn } -void ScDrawLayer::UpdateCellAnchorFromPositionEnd( SdrObject &rObj, ScDrawObjData &rAnchor, const ScDocument &rDoc, SCTAB nTab, bool bUseLogicRect ) +void ScDrawLayer::UpdateCellAnchorFromPositionEnd( const SdrObject &rObj, ScDrawObjData &rAnchor, const ScDocument &rDoc, SCTAB nTab, bool bUseLogicRect ) { tools::Rectangle aObjRect(bUseLogicRect ? rObj.GetLogicRect() : rObj.GetSnapRect()); ScRange aRange = rDoc.GetRange( nTab, aObjRect ); @@ -2031,7 +2031,7 @@ ScDrawObjData* ScDrawLayer::GetNoteCaptionData( SdrObject* pObj, SCTAB nTab ) return (pData && pData->meType == ScDrawObjData::CellNote) ? pData : nullptr; } -ScIMapInfo* ScDrawLayer::GetIMapInfo( SdrObject* pObj ) +ScIMapInfo* ScDrawLayer::GetIMapInfo( const SdrObject* pObj ) { return static_cast<ScIMapInfo*>(GetFirstUserDataOfType(pObj, SC_UD_IMAPDATA)); } diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx index a27df4c048c3..1f082b8a6a99 100644 --- a/sc/source/core/data/fillinfo.cxx +++ b/sc/source/core/data/fillinfo.cxx @@ -49,7 +49,7 @@ // Similar as in output.cxx static void lcl_GetMergeRange( SCCOL nX, SCROW nY, SCSIZE nArrY, - ScDocument* pDoc, RowInfo* pRowInfo, + const ScDocument* pDoc, RowInfo* pRowInfo, SCCOL nX1, SCROW nY1, SCTAB nTab, SCCOL& rStartX, SCROW& rStartY, SCCOL& rEndX, SCROW& rEndY ) { @@ -184,7 +184,7 @@ public: } }; -bool isRotateItemUsed(ScDocumentPool *pPool) +bool isRotateItemUsed(const ScDocumentPool *pPool) { sal_uInt32 nRotCount = pPool->GetItemCount2( ATTR_ROTATE_VALUE ); for (sal_uInt32 nItem=0; nItem<nRotCount; nItem++) @@ -198,7 +198,7 @@ bool isRotateItemUsed(ScDocumentPool *pPool) return false; } -void initRowInfo(ScDocument* pDoc, RowInfo* pRowInfo, const SCSIZE nMaxRow, +void initRowInfo(const ScDocument* pDoc, RowInfo* pRowInfo, const SCSIZE nMaxRow, double fRowScale, SCROW nRow1, SCTAB nTab, SCROW& rYExtra, SCSIZE& rArrRow, SCROW& rRow2) { sal_uInt16 nDocHeight = ScGlobal::nStdRowHeight; @@ -267,7 +267,7 @@ void initCellInfo(RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nRotMax, } } -void initColWidths(RowInfo* pRowInfo, ScDocument* pDoc, double fColScale, SCTAB nTab, SCCOL nCol2, SCCOL nRotMax) +void initColWidths(RowInfo* pRowInfo, const ScDocument* pDoc, double fColScale, SCTAB nTab, SCCOL nCol2, SCCOL nRotMax) { for (SCCOL nArrCol=nCol2+3; nArrCol<=nRotMax+2; nArrCol++) // Add remaining widths { diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 32841a41d93a..e10e525342a9 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -2942,7 +2942,7 @@ namespace { * Check if we need to re-compile column or row names. */ bool checkCompileColRowName( - const sc::RefUpdateContext& rCxt, ScDocument& rDoc, ScTokenArray& rCode, + const sc::RefUpdateContext& rCxt, ScDocument& rDoc, const ScTokenArray& rCode, const ScAddress& aOldPos, const ScAddress& aPos, bool bValChanged) { switch (rCxt.meMode) @@ -3023,7 +3023,7 @@ bool checkCompileColRowName( } void setOldCodeToUndo( - ScDocument* pUndoDoc, const ScAddress& aUndoPos, ScTokenArray* pOldCode, FormulaGrammar::Grammar eTempGrammar, ScMatrixMode cMatrixFlag) + ScDocument* pUndoDoc, const ScAddress& aUndoPos, const ScTokenArray* pOldCode, FormulaGrammar::Grammar eTempGrammar, ScMatrixMode cMatrixFlag) { // Copy the cell to aUndoPos, which is its current position in the document, // so this works when UpdateReference is called before moving the cells @@ -3704,7 +3704,7 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY } // See also ScDocument::FindRangeNamesReferencingSheet() -static void lcl_FindRangeNamesInUse(sc::UpdatedRangeNames& rIndexes, ScTokenArray* pCode, const ScDocument* pDoc, +static void lcl_FindRangeNamesInUse(sc::UpdatedRangeNames& rIndexes, const ScTokenArray* pCode, const ScDocument* pDoc, int nRecursion) { FormulaTokenArrayPlainIterator aIter(*pCode); @@ -3823,7 +3823,7 @@ void ScFormulaCell::SetCellGroup( const ScFormulaCellGroupRef &xRef ) pCode = mxGroup->mpCode; } -ScFormulaCell::CompareState ScFormulaCell::CompareByTokenArray( ScFormulaCell& rOther ) const +ScFormulaCell::CompareState ScFormulaCell::CompareByTokenArray( const ScFormulaCell& rOther ) const { // no Matrix formulae yet. if ( GetMatrixFlag() != ScMatrixMode::NONE ) diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 0f89537f3c7a..68395b535785 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -502,7 +502,7 @@ void ScGlobal::SetClipDocName( const OUString& rNew ) *pStrClipDocName = rNew; } -void ScGlobal::InitTextHeight(SfxItemPool* pPool) +void ScGlobal::InitTextHeight(const SfxItemPool* pPool) { if (!pPool) { @@ -953,7 +953,7 @@ sal_uInt16 ScGlobal::GetScriptedWhichID( SvtScriptType nScriptType, sal_uInt16 n return nWhich; } -void ScGlobal::AddLanguage( SfxItemSet& rSet, SvNumberFormatter& rFormatter ) +void ScGlobal::AddLanguage( SfxItemSet& rSet, const SvNumberFormatter& rFormatter ) { OSL_ENSURE( rSet.GetItemState( ATTR_LANGUAGE_FORMAT, false ) == SfxItemState::DEFAULT, "ScGlobal::AddLanguage - language already added"); diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx index 1a2a841d1560..e4d53950ea95 100644 --- a/sc/source/core/data/global2.cxx +++ b/sc/source/core/data/global2.cxx @@ -307,7 +307,7 @@ bool ScTabOpParam::operator==( const ScTabOpParam& r ) const } OUString ScGlobal::GetAbsDocName( const OUString& rFileName, - SfxObjectShell* pShell ) + const SfxObjectShell* pShell ) { OUString aAbsName; if (!pShell || !pShell->HasName()) diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index b6beb2cfc11d..f857a786b0a2 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -451,7 +451,7 @@ public: //#i97876# Spreadsheet data changes are not notified namespace HelperNotifyChanges { - inline ScModelObj* getMustPropagateChangesModel(ScDocShell &rDocShell) + inline ScModelObj* getMustPropagateChangesModel(const ScDocShell &rDocShell) { ScModelObj* pModelObj = ScModelObj::getImplementation(rDocShell.GetModel()); if (pModelObj && pModelObj->HasChangesListeners()) @@ -467,7 +467,7 @@ namespace HelperNotifyChanges rModelObj.NotifyChanges(rType, rChangeRanges, rProperties); } - inline void NotifyIfChangesListeners(ScDocShell &rDocShell, const ScRange &rRange, + inline void NotifyIfChangesListeners(const ScDocShell &rDocShell, const ScRange &rRange, const OUString &rType = OUString("cell-change")) { if (ScModelObj* pModelObj = getMustPropagateChangesModel(rDocShell)) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits