diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-23 18:37:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-24 10:54:06 +0200 |
commit | 3eb5ab6efe4229db0ec2bb177d892f2604f49411 (patch) | |
tree | 4c9e00f63c0f9d9b0caf3afb5cb570d0b9b47a72 /sc/inc | |
parent | loplugin:useuniqueptr in filter (diff) | |
download | core-3eb5ab6efe4229db0ec2bb177d892f2604f49411.tar.gz core-3eb5ab6efe4229db0ec2bb177d892f2604f49411.zip |
loplugin:constparam in sc part3
Change-Id: I8abc44b9f0bcd5e39fd8a94abafaf80aadcd26ca
Reviewed-on: https://gerrit.libreoffice.org/41496
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/address.hxx | 6 | ||||
-rw-r--r-- | sc/inc/charthelper.hxx | 4 | ||||
-rw-r--r-- | sc/inc/compiler.hxx | 2 | ||||
-rw-r--r-- | sc/inc/consoli.hxx | 4 | ||||
-rw-r--r-- | sc/inc/dbdata.hxx | 4 | ||||
-rw-r--r-- | sc/inc/detdata.hxx | 4 | ||||
-rw-r--r-- | sc/inc/detfunc.hxx | 4 | ||||
-rw-r--r-- | sc/inc/document.hxx | 2 | ||||
-rw-r--r-- | sc/inc/orcusxml.hxx | 3 | ||||
-rw-r--r-- | sc/inc/rangelst.hxx | 8 | ||||
-rw-r--r-- | sc/inc/rangenam.hxx | 4 | ||||
-rw-r--r-- | sc/inc/rangeutl.hxx | 16 | ||||
-rw-r--r-- | sc/inc/tabprotection.hxx | 2 | ||||
-rw-r--r-- | sc/inc/token.hxx | 4 | ||||
-rw-r--r-- | sc/inc/tokenarray.hxx | 2 | ||||
-rw-r--r-- | sc/inc/zforauto.hxx | 2 |
16 files changed, 35 insertions, 36 deletions
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx index 607a9a824691..0adeaa705861 100644 --- a/sc/inc/address.hxx +++ b/sc/inc/address.hxx @@ -543,7 +543,7 @@ public: const css::uno::Sequence<css::sheet::ExternalLinkInfo>* pExternalLinks = nullptr, const OUString* pErrRef = nullptr ); - SC_DLLPUBLIC ScRefFlags ParseAny( const OUString&, ScDocument*, + SC_DLLPUBLIC ScRefFlags ParseAny( const OUString&, const ScDocument*, const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 ); SC_DLLPUBLIC ScRefFlags ParseCols( const OUString&, const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 ); @@ -907,12 +907,12 @@ template< typename T > void PutInOrder( T& nStart, T& nEnd ) } } -bool ConvertSingleRef( ScDocument* pDocument, const OUString& rRefString, +bool ConvertSingleRef( const ScDocument* pDocument, const OUString& rRefString, SCTAB nDefTab, ScRefAddress& rRefAddress, const ScAddress::Details& rDetails, ScAddress::ExternalInfo* pExtInfo = nullptr ); -bool ConvertDoubleRef( ScDocument* pDocument, const OUString& rRefString, +bool ConvertDoubleRef( const ScDocument* pDocument, const OUString& rRefString, SCTAB nDefTab, ScRefAddress& rStartRefAddress, ScRefAddress& rEndRefAddress, const ScAddress::Details& rDetails, diff --git a/sc/inc/charthelper.hxx b/sc/inc/charthelper.hxx index 9e7689e87fcf..7aad9522045a 100644 --- a/sc/inc/charthelper.hxx +++ b/sc/inc/charthelper.hxx @@ -38,7 +38,7 @@ class ScChartHelper { public: static sal_uInt16 DoUpdateAllCharts( ScDocument* pDoc ); - static void AdjustRangesOfChartsOnDestinationPage( ScDocument* pSrcDoc, ScDocument* pDestDoc, const SCTAB nSrcTab, const SCTAB nDestTab ); + static void AdjustRangesOfChartsOnDestinationPage( const ScDocument* pSrcDoc, ScDocument* pDestDoc, const SCTAB nSrcTab, const SCTAB nDestTab ); static void UpdateChartsOnDestinationPage( ScDocument* pDestDoc, const SCTAB nDestTab ); static css::uno::Reference< css::chart2::XChartDocument > GetChartFromSdrObject( const SdrObject* pObject ); static void GetChartRanges( const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc, @@ -47,7 +47,7 @@ public: const css::uno::Sequence< OUString >& rRanges ); static void AddRangesIfProtectedChart( ScRangeListVector& rRangesVector, const ScDocument* pDocument, SdrObject* pObject ); - static void FillProtectedChartRangesVector( ScRangeListVector& rRangesVector, ScDocument* pDocument, const SdrPage* pPage ); + static void FillProtectedChartRangesVector( ScRangeListVector& rRangesVector, const ScDocument* pDocument, const SdrPage* pPage ); static void GetChartNames( ::std::vector< OUString >& rChartNames, const SdrPage* pPage ); static void CreateProtectedChartListenersAndNotify( ScDocument* pDoc, const SdrPage* pPage, ScModelObj* pModelObj, SCTAB nTab, const ScRangeListVector& rRangesVector, const ::std::vector< OUString >& rExcludedChartNames, bool bSameDoc = true ); diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx index 8a3a496ec2c1..cc9040bce26f 100644 --- a/sc/inc/compiler.hxx +++ b/sc/inc/compiler.hxx @@ -437,7 +437,7 @@ public: const ScAddress& GetPos() const { return aPos; } void MoveRelWrap( SCCOL nMaxCol, SCROW nMaxRow ); - static void MoveRelWrap( const ScTokenArray& rArr, ScDocument* pDoc, const ScAddress& rPos, + static void MoveRelWrap( const ScTokenArray& rArr, const ScDocument* pDoc, const ScAddress& rPos, SCCOL nMaxCol, SCROW nMaxRow ); /** If the character is allowed as tested by nFlags (SC_COMPILER_C_... diff --git a/sc/inc/consoli.hxx b/sc/inc/consoli.hxx index 784f511fa7b6..015245cd1895 100644 --- a/sc/inc/consoli.hxx +++ b/sc/inc/consoli.hxx @@ -75,8 +75,8 @@ public: void InitData(); void DeleteData(); - void AddFields( ScDocument* pSrcDoc, SCTAB nTab, - SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ); + void AddFields( const ScDocument* pSrcDoc, SCTAB nTab, + SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ); void DoneFields(); void AddData( ScDocument* pSrcDoc, SCTAB nTab, diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx index a7b72bf9b0d0..79fe9e82d428 100644 --- a/sc/inc/dbdata.hxx +++ b/sc/inc/dbdata.hxx @@ -208,12 +208,12 @@ public: void SetModified(bool bMod) { bModified = bMod; } void UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos ); - void UpdateReference(ScDocument* pDoc, UpdateRefMode eUpdateRefMode, + void UpdateReference(const ScDocument* pDoc, UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCCOL nDx, SCROW nDy, SCTAB nDz); - void ExtendDataArea(ScDocument* pDoc); + void ExtendDataArea(const ScDocument* pDoc); void CalcSaveFilteredCount(SCSIZE nNonFilteredRowCount); void GetFilterSelCount(SCSIZE& nSelected, SCSIZE& nTotal); diff --git a/sc/inc/detdata.hxx b/sc/inc/detdata.hxx index eb6eb4ea159d..abe2d2a57d62 100644 --- a/sc/inc/detdata.hxx +++ b/sc/inc/detdata.hxx @@ -67,8 +67,8 @@ public: ScDetOpList(const ScDetOpList& rList); void DeleteOnTab( SCTAB nTab ); - void UpdateReference( ScDocument* pDoc, UpdateRefMode eUpdateRefMode, - const ScRange& rRange, SCCOL nDx, SCROW nDy, SCTAB nDz ); + void UpdateReference( const ScDocument* pDoc, UpdateRefMode eUpdateRefMode, + const ScRange& rRange, SCCOL nDx, SCROW nDy, SCTAB nDz ); bool operator==( const ScDetOpList& r ) const; // for ref-undo diff --git a/sc/inc/detfunc.hxx b/sc/inc/detfunc.hxx index 93bccd455996..8ae90c217cf0 100644 --- a/sc/inc/detfunc.hxx +++ b/sc/inc/detfunc.hxx @@ -114,7 +114,7 @@ class SC_DLLPUBLIC ScDetectiveFunc sal_uInt16 FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uInt16 nLevel, sal_uInt16 nDeleteLevel ); - void FindFrameForObject( SdrObject* pObject, ScRange& rRange ); + void FindFrameForObject( const SdrObject* pObject, ScRange& rRange ); void Modified(); @@ -137,7 +137,7 @@ public: static void UpdateAllComments( ScDocument& rDoc ); ///< on all tables void UpdateAllArrowColors(); ///< on all tables - static bool IsNonAlienArrow( SdrObject* pObject ); + static bool IsNonAlienArrow( const SdrObject* pObject ); ScDetectiveObjType GetDetectiveObjectType( SdrObject* pObject, SCTAB nObjTab, ScAddress& rPosition, ScRange& rSource, bool& rRedLine ); diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 67e8ed4a3ba3..6650c2e111ee 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -731,7 +731,7 @@ public: css::uno::Reference< css::chart2::XChartDocument > GetChartByName( const OUString& rChartName ); - SC_DLLPUBLIC void GetChartRanges( const OUString& rChartName, std::vector< ScRangeList >& rRanges, ScDocument* pSheetNameDoc ); + SC_DLLPUBLIC void GetChartRanges( const OUString& rChartName, std::vector< ScRangeList >& rRanges, const ScDocument* pSheetNameDoc ); void SetChartRanges( const OUString& rChartName, const std::vector< ScRangeList >& rRanges ); void UpdateChartArea( const OUString& rChartName, const ScRange& rNewArea, diff --git a/sc/inc/orcusxml.hxx b/sc/inc/orcusxml.hxx index 9d803ef20122..5b9e830aadc0 100644 --- a/sc/inc/orcusxml.hxx +++ b/sc/inc/orcusxml.hxx @@ -50,8 +50,7 @@ struct ScOrcusXMLTreeParam */ UserDataStoreType m_UserDataStore; - static SC_DLLPUBLIC EntryData* getUserData(SvTreeListEntry& rEntry); - static SC_DLLPUBLIC const EntryData* getUserData(const SvTreeListEntry& rEntry); + static SC_DLLPUBLIC EntryData* getUserData(const SvTreeListEntry& rEntry); }; struct ScOrcusImportXMLParam diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx index 5443f373a4af..19d6d7701e0c 100644 --- a/sc/inc/rangelst.hxx +++ b/sc/inc/rangelst.hxx @@ -38,7 +38,7 @@ public: ScRangeList& operator=(const ScRangeList& rList); void Append( const ScRange& rRange ); - ScRefFlags Parse( const OUString&, ScDocument*, + ScRefFlags Parse( const OUString&, const ScDocument*, formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO, SCTAB nDefaultTab = 0, sal_Unicode cDelimiter = 0 ); @@ -48,7 +48,7 @@ public: void Join( const ScRange&, bool bIsInList = false ); - bool UpdateReference( UpdateRefMode, ScDocument*, + bool UpdateReference( UpdateRefMode, const ScDocument*, const ScRange& rWhere, SCCOL nDx, SCROW nDy, @@ -114,7 +114,7 @@ public: maPairs.push_back( pR ); } void Join( const ScRangePair&, bool bIsInList = false ); - void UpdateReference( UpdateRefMode, ScDocument*, + void UpdateReference( UpdateRefMode, const ScDocument*, const ScRange& rWhere, SCCOL nDx, SCROW nDy, SCTAB nDz ); void DeleteOnTab( SCTAB nTab ); @@ -123,7 +123,7 @@ public: ScRangePair** CreateNameSortedArray( size_t& nCount, ScDocument* ) const; void Remove(size_t nPos); - void Remove(ScRangePair* pAdr); + void Remove(const ScRangePair* pAdr); size_t size() const; ScRangePair* operator[](size_t idx); diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx index 737c5e6b01af..b9fae7492d95 100644 --- a/sc/inc/rangenam.hxx +++ b/sc/inc/rangenam.hxx @@ -125,7 +125,7 @@ public: /// Does not change the name, but sets maNewName for formula update after dialog. void SetNewName( const OUString& rNewName ) { maNewName = rNewName; } ScTokenArray* GetCode() { return pCode.get(); } - SC_DLLPUBLIC void SetCode( ScTokenArray& ); + SC_DLLPUBLIC void SetCode( const ScTokenArray& ); const ScTokenArray* GetCode() const { return pCode.get(); } SC_DLLPUBLIC FormulaError GetErrCode() const; bool HasReferences() const; @@ -162,7 +162,7 @@ public: static void MakeValidName( OUString& rName ); - SC_DLLPUBLIC static IsNameValidType IsNameValid( const OUString& rName, ScDocument* pDoc ); + SC_DLLPUBLIC static IsNameValidType IsNameValid( const OUString& rName, const ScDocument* pDoc ); SCROW GetMaxRow() const; SCCOL GetMaxCol() const; diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx index 47cace7db2ad..f3fed7b6fb25 100644 --- a/sc/inc/rangeutl.hxx +++ b/sc/inc/rangeutl.hxx @@ -43,9 +43,9 @@ class SC_DLLPUBLIC ScRangeUtil public: ScRangeUtil() {} - static bool MakeArea ( const OUString& rAreaStr, + static bool MakeArea ( const OUString& rAreaStr, ScArea& rArea, - ScDocument* pDoc, + const ScDocument* pDoc, SCTAB nTab, ScAddress::Details const & rDetails ); @@ -53,14 +53,14 @@ public: OUString& thePosStr ); static bool IsAbsTabArea ( const OUString& rAreaStr, - ScDocument* pDoc, + const ScDocument* pDoc, ScArea*** pppAreas, sal_uInt16* pAreaCount = nullptr, bool bAcceptCellRef = false, ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ); static bool IsAbsArea ( const OUString& rAreaStr, - ScDocument* pDoc, + const ScDocument* pDoc, SCTAB nTab, OUString* pCompleteStr, ScRefAddress* pStartPos = nullptr, @@ -68,14 +68,14 @@ public: ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ); static bool IsAbsPos ( const OUString& rPosStr, - ScDocument* pDoc, + const ScDocument* pDoc, SCTAB nTab, OUString* pCompleteStr, ScRefAddress* pPosTripel = nullptr, ScAddress::Details const & rDetails = ScAddress::detailsOOOa1 ); static bool MakeRangeFromName( const OUString& rName, - ScDocument* pDoc, + const ScDocument* pDoc, SCTAB nCurTab, ScRange& rRange, RutlNameScope eScope=RUTL_NAMES, @@ -221,7 +221,7 @@ public: static void GetStringFromXMLRangeString( OUString& rString, const OUString& rXMLRange, - ScDocument* pDoc ); + const ScDocument* pDoc ); /// String to RangeData core static ScRangeData* GetRangeDataFromString(const OUString& rString, const SCTAB nTab, const ScDocument* pDoc); @@ -263,7 +263,7 @@ private: bool bFirstPass; public: - ScAreaNameIterator( ScDocument* pDoc ); + ScAreaNameIterator( const ScDocument* pDoc ); bool Next( OUString& rName, ScRange& rRange ); bool WasDBName() const { return !bFirstPass; } diff --git a/sc/inc/tabprotection.hxx b/sc/inc/tabprotection.hxx index 2c999749c5bd..61e0d605e6a8 100644 --- a/sc/inc/tabprotection.hxx +++ b/sc/inc/tabprotection.hxx @@ -188,7 +188,7 @@ public: void setEnhancedProtection( const ::std::vector< ScEnhancedProtection > & rProt ); const ::std::vector< ScEnhancedProtection > & getEnhancedProtection() const; - bool updateReference( UpdateRefMode, ScDocument*, const ScRange& rWhere, SCCOL nDx, SCROW nDy, SCTAB nDz ); + bool updateReference( UpdateRefMode, const ScDocument*, const ScRange& rWhere, SCCOL nDx, SCROW nDy, SCTAB nDz ); bool isBlockEditable( const ScRange& rRange ) const; bool isSelectionEditable( const ScRangeList& rRangeList ) const; diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx index 8d561af85760..7e20b691d96b 100644 --- a/sc/inc/token.hxx +++ b/sc/inc/token.hxx @@ -312,7 +312,7 @@ protected: ScConstMatrixRef xMatrix; formula::FormulaConstTokenRef xUpperLeft; public: - ScMatrixCellResultToken( const ScConstMatrixRef& pMat, formula::FormulaToken* pUL ); + ScMatrixCellResultToken( const ScConstMatrixRef& pMat, const formula::FormulaToken* pUL ); ScMatrixCellResultToken( const ScMatrixCellResultToken& r ); virtual ~ScMatrixCellResultToken() override; virtual double GetDouble() const override; @@ -338,7 +338,7 @@ private: SCROW nRows; SCCOL nCols; public: - ScMatrixFormulaCellToken( SCCOL nC, SCROW nR, const ScConstMatrixRef& pMat, formula::FormulaToken* pUL ); + ScMatrixFormulaCellToken( SCCOL nC, SCROW nR, const ScConstMatrixRef& pMat, const formula::FormulaToken* pUL ); ScMatrixFormulaCellToken( SCCOL nC, SCROW nR ); ScMatrixFormulaCellToken( const ScMatrixFormulaCellToken& r ); virtual ~ScMatrixFormulaCellToken() override; diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx index d817d3b13019..53895cb66889 100644 --- a/sc/inc/tokenarray.hxx +++ b/sc/inc/tokenarray.hxx @@ -205,7 +205,7 @@ public: sc::RefUpdateResult AdjustReferenceOnInsertedTab( sc::RefUpdateInsertTabContext& rCxt, const ScAddress& rOldPos ); - sc::RefUpdateResult AdjustReferenceOnMovedTab( sc::RefUpdateMoveTabContext& rCxt, const ScAddress& rOldPos ); + sc::RefUpdateResult AdjustReferenceOnMovedTab( const sc::RefUpdateMoveTabContext& rCxt, const ScAddress& rOldPos ); /** * Adjust all internal references on base position change. diff --git a/sc/inc/zforauto.hxx b/sc/inc/zforauto.hxx index 634d464f564b..f49af7fb4d21 100644 --- a/sc/inc/zforauto.hxx +++ b/sc/inc/zforauto.hxx @@ -37,7 +37,7 @@ public: ScNumFormatAbbrev(sal_uInt32 nFormat, SvNumberFormatter& rFormatter); void Load( SvStream& rStream, rtl_TextEncoding eByteStrSet ); // loading of the numberformats void Save( SvStream& rStream, rtl_TextEncoding eByteStrSet ) const; // saving of the numberformats - void PutFormatIndex(sal_uInt32 nFormat, SvNumberFormatter& rFormatter); + void PutFormatIndex(sal_uInt32 nFormat, const SvNumberFormatter& rFormatter); sal_uInt32 GetFormatIndex( SvNumberFormatter& rFormatter); bool operator==(const ScNumFormatAbbrev& rNumFormat) const { |