summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-25 13:31:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-09-26 10:15:00 +0200
commitbdc8fda4be875ff9cfa9c3f4b5e40284a8637374 (patch)
tree67eb55dcd1e9649e074e49ca0dd069920a2ae866 /sc
parentb11268fadf76618ad37d27219b7f51255f8f8b5a (diff)
loplugin:constmethod in sc
Change-Id: I78c4fb4acf21756f91582caee5e30e3ad1fc2ae4 Reviewed-on: https://gerrit.libreoffice.org/79543 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/cellform.hxx2
-rw-r--r--sc/inc/cellsuno.hxx2
-rw-r--r--sc/inc/chart2uno.hxx2
-rw-r--r--sc/inc/compiler.hxx4
-rw-r--r--sc/inc/dapiuno.hxx10
-rw-r--r--sc/inc/dociter.hxx6
-rw-r--r--sc/inc/document.hxx24
-rw-r--r--sc/inc/dpoutput.hxx2
-rw-r--r--sc/inc/dptabsrc.hxx2
-rw-r--r--sc/inc/fonthelper.hxx2
-rw-r--r--sc/inc/formulacell.hxx4
-rw-r--r--sc/inc/progress.hxx2
-rw-r--r--sc/inc/rangelst.hxx2
-rw-r--r--sc/inc/recursionhelper.hxx4
-rw-r--r--sc/inc/scmod.hxx4
-rw-r--r--sc/inc/simpleformulacalc.hxx2
-rw-r--r--sc/inc/stlpool.hxx2
-rw-r--r--sc/inc/table.hxx2
-rw-r--r--sc/inc/userdat.hxx4
-rw-r--r--sc/inc/xmlwrap.hxx2
-rw-r--r--sc/qa/extras/scpdfexport.cxx6
-rw-r--r--sc/source/core/data/column.cxx8
-rw-r--r--sc/source/core/data/column2.cxx2
-rw-r--r--sc/source/core/data/column3.cxx2
-rw-r--r--sc/source/core/data/dociter.cxx2
-rw-r--r--sc/source/core/data/documen6.cxx4
-rw-r--r--sc/source/core/data/documen9.cxx2
-rw-r--r--sc/source/core/data/dpoutput.cxx2
-rw-r--r--sc/source/core/data/dptabsrc.cxx2
-rw-r--r--sc/source/core/data/formulacell.cxx2
-rw-r--r--sc/source/core/data/postit.cxx4
-rw-r--r--sc/source/core/data/simpleformulacalc.cxx2
-rw-r--r--sc/source/core/data/table2.cxx2
-rw-r--r--sc/source/core/inc/bcaslot.hxx2
-rw-r--r--sc/source/core/inc/interpre.hxx4
-rw-r--r--sc/source/core/tool/cellform.cxx2
-rw-r--r--sc/source/core/tool/interpr3.cxx4
-rw-r--r--sc/source/core/tool/interpr4.cxx2
-rw-r--r--sc/source/core/tool/interpr8.cxx2
-rw-r--r--sc/source/core/tool/rangelst.cxx2
-rw-r--r--sc/source/filter/excel/xehelper.cxx2
-rw-r--r--sc/source/filter/excel/xltoolbar.cxx2
-rw-r--r--sc/source/filter/excel/xltoolbar.hxx2
-rw-r--r--sc/source/filter/inc/condformatbuffer.hxx6
-rw-r--r--sc/source/filter/inc/htmlexp.hxx2
-rw-r--r--sc/source/filter/inc/qpro.hxx4
-rw-r--r--sc/source/filter/inc/stylesbuffer.hxx2
-rw-r--r--sc/source/filter/inc/xehelper.hxx4
-rw-r--r--sc/source/filter/inc/xetable.hxx6
-rw-r--r--sc/source/filter/oox/condformatbuffer.cxx6
-rw-r--r--sc/source/filter/orcus/xmlcontext.cxx4
-rw-r--r--sc/source/filter/xml/XMLExportIterator.hxx2
-rw-r--r--sc/source/filter/xml/XMLExportSharedData.cxx2
-rw-r--r--sc/source/filter/xml/XMLExportSharedData.hxx2
-rw-r--r--sc/source/filter/xml/XMLTrackedChangesContext.cxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx4
-rw-r--r--sc/source/filter/xml/xmlexprt.hxx6
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx2
-rw-r--r--sc/source/filter/xml/xmlimprt.hxx4
-rw-r--r--sc/source/filter/xml/xmlsubti.cxx4
-rw-r--r--sc/source/filter/xml/xmlsubti.hxx4
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx2
-rw-r--r--sc/source/ui/Accessibility/AccessibleCell.cxx4
-rw-r--r--sc/source/ui/Accessibility/AccessibleCellBase.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewCell.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/RegressionDialog.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx6
-rw-r--r--sc/source/ui/app/scmod.cxx4
-rw-r--r--sc/source/ui/app/transobj.cxx4
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx4
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx2
-rw-r--r--sc/source/ui/dbgui/validate.cxx2
-rw-r--r--sc/source/ui/docshell/datastream.cxx2
-rw-r--r--sc/source/ui/docshell/docsh6.cxx2
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx4
-rw-r--r--sc/source/ui/drawfunc/drtxtob2.cxx2
-rw-r--r--sc/source/ui/inc/AccessibleCell.hxx4
-rw-r--r--sc/source/ui/inc/AccessibleCellBase.hxx6
-rw-r--r--sc/source/ui/inc/AccessiblePreviewCell.hxx2
-rw-r--r--sc/source/ui/inc/RegressionDialog.hxx2
-rw-r--r--sc/source/ui/inc/TableFillingAndNavigationTools.hxx2
-rw-r--r--sc/source/ui/inc/cellsh.hxx2
-rw-r--r--sc/source/ui/inc/conflictsdlg.hxx2
-rw-r--r--sc/source/ui/inc/docsh.hxx4
-rw-r--r--sc/source/ui/inc/drawsh.hxx4
-rw-r--r--sc/source/ui/inc/drtxtob.hxx2
-rw-r--r--sc/source/ui/inc/filtdlg.hxx2
-rw-r--r--sc/source/ui/inc/gridwin.hxx2
-rw-r--r--sc/source/ui/inc/inputwin.hxx14
-rw-r--r--sc/source/ui/inc/inscodlg.hxx2
-rw-r--r--sc/source/ui/inc/linkarea.hxx10
-rw-r--r--sc/source/ui/inc/mergecellsdialog.hxx2
-rw-r--r--sc/source/ui/inc/namemgrtable.hxx4
-rw-r--r--sc/source/ui/inc/navipi.hxx4
-rw-r--r--sc/source/ui/inc/output.hxx2
-rw-r--r--sc/source/ui/inc/prevwsh.hxx2
-rw-r--r--sc/source/ui/inc/printfun.hxx4
-rw-r--r--sc/source/ui/inc/select.hxx2
-rw-r--r--sc/source/ui/inc/tabview.hxx12
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx4
-rw-r--r--sc/source/ui/inc/transobj.hxx2
-rw-r--r--sc/source/ui/inc/validate.hxx6
-rw-r--r--sc/source/ui/inc/viewdata.hxx16
-rw-r--r--sc/source/ui/inc/xmlsourcedlg.hxx4
-rw-r--r--sc/source/ui/miscdlgs/conflictsdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/inscodlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/linkarea.cxx10
-rw-r--r--sc/source/ui/miscdlgs/mergecellsdialog.cxx2
-rw-r--r--sc/source/ui/namedlg/namemgrtable.cxx4
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx2
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx4
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx10
-rw-r--r--sc/source/ui/vba/vbachartobjects.cxx2
-rw-r--r--sc/source/ui/vba/vbachartobjects.hxx2
-rw-r--r--sc/source/ui/vba/vbacomment.cxx2
-rw-r--r--sc/source/ui/vba/vbacomment.hxx2
-rw-r--r--sc/source/ui/vba/vbainterior.cxx2
-rw-r--r--sc/source/ui/vba/vbainterior.hxx2
-rw-r--r--sc/source/ui/vba/vbanames.hxx2
-rw-r--r--sc/source/ui/vba/vbapagebreaks.cxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx14
-rw-r--r--sc/source/ui/vba/vbarange.hxx4
-rw-r--r--sc/source/ui/vba/vbawindow.cxx6
-rw-r--r--sc/source/ui/vba/vbawindow.hxx6
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx4
-rw-r--r--sc/source/ui/vba/vbaworksheet.hxx8
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx2
-rw-r--r--sc/source/ui/vba/vbaworksheets.hxx2
-rw-r--r--sc/source/ui/view/cellsh2.cxx2
-rw-r--r--sc/source/ui/view/cellsh4.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--sc/source/ui/view/output2.cxx6
-rw-r--r--sc/source/ui/view/prevwsh.cxx2
-rw-r--r--sc/source/ui/view/select.cxx2
-rw-r--r--sc/source/ui/view/tabview.cxx2
-rw-r--r--sc/source/ui/view/tabvwshh.cxx2
-rw-r--r--sc/source/ui/view/viewdata.cxx6
-rw-r--r--sc/source/ui/xmlsource/xmlsourcedlg.cxx4
140 files changed, 259 insertions, 259 deletions
diff --git a/sc/inc/cellform.hxx b/sc/inc/cellform.hxx
index 6a21b525defa..5d7de17f8344 100644
--- a/sc/inc/cellform.hxx
+++ b/sc/inc/cellform.hxx
@@ -48,7 +48,7 @@ public:
const ScDocument* pDoc );
static OUString GetOutputString(
- ScDocument& rDoc, const ScAddress& rPos, ScRefCellValue& rCell );
+ ScDocument& rDoc, const ScAddress& rPos, const ScRefCellValue& rCell );
};
#endif
diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index 4abc19c6b7d9..30d5d0038a6b 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -660,7 +660,7 @@ private:
double GetValue_Impl() const;
void SetValue_Impl(double fValue);
css::table::CellContentType GetContentType_Impl();
- sal_Int32 GetResultType_Impl();
+ sal_Int32 GetResultType_Impl() const;
protected:
virtual const SfxItemPropertyMap& GetItemPropertyMap() override;
diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx
index 91eaf12ff408..ae1226c30824 100644
--- a/sc/inc/chart2uno.hxx
+++ b/sc/inc/chart2uno.hxx
@@ -300,7 +300,7 @@ private:
virtual void notify(sal_uInt16 nFileId, ScExternalRefManager::LinkUpdateType eType) override;
void addFileId(sal_uInt16 nFileId);
- const std::unordered_set<sal_uInt16>& getAllFileIds() { return maFileIds;}
+ const std::unordered_set<sal_uInt16>& getAllFileIds() const { return maFileIds;}
private:
ScChart2DataSequence& mrParent;
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index fd039ad3b2bc..8be539a606f6 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -439,8 +439,8 @@ public:
void SetExtendedErrorDetection( ExtendedErrorDetection eVal ) { meExtendedErrorDetection = eVal; }
- bool IsCorrected() { return bCorrected; }
- const OUString& GetCorrectedFormula() { return aCorrectedFormula; }
+ bool IsCorrected() const { return bCorrected; }
+ const OUString& GetCorrectedFormula() const { return aCorrectedFormula; }
/**
* Tokenize formula expression string into an array of tokens.
diff --git a/sc/inc/dapiuno.hxx b/sc/inc/dapiuno.hxx
index 14842615dab6..cc5067171293 100644
--- a/sc/inc/dapiuno.hxx
+++ b/sc/inc/dapiuno.hxx
@@ -447,20 +447,20 @@ public:
void setSubtotals(const std::vector< ScGeneralFunction >& rFunctions);
void setCurrentPage(const OUString& sPage);
void setUseCurrentPage(bool bUse);
- const css::sheet::DataPilotFieldAutoShowInfo* getAutoShowInfo();
+ const css::sheet::DataPilotFieldAutoShowInfo* getAutoShowInfo() const;
void setAutoShowInfo(const css::sheet::DataPilotFieldAutoShowInfo* pInfo);
- const css::sheet::DataPilotFieldLayoutInfo* getLayoutInfo();
+ const css::sheet::DataPilotFieldLayoutInfo* getLayoutInfo() const;
void setLayoutInfo(const css::sheet::DataPilotFieldLayoutInfo* pInfo);
- const css::sheet::DataPilotFieldReference* getReference();
+ const css::sheet::DataPilotFieldReference* getReference() const;
void setReference(const css::sheet::DataPilotFieldReference* pInfo);
- const css::sheet::DataPilotFieldSortInfo* getSortInfo();
+ const css::sheet::DataPilotFieldSortInfo* getSortInfo() const;
void setSortInfo(const css::sheet::DataPilotFieldSortInfo* pInfo);
bool getShowEmpty() const;
void setShowEmpty(bool bShow);
bool getRepeatItemLabels() const;
void setRepeatItemLabels(bool bShow);
- bool hasGroupInfo();
+ bool hasGroupInfo() const;
css::sheet::DataPilotFieldGroupInfo getGroupInfo();
void setGroupInfo(const css::sheet::DataPilotFieldGroupInfo* pInfo);
diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index 7e293e4ac3ff..1f57be4856c7 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -234,7 +234,7 @@ public:
const ScAddress& GetPos() const { return maCurPos; }
CellType getType() const { return maCurCell.meType;}
- OUString getString();
+ OUString getString() const;
const EditTextObject* getEditText() const { return maCurCell.mpEditText;}
ScFormulaCell* getFormulaCell() { return maCurCell.mpFormula;}
const ScFormulaCell* getFormulaCell() const { return maCurCell.mpFormula;}
@@ -305,8 +305,8 @@ public:
// (bIsString)
bool GetFirst();
bool GetNext();
- SCCOL GetCol() { return nCol; }
- SCROW GetRow() { return nRow; }
+ SCCOL GetCol() const { return nCol; }
+ SCROW GetRow() const { return nRow; }
// increments all Entry.nField, if column
// changes, for ScInterpreter ScHLookup()
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index e23148c11420..9ac4bca15288 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -562,11 +562,11 @@ public:
bool IsCellInChangeTrack(const ScAddress &cell,Color *pColCellBorder);
void GetCellChangeTrackNote(const ScAddress &cell, OUString &strTrackText, bool &pbLeftEdge);
- bool IsEmbedFonts() { return mbEmbedFonts; }
- bool IsEmbedUsedFontsOnly() { return mbEmbedUsedFontsOnly; }
- bool IsEmbedFontScriptLatin() { return mbEmbedFontScriptLatin; }
- bool IsEmbedFontScriptAsian() { return mbEmbedFontScriptAsian; }
- bool IsEmbedFontScriptComplex() { return mbEmbedFontScriptComplex; }
+ bool IsEmbedFonts() const { return mbEmbedFonts; }
+ bool IsEmbedUsedFontsOnly() const { return mbEmbedUsedFontsOnly; }
+ bool IsEmbedFontScriptLatin() const { return mbEmbedFontScriptLatin; }
+ bool IsEmbedFontScriptAsian() const { return mbEmbedFontScriptAsian; }
+ bool IsEmbedFontScriptComplex() const { return mbEmbedFontScriptComplex; }
void SetEmbedFonts(bool bUse) { mbEmbedFonts = bUse; }
void SetEmbedUsedFontsOnly(bool bUse) { mbEmbedUsedFontsOnly = bUse; }
@@ -787,7 +787,7 @@ public:
*/
bool InsertNewRangeName( SCTAB nTab, const OUString& rName, const ScAddress& rPos, const OUString& rExpr );
- SCTAB GetMaxTableNumber() { return static_cast<SCTAB>(maTabs.size()) - 1; }
+ SCTAB GetMaxTableNumber() const { return static_cast<SCTAB>(maTabs.size()) - 1; }
ScRangePairList* GetColNameRanges() { return xColNameRanges.get(); }
ScRangePairList* GetRowNameRanges() { return xRowNameRanges.get(); }
@@ -1337,7 +1337,7 @@ public:
void SetForcedFormulaPending( bool bNew ) { bForcedFormulaPending = bNew; }
bool IsForcedFormulaPending() const { return bForcedFormulaPending; }
// if CalcFormulaTree() is currently running
- bool IsCalculatingFormulaTree() { return bCalculatingFormulaTree; }
+ bool IsCalculatingFormulaTree() const { return bCalculatingFormulaTree; }
/// If set, joining cells into shared formula groups will be delayed until reset again
/// (RegroupFormulaCells() will be called as needed).
void DelayFormulaGrouping( bool delay );
@@ -1715,10 +1715,10 @@ public:
SC_DLLPUBLIC SvtScriptType GetStringScriptType( const OUString& rString );
// pCell is an optimization, must point to rPos
SC_DLLPUBLIC SvtScriptType GetCellScriptType( const ScAddress& rPos, sal_uInt32 nNumberFormat,
- ScRefCellValue* pCell = nullptr );
+ const ScRefCellValue* pCell = nullptr );
// pCell is an optimization, must point to nCol,nRow,nTab
SC_DLLPUBLIC SvtScriptType GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab,
- ScRefCellValue* pCell = nullptr );
+ const ScRefCellValue* pCell = nullptr );
SvtScriptType GetRangeScriptType( sc::ColumnBlockPosition& rBlockPos, const ScAddress& rPos, SCROW nLength );
SvtScriptType GetRangeScriptType( const ScRangeList& rRanges );
@@ -2115,7 +2115,7 @@ public:
ScChangeViewSettings* GetChangeViewSettings() const { return pChangeViewSettings.get(); }
SC_DLLPUBLIC void SetChangeViewSettings(const ScChangeViewSettings& rNew);
- const std::shared_ptr<SvxForbiddenCharactersTable>& GetForbiddenCharacters();
+ const std::shared_ptr<SvxForbiddenCharactersTable>& GetForbiddenCharacters() const;
void SetForbiddenCharacters(const std::shared_ptr<SvxForbiddenCharactersTable>& rNew);
CharCompressType GetAsianCompression() const;
@@ -2261,7 +2261,7 @@ public:
bool IsFinalTrackFormulas() const { return mbFinalTrackFormulas; }
bool IsInFormulaTree( const ScFormulaCell* pCell ) const;
bool IsInFormulaTrack( const ScFormulaCell* pCell ) const;
- HardRecalcState GetHardRecalcState() { return eHardRecalcState; }
+ HardRecalcState GetHardRecalcState() const { return eHardRecalcState; }
void SetHardRecalcState( HardRecalcState eVal ) { eHardRecalcState = eVal; }
void StartAllListeners();
void StartNeededListeners();
@@ -2285,7 +2285,7 @@ public:
if ( nInterpretLevel )
nInterpretLevel--;
}
- sal_uInt16 GetMacroInterpretLevel() { return nMacroInterpretLevel; }
+ sal_uInt16 GetMacroInterpretLevel() const { return nMacroInterpretLevel; }
void IncMacroInterpretLevel()
{
assert(!IsThreadedGroupCalcInProgress());
diff --git a/sc/inc/dpoutput.hxx b/sc/inc/dpoutput.hxx
index 70a5517beb6e..5e1ca0b3e2de 100644
--- a/sc/inc/dpoutput.hxx
+++ b/sc/inc/dpoutput.hxx
@@ -108,7 +108,7 @@ public:
void Output(); //! Refresh?
ScRange GetOutputRange( sal_Int32 nRegionType = css::sheet::DataPilotOutputRangeType::WHOLE );
- long GetHeaderRows();
+ long GetHeaderRows() const;
bool HasError(); // range overflow or exception from source
void GetPositionData(const ScAddress& rPos, css::sheet::DataPilotTablePositionData& rPosData);
diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx
index 4c222f13edc1..c175600c9cd6 100644
--- a/sc/inc/dptabsrc.hxx
+++ b/sc/inc/dptabsrc.hxx
@@ -152,7 +152,7 @@ public:
void SetOrientation(long nColumn, css::sheet::DataPilotFieldOrientation nNew);
long GetPosition(long nColumn);
- long GetDataDimensionCount();
+ long GetDataDimensionCount() const;
ScDPDimension* GetDataDimension(long nIndex);
OUString GetDataDimName(long nIndex);
const ScDPCache* GetCache();
diff --git a/sc/inc/fonthelper.hxx b/sc/inc/fonthelper.hxx
index 36d589554e77..abc2bf5a508a 100644
--- a/sc/inc/fonthelper.hxx
+++ b/sc/inc/fonthelper.hxx
@@ -36,7 +36,7 @@ struct SC_DLLPUBLIC ScDxfFont
boost::optional<Color> aColor;
boost::optional<LanguageType> eLang;
- bool isEmpty()
+ bool isEmpty() const
{
return !(pFontAttr || nFontHeight ||
eWeight || eItalic || eUnder ||
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index 93c18cabcee7..fe421508ea18 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -336,7 +336,7 @@ public:
void GetResultDimensions( SCSIZE& rCols, SCSIZE& rRows );
sc::MatrixEdge GetMatrixEdge( ScAddress& rOrgPos ) const;
FormulaError GetErrCode(); // interpret first if necessary
- FormulaError GetRawError(); // don't interpret, just return code or result error
+ FormulaError GetRawError() const; // don't interpret, just return code or result error
bool GetErrorOrValue( FormulaError& rErr, double& rVal );
sc::FormulaResultValue GetResult();
sc::FormulaResultValue GetResult() const;
@@ -482,7 +482,7 @@ public:
bool IsPostponedDirty() const { return mbPostponedDirty;}
void SetIsExtRef() { mbIsExtRef = true; }
- bool GetSeenInPath() { return mbSeenInPath; }
+ bool GetSeenInPath() const { return mbSeenInPath; }
void SetSeenInPath(bool bSet) { mbSeenInPath = bSet; }
#if DUMP_COLUMN_STORAGE
diff --git a/sc/inc/progress.hxx b/sc/inc/progress.hxx
index 7df88df6328c..c7e1e0c8311e 100644
--- a/sc/inc/progress.hxx
+++ b/sc/inc/progress.hxx
@@ -107,7 +107,7 @@ public:
nGlobalRange) > nGlobalPercent )
SetStateCountDown( nVal );
}
- sal_uLong GetState()
+ sal_uLong GetState() const
{
if ( pProgress )
return pProgress->GetState();
diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx
index 06e866ca769e..15493becf88b 100644
--- a/sc/inc/rangelst.hxx
+++ b/sc/inc/rangelst.hxx
@@ -45,7 +45,7 @@ public:
formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO,
SCTAB nDefaultTab = 0, sal_Unicode cDelimiter = 0 );
- void Format( OUString&, ScRefFlags nFlags, ScDocument*,
+ void Format( OUString&, ScRefFlags nFlags, const ScDocument*,
formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_OOO,
sal_Unicode cDelimiter = 0, bool bFullAddressNotation = false ) const;
diff --git a/sc/inc/recursionhelper.hxx b/sc/inc/recursionhelper.hxx
index d91ee0cfbe58..2a72be7b9d76 100644
--- a/sc/inc/recursionhelper.hxx
+++ b/sc/inc/recursionhelper.hxx
@@ -70,7 +70,7 @@ public:
sal_uInt16 GetRecursionCount() const { return nRecursionCount; }
void IncRecursionCount() { ++nRecursionCount; }
void DecRecursionCount() { --nRecursionCount; }
- sal_uInt16 GetDepComputeLevel() { return nDependencyComputationLevel; }
+ sal_uInt16 GetDepComputeLevel() const { return nDependencyComputationLevel; }
void IncDepComputeLevel() { ++nDependencyComputationLevel; }
void DecDepComputeLevel() { --nDependencyComputationLevel; }
/// A pure recursion return, no iteration.
@@ -92,7 +92,7 @@ public:
void IncIteration();
void EndIteration();
- const ScFormulaRecursionList::iterator& GetLastIterationStart() { return aLastIterationStart; }
+ const ScFormulaRecursionList::iterator& GetLastIterationStart() const { return aLastIterationStart; }
ScFormulaRecursionList::iterator GetIterationStart();
ScFormulaRecursionList::iterator GetIterationEnd();
/** Any return, recursion or iteration, iteration is always coupled with
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index bfb4ffbb84ce..1f8c0919f773 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -243,8 +243,8 @@ public:
bool IsInSharedDocSaving() const { return m_bIsInSharedDocSaving; }
SC_DLLPUBLIC void RegisterRefController(sal_uInt16 nSlotId, std::shared_ptr<SfxDialogController>& rWnd, weld::Window* pWndAncestor);
- SC_DLLPUBLIC void UnregisterRefController(sal_uInt16 nSlotId, std::shared_ptr<SfxDialogController>& rWnd);
- SC_DLLPUBLIC std::shared_ptr<SfxDialogController> Find1RefWindow(sal_uInt16 nSlotId, weld::Window *pWndAncestor);
+ SC_DLLPUBLIC void UnregisterRefController(sal_uInt16 nSlotId, const std::shared_ptr<SfxDialogController>& rWnd);
+ SC_DLLPUBLIC std::shared_ptr<SfxDialogController> Find1RefWindow(sal_uInt16 nSlotId, const weld::Window *pWndAncestor);
SC_DLLPUBLIC void RegisterAutomationApplicationEventsCaller(css::uno::Reference< ooo::vba::XSinkCaller > const& xCaller);
SC_DLLPUBLIC void CallAutomationApplicationEventSinks(const OUString& Method, css::uno::Sequence< css::uno::Any >& Arguments);
diff --git a/sc/inc/simpleformulacalc.hxx b/sc/inc/simpleformulacalc.hxx
index e7f61b5ddbe1..b75ab892340e 100644
--- a/sc/inc/simpleformulacalc.hxx
+++ b/sc/inc/simpleformulacalc.hxx
@@ -49,7 +49,7 @@ public:
svl::SharedString GetString();
SvNumFormatType GetFormatType() const { return mnFormatType; }
- bool HasColRowName();
+ bool HasColRowName() const;
ScTokenArray* GetCode();
diff --git a/sc/inc/stlpool.hxx b/sc/inc/stlpool.hxx
index b9c00aaa049c..1b8e975d5d3b 100644
--- a/sc/inc/stlpool.hxx
+++ b/sc/inc/stlpool.hxx
@@ -49,7 +49,7 @@ public:
void CopyStyleFrom( ScStyleSheetPool* pSrcPool,
const OUString& rName, SfxStyleFamily eFamily );
- bool HasStandardStyles() { return bHasStandardStyles; }
+ bool HasStandardStyles() const { return bHasStandardStyles; }
ScStyleSheet* FindCaseIns( const OUString& rName, SfxStyleFamily eFam );
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 7d28afcf102d..b3ea9016725e 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -545,7 +545,7 @@ public:
SCCOL nDestCol, SCROW nDestRow, SCTAB nDestTab );
void CopyScenarioFrom( const ScTable* pSrcTab );
- void CopyScenarioTo( ScTable* pDestTab ) const;
+ void CopyScenarioTo( const ScTable* pDestTab ) const;
bool TestCopyScenarioTo( const ScTable* pDestTab ) const;
void MarkScenarioIn(ScMarkData& rMark, ScScenarioFlags nNeededBits) const;
bool HasScenarioRange( const ScRange& rRange ) const;
diff --git a/sc/inc/userdat.hxx b/sc/inc/userdat.hxx
index e05662757193..769f19bd62cd 100644
--- a/sc/inc/userdat.hxx
+++ b/sc/inc/userdat.hxx
@@ -45,8 +45,8 @@ public:
explicit ScDrawObjData();
- const tools::Rectangle & getShapeRect() { return maShapeRect; };
- const tools::Rectangle & getLastCellRect() { return maLastCellRect; };
+ const tools::Rectangle & getShapeRect() const { return maShapeRect; };
+ const tools::Rectangle & getLastCellRect() const { return maLastCellRect; };
void setShapeRect(const ScDocument* rDoc, tools::Rectangle rNewRect, bool bIsVisible=true)
{
// bIsVisible should be false when the object is hidden obviously. we dont want to store the old cell rect in that
diff --git a/sc/inc/xmlwrap.hxx b/sc/inc/xmlwrap.hxx
index b03a6c249797..e2c8de28d6a9 100644
--- a/sc/inc/xmlwrap.hxx
+++ b/sc/inc/xmlwrap.hxx
@@ -63,7 +63,7 @@ class ScXMLImportWrapper
SfxMedium* pMedium;
css::uno::Reference< css::embed::XStorage > xStorage;
- css::uno::Reference< css::task::XStatusIndicator> GetStatusIndicator();
+ css::uno::Reference< css::task::XStatusIndicator> GetStatusIndicator() const;
ErrCode ImportFromComponent(const css::uno::Reference<css::uno::XComponentContext>& xContext,
const css::uno::Reference<css::frame::XModel>& xModel,
diff --git a/sc/qa/extras/scpdfexport.cxx b/sc/qa/extras/scpdfexport.cxx
index 4e471e48d0cb..f6a7ea8bfbd0 100644
--- a/sc/qa/extras/scpdfexport.cxx
+++ b/sc/qa/extras/scpdfexport.cxx
@@ -42,7 +42,7 @@ public:
// helpers
private:
- std::shared_ptr<utl::TempFile> exportToPDF(uno::Reference<frame::XModel>& xModel,
+ std::shared_ptr<utl::TempFile> exportToPDF(const uno::Reference<frame::XModel>& xModel,
const ScRange& range);
static bool hasTextInPdf(const std::shared_ptr<utl::TempFile>& pPDFFile, const char* sText,
@@ -142,8 +142,8 @@ bool ScPDFExportTest::hasTextInPdf(const std::shared_ptr<utl::TempFile>& pPDFFil
return (nRead == nFileSize);
}
-std::shared_ptr<utl::TempFile> ScPDFExportTest::exportToPDF(uno::Reference<frame::XModel>& xModel,
- const ScRange& range)
+std::shared_ptr<utl::TempFile>
+ScPDFExportTest::exportToPDF(const uno::Reference<frame::XModel>& xModel, const ScRange& range)
{
// create temp file name
std::shared_ptr<utl::TempFile> pTempFile(new utl::TempFile());
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 7bf3eb55d5e6..ce924354cd47 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -2591,7 +2591,7 @@ public:
mbModified = true;
}
- void operator() (size_t nRow, EditTextObject* pCell)
+ void operator() (size_t nRow, const EditTextObject* pCell)
{
editeng::FieldUpdater aUpdater = pCell->GetFieldUpdater();
aUpdater.updateTableFields(mnTab);
@@ -2623,7 +2623,7 @@ public:
mbModified = true;
}
- void operator() (size_t nRow, EditTextObject* pCell)
+ void operator() (size_t nRow, const EditTextObject* pCell)
{
editeng::FieldUpdater aUpdater = pCell->GetFieldUpdater();
aUpdater.updateTableFields(mnTab);
@@ -2655,7 +2655,7 @@ public:
mbModified = true;
}
- void operator() (size_t nRow, EditTextObject* pCell)
+ void operator() (size_t nRow, const EditTextObject* pCell)
{
editeng::FieldUpdater aUpdater = pCell->GetFieldUpdater();
aUpdater.updateTableFields(mnTab);
@@ -2687,7 +2687,7 @@ public:
mbModified = true;
}
- void operator() (size_t nRow, EditTextObject* pCell)
+ void operator() (size_t nRow, const EditTextObject* pCell)
{
editeng::FieldUpdater aUpdater = pCell->GetFieldUpdater();
aUpdater.updateTableFields(mnTab);
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index c904914adf6a..613107696561 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -579,7 +579,7 @@ class MaxStrLenFinder
OUString maMaxLenStr;
sal_Int32 mnMaxLen;
- void checkLength(ScRefCellValue& rCell)
+ void checkLength(const ScRefCellValue& rCell)
{
Color* pColor;
OUString aValStr;
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index b54912d658ab..7f2edb925d96 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -3128,7 +3128,7 @@ class MaxStringLenHandler
rtl_TextEncoding const meCharSet;
bool const mbOctetEncoding;
- void processCell(size_t nRow, ScRefCellValue& rCell)
+ void processCell(size_t nRow, const ScRefCellValue& rCell)
{
Color* pColor;
OUString aString;
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 55f00ef10d22..e88dbf0a12d8 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -977,7 +977,7 @@ bool ScCellIterator::getCurrent()
return false;
}
-OUString ScCellIterator::getString()
+OUString ScCellIterator::getString() const
{
return maCurCell.getString(mpDoc);
}
diff --git a/sc/source/core/data/documen6.cxx b/sc/source/core/data/documen6.cxx
index 9dd1f8b523a3..7845ef2c60f4 100644
--- a/sc/source/core/data/documen6.cxx
+++ b/sc/source/core/data/documen6.cxx
@@ -109,7 +109,7 @@ SvtScriptType ScDocument::GetStringScriptType( const OUString& rString )
}
SvtScriptType ScDocument::GetCellScriptType( const ScAddress& rPos, sal_uInt32 nNumberFormat,
- ScRefCellValue* pCell )
+ const ScRefCellValue* pCell )
{
SvtScriptType nStored = GetScriptType(rPos);
if ( nStored != SvtScriptType::UNKNOWN ) // stored value valid?
@@ -129,7 +129,7 @@ SvtScriptType ScDocument::GetCellScriptType( const ScAddress& rPos, sal_uInt32 n
return nRet;
}
-SvtScriptType ScDocument::GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, ScRefCellValue* pCell )
+SvtScriptType ScDocument::GetScriptType( SCCOL nCol, SCROW nRow, SCTAB nTab, const ScRefCellValue* pCell )
{
// if script type is set, don't have to get number formats
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index d873b820c31f..8e6ac0aaea77 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -608,7 +608,7 @@ void ScDocument::SetImportingXML( bool bVal )
SetLoadingMedium(bVal);
}
-const std::shared_ptr<SvxForbiddenCharactersTable>& ScDocument::GetForbiddenCharacters()
+const std::shared_ptr<SvxForbiddenCharactersTable>& ScDocument::GetForbiddenCharacters() const
{
return xForbiddenCharacters;
}
diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 2ea984303bbf..54c4a204dedb 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -1147,7 +1147,7 @@ bool ScDPOutput::HasError()
return bSizeOverflow || bResultsError;
}
-long ScDPOutput::GetHeaderRows()
+long ScDPOutput::GetHeaderRows() const
{
return pPageFields.size() + ( bDoFilter ? 1 : 0 );
}
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 870217cfa4ca..f656370a5686 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -132,7 +132,7 @@ sheet::DataPilotFieldOrientation ScDPSource::GetOrientation(long nColumn)
return sheet::DataPilotFieldOrientation_HIDDEN;
}
-long ScDPSource::GetDataDimensionCount()
+long ScDPSource::GetDataDimensionCount() const
{
return maDataDims.size();
}
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 5f5ab119cda6..628e5ac3a7ba 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2919,7 +2919,7 @@ FormulaError ScFormulaCell::GetErrCode()
return aResult.GetResultError();
}
-FormulaError ScFormulaCell::GetRawError()
+FormulaError ScFormulaCell::GetRawError() const
{
FormulaError nErr = pCode->GetCodeError();
if (nErr != FormulaError::NONE)
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 990440b7dbfa..95b8854803dc 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -74,7 +74,7 @@ public:
/** Stores the cell position of the note in the user data area of the caption. */
static void SetCaptionUserData( SdrCaptionObj& rCaption, const ScAddress& rPos );
/** Sets all default formatting attributes to the caption object. */
- static void SetDefaultItems( SdrCaptionObj& rCaption, ScDocument& rDoc, SfxItemSet* pExtraItemSet );
+ static void SetDefaultItems( SdrCaptionObj& rCaption, ScDocument& rDoc, const SfxItemSet* pExtraItemSet );
};
void ScCaptionUtil::SetCaptionLayer( SdrCaptionObj& rCaption, bool bShown )
@@ -100,7 +100,7 @@ void ScCaptionUtil::SetCaptionUserData( SdrCaptionObj& rCaption, const ScAddress
pObjData->meType = ScDrawObjData::CellNote;
}
-void ScCaptionUtil::SetDefaultItems( SdrCaptionObj& rCaption, ScDocument& rDoc, SfxItemSet* pExtraItemSet )
+void ScCaptionUtil::SetDefaultItems( SdrCaptionObj& rCaption, ScDocument& rDoc, const SfxItemSet* pExtraItemSet )
{
SfxItemSet aItemSet = rCaption.GetMergedItemSet();
diff --git a/sc/source/core/data/simpleformulacalc.cxx b/sc/source/core/data/simpleformulacalc.cxx
index d6080281525d..50fcfceb5927 100644
--- a/sc/source/core/data/simpleformulacalc.cxx
+++ b/sc/source/core/data/simpleformulacalc.cxx
@@ -134,7 +134,7 @@ svl::SharedString ScSimpleFormulaCalculator::GetString()
return svl::SharedString::getEmptyString();
}
-bool ScSimpleFormulaCalculator::HasColRowName()
+bool ScSimpleFormulaCalculator::HasColRowName() const
{
return formula::FormulaTokenArrayPlainIterator(*mpCode).GetNextColRowName() != nullptr;
}
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index e4d062f98e71..da2193a68160 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1365,7 +1365,7 @@ void ScTable::InvalidatePageBreaks()
mbPageBreaksValid = false;
}
-void ScTable::CopyScenarioTo( ScTable* pDestTab ) const
+void ScTable::CopyScenarioTo( const ScTable* pDestTab ) const
{
OSL_ENSURE( bScenario, "bScenario == FALSE" );
diff --git a/sc/source/core/inc/bcaslot.hxx b/sc/source/core/inc/bcaslot.hxx
index f8a74513bb5e..20322d5f4fc2 100644
--- a/sc/source/core/inc/bcaslot.hxx
+++ b/sc/source/core/inc/bcaslot.hxx
@@ -73,7 +73,7 @@ public:
const ScRange& GetRange() const { return aRange; }
void IncRef() { ++nRefCount; }
sal_uLong DecRef() { return nRefCount ? --nRefCount : 0; }
- sal_uLong GetRef() { return nRefCount; }
+ sal_uLong GetRef() const { return nRefCount; }
ScBroadcastArea* GetUpdateChainNext() const { return pUpdateChainNext; }
void SetUpdateChainNext( ScBroadcastArea* p ) { pUpdateChainNext = p; }
bool IsInUpdateChain() const { return mbInUpdateChain; }
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 5930d24394aa..b47f7bf08239 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -424,7 +424,7 @@ private:
formula::StackVar GetStackType();
// peek StackType of Parameter, Parameter 1 == TOS, 2 == TOS-1, ...
formula::StackVar GetStackType( sal_uInt8 nParam );
- sal_uInt8 GetByte() { return cPar; }
+ sal_uInt8 GetByte() const { return cPar; }
// reverse order of stack
void ReverseStack( sal_uInt8 nParamCount );
// generates a position-dependent SingleRef out of a DoubleRef
@@ -432,7 +432,7 @@ private:
double GetDoubleFromMatrix(const ScMatrixRef& pMat);
double GetDouble();
double GetDoubleWithDefault(double nDefault);
- bool IsMissing();
+ bool IsMissing() const;
sal_Int32 double_to_int32(double fVal);
/** if GetDouble() not within int32 limits sets nGlobalError and returns SAL_MAX_INT32 */
sal_Int32 GetInt32();
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index e7e004471c0c..dbc81a8d3dce 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -150,7 +150,7 @@ void ScCellFormat::GetInputString(
}
}
-OUString ScCellFormat::GetOutputString( ScDocument& rDoc, const ScAddress& rPos, ScRefCellValue& rCell )
+OUString ScCellFormat::GetOutputString( ScDocument& rDoc, const ScAddress& rPos, const ScRefCellValue& rCell )
{
if (rCell.isEmpty())
return EMPTY_OUSTRING;
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index 47e0e6ca9c70..c545d781911b 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -5343,7 +5343,7 @@ public:
mbPolar(bPolar)
{}
- ScMatrixRef Compute(std::function<ScMatrixGenerator>& rMatGenFunc);
+ ScMatrixRef Compute(const std::function<ScMatrixGenerator>& rMatGenFunc);
private:
ScMatrixRef& mpInputMat;
@@ -5353,7 +5353,7 @@ private:
bool mbPolar:1;
};
-ScMatrixRef ScFFT::Compute(std::function<ScMatrixGenerator>& rMatGenFunc)
+ScMatrixRef ScFFT::Compute(const std::function<ScMatrixGenerator>& rMatGenFunc)
{
std::vector<double> aArray;
mpInputMat->GetDoubleArray(aArray);
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 06006c0da5d7..77c0a48589ab 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -1929,7 +1929,7 @@ void ScInterpreter::PushNoValue()
PushError( FormulaError::NoValue);
}
-bool ScInterpreter::IsMissing()
+bool ScInterpreter::IsMissing() const
{
return sp && pStack[sp - 1]->GetType() == svMissing;
}
diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index 759e5815ae0a..9738c2ce7421 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -120,7 +120,7 @@ public:
bool PreprocessDataRange( const ScMatrixRef& rMatX, const ScMatrixRef& rMatY, int nSmplInPrd,
bool bDataCompletion, int nAggregation, const ScMatrixRef& rTMat,
ScETSType eETSType );
- FormulaError GetError() { return mnErrorValue; };
+ FormulaError GetError() const { return mnErrorValue; };
void GetForecastRange( const ScMatrixRef& rTMat, const ScMatrixRef& rFcMat );
void GetStatisticValue( const ScMatrixRef& rTypeMat, const ScMatrixRef& rStatMat );
void GetSamplesInPeriod( double& rVal );
diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index 4e6891658082..03ac8ebeec53 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -144,7 +144,7 @@ ScRefFlags ScRangeList::Parse( const OUString& rStr, const ScDocument* pDoc,
return ScRefFlags::ZERO;
}
-void ScRangeList::Format( OUString& rStr, ScRefFlags nFlags, ScDocument* pDoc,
+void ScRangeList::Format( OUString& rStr, ScRefFlags nFlags, const ScDocument* pDoc,
formula::FormulaGrammar::AddressConvention eConv,
sal_Unicode cDelimiter, bool bFullAddressNotation ) const
{
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index ff6cb41ab301..aeffdfa0b4c2 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -326,7 +326,7 @@ bool XclExpHyperlinkHelper::HasLinkRecord() const
return !mbMultipleUrls && mxLinkRec;
}
-XclExpHyperlinkHelper::XclExpHyperlinkRef XclExpHyperlinkHelper::GetLinkRecord()
+XclExpHyperlinkHelper::XclExpHyperlinkRef XclExpHyperlinkHelper::GetLinkRecord() const
{
if( HasLinkRecord() )
return mxLinkRec;
diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx
index db8a7142e9e6..cd3a355f252a 100644
--- a/sc/source/filter/excel/xltoolbar.cxx
+++ b/sc/source/filter/excel/xltoolbar.cxx
@@ -119,7 +119,7 @@ void ScCTB::Print( FILE* fp )
}
#endif
-bool ScCTB::IsMenuToolbar()
+bool ScCTB::IsMenuToolbar() const
{
return tb.IsMenuToolbar();
}
diff --git a/sc/source/filter/excel/xltoolbar.hxx b/sc/source/filter/excel/xltoolbar.hxx
index 6c03c2be3160..0b620f0cd706 100644
--- a/sc/source/filter/excel/xltoolbar.hxx
+++ b/sc/source/filter/excel/xltoolbar.hxx
@@ -60,7 +60,7 @@ public:
virtual void Print( FILE* ) override;
#endif
bool Read(SvStream &rS) override;
- bool IsMenuToolbar();
+ bool IsMenuToolbar() const;
bool ImportCustomToolBar( ScCTBWrapper&, CustomToolBarImportHelper& );
bool ImportMenuTB( ScCTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& );
const OUString& GetName() { return tb.getName().getString(); }
diff --git a/sc/source/filter/inc/condformatbuffer.hxx b/sc/source/filter/inc/condformatbuffer.hxx
index 0c79374a203f..8aa85427b85f 100644
--- a/sc/source/filter/inc/condformatbuffer.hxx
+++ b/sc/source/filter/inc/condformatbuffer.hxx
@@ -274,11 +274,11 @@ class ExtCfCondFormat
{
public:
ExtCfCondFormat(const ScRangeList& aRange, std::vector< std::unique_ptr<ScFormatEntry> >& rEntries,
- std::vector<sal_Int32>* pPriorities = nullptr);
+ const std::vector<sal_Int32>* pPriorities = nullptr);
~ExtCfCondFormat();
- const ScRangeList& getRange();
- const std::vector< std::unique_ptr<ScFormatEntry> >& getEntries();
+ const ScRangeList& getRange() const;
+ const std::vector< std::unique_ptr<ScFormatEntry> >& getEntries() const;
const std::vector<sal_Int32>& getPriorities() const { return maPriorities; }
private:
diff --git a/sc/source/filter/inc/htmlexp.hxx b/sc/source/filter/inc/htmlexp.hxx
index 8642795baa8a..2fcc5517aa7e 100644
--- a/sc/source/filter/inc/htmlexp.hxx
+++ b/sc/source/filter/inc/htmlexp.hxx
@@ -168,7 +168,7 @@ class ScHTMLExport : public ScExportBase
Size MMToPixel( const Size& r100thMMSize );
void IncIndent( short nVal );
- const sal_Char* GetIndentStr()
+ const sal_Char* GetIndentStr() const
{
return sIndent;
}
diff --git a/sc/source/filter/inc/qpro.hxx b/sc/source/filter/inc/qpro.hxx
index eab0aea155ed..ae74b8246f7b 100644
--- a/sc/source/filter/inc/qpro.hxx
+++ b/sc/source/filter/inc/qpro.hxx
@@ -46,8 +46,8 @@ public:
bool recordsLeft();
void SetEof( bool bValue ){ mbEndOfFile = bValue; }
bool nextRecord();
- sal_uInt16 getId() { return mnId; }
- sal_uInt16 getLength() { return mnLength; }
+ sal_uInt16 getId() const { return mnId; }
+ sal_uInt16 getLength() const { return mnLength; }
OUString readString(sal_uInt16 nLength);
ErrCode parse( ScDocument *pDoc );
diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx
index 897c7904156a..598a47a4045f 100644
--- a/sc/source/filter/inc/stylesbuffer.hxx
+++ b/sc/source/filter/inc/stylesbuffer.hxx
@@ -863,7 +863,7 @@ public:
/** Writes the cell formatting attributes of the specified XF to the passed property set. */
void writeCellXfToDoc( ScDocumentImport& rDoc, const ScRange& rRange, sal_Int32 nXfId ) const;
- const RefVector< Dxf >& getExtDxfs() { return maExtDxfs; }
+ const RefVector< Dxf >& getExtDxfs() const { return maExtDxfs; }
private:
typedef RefVector< Font > FontVector;
diff --git a/sc/source/filter/inc/xehelper.hxx b/sc/source/filter/inc/xehelper.hxx
index 0740c4040046..130897c425c9 100644
--- a/sc/source/filter/inc/xehelper.hxx
+++ b/sc/source/filter/inc/xehelper.hxx
@@ -187,12 +187,12 @@ public:
/** Returns true, if a single HLINK record has been created. */
bool HasLinkRecord() const;
/** Returns the created single HLINk record, or an empty reference. */
- XclExpHyperlinkRef GetLinkRecord();
+ XclExpHyperlinkRef GetLinkRecord() const;
/** Returns true, if multiple URLs have been processed. */
bool HasMultipleUrls() const { return mbMultipleUrls; }
/** Returns a string containing all processed URLs. */
- const OUString& GetUrlList() { return maUrlList; }
+ const OUString& GetUrlList() const { return maUrlList; }
private:
XclExpHyperlinkRef mxLinkRec; /// Created HLINK record.
diff --git a/sc/source/filter/inc/xetable.hxx b/sc/source/filter/inc/xetable.hxx
index fe22d555b80a..f64bfe0794a3 100644
--- a/sc/source/filter/inc/xetable.hxx
+++ b/sc/source/filter/inc/xetable.hxx
@@ -761,8 +761,8 @@ public:
/** Writes all COLINFO records of this buffer. */
virtual void Save( XclExpStream& rStrm ) override;
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
- sal_uInt8 GetHighestOutlineLevel() { return mnHighestOutlineLevel; }
- double GetDefColWidth() { return maDefcolwidth.GetValue(); }
+ sal_uInt8 GetHighestOutlineLevel() const { return mnHighestOutlineLevel; }
+ double GetDefColWidth() const { return maDefcolwidth.GetValue(); }
private:
typedef XclExpRecordList< XclExpColinfo > XclExpColinfoList;
@@ -923,7 +923,7 @@ public:
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
XclExpDimensions& GetDimensions() { return maDimensions; }
- sal_uInt8 GetHighestOutlineLevel() { return mnHighestOutlineLevel; }
+ sal_uInt8 GetHighestOutlineLevel() const { return mnHighestOutlineLevel; }
private:
/** Returns access to the specified ROW record. Inserts preceding missing ROW records.
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx
index bcdd8496ebbe..4f38888e90c3 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -1371,7 +1371,7 @@ void ExtCfDataBarRule::importCfvo( const AttributeList& rAttribs )
}
ExtCfCondFormat::ExtCfCondFormat(const ScRangeList& rRange, std::vector< std::unique_ptr<ScFormatEntry> >& rEntries,
- std::vector<sal_Int32>* pPriorities):
+ const std::vector<sal_Int32>* pPriorities):
maRange(rRange)
{
maEntries.swap(rEntries);
@@ -1385,12 +1385,12 @@ ExtCfCondFormat::~ExtCfCondFormat()
{
}
-const ScRangeList& ExtCfCondFormat::getRange()
+const ScRangeList& ExtCfCondFormat::getRange() const
{
return maRange;
}
-const std::vector< std::unique_ptr<ScFormatEntry> >& ExtCfCondFormat::getEntries()
+const std::vector< std::unique_ptr<ScFormatEntry> >& ExtCfCondFormat::getEntries() const
{
return maEntries;
}
diff --git a/sc/source/filter/orcus/xmlcontext.cxx b/sc/source/filter/orcus/xmlcontext.cxx
index 489878391b29..1f8058361213 100644
--- a/sc/source/filter/orcus/xmlcontext.cxx
+++ b/sc/source/filter/orcus/xmlcontext.cxx
@@ -39,7 +39,7 @@ using namespace com::sun::star;
namespace {
ScOrcusXMLTreeParam::EntryData& setUserDataToEntry(weld::TreeView& rControl,
- weld::TreeIter& rEntry, ScOrcusXMLTreeParam::UserDataStoreType& rStore, ScOrcusXMLTreeParam::EntryType eType)
+ const weld::TreeIter& rEntry, ScOrcusXMLTreeParam::UserDataStoreType& rStore, ScOrcusXMLTreeParam::EntryType eType)
{
rStore.push_back(std::make_unique<ScOrcusXMLTreeParam::EntryData>(eType));
rControl.set_id(rEntry, OUString::number(reinterpret_cast<sal_Int64>(rStore.back().get())));
@@ -70,7 +70,7 @@ OUString toString(const orcus::xml_structure_tree::entity_name& entity, const or
void populateTree(
weld::TreeView& rTreeCtrl, orcus::xml_structure_tree::walker& rWalker,
const orcus::xml_structure_tree::entity_name& rElemName, bool bRepeat,
- weld::TreeIter* pParent, ScOrcusXMLTreeParam& rParam)
+ const weld::TreeIter* pParent, ScOrcusXMLTreeParam& rParam)
{
OUString sEntry(toString(rElemName, rWalker));
std::unique_ptr<weld::TreeIter> xEntry(rTreeCtrl.make_iterator());
diff --git a/sc/source/filter/xml/XMLExportIterator.hxx b/sc/source/filter/xml/XMLExportIterator.hxx
index d87f3db12c07..47df41ae3466 100644
--- a/sc/source/filter/xml/XMLExportIterator.hxx
+++ b/sc/source/filter/xml/XMLExportIterator.hxx
@@ -86,7 +86,7 @@ public:
using ScMyIteratorBase::UpdateAddress;
void AddNewShape(const ScMyShape& aShape);
- bool HasShapes() { return !aShapeList.empty(); }
+ bool HasShapes() const { return !aShapeList.empty(); }
const ScMyShapeList& GetShapes() const { return aShapeList; }
virtual void SetCellData( ScMyCell& rMyCell ) override;
virtual void Sort() override;
diff --git a/sc/source/filter/xml/XMLExportSharedData.cxx b/sc/source/filter/xml/XMLExportSharedData.cxx
index 44e0e874610a..3672edab96ff 100644
--- a/sc/source/filter/xml/XMLExportSharedData.cxx
+++ b/sc/source/filter/xml/XMLExportSharedData.cxx
@@ -110,7 +110,7 @@ void ScMySharedData::SortShapesContainer()
pShapesContainer->Sort();
}
-bool ScMySharedData::HasShapes()
+bool ScMySharedData::HasShapes() const
{
return ((pShapesContainer && pShapesContainer->HasShapes()) ||
(pTableShapes && !pTableShapes->empty()));
diff --git a/sc/source/filter/xml/XMLExportSharedData.hxx b/sc/source/filter/xml/XMLExportSharedData.hxx
index 58833dd99422..5ebd2abfbd6d 100644
--- a/sc/source/filter/xml/XMLExportSharedData.hxx
+++ b/sc/source/filter/xml/XMLExportSharedData.hxx
@@ -73,7 +73,7 @@ public:
void AddNewShape(const ScMyShape& aMyShape);
void SortShapesContainer();
ScMyShapesContainer* GetShapesContainer() { return pShapesContainer.get(); }
- bool HasShapes();
+ bool HasShapes() const;
void AddTableShape(const sal_Int32 nTable, const css::uno::Reference<css::drawing::XShape>& xShape);
ScMyTableShapes* GetTableShapes() { return pTableShapes.get(); }
ScMyDetectiveObjContainer* GetDetectiveObjContainer() { return pDetectiveObjContainer.get(); }
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index 5c1e3073067a..e6631332a18d 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -193,7 +193,7 @@ public:
const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList ) override;
void CreateTextPContext(bool bIsNewParagraph);
- bool IsEditCell() { return mpEditTextObj.is(); }
+ bool IsEditCell() const { return mpEditTextObj.is(); }
void SetText(const OUString& sTempText) { sText = sTempText; }
virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index f0e2be876858..9b504788465c 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -203,7 +203,7 @@ OUString lcl_RangeSequenceToString(
return aResult.makeStringAndClear();
}
-OUString lcl_GetFormattedString(ScDocument* pDoc, ScRefCellValue& rCell, const ScAddress& rAddr)
+OUString lcl_GetFormattedString(ScDocument* pDoc, const ScRefCellValue& rCell, const ScAddress& rAddr)
{
// return text/edit cell string content, with line feeds in edit cells
@@ -3710,7 +3710,7 @@ bool ScXMLExport::IsEditCell(const ScMyCell& rCell)
return rCell.maBaseCell.meType == CELLTYPE_EDIT;
}
-bool ScXMLExport::IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2)
+bool ScXMLExport::IsCellEqual (const ScMyCell& aCell1, const ScMyCell& aCell2)
{
bool bIsEqual = false;
if( !aCell1.bIsMergedBase && !aCell2.bIsMergedBase &&
diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx
index b7f31c8e6f3a..9aac0698f9bc 100644
--- a/sc/source/filter/xml/xmlexprt.hxx
+++ b/sc/source/filter/xml/xmlexprt.hxx
@@ -187,7 +187,7 @@ class ScXMLExport : public SvXMLExport
void SetRepeatAttribute(sal_Int32 nEqualCellCount, bool bIncProgress);
static bool IsEditCell(const ScMyCell& rCell);
- bool IsCellEqual(ScMyCell& aCell1, ScMyCell& aCell2);
+ bool IsCellEqual(const ScMyCell& aCell1, const ScMyCell& aCell2);
void WriteCalculationSettings(const css::uno::Reference <css::sheet::XSpreadsheetDocument>& xSpreadDoc);
void WriteTableSource();
@@ -242,8 +242,8 @@ public:
bool IsMatrix (const ScAddress& aCell,
ScRange& aCellAddress, bool& bIsFirst) const;
- const rtl::Reference < XMLPropertySetMapper >& GetCellStylesPropertySetMapper() { return xCellStylesPropertySetMapper; }
- const rtl::Reference < XMLPropertySetMapper >& GetTableStylesPropertySetMapper() { return xTableStylesPropertySetMapper; }
+ const rtl::Reference < XMLPropertySetMapper >& GetCellStylesPropertySetMapper() const { return xCellStylesPropertySetMapper; }
+ const rtl::Reference < XMLPropertySetMapper >& GetTableStylesPropertySetMapper() const { return xTableStylesPropertySetMapper; }
void SetSourceStream( const css::uno::Reference<css::io::XInputStream>& xNewStream );
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 5475bd06df9a..cfb1babc12f4 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -1856,7 +1856,7 @@ void ScXMLImport::UnlockSolarMutex()
}
}
-sal_Int32 ScXMLImport::GetByteOffset()
+sal_Int32 ScXMLImport::GetByteOffset() const
{
sal_Int32 nOffset = -1;
uno::Reference<xml::sax::XLocator> xLocator = GetLocator();
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
index f6b248e159b3..5dc661cae26b 100644
--- a/sc/source/filter/xml/xmlimprt.hxx
+++ b/sc/source/filter/xml/xmlimprt.hxx
@@ -398,7 +398,7 @@ public:
void ProgressBarIncrement();
void SetNewCondFormatData() { mbHasNewCondFormatData = true; }
- bool HasNewCondFormatData() { return mbHasNewCondFormatData; }
+ bool HasNewCondFormatData() const { return mbHasNewCondFormatData; }
private:
void AddStyleRange(const css::table::CellRangeAddress& rCellRange);
@@ -437,7 +437,7 @@ public:
void LockSolarMutex();
void UnlockSolarMutex();
- sal_Int32 GetByteOffset();
+ sal_Int32 GetByteOffset() const;
void SetRangeOverflowType(ErrCode nType);
diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx
index e9e3eea840c6..86292f18406a 100644
--- a/sc/source/filter/xml/xmlsubti.cxx
+++ b/sc/source/filter/xml/xmlsubti.cxx
@@ -240,12 +240,12 @@ uno::Reference< drawing::XShapes > const & ScMyTables::GetCurrentXShapes()
return xShapes;
}
-bool ScMyTables::HasDrawPage()
+bool ScMyTables::HasDrawPage() const
{
return (maCurrentCellPos.Tab() == nCurrentDrawPage) && xDrawPage.is();
}
-bool ScMyTables::HasXShapes()
+bool ScMyTables::HasXShapes() const
{
return (maCurrentCellPos.Tab() == nCurrentXShapes) && xShapes.is();
}
diff --git a/sc/source/filter/xml/xmlsubti.hxx b/sc/source/filter/xml/xmlsubti.hxx
index 4722215bb8df..97f7812ce776 100644
--- a/sc/source/filter/xml/xmlsubti.hxx
+++ b/sc/source/filter/xml/xmlsubti.hxx
@@ -91,8 +91,8 @@ public:
GetCurrentXDrawPage();
css::uno::Reference< css::drawing::XShapes > const &
GetCurrentXShapes();
- bool HasDrawPage();
- bool HasXShapes();
+ bool HasDrawPage() const;
+ bool HasXShapes() const;
void AddOLE(const css::uno::Reference <css::drawing::XShape>& rShape,
const OUString &rRangeList);
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 70af552b730c..a425e4214060 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -87,7 +87,7 @@ ScXMLImportWrapper::ScXMLImportWrapper( ScDocShell& rDocSh, SfxMedium* pM, const
OSL_ENSURE( pMedium || xStorage.is(), "ScXMLImportWrapper: Medium or Storage must be set" );
}
-uno::Reference <task::XStatusIndicator> ScXMLImportWrapper::GetStatusIndicator()
+uno::Reference <task::XStatusIndicator> ScXMLImportWrapper::GetStatusIndicator() const
{
uno::Reference<task::XStatusIndicator> xStatusIndicator;
if (pMedium)
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index 18b7c712d199..010bcb101030 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -328,7 +328,7 @@ bool ScAccessibleCell::IsEditable(
return bEditable;
}
-bool ScAccessibleCell::IsOpaque()
+bool ScAccessibleCell::IsOpaque() const
{
// test whether there is a background color
bool bOpaque(true);
@@ -542,7 +542,7 @@ bool ScAccessibleCell::IsFormulaMode()
return false;
}
-bool ScAccessibleCell::IsDropdown()
+bool ScAccessibleCell::IsDropdown() const
{
sal_uInt16 nPosX = maCellAddress.Col();
sal_uInt16 nPosY = sal_uInt16(maCellAddress.Row());
diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
index 754c48049529..1cd9c0ff91f0 100644
--- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
@@ -290,7 +290,7 @@ bool ScAccessibleCellBase::IsEditable(
return bEditable;
}
-OUString ScAccessibleCellBase::GetNote()
+OUString ScAccessibleCellBase::GetNote() const
{
SolarMutexGuard aGuard;
IsObjectValid();
@@ -336,7 +336,7 @@ OUString ScAccessibleCellBase::GetNote()
return sNote;
}
-OUString ScAccessibleCellBase::getShadowAttrs()
+OUString ScAccessibleCellBase::getShadowAttrs() const
{
SolarMutexGuard aGuard;
IsObjectValid();
@@ -565,7 +565,7 @@ OUString ScAccessibleCellBase::getBorderAttrs()
}
//end of cell attributes
-OUString ScAccessibleCellBase::GetAllDisplayNote()
+OUString ScAccessibleCellBase::GetAllDisplayNote() const
{
OUString strNote;
OUString strTrackText;
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
index 70e8c970f182..4b5d6636a2f8 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
@@ -248,7 +248,7 @@ bool ScAccessiblePreviewCell::IsEditable(
return false;
}
-bool ScAccessiblePreviewCell::IsOpaque()
+bool ScAccessiblePreviewCell::IsOpaque() const
{
// test whether there is a background color
//! could be moved to ScAccessibleCellBase
diff --git a/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx b/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
index b150e8d8b5ff..ce7208155a76 100644
--- a/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RegressionDialog.cxx
@@ -280,7 +280,7 @@ bool ScRegressionDialog::InputRangesValid()
return true;
}
-size_t ScRegressionDialog::GetRegressionTypeIndex()
+size_t ScRegressionDialog::GetRegressionTypeIndex() const
{
if (mxLinearRadioButton->get_active())
return 0;
diff --git a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
index f793417f04a7..02d709bfd079 100644
--- a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
+++ b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
@@ -241,7 +241,7 @@ DataCellIterator::DataCellIterator(const ScRange& aInputRange, bool aByColumn)
DataCellIterator::~DataCellIterator()
{}
-bool DataCellIterator::hasNext()
+bool DataCellIterator::hasNext() const
{
if(mByColumn)
return mCol <= mInputRange.aEnd.Col();
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 300d9c38d699..ebfe92e781f8 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1038,12 +1038,12 @@ EditView* ScTextWndGroup::GetEditView()
return maTextWnd->GetEditView();
}
-long ScTextWndGroup::GetLastNumExpandedLines()
+long ScTextWndGroup::GetLastNumExpandedLines() const
{
return maTextWnd->GetLastNumExpandedLines();
}
-long ScTextWndGroup::GetNumLines()
+long ScTextWndGroup::GetNumLines() const
{
return maTextWnd->GetNumLines();
}
@@ -1230,7 +1230,7 @@ void ScTextWnd::Resize()
SetScrollBarRange();
}
-long ScTextWnd::GetEditEngTxtHeight()
+long ScTextWnd::GetEditEngTxtHeight() const
{
return mpEditView ? mpEditView->GetEditEngine()->GetTextHeight() : 0;
}
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 301fd7b326f1..ca6bee6110c0 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -2159,7 +2159,7 @@ void ScModule::RegisterRefController(sal_uInt16 nSlotId, std::shared_ptr<SfxDial
}
}
-void ScModule::UnregisterRefController(sal_uInt16 nSlotId, std::shared_ptr<SfxDialogController>& rWnd)
+void ScModule::UnregisterRefController(sal_uInt16 nSlotId, const std::shared_ptr<SfxDialogController>& rWnd)
{
auto iSlot = m_mapRefController.find( nSlotId );
@@ -2183,7 +2183,7 @@ void ScModule::UnregisterRefController(sal_uInt16 nSlotId, std::shared_ptr<SfxD
m_mapRefController.erase( nSlotId );
}
-std::shared_ptr<SfxDialogController> ScModule::Find1RefWindow(sal_uInt16 nSlotId, weld::Window *pWndAncestor)
+std::shared_ptr<SfxDialogController> ScModule::Find1RefWindow(sal_uInt16 nSlotId, const weld::Window *pWndAncestor)
{
if (!pWndAncestor)
return nullptr;
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 0040c12437e1..af245903d8f9 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -234,7 +234,7 @@ void ScTransferObj::AddSupportedFormats()
}
}
-static ScRange lcl_reduceBlock(ScDocumentUniquePtr &pDoc, ScRange aReducedBlock, bool bIncludeVisual = false)
+static ScRange lcl_reduceBlock(const ScDocumentUniquePtr &pDoc, ScRange aReducedBlock, bool bIncludeVisual = false)
{
if ((aReducedBlock.aEnd.Col() == MAXCOL || aReducedBlock.aEnd.Row() == MAXROW) &&
aReducedBlock.aStart.Tab() == aReducedBlock.aEnd.Tab())
@@ -644,7 +644,7 @@ ScDocShell* ScTransferObj::GetSourceDocShell()
return nullptr; // none set
}
-ScMarkData ScTransferObj::GetSourceMarkData()
+ScMarkData ScTransferObj::GetSourceMarkData() const
{
ScMarkData aMarkData;
ScCellRangesBase* pRangesObj = comphelper::getUnoTunnelImplementation<ScCellRangesBase>( m_xDragSourceRanges );
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index 9e4c16667add..6214ca939c5f 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -1283,7 +1283,7 @@ private:
std::unique_ptr<weld::ComboBox> mxLbEntryType;
public:
- ScIconSetFrmtDataEntry(weld::Container* pParent, ScIconSetType eType, ScDocument* pDoc,
+ ScIconSetFrmtDataEntry(weld::Container* pParent, ScIconSetType eType, const ScDocument* pDoc,
sal_Int32 i, const ScColorScaleEntry* pEntry = nullptr);
void Show() { mxGrid->show(); }
void Hide() { mxGrid->hide(); }
@@ -1298,7 +1298,7 @@ public:
void SetFirstEntry();
};
-ScIconSetFrmtDataEntry::ScIconSetFrmtDataEntry(weld::Container* pParent, ScIconSetType eType, ScDocument* pDoc, sal_Int32 i, const ScColorScaleEntry* pEntry)
+ScIconSetFrmtDataEntry::ScIconSetFrmtDataEntry(weld::Container* pParent, ScIconSetType eType, const ScDocument* pDoc, sal_Int32 i, const ScColorScaleEntry* pEntry)
: mxBuilder(Application::CreateBuilder(pParent, "modules/scalc/ui/conditionaliconset.ui"))
, mxGrid(mxBuilder->weld_container("ConditionalIconSet"))
, mxImgIcon(mxBuilder->weld_image("icon"))
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index c58c1f9d814d..47ff4e6cab42 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -1073,7 +1073,7 @@ void ScFilterDlg::SliderMoved()
RefreshEditRow( nOffset);
}
-size_t ScFilterDlg::GetSliderPos()
+size_t ScFilterDlg::GetSliderPos() const
{
return static_cast<size_t>(m_xScrollBar->vadjustment_get_value());
}
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index faaf04e7a48a..684095e04163 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -146,7 +146,7 @@ bool ScTpSubTotalGroup::DoReset( sal_uInt16 nGroupNo,
namespace
{
- int GetCheckedEntryCount(weld::TreeView& rTreeView)
+ int GetCheckedEntryCount(const weld::TreeView& rTreeView)
{
int nRet = 0;
for (sal_Int32 i=0, nEntryCount = rTreeView.n_children(); i < nEntryCount; ++i)
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 3c6660dec95b..f669a9c247c0 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -908,7 +908,7 @@ IMPL_LINK_NOARG(ScTPValidationValue, ClickHdl, formula::RefButton&, void)
SetupRefDlg();
}
-bool ScValidationDlg::IsChildFocus()
+bool ScValidationDlg::IsChildFocus() const
{
return m_xDialog->has_toplevel_focus();
}
diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index ded5bbead7e0..fab62d89af2d 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -157,7 +157,7 @@ public:
maCondReadStream.set(); // start producer again
}
- bool hasNewLines()
+ bool hasNewLines() const
{
return !maPendingLines.empty();
}
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index f2a844389786..ff846af27c18 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -144,7 +144,7 @@ void ScDocShell::SetVisAreaOrSize( const tools::Rectangle& rVisArea )
}
}
-bool ScDocShell::IsOle()
+bool ScDocShell::IsOle() const
{
return (GetCreateMode() == SfxObjectCreateMode::EMBEDDED);
}
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 1f0a8f6d2ff8..79508cc5f949 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -384,7 +384,7 @@ void ScDrawShell::ExecuteMacroAssign(SdrObject* pObj, weld::Window* pWin)
}
}
-void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq )
+void ScDrawShell::ExecuteLineDlg( const SfxRequest& rReq )
{
ScDrawView* pView = pViewData->GetScDrawView();
bool bHasMarked = pView->AreObjectsMarked();
@@ -423,7 +423,7 @@ void ScDrawShell::ExecuteLineDlg( SfxRequest& rReq )
});
}
-void ScDrawShell::ExecuteAreaDlg( SfxRequest& rReq )
+void ScDrawShell::ExecuteAreaDlg( const SfxRequest& rReq )
{
ScDrawView* pView = pViewData->GetScDrawView();
bool bHasMarked = pView->AreObjectsMarked();
diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx
index f3a00635dc61..a7e432d1e0a4 100644
--- a/sc/source/ui/drawfunc/drtxtob2.cxx
+++ b/sc/source/ui/drawfunc/drtxtob2.cxx
@@ -39,7 +39,7 @@ sal_uInt16 ScGetFontWorkId()
return SvxFontWorkChildWindow::GetChildWindowId();
}
-bool ScDrawTextObjectBar::IsNoteEdit()
+bool ScDrawTextObjectBar::IsNoteEdit() const
{
return ScDrawLayer::IsNoteCaption( pViewData->GetView()->GetSdrView()->GetTextEditObject() );
}
diff --git a/sc/source/ui/inc/AccessibleCell.hxx b/sc/source/ui/inc/AccessibleCell.hxx
index 5c5542daf337..a2f8e5be9113 100644
--- a/sc/source/ui/inc/AccessibleCell.hxx
+++ b/sc/source/ui/inc/AccessibleCell.hxx
@@ -145,7 +145,7 @@ private:
const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates);
virtual bool IsEditable(
const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates) override;
- bool IsOpaque();
+ bool IsOpaque() const;
bool IsSelected();
static ScDocument* GetDocument(ScTabViewShell* mpViewShell);
@@ -161,7 +161,7 @@ private:
const sal_uInt16 aRelationType,
::utl::AccessibleRelationSetHelper* pRelationSet);
bool IsFormulaMode();
- bool IsDropdown();
+ bool IsDropdown() const;
};
#endif
diff --git a/sc/source/ui/inc/AccessibleCellBase.hxx b/sc/source/ui/inc/AccessibleCellBase.hxx
index 13c234dd5fe1..401fec77ea2b 100644
--- a/sc/source/ui/inc/AccessibleCellBase.hxx
+++ b/sc/source/ui/inc/AccessibleCellBase.hxx
@@ -120,12 +120,12 @@ private:
const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates);
protected:
/// @throw css::uno::RuntimeException
- OUString GetNote();
+ OUString GetNote() const;
/// @throw css::uno::RuntimeException
- OUString GetAllDisplayNote();
+ OUString GetAllDisplayNote() const;
/// @throw css::uno::RuntimeException
- OUString getShadowAttrs();
+ OUString getShadowAttrs() const;
/// @throw css::uno::RuntimeException
OUString getBorderAttrs();
public:
diff --git a/sc/source/ui/inc/AccessiblePreviewCell.hxx b/sc/source/ui/inc/AccessiblePreviewCell.hxx
index 71410e0435ba..08b72ba04f77 100644
--- a/sc/source/ui/inc/AccessiblePreviewCell.hxx
+++ b/sc/source/ui/inc/AccessiblePreviewCell.hxx
@@ -91,7 +91,7 @@ private:
const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates);
virtual bool IsEditable(
const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates) override;
- bool IsOpaque();
+ bool IsOpaque() const;
void CreateTextHelper();
diff --git a/sc/source/ui/inc/RegressionDialog.hxx b/sc/source/ui/inc/RegressionDialog.hxx
index 22c1640eb3a8..c5359520f0a8 100644
--- a/sc/source/ui/inc/RegressionDialog.hxx
+++ b/sc/source/ui/inc/RegressionDialog.hxx
@@ -49,7 +49,7 @@ private:
using CellValueGetter = const OUString&(size_t, size_t);
using CellWriter = void(const OUString&, size_t, size_t);
- size_t GetRegressionTypeIndex();
+ size_t GetRegressionTypeIndex() const;
ScRange GetDataRange(const ScRange& rRange);
OUString GetVariableNameFormula(bool bXVar, size_t nIndex, bool bWithLog);
OUString GetXVariableNameFormula(size_t nIndex, bool bWithLog);
diff --git a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
index d1d75d248c94..1ccfaf43962b 100644
--- a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
+++ b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
@@ -100,7 +100,7 @@ public:
DataCellIterator(const ScRange& aInputRange, bool aByColumn);
~DataCellIterator();
- bool hasNext();
+ bool hasNext() const;
ScAddress get();
void next();
ScAddress getRelative(int aDelta);
diff --git a/sc/source/ui/inc/cellsh.hxx b/sc/source/ui/inc/cellsh.hxx
index 6f1419dcceb4..208c43f5206a 100644
--- a/sc/source/ui/inc/cellsh.hxx
+++ b/sc/source/ui/inc/cellsh.hxx
@@ -106,7 +106,7 @@ public:
void ExecutePageSel( SfxRequest& rReq );
void ExecuteMove( SfxRequest& rReq );
- const VclPtr<vcl::Window>& GetFrameWin();
+ const VclPtr<vcl::Window>& GetFrameWin() const;
static void GetStateCursor( SfxItemSet& rSet );
};
diff --git a/sc/source/ui/inc/conflictsdlg.hxx b/sc/source/ui/inc/conflictsdlg.hxx
index 6dd77521d815..4220c2a1efea 100644
--- a/sc/source/ui/inc/conflictsdlg.hxx
+++ b/sc/source/ui/inc/conflictsdlg.hxx
@@ -131,7 +131,7 @@ private:
std::unique_ptr<SvxRedlinTable> m_xLbConflicts;
OUString GetConflictString( const ScConflictsListEntry& rConflictEntry );
- void SetActionString(const ScChangeAction* pAction, ScDocument* pDoc, weld::TreeIter& rEntry);
+ void SetActionString(const ScChangeAction* pAction, ScDocument* pDoc, const weld::TreeIter& rEntry);
void HandleListBoxSelection();
void SetConflictAction(const weld::TreeIter& rRootEntry, ScConflictAction eConflictAction);
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 0e430172e9cf..1878a234c00a 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -222,7 +222,7 @@ public:
ScDocument& GetDocument() { return m_aDocument; }
ScDocFunc& GetDocFunc() { return *m_pDocFunc; }
- css::uno::Reference<css::datatransfer::XTransferable2> const & GetClipData() { return m_xClipData; }
+ css::uno::Reference<css::datatransfer::XTransferable2> const & GetClipData() const { return m_xClipData; }
void SetClipData(const css::uno::Reference<css::datatransfer::XTransferable2>& xTransferable) { m_xClipData = xTransferable; }
SfxPrinter* GetPrinter( bool bCreateIfNotExist = true );
@@ -289,7 +289,7 @@ public:
void DoHardRecalc();
void UpdateOle( const ScViewData* pViewData, bool bSnapSize = false);
- bool IsOle();
+ bool IsOle() const;
void DBAreaDeleted( SCTAB nTab, SCCOL nX1, SCROW nY1, SCCOL nX2 );
ScDBData* GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGetDBSelection eSel );
diff --git a/sc/source/ui/inc/drawsh.hxx b/sc/source/ui/inc/drawsh.hxx
index 85e644a51640..082a772c679f 100644
--- a/sc/source/ui/inc/drawsh.hxx
+++ b/sc/source/ui/inc/drawsh.hxx
@@ -83,8 +83,8 @@ public:
void StateFormatPaintbrush(SfxItemSet& rSet);
void ExecuteMacroAssign(SdrObject* pObj, weld::Window* pWin);
- void ExecuteLineDlg( SfxRequest& rReq );
- void ExecuteAreaDlg( SfxRequest& rReq );
+ void ExecuteLineDlg( const SfxRequest& rReq );
+ void ExecuteAreaDlg( const SfxRequest& rReq );
void ExecuteTextAttrDlg( SfxRequest& rReq );
void ExecuteMeasureDlg( SfxRequest& rReq );
diff --git a/sc/source/ui/inc/drtxtob.hxx b/sc/source/ui/inc/drtxtob.hxx
index 8ba3dacc60c2..83c75b552e89 100644
--- a/sc/source/ui/inc/drtxtob.hxx
+++ b/sc/source/ui/inc/drtxtob.hxx
@@ -75,7 +75,7 @@ private:
void ExecuteGlobal( SfxRequest &rReq ); // called by Execute for all objects
static void GetGlobalClipState( SfxItemSet& rSet );
void ExecutePasteContents( SfxRequest &rReq );
- bool IsNoteEdit();
+ bool IsNoteEdit() const;
};
#endif
diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx
index f2a1da051093..de306709a2b6 100644
--- a/sc/source/ui/inc/filtdlg.hxx
+++ b/sc/source/ui/inc/filtdlg.hxx
@@ -60,7 +60,7 @@ public:
virtual void Close() override;
void SliderMoved();
- size_t GetSliderPos();
+ size_t GetSliderPos() const;
void RefreshEditRow( size_t nOffset );
private:
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index cdbd9b83f7a0..dfbfdaef2793 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -310,7 +310,7 @@ public:
virtual void KeyInput(const KeyEvent& rKEvt) override;
// #i70788# flush and get overlay
- rtl::Reference<sdr::overlay::OverlayManager> getOverlayManager();
+ rtl::Reference<sdr::overlay::OverlayManager> getOverlayManager() const;
void flushOverlayManager();
virtual void Command( const CommandEvent& rCEvt ) override;
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index e4317794beeb..a60d879cb091 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -93,11 +93,11 @@ public:
virtual void Resize() override;
long GetPixelHeightForLines(long nLines);
- long GetEditEngTxtHeight();
+ long GetEditEngTxtHeight() const;
- long GetNumLines() { return mnLines; }
+ long GetNumLines() const { return mnLines; }
void SetNumLines(long nLines);
- long GetLastNumExpandedLines() { return mnLastExpandedLines; }
+ long GetLastNumExpandedLines() const { return mnLastExpandedLines; }
void DoScroll();
@@ -190,8 +190,8 @@ public:
virtual void InsertAccessibleTextData(ScAccessibleEditLineTextData& rTextData) override;
virtual EditView* GetEditView() override;
- long GetLastNumExpandedLines();
- long GetNumLines();
+ long GetLastNumExpandedLines() const;
+ long GetNumLines() const;
long GetPixelHeightForLines(long nLines);
ScrollBar& GetScrollBar();
virtual const OUString& GetTextString() const override;
@@ -236,8 +236,8 @@ public:
bool IsInputActive() override;
void IncrementVerticalSize();
void DecrementVerticalSize();
- long GetNumLines() { return maTextWndGroup->GetNumLines(); }
- long GetVertOffset() { return mnVertOffset; }
+ long GetNumLines() const { return maTextWndGroup->GetNumLines(); }
+ long GetVertOffset() const { return mnVertOffset; }
private:
void TriggerToolboxLayout();
diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx
index 6b056d55a779..9f23194c66ae 100644
--- a/sc/source/ui/inc/inscodlg.hxx
+++ b/sc/source/ui/inc/inscodlg.hxx
@@ -37,7 +37,7 @@ public:
bool IsSkipEmptyCells() const;
bool IsTranspose() const;
bool IsLink() const;
- InsCellCmd GetMoveMode();
+ InsCellCmd GetMoveMode() const;
void SetOtherDoc( bool bSet );
void SetFillMode( bool bSet );
diff --git a/sc/source/ui/inc/linkarea.hxx b/sc/source/ui/inc/linkarea.hxx
index c3ce69596f13..db95b5f9d90e 100644
--- a/sc/source/ui/inc/linkarea.hxx
+++ b/sc/source/ui/inc/linkarea.hxx
@@ -63,11 +63,11 @@ public:
const OUString& rOptions, const OUString& rSource,
sal_uLong nRefresh );
- OUString GetURL();
- OUString GetFilter(); // may be empty
- OUString GetOptions(); // filter options
- OUString GetSource(); // separated by ";"
- sal_uLong GetRefresh(); // 0 if disabled
+ OUString GetURL() const;
+ OUString GetFilter() const; // may be empty
+ OUString GetOptions() const; // filter options
+ OUString GetSource() const; // separated by ";"
+ sal_uLong GetRefresh() const; // 0 if disabled
};
#endif
diff --git a/sc/source/ui/inc/mergecellsdialog.hxx b/sc/source/ui/inc/mergecellsdialog.hxx
index 5fcbea926dda..87d030ca4e25 100644
--- a/sc/source/ui/inc/mergecellsdialog.hxx
+++ b/sc/source/ui/inc/mergecellsdialog.hxx
@@ -30,7 +30,7 @@ public:
ScMergeCellsDialog(weld::Window* pParent);
virtual ~ScMergeCellsDialog() override;
- ScMergeCellsOption GetMergeCellsOption();
+ ScMergeCellsOption GetMergeCellsOption() const;
};
diff --git a/sc/source/ui/inc/namemgrtable.hxx b/sc/source/ui/inc/namemgrtable.hxx
index 324ceef03657..3ee3925254cc 100644
--- a/sc/source/ui/inc/namemgrtable.hxx
+++ b/sc/source/ui/inc/namemgrtable.hxx
@@ -45,7 +45,7 @@ private:
int m_nId;
- void GetLine(ScRangeNameLine& aLine, weld::TreeIter& rEntry);
+ void GetLine(ScRangeNameLine& aLine, const weld::TreeIter& rEntry);
void Init();
const ScRangeData* findRangeData(const ScRangeNameLine& rLine);
@@ -68,7 +68,7 @@ public:
void SetEntry( const ScRangeNameLine& rLine );
void GetCurrentLine(ScRangeNameLine& rLine);
- bool IsMultiSelection();
+ bool IsMultiSelection() const;
std::vector<ScRangeNameLine> GetSelectedEntries();
};
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
index 8e572170a46e..40f28e091c03 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -116,7 +116,7 @@ public:
{
xDlg = pNaviDlg;
}
- SCCOL GetCol() { return nCol; }
+ SCCOL GetCol() const { return nCol; }
void SetCol( SCCOL nColNo );
protected:
@@ -148,7 +148,7 @@ public:
{
xDlg = pNaviDlg;
}
- SCROW GetRow() { return static_cast<SCROW>(GetValue()); }
+ SCROW GetRow() const { return static_cast<SCROW>(GetValue()); }
void SetRow(SCROW nRow) { SetValue(nRow); }
protected:
diff --git a/sc/source/ui/inc/output.hxx b/sc/source/ui/inc/output.hxx
index 943183ec5c76..dac11f924ac3 100644
--- a/sc/source/ui/inc/output.hxx
+++ b/sc/source/ui/inc/output.hxx
@@ -264,7 +264,7 @@ private:
void SetSyntaxColor( vcl::Font* pFont, const ScRefCellValue& rCell );
void SetEditSyntaxColor( EditEngine& rEngine, const ScRefCellValue& rCell );
- double GetStretch();
+ double GetStretch() const;
void DrawRotatedFrame(vcl::RenderContext& rRenderContext); // pixel
diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx
index 6c9ab3ac0b59..5f2a9e89f027 100644
--- a/sc/source/ui/inc/prevwsh.hxx
+++ b/sc/source/ui/inc/prevwsh.hxx
@@ -110,7 +110,7 @@ public:
void AddAccessibilityObject( SfxListener& rObject );
void RemoveAccessibilityObject( SfxListener& rObject );
void BroadcastAccessibility( const SfxHint &rHint );
- bool HasAccessibilityObjects();
+ bool HasAccessibilityObjects() const;
const ScPreviewLocationData& GetLocationData();
ScDocument& GetDocument();
diff --git a/sc/source/ui/inc/printfun.hxx b/sc/source/ui/inc/printfun.hxx
index 7184e6e15e3a..e16fd855a8bd 100644
--- a/sc/source/ui/inc/printfun.hxx
+++ b/sc/source/ui/inc/printfun.hxx
@@ -336,8 +336,8 @@ public:
sal_uInt16 GetRightMargin() const{return nRightMargin;}
sal_uInt16 GetTopMargin() const{return nTopMargin;}
sal_uInt16 GetBottomMargin() const{return nBottomMargin;}
- const ScPrintHFParam& GetHeader(){return aHdr;}
- const ScPrintHFParam& GetFooter(){return aFtr;}
+ const ScPrintHFParam& GetHeader() const {return aHdr;}
+ const ScPrintHFParam& GetFooter() const {return aFtr;}
bool HasPrintRange() const { return mbHasPrintRange;}
diff --git a/sc/source/ui/inc/select.hxx b/sc/source/ui/inc/select.hxx
index d3071f31e344..d1da97b13137 100644
--- a/sc/source/ui/inc/select.hxx
+++ b/sc/source/ui/inc/select.hxx
@@ -48,7 +48,7 @@ private:
bool bStarted;
ScAddress aAnchorPos;
- ScSplitPos GetWhich();
+ ScSplitPos GetWhich() const;
sal_uLong CalcUpdateInterval( const Size& rWinSize, const Point& rEffPos,
bool bLeftScroll, bool bTopScroll, bool bRightScroll, bool bBottomScroll );
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index f00bd76ff337..80888efebccb 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -333,7 +333,7 @@ public:
void UpdateAnchorHandles();
ScPageBreakData* GetPageBreakData() { return pPageBreakData.get(); }
- const std::vector<ScHighlightEntry>& GetHighlightRanges() { return maHighlightRanges; }
+ const std::vector<ScHighlightEntry>& GetHighlightRanges() const { return maHighlightRanges; }
void UpdatePageBreakData( bool bForcePaint = false );
@@ -399,7 +399,7 @@ public:
void InvertHorizontal( ScVSplitPos eWhich, long nDragPos );
void InvertVertical( ScHSplitPos eWhich, long nDragPos );
- Point GetInsertPos();
+ Point GetInsertPos() const;
Point GetChartInsertPos( const Size& rSize, const ScRange& rCellRange );
Point GetChartDialogPos( const Size& rDialogSize, const tools::Rectangle& rLogicChart );
@@ -607,10 +607,10 @@ public:
OUString getRowColumnHeaders(const tools::Rectangle& rRectangle);
static void OnLOKNoteStateChanged(const ScPostIt* pNote);
- SCROW GetLOKStartHeaderRow() { return mnLOKStartHeaderRow; }
- SCROW GetLOKEndHeaderRow() { return mnLOKEndHeaderRow; }
- SCCOL GetLOKStartHeaderCol() { return mnLOKStartHeaderCol; }
- SCCOL GetLOKEndHeaderCol() { return mnLOKEndHeaderCol; }
+ SCROW GetLOKStartHeaderRow() const { return mnLOKStartHeaderRow; }
+ SCROW GetLOKEndHeaderRow() const { return mnLOKEndHeaderRow; }
+ SCCOL GetLOKStartHeaderCol() const { return mnLOKStartHeaderCol; }
+ SCCOL GetLOKEndHeaderCol() const { return mnLOKEndHeaderCol; }
};
#endif
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index f1a67a7f96a8..9470e1697b0b 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -297,7 +297,7 @@ public:
void SetFormShellAtTop( bool bSet );
- ObjectSelectionType GetCurObjectSelectionType() { return eCurOST; }
+ ObjectSelectionType GetCurObjectSelectionType() const { return eCurOST; }
virtual ErrCode DoVerb(long nVerb) override;
@@ -366,7 +366,7 @@ public:
void AddAccessibilityObject( SfxListener& rObject );
void RemoveAccessibilityObject( SfxListener& rObject );
void BroadcastAccessibility( const SfxHint &rHint );
- bool HasAccessibilityObjects();
+ bool HasAccessibilityObjects() const;
bool ExecuteRetypePassDlg(ScPasswordHash eDesiredHash);
diff --git a/sc/source/ui/inc/transobj.hxx b/sc/source/ui/inc/transobj.hxx
index 1ebfd1a4e892..30828fc9a52f 100644
--- a/sc/source/ui/inc/transobj.hxx
+++ b/sc/source/ui/inc/transobj.hxx
@@ -92,7 +92,7 @@ public:
bool GetUseInApi() const { return m_bUseInApi; }
ScDocShell* GetSourceDocShell();
ScDocument* GetSourceDocument();
- ScMarkData GetSourceMarkData();
+ ScMarkData GetSourceMarkData() const;
void SetDrawPersist( const SfxObjectShellRef& rRef );
void SetDragHandlePos( SCCOL nX, SCROW nY );
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index 2bb9043e8fb3..2c562717f921 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -162,7 +162,7 @@ class ScValidationDlg
public:
explicit ScValidationDlg(weld::Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell* pTabViewSh);
virtual ~ScValidationDlg() override;
- static std::shared_ptr<SfxDialogController> Find1AliveObject(weld::Window *pAncestor)
+ static std::shared_ptr<SfxDialogController> Find1AliveObject(const weld::Window *pAncestor)
{
return SC_MOD()->Find1RefWindow(SLOTID, pAncestor);
}
@@ -188,7 +188,7 @@ public:
(m_pHandler->*m_pSetActiveHdl)();
}
- bool IsRefInputting(){ return m_bRefInputting; }
+ bool IsRefInputting() const { return m_bRefInputting; }
weld::Container* get_refinput_shrink_parent() { return m_xHBox.get(); }
virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) override
@@ -214,7 +214,7 @@ public:
(m_pHandler->*m_pRefInputDonePostHdl)();
}
- bool IsChildFocus();
+ bool IsChildFocus() const;
enum { SLOTID = SID_VALIDITY_REFERENCE };
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 8400027458d6..3750a9ba8049 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -364,7 +364,7 @@ public:
ScGridWindow* GetActiveWin(); // from View
const ScGridWindow* GetActiveWin() const;
ScDrawView* GetScDrawView(); // from View
- bool IsMinimized(); // from View
+ bool IsMinimized() const; // from View
void UpdateInputHandler( bool bForce = false );
@@ -478,7 +478,7 @@ public:
bool SimpleColMarked();
bool SimpleRowMarked();
- bool IsMultiMarked();
+ bool IsMultiMarked() const;
/** Disallow cell fill (Paste,Fill,...) on Ctrl+A all
selected or another high amount of selected cells.
@@ -494,9 +494,9 @@ public:
void GetFillData( SCCOL& rStartCol, SCROW& rStartRow,
SCCOL& rEndCol, SCROW& rEndRow );
void ResetFillMode();
- bool IsAnyFillMode() { return nFillMode != ScFillMode::NONE; }
- bool IsFillMode() { return nFillMode == ScFillMode::FILL; }
- ScFillMode GetFillMode() { return nFillMode; }
+ bool IsAnyFillMode() const { return nFillMode != ScFillMode::NONE; }
+ bool IsFillMode() const { return nFillMode == ScFillMode::FILL; }
+ ScFillMode GetFillMode() const { return nFillMode; }
SvxAdjust GetEditAdjust() const {return eEditAdjust; }
void SetEditAdjust( SvxAdjust eNewEditAdjust ) { eEditAdjust = eNewEditAdjust; }
@@ -553,7 +553,7 @@ public:
/// Force page size for PgUp/PgDown to overwrite the computation based on m_aVisArea.
void ForcePageUpDownOffset(long nTwips) { m_nLOKPageUpDownOffset = nTwips; }
- long GetPageUpDownOffset() { return m_nLOKPageUpDownOffset; }
+ long GetPageUpDownOffset() const { return m_nLOKPageUpDownOffset; }
void KillEditView();
void ResetEditView();
@@ -608,7 +608,7 @@ public:
SCCOL PrevCellsX( ScHSplitPos eWhichX ) const; // Cells on the preceding page
SCROW PrevCellsY( ScVSplitPos eWhichY ) const;
- bool IsOle();
+ bool IsOle() const;
void SetScreen( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
void SetScreen( const tools::Rectangle& rVisArea );
void SetScreenPos( const Point& rVisAreaStart );
@@ -639,7 +639,7 @@ public:
const Size& GetScenButSize() const { return aScenButSize; }
void SetScenButSize(const Size& rNew) { aScenButSize = rNew; }
- bool IsSelCtrlMouseClick() { return bSelCtrlMouseClick; }
+ bool IsSelCtrlMouseClick() const { return bSelCtrlMouseClick; }
static inline long ToPixel( sal_uInt16 nTwips, double nFactor );
diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx
index 6e4317c19bb8..50114022f934 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hxx
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -93,9 +93,9 @@ private:
* not checked; its parent is the first one to be checked, then all its
* parents get checked all the way to the root.
*/
- bool IsParentDirty(weld::TreeIter* pEntry) const;
+ bool IsParentDirty(const weld::TreeIter* pEntry) const;
- bool IsChildrenDirty(weld::TreeIter* pEntry) const;
+ bool IsChildrenDirty(const weld::TreeIter* pEntry) const;
void OkPressed();
void CancelPressed();
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 0660e44a6106..809fecc3bb81 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -402,7 +402,7 @@ OUString ScConflictsDlg::GetConflictString( const ScConflictsListEntry& rConflic
return aString;
}
-void ScConflictsDlg::SetActionString(const ScChangeAction* pAction, ScDocument* pDoc, weld::TreeIter& rEntry)
+void ScConflictsDlg::SetActionString(const ScChangeAction* pAction, ScDocument* pDoc, const weld::TreeIter& rEntry)
{
OSL_ENSURE( pAction, "ScConflictsDlg::GetActionString(): pAction is null!" );
OSL_ENSURE( pDoc, "ScConflictsDlg::GetActionString(): pDoc is null!" );
diff --git a/sc/source/ui/miscdlgs/inscodlg.cxx b/sc/source/ui/miscdlgs/inscodlg.cxx
index 33107ed575f8..d3edb5855c34 100644
--- a/sc/source/ui/miscdlgs/inscodlg.cxx
+++ b/sc/source/ui/miscdlgs/inscodlg.cxx
@@ -132,7 +132,7 @@ InsertDeleteFlags ScInsertContentsDlg::GetInsContentsCmdBits() const
: ScInsertContentsDlg::nPreviousChecks );
}
-InsCellCmd ScInsertContentsDlg::GetMoveMode()
+InsCellCmd ScInsertContentsDlg::GetMoveMode() const
{
if (bUsedShortCut)
return INS_NONE;
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx
index 1ad934835b26..bd4307c5cf78 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -281,7 +281,7 @@ void ScLinkedAreaDlg::UpdateEnable()
m_xFtSeconds->set_sensitive(bReload);
}
-OUString ScLinkedAreaDlg::GetURL()
+OUString ScLinkedAreaDlg::GetURL() const
{
if (m_pSourceShell)
{
@@ -291,7 +291,7 @@ OUString ScLinkedAreaDlg::GetURL()
return EMPTY_OUSTRING;
}
-OUString ScLinkedAreaDlg::GetFilter()
+OUString ScLinkedAreaDlg::GetFilter() const
{
if (m_pSourceShell)
{
@@ -301,7 +301,7 @@ OUString ScLinkedAreaDlg::GetFilter()
return OUString();
}
-OUString ScLinkedAreaDlg::GetOptions()
+OUString ScLinkedAreaDlg::GetOptions() const
{
if (m_pSourceShell)
{
@@ -311,7 +311,7 @@ OUString ScLinkedAreaDlg::GetOptions()
return OUString();
}
-OUString ScLinkedAreaDlg::GetSource()
+OUString ScLinkedAreaDlg::GetSource() const
{
OUStringBuffer aBuf;
std::vector<OUString> aSelection = m_xLbRanges->get_selected_rows_text();
@@ -324,7 +324,7 @@ OUString ScLinkedAreaDlg::GetSource()
return aBuf.makeStringAndClear();
}
-sal_uLong ScLinkedAreaDlg::GetRefresh()
+sal_uLong ScLinkedAreaDlg::GetRefresh() const
{
if (m_xBtnReload->get_active())
return sal::static_int_cast<sal_uLong>(m_xNfDelay->get_value());
diff --git a/sc/source/ui/miscdlgs/mergecellsdialog.cxx b/sc/source/ui/miscdlgs/mergecellsdialog.cxx
index b936890437ab..a5990d16c7bb 100644
--- a/sc/source/ui/miscdlgs/mergecellsdialog.cxx
+++ b/sc/source/ui/miscdlgs/mergecellsdialog.cxx
@@ -23,7 +23,7 @@ ScMergeCellsDialog::~ScMergeCellsDialog()
{
}
-ScMergeCellsOption ScMergeCellsDialog::GetMergeCellsOption()
+ScMergeCellsOption ScMergeCellsDialog::GetMergeCellsOption() const
{
if ( m_xRBMoveContent->get_active() )
return MoveContentHiddenCells;
diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx
index 9c4895a11a40..a8702d362b5a 100644
--- a/sc/source/ui/namedlg/namemgrtable.cxx
+++ b/sc/source/ui/namedlg/namemgrtable.cxx
@@ -35,7 +35,7 @@ void ScRangeManagerTable::DeleteSelectedEntries()
m_xTreeView->remove(*it);
}
-bool ScRangeManagerTable::IsMultiSelection()
+bool ScRangeManagerTable::IsMultiSelection() const
{
return m_xTreeView->count_selected_rows() > 1;
}
@@ -126,7 +126,7 @@ void ScRangeManagerTable::addEntry(const ScRangeNameLine& rLine, bool bSetCurEnt
m_xTreeView->set_cursor(nRow);
}
-void ScRangeManagerTable::GetLine(ScRangeNameLine& rLine, weld::TreeIter& rEntry)
+void ScRangeManagerTable::GetLine(ScRangeNameLine& rLine, const weld::TreeIter& rEntry)
{
rLine.aName = m_xTreeView->get_text(rEntry, 0);
rLine.aExpression = m_xTreeView->get_text(rEntry, 1);
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 610e603cd74b..f471e7f47e60 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -6303,7 +6303,7 @@ table::CellContentType SAL_CALL ScCellObj::getType()
return eRet;
}
-sal_Int32 ScCellObj::GetResultType_Impl()
+sal_Int32 ScCellObj::GetResultType_Impl() const
{
SolarMutexGuard aGuard;
sal_Int32 eRet = sheet::FormulaResult::STRING;
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 44226d05e2e4..df3b2bf1c428 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -1594,8 +1594,8 @@ public:
bool& rbRowSourceAmbiguous ) const;
bool inSameSingleRow( const RangeAnalyzer& rOther );
bool inSameSingleColumn( const RangeAnalyzer& rOther );
- SCROW getRowCount() { return mnRowCount; }
- SCCOL getColumnCount() { return mnColumnCount; }
+ SCROW getRowCount() const { return mnRowCount; }
+ SCCOL getColumnCount() const { return mnColumnCount; }
private:
bool mbEmpty;
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index e36b21b8aa98..5576c994f333 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -2173,7 +2173,7 @@ void ScDataPilotFieldObj::setUseCurrentPage( bool bUse )
}
}
-const DataPilotFieldAutoShowInfo* ScDataPilotFieldObj::getAutoShowInfo()
+const DataPilotFieldAutoShowInfo* ScDataPilotFieldObj::getAutoShowInfo() const
{
SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
@@ -2191,7 +2191,7 @@ void ScDataPilotFieldObj::setAutoShowInfo( const DataPilotFieldAutoShowInfo* pIn
}
}
-const DataPilotFieldLayoutInfo* ScDataPilotFieldObj::getLayoutInfo()
+const DataPilotFieldLayoutInfo* ScDataPilotFieldObj::getLayoutInfo() const
{
SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
@@ -2209,7 +2209,7 @@ void ScDataPilotFieldObj::setLayoutInfo( const DataPilotFieldLayoutInfo* pInfo )
}
}
-const DataPilotFieldReference* ScDataPilotFieldObj::getReference()
+const DataPilotFieldReference* ScDataPilotFieldObj::getReference() const
{
SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
@@ -2227,7 +2227,7 @@ void ScDataPilotFieldObj::setReference( const DataPilotFieldReference* pInfo )
}
}
-const DataPilotFieldSortInfo* ScDataPilotFieldObj::getSortInfo()
+const DataPilotFieldSortInfo* ScDataPilotFieldObj::getSortInfo() const
{
SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
@@ -2281,7 +2281,7 @@ void ScDataPilotFieldObj::setRepeatItemLabels( bool bShow )
}
}
-bool ScDataPilotFieldObj::hasGroupInfo()
+bool ScDataPilotFieldObj::hasGroupInfo() const
{
SolarMutexGuard aGuard;
ScDPObject* pDPObj = nullptr;
diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx
index f817dd8fbb90..1ded0545c49e 100644
--- a/sc/source/ui/vba/vbachartobjects.cxx
+++ b/sc/source/ui/vba/vbachartobjects.cxx
@@ -88,7 +88,7 @@ ScVbaChartObjects::removeByName(const OUString& _sChartName)
}
uno::Sequence< OUString >
-ScVbaChartObjects::getChartObjectNames()
+ScVbaChartObjects::getChartObjectNames() const
{
uno::Sequence< OUString > sChartNames;
try
diff --git a/sc/source/ui/vba/vbachartobjects.hxx b/sc/source/ui/vba/vbachartobjects.hxx
index 1d1878e25a40..4c2d03f96da6 100644
--- a/sc/source/ui/vba/vbachartobjects.hxx
+++ b/sc/source/ui/vba/vbachartobjects.hxx
@@ -41,7 +41,7 @@ public:
ScVbaChartObjects( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableCharts >& _xTableCharts, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier );
/// @throws css::script::BasicErrorException
- css::uno::Sequence< OUString > getChartObjectNames();
+ css::uno::Sequence< OUString > getChartObjectNames() const;
void removeByName(const OUString& _sChartName);
// XChartObjects
diff --git a/sc/source/ui/vba/vbacomment.cxx b/sc/source/ui/vba/vbacomment.cxx
index 12b7b012ba84..d78863cd1f78 100644
--- a/sc/source/ui/vba/vbacomment.cxx
+++ b/sc/source/ui/vba/vbacomment.cxx
@@ -65,7 +65,7 @@ ScVbaComment::getAnnotation()
}
uno::Reference< sheet::XSheetAnnotations >
-ScVbaComment::getAnnotations()
+ScVbaComment::getAnnotations() const
{
uno::Reference< sheet::XSheetCellRange > xSheetCellRange(mxRange, ::uno::UNO_QUERY_THROW );
uno::Reference< sheet::XSpreadsheet > xSheet = xSheetCellRange->getSpreadsheet();
diff --git a/sc/source/ui/vba/vbacomment.hxx b/sc/source/ui/vba/vbacomment.hxx
index 28139175d4c7..f93fb76e41e2 100644
--- a/sc/source/ui/vba/vbacomment.hxx
+++ b/sc/source/ui/vba/vbacomment.hxx
@@ -39,7 +39,7 @@ private:
/// @throws css::uno::RuntimeException
css::uno::Reference< css::sheet::XSheetAnnotation > getAnnotation();
/// @throws css::uno::RuntimeException
- css::uno::Reference< css::sheet::XSheetAnnotations > getAnnotations();
+ css::uno::Reference< css::sheet::XSheetAnnotations > getAnnotations() const;
/// @throws css::uno::RuntimeException
sal_Int32 getAnnotationIndex();
/// @throws css::uno::RuntimeException
diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx
index 1dee1070077f..16328c6eaa1d 100644
--- a/sc/source/ui/vba/vbainterior.cxx
+++ b/sc/source/ui/vba/vbainterior.cxx
@@ -124,7 +124,7 @@ ScVbaInterior::SetMixedColor()
}
uno::Reference< container::XIndexAccess >
-ScVbaInterior::getPalette()
+ScVbaInterior::getPalette() const
{
if ( !m_pScDoc )
throw uno::RuntimeException();
diff --git a/sc/source/ui/vba/vbainterior.hxx b/sc/source/ui/vba/vbainterior.hxx
index 6840997b245f..00c0c93e6682 100644
--- a/sc/source/ui/vba/vbainterior.hxx
+++ b/sc/source/ui/vba/vbainterior.hxx
@@ -40,7 +40,7 @@ class ScVbaInterior final : public ScVbaInterior_BASE
Color m_aPattColor;
sal_Int32 m_nPattern;
- css::uno::Reference< css::container::XIndexAccess > getPalette();
+ css::uno::Reference< css::container::XIndexAccess > getPalette() const;
css::uno::Reference< css::container::XNameContainer > GetAttributeContainer();
static css::uno::Any SetAttributeData( sal_Int32 nValue );
static sal_Int32 GetAttributeData( css::uno::Any const & aValue );
diff --git a/sc/source/ui/vba/vbanames.hxx b/sc/source/ui/vba/vbanames.hxx
index bfa1f77ca89f..35635a395094 100644
--- a/sc/source/ui/vba/vbanames.hxx
+++ b/sc/source/ui/vba/vbanames.hxx
@@ -33,7 +33,7 @@ class ScVbaNames final : public ScVbaNames_BASE
css::uno::Reference< css::frame::XModel > mxModel;
css::uno::Reference< css::sheet::XNamedRanges > mxNames;
- const css::uno::Reference< css::frame::XModel >& getModel() { return mxModel; }
+ const css::uno::Reference< css::frame::XModel >& getModel() const { return mxModel; }
public:
ScVbaNames( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel );
diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx
index 89c871edd3a8..3da93b39c235 100644
--- a/sc/source/ui/vba/vbapagebreaks.cxx
+++ b/sc/source/ui/vba/vbapagebreaks.cxx
@@ -70,7 +70,7 @@ public:
}
/// @throws uno::RuntimeException
- uno::Reference<container::XIndexAccess> getRowColContainer()
+ uno::Reference<container::XIndexAccess> getRowColContainer() const
{
uno::Reference< table::XColumnRowRange > xColumnRowRange( mxSheetPageBreak, uno::UNO_QUERY_THROW );
uno::Reference<container::XIndexAccess> xIndexAccess;
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 1bc8fcd885af..2f13a824a100 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1075,31 +1075,31 @@ public:
m_xCellRange.set(rCellRange, uno::UNO_QUERY_THROW);
}
/// @throws uno::RuntimeException
- uno::Reference< sheet::XSheetCellRange > getSheetCellRange()
+ uno::Reference< sheet::XSheetCellRange > getSheetCellRange() const
{
return uno::Reference< sheet::XSheetCellRange >(m_xCellRange, uno::UNO_QUERY_THROW);
}
/// @throws uno::RuntimeException
- uno::Reference< sheet::XSpreadsheet > getSpreadSheet()
+ uno::Reference< sheet::XSpreadsheet > getSpreadSheet() const
{
return getSheetCellRange()->getSpreadsheet();
}
/// @throws uno::RuntimeException
- uno::Reference< table::XCellRange > getCellRangeFromSheet()
+ uno::Reference< table::XCellRange > getCellRangeFromSheet() const
{
return uno::Reference< table::XCellRange >(getSpreadSheet(), uno::UNO_QUERY_THROW );
}
/// @throws uno::RuntimeException
- uno::Reference< sheet::XCellRangeAddressable > getCellRangeAddressable()
+ uno::Reference< sheet::XCellRangeAddressable > getCellRangeAddressable() const
{
return uno::Reference< sheet::XCellRangeAddressable >(m_xCellRange, ::uno::UNO_QUERY_THROW);
}
/// @throws uno::RuntimeException
- uno::Reference< sheet::XSheetCellCursor > getSheetCellCursor()
+ uno::Reference< sheet::XSheetCellCursor > getSheetCellCursor() const
{
return uno::Reference< sheet::XSheetCellCursor >( getSpreadSheet()->createCursorByRange( getSheetCellRange() ), uno::UNO_SET_THROW );
}
@@ -3583,7 +3583,7 @@ ScVbaRange::End( ::sal_Int32 Direction )
}
bool
-ScVbaRange::isSingleCellRange()
+ScVbaRange::isSingleCellRange() const
{
uno::Reference< sheet::XCellRangeAddressable > xAddressable( mxRange, uno::UNO_QUERY );
if ( xAddressable.is() )
@@ -4040,7 +4040,7 @@ ScVbaRange::getHeight()
}
awt::Point
-ScVbaRange::getPosition()
+ScVbaRange::getPosition() const
{
awt::Point aPoint;
uno::Reference< beans::XPropertySet > xProps;
diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx
index 67e5220f3c1e..7a9b1b21b1d8 100644
--- a/sc/source/ui/vba/vbarange.hxx
+++ b/sc/source/ui/vba/vbarange.hxx
@@ -114,7 +114,7 @@ class ScVbaRange : public ScVbaRange_BASE
/// @throws css::script::BasicErrorException
css::uno::Reference< ov::excel::XRange > SpecialCellsImpl( sal_Int32 nType, const css::uno::Any& _oValue);
/// @throws css::uno::RuntimeException
- css::awt::Point getPosition();
+ css::awt::Point getPosition() const;
/** Fires a Worksheet_Change event for this range or range list. */
void fireChangeEvent();
@@ -153,7 +153,7 @@ public:
virtual ~ScVbaRange() override;
virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() override { return this; }
- bool isSingleCellRange();
+ bool isSingleCellRange() const;
/// @throws css::uno::RuntimeException
static css::uno::Reference< ov::excel::XRange > getRangeObjectForName(
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index e9b4a04ab6bf..fd07496d5f1a 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -221,19 +221,19 @@ ScVbaWindow::init()
}
uno::Reference< beans::XPropertySet >
-ScVbaWindow::getControllerProps()
+ScVbaWindow::getControllerProps() const
{
return uno::Reference< beans::XPropertySet >( getController(), uno::UNO_QUERY_THROW );
}
uno::Reference< beans::XPropertySet >
-ScVbaWindow::getFrameProps()
+ScVbaWindow::getFrameProps() const
{
return uno::Reference< beans::XPropertySet >( getController()->getFrame(), uno::UNO_QUERY_THROW );
}
uno::Reference< awt::XDevice >
-ScVbaWindow::getDevice()
+ScVbaWindow::getDevice() const
{
return uno::Reference< awt::XDevice >( getWindow(), uno::UNO_QUERY_THROW );
}
diff --git a/sc/source/ui/vba/vbawindow.hxx b/sc/source/ui/vba/vbawindow.hxx
index ffa56eca908a..82ee004e8fac 100644
--- a/sc/source/ui/vba/vbawindow.hxx
+++ b/sc/source/ui/vba/vbawindow.hxx
@@ -37,11 +37,11 @@ private:
void init();
/// @throws css::uno::RuntimeException
- css::uno::Reference< css::beans::XPropertySet > getControllerProps();
+ css::uno::Reference< css::beans::XPropertySet > getControllerProps() const;
/// @throws css::uno::RuntimeException
- css::uno::Reference< css::beans::XPropertySet > getFrameProps();
+ css::uno::Reference< css::beans::XPropertySet > getFrameProps() const;
/// @throws css::uno::RuntimeException
- css::uno::Reference< css::awt::XDevice > getDevice();
+ css::uno::Reference< css::awt::XDevice > getDevice() const;
protected:
void SplitAtDefinedPosition( sal_Int32 nColumns, sal_Int32 nRows );
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index 6a8d27913acc..8621d4b2fecf 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -916,7 +916,7 @@ ScVbaWorksheet::hasMethod( const OUString& /*aName*/ )
}
uno::Reference< container::XNameAccess >
-ScVbaWorksheet::getFormControls()
+ScVbaWorksheet::getFormControls() const
{
uno::Reference< container::XNameAccess > xFormControls;
try
@@ -1017,7 +1017,7 @@ ScVbaWorksheet::getCodeName()
}
sal_Int16
-ScVbaWorksheet::getSheetID()
+ScVbaWorksheet::getSheetID() const
{
uno::Reference< sheet::XCellRangeAddressable > xAddressable( mxSheet, uno::UNO_QUERY_THROW ); // if ActiveSheet, mxSheet is null.
return xAddressable->getRangeAddress().Sheet;
diff --git a/sc/source/ui/vba/vbaworksheet.hxx b/sc/source/ui/vba/vbaworksheet.hxx
index b3e6532c132d..0cc22fa2ef8a 100644
--- a/sc/source/ui/vba/vbaworksheet.hxx
+++ b/sc/source/ui/vba/vbaworksheet.hxx
@@ -55,7 +55,7 @@ class ScVbaWorksheet : public WorksheetImpl_BASE
/// @throws css::uno::RuntimeException
css::uno::Reference< ov::excel::XRange > getSheetRange();
- css::uno::Reference< css::container::XNameAccess > getFormControls();
+ css::uno::Reference< css::container::XNameAccess > getFormControls() const;
css::uno::Any getControlShape( const OUString& sName );
css::uno::Any getButtons( const css::uno::Any &rIndex, bool bOptionButtons );
@@ -72,9 +72,9 @@ public:
virtual ~ScVbaWorksheet() override;
- const css::uno::Reference< css::frame::XModel >& getModel()
+ const css::uno::Reference< css::frame::XModel >& getModel() const
{ return mxModel; }
- const css::uno::Reference< css::sheet::XSpreadsheet >& getSheet()
+ const css::uno::Reference< css::sheet::XSpreadsheet >& getSheet() const
{ return mxSheet; }
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
css::uno::Reference< ov::excel::XWorksheet > createSheetCopyInNewDoc( const OUString& );
@@ -155,7 +155,7 @@ public:
// CodeName
virtual OUString SAL_CALL getCodeName() override;
/// @throws css::uno::RuntimeException
- sal_Int16 getSheetID();
+ sal_Int16 getSheetID() const;
virtual void SAL_CALL PrintOut( const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName, const css::uno::Any& IgnorePrintAreas ) override;
// XHelperInterface
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index 376de73ecc0b..e6b3fbc146dc 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -291,7 +291,7 @@ ScVbaWorksheets::Delete()
}
bool
-ScVbaWorksheets::isSelectedSheets()
+ScVbaWorksheets::isSelectedSheets() const
{
return !m_xSheets.is();
}
diff --git a/sc/source/ui/vba/vbaworksheets.hxx b/sc/source/ui/vba/vbaworksheets.hxx
index 05f37867dbf3..ada77fd32abe 100644
--- a/sc/source/ui/vba/vbaworksheets.hxx
+++ b/sc/source/ui/vba/vbaworksheets.hxx
@@ -40,7 +40,7 @@ public:
ScVbaWorksheets( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xSheets, const css::uno::Reference< css::frame::XModel >& xModel );
ScVbaWorksheets( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XEnumerationAccess >& xEnum, const css::uno::Reference< css::frame::XModel >& xModel );
- bool isSelectedSheets();
+ bool isSelectedSheets() const;
// XEnumerationAccess
virtual css::uno::Type SAL_CALL getElementType() override;
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 5bcdcd0c4d94..d7f88f710513 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -213,7 +213,7 @@ namespace
{
std::shared_ptr<SfxDialogController> m_xDlg;
public:
- ScValidationRegisteredDlg(weld::Window* pParent, std::shared_ptr<SfxDialogController>& rDlg)
+ ScValidationRegisteredDlg(weld::Window* pParent, const std::shared_ptr<SfxDialogController>& rDlg)
: m_xDlg(rDlg)
{
SC_MOD()->RegisterRefController(static_cast<sal_uInt16>(ScValidationDlg::SLOTID), m_xDlg, pParent);
diff --git a/sc/source/ui/view/cellsh4.cxx b/sc/source/ui/view/cellsh4.cxx
index 18ec442bb437..56d74cd4b86a 100644
--- a/sc/source/ui/view/cellsh4.cxx
+++ b/sc/source/ui/view/cellsh4.cxx
@@ -28,7 +28,7 @@
#include <document.hxx>
#include <sc.hrc>
-const VclPtr<vcl::Window>& ScCellShell::GetFrameWin()
+const VclPtr<vcl::Window>& ScCellShell::GetFrameWin() const
{
return pFrameWin;
}
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 131f744aef69..06f74bab50bd 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -6516,7 +6516,7 @@ void ScGridWindow::UpdateShrinkOverlay()
}
// #i70788# central method to get the OverlayManager safely
-rtl::Reference<sdr::overlay::OverlayManager> ScGridWindow::getOverlayManager()
+rtl::Reference<sdr::overlay::OverlayManager> ScGridWindow::getOverlayManager() const
{
SdrPageView* pPV = pViewData->GetView()->GetScDrawView()->GetSdrPageView();
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 337d7ab3223e..34c920993a6b 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -138,7 +138,7 @@ public:
void SetPatternSimple( const ScPatternAttr* pNew, const SfxItemSet* pSet );
- bool SetText( ScRefCellValue& rCell ); // TRUE -> drop pOldPattern
+ bool SetText( const ScRefCellValue& rCell ); // TRUE -> drop pOldPattern
void SetHashText();
void SetTextToWidthOrHash( ScRefCellValue& rCell, long nWidth );
void SetAutoText( const OUString& rAutoText );
@@ -487,7 +487,7 @@ static bool SameValue( const ScRefCellValue& rCell, const ScRefCellValue& rOldCe
rCell.mfValue == rOldCell.mfValue;
}
-bool ScDrawStringsVars::SetText( ScRefCellValue& rCell )
+bool ScDrawStringsVars::SetText( const ScRefCellValue& rCell )
{
bool bChanged = false;
@@ -815,7 +815,7 @@ bool ScDrawStringsVars::HasEditCharacters() const
return false;
}
-double ScOutputData::GetStretch()
+double ScOutputData::GetStretch() const
{
if ( mpRefDevice->IsMapModeEnabled() )
{
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 9c6c49f7e37a..7530f9f1b46e 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -1153,7 +1153,7 @@ void ScPreviewShell::BroadcastAccessibility( const SfxHint &rHint )
pAccessibilityBroadcaster->Broadcast( rHint );
}
-bool ScPreviewShell::HasAccessibilityObjects()
+bool ScPreviewShell::HasAccessibilityObjects() const
{
return pAccessibilityBroadcaster && pAccessibilityBroadcaster->HasListeners();
}
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index 4402e7cb11ad..617d5232867e 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -49,7 +49,7 @@ ScViewFunctionSet::ScViewFunctionSet( ScViewData* pNewViewData ) :
OSL_ENSURE(pViewData, "ViewData==0 at FunctionSet");
}
-ScSplitPos ScViewFunctionSet::GetWhich()
+ScSplitPos ScViewFunctionSet::GetWhich() const
{
if (pEngine)
return pEngine->GetWhich();
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 8e83b17ed267..50a026eb8007 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -1684,7 +1684,7 @@ void ScTabView::DoVSplit(long nSplitPos)
}
}
-Point ScTabView::GetInsertPos()
+Point ScTabView::GetInsertPos() const
{
ScDocument* pDoc = aViewData.GetDocument();
SCCOL nCol = aViewData.GetCurX();
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index ceb72764ea12..0e153d690b2b 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -238,7 +238,7 @@ void ScTabViewShell::BroadcastAccessibility( const SfxHint &rHint )
pAccessibilityBroadcaster->Broadcast( rHint );
}
-bool ScTabViewShell::HasAccessibilityObjects()
+bool ScTabViewShell::HasAccessibilityObjects() const
{
return pAccessibilityBroadcaster != nullptr;
}
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 7c6bc917543b..e01e53914c81 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1206,7 +1206,7 @@ bool ScViewData::SimpleRowMarked()
return false;
}
-bool ScViewData::IsMultiMarked()
+bool ScViewData::IsMultiMarked() const
{
// Test for "real" multi selection, calling MarkToSimple on a local copy,
// and taking filtered in simple area marks into account.
@@ -2705,7 +2705,7 @@ ScDrawView* ScViewData::GetScDrawView()
return pView->GetScDrawView();
}
-bool ScViewData::IsMinimized()
+bool ScViewData::IsMinimized() const
{
assert(pView && "IsMinimized() without View");
return pView->IsMinimized();
@@ -3515,7 +3515,7 @@ void ScViewData::UpdateInputHandler( bool bForce )
pViewShell->UpdateInputHandler( bForce );
}
-bool ScViewData::IsOle()
+bool ScViewData::IsOle() const
{
return pDocShell && pDocShell->IsOle();
}
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 148aba1d0443..2711953daac8 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -397,7 +397,7 @@ void ScXMLSourceDlg::SelectAllChildEntries(weld::TreeIter& rEntry)
} while (mxLbTree->iter_next_sibling(*xChild));
}
-bool ScXMLSourceDlg::IsParentDirty(weld::TreeIter* pEntry) const
+bool ScXMLSourceDlg::IsParentDirty(const weld::TreeIter* pEntry) const
{
std::unique_ptr<weld::TreeIter> xParent(mxLbTree->make_iterator(pEntry));
if (!mxLbTree->iter_parent(*xParent))
@@ -416,7 +416,7 @@ bool ScXMLSourceDlg::IsParentDirty(weld::TreeIter* pEntry) const
return false;
}
-bool ScXMLSourceDlg::IsChildrenDirty(weld::TreeIter* pEntry) const
+bool ScXMLSourceDlg::IsChildrenDirty(const weld::TreeIter* pEntry) const
{
std::unique_ptr<weld::TreeIter> xChild(mxLbTree->make_iterator(pEntry));
if (!mxLbTree->iter_children(*xChild))