From bcc372d15e731ab9ff660072a6dc860708e61a93 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 29 Aug 2017 11:00:31 +0200 Subject: loplugin:constparam in sc part8 Change-Id: I6cf9c5e662b20de9c9698a8c1fab56a09950c522 Reviewed-on: https://gerrit.libreoffice.org/41683 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/core/opencl/formulagroupcl.cxx | 6 +++--- sc/source/core/opencl/opbase.cxx | 4 ++-- sc/source/core/opencl/opbase.hxx | 4 ++-- sc/source/filter/dif/difimp.cxx | 2 +- sc/source/filter/excel/excdoc.cxx | 6 +++--- sc/source/filter/excel/excrecds.cxx | 12 ++++++------ sc/source/filter/excel/xeescher.cxx | 2 +- sc/source/filter/excel/xeformula.cxx | 4 ++-- sc/source/filter/excel/xestream.cxx | 2 +- sc/source/filter/excel/xestyle.cxx | 2 +- sc/source/filter/excel/xetable.cxx | 4 ++-- sc/source/filter/excel/xicontent.cxx | 2 +- sc/source/filter/excel/xilink.cxx | 2 +- sc/source/filter/excel/xipivot.cxx | 4 ++-- sc/source/filter/excel/xistream.cxx | 2 +- sc/source/filter/excel/xiview.cxx | 2 +- sc/source/filter/excel/xlescher.cxx | 8 ++++---- sc/source/filter/ftools/fapihelper.cxx | 4 ++-- sc/source/filter/html/htmlimp.cxx | 2 +- sc/source/filter/html/htmlpars.cxx | 16 ++++++++-------- sc/source/filter/inc/XclExpChangeTrack.hxx | 6 +++--- sc/source/filter/inc/condformatbuffer.hxx | 2 +- sc/source/filter/inc/dif.hxx | 2 +- sc/source/filter/inc/drawingfragment.hxx | 2 +- sc/source/filter/inc/eeparser.hxx | 4 ++-- sc/source/filter/inc/excrecds.hxx | 20 ++++++++++---------- sc/source/filter/inc/fapihelper.hxx | 4 ++-- sc/source/filter/inc/htmlimp.hxx | 2 +- sc/source/filter/inc/htmlpars.hxx | 16 ++++++++-------- sc/source/filter/inc/pivotcachebuffer.hxx | 12 ++++++------ sc/source/filter/inc/qprostyle.hxx | 2 +- sc/source/filter/inc/tool.h | 2 +- sc/source/filter/inc/xcl97esc.hxx | 2 +- sc/source/filter/inc/xcl97rec.hxx | 4 ++-- sc/source/filter/inc/xeescher.hxx | 2 +- sc/source/filter/inc/xilink.hxx | 2 +- sc/source/filter/inc/xipivot.hxx | 4 ++-- sc/source/filter/inc/xistream.hxx | 2 +- sc/source/filter/inc/xiview.hxx | 2 +- sc/source/filter/lotus/tool.cxx | 2 +- sc/source/filter/oox/condformatbuffer.cxx | 8 ++++---- sc/source/filter/oox/drawingfragment.cxx | 2 +- sc/source/filter/oox/excelvbaproject.cxx | 2 +- sc/source/filter/oox/pivotcachebuffer.cxx | 12 ++++++------ sc/source/filter/oox/sheetdatabuffer.cxx | 2 +- sc/source/filter/rtf/eeimpars.cxx | 2 +- sc/source/filter/xcl97/XclExpChangeTrack.cxx | 6 +++--- sc/source/filter/xcl97/xcl97esc.cxx | 2 +- sc/source/filter/xcl97/xcl97rec.cxx | 16 ++++++++-------- sc/source/ui/inc/cliputil.hxx | 2 +- sc/source/ui/inc/viewfunc.hxx | 6 +++--- sc/source/ui/inc/viewutil.hxx | 10 +++++----- sc/source/ui/inc/xmlsourcedlg.hxx | 2 +- sc/source/ui/view/cliputil.cxx | 2 +- sc/source/ui/view/gridwin_dbgutil.cxx | 2 +- sc/source/ui/view/viewfun5.cxx | 2 +- sc/source/ui/view/viewfun6.cxx | 2 +- sc/source/ui/view/viewfunc.cxx | 10 +++++----- sc/source/ui/view/viewutil.cxx | 10 +++++----- sc/source/ui/xmlsource/xmlsourcedlg.cxx | 6 +++--- 60 files changed, 145 insertions(+), 145 deletions(-) (limited to 'sc/source') diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index 9d5165bee14e..c423d794d53f 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -3633,7 +3633,7 @@ public: DynamicKernel( const ScCalcConfig& config, const FormulaTreeNodeRef& r, int nResultSize ); virtual ~DynamicKernel() override; - static DynamicKernel* create( const ScCalcConfig& config, ScTokenArray& rCode, int nResultSize ); + static DynamicKernel* create( const ScCalcConfig& config, const ScTokenArray& rCode, int nResultSize ); /// OpenCL code generation void CodeGen(); @@ -3940,7 +3940,7 @@ ScMatrixRef FormulaGroupInterpreterOpenCL::inverseMatrix( const ScMatrix& ) return nullptr; } -DynamicKernel* DynamicKernel::create( const ScCalcConfig& rConfig, ScTokenArray& rCode, int nResultSize ) +DynamicKernel* DynamicKernel::create( const ScCalcConfig& rConfig, const ScTokenArray& rCode, int nResultSize ) { // Constructing "AST" FormulaTokenIterator aCode(rCode); @@ -4158,7 +4158,7 @@ public: CLInterpreterContext createCLInterpreterContext( const ScCalcConfig& rConfig, - ScFormulaCellGroupRef& xGroup, ScTokenArray& rCode ) + const ScFormulaCellGroupRef& xGroup, const ScTokenArray& rCode ) { CLInterpreterContext aCxt(xGroup->mnLength); diff --git a/sc/source/core/opencl/opbase.cxx b/sc/source/core/opencl/opbase.cxx index 747c50a2cd03..4b1a6a8256e3 100644 --- a/sc/source/core/opencl/opbase.cxx +++ b/sc/source/core/opencl/opbase.cxx @@ -207,7 +207,7 @@ void Normal::GenSlidingWindowFunction( } void CheckVariables::GenTmpVariables( - std::stringstream& ss, SubArguments& vSubArguments ) + std::stringstream& ss, const SubArguments& vSubArguments ) { for (size_t i = 0; i < vSubArguments.size(); i++) { @@ -319,7 +319,7 @@ void CheckVariables::CheckAllSubArgumentIsNan( } void CheckVariables::UnrollDoubleVector( std::stringstream& ss, - std::stringstream& unrollstr, const formula::DoubleVectorRefToken* pCurDVR, + const std::stringstream& unrollstr, const formula::DoubleVectorRefToken* pCurDVR, int nCurWindowSize ) { int unrollSize = 16; diff --git a/sc/source/core/opencl/opbase.hxx b/sc/source/core/opencl/opbase.hxx index 309316cfbeff..d3e94de1cdb6 100644 --- a/sc/source/core/opencl/opbase.hxx +++ b/sc/source/core/opencl/opbase.hxx @@ -211,7 +211,7 @@ public: class CheckVariables : public Normal { public: - static void GenTmpVariables( std::stringstream& ss, SubArguments& vSubArguments ); + static void GenTmpVariables( std::stringstream& ss, const SubArguments& vSubArguments ); static void CheckSubArgumentIsNan( std::stringstream& ss, SubArguments& vSubArguments, int argumentNum ); static void CheckAllSubArgumentIsNan( std::stringstream& ss, @@ -220,7 +220,7 @@ public: static void CheckSubArgumentIsNan2( std::stringstream& ss, SubArguments& vSubArguments, int argumentNum, const std::string& p ); static void UnrollDoubleVector( std::stringstream& ss, - std::stringstream& unrollstr, const formula::DoubleVectorRefToken* pCurDVR, + const std::stringstream& unrollstr, const formula::DoubleVectorRefToken* pCurDVR, int nCurWindowSize ); }; diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx index 2603e06bf4ae..4d8c7084d632 100644 --- a/sc/source/filter/dif/difimp.cxx +++ b/sc/source/filter/dif/difimp.cxx @@ -224,7 +224,7 @@ ErrCode ScFormatFilterPluginImpl::ScImportDif(SvStream& rIn, ScDocument* pDoc, c return ERRCODE_NONE; } -DifParser::DifParser( SvStream& rNewIn, ScDocument& rDoc, rtl_TextEncoding e ) +DifParser::DifParser( SvStream& rNewIn, const ScDocument& rDoc, rtl_TextEncoding e ) : fVal(0.0) , nVector(0) , nVal(0) diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx index a3d1334b383c..deec929b8ee1 100644 --- a/sc/source/filter/excel/excdoc.cxx +++ b/sc/source/filter/excel/excdoc.cxx @@ -87,14 +87,14 @@ static OUString lcl_GetVbaTabName( SCTAB n ) return aRet; } -static void lcl_AddBookviews( XclExpRecordList<>& aRecList, ExcTable& self ) +static void lcl_AddBookviews( XclExpRecordList<>& aRecList, const ExcTable& self ) { aRecList.AppendNewRecord( new XclExpXmlStartElementRecord( XML_bookViews ) ); aRecList.AppendNewRecord( new XclExpWindow1( self.GetRoot() ) ); aRecList.AppendNewRecord( new XclExpXmlEndElementRecord( XML_bookViews ) ); } -static void lcl_AddCalcPr( XclExpRecordList<>& aRecList, ExcTable& self ) +static void lcl_AddCalcPr( XclExpRecordList<>& aRecList, const ExcTable& self ) { ScDocument& rDoc = self.GetDoc(); @@ -110,7 +110,7 @@ static void lcl_AddCalcPr( XclExpRecordList<>& aRecList, ExcTable& self ) aRecList.AppendNewRecord( new XclExpXmlEndSingleElementRecord() ); // XML_calcPr } -static void lcl_AddWorkbookProtection( XclExpRecordList<>& aRecList, ExcTable& self ) +static void lcl_AddWorkbookProtection( XclExpRecordList<>& aRecList, const ExcTable& self ) { aRecList.AppendNewRecord( new XclExpXmlStartSingleElementRecord( XML_workbookProtection ) ); diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx index 9b2c67cbbb85..b75e0c2a92cc 100644 --- a/sc/source/filter/excel/excrecds.cxx +++ b/sc/source/filter/excel/excrecds.cxx @@ -284,7 +284,7 @@ const sal_uInt8* ExcDummy_041::GetData() const //------------------------------------------------------------- class Exc1904 - -Exc1904::Exc1904( ScDocument& rDoc ) +Exc1904::Exc1904( const ScDocument& rDoc ) { const Date& rDate = rDoc.GetFormatTable()->GetNullDate(); bVal = (rDate == Date( 1, 1, 1904 )); @@ -317,7 +317,7 @@ void Exc1904::SaveXml( XclExpXmlStream& rStrm ) //------------------------------------------------------ class ExcBundlesheet - -ExcBundlesheetBase::ExcBundlesheetBase( RootData& rRootData, SCTAB nTabNum ) : +ExcBundlesheetBase::ExcBundlesheetBase( const RootData& rRootData, SCTAB nTabNum ) : m_nStrPos( STREAM_SEEK_TO_END ), m_nOwnPos( STREAM_SEEK_TO_END ), nGrbit( rRootData.pER->GetTabInfo().IsVisibleTab( nTabNum ) ? 0x0000 : 0x0001 ), @@ -346,7 +346,7 @@ sal_uInt16 ExcBundlesheetBase::GetNum() const return 0x0085; } -ExcBundlesheet::ExcBundlesheet( RootData& rRootData, SCTAB _nTab ) : +ExcBundlesheet::ExcBundlesheet( const RootData& rRootData, SCTAB _nTab ) : ExcBundlesheetBase( rRootData, _nTab ) { OUString sTabName = rRootData.pER->GetTabInfo().GetScTabName( _nTab ); @@ -576,7 +576,7 @@ std::size_t ExcFilterCondition::GetTextBytes() const return pText ? (1 + pText->GetBufferSize()) : 0; } -void ExcFilterCondition::SetCondition( sal_uInt8 nTp, sal_uInt8 nOp, double fV, OUString* pT ) +void ExcFilterCondition::SetCondition( sal_uInt8 nTp, sal_uInt8 nOp, double fV, const OUString* pT ) { nType = nTp; nOper = nOp; @@ -619,7 +619,7 @@ static const char* lcl_GetOperator( sal_uInt8 nOper ) } } -static OString lcl_GetValue( sal_uInt8 nType, double fVal, XclExpString* pStr ) +static OString lcl_GetValue( sal_uInt8 nType, double fVal, const XclExpString* pStr ) { switch( nType ) { @@ -661,7 +661,7 @@ XclExpAutofilter::XclExpAutofilter( const XclExpRoot& rRoot, sal_uInt16 nC ) : } bool XclExpAutofilter::AddCondition( ScQueryConnect eConn, sal_uInt8 nType, sal_uInt8 nOp, - double fVal, OUString* pText, bool bSimple ) + double fVal, const OUString* pText, bool bSimple ) { if( !aCond[ 1 ].IsEmpty() ) return false; diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index f676b7ef9d0a..e456865197be 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -1515,7 +1515,7 @@ void XclExpObjectManager::StartSheet() mxObjList.reset( new XclExpObjList( GetRoot(), *mxEscherEx ) ); } -std::shared_ptr< XclExpRecordBase > XclExpObjectManager::ProcessDrawing( SdrPage* pSdrPage ) +std::shared_ptr< XclExpRecordBase > XclExpObjectManager::ProcessDrawing( const SdrPage* pSdrPage ) { if( pSdrPage ) mxEscherEx->AddSdrPage( *pSdrPage ); diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx index 2db8240b8d23..31edaa3a5ee6 100644 --- a/sc/source/filter/excel/xeformula.cxx +++ b/sc/source/filter/excel/xeformula.cxx @@ -366,7 +366,7 @@ private: void ProcessMatrix( const XclExpScToken& rTokData ); void ProcessFunction( const XclExpScToken& rTokData ); - void PrepareFunction( XclExpFuncData& rFuncData ); + void PrepareFunction( const XclExpFuncData& rFuncData ); void FinishFunction( XclExpFuncData& rFuncData, sal_uInt8 nCloseSpaces ); void FinishIfFunction( XclExpFuncData& rFuncData ); void FinishChooseFunction( XclExpFuncData& rFuncData ); @@ -1397,7 +1397,7 @@ void XclExpFmlaCompImpl::ProcessFunction( const XclExpScToken& rTokData ) } } -void XclExpFmlaCompImpl::PrepareFunction( XclExpFuncData& rFuncData ) +void XclExpFmlaCompImpl::PrepareFunction( const XclExpFuncData& rFuncData ) { // For OOXML these are not rewritten anymore. if (GetOutput() != EXC_OUTPUT_XML_2007) diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 52e4d5b34056..c4259dff9c4b 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -847,7 +847,7 @@ sax_fastparser::FSHelperPtr XclXmlUtils::WriteElement( sax_fastparser::FSHelperP return pStream; } -static void lcl_WriteValue( sax_fastparser::FSHelperPtr& rStream, sal_Int32 nElement, const char* pValue ) +static void lcl_WriteValue( const sax_fastparser::FSHelperPtr& rStream, sal_Int32 nElement, const char* pValue ) { if( !pValue ) return; diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index f51232e9692a..b0c18a16cc13 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -1433,7 +1433,7 @@ void XclExpNumFmtBuffer::WriteFormatRecord( XclExpStream& rStrm, const XclExpNum namespace { -OUString GetNumberFormatCode(XclRoot& rRoot, const sal_uInt32 nScNumFmt, SvNumberFormatter* pFormatter, NfKeywordTable* pKeywordTable) +OUString GetNumberFormatCode(const XclRoot& rRoot, const sal_uInt32 nScNumFmt, SvNumberFormatter* pFormatter, const NfKeywordTable* pKeywordTable) { return rRoot.GetFormatter().GetFormatStringForExcel( nScNumFmt, *pKeywordTable, *pFormatter); } diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx index 10cc23f57a09..d1d897d25ce5 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -618,13 +618,13 @@ XclExpNumberCell::XclExpNumberCell( { } -static OString lcl_GetStyleId( XclExpXmlStream& rStrm, sal_uInt32 nXFIndex ) +static OString lcl_GetStyleId( const XclExpXmlStream& rStrm, sal_uInt32 nXFIndex ) { return OString::number( rStrm.GetRoot().GetXFBuffer() .GetXmlCellIndex( nXFIndex ) ); } -static OString lcl_GetStyleId( XclExpXmlStream& rStrm, const XclExpCellBase& rCell ) +static OString lcl_GetStyleId( const XclExpXmlStream& rStrm, const XclExpCellBase& rCell ) { sal_uInt32 nXFId = rCell.GetFirstXFId(); sal_uInt16 nXFIndex = rStrm.GetRoot().GetXFBuffer().GetXFIndex( nXFId ); diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index 509eb68acdc3..bad8d6f79fea 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -141,7 +141,7 @@ void lclIgnoreString32( XclImpStream& rStrm, bool b16Bit ) /** Converts a path to an absolute path. @param rPath The source path. The resulting path is returned here. @param nLevel Number of parent directories to add in front of the path. */ -void lclGetAbsPath( OUString& rPath, sal_uInt16 nLevel, SfxObjectShell* pDocShell ) +void lclGetAbsPath( OUString& rPath, sal_uInt16 nLevel, const SfxObjectShell* pDocShell ) { OUStringBuffer aTmpStr; while( nLevel ) diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx index 3763ef7413d8..aca6dc139d87 100644 --- a/sc/source/filter/excel/xilink.cxx +++ b/sc/source/filter/excel/xilink.cxx @@ -416,7 +416,7 @@ void XclImpExtName::CreateDdeData( ScDocument& rDoc, const OUString& rApplic, co rDoc.CreateDdeLink( rApplic, rTopic, maName, SC_DDE_DEFAULT, xResults ); } -void XclImpExtName::CreateExtNameData( ScDocument& rDoc, sal_uInt16 nFileId ) const +void XclImpExtName::CreateExtNameData( const ScDocument& rDoc, sal_uInt16 nFileId ) const { if (!mxArray.get()) return; diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx index 4a0fe79b7063..18941fc352ce 100644 --- a/sc/source/filter/excel/xipivot.cxx +++ b/sc/source/filter/excel/xipivot.cxx @@ -651,7 +651,7 @@ void XclImpPivotCache::ReadDConName( XclImpStream& rStrm ) maSrcRangeName.clear(); } -void XclImpPivotCache::ReadPivotCacheStream( XclImpStream& rStrm ) +void XclImpPivotCache::ReadPivotCacheStream( const XclImpStream& rStrm ) { if( (mnSrcType != EXC_SXVS_SHEET) && (mnSrcType != EXC_SXVS_EXTERN) ) return; @@ -1605,7 +1605,7 @@ void XclImpPivotTableManager::ReadSxViewEx9( XclImpStream& rStrm ) maPTables.back()->ReadSxViewEx9( rStrm ); } -void XclImpPivotTableManager::ReadPivotCaches( XclImpStream& rStrm ) +void XclImpPivotTableManager::ReadPivotCaches( const XclImpStream& rStrm ) { for( XclImpPivotCacheVec::iterator aIt = maPCaches.begin(), aEnd = maPCaches.end(); aIt != aEnd; ++aIt ) (*aIt)->ReadPivotCacheStream( rStrm ); diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx index 0a4cf612f4a5..ed7a8ca26276 100644 --- a/sc/source/filter/excel/xistream.cxx +++ b/sc/source/filter/excel/xistream.cxx @@ -72,7 +72,7 @@ XclImpDecrypterRef XclImpDecrypter::Clone() const return bValid ? ::comphelper::DocPasswordVerifierResult::OK : ::comphelper::DocPasswordVerifierResult::WrongPassword; } -void XclImpDecrypter::Update( SvStream& rStrm, sal_uInt16 nRecSize ) +void XclImpDecrypter::Update( const SvStream& rStrm, sal_uInt16 nRecSize ) { if( IsValid() ) { diff --git a/sc/source/filter/excel/xiview.cxx b/sc/source/filter/excel/xiview.cxx index 4e5ffc6fdf44..8f66443b1b8d 100644 --- a/sc/source/filter/excel/xiview.cxx +++ b/sc/source/filter/excel/xiview.cxx @@ -94,7 +94,7 @@ void XclImpTabViewSettings::Initialize() maData.SetDefaults(); } -void XclImpTabViewSettings::ReadTabBgColor( XclImpStream& rStrm, XclImpPalette& rPal ) +void XclImpTabViewSettings::ReadTabBgColor( XclImpStream& rStrm, const XclImpPalette& rPal ) { OSL_ENSURE_BIFF( GetBiff() >= EXC_BIFF8 ); if( GetBiff() < EXC_BIFF8 ) diff --git a/sc/source/filter/excel/xlescher.cxx b/sc/source/filter/excel/xlescher.cxx index 722922935069..f57e1b62f46e 100644 --- a/sc/source/filter/excel/xlescher.cxx +++ b/sc/source/filter/excel/xlescher.cxx @@ -58,7 +58,7 @@ double lclGetTwipsScale( MapUnit eMapUnit ) } /** Calculates a drawing layer X position (in twips) from an object column position. */ -long lclGetXFromCol( ScDocument& rDoc, SCTAB nScTab, sal_uInt16 nXclCol, sal_uInt16 nOffset, double fScale ) +long lclGetXFromCol( const ScDocument& rDoc, SCTAB nScTab, sal_uInt16 nXclCol, sal_uInt16 nOffset, double fScale ) { SCCOL nScCol = static_cast< SCCOL >( nXclCol ); return static_cast< long >( fScale * (rDoc.GetColOffset( nScCol, nScTab ) + @@ -66,7 +66,7 @@ long lclGetXFromCol( ScDocument& rDoc, SCTAB nScTab, sal_uInt16 nXclCol, sal_uIn } /** Calculates a drawing layer Y position (in twips) from an object row position. */ -long lclGetYFromRow( ScDocument& rDoc, SCTAB nScTab, sal_uInt16 nXclRow, sal_uInt16 nOffset, double fScale ) +long lclGetYFromRow( const ScDocument& rDoc, SCTAB nScTab, sal_uInt16 nXclRow, sal_uInt16 nOffset, double fScale ) { SCROW nScRow = static_cast< SCROW >( nXclRow ); return static_cast< long >( fScale * (rDoc.GetRowOffset( nScRow, nScTab ) + @@ -75,7 +75,7 @@ long lclGetYFromRow( ScDocument& rDoc, SCTAB nScTab, sal_uInt16 nXclRow, sal_uIn /** Calculates an object column position from a drawing layer X position (in twips). */ void lclGetColFromX( - ScDocument& rDoc, SCTAB nScTab, sal_uInt16& rnXclCol, + const ScDocument& rDoc, SCTAB nScTab, sal_uInt16& rnXclCol, sal_uInt16& rnOffset, sal_uInt16 nXclStartCol, sal_uInt16 nXclMaxCol, long& rnStartW, long nX, double fScale ) { @@ -94,7 +94,7 @@ void lclGetColFromX( /** Calculates an object row position from a drawing layer Y position (in twips). */ void lclGetRowFromY( - ScDocument& rDoc, SCTAB nScTab, sal_uInt32& rnXclRow, + const ScDocument& rDoc, SCTAB nScTab, sal_uInt32& rnXclRow, sal_uInt32& rnOffset, sal_uInt32 nXclStartRow, sal_uInt32 nXclMaxRow, long& rnStartH, long nY, double fScale ) { diff --git a/sc/source/filter/ftools/fapihelper.cxx b/sc/source/filter/ftools/fapihelper.cxx index 3ad19a1fe4f3..6e5f3dba15a1 100644 --- a/sc/source/filter/ftools/fapihelper.cxx +++ b/sc/source/filter/ftools/fapihelper.cxx @@ -62,7 +62,7 @@ OUString ScfApiHelper::GetServiceName( const Reference< XInterface >& xInt ) return aService; } -Reference< XMultiServiceFactory > ScfApiHelper::GetServiceFactory( SfxObjectShell* pShell ) +Reference< XMultiServiceFactory > ScfApiHelper::GetServiceFactory( const SfxObjectShell* pShell ) { Reference< XMultiServiceFactory > xFactory; if( pShell ) @@ -88,7 +88,7 @@ Reference< XInterface > ScfApiHelper::CreateInstance( return xInt; } -Reference< XInterface > ScfApiHelper::CreateInstance( SfxObjectShell* pShell, const OUString& rServiceName ) +Reference< XInterface > ScfApiHelper::CreateInstance( const SfxObjectShell* pShell, const OUString& rServiceName ) { return CreateInstance( GetServiceFactory( pShell ), rServiceName ); } diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx index 5dc06c5a8054..60b58e22de12 100644 --- a/sc/source/filter/html/htmlimp.cxx +++ b/sc/source/filter/html/htmlimp.cxx @@ -196,7 +196,7 @@ OUString ScFormatFilterPluginImpl::GetHTMLRangeNameList( ScDocument* pDoc, const return ScHTMLImport::GetHTMLRangeNameList( pDoc, rOrigName ); } -OUString ScHTMLImport::GetHTMLRangeNameList( ScDocument* pDoc, const OUString& rOrigName ) +OUString ScHTMLImport::GetHTMLRangeNameList( const ScDocument* pDoc, const OUString& rOrigName ) { OSL_ENSURE( pDoc, "ScHTMLImport::GetHTMLRangeNameList - missing document" ); diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 408fbbc1ab24..7a631bb63fa3 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -337,7 +337,7 @@ void ScHTMLLayoutParser::EntryEnd( ScEEParseEntry* pE, const ESelection& rSel ) } } -void ScHTMLLayoutParser::NextRow( HtmlImportInfo* pInfo ) +void ScHTMLLayoutParser::NextRow( const HtmlImportInfo* pInfo ) { if ( bInCell ) CloseEntry( pInfo ); @@ -348,7 +348,7 @@ void ScHTMLLayoutParser::NextRow( HtmlImportInfo* pInfo ) bFirstRow = false; } -bool ScHTMLLayoutParser::SeekOffset( ScHTMLColOffset* pOffset, sal_uInt16 nOffset, +bool ScHTMLLayoutParser::SeekOffset( const ScHTMLColOffset* pOffset, sal_uInt16 nOffset, SCCOL* pCol, sal_uInt16 nOffsetTol ) { OSL_ENSURE( pOffset, "ScHTMLLayoutParser::SeekOffset - illegal call" ); @@ -821,7 +821,7 @@ void ScHTMLLayoutParser::Colonize( ScEEParseEntry* pE ) nTableWidth = nColOffset - nColOffsetStart; } -void ScHTMLLayoutParser::CloseEntry( HtmlImportInfo* pInfo ) +void ScHTMLLayoutParser::CloseEntry( const HtmlImportInfo* pInfo ) { bInCell = false; if ( bTabInTabCell ) @@ -1032,19 +1032,19 @@ void ScHTMLLayoutParser::TableDataOn( HtmlImportInfo* pInfo ) SvxHorJustifyItem( SvxCellHorJustify::Center, ATTR_HOR_JUSTIFY) ); } -void ScHTMLLayoutParser::TableRowOn( HtmlImportInfo* pInfo ) +void ScHTMLLayoutParser::TableRowOn( const HtmlImportInfo* pInfo ) { if ( nColCnt > nColCntStart ) NextRow( pInfo ); // The optional TableRowOff wasn't there nColOffset = nColOffsetStart; } -void ScHTMLLayoutParser::TableRowOff( HtmlImportInfo* pInfo ) +void ScHTMLLayoutParser::TableRowOff( const HtmlImportInfo* pInfo ) { NextRow( pInfo ); } -void ScHTMLLayoutParser::TableDataOff( HtmlImportInfo* pInfo ) +void ScHTMLLayoutParser::TableDataOff( const HtmlImportInfo* pInfo ) { if ( bInCell ) CloseEntry( pInfo ); // Only if it really was one @@ -1161,7 +1161,7 @@ void ScHTMLLayoutParser::TableOn( HtmlImportInfo* pInfo ) MakeColNoRef( pLocalColOffset, nColOffsetStart, 0, 0, 0 ); } -void ScHTMLLayoutParser::TableOff( HtmlImportInfo* pInfo ) +void ScHTMLLayoutParser::TableOff( const HtmlImportInfo* pInfo ) { if ( bInCell ) CloseEntry( pInfo ); @@ -1457,7 +1457,7 @@ void ScHTMLLayoutParser::AnchorOn( HtmlImportInfo* pInfo ) } } -bool ScHTMLLayoutParser::IsAtBeginningOfText( HtmlImportInfo* pInfo ) +bool ScHTMLLayoutParser::IsAtBeginningOfText( const HtmlImportInfo* pInfo ) { ESelection& rSel = pActEntry->aSel; return rSel.nStartPara == rSel.nEndPara && diff --git a/sc/source/filter/inc/XclExpChangeTrack.hxx b/sc/source/filter/inc/XclExpChangeTrack.hxx index 19118d3a7819..4eede908e7aa 100644 --- a/sc/source/filter/inc/XclExpChangeTrack.hxx +++ b/sc/source/filter/inc/XclExpChangeTrack.hxx @@ -361,7 +361,7 @@ protected: void AddDependentContents( const ScChangeAction& rAction, const XclExpRoot& rRoot, - ScChangeTrack& rChangeTrack ); + const ScChangeTrack& rChangeTrack ); static inline void Write2DAddress( XclExpStream& rStrm, const ScAddress& rAddress ); static inline void Write2DRange( XclExpStream& rStrm, const ScRange& rRange ); @@ -511,7 +511,7 @@ public: const ScChangeAction& rAction, const XclExpRoot& rRoot, const XclExpChTrTabIdBuffer& rTabIdBuffer, - ScChangeTrack& rChangeTrack ); + const ScChangeTrack& rChangeTrack ); virtual ~XclExpChTrInsert() override; virtual sal_uInt16 GetNum() const override; @@ -560,7 +560,7 @@ public: const ScChangeActionMove& rAction, const XclExpRoot& rRoot, const XclExpChTrTabIdBuffer& rTabIdBuffer, - ScChangeTrack& rChangeTrack ); + const ScChangeTrack& rChangeTrack ); virtual ~XclExpChTrMoveRange() override; virtual sal_uInt16 GetNum() const override; diff --git a/sc/source/filter/inc/condformatbuffer.hxx b/sc/source/filter/inc/condformatbuffer.hxx index cb7bbf4dbfd3..4c4483fad930 100644 --- a/sc/source/filter/inc/condformatbuffer.hxx +++ b/sc/source/filter/inc/condformatbuffer.hxx @@ -256,7 +256,7 @@ class ExtCfDataBarRule : public WorksheetHelper ScDataBarFormatData* mpTarget; public: - ExtCfDataBarRule(ScDataBarFormatData* pTarget, WorksheetHelper& rParent); + ExtCfDataBarRule(ScDataBarFormatData* pTarget, const WorksheetHelper& rParent); void finalizeImport(); void importDataBar( const AttributeList& rAttribs ); void importNegativeFillColor( const AttributeList& rAttribs ); diff --git a/sc/source/filter/inc/dif.hxx b/sc/source/filter/inc/dif.hxx index cca74ecd6aa4..eeb788ab318f 100644 --- a/sc/source/filter/inc/dif.hxx +++ b/sc/source/filter/inc/dif.hxx @@ -78,7 +78,7 @@ private: static inline bool IsEOD( const sal_Unicode* pRef ); static inline bool Is1_0( const sal_Unicode* pRef ); public: - DifParser( SvStream&, ScDocument&, rtl_TextEncoding ); + DifParser( SvStream&, const ScDocument&, rtl_TextEncoding ); TOPIC GetNextTopic(); diff --git a/sc/source/filter/inc/drawingfragment.hxx b/sc/source/filter/inc/drawingfragment.hxx index fa527f08344c..277c3fba9f41 100644 --- a/sc/source/filter/inc/drawingfragment.hxx +++ b/sc/source/filter/inc/drawingfragment.hxx @@ -77,7 +77,7 @@ class GroupShapeContext : public ::oox::drawingml::ShapeGroupContext, public Wor { public: explicit GroupShapeContext( - ::oox::core::ContextHandler2Helper& rParent, + const ::oox::core::ContextHandler2Helper& rParent, const WorksheetHelper& rHelper, const ::oox::drawingml::ShapePtr& rxParentShape, const ::oox::drawingml::ShapePtr& rxShape ); diff --git a/sc/source/filter/inc/eeparser.hxx b/sc/source/filter/inc/eeparser.hxx index 4927817f817b..417af5b55e72 100644 --- a/sc/source/filter/inc/eeparser.hxx +++ b/sc/source/filter/inc/eeparser.hxx @@ -111,7 +111,7 @@ protected: SCCOL nColMax; SCROW nRowMax; - void NewActEntry( ScEEParseEntry* ); + void NewActEntry( const ScEEParseEntry* ); public: ScEEParser( EditEngine* ); @@ -124,7 +124,7 @@ public: void GetDimensions( SCCOL& nCols, SCROW& nRows ) const { nCols = nColMax; nRows = nRowMax; } - size_t ListSize() const{ return maList.size(); } + size_t ListSize() const{ return maList.size(); } ScEEParseEntry* ListEntry( size_t index ) { return maList[ index ]; } const ScEEParseEntry* ListEntry( size_t index ) const { return maList[ index ]; } }; diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx index ff7bd8e12428..66c65c82c8aa 100644 --- a/sc/source/filter/inc/excrecds.hxx +++ b/sc/source/filter/inc/excrecds.hxx @@ -221,11 +221,11 @@ public: class ExcDummy_041 : public ExcDummyRec { private: - static const sal_uInt8 pMyData[]; + static const sal_uInt8 pMyData[]; static const std::size_t nMyLen; public: virtual std::size_t GetLen() const override; - virtual const sal_uInt8* GetData() const override; + virtual const sal_uInt8* GetData() const override; }; //------------------------------------------------------------- class Exc1904 - @@ -233,8 +233,8 @@ public: class Exc1904 : public ExcBoolRecord { public: - Exc1904( ScDocument& rDoc ); - virtual sal_uInt16 GetNum() const override; + Exc1904( const ScDocument& rDoc ); + virtual sal_uInt16 GetNum() const override; virtual void SaveXml( XclExpXmlStream& rStrm ) override; private: @@ -248,15 +248,15 @@ class ExcBundlesheetBase : public ExcRecord protected: sal_uInt64 m_nStrPos; sal_uInt64 m_nOwnPos; // Position after # and Len - sal_uInt16 nGrbit; + sal_uInt16 nGrbit; SCTAB nTab; ExcBundlesheetBase(); public: - ExcBundlesheetBase( RootData& rRootData, SCTAB nTab ); + ExcBundlesheetBase( const RootData& rRootData, SCTAB nTab ); - void SetStreamPos(sal_uInt64 const nStrPos) { m_nStrPos = nStrPos; } + void SetStreamPos(sal_uInt64 const nStrPos) { m_nStrPos = nStrPos; } void UpdateStreamPos( XclExpStream& rStrm ); virtual sal_uInt16 GetNum() const override; @@ -270,7 +270,7 @@ private: virtual void SaveCont( XclExpStream& rStrm ) override; public: - ExcBundlesheet( RootData& rRootData, SCTAB nTab ); + ExcBundlesheet( const RootData& rRootData, SCTAB nTab ); virtual std::size_t GetLen() const override; }; @@ -362,7 +362,7 @@ public: bool IsEmpty() const { return (nType == EXC_AFTYPE_NOTUSED); } std::size_t GetTextBytes() const; - void SetCondition( sal_uInt8 nTp, sal_uInt8 nOp, double fV, OUString* pT ); + void SetCondition( sal_uInt8 nTp, sal_uInt8 nOp, double fV, const OUString* pT ); void Save( XclExpStream& rStrm ); void SaveXml( XclExpXmlStream& rStrm ); @@ -380,7 +380,7 @@ private: std::vector maMultiValues; bool AddCondition( ScQueryConnect eConn, sal_uInt8 nType, - sal_uInt8 nOp, double fVal, OUString* pText, + sal_uInt8 nOp, double fVal, const OUString* pText, bool bSimple = false ); virtual void WriteBody( XclExpStream& rStrm ) override; diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx index acd8944bd7e2..8d8f1ddc2860 100644 --- a/sc/source/filter/inc/fapihelper.hxx +++ b/sc/source/filter/inc/fapihelper.hxx @@ -63,7 +63,7 @@ public: static OUString GetServiceName( const css::uno::Reference< css::uno::XInterface >& xInt ); /** Returns the multi service factory from a document shell. */ - static css::uno::Reference< css::lang::XMultiServiceFactory > GetServiceFactory( SfxObjectShell* pShell ); + static css::uno::Reference< css::lang::XMultiServiceFactory > GetServiceFactory( const SfxObjectShell* pShell ); /** Creates an instance from the passed service name, using the passed service factory. */ static css::uno::Reference< css::uno::XInterface > CreateInstance( @@ -72,7 +72,7 @@ public: /** Creates an instance from the passed service name, using the service factory of the passed object. */ static css::uno::Reference< css::uno::XInterface > CreateInstance( - SfxObjectShell* pShell, + const SfxObjectShell* pShell, const OUString& rServiceName ); /** Creates an instance from the passed service name, using the process service factory. */ diff --git a/sc/source/filter/inc/htmlimp.hxx b/sc/source/filter/inc/htmlimp.hxx index c27c36e625f8..475e31745c82 100644 --- a/sc/source/filter/inc/htmlimp.hxx +++ b/sc/source/filter/inc/htmlimp.hxx @@ -34,7 +34,7 @@ public: virtual void WriteToDocument( bool bSizeColsRows = false, double nOutputFactor = 1.0, SvNumberFormatter* pFormatter = nullptr, bool bConvertDate = true ) override; - static OUString GetHTMLRangeNameList( ScDocument* pDoc, const OUString& rOrigName ); + static OUString GetHTMLRangeNameList( const ScDocument* pDoc, const OUString& rOrigName ); }; #endif diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx index 649f5ca3b49f..2e0ef191bde3 100644 --- a/sc/source/filter/inc/htmlpars.hxx +++ b/sc/source/filter/inc/htmlpars.hxx @@ -179,10 +179,10 @@ private: void NewActEntry( ScEEParseEntry* ); static void EntryEnd( ScEEParseEntry*, const ESelection& ); void ProcToken( HtmlImportInfo* ); - void CloseEntry( HtmlImportInfo* ); - void NextRow( HtmlImportInfo* ); + void CloseEntry( const HtmlImportInfo* ); + void NextRow( const HtmlImportInfo* ); void SkipLocked( ScEEParseEntry*, bool bJoin = true ); - static bool SeekOffset( ScHTMLColOffset*, sal_uInt16 nOffset, + static bool SeekOffset( const ScHTMLColOffset*, sal_uInt16 nOffset, SCCOL* pCol, sal_uInt16 nOffsetTol ); static void MakeCol( ScHTMLColOffset*, sal_uInt16& nOffset, sal_uInt16& nWidth, sal_uInt16 nOffsetTol, @@ -198,15 +198,15 @@ private: void Adjust(); sal_uInt16 GetWidthPixel( const HTMLOption& ); - bool IsAtBeginningOfText( HtmlImportInfo* ); + bool IsAtBeginningOfText( const HtmlImportInfo* ); void TableOn( HtmlImportInfo* ); void ColOn( HtmlImportInfo* ); - void TableRowOn( HtmlImportInfo* ); - void TableRowOff( HtmlImportInfo* ); + void TableRowOn( const HtmlImportInfo* ); + void TableRowOff( const HtmlImportInfo* ); void TableDataOn( HtmlImportInfo* ); - void TableDataOff( HtmlImportInfo* ); - void TableOff( HtmlImportInfo* ); + void TableDataOff( const HtmlImportInfo* ); + void TableOff( const HtmlImportInfo* ); void Image( HtmlImportInfo* ); void AnchorOn( HtmlImportInfo* ); void FontOn( HtmlImportInfo* ); diff --git a/sc/source/filter/inc/pivotcachebuffer.hxx b/sc/source/filter/inc/pivotcachebuffer.hxx index 33317d0c2f05..e3d5da48be9d 100644 --- a/sc/source/filter/inc/pivotcachebuffer.hxx +++ b/sc/source/filter/inc/pivotcachebuffer.hxx @@ -272,7 +272,7 @@ public: PivotCacheGroupItemVector& orItemNames ) const; /** Writes the title of the field into the passed sheet at the passed address. */ - void writeSourceHeaderCell( WorksheetHelper& rSheetHelper, + void writeSourceHeaderCell( const WorksheetHelper& rSheetHelper, sal_Int32 nCol, sal_Int32 nRow ) const; /** Writes a source field item value into the passed sheet. */ void writeSourceDataCell( WorksheetHelper& rSheetHelper, @@ -281,14 +281,14 @@ public: /** Reads an item from the PCRECORD record and writes it to the passed sheet. */ void importPCRecordItem( SequenceInputStream& rStrm, - WorksheetHelper& rSheetHelper, sal_Int32 nCol, sal_Int32 nRow ) const; + const WorksheetHelper& rSheetHelper, sal_Int32 nCol, sal_Int32 nRow ) const; private: /** Tries to write the passed value to the passed sheet position. */ - static void writeItemToSourceDataCell( WorksheetHelper& rSheetHelper, + static void writeItemToSourceDataCell( const WorksheetHelper& rSheetHelper, sal_Int32 nCol, sal_Int32 nRow, const PivotCacheItem& rItem ); /** Tries to write the value of a shared item to the passed sheet position. */ - void writeSharedItemToSourceDataCell( WorksheetHelper& rSheetHelper, + void writeSharedItemToSourceDataCell( const WorksheetHelper& rSheetHelper, sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nItemIdx ) const; private: @@ -383,7 +383,7 @@ public: sal_Int32 getCacheDatabaseIndex( sal_Int32 nFieldIdx ) const; /** Writes the titles of all source fields into the passed sheet. */ - void writeSourceHeaderCells( WorksheetHelper& rSheetHelper ) const; + void writeSourceHeaderCells( const WorksheetHelper& rSheetHelper ) const; /** Writes a source field item value into the passed sheet. */ void writeSourceDataCell( WorksheetHelper& rSheetHelper, sal_Int32 nColIdx, sal_Int32 nRowIdx, @@ -402,7 +402,7 @@ private: /** Creates a dummy sheet that will be filled with the pivot cache data. */ void prepareSourceDataSheet(); /** Checks, if the row index has changed since last call, and initializes the sheet data buffer. */ - void updateSourceDataRow( WorksheetHelper& rSheetHelper, sal_Int32 nRow ) const; + void updateSourceDataRow( const WorksheetHelper& rSheetHelper, sal_Int32 nRow ) const; private: typedef RefVector< PivotCacheField > PivotCacheFieldVector; diff --git a/sc/source/filter/inc/qprostyle.hxx b/sc/source/filter/inc/qprostyle.hxx index 09aa5ffc7bd5..2fa316c29adf 100644 --- a/sc/source/filter/inc/qprostyle.hxx +++ b/sc/source/filter/inc/qprostyle.hxx @@ -50,7 +50,7 @@ class ScQProStyle maFontHeight[ nIndex ] = nPtSize; } } - void setFontType( sal_uInt16 nIndex, OUString &aLabel ) + void setFontType( sal_uInt16 nIndex, const OUString &aLabel ) { if (nIndex < maxsize) maFontType[ nIndex ] = aLabel; } void setAlign( sal_uInt16 nIndex, sal_uInt8 nData ) { if (nIndex < maxsize) maAlign[ nIndex ] = nData; } diff --git a/sc/source/filter/inc/tool.h b/sc/source/filter/inc/tool.h index 1fde4eee450b..b7c99a6f54a4 100644 --- a/sc/source/filter/inc/tool.h +++ b/sc/source/filter/inc/tool.h @@ -94,7 +94,7 @@ private: SfxUInt32Item* NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt ); public: - FormCache( ScDocument* ); + FormCache( const ScDocument* ); ~FormCache(); inline const SfxUInt32Item* GetAttr( sal_uInt8 nFormat, sal_uInt8 nSt ); diff --git a/sc/source/filter/inc/xcl97esc.hxx b/sc/source/filter/inc/xcl97esc.hxx index b8bc241e3700..6d60c3d0acd7 100644 --- a/sc/source/filter/inc/xcl97esc.hxx +++ b/sc/source/filter/inc/xcl97esc.hxx @@ -59,7 +59,7 @@ class ShapeInteractionHelper public: static XclExpShapeObj* CreateShapeObj( XclExpObjectManager& rObjMgr, const css::uno::Reference< css::drawing::XShape >& xShape, ScDocument* pDoc ); - static void PopulateShapeInteractionInfo( XclExpObjectManager& rObjMgr, const css::uno::Reference< css::drawing::XShape >& xShape, EscherExHostAppData& rHostAppData ); + static void PopulateShapeInteractionInfo( const XclExpObjectManager& rObjMgr, const css::uno::Reference< css::drawing::XShape >& xShape, EscherExHostAppData& rHostAppData ); }; class XclEscherEx : public EscherEx, protected XclExpRoot diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx index d8221286b3fb..8e8cede49332 100644 --- a/sc/source/filter/inc/xcl97rec.hxx +++ b/sc/source/filter/inc/xcl97rec.hxx @@ -165,7 +165,7 @@ class XclObjComment : public XclObj public: XclObjComment( XclExpObjectManager& rObjMgr, - const tools::Rectangle& rRect, const EditTextObject& rEditObj, SdrCaptionObj* pCaption, bool bVisible, const ScAddress& rAddress, tools::Rectangle &rFrom, tools::Rectangle &To ); + const tools::Rectangle& rRect, const EditTextObject& rEditObj, SdrCaptionObj* pCaption, bool bVisible, const ScAddress& rAddress, const tools::Rectangle &rFrom, const tools::Rectangle &To ); virtual ~XclObjComment() override; /** c'tor process for formatted text objects above . @@ -309,7 +309,7 @@ private: virtual void SaveCont( XclExpStream& rStrm ) override; public: - ExcBundlesheet8( RootData& rRootData, SCTAB nTab ); + ExcBundlesheet8( const RootData& rRootData, SCTAB nTab ); ExcBundlesheet8( const OUString& rString ); virtual std::size_t GetLen() const override; diff --git a/sc/source/filter/inc/xeescher.hxx b/sc/source/filter/inc/xeescher.hxx index 24b87a75dc0d..8bfbaa72b989 100644 --- a/sc/source/filter/inc/xeescher.hxx +++ b/sc/source/filter/inc/xeescher.hxx @@ -397,7 +397,7 @@ public: /** Processes a drawing page and returns the record block containing all related records (MSODRAWING, OBJ, TXO, charts, etc.). */ - std::shared_ptr< XclExpRecordBase > ProcessDrawing( SdrPage* pSdrPage ); + std::shared_ptr< XclExpRecordBase > ProcessDrawing( const SdrPage* pSdrPage ); /** Processes a collection of UNO shapes and returns the record block containing all related records (MSODRAWING, OBJ, TXO, charts, etc.). */ std::shared_ptr< XclExpRecordBase > ProcessDrawing( const css::uno::Reference< css::drawing::XShapes >& rxShapes ); diff --git a/sc/source/filter/inc/xilink.hxx b/sc/source/filter/inc/xilink.hxx index 9a6cdf8d0dfd..5599523942dc 100644 --- a/sc/source/filter/inc/xilink.hxx +++ b/sc/source/filter/inc/xilink.hxx @@ -133,7 +133,7 @@ public: void CreateDdeData( ScDocument& rDoc, const OUString& rApplc, const OUString& rExtDoc ) const; - void CreateExtNameData( ScDocument& rDoc, sal_uInt16 nFileId ) const; + void CreateExtNameData( const ScDocument& rDoc, sal_uInt16 nFileId ) const; /** * Create OLE link data. OLE link data is converted to external diff --git a/sc/source/filter/inc/xipivot.hxx b/sc/source/filter/inc/xipivot.hxx index 34c0c32e214f..f5a9594d4cfd 100644 --- a/sc/source/filter/inc/xipivot.hxx +++ b/sc/source/filter/inc/xipivot.hxx @@ -170,7 +170,7 @@ public: */ void ReadDConName( XclImpStream& rStrm ); /** Reads the entire pivot cache stream. Uses decrypter from passed stream. */ - void ReadPivotCacheStream( XclImpStream& rStrm ); + void ReadPivotCacheStream( const XclImpStream& rStrm ); bool IsRefreshOnLoad() const; bool IsValid() const; @@ -406,7 +406,7 @@ public: void ReadSxViewEx9( XclImpStream& rStrm ); /** Reads all used pivot caches and creates additional sheets for external data sources. */ - void ReadPivotCaches( XclImpStream& rStrm ); + void ReadPivotCaches( const XclImpStream& rStrm ); /** Inserts all pivot tables into the Calc document. */ void ConvertPivotTables(); diff --git a/sc/source/filter/inc/xistream.hxx b/sc/source/filter/inc/xistream.hxx index a3f6890cdb3e..9f20f3984b32 100644 --- a/sc/source/filter/inc/xistream.hxx +++ b/sc/source/filter/inc/xistream.hxx @@ -59,7 +59,7 @@ public: virtual ::comphelper::DocPasswordVerifierResult verifyEncryptionData( const css::uno::Sequence< css::beans::NamedValue >& rEncryptionData ) override; /** Updates the decrypter on start of a new record or after seeking stream. */ - void Update( SvStream& rStrm, sal_uInt16 nRecSize ); + void Update( const SvStream& rStrm, sal_uInt16 nRecSize ); /** Reads and decrypts nBytes bytes and stores data into the existing(!) buffer pData. @return Count of bytes really read. */ sal_uInt16 Read( SvStream& rStrm, void* pData, sal_uInt16 nBytes ); diff --git a/sc/source/filter/inc/xiview.hxx b/sc/source/filter/inc/xiview.hxx index 626c2c621efa..f8a89ecdd407 100644 --- a/sc/source/filter/inc/xiview.hxx +++ b/sc/source/filter/inc/xiview.hxx @@ -73,7 +73,7 @@ public: /** Reads a SELECTION record. */ void ReadSelection( XclImpStream& rStrm ); /** Reads a SHEETEXT record (Tab Color). */ - void ReadTabBgColor( XclImpStream& rStrm, XclImpPalette& rPal ); + void ReadTabBgColor( XclImpStream& rStrm, const XclImpPalette& rPal ); /** Sets the view settings at the current sheet or the extended sheet options object. */ void Finalize(); diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx index d29d9f981480..e961b39bd871 100644 --- a/sc/source/filter/lotus/tool.cxx +++ b/sc/source/filter/lotus/tool.cxx @@ -147,7 +147,7 @@ double Snum32ToDouble( sal_uInt32 nValue ) return fValue; } -FormCache::FormCache( ScDocument* pDoc1 ) +FormCache::FormCache( const ScDocument* pDoc1 ) : nIndex(0) { pFormTable = pDoc1->GetFormatTable(); diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index 677ddb98af26..732288b1a71c 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -169,7 +169,7 @@ void ColorScaleRule::importCfvo( const AttributeList& rAttribs ) namespace { -::Color ARgbToARgbComponents( sal_uInt32& nRgb ) +::Color ARgbToARgbComponents( sal_uInt32 nRgb ) { // sal_Int32 ornA = 255 - ((nRgb >> 24) & 0xFF); // @@ -180,7 +180,7 @@ namespace { return ::Color(/*ornA*/ 0, ornR, ornG, ornB); } -::Color importOOXColor(const AttributeList& rAttribs, ThemeBuffer& rThemeBuffer, GraphicHelper& rGraphicHelper) +::Color importOOXColor(const AttributeList& rAttribs, const ThemeBuffer& rThemeBuffer, const GraphicHelper& rGraphicHelper) { sal_uInt32 nColor = 0; if( rAttribs.hasAttribute( XML_rgb ) ) @@ -1089,7 +1089,7 @@ CondFormatRef CondFormatBuffer::importConditionalFormatting( const AttributeList namespace { -ScConditionalFormat* findFormatByRange(const ScRangeList& rRange, ScDocument* pDoc, SCTAB nTab) +ScConditionalFormat* findFormatByRange(const ScRangeList& rRange, const ScDocument* pDoc, SCTAB nTab) { ScConditionalFormatList* pList = pDoc->GetCondFormList(nTab); for (auto const& it : *pList) @@ -1209,7 +1209,7 @@ CondFormatRef CondFormatBuffer::createCondFormat() return xCondFmt; } -ExtCfDataBarRule::ExtCfDataBarRule(ScDataBarFormatData* pTarget, WorksheetHelper& rParent): +ExtCfDataBarRule::ExtCfDataBarRule(ScDataBarFormatData* pTarget, const WorksheetHelper& rParent): WorksheetHelper(rParent), mnRuleType( ExtCfDataBarRule::UNKNOWN ), mpTarget(pTarget) diff --git a/sc/source/filter/oox/drawingfragment.cxx b/sc/source/filter/oox/drawingfragment.cxx index 555a3fe5f14f..8c5801fc2017 100644 --- a/sc/source/filter/oox/drawingfragment.cxx +++ b/sc/source/filter/oox/drawingfragment.cxx @@ -121,7 +121,7 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >& } } -GroupShapeContext::GroupShapeContext( ContextHandler2Helper& rParent, +GroupShapeContext::GroupShapeContext( const ContextHandler2Helper& rParent, const WorksheetHelper& rHelper, const ShapePtr& rxParentShape, const ShapePtr& rxShape ) : ShapeGroupContext( rParent, rxParentShape, rxShape ), WorksheetHelper( rHelper ) diff --git a/sc/source/filter/oox/excelvbaproject.cxx b/sc/source/filter/oox/excelvbaproject.cxx index d17497d3faf6..5ecb1c6ef8a8 100644 --- a/sc/source/filter/oox/excelvbaproject.cxx +++ b/sc/source/filter/oox/excelvbaproject.cxx @@ -56,7 +56,7 @@ struct SheetCodeNameInfo PropertySet maSheetProps; /// Property set of the sheet without codename. OUString maPrefix; /// Prefix for the codename to be generated. - explicit SheetCodeNameInfo( PropertySet& rSheetProps, const OUString& rPrefix ) : + explicit SheetCodeNameInfo( const PropertySet& rSheetProps, const OUString& rPrefix ) : maSheetProps( rSheetProps ), maPrefix( rPrefix ) {} }; diff --git a/sc/source/filter/oox/pivotcachebuffer.cxx b/sc/source/filter/oox/pivotcachebuffer.cxx index 25e75fd38f89..b89ed20e8e27 100644 --- a/sc/source/filter/oox/pivotcachebuffer.cxx +++ b/sc/source/filter/oox/pivotcachebuffer.cxx @@ -753,7 +753,7 @@ OUString PivotCacheField::createParentGroupField( const Reference< XDataPilotFie return xFieldName.is() ? xFieldName->getName() : OUString(); } -void PivotCacheField::writeSourceHeaderCell( WorksheetHelper& rSheetHelper, sal_Int32 nCol, sal_Int32 nRow ) const +void PivotCacheField::writeSourceHeaderCell( const WorksheetHelper& rSheetHelper, sal_Int32 nCol, sal_Int32 nRow ) const { CellModel aModel; aModel.maCellAddr = ScAddress( SCCOL( nCol ), SCROW( nRow ), rSheetHelper.getSheetIndex() ); @@ -770,7 +770,7 @@ void PivotCacheField::writeSourceDataCell( WorksheetHelper& rSheetHelper, sal_In writeItemToSourceDataCell( rSheetHelper, nCol, nRow, rItem ); } -void PivotCacheField::importPCRecordItem( SequenceInputStream& rStrm, WorksheetHelper& rSheetHelper, sal_Int32 nCol, sal_Int32 nRow ) const +void PivotCacheField::importPCRecordItem( SequenceInputStream& rStrm, const WorksheetHelper& rSheetHelper, sal_Int32 nCol, sal_Int32 nRow ) const { if( hasSharedItems() ) { @@ -791,7 +791,7 @@ void PivotCacheField::importPCRecordItem( SequenceInputStream& rStrm, WorksheetH // private -------------------------------------------------------------------- -void PivotCacheField::writeItemToSourceDataCell( WorksheetHelper& rSheetHelper, +void PivotCacheField::writeItemToSourceDataCell( const WorksheetHelper& rSheetHelper, sal_Int32 nCol, sal_Int32 nRow, const PivotCacheItem& rItem ) { if( rItem.getType() != XML_m ) @@ -813,7 +813,7 @@ void PivotCacheField::writeItemToSourceDataCell( WorksheetHelper& rSheetHelper, } void PivotCacheField::writeSharedItemToSourceDataCell( - WorksheetHelper& rSheetHelper, sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nItemIdx ) const + const WorksheetHelper& rSheetHelper, sal_Int32 nCol, sal_Int32 nRow, sal_Int32 nItemIdx ) const { if( const PivotCacheItem* pCacheItem = maSharedItems.getCacheItem( nItemIdx ) ) writeItemToSourceDataCell( rSheetHelper, nCol, nRow, *pCacheItem ); @@ -1025,7 +1025,7 @@ sal_Int32 PivotCache::getCacheDatabaseIndex( sal_Int32 nFieldIdx ) const return ContainerHelper::getVectorElement( maDatabaseIndexes, nFieldIdx, -1 ); } -void PivotCache::writeSourceHeaderCells( WorksheetHelper& rSheetHelper ) const +void PivotCache::writeSourceHeaderCells( const WorksheetHelper& rSheetHelper ) const { OSL_ENSURE( static_cast< size_t >( maSheetSrcModel.maRange.aEnd.Col() - maSheetSrcModel.maRange.aStart.Col() + 1 ) == maDatabaseFields.size(), "PivotCache::writeSourceHeaderCells - source cell range width does not match number of source fields" ); @@ -1133,7 +1133,7 @@ void PivotCache::prepareSourceDataSheet() } } -void PivotCache::updateSourceDataRow( WorksheetHelper& rSheetHelper, sal_Int32 nRow ) const +void PivotCache::updateSourceDataRow( const WorksheetHelper& rSheetHelper, sal_Int32 nRow ) const { if( mnCurrRow != nRow ) { diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx index cdd3cf909e92..28b48da25a77 100644 --- a/sc/source/filter/oox/sheetdatabuffer.cxx +++ b/sc/source/filter/oox/sheetdatabuffer.cxx @@ -318,7 +318,7 @@ void SheetDataBuffer::setMergedRange( const ScRange& rRange ) typedef std::pair FormatKeyPair; -void addIfNotInMyMap( StylesBuffer& rStyles, std::map< FormatKeyPair, ScRangeList >& rMap, sal_Int32 nXfId, sal_Int32 nFormatId, const ScRangeList& rRangeList ) +void addIfNotInMyMap( const StylesBuffer& rStyles, std::map< FormatKeyPair, ScRangeList >& rMap, sal_Int32 nXfId, sal_Int32 nFormatId, const ScRangeList& rRangeList ) { Xf* pXf1 = rStyles.getCellXf( nXfId ).get(); if ( pXf1 ) diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx index e10c66972e2b..a179099adafa 100644 --- a/sc/source/filter/rtf/eeimpars.cxx +++ b/sc/source/filter/rtf/eeimpars.cxx @@ -638,7 +638,7 @@ ScEEParser::~ScEEParser() SfxItemPool::Free(pPool); } -void ScEEParser::NewActEntry( ScEEParseEntry* pE ) +void ScEEParser::NewActEntry( const ScEEParseEntry* pE ) { // New free-flying pActEntry pActEntry = new ScEEParseEntry( pPool ); pActEntry->aSel.nStartPara = (pE ? pE->aSel.nEndPara + 1 : 0); diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx index 0e083aadaa66..f6afae56b346 100644 --- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx @@ -698,7 +698,7 @@ void XclExpChTrAction::SetAddAction( XclExpChTrAction* pAction ) void XclExpChTrAction::AddDependentContents( const ScChangeAction& rAction, const XclExpRoot& rRoot, - ScChangeTrack& rChangeTrack ) + const ScChangeTrack& rChangeTrack ) { ScChangeActionMap aActionMap; ScChangeActionMap::iterator itChangeAction; @@ -1095,7 +1095,7 @@ XclExpChTrInsert::XclExpChTrInsert( const ScChangeAction& rAction, const XclExpRoot& rRoot, const XclExpChTrTabIdBuffer& rTabIdBuffer, - ScChangeTrack& rChangeTrack ) : + const ScChangeTrack& rChangeTrack ) : XclExpChTrAction( rAction, rRoot, rTabIdBuffer ), mbEndOfList(false), aRange( rAction.GetBigRange().MakeRange() ) @@ -1258,7 +1258,7 @@ XclExpChTrMoveRange::XclExpChTrMoveRange( const ScChangeActionMove& rAction, const XclExpRoot& rRoot, const XclExpChTrTabIdBuffer& rTabIdBuffer, - ScChangeTrack& rChangeTrack ) : + const ScChangeTrack& rChangeTrack ) : XclExpChTrAction( rAction, rRoot, rTabIdBuffer, EXC_CHTR_OP_MOVE ), aDestRange( rAction.GetBigRange().MakeRange() ) { diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx index aa6523be3fff..c2028180e6e8 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -546,7 +546,7 @@ ShapeInteractionHelper::CreateShapeObj( XclExpObjectManager& rObjMgr, const Refe } void -ShapeInteractionHelper::PopulateShapeInteractionInfo( XclExpObjectManager& rObjMgr, const Reference< XShape >& xShape, EscherExHostAppData& rHostAppData ) +ShapeInteractionHelper::PopulateShapeInteractionInfo( const XclExpObjectManager& rObjMgr, const Reference< XShape >& xShape, EscherExHostAppData& rHostAppData ) { try { diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index fc840a6da51a..d39baf7e439c 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -494,7 +494,7 @@ void XclObj::SaveTextRecs( XclExpStream& rStrm ) // --- class XclObjComment ------------------------------------------ -XclObjComment::XclObjComment( XclExpObjectManager& rObjMgr, const tools::Rectangle& rRect, const EditTextObject& rEditObj, SdrCaptionObj* pCaption, bool bVisible, const ScAddress& rAddress, tools::Rectangle &rFrom, tools::Rectangle &rTo ) : +XclObjComment::XclObjComment( XclExpObjectManager& rObjMgr, const tools::Rectangle& rRect, const EditTextObject& rEditObj, SdrCaptionObj* pCaption, bool bVisible, const ScAddress& rAddress, const tools::Rectangle &rFrom, const tools::Rectangle &rTo ) : XclObj( rObjMgr, EXC_OBJTYPE_NOTE, true ) , maScPos( rAddress ) , mpCaption( pCaption->Clone() ) @@ -599,7 +599,7 @@ class VmlCommentExporter : public VMLExport tools::Rectangle maTo; public: - VmlCommentExporter ( const sax_fastparser::FSHelperPtr& p, const ScAddress& aScPos, SdrCaptionObj* pCaption, bool bVisible, tools::Rectangle &aFrom, tools::Rectangle &aTo ); + VmlCommentExporter ( const sax_fastparser::FSHelperPtr& p, const ScAddress& aScPos, SdrCaptionObj* pCaption, bool bVisible, const tools::Rectangle &aFrom, const tools::Rectangle &aTo ); protected: virtual void Commit( EscherPropertyContainer& rProps, const tools::Rectangle& rRect ) override; using VMLExport::StartShape; @@ -609,7 +609,7 @@ protected: }; VmlCommentExporter::VmlCommentExporter( const sax_fastparser::FSHelperPtr& p, const ScAddress& aScPos, SdrCaptionObj* pCaption, - bool bVisible, tools::Rectangle &aFrom, tools::Rectangle &aTo ) + bool bVisible, const tools::Rectangle &aFrom, const tools::Rectangle &aTo ) : VMLExport( p ) , maScPos( aScPos ) , mpCaption( pCaption ) @@ -1049,7 +1049,7 @@ void XclObjAny::WriteFromTo( XclExpXmlStream& rStrm, const XclObjAny& rObj ) } static const char* -GetEditAs( XclObjAny& rObj ) +GetEditAs( const XclObjAny& rObj ) { if( const SdrObject* pShape = EscherEx::GetSdrObject( rObj.GetShape() ) ) { @@ -1065,7 +1065,7 @@ GetEditAs( XclObjAny& rObj ) namespace { -ScRefFlags parseRange(const OUString& rString, ScRange& rRange, ScDocument* pDoc) +ScRefFlags parseRange(const OUString& rString, ScRange& rRange, const ScDocument* pDoc) { // start with the address convention set in the document formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); @@ -1087,7 +1087,7 @@ ScRefFlags parseRange(const OUString& rString, ScRange& rRange, ScDocument* pDoc return rRange.Parse(rString, pDoc, formula::FormulaGrammar::CONV_XL_R1C1); } -ScRefFlags parseAddress(const OUString& rString, ScAddress& rAddress, ScDocument* pDoc) +ScRefFlags parseAddress(const OUString& rString, ScAddress& rAddress, const ScDocument* pDoc) { // start with the address convention set in the document formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention(); @@ -1109,7 +1109,7 @@ ScRefFlags parseAddress(const OUString& rString, ScAddress& rAddress, ScDocument return rAddress.Parse(rString, pDoc, formula::FormulaGrammar::CONV_XL_R1C1); } -bool transformURL(const OUString& rOldURL, OUString& rNewURL, ScDocument* pDoc) +bool transformURL(const OUString& rOldURL, OUString& rNewURL, const ScDocument* pDoc) { if (rOldURL.startsWith("#")) { @@ -1233,7 +1233,7 @@ ExcBofW8::ExcBofW8() // --- class ExcBundlesheet8 ----------------------------------------- -ExcBundlesheet8::ExcBundlesheet8( RootData& rRootData, SCTAB _nTab ) : +ExcBundlesheet8::ExcBundlesheet8( const RootData& rRootData, SCTAB _nTab ) : ExcBundlesheetBase( rRootData, static_cast(_nTab) ), sUnicodeName( rRootData.pER->GetTabInfo().GetScTabName( _nTab ) ) { diff --git a/sc/source/ui/inc/cliputil.hxx b/sc/source/ui/inc/cliputil.hxx index 442dc46f3fcf..f5de294058f4 100644 --- a/sc/source/ui/inc/cliputil.hxx +++ b/sc/source/ui/inc/cliputil.hxx @@ -23,7 +23,7 @@ namespace ScClipUtil void PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTabViewShell, bool bShowDialog ); bool CheckDestRanges( - ScDocument* pDoc, SCCOL nSrcCols, SCROW nSrcRows, const ScMarkData& rMark, + const ScDocument* pDoc, SCCOL nSrcCols, SCROW nSrcRows, const ScMarkData& rMark, const ScRangeList& rDest); } diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx index 94c304de0b65..d7172038af14 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -128,7 +128,7 @@ public: bool PasteDataFormat( SotClipboardFormatId nFormatId, const css::uno::Reference< css::datatransfer::XTransferable >& rxTransferable, - SCCOL nPosX, SCROW nPosY, Point* pLogicPos, + SCCOL nPosX, SCROW nPosY, const Point* pLogicPos, bool bLink = false, bool bAllowDialogs = false ); bool PasteFile( const Point&, const OUString&, bool bLink ); @@ -170,7 +170,7 @@ public: const SfxStyleSheet* GetStyleSheetFromMarked(); - void SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet ); + void SetStyleSheetToMarked( const SfxStyleSheet* pStyleSheet ); void RemoveStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet ); void UpdateStyleSheetInUse( const SfxStyleSheetBase* pStyleSheet ); @@ -195,7 +195,7 @@ public: void SetWidthOrHeight( bool bWidth, const std::vector& rRanges, ScSizeMode eMode, - sal_uInt16 nSizeTwips, bool bRecord = true, ScMarkData* pMarkData = nullptr ); + sal_uInt16 nSizeTwips, bool bRecord = true, const ScMarkData* pMarkData = nullptr ); void SetMarkedWidthOrHeight( bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips ); diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx index dc84c2880b1d..565e0b1c8f87 100644 --- a/sc/source/ui/inc/viewutil.hxx +++ b/sc/source/ui/inc/viewutil.hxx @@ -59,18 +59,18 @@ public: static TransliterationFlags GetTransliterationType( sal_uInt16 nSlotID ); - static bool HasFiltered( const ScRange& rRange, ScDocument* pDoc ); + static bool HasFiltered( const ScRange& rRange, const ScDocument* pDoc ); /** Fit a range to cover nRows number of unfiltered rows. @return if the resulting range covers nRows unfiltered rows. */ - static bool FitToUnfilteredRows( ScRange & rRange, ScDocument * pDoc, size_t nRows ); - static void UnmarkFiltered( ScMarkData& rMark, ScDocument* pDoc ); + static bool FitToUnfilteredRows( ScRange & rRange, const ScDocument * pDoc, size_t nRows ); + static void UnmarkFiltered( ScMarkData& rMark, const ScDocument* pDoc ); static void HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, sal_uInt16 nSlotId ); /** Returns true, if the passed view shell is in full screen mode. */ - static bool IsFullScreen( SfxViewShell& rViewShell ); + static bool IsFullScreen( const SfxViewShell& rViewShell ); /** Enters or leaves full screen mode at the passed view shell. */ - static void SetFullScreen( SfxViewShell& rViewShell, bool bSet ); + static void SetFullScreen( const SfxViewShell& rViewShell, bool bSet ); }; class ScUpdateRect diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx index d5e415aee4da..db34fb9a0bde 100644 --- a/sc/source/ui/inc/xmlsourcedlg.hxx +++ b/sc/source/ui/inc/xmlsourcedlg.hxx @@ -70,7 +70,7 @@ private: void SelectSourceFile(); void LoadSourceFileStructure(const OUString& rPath); - void HandleGetFocus(Control* pCtrl); + void HandleGetFocus(const Control* pCtrl); void TreeItemSelected(); void DefaultElementSelected(SvTreeListEntry& rEntry); void RepeatElementSelected(SvTreeListEntry& rEntry); diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx index 78abb60ce20d..24ef0f4a2741 100644 --- a/sc/source/ui/view/cliputil.cxx +++ b/sc/source/ui/view/cliputil.cxx @@ -96,7 +96,7 @@ void ScClipUtil::PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTab } bool ScClipUtil::CheckDestRanges( - ScDocument* pDoc, SCCOL nSrcCols, SCROW nSrcRows, const ScMarkData& rMark, const ScRangeList& rDest) + const ScDocument* pDoc, SCCOL nSrcCols, SCROW nSrcRows, const ScMarkData& rMark, const ScRangeList& rDest) { for (size_t i = 0, n = rDest.size(); i < n; ++i) { diff --git a/sc/source/ui/view/gridwin_dbgutil.cxx b/sc/source/ui/view/gridwin_dbgutil.cxx index 2927f87bdac2..5f90d55f18c1 100644 --- a/sc/source/ui/view/gridwin_dbgutil.cxx +++ b/sc/source/ui/view/gridwin_dbgutil.cxx @@ -27,7 +27,7 @@ std::ostream& operator<<(std::ostream& rStrm, const ScAddress& rAddr) return rStrm; } -void dumpScDrawObjData(ScGridWindow& rWindow, ScDrawObjData& rData, MapUnit eMapUnit) +void dumpScDrawObjData(const ScGridWindow& rWindow, ScDrawObjData& rData, MapUnit eMapUnit) { const Point& rStartOffset = rData.maStartOffset; Point aStartOffsetPixel = rWindow.LogicToPixel(rStartOffset, MapMode(eMapUnit)); diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index 2c2b431b85b9..2b545ce6d2a9 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -73,7 +73,7 @@ using namespace com::sun::star; bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId, const uno::Reference& rxTransferable, - SCCOL nPosX, SCROW nPosY, Point* pLogicPos, bool bLink, bool bAllowDialogs ) + SCCOL nPosX, SCROW nPosY, const Point* pLogicPos, bool bLink, bool bAllowDialogs ) { ScDocument* pDoc = GetViewData().GetDocument(); pDoc->SetPastingDrawFromOtherDoc( true ); diff --git a/sc/source/ui/view/viewfun6.cxx b/sc/source/ui/view/viewfun6.cxx index 9816afda8d20..f5e887c13913 100644 --- a/sc/source/ui/view/viewfun6.cxx +++ b/sc/source/ui/view/viewfun6.cxx @@ -107,7 +107,7 @@ void ScViewFunc::DetectiveRefresh() RecalcPPT(); } -static void lcl_jumpToRange(const ScRange& rRange, ScViewData* pView, ScDocument* pDoc) +static void lcl_jumpToRange(const ScRange& rRange, ScViewData* pView, const ScDocument* pDoc) { OUString aAddrText(rRange.Format(ScRefFlags::RANGE_ABS_3D, pDoc)); SfxStringItem aPosItem(SID_CURRENTCELL, aAddrText); diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index a3132788411d..c43fb4b61138 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -315,7 +315,7 @@ static bool lcl_AddFunction( ScAppOptions& rAppOpt, sal_uInt16 nOpCode ) namespace HelperNotifyChanges { - void NotifyIfChangesListeners(ScDocShell &rDocShell, ScMarkData& rMark, SCCOL nCol, SCROW nRow) + void NotifyIfChangesListeners(const ScDocShell &rDocShell, ScMarkData& rMark, SCCOL nCol, SCROW nRow) { if (ScModelObj *pModelObj = getMustPropagateChangesModel(rDocShell)) { @@ -1310,7 +1310,7 @@ const SfxStyleSheet* ScViewFunc::GetStyleSheetFromMarked() return pSheet; } -void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet ) +void ScViewFunc::SetStyleSheetToMarked( const SfxStyleSheet* pStyleSheet ) { // not editable because of matrix only? attribute OK nonetheless bool bOnlyNotBecauseOfMatrix; @@ -1361,7 +1361,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet ) new ScUndoSelectionStyle( pDocSh, aFuncMark, aMarkRange, aName, pUndoDoc ) ); } - rDoc.ApplySelectionStyle( static_cast(*pStyleSheet), aFuncMark ); + rDoc.ApplySelectionStyle( static_cast(*pStyleSheet), aFuncMark ); if (!AdjustBlockHeight()) rViewData.GetDocShell()->PostPaint( aMarkRange, PaintPartFlags::Grid ); @@ -1397,7 +1397,7 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet ) ScMarkData::iterator itr = aFuncMark.begin(), itrEnd = aFuncMark.end(); for (; itr != itrEnd; ++itr) - rDoc.ApplyStyle( nCol, nRow, *itr, static_cast(*pStyleSheet) ); + rDoc.ApplyStyle( nCol, nRow, *itr, static_cast(*pStyleSheet) ); if (!AdjustBlockHeight()) rViewData.GetDocShell()->PostPaintCell( nCol, nRow, nTab ); @@ -1858,7 +1858,7 @@ void ScViewFunc::DeleteContents( InsertDeleteFlags nFlags ) void ScViewFunc::SetWidthOrHeight( bool bWidth, const std::vector& rRanges, ScSizeMode eMode, - sal_uInt16 nSizeTwips, bool bRecord, ScMarkData* pMarkData ) + sal_uInt16 nSizeTwips, bool bRecord, const ScMarkData* pMarkData ) { if (rRanges.empty()) return; diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index 144176759fb4..aedb386a96d4 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -227,7 +227,7 @@ bool ScViewUtil::IsActionShown( const ScChangeAction& rAction, return true; } -void ScViewUtil::UnmarkFiltered( ScMarkData& rMark, ScDocument* pDoc ) +void ScViewUtil::UnmarkFiltered( ScMarkData& rMark, const ScDocument* pDoc ) { rMark.MarkToMulti(); @@ -264,7 +264,7 @@ void ScViewUtil::UnmarkFiltered( ScMarkData& rMark, ScDocument* pDoc ) rMark.MarkToSimple(); } -bool ScViewUtil::FitToUnfilteredRows( ScRange & rRange, ScDocument * pDoc, size_t nRows ) +bool ScViewUtil::FitToUnfilteredRows( ScRange & rRange, const ScDocument * pDoc, size_t nRows ) { SCTAB nTab = rRange.aStart.Tab(); bool bOneTabOnly = (nTab == rRange.aEnd.Tab()); @@ -278,7 +278,7 @@ bool ScViewUtil::FitToUnfilteredRows( ScRange & rRange, ScDocument * pDoc, size_ return static_cast(nCount) == nRows && bOneTabOnly; } -bool ScViewUtil::HasFiltered( const ScRange& rRange, ScDocument* pDoc ) +bool ScViewUtil::HasFiltered( const ScRange& rRange, const ScDocument* pDoc ) { SCROW nStartRow = rRange.aStart.Row(); SCROW nEndRow = rRange.aEnd.Row(); @@ -353,7 +353,7 @@ bool ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont, return bRet; } -bool ScViewUtil::IsFullScreen( SfxViewShell& rViewShell ) +bool ScViewUtil::IsFullScreen( const SfxViewShell& rViewShell ) { SfxBindings& rBindings = rViewShell.GetViewFrame()->GetBindings(); std::unique_ptr pItem; @@ -365,7 +365,7 @@ bool ScViewUtil::IsFullScreen( SfxViewShell& rViewShell ) return bIsFullScreen; } -void ScViewUtil::SetFullScreen( SfxViewShell& rViewShell, bool bSet ) +void ScViewUtil::SetFullScreen( const SfxViewShell& rViewShell, bool bSet ) { if( IsFullScreen( rViewShell ) != bSet ) { diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx index b9bc6b9d147b..9ae8dc0cf223 100644 --- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx +++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx @@ -226,7 +226,7 @@ void ScXMLSourceDlg::LoadSourceFileStructure(const OUString& rPath) mpXMLContext->loadXMLStructure(*mpLbTree, maXMLParam); } -void ScXMLSourceDlg::HandleGetFocus(Control* pCtrl) +void ScXMLSourceDlg::HandleGetFocus(const Control* pCtrl) { mpActiveEdit = nullptr; if (pCtrl == mpRefEdit || pCtrl == mpRefBtn) @@ -244,7 +244,7 @@ class UnhighlightEntry public: explicit UnhighlightEntry(SvTreeListBox& rTree) : mrTree(rTree) {} - void operator() (SvTreeListEntry* p) + void operator() (const SvTreeListEntry* p) { SvViewDataEntry* pView = mrTree.GetViewDataEntry(p); if (!pView) @@ -261,7 +261,7 @@ public: * Otherwise the reference entry equals the current entry. A reference * entry is the entry that stores mapped cell position. */ -SvTreeListEntry* getReferenceEntry(SvTreeListBox& rTree, SvTreeListEntry* pCurEntry) +SvTreeListEntry* getReferenceEntry(const SvTreeListBox& rTree, SvTreeListEntry* pCurEntry) { SvTreeListEntry* pParent = rTree.GetParent(pCurEntry); SvTreeListEntry* pRefEntry = nullptr; -- cgit