summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/inc/addincol.hxx2
-rw-r--r--sc/inc/address.hxx10
-rw-r--r--sc/inc/autoform.hxx2
-rw-r--r--sc/inc/charthelper.hxx10
-rw-r--r--sc/inc/chgtrack.hxx18
-rw-r--r--sc/inc/compare.hxx2
-rw-r--r--sc/inc/compiler.hxx2
-rw-r--r--sc/inc/dociter.hxx2
-rw-r--r--sc/inc/docpool.hxx2
-rw-r--r--sc/inc/olinetab.hxx2
-rw-r--r--sc/inc/patattr.hxx15
-rw-r--r--sc/inc/stlpool.hxx2
-rw-r--r--sc/inc/stlsheet.hxx2
-rw-r--r--sc/inc/table.hxx22
-rw-r--r--sc/source/core/data/dociter.cxx2
-rw-r--r--sc/source/core/data/docpool.cxx2
-rw-r--r--sc/source/core/data/documen3.cxx2
-rw-r--r--sc/source/core/data/grouptokenconverter.cxx2
-rw-r--r--sc/source/core/data/olinetab.cxx2
-rw-r--r--sc/source/core/data/patattr.cxx6
-rw-r--r--sc/source/core/data/postit.cxx8
-rw-r--r--sc/source/core/data/stlpool.cxx2
-rw-r--r--sc/source/core/data/stlsheet.cxx2
-rw-r--r--sc/source/core/data/table1.cxx2
-rw-r--r--sc/source/core/data/table2.cxx2
-rw-r--r--sc/source/core/data/table3.cxx12
-rw-r--r--sc/source/core/data/table4.cxx6
-rw-r--r--sc/source/core/data/table5.cxx12
-rw-r--r--sc/source/core/data/validat.cxx4
-rw-r--r--sc/source/core/inc/grouptokenconverter.hxx2
-rw-r--r--sc/source/core/tool/addincol.cxx4
-rw-r--r--sc/source/core/tool/address.cxx22
-rw-r--r--sc/source/core/tool/autoform.cxx2
-rw-r--r--sc/source/core/tool/charthelper.cxx14
-rw-r--r--sc/source/core/tool/chartpos.cxx2
-rw-r--r--sc/source/core/tool/chgtrack.cxx20
-rw-r--r--sc/source/core/tool/compare.cxx2
-rw-r--r--sc/source/core/tool/compiler.cxx2
-rw-r--r--sc/source/core/tool/rangeutl.cxx18
-rw-r--r--sc/source/ui/docshell/docsh3.cxx2
40 files changed, 125 insertions, 124 deletions
diff --git a/sc/inc/addincol.hxx b/sc/inc/addincol.hxx
index ae857f8613ac..472faddf823f 100644
--- a/sc/inc/addincol.hxx
+++ b/sc/inc/addincol.hxx
@@ -206,7 +206,7 @@ public:
bool NeedsCaller() const;
void SetCaller( const css::uno::Reference<css::uno::XInterface>& rInterface );
- void SetCallerFromObjectShell( SfxObjectShell* pSh );
+ void SetCallerFromObjectShell( const SfxObjectShell* pSh );
bool ValidParamCount() { return bValidCount;}
ScAddInArgumentType GetArgType( long nPos );
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index e8c0092e14dc..607a9a824691 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -317,7 +317,7 @@ public:
resulting reference is fully valid or not.
*/
SC_DLLPUBLIC ScRefFlags Parse(
- const OUString&, ScDocument* = nullptr,
+ const OUString&, const ScDocument* = nullptr,
const Details& rDetails = detailsOOOa1,
ExternalInfo* pExtInfo = nullptr,
const css::uno::Sequence<css::sheet::ExternalLinkInfo>* pExternalLinks = nullptr,
@@ -340,7 +340,7 @@ public:
The document for the maximum defined sheet number.
*/
SC_DLLPUBLIC SAL_WARN_UNUSED_RESULT bool Move( SCCOL nDeltaX, SCROW nDeltaY, SCTAB nDeltaZ,
- ScAddress& rErrorPos, ScDocument* pDocument = nullptr );
+ ScAddress& rErrorPos, const ScDocument* pDocument = nullptr );
inline bool operator==( const ScAddress& rAddress ) const;
inline bool operator!=( const ScAddress& rAddress ) const;
@@ -537,7 +537,7 @@ public:
inline bool In( const ScAddress& ) const; ///< is Address& in Range?
inline bool In( const ScRange& ) const; ///< is Range& in Range?
- SC_DLLPUBLIC ScRefFlags Parse( const OUString&, ScDocument* = nullptr,
+ SC_DLLPUBLIC ScRefFlags Parse( const OUString&, const ScDocument* = nullptr,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1,
ScAddress::ExternalInfo* pExtInfo = nullptr,
const css::uno::Sequence<css::sheet::ExternalLinkInfo>* pExternalLinks = nullptr,
@@ -615,7 +615,7 @@ public:
The document for the maximum defined sheet number.
*/
SC_DLLPUBLIC SAL_WARN_UNUSED_RESULT bool Move( SCCOL aDeltaX, SCROW aDeltaY, SCTAB aDeltaZ,
- ScRange& rErrorRange, ScDocument* pDocument = nullptr );
+ ScRange& rErrorRange, const ScDocument* pDocument = nullptr );
/** Same as Move() but with sticky end col/row anchors. */
SC_DLLPUBLIC SAL_WARN_UNUSED_RESULT bool MoveSticky( SCCOL aDeltaX, SCROW aDeltaY, SCTAB aDeltaZ,
@@ -850,7 +850,7 @@ public:
inline bool operator == ( const ScRefAddress& r ) const;
- OUString GetRefString( ScDocument* pDocument, SCTAB nActTab,
+ OUString GetRefString( const ScDocument* pDocument, SCTAB nActTab,
const ScAddress::Details& rDetails = ScAddress::detailsOOOa1) const;
};
diff --git a/sc/inc/autoform.hxx b/sc/inc/autoform.hxx
index 8d36511a1c3c..bb9b886f3e44 100644
--- a/sc/inc/autoform.hxx
+++ b/sc/inc/autoform.hxx
@@ -297,7 +297,7 @@ public:
bool IsEqualData( sal_uInt16 nIndex1, sal_uInt16 nIndex2 ) const;
- void FillToItemSet( sal_uInt16 nIndex, SfxItemSet& rItemSet, ScDocument& rDoc ) const;
+ void FillToItemSet( sal_uInt16 nIndex, SfxItemSet& rItemSet, const ScDocument& rDoc ) const;
void GetFromItemSet( sal_uInt16 nIndex, const SfxItemSet& rItemSet, const ScNumFormatAbbrev& rNumFormat );
bool Load( SvStream& rStream, const ScAfVersions& rVersions );
diff --git a/sc/inc/charthelper.hxx b/sc/inc/charthelper.hxx
index 000e6af6e110..9e7689e87fcf 100644
--- a/sc/inc/charthelper.hxx
+++ b/sc/inc/charthelper.hxx
@@ -40,16 +40,16 @@ public:
static sal_uInt16 DoUpdateAllCharts( ScDocument* pDoc );
static void AdjustRangesOfChartsOnDestinationPage( 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( SdrObject* pObject );
+ static css::uno::Reference< css::chart2::XChartDocument > GetChartFromSdrObject( const SdrObject* pObject );
static void GetChartRanges( const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc,
std::vector< OUString >& rRanges );
static void SetChartRanges( const css::uno::Reference< css::chart2::XChartDocument >& xChartDoc,
const css::uno::Sequence< OUString >& rRanges );
- static void AddRangesIfProtectedChart( ScRangeListVector& rRangesVector, ScDocument* pDocument, SdrObject* pObject );
- static void FillProtectedChartRangesVector( ScRangeListVector& rRangesVector, ScDocument* pDocument, SdrPage* pPage );
- static void GetChartNames( ::std::vector< OUString >& rChartNames, SdrPage* pPage );
- static void CreateProtectedChartListenersAndNotify( ScDocument* pDoc, SdrPage* pPage, ScModelObj* pModelObj, SCTAB nTab,
+ static void AddRangesIfProtectedChart( ScRangeListVector& rRangesVector, const ScDocument* pDocument, SdrObject* pObject );
+ static void FillProtectedChartRangesVector( ScRangeListVector& rRangesVector, 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/chgtrack.hxx b/sc/inc/chgtrack.hxx
index b389029fb9bf..c1bc13f20ae1 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -250,7 +250,7 @@ protected:
virtual ~ScChangeAction();
OUString GetRefString(
- const ScBigRange& rRange, ScDocument* pDoc, bool bFlag3D = false) const;
+ const ScBigRange& rRange, const ScDocument* pDoc, bool bFlag3D = false) const;
void SetActionNumber( sal_uLong n ) { nAction = n; }
void SetRejectAction( sal_uLong n ) { nRejectAction = n; }
@@ -723,11 +723,11 @@ public:
const sal_uLong nRejectingNumber, const ScBigRange& aBigRange,
const OUString& aUser, const DateTime& aDateTime,
const OUString &sComment, const ScCellValue& rOldCell,
- ScDocument* pDoc, const OUString& sOldValue ); // to use for XML Import
+ const ScDocument* pDoc, const OUString& sOldValue ); // to use for XML Import
ScChangeActionContent(
const sal_uLong nActionNumber, const ScCellValue& rNewCell,
- const ScBigRange& aBigRange, ScDocument* pDoc,
+ const ScBigRange& aBigRange, const ScDocument* pDoc,
const OUString& sNewValue ); // to use for XML Import of Generated Actions
virtual ~ScChangeActionContent() override;
@@ -754,12 +754,12 @@ public:
// Used in import filter AppendContentOnTheFly,
void SetOldNewCells(
const ScCellValue& rOldCell, sal_uLong nOldFormat,
- const ScCellValue& rNewCell, sal_uLong nNewFormat, ScDocument* pDoc );
+ const ScCellValue& rNewCell, sal_uLong nNewFormat, const ScDocument* pDoc );
// Use this only in the XML import,
// takes ownership of cell.
void SetNewCell(
- const ScCellValue& rCell, ScDocument* pDoc, const OUString& rFormatted );
+ const ScCellValue& rCell, const ScDocument* pDoc, const OUString& rFormatted );
// These functions should be protected but for
// the XML import they are public.
@@ -956,7 +956,7 @@ class ScChangeTrack : public utl::ConfigurationListener
// Content on top an Position
ScChangeActionContent* SearchContentAt( const ScBigAddress&,
- ScChangeAction* pButNotThis ) const;
+ const ScChangeAction* pButNotThis ) const;
void DeleteGeneratedDelContent(
ScChangeActionContent* );
@@ -965,7 +965,7 @@ class ScChangeTrack : public utl::ConfigurationListener
void DeleteCellEntries(
ScChangeActionCellListEntry*&,
- ScChangeAction* pDeletor );
+ const ScChangeAction* pDeletor );
// Reject action and all dependent actions,
// Table stems from previous GetDependents,
@@ -1045,7 +1045,7 @@ public:
// after new value was set in the document,
// old value from RefDoc/UndoDoc
void AppendContent( const ScAddress& rPos,
- ScDocument* pRefDoc );
+ const ScDocument* pRefDoc );
// after new values were set in the document,
// old values from RefDoc/UndoDoc
void AppendContentRange( const ScRange& rRange,
@@ -1110,7 +1110,7 @@ public:
// adjust references for MergeDocument
//! may only be used in a temporary opened document.
//! the Track (?) is unclean afterwards
- void MergePrepare( ScChangeAction* pFirstMerge, bool bShared );
+ void MergePrepare( const ScChangeAction* pFirstMerge, bool bShared );
void MergeOwn( ScChangeAction* pAct, sal_uLong nFirstMerge, bool bShared );
static bool MergeIgnore( const ScChangeAction&, sal_uLong nFirstMerge );
diff --git a/sc/inc/compare.hxx b/sc/inc/compare.hxx
index 6ab6527764d3..d67ba0027112 100644
--- a/sc/inc/compare.hxx
+++ b/sc/inc/compare.hxx
@@ -55,7 +55,7 @@ struct CompareOptions
utl::SearchParam::SearchType eSearchType;
bool bMatchWholeCell;
- CompareOptions( ScDocument* pDoc, const ScQueryEntry& rEntry, utl::SearchParam::SearchType eSrchTyp );
+ CompareOptions( const ScDocument* pDoc, const ScQueryEntry& rEntry, utl::SearchParam::SearchType eSrchTyp );
private:
CompareOptions( const CompareOptions & ) = delete;
CompareOptions& operator=( const CompareOptions & ) = delete;
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index 78c51264c41c..8a3a496ec2c1 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( ScTokenArray& rArr, ScDocument* pDoc, const ScAddress& rPos,
+ static void MoveRelWrap( const ScTokenArray& rArr, 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/dociter.hxx b/sc/inc/dociter.hxx
index 2bbb90f31edd..544e64ebc9c1 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -109,7 +109,7 @@ public:
private:
static const sc::CellStoreType* GetColumnCellStore(ScDocument& rDoc, SCTAB nTab, SCCOL nCol);
static const ScAttrArray* GetAttrArrayByCol(ScDocument& rDoc, SCTAB nTab, SCCOL nCol);
- static bool IsQueryValid(ScDocument& rDoc, const ScQueryParam& rParam, SCTAB nTab, SCROW nRow, ScRefCellValue* pCell);
+ static bool IsQueryValid(ScDocument& rDoc, const ScQueryParam& rParam, SCTAB nTab, SCROW nRow, const ScRefCellValue* pCell);
class DataAccess
{
diff --git a/sc/inc/docpool.hxx b/sc/inc/docpool.hxx
index a62a03f296ac..bcdb6d197163 100644
--- a/sc/inc/docpool.hxx
+++ b/sc/inc/docpool.hxx
@@ -44,7 +44,7 @@ public:
virtual const SfxPoolItem& Put( const SfxPoolItem&, sal_uInt16 nWhich = 0 ) override;
void StyleDeleted( const ScStyleSheet* pStyle ); // delete templates(?) in organizer
- void CellStyleCreated( const OUString& rName, ScDocument* pDoc );
+ void CellStyleCreated( const OUString& rName, const ScDocument* pDoc );
virtual bool GetPresentation( const SfxPoolItem& rItem,
MapUnit ePresentationMetric,
OUString& rText,
diff --git a/sc/inc/olinetab.hxx b/sc/inc/olinetab.hxx
index 8f4d73d98c61..7fc76e99838f 100644
--- a/sc/inc/olinetab.hxx
+++ b/sc/inc/olinetab.hxx
@@ -136,7 +136,7 @@ public:
bool ManualAction(
SCCOLROW nStartPos, SCCOLROW nEndPos, bool bShow, const ScTable& rTable, bool bCol);
- void finalizeImport(ScTable& rTable);
+ void finalizeImport(const ScTable& rTable);
void RemoveAll();
};
diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx
index 422fa5b7615f..4dddfd6739dd 100644
--- a/sc/inc/patattr.hxx
+++ b/sc/inc/patattr.hxx
@@ -85,7 +85,7 @@ public:
/** Static helper function to fill a font object from the passed item set. */
static void GetFont( vcl::Font& rFont, const SfxItemSet& rItemSet,
ScAutoFontColorMode eAutoMode,
- OutputDevice* pOutDev = nullptr,
+ const OutputDevice* pOutDev = nullptr,
const Fraction* pScale = nullptr,
const SfxItemSet* pCondSet = nullptr,
SvtScriptType nScript = SvtScriptType::NONE, const Color* pBackConfigColor = nullptr,
@@ -94,11 +94,12 @@ public:
static ScDxfFont GetDxfFont(const SfxItemSet& rSet, SvtScriptType nScript);
/** Fills a font object from the own item set. */
void GetFont( vcl::Font& rFont, ScAutoFontColorMode eAutoMode,
- OutputDevice* pOutDev = nullptr,
- const Fraction* pScale = nullptr,
- const SfxItemSet* pCondSet = nullptr,
- SvtScriptType nScript = SvtScriptType::NONE, const Color* pBackConfigColor = nullptr,
- const Color* pTextConfigColor = nullptr ) const;
+ const OutputDevice* pOutDev = nullptr,
+ const Fraction* pScale = nullptr,
+ const SfxItemSet* pCondSet = nullptr,
+ SvtScriptType nScript = SvtScriptType::NONE,
+ const Color* pBackConfigColor = nullptr,
+ const Color* pTextConfigColor = nullptr ) const;
/** Converts all Calc items contained in rSrcSet to edit engine items and puts them into rEditSet. */
static void FillToEditItemSet( SfxItemSet& rEditSet, const SfxItemSet& rSrcSet, const SfxItemSet* pCondSet = nullptr );
@@ -117,7 +118,7 @@ public:
void SetStyleSheet(ScStyleSheet* pNewStyle, bool bClearDirectFormat = true);
const ScStyleSheet* GetStyleSheet() const { return pStyle; }
const OUString* GetStyleName() const;
- void UpdateStyleSheet(ScDocument* pDoc);
+ void UpdateStyleSheet(const ScDocument* pDoc);
void StyleToName();
bool IsVisible() const;
diff --git a/sc/inc/stlpool.hxx b/sc/inc/stlpool.hxx
index 7d75031fe2cd..1c5d40d5f542 100644
--- a/sc/inc/stlpool.hxx
+++ b/sc/inc/stlpool.hxx
@@ -29,7 +29,7 @@ class ScDocument;
class SC_DLLPUBLIC ScStyleSheetPool : public SfxStyleSheetPool
{
public:
- ScStyleSheetPool( SfxItemPool& rPool,
+ ScStyleSheetPool( const SfxItemPool& rPool,
ScDocument* pDocument );
void SetDocument( ScDocument* pDocument );
diff --git a/sc/inc/stlsheet.hxx b/sc/inc/stlsheet.hxx
index b8309aa64df1..e47b4cf96924 100644
--- a/sc/inc/stlsheet.hxx
+++ b/sc/inc/stlsheet.hxx
@@ -64,7 +64,7 @@ protected:
virtual ~ScStyleSheet() override;
ScStyleSheet( const OUString& rName,
- ScStyleSheetPool& rPool,
+ const ScStyleSheetPool& rPool,
SfxStyleFamily eFamily,
sal_uInt16 nMask );
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 94f45581c503..d64bc90b4f3b 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -852,9 +852,9 @@ public:
bool ColHidden(SCCOL nCol, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
bool SetRowHidden(SCROW nStartRow, SCROW nEndRow, bool bHidden);
void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, bool bHidden);
- void CopyColHidden(ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol);
- void CopyRowHidden(ScTable& rTable, SCROW nStartRow, SCROW nEndRow);
- void CopyRowHeight(ScTable& rSrcTable, SCROW nStartRow, SCROW nEndRow, SCROW nSrcOffset);
+ void CopyColHidden(const ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol);
+ void CopyRowHidden(const ScTable& rTable, SCROW nStartRow, SCROW nEndRow);
+ void CopyRowHeight(const ScTable& rSrcTable, SCROW nStartRow, SCROW nEndRow, SCROW nSrcOffset);
SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow) const;
SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow) const;
SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow) const;
@@ -865,8 +865,8 @@ public:
bool RowFiltered(SCROW nRow, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
bool ColFiltered(SCCOL nCol, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow) const;
- void CopyColFiltered(ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol);
- void CopyRowFiltered(ScTable& rTable, SCROW nStartRow, SCROW nEndRow);
+ void CopyColFiltered(const ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol);
+ void CopyRowFiltered(const ScTable& rTable, SCROW nStartRow, SCROW nEndRow);
void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, bool bFiltered);
void SetColFiltered(SCCOL nStartCol, SCCOL nEndCol, bool bFiltered);
SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow) const;
@@ -890,10 +890,10 @@ public:
void Reorder( const sc::ReorderParam& rParam );
bool ValidQuery(
- SCROW nRow, const ScQueryParam& rQueryParam, ScRefCellValue* pCell = nullptr,
+ SCROW nRow, const ScQueryParam& rQueryParam, const ScRefCellValue* pCell = nullptr,
bool* pbTestEqualCondition = nullptr);
void TopTenQuery( ScQueryParam& );
- SCSIZE Query(ScQueryParam& rQueryParam, bool bKeepSub);
+ SCSIZE Query(const ScQueryParam& rQueryParam, bool bKeepSub);
bool CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam);
void GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, std::vector<ScTypedStrData>& rStrings, bool& rHasDates);
@@ -1032,7 +1032,7 @@ private:
ScProgress* pProgress, sal_uLong& rProgress );
void FillSeriesSimple(
- ScCellValue& rSrcCell, SCCOLROW& rInner, SCCOLROW nIMin, SCCOLROW nIMax,
+ const ScCellValue& rSrcCell, SCCOLROW& rInner, SCCOLROW nIMin, SCCOLROW nIMax,
SCCOLROW& rCol, SCCOLROW& rRow, bool bVertical, ScProgress* pProgress, sal_uLong& rProgress );
void FillAutoSimple(
@@ -1110,7 +1110,7 @@ private:
const ScSortParam& rSortParam, SCCOLROW nInd1, SCCOLROW nInd2,
bool bKeepQuery, bool bUpdateRefs );
void QuickSort( ScSortInfoArray*, SCCOLROW nLo, SCCOLROW nHi);
- void SortReorderByColumn( ScSortInfoArray* pArray, SCROW nRow1, SCROW nRow2, bool bPattern, ScProgress* pProgress );
+ void SortReorderByColumn( const ScSortInfoArray* pArray, SCROW nRow1, SCROW nRow2, bool bPattern, ScProgress* pProgress );
void SortReorderByRow( ScSortInfoArray* pArray, SCCOL nCol1, SCCOL nCol2, ScProgress* pProgress );
void SortReorderByRowRefUpdate( ScSortInfoArray* pArray, SCCOL nCol1, SCCOL nCol2, ScProgress* pProgress );
@@ -1119,13 +1119,13 @@ private:
bool CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam);
void GetUpperCellString(SCCOL nCol, SCROW nRow, OUString& rStr);
- bool RefVisible(ScFormulaCell* pCell);
+ bool RefVisible(const ScFormulaCell* pCell);
bool IsEmptyLine(SCROW nRow, SCCOL nStartCol, SCCOL nEndCol) const;
void IncDate(double& rVal, sal_uInt16& nDayOfMonth, double nStep, FillDateCmd eCmd);
void FillFormula(
- ScFormulaCell* pSrcCell, SCCOL nDestCol, SCROW nDestRow, bool bLast );
+ const ScFormulaCell* pSrcCell, SCCOL nDestCol, SCROW nDestRow, bool bLast );
void UpdateInsertTabAbs(SCTAB nNewPos);
bool GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, bool bInSel,
const ScMarkData& rMark) const;
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 1aa2a1c3e2d3..274081beaf73 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -327,7 +327,7 @@ const ScAttrArray* ScDBQueryDataIterator::GetAttrArrayByCol(ScDocument& rDoc, SC
}
bool ScDBQueryDataIterator::IsQueryValid(
- ScDocument& rDoc, const ScQueryParam& rParam, SCTAB nTab, SCROW nRow, ScRefCellValue* pCell)
+ ScDocument& rDoc, const ScQueryParam& rParam, SCTAB nTab, SCROW nRow, const ScRefCellValue* pCell)
{
if (nTab >= rDoc.GetTableCount())
OSL_FAIL("try to access index out of bounds, FIX IT");
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 707919fa6549..461e16d2cd21 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -365,7 +365,7 @@ void ScDocumentPool::StyleDeleted( const ScStyleSheet* pStyle )
}
}
-void ScDocumentPool::CellStyleCreated( const OUString& rName, ScDocument* pDoc )
+void ScDocumentPool::CellStyleCreated( const OUString& rName, const ScDocument* pDoc )
{
// If a style was created, don't keep any pattern with its name string in the pool,
// because it would compare equal to a pattern with a pointer to the new style.
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 95cbf6b0c1d1..6bd695c00018 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -1412,7 +1412,7 @@ void ScDocument::Reorder( const sc::ReorderParam& rParam )
SCSIZE ScDocument::Query(SCTAB nTab, const ScQueryParam& rQueryParam, bool bKeepSub)
{
if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
- return maTabs[nTab]->Query(const_cast<ScQueryParam&>(rQueryParam), bKeepSub);
+ return maTabs[nTab]->Query(rQueryParam, bKeepSub);
OSL_FAIL("missing tab");
return 0;
diff --git a/sc/source/core/data/grouptokenconverter.cxx b/sc/source/core/data/grouptokenconverter.cxx
index 4e37ffe7b236..f32632d7adab 100644
--- a/sc/source/core/data/grouptokenconverter.cxx
+++ b/sc/source/core/data/grouptokenconverter.cxx
@@ -92,7 +92,7 @@ ScGroupTokenConverter::ScGroupTokenConverter(
{
}
-bool ScGroupTokenConverter::convert( ScTokenArray& rCode, sc::FormulaLogger::GroupScope& rScope )
+bool ScGroupTokenConverter::convert( const ScTokenArray& rCode, sc::FormulaLogger::GroupScope& rScope )
{
#if 0
{ // debug to start with:
diff --git a/sc/source/core/data/olinetab.cxx b/sc/source/core/data/olinetab.cxx
index c8932758e531..808969dcf9c5 100644
--- a/sc/source/core/data/olinetab.cxx
+++ b/sc/source/core/data/olinetab.cxx
@@ -769,7 +769,7 @@ void ScOutlineArray::RemoveAll()
nDepth = 0;
}
-void ScOutlineArray::finalizeImport(ScTable& rTable)
+void ScOutlineArray::finalizeImport(const ScTable& rTable)
{
ScSubOutlineIterator aIter( this );
ScOutlineEntry* pEntry;
diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index 57c21c07ad1b..11cb935f89a1 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -203,7 +203,7 @@ sal_uInt16& nFontId, sal_uInt16& nHeightId, sal_uInt16& nWeightId, sal_uInt16& n
void ScPatternAttr::GetFont(
vcl::Font& rFont, const SfxItemSet& rItemSet, ScAutoFontColorMode eAutoMode,
- OutputDevice* pOutDev, const Fraction* pScale,
+ const OutputDevice* pOutDev, const Fraction* pScale,
const SfxItemSet* pCondSet, SvtScriptType nScript,
const Color* pBackConfigColor, const Color* pTextConfigColor )
{
@@ -445,7 +445,7 @@ void ScPatternAttr::GetFont(
void ScPatternAttr::GetFont(
vcl::Font& rFont, ScAutoFontColorMode eAutoMode,
- OutputDevice* pOutDev, const Fraction* pScale,
+ const OutputDevice* pOutDev, const Fraction* pScale,
const SfxItemSet* pCondSet, SvtScriptType nScript,
const Color* pBackConfigColor, const Color* pTextConfigColor ) const
{
@@ -1195,7 +1195,7 @@ void ScPatternAttr::SetStyleSheet( ScStyleSheet* pNewStyle, bool bClearDirectFor
}
}
-void ScPatternAttr::UpdateStyleSheet(ScDocument* pDoc)
+void ScPatternAttr::UpdateStyleSheet(const ScDocument* pDoc)
{
if (pName)
{
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index ec88cb534bac..1e23c082b1d8 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -162,7 +162,7 @@ public:
/** Create a new caption. The caption will not be inserted into the document. */
explicit ScCaptionCreator( ScDocument& rDoc, const ScAddress& rPos, bool bTailFront );
/** Manipulate an existing caption. */
- explicit ScCaptionCreator( ScDocument& rDoc, const ScAddress& rPos, ScCaptionPtr& xCaption );
+ explicit ScCaptionCreator( ScDocument& rDoc, const ScAddress& rPos, const ScCaptionPtr& xCaption );
/** Returns the drawing layer page of the sheet contained in maPos. */
SdrPage* GetDrawPage();
@@ -208,7 +208,7 @@ ScCaptionCreator::ScCaptionCreator( ScDocument& rDoc, const ScAddress& rPos, boo
CreateCaption( true/*bShown*/, bTailFront );
}
-ScCaptionCreator::ScCaptionCreator( ScDocument& rDoc, const ScAddress& rPos, ScCaptionPtr& xCaption ) :
+ScCaptionCreator::ScCaptionCreator( ScDocument& rDoc, const ScAddress& rPos, const ScCaptionPtr& xCaption ) :
mrDoc( rDoc ),
maPos( rPos ),
mxCaption( xCaption )
@@ -401,7 +401,7 @@ public:
/** Create a new caption object and inserts it into the document. */
explicit ScNoteCaptionCreator( ScDocument& rDoc, const ScAddress& rPos, ScNoteData& rNoteData );
/** Manipulate an existing caption. */
- explicit ScNoteCaptionCreator( ScDocument& rDoc, const ScAddress& rPos, ScCaptionPtr& xCaption, bool bShown );
+ explicit ScNoteCaptionCreator( ScDocument& rDoc, const ScAddress& rPos, const ScCaptionPtr& xCaption, bool bShown );
};
ScNoteCaptionCreator::ScNoteCaptionCreator( ScDocument& rDoc, const ScAddress& rPos, ScNoteData& rNoteData ) :
@@ -425,7 +425,7 @@ ScNoteCaptionCreator::ScNoteCaptionCreator( ScDocument& rDoc, const ScAddress& r
}
}
-ScNoteCaptionCreator::ScNoteCaptionCreator( ScDocument& rDoc, const ScAddress& rPos, ScCaptionPtr& xCaption, bool bShown ) :
+ScNoteCaptionCreator::ScNoteCaptionCreator( ScDocument& rDoc, const ScAddress& rPos, const ScCaptionPtr& xCaption, bool bShown ) :
ScCaptionCreator( rDoc, rPos, xCaption )
{
SdrPage* pDrawPage = GetDrawPage();
diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index f4f70c76e7f5..40b9133b0392 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -56,7 +56,7 @@
#include "editutil.hxx"
#include "patattr.hxx"
-ScStyleSheetPool::ScStyleSheetPool( SfxItemPool& rPoolP,
+ScStyleSheetPool::ScStyleSheetPool( const SfxItemPool& rPoolP,
ScDocument* pDocument )
: SfxStyleSheetPool( rPoolP ),
pActualStyleSheet( nullptr ),
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index 44bcacd17c2d..aaf778229d09 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -46,7 +46,7 @@
#define HFDIST_CM 142
ScStyleSheet::ScStyleSheet( const OUString& rName,
- ScStyleSheetPool& rPoolP,
+ const ScStyleSheetPool& rPoolP,
SfxStyleFamily eFamily,
sal_uInt16 nMaskP )
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index c52cb945452f..ad1a50ee3828 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -60,7 +60,7 @@ using ::std::vector;
namespace {
ScProgress* GetProgressBar(
- SCSIZE nCount, SCSIZE nTotalCount, ScProgress* pOuterProgress, ScDocument* pDoc)
+ SCSIZE nCount, SCSIZE nTotalCount, ScProgress* pOuterProgress, const ScDocument* pDoc)
{
if (nTotalCount < 1000)
{
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index f26084a36b03..b42959a46403 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -3671,7 +3671,7 @@ void ScTable::CopyData( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW n
}
}
-bool ScTable::RefVisible(ScFormulaCell* pCell)
+bool ScTable::RefVisible(const ScFormulaCell* pCell)
{
ScRange aRef;
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 6b9a7006ae30..39eff62a2d87 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -414,7 +414,7 @@ public:
namespace {
void initDataRows(
- ScSortInfoArray& rArray, ScTable& rTab, ScColContainer& rCols,
+ ScSortInfoArray& rArray, const ScTable& rTab, ScColContainer& rCols,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
bool bPattern, bool bHiddenFiltered )
{
@@ -696,7 +696,7 @@ class FormulaGroupPosCollector
public:
explicit FormulaGroupPosCollector( sc::RefQueryFormulaGroup& rQuery ) : mrQuery(rQuery) {}
- void operator() ( SvtListener* p )
+ void operator() ( const SvtListener* p )
{
p->Query(mrQuery);
}
@@ -902,7 +902,7 @@ public:
}
void ScTable::SortReorderByColumn(
- ScSortInfoArray* pArray, SCROW nRow1, SCROW nRow2, bool bPattern, ScProgress* pProgress )
+ const ScSortInfoArray* pArray, SCROW nRow1, SCROW nRow2, bool bPattern, ScProgress* pProgress )
{
SCCOLROW nStart = pArray->GetStart();
SCCOLROW nLast = pArray->GetLast();
@@ -2322,7 +2322,7 @@ public:
bool isQueryByString(
const ScQueryEntry& rEntry, const ScQueryEntry::Item& rItem,
- SCCOL nCol, SCROW nRow, ScRefCellValue& rCell)
+ SCCOL nCol, SCROW nRow, const ScRefCellValue& rCell)
{
if (isTextMatchOp(rEntry))
return true;
@@ -2654,7 +2654,7 @@ public:
}
bool ScTable::ValidQuery(
- SCROW nRow, const ScQueryParam& rParam, ScRefCellValue* pCell, bool* pbTestEqualCondition)
+ SCROW nRow, const ScQueryParam& rParam, const ScRefCellValue* pCell, bool* pbTestEqualCondition)
{
if (!rParam.GetEntry(0).bDoQuery)
return true;
@@ -2958,7 +2958,7 @@ void lcl_PrepareQuery( const ScDocument* pDoc, ScTable* pTab, ScQueryParam& rPar
}
-SCSIZE ScTable::Query(ScQueryParam& rParamOrg, bool bKeepSub)
+SCSIZE ScTable::Query(const ScQueryParam& rParamOrg, bool bKeepSub)
{
ScQueryParam aParam( rParamOrg );
typedef std::unordered_set<OUString, OUStringHash> StrSetType;
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index fb122318a1ff..39baf35e20f2 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -473,7 +473,7 @@ void ScTable::FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
}
void ScTable::FillFormula(
- ScFormulaCell* pSrcCell, SCCOL nDestCol, SCROW nDestRow, bool bLast )
+ const ScFormulaCell* pSrcCell, SCCOL nDestCol, SCROW nDestRow, bool bLast )
{
pDocument->SetNoListening( true ); // still the wrong reference
@@ -1165,7 +1165,7 @@ void ScTable::IncDate(double& rVal, sal_uInt16& nDayOfMonth, double nStep, FillD
namespace {
-bool HiddenRowColumn(ScTable* pTable, SCCOLROW nRowColumn, bool bVertical, SCCOLROW& rLastPos)
+bool HiddenRowColumn(const ScTable* pTable, SCCOLROW nRowColumn, bool bVertical, SCCOLROW& rLastPos)
{
bool bHidden = false;
if(bVertical)
@@ -1252,7 +1252,7 @@ void ScTable::FillFormulaVertical(
}
void ScTable::FillSeriesSimple(
- ScCellValue& rSrcCell, SCCOLROW& rInner, SCCOLROW nIMin, SCCOLROW nIMax,
+ const ScCellValue& rSrcCell, SCCOLROW& rInner, SCCOLROW nIMin, SCCOLROW nIMax,
SCCOLROW& rCol, SCCOLROW& rRow, bool bVertical, ScProgress* pProgress, sal_uLong& rProgress )
{
bool bHidden = false;
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index c1ef2c796fd6..f64e2dc865f1 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -617,7 +617,7 @@ void ScTable::SetColHidden(SCCOL nStartCol, SCCOL nEndCol, bool bHidden)
}
}
-void ScTable::CopyColHidden(ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol)
+void ScTable::CopyColHidden(const ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol)
{
SCCOL nCol = nStartCol;
while (nCol <= nEndCol)
@@ -632,7 +632,7 @@ void ScTable::CopyColHidden(ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol)
}
}
-void ScTable::CopyRowHidden(ScTable& rTable, SCROW nStartRow, SCROW nEndRow)
+void ScTable::CopyRowHidden(const ScTable& rTable, SCROW nStartRow, SCROW nEndRow)
{
SCROW nRow = nStartRow;
while (nRow <= nEndRow)
@@ -646,7 +646,7 @@ void ScTable::CopyRowHidden(ScTable& rTable, SCROW nStartRow, SCROW nEndRow)
}
}
-void ScTable::CopyRowHeight(ScTable& rSrcTable, SCROW nStartRow, SCROW nEndRow, SCROW nSrcOffset)
+void ScTable::CopyRowHeight(const ScTable& rSrcTable, SCROW nStartRow, SCROW nEndRow, SCROW nSrcOffset)
{
SCROW nRow = nStartRow;
ScFlatUInt16RowSegments::RangeData aSrcData;
@@ -830,7 +830,7 @@ bool ScTable::HasFilteredRows(SCROW nStartRow, SCROW nEndRow) const
return false;
}
-void ScTable::CopyColFiltered(ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol)
+void ScTable::CopyColFiltered(const ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol)
{
SCCOL nCol = nStartCol;
while (nCol <= nEndCol)
@@ -845,7 +845,7 @@ void ScTable::CopyColFiltered(ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol)
}
}
-void ScTable::CopyRowFiltered(ScTable& rTable, SCROW nStartRow, SCROW nEndRow)
+void ScTable::CopyRowFiltered(const ScTable& rTable, SCROW nStartRow, SCROW nEndRow)
{
SCROW nRow = nStartRow;
while (nRow <= nEndRow)
@@ -949,7 +949,7 @@ bool ScTable::IsManualRowHeight(SCROW nRow) const
namespace {
-void lcl_syncFlags(ScFlatBoolColSegments& rColSegments, ScFlatBoolRowSegments& rRowSegments,
+void lcl_syncFlags(ScFlatBoolColSegments& rColSegments, const ScFlatBoolRowSegments& rRowSegments,
CRFlags* pColFlags, ScBitMaskCompressedArray< SCROW, CRFlags>* pRowFlags, const CRFlags nFlagMask)
{
using ::sal::static_int_cast;
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 4c4383405e63..79d77f73f8c8 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -555,7 +555,7 @@ namespace {
class ScStringTokenIterator
{
public:
- explicit ScStringTokenIterator( ScTokenArray& rTokArr ) :
+ explicit ScStringTokenIterator( const ScTokenArray& rTokArr ) :
maIter( rTokArr ), mbSkipEmpty( true ), mbOk( true ) {}
/** Returns the string of the first string token or NULL on error or empty token array. */
@@ -601,7 +601,7 @@ rtl_uString* ScStringTokenIterator::Next()
}
/** Returns the number format of the passed cell, or the standard format. */
-sal_uLong lclGetCellFormat( ScDocument& rDoc, const ScAddress& rPos )
+sal_uLong lclGetCellFormat( const ScDocument& rDoc, const ScAddress& rPos )
{
const ScPatternAttr* pPattern = rDoc.GetPattern( rPos.Col(), rPos.Row(), rPos.Tab() );
if( !pPattern )
diff --git a/sc/source/core/inc/grouptokenconverter.hxx b/sc/source/core/inc/grouptokenconverter.hxx
index e9782d4ae665..c2bb268abc5d 100644
--- a/sc/source/core/inc/grouptokenconverter.hxx
+++ b/sc/source/core/inc/grouptokenconverter.hxx
@@ -32,7 +32,7 @@ class SC_DLLPUBLIC ScGroupTokenConverter
public:
ScGroupTokenConverter(ScTokenArray& rGroupTokens, ScDocument& rDoc, ScFormulaCell& rCell, const ScAddress& rPos);
- bool convert( ScTokenArray& rCode, sc::FormulaLogger::GroupScope& rScope );
+ bool convert( const ScTokenArray& rCode, sc::FormulaLogger::GroupScope& rScope );
};
#endif // INCLUDED_SC_SOURCE_CORE_INC_GROUPTOKENCONVERTER_HXX
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index ab75dd31687c..d5eb4cf23eeb 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -957,7 +957,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>&
}
}
-static void lcl_UpdateFunctionList( ScFunctionList& rFunctionList, const ScUnoAddInFuncData& rFuncData )
+static void lcl_UpdateFunctionList( const ScFunctionList& rFunctionList, const ScUnoAddInFuncData& rFuncData )
{
const OUString& aCompare = rFuncData.GetUpperLocal(); // as used in FillFunctionDescFromData
@@ -1352,7 +1352,7 @@ void ScUnoAddInCall::SetCaller( const uno::Reference<uno::XInterface>& rInterfac
xCaller = rInterface;
}
-void ScUnoAddInCall::SetCallerFromObjectShell( SfxObjectShell* pObjSh )
+void ScUnoAddInCall::SetCallerFromObjectShell( const SfxObjectShell* pObjSh )
{
if (pObjSh)
{
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 4dc6b2305bf8..853f400074aa 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -214,7 +214,7 @@ static bool lcl_ScRange_External_TabSpan(
const OUString & rExternDocName,
const OUString & rStartTabName,
const OUString & rEndTabName,
- ScDocument* pDoc )
+ const ScDocument* pDoc )
{
if (rExternDocName.isEmpty())
return !pExtInfo || !pExtInfo->mbExternal;
@@ -745,7 +745,7 @@ static inline const sal_Unicode* lcl_r1c1_get_row(
static ScRefFlags lcl_ScRange_Parse_XL_R1C1( ScRange& r,
const sal_Unicode* p,
- ScDocument* pDoc,
+ const ScDocument* pDoc,
const ScAddress::Details& rDetails,
bool bOnlyAcceptSingle,
ScAddress::ExternalInfo* pExtInfo,
@@ -967,7 +967,7 @@ static bool isValidSingleton( ScRefFlags nFlags, ScRefFlags nFlags2 )
static ScRefFlags lcl_ScRange_Parse_XL_A1( ScRange& r,
const sal_Unicode* p,
- ScDocument* pDoc,
+ const ScDocument* pDoc,
bool bOnlyAcceptSingle,
ScAddress::ExternalInfo* pExtInfo,
const uno::Sequence<sheet::ExternalLinkInfo>* pExternalLinks,
@@ -1130,7 +1130,7 @@ static ScRefFlags lcl_ScRange_Parse_XL_A1( ScRange& r,
used in conjunction with pExtInfo to determine the tab span
of a 3D reference.
*/
-static ScRefFlags lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAddr,
+static ScRefFlags lcl_ScAddress_Parse_OOo( const sal_Unicode* p, const ScDocument* pDoc, ScAddress& rAddr,
ScRefFlags& rRawRes,
ScAddress::ExternalInfo* pExtInfo,
ScRange* pRange,
@@ -1443,7 +1443,7 @@ static ScRefFlags lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDo
return nRes;
}
-static ScRefFlags lcl_ScAddress_Parse ( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAddr,
+static ScRefFlags lcl_ScAddress_Parse ( const sal_Unicode* p, const ScDocument* pDoc, ScAddress& rAddr,
const ScAddress::Details& rDetails,
ScAddress::ExternalInfo* pExtInfo,
const uno::Sequence<sheet::ExternalLinkInfo>* pExternalLinks,
@@ -1530,7 +1530,7 @@ bool ConvertDoubleRef( ScDocument* pDoc, const OUString& rRefString, SCTAB nDefT
return bRet;
}
-ScRefFlags ScAddress::Parse( const OUString& r, ScDocument* pDoc,
+ScRefFlags ScAddress::Parse( const OUString& r, const ScDocument* pDoc,
const Details& rDetails,
ExternalInfo* pExtInfo,
const uno::Sequence<sheet::ExternalLinkInfo>* pExternalLinks,
@@ -1604,7 +1604,7 @@ void ScRange::ExtendTo( const ScRange& rRange )
static ScRefFlags lcl_ScRange_Parse_OOo( ScRange& rRange,
const OUString& r,
- ScDocument* pDoc,
+ const ScDocument* pDoc,
ScAddress::ExternalInfo* pExtInfo,
const OUString* pErrRef )
{
@@ -1724,7 +1724,7 @@ static ScRefFlags lcl_ScRange_Parse_OOo( ScRange& rRange,
return nRes1;
}
-ScRefFlags ScRange::Parse( const OUString& rString, ScDocument* pDoc,
+ScRefFlags ScRange::Parse( const OUString& rString, const ScDocument* pDoc,
const ScAddress::Details& rDetails,
ScAddress::ExternalInfo* pExtInfo,
const uno::Sequence<sheet::ExternalLinkInfo>* pExternalLinks,
@@ -2296,7 +2296,7 @@ OUString ScRange::Format( ScRefFlags nFlags, const ScDocument* pDoc,
return r.makeStringAndClear();
}
-bool ScAddress::Move( SCCOL dx, SCROW dy, SCTAB dz, ScAddress& rErrorPos, ScDocument* pDoc )
+bool ScAddress::Move( SCCOL dx, SCROW dy, SCTAB dz, ScAddress& rErrorPos, const ScDocument* pDoc )
{
SCTAB nMaxTab = pDoc ? pDoc->GetTableCount() : MAXTAB;
dx = Col() + dx;
@@ -2342,7 +2342,7 @@ bool ScAddress::Move( SCCOL dx, SCROW dy, SCTAB dz, ScAddress& rErrorPos, ScDocu
return bValid;
}
-bool ScRange::Move( SCCOL dx, SCROW dy, SCTAB dz, ScRange& rErrorRange, ScDocument* pDoc )
+bool ScRange::Move( SCCOL dx, SCROW dy, SCTAB dz, ScRange& rErrorRange, const ScDocument* pDoc )
{
if (dy && aStart.Row() == 0 && aEnd.Row() == MAXROW)
dy = 0; // Entire column not to be moved.
@@ -2445,7 +2445,7 @@ OUString ScAddress::GetColRowString() const
return aString.makeStringAndClear();
}
-OUString ScRefAddress::GetRefString( ScDocument* pDoc, SCTAB nActTab,
+OUString ScRefAddress::GetRefString( const ScDocument* pDoc, SCTAB nActTab,
const ScAddress::Details& rDetails ) const
{
if ( !pDoc )
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index e0a97f78e5bd..0a83470057a8 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -623,7 +623,7 @@ bool ScAutoFormatData::IsEqualData( sal_uInt16 nIndex1, sal_uInt16 nIndex2 ) con
return bEqual;
}
-void ScAutoFormatData::FillToItemSet( sal_uInt16 nIndex, SfxItemSet& rItemSet, ScDocument& rDoc ) const
+void ScAutoFormatData::FillToItemSet( sal_uInt16 nIndex, SfxItemSet& rItemSet, const ScDocument& rDoc ) const
{
const ScAutoFormatDataField& rField = GetField( nIndex );
diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx
index 5ccc1b1541d3..18e0e9e02467 100644
--- a/sc/source/core/tool/charthelper.cxx
+++ b/sc/source/core/tool/charthelper.cxx
@@ -186,14 +186,14 @@ void ScChartHelper::UpdateChartsOnDestinationPage( ScDocument* pDestDoc, const S
}
}
-uno::Reference< chart2::XChartDocument > ScChartHelper::GetChartFromSdrObject( SdrObject* pObject )
+uno::Reference< chart2::XChartDocument > ScChartHelper::GetChartFromSdrObject( const SdrObject* pObject )
{
uno::Reference< chart2::XChartDocument > xReturn;
if( pObject )
{
- if( pObject->GetObjIdentifier() == OBJ_OLE2 && static_cast<SdrOle2Obj*>(pObject)->IsChart() )
+ if( pObject->GetObjIdentifier() == OBJ_OLE2 && static_cast<const SdrOle2Obj*>(pObject)->IsChart() )
{
- uno::Reference< embed::XEmbeddedObject > xIPObj = static_cast<SdrOle2Obj*>(pObject)->GetObjRef();
+ uno::Reference< embed::XEmbeddedObject > xIPObj = static_cast<const SdrOle2Obj*>(pObject)->GetObjRef();
if( xIPObj.is() )
{
svt::EmbeddedObjectRef::TryRunningState( xIPObj );
@@ -295,7 +295,7 @@ void ScChartHelper::SetChartRanges( const uno::Reference< chart2::XChartDocument
xModel->unlockControllers();
}
-void ScChartHelper::AddRangesIfProtectedChart( ScRangeListVector& rRangesVector, ScDocument* pDocument, SdrObject* pObject )
+void ScChartHelper::AddRangesIfProtectedChart( ScRangeListVector& rRangesVector, const ScDocument* pDocument, SdrObject* pObject )
{
if ( pDocument && pObject && ( pObject->GetObjIdentifier() == OBJ_OLE2 ) )
{
@@ -337,7 +337,7 @@ void ScChartHelper::AddRangesIfProtectedChart( ScRangeListVector& rRangesVector,
}
}
-void ScChartHelper::FillProtectedChartRangesVector( ScRangeListVector& rRangesVector, ScDocument* pDocument, SdrPage* pPage )
+void ScChartHelper::FillProtectedChartRangesVector( ScRangeListVector& rRangesVector, ScDocument* pDocument, const SdrPage* pPage )
{
if ( pDocument && pPage )
{
@@ -351,7 +351,7 @@ void ScChartHelper::FillProtectedChartRangesVector( ScRangeListVector& rRangesVe
}
}
-void ScChartHelper::GetChartNames( ::std::vector< OUString >& rChartNames, SdrPage* pPage )
+void ScChartHelper::GetChartNames( ::std::vector< OUString >& rChartNames, const SdrPage* pPage )
{
if ( pPage )
{
@@ -372,7 +372,7 @@ void ScChartHelper::GetChartNames( ::std::vector< OUString >& rChartNames, SdrPa
}
}
-void ScChartHelper::CreateProtectedChartListenersAndNotify( ScDocument* pDoc, SdrPage* pPage, ScModelObj* pModelObj, SCTAB nTab,
+void ScChartHelper::CreateProtectedChartListenersAndNotify( ScDocument* pDoc, const SdrPage* pPage, ScModelObj* pModelObj, SCTAB nTab,
const ScRangeListVector& rRangesVector, const ::std::vector< OUString >& rExcludedChartNames, bool bSameDoc )
{
if ( pDoc && pPage && pModelObj )
diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx
index 6ca9cc9af5d1..f744e4634fbc 100644
--- a/sc/source/core/tool/chartpos.cxx
+++ b/sc/source/core/tool/chartpos.cxx
@@ -26,7 +26,7 @@
namespace
{
- bool lcl_hasValueDataButNoDates( ScDocument* pDocument, SCCOL nCol, SCROW nRow, SCTAB nTab )
+ bool lcl_hasValueDataButNoDates( const ScDocument* pDocument, SCCOL nCol, SCROW nRow, SCTAB nTab )
{
bool bReturn = false;
if (pDocument->HasValueData( nCol, nRow, nTab ))
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index dcf95153c636..a85481261088 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -500,7 +500,7 @@ void ScChangeAction::GetDescription(
}
OUString ScChangeAction::GetRefString(
- const ScBigRange& rRange, ScDocument* pDoc, bool bFlag3D ) const
+ const ScBigRange& rRange, const ScDocument* pDoc, bool bFlag3D ) const
{
OUStringBuffer aBuf;
ScRefFlags nFlags = ( rRange.IsValid( pDoc ) ? ScRefFlags::VALID : ScRefFlags::ZERO );
@@ -1299,7 +1299,7 @@ ScChangeActionContent::ScChangeActionContent( const sal_uLong nActionNumber,
const ScChangeActionState eStateP, const sal_uLong nRejectingNumber,
const ScBigRange& aBigRangeP, const OUString& aUserP,
const DateTime& aDateTimeP, const OUString& sComment,
- const ScCellValue& rOldCell, ScDocument* pDoc, const OUString& sOldValue ) :
+ const ScCellValue& rOldCell, const ScDocument* pDoc, const OUString& sOldValue ) :
ScChangeAction(SC_CAT_CONTENT, aBigRangeP, nActionNumber, nRejectingNumber, eStateP, aDateTimeP, aUserP, sComment),
maOldCell(rOldCell),
maOldValue(sOldValue),
@@ -1317,7 +1317,7 @@ ScChangeActionContent::ScChangeActionContent( const sal_uLong nActionNumber,
ScChangeActionContent::ScChangeActionContent( const sal_uLong nActionNumber,
const ScCellValue& rNewCell, const ScBigRange& aBigRangeP,
- ScDocument* pDoc, const OUString& sNewValue ) :
+ const ScDocument* pDoc, const OUString& sNewValue ) :
ScChangeAction(SC_CAT_CONTENT, aBigRangeP, nActionNumber),
maNewCell(rNewCell),
maNewValue(sNewValue),
@@ -1392,7 +1392,7 @@ void ScChangeActionContent::SetNewValue( const ScCellValue& rCell, ScDocument* p
void ScChangeActionContent::SetOldNewCells(
const ScCellValue& rOldCell, sal_uLong nOldFormat, const ScCellValue& rNewCell,
- sal_uLong nNewFormat, ScDocument* pDoc )
+ sal_uLong nNewFormat, const ScDocument* pDoc )
{
maOldCell = rOldCell;
maNewCell = rNewCell;
@@ -1401,7 +1401,7 @@ void ScChangeActionContent::SetOldNewCells(
}
void ScChangeActionContent::SetNewCell(
- const ScCellValue& rCell, ScDocument* pDoc, const OUString& rFormatted )
+ const ScCellValue& rCell, const ScDocument* pDoc, const OUString& rFormatted )
{
maNewCell = rCell;
SetCell(maNewValue, maNewCell, 0, pDoc);
@@ -2661,7 +2661,7 @@ void ScChangeTrack::AppendContent(
}
void ScChangeTrack::AppendContent( const ScAddress& rPos,
- ScDocument* pRefDoc )
+ const ScDocument* pRefDoc )
{
OUString aOldValue;
ScCellValue aOldCell;
@@ -2846,7 +2846,7 @@ void ScChangeTrack::AppendInsert( const ScRange& rRange, bool bEndOfList )
}
void ScChangeTrack::DeleteCellEntries( ScChangeActionCellListEntry*& pCellList,
- ScChangeAction* pDeletor )
+ const ScChangeAction* pDeletor )
{
ScChangeActionCellListEntry* pE = pCellList;
while ( pE )
@@ -2900,7 +2900,7 @@ void ScChangeTrack::DeleteGeneratedDelContent( ScChangeActionContent* pContent )
}
ScChangeActionContent* ScChangeTrack::SearchContentAt(
- const ScBigAddress& rPos, ScChangeAction* pButNotThis ) const
+ const ScBigAddress& rPos, const ScChangeAction* pButNotThis ) const
{
SCSIZE nSlot = ComputeContentSlot( rPos.Row() );
for ( ScChangeActionContent* p = ppContentSlots[nSlot]; p;
@@ -3227,7 +3227,7 @@ bool ScChangeTrack::MergeIgnore( const ScChangeAction& rAction, sal_uLong nFirst
return false; // Everything else
}
-void ScChangeTrack::MergePrepare( ScChangeAction* pFirstMerge, bool bShared )
+void ScChangeTrack::MergePrepare( const ScChangeAction* pFirstMerge, bool bShared )
{
SetMergeState( SC_CTMS_PREPARE );
sal_uLong nFirstMerge = pFirstMerge->GetActionNumber();
@@ -4712,7 +4712,7 @@ void ScChangeTrack::MergeActionState( ScChangeAction* pAct, const ScChangeAction
}
/// Get info about a single ScChangeAction element.
-static void lcl_getTrackedChange(ScDocument* pDoc, int nIndex, ScChangeAction* pAction, boost::property_tree::ptree& rRedlines)
+static void lcl_getTrackedChange(ScDocument* pDoc, int nIndex, const ScChangeAction* pAction, boost::property_tree::ptree& rRedlines)
{
if (pAction->GetType() == SC_CAT_CONTENT)
{
diff --git a/sc/source/core/tool/compare.cxx b/sc/source/core/tool/compare.cxx
index bbc5bba66418..c1ac68492053 100644
--- a/sc/source/core/tool/compare.cxx
+++ b/sc/source/core/tool/compare.cxx
@@ -32,7 +32,7 @@ Compare::Cell::Cell() :
Compare::Compare() :
meOp(SC_EQUAL), mbIgnoreCase(true) {}
-CompareOptions::CompareOptions( ScDocument* pDoc, const ScQueryEntry& rEntry, utl::SearchParam::SearchType eSrchTyp ) :
+CompareOptions::CompareOptions( const ScDocument* pDoc, const ScQueryEntry& rEntry, utl::SearchParam::SearchType eSrchTyp ) :
aQueryEntry(rEntry),
eSearchType(eSrchTyp),
bMatchWholeCell(pDoc->GetDocOptions().IsMatchWholeCell())
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index ee2bd8034a17..b96a169a7d3d 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( ScTokenArray& rArr, ScDocument* pDoc, const ScAddress& rPos,
+void ScCompiler::MoveRelWrap( const ScTokenArray& rArr, ScDocument* pDoc, const ScAddress& rPos,
SCCOL nMaxCol, SCROW nMaxRow )
{
for ( auto t: rArr.References() )
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index 5a8b069924d6..d6c8053ef9ec 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -451,11 +451,11 @@ bool ScRangeStringConverter::GetAddressFromString(
GetTokenByOffset( sToken, rAddressStr, nOffset, cSeparator, cQuote );
if( nOffset >= 0 )
{
- if ((rAddress.Parse( sToken, const_cast<ScDocument*>(pDocument), eConv ) & ScRefFlags::VALID) == ScRefFlags::VALID)
+ if ((rAddress.Parse( sToken, pDocument, eConv ) & ScRefFlags::VALID) == ScRefFlags::VALID)
return true;
::formula::FormulaGrammar::AddressConvention eConvUI = pDocument->GetAddressConvention();
if (eConv != eConvUI)
- return ((rAddress.Parse(sToken, const_cast<ScDocument*>(pDocument), eConvUI) & ScRefFlags::VALID) == ScRefFlags::VALID);
+ return ((rAddress.Parse(sToken, pDocument, eConvUI) & ScRefFlags::VALID) == ScRefFlags::VALID);
}
return false;
}
@@ -481,11 +481,11 @@ bool ScRangeStringConverter::GetRangeFromString(
{
if ( aUIString[0] == '.' )
aUIString = aUIString.copy( 1 );
- bResult = (rRange.aStart.Parse( aUIString, const_cast<ScDocument*> (pDocument), eConv) & ScRefFlags::VALID) ==
+ bResult = (rRange.aStart.Parse( aUIString, pDocument, eConv) & ScRefFlags::VALID) ==
ScRefFlags::VALID;
::formula::FormulaGrammar::AddressConvention eConvUI = pDocument->GetAddressConvention();
if (!bResult && eConv != eConvUI)
- bResult = (rRange.aStart.Parse(aUIString, const_cast<ScDocument*>(pDocument), eConvUI) & ScRefFlags::VALID) ==
+ bResult = (rRange.aStart.Parse(aUIString, pDocument, eConvUI) & ScRefFlags::VALID) ==
ScRefFlags::VALID;
rRange.aEnd = rRange.aStart;
}
@@ -501,26 +501,26 @@ bool ScRangeStringConverter::GetRangeFromString(
aUIString[ nIndex + 1 ] == '.' )
aUIString = aUIString.replaceAt( nIndex + 1, 1, "" );
- bResult = ((rRange.Parse(aUIString, const_cast<ScDocument*> (pDocument), eConv) & ScRefFlags::VALID) ==
+ bResult = ((rRange.Parse(aUIString, pDocument, eConv) & ScRefFlags::VALID) ==
ScRefFlags::VALID);
// #i77703# chart ranges in the file format contain both sheet names, even for an external reference sheet.
// This isn't parsed by ScRange, so try to parse the two Addresses then.
if (!bResult)
{
- bResult = ((rRange.aStart.Parse( aUIString.copy(0, nIndex), const_cast<ScDocument*>(pDocument), eConv)
+ bResult = ((rRange.aStart.Parse( aUIString.copy(0, nIndex), pDocument, eConv)
& ScRefFlags::VALID) == ScRefFlags::VALID)
&&
- ((rRange.aEnd.Parse( aUIString.copy(nIndex+1), const_cast<ScDocument*>(pDocument), eConv)
+ ((rRange.aEnd.Parse( aUIString.copy(nIndex+1), pDocument, eConv)
& ScRefFlags::VALID) == ScRefFlags::VALID);
::formula::FormulaGrammar::AddressConvention eConvUI = pDocument->GetAddressConvention();
if (!bResult && eConv != eConvUI)
{
- bResult = ((rRange.aStart.Parse( aUIString.copy(0, nIndex), const_cast<ScDocument*>(pDocument), eConvUI)
+ bResult = ((rRange.aStart.Parse( aUIString.copy(0, nIndex), pDocument, eConvUI)
& ScRefFlags::VALID) == ScRefFlags::VALID)
&&
- ((rRange.aEnd.Parse( aUIString.copy(nIndex+1), const_cast<ScDocument*>(pDocument), eConvUI)
+ ((rRange.aEnd.Parse( aUIString.copy(nIndex+1), pDocument, eConvUI)
& ScRefFlags::VALID) == ScRefFlags::VALID);
}
}
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx
index 1254223c29a3..93a7e4394d48 100644
--- a/sc/source/ui/docshell/docsh3.cxx
+++ b/sc/source/ui/docshell/docsh3.cxx
@@ -833,7 +833,7 @@ void ScDocShell::MergeDocument( ScDocument& rOtherDoc, bool bShared, bool bCheck
sal_uLong nLastMergeAction = pSourceTrack->GetLast()->GetActionNumber();
// UpdateReference-Undo, valid references for the last common state
- pSourceTrack->MergePrepare( const_cast<ScChangeAction*>(pFirstMergeAction), bShared );
+ pSourceTrack->MergePrepare( pFirstMergeAction, bShared );
// adjust MergeChangeData to all yet following actions in this document
// -> references valid for this document