summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-29 11:00:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-29 14:15:16 +0200
commitbcc372d15e731ab9ff660072a6dc860708e61a93 (patch)
tree5cacaad326bc858f236e98cf53e717435e168b12 /sc/source/filter/excel
parent3878c4725f0f5ce849f8a0482e3efba361599a42 (diff)
loplugin:constparam in sc part8
Change-Id: I6cf9c5e662b20de9c9698a8c1fab56a09950c522 Reviewed-on: https://gerrit.libreoffice.org/41683 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/filter/excel')
-rw-r--r--sc/source/filter/excel/excdoc.cxx6
-rw-r--r--sc/source/filter/excel/excrecds.cxx12
-rw-r--r--sc/source/filter/excel/xeescher.cxx2
-rw-r--r--sc/source/filter/excel/xeformula.cxx4
-rw-r--r--sc/source/filter/excel/xestream.cxx2
-rw-r--r--sc/source/filter/excel/xestyle.cxx2
-rw-r--r--sc/source/filter/excel/xetable.cxx4
-rw-r--r--sc/source/filter/excel/xicontent.cxx2
-rw-r--r--sc/source/filter/excel/xilink.cxx2
-rw-r--r--sc/source/filter/excel/xipivot.cxx4
-rw-r--r--sc/source/filter/excel/xistream.cxx2
-rw-r--r--sc/source/filter/excel/xiview.cxx2
-rw-r--r--sc/source/filter/excel/xlescher.cxx8
13 files changed, 26 insertions, 26 deletions
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 )
{