From fd736c4f7910f5b876c3ab8b8e0e804aa83347a0 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 24 Aug 2017 09:26:25 +0200 Subject: loplugin:constparam in sc part4 Change-Id: I745f50257948a53ca07766955c4f4e86dd2a366e Reviewed-on: https://gerrit.libreoffice.org/41497 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/inc/colorscale.hxx | 2 +- sc/inc/formulacell.hxx | 4 ++-- sc/inc/formularesult.hxx | 2 +- sc/inc/scmod.hxx | 6 +++--- sc/inc/xmlwrap.hxx | 14 +++++++------- sc/inc/zforauto.hxx | 2 +- sc/source/core/data/colorscale.cxx | 2 +- sc/source/core/data/formulacell.cxx | 4 ++-- sc/source/core/tool/formularesult.cxx | 2 +- sc/source/core/tool/zforauto.cxx | 2 +- .../filter/xml/XMLChangeTrackingExportHelper.cxx | 4 ++-- .../filter/xml/XMLChangeTrackingExportHelper.hxx | 4 ++-- sc/source/filter/xml/XMLExportDDELinks.cxx | 2 +- sc/source/filter/xml/XMLExportDDELinks.hxx | 2 +- sc/source/filter/xml/XMLExportDataPilot.cxx | 20 ++++++++++---------- sc/source/filter/xml/XMLExportDataPilot.hxx | 20 ++++++++++---------- sc/source/filter/xml/XMLExportIterator.cxx | 2 +- sc/source/filter/xml/XMLExportIterator.hxx | 2 +- sc/source/filter/xml/XMLStylesExportHelper.cxx | 2 +- sc/source/filter/xml/XMLStylesExportHelper.hxx | 2 +- sc/source/filter/xml/XMLTableShapeImportHelper.cxx | 2 +- sc/source/filter/xml/XMLTableShapeImportHelper.hxx | 2 +- sc/source/filter/xml/XMLTableShapeResizer.cxx | 4 ++-- sc/source/filter/xml/XMLTableShapeResizer.hxx | 4 ++-- sc/source/filter/xml/xmlcelli.cxx | 2 +- sc/source/filter/xml/xmlexprt.cxx | 4 ++-- sc/source/filter/xml/xmlexprt.hxx | 4 ++-- sc/source/filter/xml/xmlimprt.cxx | 2 +- sc/source/filter/xml/xmlimprt.hxx | 2 +- sc/source/filter/xml/xmlsubti.cxx | 2 +- sc/source/filter/xml/xmlsubti.hxx | 4 ++-- sc/source/filter/xml/xmlwrap.cxx | 12 ++++++------ sc/source/ui/Accessibility/AccessibleCell.cxx | 4 ++-- sc/source/ui/Accessibility/AccessibleDocument.cxx | 2 +- .../Accessibility/AccessibleDocumentPagePreview.cxx | 8 ++++---- sc/source/ui/Accessibility/AccessiblePreviewCell.cxx | 2 +- sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx | 4 ++-- sc/source/ui/app/client.cxx | 2 +- sc/source/ui/app/drwtrans.cxx | 2 +- sc/source/ui/app/inputhdl.cxx | 14 +++++++------- sc/source/ui/app/inputwin.cxx | 4 ++-- sc/source/ui/app/scmod.cxx | 8 ++++---- sc/source/ui/app/transobj.cxx | 2 +- sc/source/ui/cctrl/checklistmenu.cxx | 6 +++--- sc/source/ui/condformat/condformatdlgentry.cxx | 8 ++++---- sc/source/ui/inc/AccessibleCell.hxx | 4 ++-- sc/source/ui/inc/AccessiblePreviewCell.hxx | 2 +- sc/source/ui/inc/AccessibleSpreadsheet.hxx | 4 ++-- sc/source/ui/inc/checklistmenu.hxx | 6 +++--- sc/source/ui/inc/client.hxx | 2 +- sc/source/ui/inc/drwtrans.hxx | 2 +- sc/source/ui/inc/inputhdl.hxx | 12 ++++++------ sc/source/ui/inc/inputwin.hxx | 2 +- sc/source/ui/inc/transobj.hxx | 2 +- 54 files changed, 123 insertions(+), 123 deletions(-) (limited to 'sc') diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx index 4fe901e8387d..0d33f1bb7146 100644 --- a/sc/inc/colorscale.hxx +++ b/sc/inc/colorscale.hxx @@ -68,7 +68,7 @@ public: void UpdateReference( const sc::RefUpdateContext& rCxt ); void UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt ); void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt ); - void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt ); + void UpdateMoveTab( const sc::RefUpdateMoveTabContext& rCxt ); const ScTokenArray* GetFormula() const; OUString GetFormula( formula::FormulaGrammar::Grammar eGrammar ) const; diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index a7843f875f7d..17db673be6fe 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -283,7 +283,7 @@ public: void UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt ); void UpdateInsertTabAbs(SCTAB nTable); void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt ); - void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt, SCTAB nTabNo ); + void UpdateMoveTab( const sc::RefUpdateMoveTabContext& rCxt, SCTAB nTabNo ); bool TestTabRefAbs(SCTAB nTable); void UpdateCompile( bool bForceIfNameInUse ); void FindRangeNamesInUse(sc::UpdatedRangeNames& rIndexes) const; @@ -373,7 +373,7 @@ public: OUString GetHybridFormula() const; - void SetResultMatrix( SCCOL nCols, SCROW nRows, const ScConstMatrixRef& pMat, formula::FormulaToken* pUL ); + void SetResultMatrix( SCCOL nCols, SCROW nRows, const ScConstMatrixRef& pMat, const formula::FormulaToken* pUL ); /** For import only: set a double result. Use this instead of SetHybridDouble() if there is no (temporary) diff --git a/sc/inc/formularesult.hxx b/sc/inc/formularesult.hxx index 033d45eccb1f..4797b5939522 100644 --- a/sc/inc/formularesult.hxx +++ b/sc/inc/formularesult.hxx @@ -207,7 +207,7 @@ public: SetHybridFormula() for formula string to be compiled later. */ SC_DLLPUBLIC void SetHybridFormula( const OUString & rFormula ); - SC_DLLPUBLIC void SetMatrix( SCCOL nCols, SCROW nRows, const ScConstMatrixRef& pMat, formula::FormulaToken* pUL ); + SC_DLLPUBLIC void SetMatrix( SCCOL nCols, SCROW nRows, const ScConstMatrixRef& pMat, const formula::FormulaToken* pUL ); /** Get the const ScMatrixFormulaCellToken* if token is of that type, else NULL. */ diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx index 3a85539dbe69..a5acf50dc2de 100644 --- a/sc/inc/scmod.hxx +++ b/sc/inc/scmod.hxx @@ -202,14 +202,14 @@ public: bool InputKeyEvent( const KeyEvent& rKEvt, bool bStartEdit = false ); SC_DLLPUBLIC void InputEnterHandler( ScEnterMode nBlockMode = ScEnterMode::NORMAL ); void InputCancelHandler(); - void InputSelection( EditView* pView ); - void InputChanged( EditView* pView ); + void InputSelection( const EditView* pView ); + void InputChanged( const EditView* pView ); ScInputHandler* GetInputHdl( ScTabViewShell* pViewSh = nullptr, bool bUseRef = true ); void SetRefInputHdl( ScInputHandler* pNew ); ScInputHandler* GetRefInputHdl() { return pRefInputHandler;} - void ViewShellGone(ScTabViewShell* pViewSh); + void ViewShellGone(const ScTabViewShell* pViewSh); void ViewShellChanged(bool bStopEditing = true); // communication with function-autopilot void InputGetSelection( sal_Int32& rStart, sal_Int32& rEnd ); diff --git a/sc/inc/xmlwrap.hxx b/sc/inc/xmlwrap.hxx index d2da6068ee4b..0d3e79432c97 100644 --- a/sc/inc/xmlwrap.hxx +++ b/sc/inc/xmlwrap.hxx @@ -69,19 +69,19 @@ class ScXMLImportWrapper css::uno::Reference< css::task::XStatusIndicator> GetStatusIndicator(); ErrCode ImportFromComponent(const css::uno::Reference& xContext, - css::uno::Reference& xModel, - css::uno::Reference& xParser, + const css::uno::Reference& xModel, + const css::uno::Reference& xParser, css::xml::sax::InputSource& aParserInput, const OUString& sComponentName, const OUString& sDocName, const OUString& sOldDocName, - css::uno::Sequence& aArgs, + const css::uno::Sequence& aArgs, bool bMustBeSuccessfull); bool ExportToComponent(const css::uno::Reference& xContext, - css::uno::Reference& xModel, - css::uno::Reference& xWriter, - css::uno::Sequence& aDescriptor, + const css::uno::Reference& xModel, + const css::uno::Reference& xWriter, + const css::uno::Sequence& aDescriptor, const OUString& sName, const OUString& sMediaType, const OUString& sComponentName, - css::uno::Sequence& aArgs, + const css::uno::Sequence& aArgs, ScMySharedData*& pSharedData); public: diff --git a/sc/inc/zforauto.hxx b/sc/inc/zforauto.hxx index f49af7fb4d21..16c02ae19304 100644 --- a/sc/inc/zforauto.hxx +++ b/sc/inc/zforauto.hxx @@ -34,7 +34,7 @@ class ScNumFormatAbbrev public: ScNumFormatAbbrev(); ScNumFormatAbbrev(const ScNumFormatAbbrev& aFormat); - ScNumFormatAbbrev(sal_uInt32 nFormat, SvNumberFormatter& rFormatter); + ScNumFormatAbbrev(sal_uInt32 nFormat, const SvNumberFormatter& rFormatter); void Load( SvStream& rStream, rtl_TextEncoding eByteStrSet ); // loading of the numberformats void Save( SvStream& rStream, rtl_TextEncoding eByteStrSet ) const; // saving of the numberformats void PutFormatIndex(sal_uInt32 nFormat, const SvNumberFormatter& rFormatter); diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index a5b56bd114d4..78a8d0bb4d38 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -261,7 +261,7 @@ void ScColorScaleEntry::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt ) SetRepaintCallback(mpFormat); } -void ScColorScaleEntry::UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt ) +void ScColorScaleEntry::UpdateMoveTab( const sc::RefUpdateMoveTabContext& rCxt ) { if (!mpCell) return; diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index e10e525342a9..e9a0e4c6652a 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -2405,7 +2405,7 @@ svl::SharedString ScFormulaCell::GetResultString() const return aResult.GetString(); } -void ScFormulaCell::SetResultMatrix( SCCOL nCols, SCROW nRows, const ScConstMatrixRef& pMat, formula::FormulaToken* pUL ) +void ScFormulaCell::SetResultMatrix( SCCOL nCols, SCROW nRows, const ScConstMatrixRef& pMat, const formula::FormulaToken* pUL ) { aResult.SetMatrix(nCols, nRows, pMat, pUL); } @@ -3448,7 +3448,7 @@ void ScFormulaCell::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt ) bCompile = true; } -void ScFormulaCell::UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt, SCTAB nTabNo ) +void ScFormulaCell::UpdateMoveTab( const sc::RefUpdateMoveTabContext& rCxt, SCTAB nTabNo ) { // Adjust tokens only when it's not grouped or grouped top cell. bool bAdjustCode = !mxGroup || mxGroup->mpTopCell == this; diff --git a/sc/source/core/tool/formularesult.cxx b/sc/source/core/tool/formularesult.cxx index 90becca556dc..bcd96cb8d98a 100644 --- a/sc/source/core/tool/formularesult.cxx +++ b/sc/source/core/tool/formularesult.cxx @@ -572,7 +572,7 @@ void ScFormulaResult::SetHybridFormula( const OUString & rFormula ) mbToken = true; } -void ScFormulaResult::SetMatrix( SCCOL nCols, SCROW nRows, const ScConstMatrixRef& pMat, formula::FormulaToken* pUL ) +void ScFormulaResult::SetMatrix( SCCOL nCols, SCROW nRows, const ScConstMatrixRef& pMat, const formula::FormulaToken* pUL ) { ResetToDefaults(); if (mbToken && mpToken) diff --git a/sc/source/core/tool/zforauto.cxx b/sc/source/core/tool/zforauto.cxx index 874b1feb6a4b..0488144910c8 100644 --- a/sc/source/core/tool/zforauto.cxx +++ b/sc/source/core/tool/zforauto.cxx @@ -40,7 +40,7 @@ ScNumFormatAbbrev::ScNumFormatAbbrev(const ScNumFormatAbbrev& aFormat) : } ScNumFormatAbbrev::ScNumFormatAbbrev(sal_uInt32 nFormat, - SvNumberFormatter& rFormatter) + const SvNumberFormatter& rFormatter) { PutFormatIndex(nFormat, rFormatter); } diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx index 517a100de572..dc5f3cb00df1 100644 --- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx +++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx @@ -464,7 +464,7 @@ void ScChangeTrackingExportHelper::AddInsertionAttributes(const ScChangeAction* } } -void ScChangeTrackingExportHelper::WriteInsertion(ScChangeAction* pAction) +void ScChangeTrackingExportHelper::WriteInsertion(const ScChangeAction* pAction) { AddInsertionAttributes(pAction); SvXMLElementExport aElemChange(rExport, XML_NAMESPACE_TABLE, XML_INSERTION, true, true); @@ -593,7 +593,7 @@ void ScChangeTrackingExportHelper::WriteMovement(ScChangeAction* pAction) WriteDependings(pAction); } -void ScChangeTrackingExportHelper::WriteRejection(ScChangeAction* pAction) +void ScChangeTrackingExportHelper::WriteRejection(const ScChangeAction* pAction) { SvXMLElementExport aElemChange(rExport, XML_NAMESPACE_TABLE, XML_REJECTION, true, true); WriteChangeInfo(pAction); diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx index 48ac0c7c4184..dd8cf285cc1e 100644 --- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx +++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.hxx @@ -67,12 +67,12 @@ class ScChangeTrackingExportHelper void WriteContentChange(ScChangeAction* pAction); void AddInsertionAttributes(const ScChangeAction* pAction); - void WriteInsertion(ScChangeAction* pAction); + void WriteInsertion(const ScChangeAction* pAction); void AddDeletionAttributes(const ScChangeActionDel* pAction); void WriteCutOffs(const ScChangeActionDel* pAction); void WriteDeletion(ScChangeAction* pAction); void WriteMovement(ScChangeAction* pAction); - void WriteRejection(ScChangeAction* pAction); + void WriteRejection(const ScChangeAction* pAction); void CollectCellAutoStyles(const ScCellValue& rCell); void CollectActionAutoStyles(const ScChangeAction* pAction); diff --git a/sc/source/filter/xml/XMLExportDDELinks.cxx b/sc/source/filter/xml/XMLExportDDELinks.cxx index 938ea02643fd..034860a75263 100644 --- a/sc/source/filter/xml/XMLExportDDELinks.cxx +++ b/sc/source/filter/xml/XMLExportDDELinks.cxx @@ -113,7 +113,7 @@ void ScXMLExportDDELinks::WriteTable(const sal_Int32 nPos) } } -void ScXMLExportDDELinks::WriteDDELinks(uno::Reference& xSpreadDoc) +void ScXMLExportDDELinks::WriteDDELinks(const uno::Reference& xSpreadDoc) { uno::Reference xPropertySet (xSpreadDoc, uno::UNO_QUERY); if (xPropertySet.is()) diff --git a/sc/source/filter/xml/XMLExportDDELinks.hxx b/sc/source/filter/xml/XMLExportDDELinks.hxx index 2360ef5a136c..5ff5719fd41e 100644 --- a/sc/source/filter/xml/XMLExportDDELinks.hxx +++ b/sc/source/filter/xml/XMLExportDDELinks.hxx @@ -34,7 +34,7 @@ class ScXMLExportDDELinks public: explicit ScXMLExportDDELinks(ScXMLExport& rExport); ~ScXMLExportDDELinks(); - void WriteDDELinks(css::uno::Reference < css::sheet::XSpreadsheetDocument >& xSpreadDoc); + void WriteDDELinks(const css::uno::Reference < css::sheet::XSpreadsheetDocument >& xSpreadDoc); }; #endif diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx index 8b3edddc997e..b9c4a84e745d 100644 --- a/sc/source/filter/xml/XMLExportDataPilot.cxx +++ b/sc/source/filter/xml/XMLExportDataPilot.cxx @@ -267,7 +267,7 @@ void ScXMLExportDataPilot::WriteDPFilter(const ScQueryParam& aQueryParam) } } -void ScXMLExportDataPilot::WriteFieldReference(ScDPSaveDimension* pDim) +void ScXMLExportDataPilot::WriteFieldReference(const ScDPSaveDimension* pDim) { const sheet::DataPilotFieldReference* pRef = pDim->GetReferenceValue(); if (pRef) @@ -334,7 +334,7 @@ void ScXMLExportDataPilot::WriteFieldReference(ScDPSaveDimension* pDim) rExport.CheckAttrList(); } -void ScXMLExportDataPilot::WriteSortInfo(ScDPSaveDimension* pDim) +void ScXMLExportDataPilot::WriteSortInfo(const ScDPSaveDimension* pDim) { const sheet::DataPilotFieldSortInfo* pSortInfo = pDim->GetSortInfo(); if (pSortInfo) @@ -368,7 +368,7 @@ void ScXMLExportDataPilot::WriteSortInfo(ScDPSaveDimension* pDim) } } -void ScXMLExportDataPilot::WriteAutoShowInfo(ScDPSaveDimension* pDim) +void ScXMLExportDataPilot::WriteAutoShowInfo(const ScDPSaveDimension* pDim) { const sheet::DataPilotFieldAutoShowInfo* pAutoInfo = pDim->GetAutoShowInfo(); if (pAutoInfo) @@ -399,7 +399,7 @@ void ScXMLExportDataPilot::WriteAutoShowInfo(ScDPSaveDimension* pDim) } } -void ScXMLExportDataPilot::WriteLayoutInfo(ScDPSaveDimension* pDim) +void ScXMLExportDataPilot::WriteLayoutInfo(const ScDPSaveDimension* pDim) { const sheet::DataPilotFieldLayoutInfo* pLayoutInfo = pDim->GetLayoutInfo(); if (pLayoutInfo) @@ -428,7 +428,7 @@ void ScXMLExportDataPilot::WriteLayoutInfo(ScDPSaveDimension* pDim) } } -void ScXMLExportDataPilot::WriteSubTotals(ScDPSaveDimension* pDim) +void ScXMLExportDataPilot::WriteSubTotals(const ScDPSaveDimension* pDim) { sal_Int32 nSubTotalCount = pDim->GetSubTotalsCount(); const OUString* pLayoutName = nullptr; @@ -453,7 +453,7 @@ void ScXMLExportDataPilot::WriteSubTotals(ScDPSaveDimension* pDim) } } -void ScXMLExportDataPilot::WriteMembers(ScDPSaveDimension* pDim) +void ScXMLExportDataPilot::WriteMembers(const ScDPSaveDimension* pDim) { const ScDPSaveDimension::MemberList &rMembers = pDim->GetMembers(); if (!rMembers.empty()) @@ -483,7 +483,7 @@ void ScXMLExportDataPilot::WriteMembers(ScDPSaveDimension* pDim) } } -void ScXMLExportDataPilot::WriteLevels(ScDPSaveDimension* pDim) +void ScXMLExportDataPilot::WriteLevels(const ScDPSaveDimension* pDim) { // #i114202# GetShowEmpty is only valid if HasShowEmpty is true. if (pDim->HasShowEmpty()) @@ -628,7 +628,7 @@ void ScXMLExportDataPilot::WriteNumGroupDim(const ScDPSaveNumGroupDimension* pNu } } -void ScXMLExportDataPilot::WriteGroupDimElements(ScDPSaveDimension* pDim, const ScDPDimensionSaveData* pDimData) +void ScXMLExportDataPilot::WriteGroupDimElements(const ScDPSaveDimension* pDim, const ScDPDimensionSaveData* pDimData) { const ScDPSaveGroupDimension* pGroupDim = nullptr; const ScDPSaveNumGroupDimension* pNumGroupDim = nullptr; @@ -670,7 +670,7 @@ void ScXMLExportDataPilot::WriteGroupDimElements(ScDPSaveDimension* pDim, const } } -void ScXMLExportDataPilot::WriteDimension(ScDPSaveDimension* pDim, const ScDPDimensionSaveData* pDimData) +void ScXMLExportDataPilot::WriteDimension(const ScDPSaveDimension* pDim, const ScDPDimensionSaveData* pDimData) { OUString aSrcDimName = ScDPUtil::getSourceDimensionName(pDim->GetName()); rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SOURCE_FIELD_NAME, aSrcDimName); @@ -713,7 +713,7 @@ void ScXMLExportDataPilot::WriteDimension(ScDPSaveDimension* pDim, const ScDPDim WriteGroupDimElements(pDim, pDimData); } -void ScXMLExportDataPilot::WriteDimensions(ScDPSaveData* pDPSave) +void ScXMLExportDataPilot::WriteDimensions(const ScDPSaveData* pDPSave) { const ScDPSaveData::DimsType& rDimensions = pDPSave->GetDimensions(); for (auto const& iter : rDimensions) diff --git a/sc/source/filter/xml/XMLExportDataPilot.hxx b/sc/source/filter/xml/XMLExportDataPilot.hxx index 48a0b8b8adce..dcba96e50224 100644 --- a/sc/source/filter/xml/XMLExportDataPilot.hxx +++ b/sc/source/filter/xml/XMLExportDataPilot.hxx @@ -47,20 +47,20 @@ class ScXMLExportDataPilot utl::SearchParam::SearchType eSearchType); void WriteDPFilter(const ScQueryParam& aQueryParam); - void WriteFieldReference(ScDPSaveDimension* pDim); - void WriteSortInfo(ScDPSaveDimension* pDim); - void WriteAutoShowInfo(ScDPSaveDimension* pDim); - void WriteLayoutInfo(ScDPSaveDimension* pDim); - void WriteSubTotals(ScDPSaveDimension* pDim); - void WriteMembers(ScDPSaveDimension* pDim); - void WriteLevels(ScDPSaveDimension* pDim); + void WriteFieldReference(const ScDPSaveDimension* pDim); + void WriteSortInfo(const ScDPSaveDimension* pDim); + void WriteAutoShowInfo(const ScDPSaveDimension* pDim); + void WriteLayoutInfo(const ScDPSaveDimension* pDim); + void WriteSubTotals(const ScDPSaveDimension* pDim); + void WriteMembers(const ScDPSaveDimension* pDim); + void WriteLevels(const ScDPSaveDimension* pDim); void WriteDatePart(sal_Int32 nPart); void WriteNumGroupInfo(const ScDPNumGroupInfo& pGroupInfo); void WriteGroupDimAttributes(const ScDPSaveGroupDimension* pGroupDim); - void WriteGroupDimElements(ScDPSaveDimension* pDim, const ScDPDimensionSaveData* pDimData); + void WriteGroupDimElements(const ScDPSaveDimension* pDim, const ScDPDimensionSaveData* pDimData); void WriteNumGroupDim(const ScDPSaveNumGroupDimension* pNumGroupDim); - void WriteDimension(ScDPSaveDimension* pDim, const ScDPDimensionSaveData* pDimData); - void WriteDimensions(ScDPSaveData* pDPSave); + void WriteDimension(const ScDPSaveDimension* pDim, const ScDPDimensionSaveData* pDimData); + void WriteDimensions(const ScDPSaveData* pDPSave); void WriteGrandTotal(::xmloff::token::XMLTokenEnum eOrient, bool bVisible, const OUString* pGrandTotal); diff --git a/sc/source/filter/xml/XMLExportIterator.cxx b/sc/source/filter/xml/XMLExportIterator.cxx index c4903e6f17ce..523336396d20 100644 --- a/sc/source/filter/xml/XMLExportIterator.cxx +++ b/sc/source/filter/xml/XMLExportIterator.cxx @@ -642,7 +642,7 @@ void ScMyNotEmptyCellsIterator::HasAnnotation(ScMyCell& aCell) } void ScMyNotEmptyCellsIterator::SetCurrentTable(const SCTAB nTable, - uno::Reference& rxTable) + const uno::Reference& rxTable) { aLastAddress.SetRow( 0 ); aLastAddress.SetCol( 0 ); diff --git a/sc/source/filter/xml/XMLExportIterator.hxx b/sc/source/filter/xml/XMLExportIterator.hxx index 196d3e5fb629..a11467cd216d 100644 --- a/sc/source/filter/xml/XMLExportIterator.hxx +++ b/sc/source/filter/xml/XMLExportIterator.hxx @@ -357,7 +357,7 @@ public: { pDetectiveOp = pNewDetectiveOp; } void SetCurrentTable(const SCTAB nTable, - css::uno::Reference& rxTable); + const css::uno::Reference& rxTable); void SkipTable(SCTAB nSkip); bool GetNext(ScMyCell& aCell, ScFormatRangeStyles* pCellStyles); diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx index 2a4683342ae8..e97eb57396d0 100644 --- a/sc/source/filter/xml/XMLStylesExportHelper.cxx +++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx @@ -281,7 +281,7 @@ OUString ScMyValidationsContainer::GetCondition(ScXMLExport& rExport, const ScMy return sCondition; } -OUString ScMyValidationsContainer::GetBaseCellAddress(ScDocument* pDoc, const ScAddress& aCell) +OUString ScMyValidationsContainer::GetBaseCellAddress(const ScDocument* pDoc, const ScAddress& aCell) { OUString sAddress; ScRangeStringConverter::GetStringFromAddress( sAddress, aCell, pDoc, ::formula::FormulaGrammar::CONV_OOO ); diff --git a/sc/source/filter/xml/XMLStylesExportHelper.hxx b/sc/source/filter/xml/XMLStylesExportHelper.hxx index 82f46ff4eb70..f78803b09e85 100644 --- a/sc/source/filter/xml/XMLStylesExportHelper.hxx +++ b/sc/source/filter/xml/XMLStylesExportHelper.hxx @@ -83,7 +83,7 @@ public: void AddValidation(const css::uno::Any& aAny, sal_Int32& nValidationIndex); static OUString GetCondition(ScXMLExport& rExport, const ScMyValidation& aValidation); - static OUString GetBaseCellAddress(ScDocument* pDoc, const ScAddress& aCell); + static OUString GetBaseCellAddress(const ScDocument* pDoc, const ScAddress& aCell); static void WriteMessage(ScXMLExport& rExport, const OUString& sTitle, const OUString& sMessage, const bool bShowMessage, const bool bIsHelpMessage); diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx index ce39ad48f2a9..681dead833f8 100644 --- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx +++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx @@ -52,7 +52,7 @@ XMLTableShapeImportHelper::~XMLTableShapeImportHelper() { } -void XMLTableShapeImportHelper::SetLayer(uno::Reference& rShape, SdrLayerID nLayerID, const OUString& sType) +void XMLTableShapeImportHelper::SetLayer(const uno::Reference& rShape, SdrLayerID nLayerID, const OUString& sType) { if ( sType == "com.sun.star.drawing.ControlShape" ) nLayerID = SC_LAYER_CONTROLS; diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.hxx b/sc/source/filter/xml/XMLTableShapeImportHelper.hxx index b0312049ed07..f75251405488 100644 --- a/sc/source/filter/xml/XMLTableShapeImportHelper.hxx +++ b/sc/source/filter/xml/XMLTableShapeImportHelper.hxx @@ -38,7 +38,7 @@ public: explicit XMLTableShapeImportHelper( ScXMLImport& rImp ); virtual ~XMLTableShapeImportHelper() override; - static void SetLayer(css::uno::Reference& rShape, SdrLayerID nLayerID, const OUString& sType); + static void SetLayer(const css::uno::Reference& rShape, SdrLayerID nLayerID, const OUString& sType); virtual void finishShape(css::uno::Reference< css::drawing::XShape >& rShape, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList, css::uno::Reference< css::drawing::XShapes >& rShapes) override; diff --git a/sc/source/filter/xml/XMLTableShapeResizer.cxx b/sc/source/filter/xml/XMLTableShapeResizer.cxx index 31f9bc2e93df..8d1705869d3a 100644 --- a/sc/source/filter/xml/XMLTableShapeResizer.cxx +++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx @@ -49,7 +49,7 @@ ScMyOLEFixer::~ScMyOLEFixer() { } -bool ScMyOLEFixer::IsOLE(uno::Reference< drawing::XShape >& rShape) +bool ScMyOLEFixer::IsOLE(const uno::Reference< drawing::XShape >& rShape) { return rShape->getShapeType() == "com.sun.star.drawing.OLE2Shape"; } @@ -107,7 +107,7 @@ void ScMyOLEFixer::CreateChartListener(ScDocument* pDoc, } } -void ScMyOLEFixer::AddOLE(uno::Reference & rShape, +void ScMyOLEFixer::AddOLE(const uno::Reference & rShape, const OUString &rRangeList) { ScMyToFixupOLE aShape; diff --git a/sc/source/filter/xml/XMLTableShapeResizer.hxx b/sc/source/filter/xml/XMLTableShapeResizer.hxx index f154bb37e96f..be6a97b5e812 100644 --- a/sc/source/filter/xml/XMLTableShapeResizer.hxx +++ b/sc/source/filter/xml/XMLTableShapeResizer.hxx @@ -48,8 +48,8 @@ public: explicit ScMyOLEFixer(ScXMLImport& rImport); ~ScMyOLEFixer(); - static bool IsOLE(css::uno::Reference< css::drawing::XShape >& rShape); - void AddOLE(css::uno::Reference & rShape, + static bool IsOLE(const css::uno::Reference< css::drawing::XShape >& rShape); + void AddOLE(const css::uno::Reference & rShape, const OUString &rRangeList); void FixupOLEs(); }; diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index b7595ea9c614..a3600057e661 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -1174,7 +1174,7 @@ void ScXMLTableRowCellContext::PutValueCell( const ScAddress& rCurrentPos ) namespace { -bool isEmptyOrNote( ScDocument* pDoc, const ScAddress& rCurrentPos ) +bool isEmptyOrNote( const ScDocument* pDoc, const ScAddress& rCurrentPos ) { CellType eType = pDoc->GetCellType(rCurrentPos); return (eType == CELLTYPE_NONE); diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 3464e0dfbd54..8c1a6442cf21 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -1846,7 +1846,7 @@ const ScXMLEditAttributeMap& ScXMLExport::GetEditAttributeMap() const return *mpEditAttrMap; } -void ScXMLExport::RegisterDefinedStyleNames( uno::Reference< css::sheet::XSpreadsheetDocument > & xSpreadDoc ) +void ScXMLExport::RegisterDefinedStyleNames( const uno::Reference< css::sheet::XSpreadsheetDocument > & xSpreadDoc ) { ScFormatSaveData* pFormatData = ScModelObj::getImplementation(xSpreadDoc)->GetFormatSaveData(); auto xAutoStylePool = GetAutoStylePool(); @@ -3719,7 +3719,7 @@ void ScXMLExport::SetRepeatAttribute(sal_Int32 nEqualCellCount, bool bIncProgres } } -bool ScXMLExport::IsEditCell(ScMyCell& rCell) +bool ScXMLExport::IsEditCell(const ScMyCell& rCell) { return rCell.maBaseCell.meType == CELLTYPE_EDIT; } diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx index 6a9b102281d3..965d8a303ee8 100644 --- a/sc/source/filter/xml/xmlexprt.hxx +++ b/sc/source/filter/xml/xmlexprt.hxx @@ -131,7 +131,7 @@ class ScXMLExport : public SvXMLExport sal_Int32 GetNumberFormatStyleIndex(sal_Int32 nNumFmt) const; void CollectSharedData(SCTAB& nTableCount, sal_Int32& nShapesCount); void CollectShapesAutoStyles(SCTAB nTableCount); - void RegisterDefinedStyleNames( css::uno::Reference< css::sheet::XSpreadsheetDocument > & xSpreadDoc ); + void RegisterDefinedStyleNames( const css::uno::Reference< css::sheet::XSpreadsheetDocument > & xSpreadDoc ); virtual void ExportFontDecls_() override; virtual void ExportStyles_( bool bUsed ) override; virtual void ExportAutoStyles_() override; @@ -186,7 +186,7 @@ class ScXMLExport : public SvXMLExport void WriteTableShapes(); void SetRepeatAttribute(sal_Int32 nEqualCellCount, bool bIncProgress); - static bool IsEditCell(ScMyCell& rCell); + static bool IsEditCell(const ScMyCell& rCell); bool IsCellEqual(ScMyCell& aCell1, ScMyCell& aCell2); void WriteCalculationSettings(const css::uno::Reference & xSpreadDoc); diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 4d89cf3cadac..a2fbbbb0d3c0 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -1409,7 +1409,7 @@ bool ScXMLImport::IsCurrencySymbol(const sal_Int32 nNumberFormat, const OUString return false; } -void ScXMLImport::SetType(uno::Reference & rProperties, +void ScXMLImport::SetType(const uno::Reference & rProperties, sal_Int32& rNumberFormat, const sal_Int16 nCellType, const OUString& rCurrency) diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx index f3b610b2ce24..caf3d953a3d6 100644 --- a/sc/source/filter/xml/xmlimprt.hxx +++ b/sc/source/filter/xml/xmlimprt.hxx @@ -791,7 +791,7 @@ public: ScMyStylesImportHelper* GetStylesImportHelper() { return pStylesImportHelper; } sal_Int32 SetCurrencySymbol(const sal_Int32 nKey, const OUString& rCurrency); bool IsCurrencySymbol(const sal_Int32 nNumberFormat, const OUString& sCurrencySymbol, const OUString& sBankSymbol); - void SetType(css::uno::Reference & rProperties, + void SetType(const css::uno::Reference & rProperties, sal_Int32& rNumberFormat, const sal_Int16 nCellType, const OUString& rCurrency); diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx index 593372406e91..b8a26391c46f 100644 --- a/sc/source/filter/xml/xmlsubti.cxx +++ b/sc/source/filter/xml/xmlsubti.cxx @@ -257,7 +257,7 @@ bool ScMyTables::HasXShapes() return !((maCurrentCellPos.Tab() != nCurrentXShapes) || !xShapes.is()); } -void ScMyTables::AddOLE(uno::Reference & rShape, +void ScMyTables::AddOLE(const uno::Reference & rShape, const OUString &rRangeList) { aFixupOLEs.AddOLE(rShape, rRangeList); diff --git a/sc/source/filter/xml/xmlsubti.hxx b/sc/source/filter/xml/xmlsubti.hxx index fc1be1654401..aa6870f5595f 100644 --- a/sc/source/filter/xml/xmlsubti.hxx +++ b/sc/source/filter/xml/xmlsubti.hxx @@ -77,7 +77,7 @@ public: void SetRowStyle(const OUString& rCellStyleName); void AddColumn(bool bIsCovered); void FixupOLEs() { aFixupOLEs.FixupOLEs(); } - static bool IsOLE(css::uno::Reference< css::drawing::XShape >& rShape) + static bool IsOLE(const css::uno::Reference< css::drawing::XShape >& rShape) { return ScMyOLEFixer::IsOLE(rShape); } void DeleteTable(); const ScAddress& GetCurrentCellPos() const { return maCurrentCellPos; }; @@ -95,7 +95,7 @@ public: GetCurrentXShapes(); bool HasDrawPage(); bool HasXShapes(); - void AddOLE(css::uno::Reference & rShape, + void AddOLE(const css::uno::Reference & rShape, const OUString &rRangeList); void AddMatrixRange( const SCCOL nStartColumn, diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index 530f08b5ab0e..05f84ef5d756 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -100,10 +100,10 @@ uno::Reference ScXMLImportWrapper::GetStatusIndicator() } ErrCode ScXMLImportWrapper::ImportFromComponent(const uno::Reference& xContext, - uno::Reference& xModel, uno::Reference& xParser, + const uno::Reference& xModel, const uno::Reference& xParser, xml::sax::InputSource& aParserInput, const OUString& sComponentName, const OUString& sDocName, - const OUString& sOldDocName, uno::Sequence& aArgs, + const OUString& sOldDocName, const uno::Sequence& aArgs, bool bMustBeSuccessfull) { uno::Reference < io::XStream > xDocStream; @@ -586,7 +586,7 @@ bool ScXMLImportWrapper::Import( ImportFlags nMode, ErrCode& rError ) return bRet;//!bStylesOnly ? bDocRetval : bStylesRetval; } -static bool lcl_HasValidStream(ScDocument& rDoc) +static bool lcl_HasValidStream(const ScDocument& rDoc) { SfxObjectShell* pObjSh = rDoc.GetDocumentShell(); if ( pObjSh->IsDocShared() ) @@ -606,10 +606,10 @@ static bool lcl_HasValidStream(ScDocument& rDoc) } bool ScXMLImportWrapper::ExportToComponent(const uno::Reference& xContext, - uno::Reference& xModel, uno::Reference& xWriter, - uno::Sequence& aDescriptor, const OUString& sName, + const uno::Reference& xModel, const uno::Reference& xWriter, + const uno::Sequence& aDescriptor, const OUString& sName, const OUString& sMediaType, const OUString& sComponentName, - uno::Sequence& aArgs, ScMySharedData*& pSharedData) + const uno::Sequence& aArgs, ScMySharedData*& pSharedData) { bool bRet(false); uno::Reference xOut; diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx index 02e746878198..3dc15bb19546 100644 --- a/sc/source/ui/Accessibility/AccessibleCell.cxx +++ b/sc/source/ui/Accessibility/AccessibleCell.cxx @@ -57,7 +57,7 @@ using namespace ::com::sun::star::accessibility; rtl::Reference ScAccessibleCell::create( const uno::Reference& rxParent, ScTabViewShell* pViewShell, - ScAddress& rCellAddress, + const ScAddress& rCellAddress, sal_Int32 nIndex, ScSplitPos eSplitPos, ScAccessibleDocument* pAccDoc) @@ -71,7 +71,7 @@ rtl::Reference ScAccessibleCell::create( ScAccessibleCell::ScAccessibleCell( const uno::Reference& rxParent, ScTabViewShell* pViewShell, - ScAddress& rCellAddress, + const ScAddress& rCellAddress, sal_Int32 nIndex, ScSplitPos eSplitPos, ScAccessibleDocument* pAccDoc) diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index 73bd5935733c..e973a417b6dd 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -213,7 +213,7 @@ struct DeselectShape struct SelectShape { uno::Reference < drawing::XShapes > xShapes; - explicit SelectShape(uno::Reference& xTemp) : xShapes(xTemp) {} + explicit SelectShape(const uno::Reference& xTemp) : xShapes(xTemp) {} void operator() (const ScAccessibleShapeData* pAccShapeData) const { if (pAccShapeData && pAccShapeData->bSelectable) diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx index d431917597da..b822bd481993 100644 --- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx @@ -1119,8 +1119,8 @@ struct ScPagePreviewCountData long nForeShapes; long nControls; - ScPagePreviewCountData( const ScPreviewLocationData& rData, vcl::Window* pSizeWindow, - ScNotesChildren* pNotesChildren, ScShapeChildren* pShapeChildren ); + ScPagePreviewCountData( const ScPreviewLocationData& rData, const vcl::Window* pSizeWindow, + const ScNotesChildren* pNotesChildren, const ScShapeChildren* pShapeChildren ); long GetTotal() const { @@ -1129,8 +1129,8 @@ struct ScPagePreviewCountData }; ScPagePreviewCountData::ScPagePreviewCountData( const ScPreviewLocationData& rData, - vcl::Window* pSizeWindow, ScNotesChildren* pNotesChildren, - ScShapeChildren* pShapeChildren) : + const vcl::Window* pSizeWindow, const ScNotesChildren* pNotesChildren, + const ScShapeChildren* pShapeChildren) : nBackShapes( 0 ), nHeaders( 0 ), nTables( 0 ), diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx index 29addfd3b91a..3eb553e0d4ce 100644 --- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx +++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx @@ -45,7 +45,7 @@ using namespace ::com::sun::star::accessibility; ScAccessiblePreviewCell::ScAccessiblePreviewCell( const css::uno::Reference& rxParent, ScPreviewShell* pViewShell, - /* const */ ScAddress& rCellAddress, + const ScAddress& rCellAddress, sal_Int32 nIndex ) : ScAccessibleCellBase( rxParent, ( pViewShell ? &pViewShell->GetDocument() : nullptr ), rCellAddress, nIndex ), mpViewShell( pViewShell ), diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index 30cfb677268c..94518d92f33a 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -129,7 +129,7 @@ ScMyAddress ScAccessibleSpreadsheet::CalcScAddressFromRangeList(ScRangeList *pMa return ScMyAddress(0,0,maActiveCell.Tab()); } -bool ScAccessibleSpreadsheet::CalcScRangeDifferenceMax(ScRange *pSrc, ScRange *pDest, int nMax, VEC_MYADDR &vecRet, int &nSize) +bool ScAccessibleSpreadsheet::CalcScRangeDifferenceMax(const ScRange *pSrc, const ScRange *pDest, int nMax, VEC_MYADDR &vecRet, int &nSize) { //Src Must be :Src > Dest if (pDest->In(*pSrc)) @@ -713,7 +713,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ScAccessibleTableBase::Notify(rBC, rHint); } -void ScAccessibleSpreadsheet::RemoveSelection(ScMarkData &refScMarkData) +void ScAccessibleSpreadsheet::RemoveSelection(const ScMarkData &refScMarkData) { AccessibleEventObject aEvent; aEvent.Source = uno::Reference< XAccessible >(this); diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx index ec5ee4ba36e0..241aacbc5a2e 100644 --- a/sc/source/ui/app/client.cxx +++ b/sc/source/ui/app/client.cxx @@ -39,7 +39,7 @@ using namespace com::sun::star; -ScClient::ScClient( ScTabViewShell* pViewShell, vcl::Window* pDraw, SdrModel* pSdrModel, SdrOle2Obj* pObj ) : +ScClient::ScClient( ScTabViewShell* pViewShell, vcl::Window* pDraw, SdrModel* pSdrModel, const SdrOle2Obj* pObj ) : SfxInPlaceClient( pViewShell, pDraw, pObj->GetAspect() ), pModel( pSdrModel ) { diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index 27ffddae8336..39b067f906e4 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -635,7 +635,7 @@ static void lcl_InitMarks( SdrMarkView& rDest, const SdrMarkView& rSource, SCTAB } } -void ScDrawTransferObj::SetDragSource( ScDrawView* pView ) +void ScDrawTransferObj::SetDragSource( const ScDrawView* pView ) { DELETEZ( pDragSourceView ); pDragSourceView = new SdrView( pView->GetModel() ); diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 9e491efe425e..9be7701dfb92 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -490,7 +490,7 @@ void ScInputHandler::DeleteRangeFinder() } } -inline OUString GetEditText(EditEngine* pEng) +inline OUString GetEditText(const EditEngine* pEng) { return ScEditUtil::GetSpaceDelimitedString(*pEng); } @@ -1827,7 +1827,7 @@ void ScInputHandler::UpdateParenthesis() bParenthesisShown = bFound; } -void ScInputHandler::ViewShellGone(ScTabViewShell* pViewSh) // Executed synchronously! +void ScInputHandler::ViewShellGone(const ScTabViewShell* pViewSh) // Executed synchronously! { if ( pViewSh == pActiveViewSh ) { @@ -2215,7 +2215,7 @@ static void lcl_SetTopSelection( EditView* pEditView, ESelection& rSel ) pEditView->SetSelection( rSel ); } -void ScInputHandler::SyncViews( EditView* pSourceView ) +void ScInputHandler::SyncViews( const EditView* pSourceView ) { if (pSourceView) { @@ -2978,7 +2978,7 @@ void ScInputHandler::CancelHandler() bInOwnChange = false; } -bool ScInputHandler::IsModalMode( SfxObjectShell* pDocSh ) +bool ScInputHandler::IsModalMode( const SfxObjectShell* pDocSh ) { // References to unnamed document; that doesn't work return bFormulaMode && pRefViewSh @@ -3014,7 +3014,7 @@ void ScInputHandler::AddRefEntry() DataChanged(); } -void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc ) +void ScInputHandler::SetReference( const ScRange& rRef, const ScDocument* pDoc ) { HideTip(); @@ -3801,7 +3801,7 @@ IMPL_LINK_NOARG( ScInputHandler, DelayTimer, Timer*, void ) } } -void ScInputHandler::InputSelection( EditView* pView ) +void ScInputHandler::InputSelection( const EditView* pView ) { SyncViews( pView ); ShowTipCursor(); @@ -3811,7 +3811,7 @@ void ScInputHandler::InputSelection( EditView* pView ) ResetAutoPar(); } -void ScInputHandler::InputChanged( EditView* pView, bool bFromNotify ) +void ScInputHandler::InputChanged( const EditView* pView, bool bFromNotify ) { UpdateActiveView(); diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index f60937c047f0..c69dae4a98a0 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -143,7 +143,7 @@ SfxChildWinInfo ScInputWindowWrapper::GetInfo() const // class ScInputWindow -static VclPtr lcl_chooseRuntimeImpl( vcl::Window* pParent, SfxBindings* pBind ) +static VclPtr lcl_chooseRuntimeImpl( vcl::Window* pParent, const SfxBindings* pBind ) { ScTabViewShell* pViewSh = nullptr; SfxDispatcher* pDisp = pBind->GetDispatcher(); @@ -157,7 +157,7 @@ static VclPtr lcl_chooseRuntimeImpl( vcl::Window* pParent, SfxBin return VclPtr::Create( pParent, pViewSh ); } -ScInputWindow::ScInputWindow( vcl::Window* pParent, SfxBindings* pBind ) : +ScInputWindow::ScInputWindow( vcl::Window* pParent, const SfxBindings* pBind ) : // With WB_CLIPCHILDREN otherwise we get flickering ToolBox ( pParent, WinBits(WB_CLIPCHILDREN) ), aWndPos ( VclPtr::Create(this) ), diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index e30dd47e4b11..e4cc2839c85a 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -1426,21 +1426,21 @@ void ScModule::InputCancelHandler() pHdl->CancelHandler(); } -void ScModule::InputSelection( EditView* pView ) +void ScModule::InputSelection( const EditView* pView ) { ScInputHandler* pHdl = GetInputHdl(); if (pHdl) pHdl->InputSelection( pView ); } -void ScModule::InputChanged( EditView* pView ) +void ScModule::InputChanged( const EditView* pView ) { ScInputHandler* pHdl = GetInputHdl(); if (pHdl) pHdl->InputChanged( pView, false ); } -void ScModule::ViewShellGone( ScTabViewShell* pViewSh ) +void ScModule::ViewShellGone( const ScTabViewShell* pViewSh ) { ScInputHandler* pHdl = GetInputHdl(); if (pHdl) @@ -1822,7 +1822,7 @@ void ScModule::AnythingChanged() nIdleCount = 0; } -static void lcl_CheckNeedsRepaint( ScDocShell* pDocShell ) +static void lcl_CheckNeedsRepaint( const ScDocShell* pDocShell ) { SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocShell ); while ( pFrame ) diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index cedac34ed374..d24e83b7382b 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -74,7 +74,7 @@ using namespace com::sun::star; #define SCTRANS_TYPE_EMBOBJ SotClipboardFormatId::PRIVATE #define SCTRANS_TYPE_EDIT_ODF_TEXT_FLAT SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT -void ScTransferObj::GetAreaSize( ScDocument* pDoc, SCTAB nTab1, SCTAB nTab2, SCROW& nRow, SCCOL& nCol ) +void ScTransferObj::GetAreaSize( const ScDocument* pDoc, SCTAB nTab1, SCTAB nTab2, SCROW& nRow, SCCOL& nCol ) { SCCOL nMaxCol = 0; SCROW nMaxRow = 0; diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 96604b6aeffe..cb0c0e8c4f88 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -482,7 +482,7 @@ void ScMenuFloatingWindow::setSelectedMenuItem(size_t nPos, bool bSubMenuTimer, fireMenuHighlightedEvent(); } -void ScMenuFloatingWindow::handleMenuTimeout(SubMenuItemData* pTimer) +void ScMenuFloatingWindow::handleMenuTimeout(const SubMenuItemData* pTimer) { if (pTimer == &maOpenTimer) { @@ -750,7 +750,7 @@ size_t ScMenuFloatingWindow::getEnclosingMenuItem(const Point& rPos) const return MENU_NOT_SELECTED; } -size_t ScMenuFloatingWindow::getSubMenuPos(ScMenuFloatingWindow* pSubMenu) +size_t ScMenuFloatingWindow::getSubMenuPos(const ScMenuFloatingWindow* pSubMenu) { size_t n = maMenuItems.size(); for (size_t i = 0; i < n; ++i) @@ -1359,7 +1359,7 @@ void ScCheckListMenuWindow::Paint(vcl::RenderContext& rRenderContext, const tool rRenderContext.DrawRect(tools::Rectangle(aPos,aSize)); } -void ScCheckListMenuWindow::updateMemberParents( SvTreeListEntry* pLeaf, size_t nIdx ) +void ScCheckListMenuWindow::updateMemberParents( const SvTreeListEntry* pLeaf, size_t nIdx ) { if ( !maMembers[nIdx].mbDate || maMembers[nIdx].meDatePartType != ScCheckListMember::DAY ) diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 8d01f93716c4..eb13fc2eeb50 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -143,7 +143,7 @@ void ScCondFrmtEntry::Deselect() namespace { -void FillStyleListBox( ScDocument* pDoc, ListBox& rLbStyle ) +void FillStyleListBox( const ScDocument* pDoc, ListBox& rLbStyle ) { rLbStyle.SetSeparatorPos(0); std::set aStyleNames; @@ -475,7 +475,7 @@ void ScConditionFrmtEntry::Notify(SfxBroadcaster&, const SfxHint& rHint) namespace { -void StyleSelect( ListBox& rLbStyle, ScDocument* pDoc, SvxFontPrevWindow& rWdPreview ) +void StyleSelect( ListBox& rLbStyle, const ScDocument* pDoc, SvxFontPrevWindow& rWdPreview ) { if(rLbStyle.GetSelectEntryPos() == 0) { @@ -645,7 +645,7 @@ void ScFormulaFrmtEntry::SetInactive() namespace { -OUString convertNumberToString(double nVal, ScDocument* pDoc) +OUString convertNumberToString(double nVal, const ScDocument* pDoc) { SvNumberFormatter* pNumberFormatter = pDoc->GetFormatTable(); OUString aText; @@ -1052,7 +1052,7 @@ IMPL_LINK_NOARG( ScConditionFrmtEntry, ConditionTypeSelectHdl, ListBox&, void ) namespace { -void SetDataBarEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType, Edit& rEdit, ScDocument* pDoc ) +void SetDataBarEntryTypes( const ScColorScaleEntry& rEntry, ListBox& rLbType, Edit& rEdit, const ScDocument* pDoc ) { rLbType.SelectEntryPos(rEntry.GetType()); switch(rEntry.GetType()) diff --git a/sc/source/ui/inc/AccessibleCell.hxx b/sc/source/ui/inc/AccessibleCell.hxx index 527f6411ba43..625308fc1a82 100644 --- a/sc/source/ui/inc/AccessibleCell.hxx +++ b/sc/source/ui/inc/AccessibleCell.hxx @@ -50,7 +50,7 @@ public: static rtl::Reference create( const css::uno::Reference& rxParent, ScTabViewShell* pViewShell, - ScAddress& rCellAddress, + const ScAddress& rCellAddress, sal_Int32 nIndex, ScSplitPos eSplitPos, ScAccessibleDocument* pAccDoc); @@ -59,7 +59,7 @@ private: ScAccessibleCell( const css::uno::Reference& rxParent, ScTabViewShell* pViewShell, - ScAddress& rCellAddress, + const ScAddress& rCellAddress, sal_Int32 nIndex, ScSplitPos eSplitPos, ScAccessibleDocument* pAccDoc); diff --git a/sc/source/ui/inc/AccessiblePreviewCell.hxx b/sc/source/ui/inc/AccessiblePreviewCell.hxx index 14886e37a127..2e9702f15e36 100644 --- a/sc/source/ui/inc/AccessiblePreviewCell.hxx +++ b/sc/source/ui/inc/AccessiblePreviewCell.hxx @@ -35,7 +35,7 @@ public: //===== internal ======================================================== ScAccessiblePreviewCell( const css::uno::Reference& rxParent, - ScPreviewShell* pViewShell, /* const */ ScAddress& rCellAddress, sal_Int32 nIndex ); + ScPreviewShell* pViewShell, const ScAddress& rCellAddress, sal_Int32 nIndex ); protected: virtual ~ScAccessiblePreviewCell() override; diff --git a/sc/source/ui/inc/AccessibleSpreadsheet.hxx b/sc/source/ui/inc/AccessibleSpreadsheet.hxx index ee488b72c37f..0288af978c16 100644 --- a/sc/source/ui/inc/AccessibleSpreadsheet.hxx +++ b/sc/source/ui/inc/AccessibleSpreadsheet.hxx @@ -244,7 +244,7 @@ private: typedef std::map > MAP_ADDR_XACC; MAP_ADDR_XACC m_mapSelectionSend; - void RemoveSelection(ScMarkData &refScMarkData); + void RemoveSelection(const ScMarkData &refScMarkData); void CommitFocusCell(const ScAddress &aNewCell); public: void FireFirstCellFocus(); @@ -283,7 +283,7 @@ public: bool IsScAddrFormulaSel (const ScAddress &addr) const; bool IsFormulaMode(); ScMyAddress CalcScAddressFromRangeList(ScRangeList *pMarkedRanges,sal_Int32 nSelectedChildIndex); - static bool CalcScRangeDifferenceMax(ScRange *pSrc,ScRange *pDest,int nMax,VEC_MYADDR &vecRet,int &nSize); + static bool CalcScRangeDifferenceMax(const ScRange *pSrc, const ScRange *pDest,int nMax,VEC_MYADDR &vecRet,int &nSize); static bool CalcScRangeListDifferenceMax(ScRangeList *pSrc,ScRangeList *pDest,int nMax,VEC_MYADDR &vecRet); }; diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index 9d433568ce26..fb6a15573a80 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -106,13 +106,13 @@ protected: private: struct SubMenuItemData; - void handleMenuTimeout(SubMenuItemData* pTimer); + void handleMenuTimeout(const SubMenuItemData* pTimer); void resizeToFitMenuItems(); void highlightMenuItem(vcl::RenderContext& rRenderContext, size_t nPos, bool bSelected); size_t getEnclosingMenuItem(const Point& rPos) const; - size_t getSubMenuPos(ScMenuFloatingWindow* pSubMenu); + size_t getSubMenuPos(const ScMenuFloatingWindow* pSubMenu); /** * Fire a menu highlight event since the accessibility framework needs @@ -405,7 +405,7 @@ private: void packWindow(); void setAllMemberState(bool bSet); void selectCurrentMemberOnly(bool bSet); - void updateMemberParents( SvTreeListEntry* pLeaf, size_t nIdx ); + void updateMemberParents( const SvTreeListEntry* pLeaf, size_t nIdx ); DECL_LINK( ButtonHdl, Button*, void ); DECL_LINK( TriStateHdl, Button*, void ); diff --git a/sc/source/ui/inc/client.hxx b/sc/source/ui/inc/client.hxx index 57a8a9c4fad7..e36322f1a481 100644 --- a/sc/source/ui/inc/client.hxx +++ b/sc/source/ui/inc/client.hxx @@ -37,7 +37,7 @@ private: virtual void ViewChanged() override; public: - ScClient( ScTabViewShell* pViewShell, vcl::Window* pDraw, SdrModel* pSdrModel, SdrOle2Obj* pObj ); + ScClient( ScTabViewShell* pViewShell, vcl::Window* pDraw, SdrModel* pSdrModel, const SdrOle2Obj* pObj ); virtual ~ScClient() override; SdrOle2Obj* GetDrawObj(); diff --git a/sc/source/ui/inc/drwtrans.hxx b/sc/source/ui/inc/drwtrans.hxx index 5920e33351a9..a82b288acd38 100644 --- a/sc/source/ui/inc/drwtrans.hxx +++ b/sc/source/ui/inc/drwtrans.hxx @@ -83,7 +83,7 @@ public: SdrModel* GetModel() { return pModel; } void SetDrawPersist( const SfxObjectShellRef& rRef ); - void SetDragSource( ScDrawView* pView ); + void SetDragSource( const ScDrawView* pView ); void SetDragSourceObj( SdrObject* pObj, SCTAB nTab ); void SetDragSourceFlags( ScDragSrc nFlags ); void SetDragWasInternal(); diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx index dd36ff84219b..0301b0a72056 100644 --- a/sc/source/ui/inc/inputhdl.hxx +++ b/sc/source/ui/inc/inputhdl.hxx @@ -122,7 +122,7 @@ private: private: void UpdateActiveView(); - void SyncViews( EditView* pSourceView = nullptr ); + void SyncViews( const EditView* pSourceView = nullptr ); /** * @param cTyped typed character. If 0, look at existing document content * for text or number. @@ -184,7 +184,7 @@ public: bool KeyInput( const KeyEvent& rKEvt, bool bStartEdit ); void EnterHandler( ScEnterMode nBlockMode = ScEnterMode::NORMAL ); void CancelHandler(); - void SetReference( const ScRange& rRef, ScDocument* pDoc ); + void SetReference( const ScRange& rRef, const ScDocument* pDoc ); void AddRefEntry(); void InputCommand( const CommandEvent& rCEvt ); @@ -192,10 +192,10 @@ public: void InsertFunction( const OUString& rFuncName, bool bAddPar = true ); void ClearText(); - void InputSelection( EditView* pView ); - void InputChanged( EditView* pView, bool bFromNotify ); + void InputSelection( const EditView* pView ); + void InputChanged( const EditView* pView, bool bFromNotify ); - void ViewShellGone(ScTabViewShell* pViewSh); + void ViewShellGone(const ScTabViewShell* pViewSh); void SetRefViewShell(ScTabViewShell* pRefVsh) {pRefViewSh=pRefVsh;} void NotifyChange( const ScInputHdlState* pState, bool bForce = false, @@ -249,7 +249,7 @@ public: bool IsInEnterHandler() const { return bInEnterHandler; } bool IsInOwnChange() const { return bInOwnChange; } - bool IsModalMode( SfxObjectShell* pDocSh ); + bool IsModalMode( const SfxObjectShell* pDocSh ); void ForgetLastPattern(); diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index 5d77877a9a82..06ea56ef600c 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -224,7 +224,7 @@ private: class ScInputWindow : public ToolBox // Parent toolbox { public: - ScInputWindow( vcl::Window* pParent, SfxBindings* pBind ); + ScInputWindow( vcl::Window* pParent, const SfxBindings* pBind ); virtual ~ScInputWindow() override; virtual void dispose() override; diff --git a/sc/source/ui/inc/transobj.hxx b/sc/source/ui/inc/transobj.hxx index 30d5ea8b9412..b897a727937e 100644 --- a/sc/source/ui/inc/transobj.hxx +++ b/sc/source/ui/inc/transobj.hxx @@ -67,7 +67,7 @@ private: SCCOL nSubX=0, SCROW nSubY=0 ); static void PaintToDev( OutputDevice* pDev, ScDocument* pDoc, double nPrintFactor, const ScRange& rBlock ); - static void GetAreaSize( ScDocument* pDoc, SCTAB nTab1, SCTAB nTab2, SCROW& nRow, SCCOL& nCol ); + static void GetAreaSize( const ScDocument* pDoc, SCTAB nTab1, SCTAB nTab2, SCROW& nRow, SCCOL& nCol ); public: ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDescriptor& rDesc ); -- cgit