summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-23 18:37:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-24 10:54:06 +0200
commit3eb5ab6efe4229db0ec2bb177d892f2604f49411 (patch)
tree4c9e00f63c0f9d9b0caf3afb5cb570d0b9b47a72 /sc
parent4fb9d7b69c4fb10107210c2f851040f7c259e413 (diff)
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')
-rw-r--r--sc/inc/address.hxx6
-rw-r--r--sc/inc/charthelper.hxx4
-rw-r--r--sc/inc/compiler.hxx2
-rw-r--r--sc/inc/consoli.hxx4
-rw-r--r--sc/inc/dbdata.hxx4
-rw-r--r--sc/inc/detdata.hxx4
-rw-r--r--sc/inc/detfunc.hxx4
-rw-r--r--sc/inc/document.hxx2
-rw-r--r--sc/inc/orcusxml.hxx3
-rw-r--r--sc/inc/rangelst.hxx8
-rw-r--r--sc/inc/rangenam.hxx4
-rw-r--r--sc/inc/rangeutl.hxx16
-rw-r--r--sc/inc/tabprotection.hxx2
-rw-r--r--sc/inc/token.hxx4
-rw-r--r--sc/inc/tokenarray.hxx2
-rw-r--r--sc/inc/zforauto.hxx2
-rw-r--r--sc/source/core/data/documen5.cxx2
-rw-r--r--sc/source/core/data/tabprotection.cxx6
-rw-r--r--sc/source/core/inc/interpre.hxx2
-rw-r--r--sc/source/core/inc/refupdat.hxx8
-rw-r--r--sc/source/core/tool/address.cxx6
-rw-r--r--sc/source/core/tool/charthelper.cxx4
-rw-r--r--sc/source/core/tool/compiler.cxx2
-rw-r--r--sc/source/core/tool/consoli.cxx2
-rw-r--r--sc/source/core/tool/dbdata.cxx4
-rw-r--r--sc/source/core/tool/detdata.cxx2
-rw-r--r--sc/source/core/tool/detfunc.cxx6
-rw-r--r--sc/source/core/tool/interpr2.cxx2
-rw-r--r--sc/source/core/tool/interpr4.cxx6
-rw-r--r--sc/source/core/tool/orcusxml.cxx7
-rw-r--r--sc/source/core/tool/progress.cxx4
-rw-r--r--sc/source/core/tool/rangelst.cxx8
-rw-r--r--sc/source/core/tool/rangenam.cxx4
-rw-r--r--sc/source/core/tool/rangeutl.cxx18
-rw-r--r--sc/source/core/tool/refupdat.cxx8
-rw-r--r--sc/source/core/tool/token.cxx10
-rw-r--r--sc/source/core/tool/zforauto.cxx2
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx12
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx4
39 files changed, 97 insertions, 103 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
{
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx
index 340a9de2639f..2424684fb210 100644
--- a/sc/source/core/data/documen5.cxx
+++ b/sc/source/core/data/documen5.cxx
@@ -250,7 +250,7 @@ uno::Reference< chart2::XChartDocument > ScDocument::GetChartByName( const OUStr
}
return xReturn;
}
-void ScDocument::GetChartRanges( const OUString& rChartName, ::std::vector< ScRangeList >& rRangesVector, ScDocument* pSheetNameDoc )
+void ScDocument::GetChartRanges( const OUString& rChartName, ::std::vector< ScRangeList >& rRangesVector, const ScDocument* pSheetNameDoc )
{
rRangesVector.clear();
uno::Reference< chart2::XChartDocument > xChartDoc( GetChartByName( rChartName ) );
diff --git a/sc/source/core/data/tabprotection.cxx b/sc/source/core/data/tabprotection.cxx
index a6f100b4421b..902a1ad63ecf 100644
--- a/sc/source/core/data/tabprotection.cxx
+++ b/sc/source/core/data/tabprotection.cxx
@@ -114,7 +114,7 @@ public:
void setEnhancedProtection( const ::std::vector< ScEnhancedProtection > & rProt );
const ::std::vector< ScEnhancedProtection > & getEnhancedProtection() const { return maEnhancedProtection;}
- 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;
@@ -350,7 +350,7 @@ void ScTableProtectionImpl::setEnhancedProtection( const ::std::vector< ScEnhanc
maEnhancedProtection = rProt;
}
-bool ScTableProtectionImpl::updateReference( UpdateRefMode eMode, ScDocument* pDoc,
+bool ScTableProtectionImpl::updateReference( UpdateRefMode eMode, const ScDocument* pDoc,
const ScRange& rWhere, SCCOL nDx, SCROW nDy, SCTAB nDz )
{
bool bChanged = false;
@@ -614,7 +614,7 @@ const ::std::vector< ScEnhancedProtection > & ScTableProtection::getEnhancedProt
return mpImpl->getEnhancedProtection();
}
-bool ScTableProtection::updateReference( UpdateRefMode eMode, ScDocument* pDoc, const ScRange& rWhere,
+bool ScTableProtection::updateReference( UpdateRefMode eMode, const ScDocument* pDoc, const ScRange& rWhere,
SCCOL nDx, SCROW nDy, SCTAB nDz )
{
return mpImpl->updateReference( eMode, pDoc, rWhere, nDx, nDy, nDz);
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 113cf6aa4ec6..d40b62a0e86a 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -391,7 +391,7 @@ void ConvertMatrixJumpConditionToMatrix();
inline bool MatrixParameterConversion();
ScMatrixRef PopMatrix();
sc::RangeMatrix PopRangeMatrix();
-void QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, sal_uLong& rRetIndexExpr);
+void QueryMatrixType(const ScMatrixRef& xMat, short& rRetTypeExpr, sal_uLong& rRetIndexExpr);
formula::FormulaToken* CreateDoubleOrTypedToken( double fVal );
diff --git a/sc/source/core/inc/refupdat.hxx b/sc/source/core/inc/refupdat.hxx
index f58bef7b0ae3..8a8bb508aaac 100644
--- a/sc/source/core/inc/refupdat.hxx
+++ b/sc/source/core/inc/refupdat.hxx
@@ -44,7 +44,7 @@ class ScRefUpdate
public:
static ScRefUpdateRes Update
- ( ScDocument* pDoc, UpdateRefMode eUpdateRefMode,
+ ( const ScDocument* pDoc, UpdateRefMode eUpdateRefMode,
SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
SCCOL nDx, SCROW nDy, SCTAB nDz,
@@ -56,13 +56,13 @@ public:
sal_Int32 nDx, sal_Int32 nDy, sal_Int32 nDz,
ScBigRange& rWhat );
- static void MoveRelWrap( ScDocument* pDoc, const ScAddress& rPos,
+ static void MoveRelWrap( const ScDocument* pDoc, const ScAddress& rPos,
SCCOL nMaxCol, SCROW nMaxRow, ScComplexRefData& rRef );
static ScRefUpdateRes UpdateTranspose(
- ScDocument* pDoc, const ScRange& rSource, const ScAddress& rDest, ScRange& rRef );
+ const ScDocument* pDoc, const ScRange& rSource, const ScAddress& rDest, ScRange& rRef );
- static void DoTranspose( SCCOL& rCol, SCROW& rRow, SCTAB& rTab, ScDocument* pDoc,
+ static void DoTranspose( SCCOL& rCol, SCROW& rRow, SCTAB& rTab, const ScDocument* pDoc,
const ScRange& rSource, const ScAddress& rDest );
static ScRefUpdateRes UpdateGrow(
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 853f400074aa..9899044e6ef7 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1482,7 +1482,7 @@ static ScRefFlags lcl_ScAddress_Parse ( const sal_Unicode* p, const ScDocument*
}
}
-bool ConvertSingleRef( ScDocument* pDoc, const OUString& rRefString,
+bool ConvertSingleRef( const ScDocument* pDoc, const OUString& rRefString,
SCTAB nDefTab, ScRefAddress& rRefAddress,
const ScAddress::Details& rDetails,
ScAddress::ExternalInfo* pExtInfo /* = NULL */ )
@@ -1504,7 +1504,7 @@ bool ConvertSingleRef( ScDocument* pDoc, const OUString& rRefString,
return bRet;
}
-bool ConvertDoubleRef( ScDocument* pDoc, const OUString& rRefString, SCTAB nDefTab,
+bool ConvertDoubleRef( const ScDocument* pDoc, const OUString& rRefString, SCTAB nDefTab,
ScRefAddress& rStartRefAddress, ScRefAddress& rEndRefAddress,
const ScAddress::Details& rDetails,
ScAddress::ExternalInfo* pExtInfo /* = NULL */ )
@@ -1757,7 +1757,7 @@ ScRefFlags ScRange::Parse( const OUString& rString, const ScDocument* pDoc,
}
// Accept a full range, or an address
-ScRefFlags ScRange::ParseAny( const OUString& rString, ScDocument* pDoc,
+ScRefFlags ScRange::ParseAny( const OUString& rString, const ScDocument* pDoc,
const ScAddress::Details& rDetails )
{
ScRefFlags nRet = Parse( rString, pDoc, rDetails );
diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx
index 18e0e9e02467..b2311eb768f5 100644
--- a/sc/source/core/tool/charthelper.cxx
+++ b/sc/source/core/tool/charthelper.cxx
@@ -119,7 +119,7 @@ sal_uInt16 ScChartHelper::DoUpdateAllCharts( ScDocument* pDoc )
return lcl_DoUpdateCharts( ScAddress(), pDoc, true );
}
-void ScChartHelper::AdjustRangesOfChartsOnDestinationPage( ScDocument* pSrcDoc, ScDocument* pDestDoc, const SCTAB nSrcTab, const SCTAB nDestTab )
+void ScChartHelper::AdjustRangesOfChartsOnDestinationPage( const ScDocument* pSrcDoc, ScDocument* pDestDoc, const SCTAB nSrcTab, const SCTAB nDestTab )
{
if( !pSrcDoc || !pDestDoc )
return;
@@ -337,7 +337,7 @@ void ScChartHelper::AddRangesIfProtectedChart( ScRangeListVector& rRangesVector,
}
}
-void ScChartHelper::FillProtectedChartRangesVector( ScRangeListVector& rRangesVector, ScDocument* pDocument, const SdrPage* pPage )
+void ScChartHelper::FillProtectedChartRangesVector( ScRangeListVector& rRangesVector, const ScDocument* pDocument, const SdrPage* pPage )
{
if ( pDocument && pPage )
{
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index b96a169a7d3d..f0db22edf738 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -4853,7 +4853,7 @@ void ScCompiler::MoveRelWrap( SCCOL nMaxCol, SCROW nMaxRow )
// Wrap-adjust relative references of a RangeName to current position,
// don't call for other token arrays!
-void ScCompiler::MoveRelWrap( const ScTokenArray& rArr, ScDocument* pDoc, const ScAddress& rPos,
+void ScCompiler::MoveRelWrap( const ScTokenArray& rArr, const ScDocument* pDoc, const ScAddress& rPos,
SCCOL nMaxCol, SCROW nMaxRow )
{
for ( auto t: rArr.References() )
diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx
index cf3a3a355605..7356cae6c613 100644
--- a/sc/source/core/tool/consoli.cxx
+++ b/sc/source/core/tool/consoli.cxx
@@ -192,7 +192,7 @@ void ScConsData::SetFlags( ScSubTotalFunc eFunc, bool bColName, bool bRowName, b
eFunction = eFunc;
}
-void ScConsData::AddFields( ScDocument* pSrcDoc, SCTAB nTab,
+void ScConsData::AddFields( const ScDocument* pSrcDoc, SCTAB nTab,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
{
++nDataCount;
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index a6580a5a8e24..a7049d81b908 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -567,7 +567,7 @@ void ScDBData::UpdateMoveTab(SCTAB nOldPos, SCTAB nNewPos)
}
-void ScDBData::UpdateReference(ScDocument* pDoc, UpdateRefMode eUpdateRefMode,
+void ScDBData::UpdateReference(const ScDocument* pDoc, UpdateRefMode eUpdateRefMode,
SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
SCCOL nDx, SCROW nDy, SCTAB nDz)
@@ -618,7 +618,7 @@ void ScDBData::UpdateReference(ScDocument* pDoc, UpdateRefMode eUpdateRefMode,
//TODO: check if something was deleted/inserted with-in the range !!!
}
-void ScDBData::ExtendDataArea(ScDocument* pDoc)
+void ScDBData::ExtendDataArea(const ScDocument* pDoc)
{
// Extend the DB area to include data rows immediately below.
SCCOL nOldCol1 = nStartCol, nOldCol2 = nEndCol;
diff --git a/sc/source/core/tool/detdata.cxx b/sc/source/core/tool/detdata.cxx
index 1927539878c9..e86707d66d9d 100644
--- a/sc/source/core/tool/detdata.cxx
+++ b/sc/source/core/tool/detdata.cxx
@@ -43,7 +43,7 @@ void ScDetOpList::DeleteOnTab( SCTAB nTab )
}
}
-void ScDetOpList::UpdateReference( ScDocument* pDoc, UpdateRefMode eUpdateRefMode,
+void ScDetOpList::UpdateReference( const ScDocument* pDoc, UpdateRefMode eUpdateRefMode,
const ScRange& rRange, SCCOL nDx, SCROW nDy, SCTAB nDz )
{
for (ScDetOpDataVector::iterator it = aDetOpDataVector.begin(); it != aDetOpDataVector.end(); ++it )
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index be341862b9ce..57db80d0b553 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -126,7 +126,7 @@ ColorData ScDetectiveFunc::nErrorColor = 0;
ColorData ScDetectiveFunc::nCommentColor = 0;
bool ScDetectiveFunc::bColorsInitialized = false;
-static bool lcl_HasThickLine( SdrObject& rObj )
+static bool lcl_HasThickLine( const SdrObject& rObj )
{
// thin lines get width 0 -> everything greater 0 is a thick line
@@ -420,7 +420,7 @@ bool ScDetectiveFunc::HasArrow( const ScAddress& rStart,
return bFound;
}
-bool ScDetectiveFunc::IsNonAlienArrow( SdrObject* pObject )
+bool ScDetectiveFunc::IsNonAlienArrow( const SdrObject* pObject )
{
if ( pObject->GetLayer()==SC_LAYER_INTERN &&
pObject->IsPolyObj() && pObject->GetPointCount()==2 )
@@ -1512,7 +1512,7 @@ void ScDetectiveFunc::UpdateAllArrowColors()
}
}
-void ScDetectiveFunc::FindFrameForObject( SdrObject* pObject, ScRange& rRange )
+void ScDetectiveFunc::FindFrameForObject( const SdrObject* pObject, ScRange& rRange )
{
// find the rectangle for an arrow (always the object directly before the arrow)
// rRange must be initialized to the source cell of the arrow (start of area)
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 08a36f577309..72a8777e6149 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -2696,7 +2696,7 @@ void ScInterpreter::ScStyle()
PushIllegalParameter();
}
-static ScDdeLink* lcl_GetDdeLink( sfx2::LinkManager* pLinkMgr,
+static ScDdeLink* lcl_GetDdeLink( const sfx2::LinkManager* pLinkMgr,
const OUString& rA, const OUString& rT, const OUString& rI, sal_uInt8 nM )
{
size_t nCount = pLinkMgr->GetLinks().size();
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index acd8f21d184a..810020a95131 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -1674,7 +1674,7 @@ sc::RangeMatrix ScInterpreter::PopRangeMatrix()
return aRet;
}
-void ScInterpreter::QueryMatrixType(ScMatrixRef& xMat, short& rRetTypeExpr, sal_uLong& rRetIndexExpr)
+void ScInterpreter::QueryMatrixType(const ScMatrixRef& xMat, short& rRetTypeExpr, sal_uLong& rRetIndexExpr)
{
if (xMat)
{
@@ -3098,7 +3098,7 @@ void ScInterpreter::ScMissing()
#if HAVE_FEATURE_SCRIPTING
-static uno::Any lcl_getSheetModule( const uno::Reference<table::XCellRange>& xCellRange, ScDocument* pDok )
+static uno::Any lcl_getSheetModule( const uno::Reference<table::XCellRange>& xCellRange, const ScDocument* pDok )
{
uno::Reference< sheet::XSheetCellRange > xSheetRange( xCellRange, uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xProps( xSheetRange->getSpreadsheet(), uno::UNO_QUERY_THROW );
@@ -3132,7 +3132,7 @@ static uno::Any lcl_getSheetModule( const uno::Reference<table::XCellRange>& xCe
return uno::makeAny( xIf );
}
-static bool lcl_setVBARange( ScRange& aRange, ScDocument* pDok, SbxVariable* pPar )
+static bool lcl_setVBARange( const ScRange& aRange, ScDocument* pDok, SbxVariable* pPar )
{
bool bOk = false;
try
diff --git a/sc/source/core/tool/orcusxml.cxx b/sc/source/core/tool/orcusxml.cxx
index cf4debd3908b..df7b1b153fc8 100644
--- a/sc/source/core/tool/orcusxml.cxx
+++ b/sc/source/core/tool/orcusxml.cxx
@@ -19,16 +19,11 @@ ScOrcusXMLTreeParam::EntryData::EntryData(EntryType eType)
, mbLeafNode(true)
{}
-ScOrcusXMLTreeParam::EntryData* ScOrcusXMLTreeParam::getUserData(SvTreeListEntry& rEntry)
+ScOrcusXMLTreeParam::EntryData* ScOrcusXMLTreeParam::getUserData(const SvTreeListEntry& rEntry)
{
return static_cast<ScOrcusXMLTreeParam::EntryData*>(rEntry.GetUserData());
}
-const ScOrcusXMLTreeParam::EntryData* ScOrcusXMLTreeParam::getUserData(const SvTreeListEntry& rEntry)
-{
- return static_cast<const ScOrcusXMLTreeParam::EntryData*>(rEntry.GetUserData());
-}
-
ScOrcusImportXMLParam::CellLink::CellLink(const ScAddress& rPos, const OString& rPath) :
maPos(rPos), maPath(rPath) {}
diff --git a/sc/source/core/tool/progress.cxx b/sc/source/core/tool/progress.cxx
index b524eac51138..3e268921cfff 100644
--- a/sc/source/core/tool/progress.cxx
+++ b/sc/source/core/tool/progress.cxx
@@ -44,7 +44,7 @@ bool ScProgress::bAllowInterpretProgress = true;
ScDocument* ScProgress::pInterpretDoc;
bool ScProgress::bIdleWasEnabled = false;
-static bool lcl_IsHiddenDocument( SfxObjectShell* pObjSh )
+static bool lcl_IsHiddenDocument( const SfxObjectShell* pObjSh )
{
if (pObjSh)
{
@@ -61,7 +61,7 @@ static bool lcl_IsHiddenDocument( SfxObjectShell* pObjSh )
return false;
}
-static bool lcl_HasControllersLocked( SfxObjectShell& rObjSh )
+static bool lcl_HasControllersLocked( const SfxObjectShell& rObjSh )
{
uno::Reference<frame::XModel> xModel( rObjSh.GetBaseModel() );
if (xModel.is())
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index 9ef8cfeea77d..dc2ba3832dca 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -144,7 +144,7 @@ ScRangeList::~ScRangeList()
RemoveAll();
}
-ScRefFlags ScRangeList::Parse( const OUString& rStr, ScDocument* pDoc,
+ScRefFlags ScRangeList::Parse( const OUString& rStr, const ScDocument* pDoc,
formula::FormulaGrammar::AddressConvention eConv,
SCTAB nDefaultTab, sal_Unicode cDelimiter )
{
@@ -356,7 +356,7 @@ bool ScRangeList::operator!=( const ScRangeList& r ) const
bool ScRangeList::UpdateReference(
UpdateRefMode eUpdateRefMode,
- ScDocument* pDoc,
+ const ScDocument* pDoc,
const ScRange& rWhere,
SCCOL nDx,
SCROW nDy,
@@ -1222,7 +1222,7 @@ void ScRangePairList::Remove(size_t nPos)
maPairs.erase(itr);
}
-void ScRangePairList::Remove( ScRangePair* Adr)
+void ScRangePairList::Remove( const ScRangePair* Adr)
{
if (Adr == nullptr)
return;
@@ -1255,7 +1255,7 @@ size_t ScRangePairList::size() const
}
void ScRangePairList::UpdateReference( UpdateRefMode eUpdateRefMode,
- ScDocument* pDoc, const ScRange& rWhere,
+ const ScDocument* pDoc, const ScRange& rWhere,
SCCOL nDx, SCROW nDy, SCTAB nDz )
{
if ( !maPairs.empty() )
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index db12ebe0f6d2..aec4e958715f 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -468,7 +468,7 @@ void ScRangeData::MakeValidName( OUString& rName )
}
}
-ScRangeData::IsNameValidType ScRangeData::IsNameValid( const OUString& rName, ScDocument* pDoc )
+ScRangeData::IsNameValidType ScRangeData::IsNameValid( const OUString& rName, const ScDocument* pDoc )
{
/* XXX If changed, sc/source/filter/ftools/ftools.cxx
* ScfTools::ConvertToScDefinedName needs to be changed too. */
@@ -616,7 +616,7 @@ void ScRangeData::ValidateTabRefs()
}
}
-void ScRangeData::SetCode( ScTokenArray& rArr )
+void ScRangeData::SetCode( const ScTokenArray& rArr )
{
pCode.reset(new ScTokenArray( rArr ));
pCode->SetFromRangeName(true);
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index d6c8053ef9ec..3539ce935ead 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -36,7 +36,7 @@ using namespace ::com::sun::star;
bool ScRangeUtil::MakeArea( const OUString& rAreaStr,
ScArea& rArea,
- ScDocument* pDoc,
+ const ScDocument* pDoc,
SCTAB nTab,
ScAddress::Details const & rDetails )
{
@@ -86,7 +86,7 @@ void ScRangeUtil::CutPosString( const OUString& theAreaStr,
}
bool ScRangeUtil::IsAbsTabArea( const OUString& rAreaStr,
- ScDocument* pDoc,
+ const ScDocument* pDoc,
ScArea*** pppAreas,
sal_uInt16* pAreaCount,
bool /* bAcceptCellRef */,
@@ -173,7 +173,7 @@ bool ScRangeUtil::IsAbsTabArea( const OUString& rAreaStr,
}
bool ScRangeUtil::IsAbsArea( const OUString& rAreaStr,
- ScDocument* pDoc,
+ const ScDocument* pDoc,
SCTAB nTab,
OUString* pCompleteStr,
ScRefAddress* pStartPos,
@@ -212,7 +212,7 @@ bool ScRangeUtil::IsAbsArea( const OUString& rAreaStr,
}
bool ScRangeUtil::IsAbsPos( const OUString& rPosStr,
- ScDocument* pDoc,
+ const ScDocument* pDoc,
SCTAB nTab,
OUString* pCompleteStr,
ScRefAddress* pPosTripel,
@@ -238,7 +238,7 @@ bool ScRangeUtil::IsAbsPos( const OUString& rPosStr,
bool ScRangeUtil::MakeRangeFromName (
const OUString& rName,
- ScDocument* pDoc,
+ const ScDocument* pDoc,
SCTAB nCurTab,
ScRange& rRange,
RutlNameScope eScope,
@@ -709,7 +709,7 @@ void ScRangeStringConverter::GetStringFromRangeList(
}
static void lcl_appendCellAddress(
- OUStringBuffer& rBuf, ScDocument* pDoc, const ScAddress& rCell,
+ OUStringBuffer& rBuf, const ScDocument* pDoc, const ScAddress& rCell,
const ScAddress::ExternalInfo& rExtInfo)
{
if (rExtInfo.mbExternal)
@@ -739,7 +739,7 @@ static void lcl_appendCellAddress(
}
static void lcl_appendCellRangeAddress(
- OUStringBuffer& rBuf, ScDocument* pDoc, const ScAddress& rCell1, const ScAddress& rCell2,
+ OUStringBuffer& rBuf, const ScDocument* pDoc, const ScAddress& rCell1, const ScAddress& rCell2,
const ScAddress::ExternalInfo& rExtInfo1, const ScAddress::ExternalInfo& rExtInfo2)
{
if (rExtInfo1.mbExternal)
@@ -786,7 +786,7 @@ static void lcl_appendCellRangeAddress(
}
}
-void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, const OUString& rXMLRange, ScDocument* pDoc )
+void ScRangeStringConverter::GetStringFromXMLRangeString( OUString& rString, const OUString& rXMLRange, const ScDocument* pDoc )
{
FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
const sal_Unicode cSepNew = ScCompiler::GetNativeSymbolChar(ocSep);
@@ -958,7 +958,7 @@ bool ScArea::operator==( const ScArea& r ) const
&& (nRowEnd == r.nRowEnd) );
}
-ScAreaNameIterator::ScAreaNameIterator( ScDocument* pDoc ) :
+ScAreaNameIterator::ScAreaNameIterator( const ScDocument* pDoc ) :
pRangeName(pDoc->GetRangeName()),
pDBCollection(pDoc->GetDBCollection()),
bFirstPass(true)
diff --git a/sc/source/core/tool/refupdat.cxx b/sc/source/core/tool/refupdat.cxx
index 6a25667717ed..8ad409187813 100644
--- a/sc/source/core/tool/refupdat.cxx
+++ b/sc/source/core/tool/refupdat.cxx
@@ -186,7 +186,7 @@ static bool lcl_MoveItCutBig( sal_Int32& rRef, sal_Int32 nDelta )
return bCut;
}
-ScRefUpdateRes ScRefUpdate::Update( ScDocument* pDoc, UpdateRefMode eUpdateRefMode,
+ScRefUpdateRes ScRefUpdate::Update( const ScDocument* pDoc, UpdateRefMode eUpdateRefMode,
SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
SCCOL nDx, SCROW nDy, SCTAB nDz,
@@ -460,7 +460,7 @@ ScRefUpdateRes ScRefUpdate::Update( UpdateRefMode eUpdateRefMode,
return eRet;
}
-void ScRefUpdate::MoveRelWrap( ScDocument* pDoc, const ScAddress& rPos,
+void ScRefUpdate::MoveRelWrap( const ScDocument* pDoc, const ScAddress& rPos,
SCCOL nMaxCol, SCROW nMaxRow, ScComplexRefData& rRef )
{
ScRange aAbsRange = rRef.toAbs(rPos);
@@ -507,7 +507,7 @@ void ScRefUpdate::MoveRelWrap( ScDocument* pDoc, const ScAddress& rPos,
}
void ScRefUpdate::DoTranspose( SCCOL& rCol, SCROW& rRow, SCTAB& rTab,
- ScDocument* pDoc, const ScRange& rSource, const ScAddress& rDest )
+ const ScDocument* pDoc, const ScRange& rSource, const ScAddress& rDest )
{
SCTAB nDz = rDest.Tab() - rSource.aStart.Tab();
if (nDz)
@@ -531,7 +531,7 @@ void ScRefUpdate::DoTranspose( SCCOL& rCol, SCROW& rRow, SCTAB& rTab,
}
ScRefUpdateRes ScRefUpdate::UpdateTranspose(
- ScDocument* pDoc, const ScRange& rSource, const ScAddress& rDest, ScRange& rRef )
+ const ScDocument* pDoc, const ScRange& rSource, const ScAddress& rDest, ScRange& rRef )
{
ScRefUpdateRes eRet = UR_NOTHING;
if (rRef.aStart.Col() >= rSource.aStart.Col() && rRef.aEnd.Col() <= rSource.aEnd.Col() &&
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index f1130af4f6b7..2a540a38aa6a 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1021,7 +1021,7 @@ bool ScEmptyCellToken::operator==( const FormulaToken& r ) const
bDisplayedAsString == static_cast< const ScEmptyCellToken & >(r).IsDisplayedAsString();
}
-ScMatrixCellResultToken::ScMatrixCellResultToken( const ScConstMatrixRef& pMat, formula::FormulaToken* pUL ) :
+ScMatrixCellResultToken::ScMatrixCellResultToken( const ScConstMatrixRef& pMat, const formula::FormulaToken* pUL ) :
FormulaToken(formula::svMatrixCell), xMatrix(pMat), xUpperLeft(pUL) {}
ScMatrixCellResultToken::ScMatrixCellResultToken( const ScMatrixCellResultToken& r ) :
@@ -1063,7 +1063,7 @@ void ScMatrixCellResultToken::Assign( const ScMatrixCellResultToken & r )
}
ScMatrixFormulaCellToken::ScMatrixFormulaCellToken(
- SCCOL nC, SCROW nR, const ScConstMatrixRef& pMat, formula::FormulaToken* pUL ) :
+ SCCOL nC, SCROW nR, const ScConstMatrixRef& pMat, const formula::FormulaToken* pUL ) :
ScMatrixCellResultToken(pMat, pUL), nRows(nR), nCols(nC)
{
CloneUpperLeftIfNecessary();
@@ -4240,7 +4240,7 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceOnInsertedTab( sc::RefUpdateIns
namespace {
-bool adjustTabOnMove( ScAddress& rPos, sc::RefUpdateMoveTabContext& rCxt )
+bool adjustTabOnMove( ScAddress& rPos, const sc::RefUpdateMoveTabContext& rCxt )
{
SCTAB nNewTab = rCxt.getNewTab(rPos.Tab());
if (nNewTab == rPos.Tab())
@@ -4252,7 +4252,7 @@ bool adjustTabOnMove( ScAddress& rPos, sc::RefUpdateMoveTabContext& rCxt )
}
-sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMovedTab( sc::RefUpdateMoveTabContext& rCxt, const ScAddress& rOldPos )
+sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMovedTab( const sc::RefUpdateMoveTabContext& rCxt, const ScAddress& rOldPos )
{
sc::RefUpdateResult aRes;
if (rCxt.mnOldPos == rCxt.mnNewPos)
@@ -4773,7 +4773,7 @@ void ScTokenArray::CheckExpandReferenceBounds(
namespace {
-void appendDouble( sc::TokenStringContext& rCxt, OUStringBuffer& rBuf, double fVal )
+void appendDouble( const sc::TokenStringContext& rCxt, OUStringBuffer& rBuf, double fVal )
{
if (rCxt.mxOpCodeMap->isEnglish())
{
diff --git a/sc/source/core/tool/zforauto.cxx b/sc/source/core/tool/zforauto.cxx
index ffd7cb39434c..874b1feb6a4b 100644
--- a/sc/source/core/tool/zforauto.cxx
+++ b/sc/source/core/tool/zforauto.cxx
@@ -63,7 +63,7 @@ void ScNumFormatAbbrev::Save( SvStream& rStream, rtl_TextEncoding eByteStrSet )
}
void ScNumFormatAbbrev::PutFormatIndex(sal_uInt32 nFormat,
- SvNumberFormatter& rFormatter)
+ const SvNumberFormatter& rFormatter)
{
const SvNumberformat* pFormat = rFormatter.GetEntry(nFormat);
if (pFormat)
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
index bafeb1a538b5..517a100de572 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
@@ -182,7 +182,7 @@ void ScChangeTrackingExportHelper::WriteDepending(const ScChangeAction* pDependA
true, true);
}
-void ScChangeTrackingExportHelper::WriteDependings(ScChangeAction* pAction)
+void ScChangeTrackingExportHelper::WriteDependings(const ScChangeAction* pAction)
{
if (pAction->HasDependent())
{
@@ -616,18 +616,18 @@ void ScChangeTrackingExportHelper::CollectCellAutoStyles(const ScCellValue& rCel
rExport.GetTextParagraphExport()->collectTextAutoStyles(xText, false, false);
}
-void ScChangeTrackingExportHelper::CollectActionAutoStyles(ScChangeAction* pAction)
+void ScChangeTrackingExportHelper::CollectActionAutoStyles(const ScChangeAction* pAction)
{
if (pAction->GetType() != SC_CAT_CONTENT)
return;
if (pChangeTrack->IsGenerated(pAction->GetActionNumber()))
- CollectCellAutoStyles(static_cast<ScChangeActionContent*>(pAction)->GetNewCell());
+ CollectCellAutoStyles(static_cast<const ScChangeActionContent*>(pAction)->GetNewCell());
else
{
- CollectCellAutoStyles(static_cast<ScChangeActionContent*>(pAction)->GetOldCell());
- if (static_cast<ScChangeActionContent*>(pAction)->IsTopContent() && pAction->IsDeletedIn())
- CollectCellAutoStyles(static_cast<ScChangeActionContent*>(pAction)->GetNewCell());
+ CollectCellAutoStyles(static_cast<const ScChangeActionContent*>(pAction)->GetOldCell());
+ if (static_cast<const ScChangeActionContent*>(pAction)->IsTopContent() && pAction->IsDeletedIn())
+ CollectCellAutoStyles(static_cast<const ScChangeActionContent*>(pAction)->GetNewCell());
}
}
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx
index 5d44d81688f9..48ac0c7c4184 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx
@@ -55,7 +55,7 @@ class ScChangeTrackingExportHelper
void WriteGenerated(const ScChangeAction* pDependAction);
void WriteDeleted(const ScChangeAction* pDependAction);
void WriteDepending(const ScChangeAction* pDependAction);
- void WriteDependings(ScChangeAction* pAction);
+ void WriteDependings(const ScChangeAction* pAction);
void WriteEmptyCell();
void SetValueAttributes(const double& fValue, const OUString& sValue);
@@ -75,7 +75,7 @@ class ScChangeTrackingExportHelper
void WriteRejection(ScChangeAction* pAction);
void CollectCellAutoStyles(const ScCellValue& rCell);
- void CollectActionAutoStyles(ScChangeAction* pAction);
+ void CollectActionAutoStyles(const ScChangeAction* pAction);
void WorkWithChangeAction(ScChangeAction* pAction);
public:
explicit ScChangeTrackingExportHelper(ScXMLExport& rExport);