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>
This commit is contained in:
Noel Grandin 2017-08-29 11:00:31 +02:00
parent 3878c4725f
commit bcc372d15e
61 changed files with 147 additions and 145 deletions

View File

@ -420,6 +420,8 @@ bool ConstParams::checkIfCanBeConst(const Stmt* stmt, const ParmVarDecl* parmVar
return true;
} else if (isa<SwitchStmt>(parent)) {
return true;
} else if (isa<DoStmt>(parent)) {
return true;
} else if (isa<CXXDeleteExpr>(parent)) {
return false;
} else if (isa<VAArgExpr>(parent)) {

View File

@ -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);

View File

@ -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;

View File

@ -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 );
};

View File

@ -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)

View File

@ -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 ) );

View File

@ -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;

View File

@ -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 );

View File

@ -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)

View File

@ -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;

View File

@ -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);
}

View File

@ -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 );

View File

@ -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 )

View File

@ -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;

View File

@ -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 );

View File

@ -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() )
{

View File

@ -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 )

View File

@ -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 )
{

View File

@ -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 );
}

View File

@ -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" );

View File

@ -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 &&

View File

@ -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;

View File

@ -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 );

View File

@ -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();

View File

@ -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 );

View File

@ -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 ]; }
};

View File

@ -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<OUString> 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;

View File

@ -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. */

View File

@ -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

View File

@ -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* );

View File

@ -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;

View File

@ -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; }

View File

@ -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 );

View File

@ -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

View File

@ -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;

View File

@ -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 );

View File

@ -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

View File

@ -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();

View File

@ -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 );

View File

@ -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();

View File

@ -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();

View File

@ -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)

View File

@ -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 )

View File

@ -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 ) {}
};

View File

@ -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 )
{

View File

@ -318,7 +318,7 @@ void SheetDataBuffer::setMergedRange( const ScRange& rRange )
typedef std::pair<sal_Int32, sal_Int32> 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 )

View File

@ -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);

View File

@ -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() )
{

View File

@ -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
{

View File

@ -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<sal_uInt16>(_nTab) ),
sUnicodeName( rRootData.pER->GetTabInfo().GetScTabName( _nTab ) )
{

View File

@ -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);
}

View File

@ -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<sc::ColRowSpan>& 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 );

View File

@ -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 <TRUE/> 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

View File

@ -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);

View File

@ -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)
{

View File

@ -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));

View File

@ -73,7 +73,7 @@ using namespace com::sun::star;
bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
const uno::Reference<datatransfer::XTransferable>& 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 );

View File

@ -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);

View File

@ -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<ScStyleSheet&>(*pStyleSheet), aFuncMark );
rDoc.ApplySelectionStyle( static_cast<const ScStyleSheet&>(*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<ScStyleSheet&>(*pStyleSheet) );
rDoc.ApplyStyle( nCol, nRow, *itr, static_cast<const ScStyleSheet&>(*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<sc::ColRowSpan>& rRanges, ScSizeMode eMode,
sal_uInt16 nSizeTwips, bool bRecord, ScMarkData* pMarkData )
sal_uInt16 nSizeTwips, bool bRecord, const ScMarkData* pMarkData )
{
if (rRanges.empty())
return;

View File

@ -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<size_t>(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<SfxPoolItem> 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 )
{

View File

@ -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;