summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-25 13:10:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-25 14:45:42 +0200
commit407a126af45d93f83eb4dbdc358dd569bea4db6f (patch)
treedfeba7a3c19f88bcb7c26a31a400489283504e90
parent001e0e530f42b3838fa882ab77a3bb2b24f69ef7 (diff)
loplugin:constparam in sc part6
Change-Id: Ifbb921b820b7210e7f9539e45d4852764a1e9cbd Reviewed-on: https://gerrit.libreoffice.org/41563 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/inc/cellsuno.hxx2
-rw-r--r--sc/inc/fmtuno.hxx4
-rw-r--r--sc/inc/undorangename.hxx2
-rw-r--r--sc/source/core/tool/interpr4.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx8
-rw-r--r--sc/source/ui/drawfunc/fuconarc.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuconcustomshape.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuconpol.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuconrec.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuconuno.cxx2
-rw-r--r--sc/source/ui/drawfunc/futext.cxx2
-rw-r--r--sc/source/ui/drawfunc/graphsh.cxx2
-rw-r--r--sc/source/ui/drawfunc/mediash.cxx2
-rw-r--r--sc/source/ui/formdlg/formula.cxx6
-rw-r--r--sc/source/ui/inc/AnalysisOfVarianceDialog.hxx2
-rw-r--r--sc/source/ui/inc/acredlin.hxx6
-rw-r--r--sc/source/ui/inc/anyrefdg.hxx4
-rw-r--r--sc/source/ui/inc/areasdlg.hxx2
-rw-r--r--sc/source/ui/inc/autofmt.hxx2
-rw-r--r--sc/source/ui/inc/conflictsdlg.hxx2
-rw-r--r--sc/source/ui/inc/content.hxx2
-rw-r--r--sc/source/ui/inc/formula.hxx6
-rw-r--r--sc/source/ui/inc/fuconarc.hxx2
-rw-r--r--sc/source/ui/inc/fuconcustomshape.hxx2
-rw-r--r--sc/source/ui/inc/fuconpol.hxx2
-rw-r--r--sc/source/ui/inc/fuconrec.hxx2
-rw-r--r--sc/source/ui/inc/fuconuno.hxx2
-rw-r--r--sc/source/ui/inc/futext.hxx2
-rw-r--r--sc/source/ui/inc/graphsh.hxx2
-rw-r--r--sc/source/ui/inc/mediash.hxx2
-rw-r--r--sc/source/ui/inc/namedefdlg.hxx2
-rw-r--r--sc/source/ui/inc/namedlg.hxx2
-rw-r--r--sc/source/ui/inc/namemgrtable.hxx2
-rw-r--r--sc/source/ui/inc/undoblk.hxx2
-rw-r--r--sc/source/ui/inc/undotab.hxx2
-rw-r--r--sc/source/ui/inc/undoutil.hxx8
-rw-r--r--sc/source/ui/miscdlgs/acredlin.cxx6
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx6
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx2
-rw-r--r--sc/source/ui/miscdlgs/conflictsdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/retypepassdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/tabopdlg.cxx2
-rw-r--r--sc/source/ui/namedlg/namedefdlg.cxx2
-rw-r--r--sc/source/ui/namedlg/namedlg.cxx2
-rw-r--r--sc/source/ui/namedlg/namemgrtable.cxx2
-rw-r--r--sc/source/ui/navipi/content.cxx6
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx10
-rw-r--r--sc/source/ui/undo/undoblk.cxx2
-rw-r--r--sc/source/ui/undo/undoblk3.cxx2
-rw-r--r--sc/source/ui/undo/undocell.cxx2
-rw-r--r--sc/source/ui/undo/undorangename.cxx2
-rw-r--r--sc/source/ui/undo/undostyl.cxx2
-rw-r--r--sc/source/ui/undo/undotab.cxx4
-rw-r--r--sc/source/ui/undo/undoutil.cxx8
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx4
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx14
-rw-r--r--sc/source/ui/unoobj/condformatuno.cxx2
-rw-r--r--sc/source/ui/unoobj/dispuno.cxx2
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx4
59 files changed, 95 insertions, 95 deletions
diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index fdf46a8fcd99..b654141dcab5 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -504,7 +504,7 @@ public:
// uses ObjectShell from document, if set (returns NULL otherwise)
static css::uno::Reference<css::table::XCellRange>
- CreateRangeFromDoc( ScDocument* pDoc, const ScRange& rR );
+ CreateRangeFromDoc( const ScDocument* pDoc, const ScRange& rR );
virtual css::uno::Any SAL_CALL queryInterface(
const css::uno::Type & rType ) override;
diff --git a/sc/inc/fmtuno.hxx b/sc/inc/fmtuno.hxx
index f305493322fa..82e8b9acb445 100644
--- a/sc/inc/fmtuno.hxx
+++ b/sc/inc/fmtuno.hxx
@@ -79,7 +79,7 @@ private:
void AddEntry_Impl(const ScCondFormatEntryItem& aEntry);
public:
ScTableConditionalFormat() = delete;
- ScTableConditionalFormat(ScDocument* pDoc, sal_uLong nKey,
+ ScTableConditionalFormat(const ScDocument* pDoc, sal_uLong nKey,
SCTAB nTab, formula::FormulaGrammar::Grammar eGrammar);
virtual ~ScTableConditionalFormat() override;
@@ -193,7 +193,7 @@ private:
public:
ScTableValidationObj() = delete;
- ScTableValidationObj(ScDocument* pDoc, sal_uLong nKey,
+ ScTableValidationObj(const ScDocument* pDoc, sal_uLong nKey,
const formula::FormulaGrammar::Grammar eGrammar);
virtual ~ScTableValidationObj() override;
diff --git a/sc/inc/undorangename.hxx b/sc/inc/undorangename.hxx
index 2148afbb14cb..ea82cc56a552 100644
--- a/sc/inc/undorangename.hxx
+++ b/sc/inc/undorangename.hxx
@@ -48,7 +48,7 @@ class ScUndoAddRangeData : public ScSimpleUndo
{
public:
// nTab = -1 for global range names
- ScUndoAddRangeData(ScDocShell* pDocSh, ScRangeData* pRangeData, SCTAB nTab);
+ ScUndoAddRangeData(ScDocShell* pDocSh, const ScRangeData* pRangeData, SCTAB nTab);
virtual ~ScUndoAddRangeData() override;
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 810020a95131..282e9319a88c 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3132,7 +3132,7 @@ static uno::Any lcl_getSheetModule( const uno::Reference<table::XCellRange>& xCe
return uno::makeAny( xIf );
}
-static bool lcl_setVBARange( const ScRange& aRange, ScDocument* pDok, SbxVariable* pPar )
+static bool lcl_setVBARange( const ScRange& aRange, const ScDocument* pDok, SbxVariable* pPar )
{
bool bOk = false;
try
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index 2b44b67061aa..ef6140e4e13f 100644
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
@@ -60,8 +60,8 @@ static const char strWildcardRange[] = "%RANGE%";
OUString lclCreateMultiParameterFormula(
ScRangeList& aRangeList, const OUString& aFormulaTemplate,
- const OUString& aWildcard, ScDocument* pDocument,
- ScAddress::Details& aAddressDetails)
+ const OUString& aWildcard, const ScDocument* pDocument,
+ const ScAddress::Details& aAddressDetails)
{
OUString aResult;
for (size_t i = 0; i < aRangeList.size(); i++)
@@ -75,7 +75,7 @@ OUString lclCreateMultiParameterFormula(
return aResult;
}
-void lclMakeSubRangesList(ScRangeList& rRangeList, ScRange& rInputRange, ScStatisticsInputOutputDialog::GroupedBy aGroupedBy)
+void lclMakeSubRangesList(ScRangeList& rRangeList, const ScRange& rInputRange, ScStatisticsInputOutputDialog::GroupedBy aGroupedBy)
{
std::unique_ptr<DataRangeIterator> pIterator;
if (aGroupedBy == ScStatisticsInputOutputDialog::BY_COLUMN)
@@ -162,7 +162,7 @@ void ScAnalysisOfVarianceDialog::FactorChanged()
}
void ScAnalysisOfVarianceDialog::RowColumn(ScRangeList& rRangeList, AddressWalkerWriter& aOutput, FormulaTemplate& aTemplate,
- OUString& sFormula, GroupedBy aGroupedBy, ScRange* pResultRange)
+ const OUString& sFormula, GroupedBy aGroupedBy, ScRange* pResultRange)
{
if (pResultRange != nullptr)
pResultRange->aStart = aOutput.current();
diff --git a/sc/source/ui/drawfunc/fuconarc.cxx b/sc/source/ui/drawfunc/fuconarc.cxx
index 2dd3aeb0fb7e..8b24064561e6 100644
--- a/sc/source/ui/drawfunc/fuconarc.cxx
+++ b/sc/source/ui/drawfunc/fuconarc.cxx
@@ -27,7 +27,7 @@
#include <svx/sxciaitm.hxx>
FuConstArc::FuConstArc( ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
- SdrModel* pDoc, SfxRequest& rReq )
+ SdrModel* pDoc, const SfxRequest& rReq )
: FuConstruct( pViewSh, pWin, pViewP, pDoc, rReq )
{
}
diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx
index bef61ce4e14b..dc19c2a7a5c4 100644
--- a/sc/source/ui/drawfunc/fuconcustomshape.cxx
+++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx
@@ -37,7 +37,7 @@
using namespace com::sun::star;
-FuConstCustomShape::FuConstCustomShape( ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP, SdrModel* pDoc, SfxRequest& rReq )
+FuConstCustomShape::FuConstCustomShape( ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP, SdrModel* pDoc, const SfxRequest& rReq )
: FuConstruct( pViewSh, pWin, pViewP, pDoc, rReq )
{
const SfxItemSet* pArgs = rReq.GetArgs();
diff --git a/sc/source/ui/drawfunc/fuconpol.cxx b/sc/source/ui/drawfunc/fuconpol.cxx
index 37b836614f98..143a73e2a17d 100644
--- a/sc/source/ui/drawfunc/fuconpol.cxx
+++ b/sc/source/ui/drawfunc/fuconpol.cxx
@@ -28,7 +28,7 @@
#include <basegfx/point/b2dpoint.hxx>
FuConstPolygon::FuConstPolygon(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
- SdrModel* pDoc, SfxRequest& rReq)
+ SdrModel* pDoc, const SfxRequest& rReq)
: FuConstruct(pViewSh, pWin, pViewP, pDoc, rReq)
{
}
diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx
index 5239102cae0a..ca0406a5b59d 100644
--- a/sc/source/ui/drawfunc/fuconrec.cxx
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -43,7 +43,7 @@
#include "scresid.hxx"
FuConstRectangle::FuConstRectangle(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
- SdrModel* pDoc, SfxRequest& rReq)
+ SdrModel* pDoc, const SfxRequest& rReq)
: FuConstruct(pViewSh, pWin, pViewP, pDoc, rReq)
{
}
diff --git a/sc/source/ui/drawfunc/fuconuno.cxx b/sc/source/ui/drawfunc/fuconuno.cxx
index 7ec13faf3cc5..123b05b14904 100644
--- a/sc/source/ui/drawfunc/fuconuno.cxx
+++ b/sc/source/ui/drawfunc/fuconuno.cxx
@@ -23,7 +23,7 @@
#include "drawview.hxx"
FuConstUnoControl::FuConstUnoControl(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
- SdrModel* pDoc, SfxRequest& rReq)
+ SdrModel* pDoc, const SfxRequest& rReq)
: FuConstruct(pViewSh, pWin, pViewP, pDoc, rReq)
, nInventor(SdrInventor::Unknown)
, nIdentifier(0)
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index 2029cd71fd0f..47cd9c0031a2 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -102,7 +102,7 @@ static void lcl_UpdateHyphenator( Outliner& rOutliner, const SdrObject* pObj )
}
FuText::FuText(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
- SdrModel* pDoc, SfxRequest& rReq) :
+ SdrModel* pDoc, const SfxRequest& rReq) :
FuConstruct(pViewSh, pWin, pViewP, pDoc, rReq)
{
}
diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx
index 22af1f211fde..44a21ded58b7 100644
--- a/sc/source/ui/drawfunc/graphsh.cxx
+++ b/sc/source/ui/drawfunc/graphsh.cxx
@@ -102,7 +102,7 @@ void ScGraphicShell::GetFilterState( SfxItemSet& rSet )
SvxGraphicFilter::DisableGraphicFilterSlots( rSet );
}
-void ScGraphicShell::ExecuteFilter( SfxRequest& rReq )
+void ScGraphicShell::ExecuteFilter( const SfxRequest& rReq )
{
ScDrawView* pView = GetViewData()->GetScDrawView();
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
diff --git a/sc/source/ui/drawfunc/mediash.cxx b/sc/source/ui/drawfunc/mediash.cxx
index aabc12dea701..e2037306aae0 100644
--- a/sc/source/ui/drawfunc/mediash.cxx
+++ b/sc/source/ui/drawfunc/mediash.cxx
@@ -96,7 +96,7 @@ void ScMediaShell::GetMediaState( SfxItemSet& rSet )
}
}
-void ScMediaShell::ExecuteMedia( SfxRequest& rReq )
+void ScMediaShell::ExecuteMedia( const SfxRequest& rReq )
{
ScDrawView* pView = GetViewData()->GetScDrawView();
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 675b6eac9680..f597ec92b63c 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -63,7 +63,7 @@ using namespace com::sun::star;
// init/ shared functions for dialog
ScFormulaDlg::ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
- vcl::Window* pParent, ScViewData* pViewData,formula::IFunctionManager* _pFunctionMgr )
+ vcl::Window* pParent, const ScViewData* pViewData, const formula::IFunctionManager* _pFunctionMgr )
: formula::FormulaDlg( pB, pCW, pParent, _pFunctionMgr,this)
, m_aHelper(this,pB)
{
@@ -259,7 +259,7 @@ void ScFormulaDlg::dispose()
formula::FormulaDlg::dispose();
}
-bool ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl)
+bool ScFormulaDlg::IsInputHdl(const ScInputHandler* pHdl)
{
bool bAlive = false;
@@ -277,7 +277,7 @@ bool ScFormulaDlg::IsInputHdl(ScInputHandler* pHdl)
}
-ScInputHandler* ScFormulaDlg::GetNextInputHandler(ScDocShell* pDocShell, ScTabViewShell** ppViewSh)
+ScInputHandler* ScFormulaDlg::GetNextInputHandler(const ScDocShell* pDocShell, ScTabViewShell** ppViewSh)
{
ScInputHandler* pHdl=nullptr;
diff --git a/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx b/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx
index b29bbeb891c0..8d73ac101d1c 100644
--- a/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx
+++ b/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx
@@ -44,7 +44,7 @@ private:
AnovaFactor meFactor;
static void RowColumn(ScRangeList& rRangeList, AddressWalkerWriter& aOutput,
- FormulaTemplate& aTemplate, OUString& sFormula,
+ FormulaTemplate& aTemplate, const OUString& sFormula,
GroupedBy aGroupedBy, ScRange* pResultRange);
void AnovaSingleFactor(AddressWalkerWriter& output, FormulaTemplate& aTemplate);
diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
index 61c8fecd2858..952906f9c62c 100644
--- a/sc/source/ui/inc/acredlin.hxx
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -143,15 +143,15 @@ protected:
bool InsertChildren( ScChangeActionMap* pActionMap, SvTreeListEntry* pParent );
- void AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartAction, sal_uLong nEndAction);
+ void AppendChanges(const ScChangeTrack* pChanges,sal_uLong nStartAction, sal_uLong nEndAction);
void RemoveEntrys(sal_uLong nStartAction,sal_uLong nEndAction);
- void UpdateEntrys(ScChangeTrack* pChgTrack, sal_uLong nStartAction,sal_uLong nEndAction);
+ void UpdateEntrys(const ScChangeTrack* pChgTrack, sal_uLong nStartAction,sal_uLong nEndAction);
void UpdateView();
void ClearView();
- bool Expand(ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction,
+ bool Expand(const ScChangeTrack* pChanges,const ScChangeAction* pScChangeAction,
SvTreeListEntry* pEntry, bool bFilter = false);
public:
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index e0364a6f616b..3614a956ae84 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -78,7 +78,7 @@ public:
void ShowSimpleReference(const OUString& rStr);
void ShowFormulaReference(const OUString& rStr);
- bool ParseWithNames( ScRangeList& rRanges, const OUString& rStr, ScDocument* pDoc );
+ bool ParseWithNames( ScRangeList& rRanges, const OUString& rStr, const ScDocument* pDoc );
void Init();
void ShowReference(const OUString& rStr);
@@ -131,7 +131,7 @@ protected:
virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) override;
virtual void RefInputDone( bool bForced = false ) override;
- bool ParseWithNames( ScRangeList& rRanges, const OUString& rStr, ScDocument* pDoc );
+ bool ParseWithNames( ScRangeList& rRanges, const OUString& rStr, const ScDocument* pDoc );
public:
ScRefHandler( vcl::Window &rWindow, SfxBindings* pB, bool bBindRef );
diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx
index 6ad979c6243e..13572bb4652b 100644
--- a/sc/source/ui/inc/areasdlg.hxx
+++ b/sc/source/ui/inc/areasdlg.hxx
@@ -70,7 +70,7 @@ private:
void Impl_Reset();
bool Impl_CheckRefStrings();
void Impl_FillLists();
- bool Impl_GetItem( Edit* pEd, SfxStringItem& rItem );
+ bool Impl_GetItem( const Edit* pEd, SfxStringItem& rItem );
// Handler:
DECL_LINK( Impl_SelectHdl, ListBox&, void );
diff --git a/sc/source/ui/inc/autofmt.hxx b/sc/source/ui/inc/autofmt.hxx
index 17be4ab7d0e5..168e1e3cba38 100644
--- a/sc/source/ui/inc/autofmt.hxx
+++ b/sc/source/ui/inc/autofmt.hxx
@@ -44,7 +44,7 @@ class SC_DLLPUBLIC ScAutoFmtPreview : public vcl::Window
{
public:
ScAutoFmtPreview(vcl::Window* pParent);
- void DetectRTL(ScViewData *pViewData);
+ void DetectRTL(const ScViewData *pViewData);
virtual ~ScAutoFmtPreview() override;
virtual void dispose() override;
diff --git a/sc/source/ui/inc/conflictsdlg.hxx b/sc/source/ui/inc/conflictsdlg.hxx
index 81edfe2a1a71..65890dc1ec63 100644
--- a/sc/source/ui/inc/conflictsdlg.hxx
+++ b/sc/source/ui/inc/conflictsdlg.hxx
@@ -145,7 +145,7 @@ private:
OUString GetActionString( const ScChangeAction* pAction, ScDocument* pDoc );
void HandleListBoxSelection( bool bSelectHandle );
- static void SetConflictAction( SvTreeListEntry* pRootEntry, ScConflictAction eConflictAction );
+ static void SetConflictAction( const SvTreeListEntry* pRootEntry, ScConflictAction eConflictAction );
void KeepHandler( bool bMine );
void KeepAllHandler( bool bMine );
diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx
index 2c6329e3ecd7..89660103c71a 100644
--- a/sc/source/ui/inc/content.hxx
+++ b/sc/source/ui/inc/content.hxx
@@ -122,7 +122,7 @@ public:
OUString GetEntryAltText( SvTreeListEntry* pEntry ) const override;
OUString GetEntryLongDescription( SvTreeListEntry* pEntry ) const override;
- void ObjectFresh( ScContentId nType, SvTreeListEntry* pEntry = nullptr);
+ void ObjectFresh( ScContentId nType, const SvTreeListEntry* pEntry = nullptr);
void SetNavigatorDlgFlag(bool isInNavigateDlg){ bisInNavigatoeDlg=isInNavigateDlg;};
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual void KeyInput( const KeyEvent& rKEvt ) override;
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index 0c07a769a862..0fbd2c2b7a6d 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -53,7 +53,7 @@ class ScFormulaDlg : public formula::FormulaDlg,
public:
ScFormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
- vcl::Window* pParent, ScViewData* pViewData ,formula::IFunctionManager* _pFunctionMgr);
+ vcl::Window* pParent, const ScViewData* pViewData, const formula::IFunctionManager* _pFunctionMgr);
virtual ~ScFormulaDlg() override;
virtual void dispose() override;
@@ -105,8 +105,8 @@ protected:
virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) override;
static void SaveLRUEntry(const ScFuncDesc* pFuncDesc);
- static bool IsInputHdl(ScInputHandler* pHdl);
- static ScInputHandler* GetNextInputHandler(ScDocShell* pDocShell, ScTabViewShell** ppViewSh);
+ static bool IsInputHdl(const ScInputHandler* pHdl);
+ static ScInputHandler* GetNextInputHandler(const ScDocShell* pDocShell, ScTabViewShell** ppViewSh);
};
#endif // INCLUDED_SC_SOURCE_UI_INC_FORMULA_HXX
diff --git a/sc/source/ui/inc/fuconarc.hxx b/sc/source/ui/inc/fuconarc.hxx
index 3612edd676f3..13cb39a79835 100644
--- a/sc/source/ui/inc/fuconarc.hxx
+++ b/sc/source/ui/inc/fuconarc.hxx
@@ -27,7 +27,7 @@ class FuConstArc : public FuConstruct
{
public:
FuConstArc( ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
- SdrModel* pDoc, SfxRequest& rReq);
+ SdrModel* pDoc, const SfxRequest& rReq);
virtual ~FuConstArc() override;
// Mouse- & Key-Events
diff --git a/sc/source/ui/inc/fuconcustomshape.hxx b/sc/source/ui/inc/fuconcustomshape.hxx
index 5f5c34d91330..5e4801b25db1 100644
--- a/sc/source/ui/inc/fuconcustomshape.hxx
+++ b/sc/source/ui/inc/fuconcustomshape.hxx
@@ -30,7 +30,7 @@ class FuConstCustomShape : public FuConstruct
public:
FuConstCustomShape(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
- SdrModel* pDoc, SfxRequest& rReq);
+ SdrModel* pDoc, const SfxRequest& rReq);
virtual ~FuConstCustomShape() override;
// Mouse- & Key-Events
diff --git a/sc/source/ui/inc/fuconpol.hxx b/sc/source/ui/inc/fuconpol.hxx
index acfaf8a16e5f..a846f5ce6686 100644
--- a/sc/source/ui/inc/fuconpol.hxx
+++ b/sc/source/ui/inc/fuconpol.hxx
@@ -27,7 +27,7 @@ class FuConstPolygon : public FuConstruct
{
public:
FuConstPolygon(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
- SdrModel* pDoc, SfxRequest& rReq);
+ SdrModel* pDoc, const SfxRequest& rReq);
virtual ~FuConstPolygon() override;
// Mouse- & Key-Events
diff --git a/sc/source/ui/inc/fuconrec.hxx b/sc/source/ui/inc/fuconrec.hxx
index c5bfb16c6911..b18d38029c69 100644
--- a/sc/source/ui/inc/fuconrec.hxx
+++ b/sc/source/ui/inc/fuconrec.hxx
@@ -27,7 +27,7 @@ class FuConstRectangle : public FuConstruct
{
public:
FuConstRectangle(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
- SdrModel* pDoc, SfxRequest& rReq);
+ SdrModel* pDoc, const SfxRequest& rReq);
virtual ~FuConstRectangle() override;
// Mouse- & Key-Events
diff --git a/sc/source/ui/inc/fuconuno.hxx b/sc/source/ui/inc/fuconuno.hxx
index 1d6e26f4a02f..e6a9921c69a3 100644
--- a/sc/source/ui/inc/fuconuno.hxx
+++ b/sc/source/ui/inc/fuconuno.hxx
@@ -33,7 +33,7 @@ protected:
public:
FuConstUnoControl(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
- SdrModel* pDoc, SfxRequest& rReq);
+ SdrModel* pDoc, const SfxRequest& rReq);
virtual ~FuConstUnoControl() override;
// Mouse- & Key-Events
diff --git a/sc/source/ui/inc/futext.hxx b/sc/source/ui/inc/futext.hxx
index 092a0ed45f1e..0403dc944004 100644
--- a/sc/source/ui/inc/futext.hxx
+++ b/sc/source/ui/inc/futext.hxx
@@ -31,7 +31,7 @@ class FuText : public FuConstruct
{
public:
FuText(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pView,
- SdrModel* pDoc, SfxRequest& rReq);
+ SdrModel* pDoc, const SfxRequest& rReq);
virtual ~FuText() override;
diff --git a/sc/source/ui/inc/graphsh.hxx b/sc/source/ui/inc/graphsh.hxx
index 5964ff8038a0..90af11b492a0 100644
--- a/sc/source/ui/inc/graphsh.hxx
+++ b/sc/source/ui/inc/graphsh.hxx
@@ -49,7 +49,7 @@ public:
void Execute(SfxRequest& rReq);
void GetAttrState(SfxItemSet &rSet);
- void ExecuteFilter(SfxRequest& rReq);
+ void ExecuteFilter(const SfxRequest& rReq);
void GetFilterState(SfxItemSet &rSet);
void ExecuteExternalEdit(SfxRequest& rReq);
diff --git a/sc/source/ui/inc/mediash.hxx b/sc/source/ui/inc/mediash.hxx
index ac27c26022fb..3d07ee808ad1 100644
--- a/sc/source/ui/inc/mediash.hxx
+++ b/sc/source/ui/inc/mediash.hxx
@@ -42,7 +42,7 @@ public:
ScMediaShell(ScViewData* pData);
virtual ~ScMediaShell() override;
- void ExecuteMedia(SfxRequest& rReq);
+ void ExecuteMedia(const SfxRequest& rReq);
void GetMediaState(SfxItemSet &rSet);
};
diff --git a/sc/source/ui/inc/namedefdlg.hxx b/sc/source/ui/inc/namedefdlg.hxx
index 447a762af4f5..e879d1380e89 100644
--- a/sc/source/ui/inc/namedefdlg.hxx
+++ b/sc/source/ui/inc/namedefdlg.hxx
@@ -75,7 +75,7 @@ protected:
public:
ScNameDefDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
- ScViewData* pViewData, const std::map<OUString, ScRangeName*>& aRangeMap,
+ const ScViewData* pViewData, const std::map<OUString, ScRangeName*>& aRangeMap,
const ScAddress& aCursorPos, const bool bUndo);
virtual ~ScNameDefDlg() override;
diff --git a/sc/source/ui/inc/namedlg.hxx b/sc/source/ui/inc/namedlg.hxx
index 7101a5b50a1d..ef2a08d26b12 100644
--- a/sc/source/ui/inc/namedlg.hxx
+++ b/sc/source/ui/inc/namedlg.hxx
@@ -81,7 +81,7 @@ private:
private:
void Init();
- void UpdateChecks(ScRangeData* pData);
+ void UpdateChecks(const ScRangeData* pData);
void ShowOptions(const ScRangeNameLine& rLine);
bool IsNameValid();
diff --git a/sc/source/ui/inc/namemgrtable.hxx b/sc/source/ui/inc/namemgrtable.hxx
index cb9ab35dbe2f..fd6f8a888ed2 100644
--- a/sc/source/ui/inc/namemgrtable.hxx
+++ b/sc/source/ui/inc/namemgrtable.hxx
@@ -66,7 +66,7 @@ private:
public:
ScRangeManagerTable(SvSimpleTableContainer& rParent,
- std::map<OUString, std::unique_ptr<ScRangeName>>& rTabRangeNames,
+ const std::map<OUString, std::unique_ptr<ScRangeName>>& rTabRangeNames,
const ScAddress& rPos);
virtual ~ScRangeManagerTable() override;
virtual void dispose() override;
diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx
index dca1045ee5a0..7239f911d081 100644
--- a/sc/source/ui/inc/undoblk.hxx
+++ b/sc/source/ui/inc/undoblk.hxx
@@ -651,7 +651,7 @@ public:
virtual OUString GetComment() const override;
private:
- void DoChange(ScDocument* pDoc);
+ void DoChange(const ScDocument* pDoc);
std::unique_ptr<ScDocument> mpUndoDoc;
std::unique_ptr<ScDocument> mpRedoDoc;
SCTAB mnTab;
diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index 477ac208a969..ee2ade721dda 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -70,7 +70,7 @@ public:
ScUndoInsertTables(
ScDocShell* pNewDocShell,
SCTAB nTabNum,
- std::vector<OUString>& newNameList);
+ const std::vector<OUString>& newNameList);
virtual ~ScUndoInsertTables() override;
virtual void Undo() override;
diff --git a/sc/source/ui/inc/undoutil.hxx b/sc/source/ui/inc/undoutil.hxx
index b65e50667fcd..c8c8e523092a 100644
--- a/sc/source/ui/inc/undoutil.hxx
+++ b/sc/source/ui/inc/undoutil.hxx
@@ -31,13 +31,13 @@ class ScUndoUtil
{
public:
/** Mark Block (invisible - has to be repainted) */
- static void MarkSimpleBlock( ScDocShell* pDocShell,
+ static void MarkSimpleBlock( const ScDocShell* pDocShell,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ );
- static void MarkSimpleBlock( ScDocShell* pDocShell,
+ static void MarkSimpleBlock( const ScDocShell* pDocShell,
const ScAddress& rBlockStart,
const ScAddress& rBlockEnd );
- static void MarkSimpleBlock( ScDocShell* pDocShell,
+ static void MarkSimpleBlock( const ScDocShell* pDocShell,
const ScRange& rRange );
static void PaintMore( ScDocShell* pDocShell,
@@ -45,7 +45,7 @@ public:
/** Search for Data base range in Document ("untitled" or by region)
create new if not found */
- static ScDBData* GetOldDBData( ScDBData* pUndoData, ScDocument* pDoc, SCTAB nTab,
+ static ScDBData* GetOldDBData( const ScDBData* pUndoData, ScDocument* pDoc, SCTAB nTab,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
};
diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index eca4369b36c7..14a42a42af4d 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -1272,7 +1272,7 @@ bool ScAcceptChgDlg::InsertDeletedChildren(const ScChangeAction* pScChangeAction
}
bool ScAcceptChgDlg::Expand(
- ScChangeTrack* pChanges, const ScChangeAction* pScChangeAction,
+ const ScChangeTrack* pChanges, const ScChangeAction* pScChangeAction,
SvTreeListEntry* pEntry, bool bFilter)
{
bool bTheTestFlag = true;
@@ -1373,7 +1373,7 @@ IMPL_LINK( ScAcceptChgDlg, ExpandingHandle, SvTreeListBox*, pTable, bool )
return true;
}
-void ScAcceptChgDlg::AppendChanges(ScChangeTrack* pChanges,sal_uLong nStartAction,
+void ScAcceptChgDlg::AppendChanges(const ScChangeTrack* pChanges,sal_uLong nStartAction,
sal_uLong nEndAction)
{
if(pChanges!=nullptr)
@@ -1493,7 +1493,7 @@ void ScAcceptChgDlg::RemoveEntrys(sal_uLong nStartAction,sal_uLong nEndAction)
}
-void ScAcceptChgDlg::UpdateEntrys(ScChangeTrack* pChgTrack, sal_uLong nStartAction,sal_uLong nEndAction)
+void ScAcceptChgDlg::UpdateEntrys(const ScChangeTrack* pChgTrack, sal_uLong nStartAction,sal_uLong nEndAction)
{
pTheView->SetUpdateMode(false);
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 4fdcc9b223af..56b2a008b139 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -153,7 +153,7 @@ void ScFormulaReferenceHelper::ShowSimpleReference(const OUString& rStr)
}
}
-bool ScFormulaReferenceHelper::ParseWithNames( ScRangeList& rRanges, const OUString& rStr, ScDocument* pDoc )
+bool ScFormulaReferenceHelper::ParseWithNames( ScRangeList& rRanges, const OUString& rStr, const ScDocument* pDoc )
{
bool bError = false;
rRanges.RemoveAll();
@@ -422,7 +422,7 @@ typedef std::set<VclPtr<vcl::Window> > winset;
namespace
{
- void hideUnless(vcl::Window *pTop, const winset& rVisibleWidgets,
+ void hideUnless(const vcl::Window *pTop, const winset& rVisibleWidgets,
std::vector<VclPtr<vcl::Window> > &rWasVisibleWidgets)
{
for (vcl::Window* pChild = pTop->GetWindow(GetWindowType::FirstChild); pChild;
@@ -942,7 +942,7 @@ IMPL_LINK_NOARG(ScRefHandler, UpdateFocusHdl, Timer *, void)
}
}
-bool ScRefHandler::ParseWithNames( ScRangeList& rRanges, const OUString& rStr, ScDocument* pDoc )
+bool ScRefHandler::ParseWithNames( ScRangeList& rRanges, const OUString& rStr, const ScDocument* pDoc )
{
return m_aHelper.ParseWithNames( rRanges, rStr, pDoc );
}
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index 8fd590944c79..70bbc0b33b6e 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -423,7 +423,7 @@ void ScAutoFmtPreview::Init()
CalcLineMap();
}
-void ScAutoFmtPreview::DetectRTL(ScViewData *pViewData)
+void ScAutoFmtPreview::DetectRTL(const ScViewData *pViewData)
{
SCTAB nCurrentTab = pViewData->GetTabNo();
ScDocument* pDoc = pViewData->GetDocument();
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index d57041b56e9e..2c40bf2fdeae 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -595,7 +595,7 @@ IMPL_LINK_NOARG(ScConflictsDlg, UpdateSelectionHdl, Timer *, void)
}
}
-void ScConflictsDlg::SetConflictAction( SvTreeListEntry* pRootEntry, ScConflictAction eConflictAction )
+void ScConflictsDlg::SetConflictAction( const SvTreeListEntry* pRootEntry, ScConflictAction eConflictAction )
{
RedlinData* pUserData = static_cast< RedlinData* >( pRootEntry ? pRootEntry->GetUserData() : nullptr );
ScConflictsListEntry* pConflictEntry = static_cast< ScConflictsListEntry* >( pUserData ? pUserData->pData : nullptr );
diff --git a/sc/source/ui/miscdlgs/retypepassdlg.cxx b/sc/source/ui/miscdlgs/retypepassdlg.cxx
index e193e023f453..4dfafc4aaa8b 100644
--- a/sc/source/ui/miscdlgs/retypepassdlg.cxx
+++ b/sc/source/ui/miscdlgs/retypepassdlg.cxx
@@ -222,7 +222,7 @@ void ScRetypePassDlg::SetTableData(size_t nRowPos, SCTAB nTab)
}
}
-static bool lcl_IsInGoodStatus(ScPassHashProtectable* pProtected, ScPasswordHash eDesiredHash)
+static bool lcl_IsInGoodStatus(const ScPassHashProtectable* pProtected, ScPasswordHash eDesiredHash)
{
if (!pProtected || !pProtected->isProtected())
// Not protected.
diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx
index 101293a867d4..e26582b218ab 100644
--- a/sc/source/ui/miscdlgs/tabopdlg.cxx
+++ b/sc/source/ui/miscdlgs/tabopdlg.cxx
@@ -228,7 +228,7 @@ void ScTabOpDlg::RaiseError( ScTabOpErr eError )
pEd->GrabFocus();
}
-static bool lcl_Parse( const OUString& rString, ScDocument* pDoc, SCTAB nCurTab,
+static bool lcl_Parse( const OUString& rString, const ScDocument* pDoc, SCTAB nCurTab,
ScRefAddress& rStart, ScRefAddress& rEnd )
{
bool bRet = false;
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx
index eca7e79bbbe7..1e3631792ea8 100644
--- a/sc/source/ui/namedlg/namedefdlg.cxx
+++ b/sc/source/ui/namedlg/namedefdlg.cxx
@@ -25,7 +25,7 @@
#include "sc.hrc"
ScNameDefDlg::ScNameDefDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Window* pParent,
- ScViewData* pViewData, const std::map<OUString, ScRangeName*>& aRangeMap,
+ const ScViewData* pViewData, const std::map<OUString, ScRangeName*>& aRangeMap,
const ScAddress& aCursorPos, const bool bUndo )
: ScAnyRefDlg( pB, pCW, pParent, "DefineNameDialog", "modules/scalc/ui/definename.ui" )
,
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index 19e95c42de97..571dd6fbe02c 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -240,7 +240,7 @@ void ScNameDlg::SetActive()
RefInputDone();
}
-void ScNameDlg::UpdateChecks(ScRangeData* pData)
+void ScNameDlg::UpdateChecks(const ScRangeData* pData)
{
// remove handlers, we only want the handlers to process
// user input and not when we are syncing the controls with our internal
diff --git a/sc/source/ui/namedlg/namemgrtable.cxx b/sc/source/ui/namedlg/namemgrtable.cxx
index 50e6614b35f4..7279b0ea9b83 100644
--- a/sc/source/ui/namedlg/namemgrtable.cxx
+++ b/sc/source/ui/namedlg/namemgrtable.cxx
@@ -36,7 +36,7 @@ static OUString createEntryString(const ScRangeNameLine& rLine)
ScRangeManagerTable::InitListener::~InitListener() {}
ScRangeManagerTable::ScRangeManagerTable(SvSimpleTableContainer& rParent,
- std::map<OUString, std::unique_ptr<ScRangeName>>& rRangeMap,
+ const std::map<OUString, std::unique_ptr<ScRangeName>>& rRangeMap,
const ScAddress& rPos)
: SvSimpleTable( rParent, WB_SORT | WB_HSCROLL | WB_CLIPCHILDREN | WB_TABSTOP )
, maGlobalString( ScGlobal::GetRscString(STR_GLOBAL_SCOPE))
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index a715cf38181e..7bccbd5931d7 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -351,7 +351,7 @@ sal_uLong ScContentTree::GetChildIndex( SvTreeListEntry* pEntry ) const
return nChild;
}
-static OUString lcl_GetDBAreaRange( ScDocument* pDoc, const OUString& rDBName )
+static OUString lcl_GetDBAreaRange( const ScDocument* pDoc, const OUString& rDBName )
{
OUString aRet;
if (pDoc)
@@ -765,7 +765,7 @@ ScDocument* ScContentTree::GetSourceDocument()
}
//Move along and draw "*" sign .
-void ScContentTree::ObjectFresh( ScContentId nType, SvTreeListEntry* pEntry )
+void ScContentTree::ObjectFresh( ScContentId nType, const SvTreeListEntry* pEntry )
{
if ( bHiddenDoc && !pHiddenDocument )
return; // other document displayed
@@ -1200,7 +1200,7 @@ bool ScContentTree::DrawNamesChanged( ScContentId nType )
return !bEqual;
}
-static bool lcl_GetRange( ScDocument* pDoc, ScContentId nType, const OUString& rName, ScRange& rRange )
+static bool lcl_GetRange( const ScDocument* pDoc, ScContentId nType, const OUString& rName, ScRange& rRange )
{
bool bFound = false;
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index e182575863f3..7cc054ced048 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -55,8 +55,8 @@ enum {
// global functions (->at the end of the file):
-static bool lcl_CheckRepeatString( const OUString& rStr, ScDocument* pDoc, bool bIsRow, ScRange* pRange );
-static void lcl_GetRepeatRangeString( const ScRange* pRange, ScDocument* pDoc, bool bIsRow, OUString& rStr );
+static bool lcl_CheckRepeatString( const OUString& rStr, const ScDocument* pDoc, bool bIsRow, ScRange* pRange );
+static void lcl_GetRepeatRangeString( const ScRange* pRange, const ScDocument* pDoc, bool bIsRow, OUString& rStr );
#if 0
// this method is useful when debugging address flags.
@@ -312,7 +312,7 @@ void ScPrintAreasDlg::Impl_Reset()
pEdRepeatCol->SaveValue();
}
-bool ScPrintAreasDlg::Impl_GetItem( Edit* pEd, SfxStringItem& rItem )
+bool ScPrintAreasDlg::Impl_GetItem( const Edit* pEd, SfxStringItem& rItem )
{
OUString aRangeStr = pEd->GetText();
bool bDataChanged = pEd->IsValueChangedFromSaved();
@@ -714,7 +714,7 @@ static bool lcl_CheckRepeatOne( const OUString& rStr, formula::FormulaGrammar::A
return false;
}
-static bool lcl_CheckRepeatString( const OUString& rStr, ScDocument* pDoc, bool bIsRow, ScRange* pRange )
+static bool lcl_CheckRepeatString( const OUString& rStr, const ScDocument* pDoc, bool bIsRow, ScRange* pRange )
{
// Row: [valid row] rsep [valid row]
// Col: [valid col] rsep [valid col]
@@ -799,7 +799,7 @@ static bool lcl_CheckRepeatString( const OUString& rStr, ScDocument* pDoc, bool
return true;
}
-static void lcl_GetRepeatRangeString( const ScRange* pRange, ScDocument* pDoc, bool bIsRow, OUString& rStr )
+static void lcl_GetRepeatRangeString( const ScRange* pRange, const ScDocument* pDoc, bool bIsRow, OUString& rStr )
{
rStr.clear();
if (!pRange)
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 8573e1768485..5ca8efebab7c 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -1571,7 +1571,7 @@ void ScUndoConditionalFormatList::Redo()
DoChange(mpRedoDoc.get());
}
-void ScUndoConditionalFormatList::DoChange(ScDocument* pSrcDoc)
+void ScUndoConditionalFormatList::DoChange(const ScDocument* pSrcDoc)
{
ScDocument& rDoc = pDocShell->GetDocument();
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 95f466ad6dd4..a20832c5c550 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -1462,7 +1462,7 @@ bool ScUndoRefreshLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
return false;
}
-static ScAreaLink* lcl_FindAreaLink( sfx2::LinkManager* pLinkManager, const OUString& rDoc,
+static ScAreaLink* lcl_FindAreaLink( const sfx2::LinkManager* pLinkManager, const OUString& rDoc,
const OUString& rFlt, const OUString& rOpt,
const OUString& rSrc, const ScRange& rDest )
{
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index 173a569a8002..360135d6cb97 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -49,7 +49,7 @@ using std::shared_ptr;
namespace HelperNotifyChanges
{
- void NotifyIfChangesListeners(ScDocShell& rDocShell, const ScAddress &rPos,
+ void NotifyIfChangesListeners(const ScDocShell& rDocShell, const ScAddress &rPos,
const ScUndoEnterData::ValuesType &rOldValues)
{
if (ScModelObj* pModelObj = getMustPropagateChangesModel(rDocShell))
diff --git a/sc/source/ui/undo/undorangename.cxx b/sc/source/ui/undo/undorangename.cxx
index ec2564f357cf..793846cfd000 100644
--- a/sc/source/ui/undo/undorangename.cxx
+++ b/sc/source/ui/undo/undorangename.cxx
@@ -77,7 +77,7 @@ void ScUndoAllRangeNames::DoChange(const std::map<OUString, std::unique_ptr<ScRa
SfxGetpApp()->Broadcast(SfxHint(SfxHintId::ScAreasChanged));
}
-ScUndoAddRangeData::ScUndoAddRangeData(ScDocShell* pDocSh, ScRangeData* pRangeData, SCTAB nTab) :
+ScUndoAddRangeData::ScUndoAddRangeData(ScDocShell* pDocSh, const ScRangeData* pRangeData, SCTAB nTab) :
ScSimpleUndo(pDocSh),
mpRangeData(new ScRangeData(*pRangeData)),
mnTab(nTab)
diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx
index 1af29c7bc135..eabbfd08e823 100644
--- a/sc/source/ui/undo/undostyl.cxx
+++ b/sc/source/ui/undo/undostyl.cxx
@@ -86,7 +86,7 @@ OUString ScUndoModifyStyle::GetComment() const
return ScGlobal::GetRscString(pId);
}
-static void lcl_DocStyleChanged( ScDocument* pDoc, SfxStyleSheetBase* pStyle, bool bRemoved )
+static void lcl_DocStyleChanged( ScDocument* pDoc, const SfxStyleSheetBase* pStyle, bool bRemoved )
{
//! move to document or docshell
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index b7224b805423..0b41b3d460e0 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -153,7 +153,7 @@ bool ScUndoInsertTab::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoInsertTables::ScUndoInsertTables( ScDocShell* pNewDocShell,
SCTAB nTabNum,
- std::vector<OUString>& newNameList) :
+ const std::vector<OUString>& newNameList) :
ScSimpleUndo( pNewDocShell ),
pDrawUndo( nullptr ),
aNameList( newNameList ),
@@ -284,7 +284,7 @@ void ScUndoDeleteTab::SetChangeTrack()
nStartChangeAction = nEndChangeAction = 0;
}
-static SCTAB lcl_GetVisibleTabBefore( ScDocument& rDoc, SCTAB nTab )
+static SCTAB lcl_GetVisibleTabBefore( const ScDocument& rDoc, SCTAB nTab )
{
while ( nTab > 0 && !rDoc.IsVisible( nTab ) )
--nTab;
diff --git a/sc/source/ui/undo/undoutil.cxx b/sc/source/ui/undo/undoutil.cxx
index 7aba46f07e3a..41d2caf92e69 100644
--- a/sc/source/ui/undo/undoutil.cxx
+++ b/sc/source/ui/undo/undoutil.cxx
@@ -28,7 +28,7 @@
#include "global.hxx"
#include "markdata.hxx"
-void ScUndoUtil::MarkSimpleBlock( ScDocShell* pDocShell,
+void ScUndoUtil::MarkSimpleBlock( const ScDocShell* pDocShell,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ )
{
@@ -51,7 +51,7 @@ void ScUndoUtil::MarkSimpleBlock( ScDocShell* pDocShell,
}
}
-void ScUndoUtil::MarkSimpleBlock( ScDocShell* pDocShell,
+void ScUndoUtil::MarkSimpleBlock( const ScDocShell* pDocShell,
const ScAddress& rBlockStart,
const ScAddress& rBlockEnd )
{
@@ -59,14 +59,14 @@ void ScUndoUtil::MarkSimpleBlock( ScDocShell* pDocShell,
rBlockEnd.Col(), rBlockEnd.Row(), rBlockEnd.Tab() );
}
-void ScUndoUtil::MarkSimpleBlock( ScDocShell* pDocShell,
+void ScUndoUtil::MarkSimpleBlock( const ScDocShell* pDocShell,
const ScRange& rRange )
{
MarkSimpleBlock( pDocShell, rRange.aStart.Col(), rRange.aStart.Row(), rRange.aStart.Tab(),
rRange.aEnd.Col(), rRange.aEnd.Row(), rRange.aEnd.Tab() );
}
-ScDBData* ScUndoUtil::GetOldDBData( ScDBData* pUndoData, ScDocument* pDoc, SCTAB nTab,
+ScDBData* ScUndoUtil::GetOldDBData( const ScDBData* pUndoData, ScDocument* pDoc, SCTAB nTab,
SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 )
{
ScDBData* pRet = pDoc->GetDBAtArea( nTab, nCol1, nRow1, nCol2, nRow2 );
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 58ea904aa859..5dece97adb2f 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -2132,7 +2132,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCellRangesBase::getPropertySe
}
static void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::Any& rValue,
- ScPatternAttr& rPattern, ScDocument &rDoc,
+ ScPatternAttr& rPattern, const ScDocument &rDoc,
sal_uInt16& rFirstItemId, sal_uInt16& rSecondItemId )
{
rFirstItemId = rEntry.nWID;
@@ -4700,7 +4700,7 @@ uno::Sequence<OUString> SAL_CALL ScCellRangesObj::getSupportedServiceNames()
SCPARAPROPERTIES_SERVICE};
}
-uno::Reference<table::XCellRange> ScCellRangeObj::CreateRangeFromDoc( ScDocument* pDoc, const ScRange& rR )
+uno::Reference<table::XCellRange> ScCellRangeObj::CreateRangeFromDoc( const ScDocument* pDoc, const ScRange& rR )
{
SfxObjectShell* pObjSh = pDoc->GetDocumentShell();
if ( pObjSh && dynamic_cast<const ScDocShell*>( pObjSh) != nullptr )
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 766fc7d17fb3..972617d352ab 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -128,7 +128,7 @@ OUString lcl_createTableNumberList( const ::std::list< SCTAB > & rTableList )
return aBuffer.makeStringAndClear();
}
-uno::Reference< frame::XModel > lcl_GetXModel( ScDocument * pDoc )
+uno::Reference< frame::XModel > lcl_GetXModel( const ScDocument * pDoc )
{
uno::Reference< frame::XModel > xModel;
SfxObjectShell * pObjSh( pDoc ? pDoc->GetDocumentShell() : nullptr );
@@ -1361,7 +1361,7 @@ class ShrinkRefTokenToDataRange
ScDocument* mpDoc;
public:
explicit ShrinkRefTokenToDataRange(ScDocument* pDoc) : mpDoc(pDoc) {}
- void operator() (ScTokenRef& rRef)
+ void operator() (const ScTokenRef& rRef)
{
if (ScRefTokenHelper::isExternalRef(rRef))
return;
@@ -1641,8 +1641,8 @@ public:
void initRangeAnalyzer( const vector<ScTokenRef>& rTokens );
void analyzeRange( sal_Int32& rnDataInRows, sal_Int32& rnDataInCols,
bool& rbRowSourceAmbiguous ) const;
- bool inSameSingleRow( RangeAnalyzer& rOther );
- bool inSameSingleColumn( RangeAnalyzer& rOther );
+ bool inSameSingleRow( const RangeAnalyzer& rOther );
+ bool inSameSingleColumn( const RangeAnalyzer& rOther );
SCROW getRowCount() { return mnRowCount; }
SCCOL getColumnCount() { return mnColumnCount; }
@@ -1744,13 +1744,13 @@ void RangeAnalyzer::analyzeRange( sal_Int32& rnDataInRows,
rbRowSourceAmbiguous = true;
}
-bool RangeAnalyzer::inSameSingleRow( RangeAnalyzer& rOther )
+bool RangeAnalyzer::inSameSingleRow( const RangeAnalyzer& rOther )
{
return mnStartRow==rOther.mnStartRow &&
mnRowCount==1 && rOther.mnRowCount==1;
}
-bool RangeAnalyzer::inSameSingleColumn( RangeAnalyzer& rOther )
+bool RangeAnalyzer::inSameSingleColumn( const RangeAnalyzer& rOther )
{
return mnStartColumn==rOther.mnStartColumn &&
mnColumnCount==1 && rOther.mnColumnCount==1;
@@ -3173,7 +3173,7 @@ uno::Sequence< OUString > SAL_CALL ScChart2DataSequence::generateLabel(chart2::d
namespace {
-sal_uLong getDisplayNumberFormat(ScDocument* pDoc, const ScAddress& rPos)
+sal_uLong getDisplayNumberFormat(const ScDocument* pDoc, const ScAddress& rPos)
{
sal_uLong nFormat = pDoc->GetNumberFormat(rPos); // original format from cell.
return nFormat;
diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx
index 549fb6710fd4..99916105bf3e 100644
--- a/sc/source/ui/unoobj/condformatuno.cxx
+++ b/sc/source/ui/unoobj/condformatuno.cxx
@@ -646,7 +646,7 @@ void SAL_CALL ScCondFormatObj::removeVetoableChangeListener( const OUString&,
namespace {
-bool isObjectStillAlive(ScConditionalFormat* pFormat, const ScFormatEntry* pEntry)
+bool isObjectStillAlive(const ScConditionalFormat* pFormat, const ScFormatEntry* pEntry)
{
for(size_t i = 0, n= pFormat->size(); i < n; ++i)
{
diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx
index 885cf33de385..eafdb2293872 100644
--- a/sc/source/ui/unoobj/dispuno.cxx
+++ b/sc/source/ui/unoobj/dispuno.cxx
@@ -36,7 +36,7 @@ using namespace com::sun::star;
static const char cURLInsertColumns[] = ".uno:DataSourceBrowser/InsertColumns"; //data into text
static const char cURLDocDataSource[] = ".uno:DataSourceBrowser/DocumentDataSource";
-static uno::Reference<view::XSelectionSupplier> lcl_GetSelectionSupplier( SfxViewShell* pViewShell )
+static uno::Reference<view::XSelectionSupplier> lcl_GetSelectionSupplier( const SfxViewShell* pViewShell )
{
if ( pViewShell )
{
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index 6ed3b94fbe30..58d88da8aa7c 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -138,7 +138,7 @@ ScCondFormatEntryItem::ScCondFormatEntryItem() :
}
ScTableConditionalFormat::ScTableConditionalFormat(
- ScDocument* pDoc, sal_uLong nKey, SCTAB nTab, FormulaGrammar::Grammar eGrammar)
+ const ScDocument* pDoc, sal_uLong nKey, SCTAB nTab, FormulaGrammar::Grammar eGrammar)
{
// read the entry from the document...
@@ -575,7 +575,7 @@ void SAL_CALL ScTableConditionalEntry::setStyleName( const OUString& aStyleName
aData.maStyle = ScStyleNameConversion::ProgrammaticToDisplayName( aStyleName, SfxStyleFamily::Para );
}
-ScTableValidationObj::ScTableValidationObj(ScDocument* pDoc, sal_uLong nKey,
+ScTableValidationObj::ScTableValidationObj(const ScDocument* pDoc, sal_uLong nKey,
const formula::FormulaGrammar::Grammar eGrammar) :
aPropSet( lcl_GetValidatePropertyMap() )
{