summaryrefslogtreecommitdiff
path: root/sc/inc
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/inc
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/inc')
-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
20 files changed, 42 insertions, 42 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,