summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-08-18 18:31:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-18 21:18:29 +0200
commit18f202011661397d10ca4c2fa28fcf57b62221b0 (patch)
tree5a867f5bee6205e13172bb5c61315552d5dc9870 /sc/source
parent2e74c1107bc8422ee7a819722f3f0a366127330f (diff)
loplugin:constparams
Change-Id: Ic7410f836e584df45101e78e345c8b3c8d355e09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/column3.cxx2
-rw-r--r--sc/source/core/data/drwlayer.cxx6
-rw-r--r--sc/source/core/data/postit.cxx2
-rw-r--r--sc/source/core/data/table3.cxx2
-rw-r--r--sc/source/filter/excel/xestyle.cxx4
-rw-r--r--sc/source/filter/inc/xestyle.hxx4
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx2
-rw-r--r--sc/source/ui/drawfunc/chartsh.cxx2
-rw-r--r--sc/source/ui/drawfunc/drawsh2.cxx2
-rw-r--r--sc/source/ui/inc/checklistmenu.hxx2
-rw-r--r--sc/source/ui/inc/docsh.hxx2
-rw-r--r--sc/source/ui/inc/gridwin.hxx2
-rw-r--r--sc/source/ui/inc/viewutil.hxx2
-rw-r--r--sc/source/ui/view/cellsh1.cxx2
-rw-r--r--sc/source/ui/view/gridwin4.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx2
-rw-r--r--sc/source/ui/view/viewutil.cxx2
18 files changed, 22 insertions, 22 deletions
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 1fee310edffa..b236eff858c7 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2423,7 +2423,7 @@ class FilterEntriesHandler
ScColumn& mrColumn;
ScFilterEntries& mrFilterEntries;
- void processCell(ScColumn& rColumn, SCROW nRow, ScRefCellValue& rCell)
+ void processCell(const ScColumn& rColumn, SCROW nRow, ScRefCellValue& rCell)
{
SvNumberFormatter* pFormatter = mrColumn.GetDoc().GetFormatTable();
OUString aStr;
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 59eddd4690ef..0e1f55f4d7c8 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -679,13 +679,13 @@ bool lcl_AreRectanglesApproxEqual(const tools::Rectangle& rRectA, const tools::R
return true;
}
-bool lcl_NeedsMirrorYCorrection(SdrObject* pObj)
+bool lcl_NeedsMirrorYCorrection(const SdrObject* pObj)
{
return pObj->GetObjIdentifier() == OBJ_CUSTOMSHAPE
- && static_cast<SdrObjCustomShape*>(pObj)->IsMirroredY();
+ && static_cast<const SdrObjCustomShape*>(pObj)->IsMirroredY();
}
-void lcl_SetLogicRectFromAnchor(SdrObject* pObj, ScDrawObjData& rAnchor, ScDocument* pDoc)
+void lcl_SetLogicRectFromAnchor(SdrObject* pObj, const ScDrawObjData& rAnchor, const ScDocument* pDoc)
{
// This is only used during initialization. At that time, shape handling is always LTR. No need
// to consider negative page.
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index c1e13308d455..8f1e2d3710f7 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -1241,7 +1241,7 @@ ScPostIt* ScNoteUtil::CreateNoteFromCaption(
ScPostIt* ScNoteUtil::CreateNoteFromObjectData(
ScDocument& rDoc, const ScAddress& rPos, std::unique_ptr<SfxItemSet> pItemSet,
- OutlinerParaObject* pOutlinerObj, const tools::Rectangle& rCaptionRect,
+ const OutlinerParaObject* pOutlinerObj, const tools::Rectangle& rCaptionRect,
bool bShown )
{
OSL_ENSURE( pItemSet && pOutlinerObj, "ScNoteUtil::CreateNoteFromObjectData - item set and outliner object expected" );
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 7db5edad1662..d6b5c1999788 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -3023,7 +3023,7 @@ void ScTable::TopTenQuery( ScQueryParam& rParam )
namespace {
-bool CanOptimizeQueryStringToNumber( SvNumberFormatter* pFormatter, sal_uInt32 nFormatIndex, bool& bDateFormat )
+bool CanOptimizeQueryStringToNumber( const SvNumberFormatter* pFormatter, sal_uInt32 nFormatIndex, bool& bDateFormat )
{
// tdf#105629: ScQueryEntry::ByValue queries are faster than ScQueryEntry::ByString.
// The problem with this optimization is that the autofilter dialog apparently converts
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 1382fa444ff4..0b6d5ae95277 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -3180,7 +3180,7 @@ sal_Int32 XclExpDxfs::GetDxfId( const OUString& rStyleName )
return -1;
}
-sal_Int32 XclExpDxfs::GetDxfByBackColor(Color& aColor)
+sal_Int32 XclExpDxfs::GetDxfByBackColor(Color aColor)
{
std::map<Color, sal_Int32>::iterator itr = maBackColorToDxfId.find(aColor);
if (itr != maBackColorToDxfId.end())
@@ -3188,7 +3188,7 @@ sal_Int32 XclExpDxfs::GetDxfByBackColor(Color& aColor)
return -1;
}
-sal_Int32 XclExpDxfs::GetDxfByForeColor(Color& aColor)
+sal_Int32 XclExpDxfs::GetDxfByForeColor(Color aColor)
{
std::map<Color, sal_Int32>::iterator itr = maForeColorToDxfId.find(aColor);
if (itr != maForeColorToDxfId.end())
diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx
index 70bd9b7fa0b2..d7588c72067a 100644
--- a/sc/source/filter/inc/xestyle.hxx
+++ b/sc/source/filter/inc/xestyle.hxx
@@ -749,8 +749,8 @@ public:
XclExpDxfs( const XclExpRoot& rRoot );
sal_Int32 GetDxfId(const OUString& rName);
- sal_Int32 GetDxfByBackColor(Color& aColor);
- sal_Int32 GetDxfByForeColor(Color& aColor);
+ sal_Int32 GetDxfByBackColor(Color aColor);
+ sal_Int32 GetDxfByForeColor(Color aColor);
virtual void SaveXml( XclExpXmlStream& rStrm) override;
private:
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index b5dfc71cf24b..60e57b59f72e 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -570,7 +570,7 @@ ScCheckListMenuControl::~ScCheckListMenuControl()
ScCheckListMenuWindow::ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* pDoc, bool bCanHaveSubMenu,
bool bTreeMode, int nWidth, ScCheckListMenuWindow* pParentMenu,
- vcl::ILibreOfficeKitNotifier* pNotifier)
+ const vcl::ILibreOfficeKitNotifier* pNotifier)
: DropdownDockingWindow(pParent)
, mxParentMenu(pParentMenu)
{
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index e188d5e58423..8be67a6e0461 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -110,7 +110,7 @@ using namespace ::com::sun::star;
#include <svx/xdef.hxx>
-void ScDocShell::SetInitialLinkUpdate( SfxMedium* pMed )
+void ScDocShell::SetInitialLinkUpdate( const SfxMedium* pMed )
{
if (pMed)
{
diff --git a/sc/source/ui/drawfunc/chartsh.cxx b/sc/source/ui/drawfunc/chartsh.cxx
index 95b06385335e..d93b4a4d4249 100644
--- a/sc/source/ui/drawfunc/chartsh.cxx
+++ b/sc/source/ui/drawfunc/chartsh.cxx
@@ -42,7 +42,7 @@ namespace drawing = com::sun::star::drawing;
namespace {
-bool inChartContext(ScTabViewShell* pViewShell)
+bool inChartContext(const ScTabViewShell* pViewShell)
{
SidebarController* pSidebar = SidebarController::GetSidebarControllerForView(pViewShell);
if (pSidebar)
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index cdcb9211450f..7a288ecbd100 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -311,7 +311,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // disable functions
svx::FontworkBar::getState( pView, rSet );
}
-static void setupFillColorForChart(SfxViewShell* pShell, SfxItemSet& rSet)
+static void setupFillColorForChart(const SfxViewShell* pShell, SfxItemSet& rSet)
{
if (!pShell)
return;
diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx
index 4f6cfca68b92..465a259d5463 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -308,7 +308,7 @@ public:
explicit ScCheckListMenuWindow(vcl::Window* pParent, ScDocument* pDoc,
bool bCanHaveSubMenu, bool bTreeMode, int nWidth = -1,
ScCheckListMenuWindow* pParentMenu = nullptr,
- vcl::ILibreOfficeKitNotifier* pNotifier = nullptr);
+ const vcl::ILibreOfficeKitNotifier* pNotifier = nullptr);
virtual void dispose() override;
virtual ~ScCheckListMenuWindow() override;
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 83cd3a20857e..c8267ef02222 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -294,7 +294,7 @@ public:
virtual void ReconnectDdeLink(SfxObjectShell& rServer) override;
void UpdateLinks() override;
- void SetInitialLinkUpdate( SfxMedium* pMedium );
+ void SetInitialLinkUpdate( const SfxMedium* pMedium );
void AllowLinkUpdate();
void ReloadAllLinks();
void ReloadTabLinks();
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index daf6c35b652c..10d9fc68557a 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -311,7 +311,7 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, public DropTargetHel
Timer maShowPageBreaksTimer;
bool bInitialPageBreaks;
- void SetupInitialPageBreaks(ScDocument& rDoc, SCTAB nTab, bool bSetup);
+ void SetupInitialPageBreaks(const ScDocument& rDoc, SCTAB nTab, bool bSetup);
DECL_LINK(InitiatePageBreaksTimer, Timer*, void);
protected:
virtual void PrePaint(vcl::RenderContext& rRenderContext) override;
diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx
index 228590b6aca4..c05b201c4ba0 100644
--- a/sc/source/ui/inc/viewutil.hxx
+++ b/sc/source/ui/inc/viewutil.hxx
@@ -41,7 +41,7 @@ enum class ScUpdateMode { All, Marks };
class SC_DLLPUBLIC ScViewUtil
{
public:
- static void ExecuteCharMap(const SvxFontItem& rOldFont, ScTabViewShell& rShell);
+ static void ExecuteCharMap(const SvxFontItem& rOldFont, const ScTabViewShell& rShell);
static bool IsActionShown( const ScChangeAction& rAction,
const ScChangeViewSettings& rSettings,
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 98ef8b4cbab0..505113ba9fdb 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -3037,7 +3037,7 @@ void SetupRangeForPivotTableDialog(const ScRange& rRange,
}
void ErrorOrRunPivotLayoutDialog(TranslateId pSrcErrorId,
- ScAddress& rDestPos,
+ const ScAddress& rDestPos,
ScModule* pScMod,
ScTabViewShell* pTabViewShell,
std::unique_ptr<ScDPObject>& pNewDPObject)
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 885ccfd104d3..eecf6a4d814b 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1275,7 +1275,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
}
-void ScGridWindow::SetupInitialPageBreaks(ScDocument& rDoc, SCTAB nTab, bool bSetup)
+void ScGridWindow::SetupInitialPageBreaks(const ScDocument& rDoc, SCTAB nTab, bool bSetup)
{
// tdf#124983, if option LibreOfficeDev Calc/View/Visual Aids/Page breaks
// is enabled, breaks should be visible. If the document is opened the first
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index f8f22b49b7ae..169b5e9b1348 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -90,7 +90,7 @@ using namespace sfx2::sidebar;
namespace {
-bool inChartContext(ScTabViewShell* pViewShell)
+bool inChartContext(const ScTabViewShell* pViewShell)
{
SidebarController* pSidebar = SidebarController::GetSidebarControllerForView(pViewShell);
if (pSidebar)
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index 5bb739cca971..cb4d8190ef7e 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -317,7 +317,7 @@ void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, sal
}
void ScViewUtil::ExecuteCharMap(const SvxFontItem& rOldFont,
- ScTabViewShell& rShell)
+ const ScTabViewShell& rShell)
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
SfxViewFrame& rFrame = *rShell.GetViewFrame();