summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-09-14 17:01:50 +0200
committerMichael Stahl <mstahl@redhat.com>2016-09-15 12:01:11 +0200
commitb647996a9babbee7b33cf45192e57df6a124628b (patch)
treeddc6dfe8a62ec53fbacc4eeccfeb20019f3ef4f0 /sc/source
parenta19a67e20e847a42063559694ec5beec71abcfb3 (diff)
replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)
... except in include/rtl, include/sal, include/uno, where sal_Size is retained for compatibility, and where callers of rtl functions pass in pointers that are incompatible on MSVC. Change-Id: I8344453780689f5120ba0870e44965b6d292450c
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/tool/autoform.cxx2
-rw-r--r--sc/source/filter/excel/excform.cxx24
-rw-r--r--sc/source/filter/excel/excform8.cxx22
-rw-r--r--sc/source/filter/excel/excimp8.cxx2
-rw-r--r--sc/source/filter/excel/excrecds.cxx30
-rw-r--r--sc/source/filter/excel/impop.cxx2
-rw-r--r--sc/source/filter/excel/read.cxx10
-rw-r--r--sc/source/filter/excel/xechart.cxx6
-rw-r--r--sc/source/filter/excel/xehelper.cxx4
-rw-r--r--sc/source/filter/excel/xepivot.cxx6
-rw-r--r--sc/source/filter/excel/xerecord.cxx10
-rw-r--r--sc/source/filter/excel/xestream.cxx48
-rw-r--r--sc/source/filter/excel/xestring.cxx6
-rw-r--r--sc/source/filter/excel/xetable.cxx10
-rw-r--r--sc/source/filter/excel/xichart.cxx2
-rw-r--r--sc/source/filter/excel/xicontent.cxx2
-rw-r--r--sc/source/filter/excel/xiescher.cxx38
-rw-r--r--sc/source/filter/excel/xilink.cxx8
-rw-r--r--sc/source/filter/excel/xistream.cxx64
-rw-r--r--sc/source/filter/ftools/fprogressbar.cxx24
-rw-r--r--sc/source/filter/inc/XclExpChangeTrack.hxx46
-rw-r--r--sc/source/filter/inc/excform.hxx16
-rw-r--r--sc/source/filter/inc/excrecds.hxx32
-rw-r--r--sc/source/filter/inc/formel.hxx4
-rw-r--r--sc/source/filter/inc/fprogressbar.hxx32
-rw-r--r--sc/source/filter/inc/xcl97rec.hxx24
-rw-r--r--sc/source/filter/inc/xechart.hxx4
-rw-r--r--sc/source/filter/inc/xehelper.hxx4
-rw-r--r--sc/source/filter/inc/xepivot.hxx2
-rw-r--r--sc/source/filter/inc/xerecord.hxx20
-rw-r--r--sc/source/filter/inc/xestream.hxx20
-rw-r--r--sc/source/filter/inc/xestring.hxx4
-rw-r--r--sc/source/filter/inc/xetable.hxx16
-rw-r--r--sc/source/filter/inc/xichart.hxx4
-rw-r--r--sc/source/filter/inc/xiescher.hxx30
-rw-r--r--sc/source/filter/inc/xiname.hxx4
-rw-r--r--sc/source/filter/inc/xistream.hxx58
-rw-r--r--sc/source/filter/inc/xlchart.hxx2
-rw-r--r--sc/source/filter/inc/xlstream.hxx4
-rw-r--r--sc/source/filter/lotus/filter.cxx2
-rw-r--r--sc/source/filter/xcl97/XclExpChangeTrack.cxx52
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx24
-rw-r--r--sc/source/ui/unoobj/exceldetect.cxx6
43 files changed, 365 insertions, 365 deletions
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index f2f81e7b6222..4966475d3180 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -96,7 +96,7 @@ namespace
if (blobSize)
{
blob.pData = new sal_uInt8[blobSize];
- blob.size = static_cast<sal_Size>(blobSize);
+ blob.size = static_cast<std::size_t>(blobSize);
stream.ReadBytes(blob.pData, blob.size);
}
diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx
index eac2a9c23328..0b03feb10721 100644
--- a/sc/source/filter/excel/excform.cxx
+++ b/sc/source/filter/excel/excform.cxx
@@ -202,7 +202,7 @@ void ExcelToSc::GetDummy( const ScTokenArray*& pErgebnis )
// if bAllowArrays is false stream seeks to first byte after <nFormulaLen>
// otherwise it will seek to the first byte after the additional content (eg
// inline arrays) following <nFormulaLen>
-ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, sal_Size nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT )
+ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, std::size_t nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT )
{
RootData& rR = GetOldRoot();
sal_uInt8 nOp, nLen;
@@ -232,7 +232,7 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
return ConvOK;
}
- sal_Size nEndPos = aIn.GetRecPos() + nFormulaLen;
+ std::size_t nEndPos = aIn.GetRecPos() + nFormulaLen;
while( (aIn.GetRecPos() < nEndPos) && !bError )
{
@@ -396,7 +396,7 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
{
// nFakt -> skip bytes or words AttrChoose
++nData;
- aIn.Ignore(static_cast<sal_Size>(nData) * nFakt);
+ aIn.Ignore(static_cast<std::size_t>(nData) * nFakt);
}
else if( nOpt & 0x10 ) // AttrSum
DoMulArgs( ocSum, 1 );
@@ -896,12 +896,12 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s
}
// stream seeks to first byte after <nFormulaLen>
-ConvErr ExcelToSc::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, sal_Size nFormulaLen,
+ConvErr ExcelToSc::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, std::size_t nFormulaLen,
SCsTAB nTab, const FORMULA_TYPE eFT )
{
RootData& rR = GetOldRoot();
sal_uInt8 nOp, nLen;
- sal_Size nIgnore;
+ std::size_t nIgnore;
bool bError = false;
const bool bRangeName = eFT == FT_RangeName;
const bool bSharedFormula = eFT == FT_SharedFormula;
@@ -921,7 +921,7 @@ ConvErr ExcelToSc::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, sal_
if( nFormulaLen == 0 )
return ConvOK;
- sal_Size nEndPos = aIn.GetRecPos() + nFormulaLen;
+ std::size_t nEndPos = aIn.GetRecPos() + nFormulaLen;
while( (aIn.GetRecPos() < nEndPos) && !bError )
{
@@ -988,7 +988,7 @@ ConvErr ExcelToSc::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, sal_
{
// nFakt -> skip bytes or words AttrChoose
++nData;
- aIn.Ignore(static_cast<sal_Size>(nData) * nFakt);
+ aIn.Ignore(static_cast<std::size_t>(nData) * nFakt);
}
}
break;
@@ -1323,12 +1323,12 @@ ConvErr ExcelToSc::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, sal_
return eRet;
}
-void ExcelToSc::ConvertExternName( const ScTokenArray*& /*rpArray*/, XclImpStream& /*rStrm*/, sal_Size /*nFormulaLen*/,
+void ExcelToSc::ConvertExternName( const ScTokenArray*& /*rpArray*/, XclImpStream& /*rStrm*/, std::size_t /*nFormulaLen*/,
const OUString& /*rUrl*/, const vector<OUString>& /*rTabNames*/ )
{
}
-void ExcelToSc::GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen )
+void ExcelToSc::GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, std::size_t nLen )
{
OSL_ENSURE_BIFF( GetBiff() == EXC_BIFF5 );
if( GetBiff() != EXC_BIFF5 )
@@ -1341,8 +1341,8 @@ void ExcelToSc::GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Si
sal_uInt16 nTabFirst, nTabLast;
sal_Int16 nRefIdx;
- sal_Size nSeek;
- sal_Size nEndPos = rStrm.GetRecPos() + nLen;
+ std::size_t nSeek;
+ std::size_t nEndPos = rStrm.GetRecPos() + nLen;
while( rStrm.IsValid() && (rStrm.GetRecPos() < nEndPos) )
{
@@ -1901,7 +1901,7 @@ void ExcelToSc::ReadExtensionMemArea( XclImpStream& aIn )
sal_uInt16 nCount(0);
nCount = aIn.ReaduInt16();
- aIn.Ignore( static_cast<sal_Size>(nCount) * ((GetBiff() == EXC_BIFF8) ? 8 : 6) ); // drop the ranges
+ aIn.Ignore( static_cast<std::size_t>(nCount) * ((GetBiff() == EXC_BIFF8) ? 8 : 6) ); // drop the ranges
}
void ExcelToSc::ReadExtensions( const ExtensionTypeVec& rExtensions,
diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx
index 65007527c71a..ef3d09ae1c8b 100644
--- a/sc/source/filter/excel/excform8.cxx
+++ b/sc/source/filter/excel/excform8.cxx
@@ -135,7 +135,7 @@ bool ExcelToSc8::HandleOleLink(sal_uInt16 nXtiIndex, const XclImpExtName& rExtNa
// if bAllowArrays is false stream seeks to first byte after <nFormulaLen>
// otherwise it will seek to the first byte past additional content after <nFormulaLen>
-ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, sal_Size nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT )
+ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, std::size_t nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT )
{
bool bError = false;
bool bArrayFormula = false;
@@ -164,7 +164,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
return ConvOK;
}
- sal_Size nEndPos = aIn.GetRecPos() + nFormulaLen;
+ std::size_t nEndPos = aIn.GetRecPos() + nFormulaLen;
while( (aIn.GetRecPos() < nEndPos) && !bError )
{
@@ -386,7 +386,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
{
// nFakt -> skip bytes or words AttrChoose
nData++;
- aIn.Ignore(static_cast<sal_Size>(nData) * nFakt);
+ aIn.Ignore(static_cast<std::size_t>(nData) * nFakt);
}
else if( nOpt & 0x10 ) // AttrSum
DoMulArgs( ocSum, 1 );
@@ -953,7 +953,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn,
}
// stream seeks to first byte after <nFormulaLen>
-ConvErr ExcelToSc8::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, sal_Size nFormulaLen,
+ConvErr ExcelToSc8::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, std::size_t nFormulaLen,
SCsTAB nTab, const FORMULA_TYPE eFT )
{
sal_uInt8 nOp, nLen;
@@ -975,7 +975,7 @@ ConvErr ExcelToSc8::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
if( nFormulaLen == 0 )
return ConvOK;
- sal_Size nEndPos = aIn.GetRecPos() + nFormulaLen;
+ std::size_t nEndPos = aIn.GetRecPos() + nFormulaLen;
while( (aIn.GetRecPos() < nEndPos) && !bError )
{
@@ -1033,7 +1033,7 @@ ConvErr ExcelToSc8::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
{
// nFakt -> skip bytes or words AttrChoose
++nData;
- aIn.Ignore(static_cast<sal_Size>(nData) * nFakt);
+ aIn.Ignore(static_cast<std::size_t>(nData) * nFakt);
}
}
break;
@@ -1296,7 +1296,7 @@ ConvErr ExcelToSc8::Convert( ScRangeListTabs& rRangeList, XclImpStream& aIn, sal
return eRet;
}
-void ExcelToSc8::ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, sal_Size nFormulaLen,
+void ExcelToSc8::ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, std::size_t nFormulaLen,
const OUString& rUrl, const vector<OUString>& rTabNames )
{
if( !GetDocShell() )
@@ -1328,7 +1328,7 @@ void ExcelToSc8::ConvertExternName( const ScTokenArray*& rpArray, XclImpStream&
sal_uInt16 nFileId = pRefMgr->getExternalFileId(aFileUrl);
sal_uInt16 nTabCount = static_cast< sal_uInt16 >( rTabNames.size() );
- sal_Size nEndPos = rStrm.GetRecPos() + nFormulaLen;
+ std::size_t nEndPos = rStrm.GetRecPos() + nFormulaLen;
while( (rStrm.GetRecPos() < nEndPos) && !bError )
{
@@ -1500,16 +1500,16 @@ void ExcelToSc8::ExcRelToScRel8( sal_uInt16 nRow, sal_uInt16 nC, ScSingleRefData
}
// stream seeks to first byte after <nLen>
-void ExcelToSc8::GetAbsRefs( ScRangeList& r, XclImpStream& aIn, sal_Size nLen )
+void ExcelToSc8::GetAbsRefs( ScRangeList& r, XclImpStream& aIn, std::size_t nLen )
{
sal_uInt8 nOp;
sal_uInt16 nRow1, nRow2, nCol1, nCol2;
SCTAB nTab1, nTab2;
sal_uInt16 nIxti;
- sal_Size nSeek;
+ std::size_t nSeek;
- sal_Size nEndPos = aIn.GetRecPos() + nLen;
+ std::size_t nEndPos = aIn.GetRecPos() + nLen;
while( aIn.IsValid() && (aIn.GetRecPos() < nEndPos) )
{
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index 87c478ee93dc..7649c17674a1 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -352,7 +352,7 @@ void ImportExcel8::Feat()
sal_uInt32 nCbSD = aIn.ReaduInt32();
// TODO: could here be some sanity check applied to not allocate 4GB?
aProt.maSecurityDescriptor.resize( nCbSD);
- sal_Size nRead = aIn.Read( &aProt.maSecurityDescriptor.front(), nCbSD);
+ std::size_t nRead = aIn.Read( &aProt.maSecurityDescriptor.front(), nCbSD);
if (nRead < nCbSD)
aProt.maSecurityDescriptor.resize( nRead);
}
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index a1e3acd228f1..b4650298447a 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -91,20 +91,20 @@ const sal_uInt8 ExcDummy_00::pMyData[] = {
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
};
-const sal_Size ExcDummy_00::nMyLen = sizeof( ExcDummy_00::pMyData );
+const std::size_t ExcDummy_00::nMyLen = sizeof( ExcDummy_00::pMyData );
//-------------------------------------------------------- class ExcDummy_04x -
const sal_uInt8 ExcDummy_040::pMyData[] = {
0x40, 0x00, 0x02, 0x00, 0x00, 0x00, // BACKUP
0x8d, 0x00, 0x02, 0x00, 0x00, 0x00, // HIDEOBJ
};
-const sal_Size ExcDummy_040::nMyLen = sizeof( ExcDummy_040::pMyData );
+const std::size_t ExcDummy_040::nMyLen = sizeof( ExcDummy_040::pMyData );
const sal_uInt8 ExcDummy_041::pMyData[] = {
0x0e, 0x00, 0x02, 0x00, 0x01, 0x00, // PRECISION
0xda, 0x00, 0x02, 0x00, 0x00, 0x00 // BOOKBOOL
};
-const sal_Size ExcDummy_041::nMyLen = sizeof( ExcDummy_041::pMyData );
+const std::size_t ExcDummy_041::nMyLen = sizeof( ExcDummy_041::pMyData );
//-------------------------------------------------------- class ExcDummy_02a -
const sal_uInt8 ExcDummy_02a::pMyData[] = {
@@ -116,7 +116,7 @@ const sal_uInt8 ExcDummy_02a::pMyData[] = {
0x62, 0x50, 0x3f,
0x5f, 0x00, 0x02, 0x00, 0x01, 0x00 // SAVERECALC
};
-const sal_Size ExcDummy_02a::nMyLen = sizeof( ExcDummy_02a::pMyData );
+const std::size_t ExcDummy_02a::nMyLen = sizeof( ExcDummy_02a::pMyData );
//----------------------------------------------------------- class ExcRecord -
@@ -150,7 +150,7 @@ sal_uInt16 ExcEmptyRec::GetNum() const
return 0;
}
-sal_Size ExcEmptyRec::GetLen() const
+std::size_t ExcEmptyRec::GetLen() const
{
return 0;
}
@@ -174,7 +174,7 @@ void ExcBoolRecord::SaveCont( XclExpStream& rStrm )
rStrm << (sal_uInt16)(bVal ? 0x0001 : 0x0000);
}
-sal_Size ExcBoolRecord::GetLen() const
+std::size_t ExcBoolRecord::GetLen() const
{
return 2;
}
@@ -207,7 +207,7 @@ sal_uInt16 ExcBof::GetNum() const
return 0x0809;
}
-sal_Size ExcBof::GetLen() const
+std::size_t ExcBof::GetLen() const
{
return 8;
}
@@ -230,7 +230,7 @@ sal_uInt16 ExcBofW::GetNum() const
return 0x0809;
}
-sal_Size ExcBofW::GetLen() const
+std::size_t ExcBofW::GetLen() const
{
return 8;
}
@@ -242,14 +242,14 @@ sal_uInt16 ExcEof::GetNum() const
return 0x000A;
}
-sal_Size ExcEof::GetLen() const
+std::size_t ExcEof::GetLen() const
{
return 0;
}
//--------------------------------------------------------- class ExcDummy_00 -
-sal_Size ExcDummy_00::GetLen() const
+std::size_t ExcDummy_00::GetLen() const
{
return nMyLen;
}
@@ -261,7 +261,7 @@ const sal_uInt8* ExcDummy_00::GetData() const
//-------------------------------------------------------- class ExcDummy_04x -
-sal_Size ExcDummy_040::GetLen() const
+std::size_t ExcDummy_040::GetLen() const
{
return nMyLen;
}
@@ -271,7 +271,7 @@ const sal_uInt8* ExcDummy_040::GetData() const
return pMyData;
}
-sal_Size ExcDummy_041::GetLen() const
+std::size_t ExcDummy_041::GetLen() const
{
return nMyLen;
}
@@ -361,14 +361,14 @@ void ExcBundlesheet::SaveCont( XclExpStream& rStrm )
rStrm.WriteByteString(aName); // 8 bit length, max 255 chars
}
-sal_Size ExcBundlesheet::GetLen() const
+std::size_t ExcBundlesheet::GetLen() const
{
return 7 + std::min( aName.getLength(), (sal_Int32) 255 );
}
//--------------------------------------------------------- class ExcDummy_02 -
-sal_Size ExcDummy_02a::GetLen() const
+std::size_t ExcDummy_02a::GetLen() const
{
return nMyLen;
}
@@ -571,7 +571,7 @@ ExcFilterCondition::~ExcFilterCondition()
delete pText;
}
-sal_Size ExcFilterCondition::GetTextBytes() const
+std::size_t ExcFilterCondition::GetTextBytes() const
{
return pText ? (1 + pText->GetBufferSize()) : 0;
}
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index 6d27232ffd61..510df2141119 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -501,7 +501,7 @@ void ImportExcel::Columndefault()
nColMic = aIn.ReaduInt16();
nColMac = aIn.ReaduInt16();
- OSL_ENSURE( aIn.GetRecLeft() == (sal_Size)(nColMac - nColMic) * 3 + 2,
+ OSL_ENSURE( aIn.GetRecLeft() == (std::size_t)(nColMac - nColMic) * 3 + 2,
"ImportExcel::Columndefault - wrong record size" );
nColMac--;
diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx
index 1231d8072c03..70fc840974df 100644
--- a/sc/source/filter/excel/read.cxx
+++ b/sc/source/filter/excel/read.cxx
@@ -43,7 +43,7 @@
namespace
{
- bool TryStartNextRecord(XclImpStream& rIn, sal_Size nProgressBasePos)
+ bool TryStartNextRecord(XclImpStream& rIn, std::size_t nProgressBasePos)
{
bool bValid = true;
// i#115255 fdo#40304 BOUNDSHEET doesn't point to a valid
@@ -106,8 +106,8 @@ FltError ImportExcel::Read()
/* #i104057# Need to track a base position for progress bar calculation,
because sheet substreams may not be in order of sheets. */
- sal_Size nProgressBasePos = 0;
- sal_Size nProgressBaseSize = 0;
+ std::size_t nProgressBasePos = 0;
+ std::size_t nProgressBaseSize = 0;
for (; eAkt != Z_Ende; mnLastRecId = nOpcode)
{
@@ -841,8 +841,8 @@ FltError ImportExcel8::Read()
/* #i104057# Need to track a base position for progress bar calculation,
because sheet substreams may not be in order of sheets. */
- sal_Size nProgressBasePos = 0;
- sal_Size nProgressBaseSize = 0;
+ std::size_t nProgressBasePos = 0;
+ std::size_t nProgressBaseSize = 0;
bool bSheetHasCodeName = false;
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index 4e4c4a9ccb8c..1c03ccec29d6 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -423,7 +423,7 @@ void XclExpChRoot::FinalizeFutureRecBlock( XclExpStream& rStrm )
}
XclExpChGroupBase::XclExpChGroupBase( const XclExpChRoot& rRoot,
- sal_uInt16 nFrType, sal_uInt16 nRecId, sal_Size nRecSize ) :
+ sal_uInt16 nFrType, sal_uInt16 nRecId, std::size_t nRecSize ) :
XclExpRecord( nRecId, nRecSize ),
XclExpChRoot( rRoot ),
maFrBlock( nFrType )
@@ -467,7 +467,7 @@ void XclExpChGroupBase::SetFutureRecordContext( sal_uInt16 nFrContext, sal_uInt1
}
XclExpChFutureRecordBase::XclExpChFutureRecordBase( const XclExpChRoot& rRoot,
- XclFutureRecType eRecType, sal_uInt16 nRecId, sal_Size nRecSize ) :
+ XclFutureRecType eRecType, sal_uInt16 nRecId, std::size_t nRecSize ) :
XclExpFutureRecord( eRecType, nRecId, nRecSize ),
XclExpChRoot( rRoot )
{
@@ -1061,7 +1061,7 @@ void XclExpChSourceLink::Save( XclExpStream& rStrm )
// CHFORMATRUNS record
if( mxString && mxString->IsRich() )
{
- sal_Size nRecSize = (1 + mxString->GetFormatsCount()) * ((GetBiff() == EXC_BIFF8) ? 2 : 1);
+ std::size_t nRecSize = (1 + mxString->GetFormatsCount()) * ((GetBiff() == EXC_BIFF8) ? 2 : 1);
rStrm.StartRecord( EXC_ID_CHFORMATRUNS, nRecSize );
mxString->WriteFormats( rStrm, true );
rStrm.EndRecord();
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index 3a3c11ca881d..fa5a429a7b98 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -87,7 +87,7 @@ void XclExpProgressBar::Initialize()
SCCOL nLastUsedScCol;
SCROW nLastUsedScRow;
rDoc.GetTableArea( nScTab, nLastUsedScCol, nLastUsedScRow );
- sal_Size nSegSize = static_cast< sal_Size >( nLastUsedScRow + 1 );
+ std::size_t nSegSize = static_cast< std::size_t >( nLastUsedScRow + 1 );
maSubSegRowCreate[ nScTab ] = mpSubRowCreate->AddSegment( nSegSize );
}
}
@@ -996,7 +996,7 @@ void XclExpCachedMatrix::GetDimensions( SCSIZE & nCols, SCSIZE & nRows ) const
OSL_ENSURE( nCols <= 256, "XclExpCachedMatrix::GetDimensions - too many columns" );
}
-sal_Size XclExpCachedMatrix::GetSize() const
+std::size_t XclExpCachedMatrix::GetSize() const
{
SCSIZE nCols, nRows;
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index de36642a9e7a..928a55eb0a21 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -274,7 +274,7 @@ sal_uInt16 XclExpPCField::GetItemIndex( const OUString& rItemName ) const
return EXC_PC_NOITEM;
}
-sal_Size XclExpPCField::GetIndexSize() const
+std::size_t XclExpPCField::GetIndexSize() const
{
return Has16BitIndexes() ? 2 : 1;
}
@@ -844,7 +844,7 @@ void XclExpPivotCache::WriteSxindexlistList( XclExpStream& rStrm ) const
{
if( HasItemIndexList() )
{
- sal_Size nRecSize = 0;
+ std::size_t nRecSize = 0;
size_t nPos, nSize = maFieldList.GetSize();
for( nPos = 0; nPos < nSize; ++nPos )
nRecSize += maFieldList.GetRecord( nPos )->GetIndexSize();
@@ -1491,7 +1491,7 @@ void XclExpPivotTable::WriteSxli( XclExpStream& rStrm, sal_uInt16 nLineCount, sa
{
if( nLineCount > 0 )
{
- sal_Size nLineSize = 8 + 2 * nIndexCount;
+ std::size_t nLineSize = 8 + 2 * nIndexCount;
rStrm.StartRecord( EXC_ID_SXLI, nLineSize * nLineCount );
/* Excel expects the records to be filled completely, do not
diff --git a/sc/source/filter/excel/xerecord.cxx b/sc/source/filter/excel/xerecord.cxx
index 22eef61d8023..d0e35ed8735b 100644
--- a/sc/source/filter/excel/xerecord.cxx
+++ b/sc/source/filter/excel/xerecord.cxx
@@ -124,7 +124,7 @@ void XclExpXmlEndSingleElementRecord::SaveXml( XclExpXmlStream& rStrm )
rStrm.GetCurrentStream()->write( "/>" );
}
-XclExpRecord::XclExpRecord( sal_uInt16 nRecId, sal_Size nRecSize ) :
+XclExpRecord::XclExpRecord( sal_uInt16 nRecId, std::size_t nRecSize ) :
mnRecSize( nRecSize ),
mnRecId( nRecId )
{
@@ -134,7 +134,7 @@ XclExpRecord::~XclExpRecord()
{
}
-void XclExpRecord::SetRecHeader( sal_uInt16 nRecId, sal_Size nRecSize )
+void XclExpRecord::SetRecHeader( sal_uInt16 nRecId, std::size_t nRecSize )
{
SetRecId( nRecId );
SetRecSize( nRecSize );
@@ -178,13 +178,13 @@ void XclExpBoolRecord::SaveXml( XclExpXmlStream& rStrm )
FSEND );
}
-XclExpDummyRecord::XclExpDummyRecord( sal_uInt16 nRecId, const void* pRecData, sal_Size nRecSize ) :
+XclExpDummyRecord::XclExpDummyRecord( sal_uInt16 nRecId, const void* pRecData, std::size_t nRecSize ) :
XclExpRecord( nRecId )
{
SetData( pRecData, nRecSize );
}
-void XclExpDummyRecord::SetData( const void* pRecData, sal_Size nRecSize )
+void XclExpDummyRecord::SetData( const void* pRecData, std::size_t nRecSize )
{
mpData = pRecData;
SetRecSize( pRecData ? nRecSize : 0 );
@@ -197,7 +197,7 @@ void XclExpDummyRecord::WriteBody( XclExpStream& rStrm )
// Future records =============================================================
-XclExpFutureRecord::XclExpFutureRecord( XclFutureRecType eRecType, sal_uInt16 nRecId, sal_Size nRecSize ) :
+XclExpFutureRecord::XclExpFutureRecord( XclFutureRecType eRecType, sal_uInt16 nRecId, std::size_t nRecSize ) :
XclExpRecord( nRecId, nRecSize ),
meRecType( eRecType )
{
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 9c4d1c22fc76..7d08fb84ec70 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -99,7 +99,7 @@ XclExpStream::~XclExpStream()
mrStrm.Flush();
}
-void XclExpStream::StartRecord( sal_uInt16 nRecId, sal_Size nRecSize )
+void XclExpStream::StartRecord( sal_uInt16 nRecId, std::size_t nRecSize )
{
OSL_ENSURE( !mbInRec, "XclExpStream::StartRecord - another record still open" );
DisableEncryption();
@@ -206,21 +206,21 @@ XclExpStream& XclExpStream::operator<<( double fValue )
return *this;
}
-sal_Size XclExpStream::Write( const void* pData, sal_Size nBytes )
+std::size_t XclExpStream::Write( const void* pData, std::size_t nBytes )
{
- sal_Size nRet = 0;
+ std::size_t nRet = 0;
if( pData && (nBytes > 0) )
{
if( mbInRec )
{
const sal_uInt8* pBuffer = static_cast< const sal_uInt8* >( pData );
- sal_Size nBytesLeft = nBytes;
+ std::size_t nBytesLeft = nBytes;
bool bValid = true;
while( bValid && (nBytesLeft > 0) )
{
- sal_Size nWriteLen = ::std::min< sal_Size >( PrepareWrite(), nBytesLeft );
- sal_Size nWriteRet = nWriteLen;
+ std::size_t nWriteLen = ::std::min< std::size_t >( PrepareWrite(), nBytesLeft );
+ std::size_t nWriteRet = nWriteLen;
if (mbUseEncrypter && HasValidEncrypter())
{
OSL_ENSURE(nWriteLen > 0, "XclExpStream::Write: write length is 0!");
@@ -247,14 +247,14 @@ sal_Size XclExpStream::Write( const void* pData, sal_Size nBytes )
return nRet;
}
-void XclExpStream::WriteZeroBytes( sal_Size nBytes )
+void XclExpStream::WriteZeroBytes( std::size_t nBytes )
{
if( mbInRec )
{
- sal_Size nBytesLeft = nBytes;
+ std::size_t nBytesLeft = nBytes;
while( nBytesLeft > 0 )
{
- sal_Size nWriteLen = ::std::min< sal_Size >( PrepareWrite(), nBytesLeft );
+ std::size_t nWriteLen = ::std::min< std::size_t >( PrepareWrite(), nBytesLeft );
WriteRawZeroBytes( nWriteLen );
nBytesLeft -= nWriteLen;
UpdateSizeVars( nWriteLen );
@@ -264,14 +264,14 @@ void XclExpStream::WriteZeroBytes( sal_Size nBytes )
WriteRawZeroBytes( nBytes );
}
-void XclExpStream::WriteZeroBytesToRecord( sal_Size nBytes )
+void XclExpStream::WriteZeroBytesToRecord( std::size_t nBytes )
{
if (!mbInRec)
// not in record.
return;
sal_uInt8 nZero = 0;
- for (sal_Size i = 0; i < nBytes; ++i)
+ for (std::size_t i = 0; i < nBytes; ++i)
*this << nZero;
}
@@ -281,16 +281,16 @@ void XclExpStream::CopyFromStream(SvStream& rInStrm, sal_uInt64 const nBytes)
sal_uInt64 nBytesLeft = ::std::min(nBytes, nRemaining);
if( nBytesLeft > 0 )
{
- const sal_Size nMaxBuffer = 4096;
+ const std::size_t nMaxBuffer = 4096;
std::unique_ptr<sal_uInt8[]> pBuffer(
- new sal_uInt8[ ::std::min<sal_Size>(nBytesLeft, nMaxBuffer) ]);
+ new sal_uInt8[ ::std::min<std::size_t>(nBytesLeft, nMaxBuffer) ]);
bool bValid = true;
while( bValid && (nBytesLeft > 0) )
{
- sal_Size nWriteLen = ::std::min<sal_Size>(nBytesLeft, nMaxBuffer);
+ std::size_t nWriteLen = ::std::min<std::size_t>(nBytesLeft, nMaxBuffer);
rInStrm.ReadBytes(pBuffer.get(), nWriteLen);
- sal_Size nWriteRet = Write( pBuffer.get(), nWriteLen );
+ std::size_t nWriteRet = Write( pBuffer.get(), nWriteLen );
bValid = (nWriteLen == nWriteRet);
nBytesLeft -= nWriteRet;
}
@@ -324,8 +324,8 @@ void XclExpStream::WriteUnicodeBuffer( const ScfUInt16Vec& rBuffer, sal_uInt8 nF
void XclExpStream::WriteByteString( const OString& rString )
{
SetSliceSize( 0 );
- sal_Size nLen = ::std::min< sal_Size >( rString.getLength(), 0x00FF );
- nLen = ::std::min< sal_Size >( nLen, 0xFF );
+ std::size_t nLen = ::std::min< std::size_t >( rString.getLength(), 0x00FF );
+ nLen = ::std::min< std::size_t >( nLen, 0xFF );
sal_uInt16 nLeft = PrepareWrite();
if( mbInRec && (nLeft <= 1) )
@@ -375,7 +375,7 @@ void XclExpStream::InitRecord( sal_uInt16 nRecId )
mrStrm.WriteUInt16( nRecId );
mnLastSizePos = mrStrm.Tell();
- mnHeaderSize = static_cast< sal_uInt16 >( ::std::min< sal_Size >( mnPredictSize, mnCurrMaxSize ) );
+ mnHeaderSize = static_cast< sal_uInt16 >( ::std::min< std::size_t >( mnPredictSize, mnCurrMaxSize ) );
mrStrm.WriteUInt16( mnHeaderSize );
mnCurrSize = mnSliceSize = 0;
}
@@ -389,7 +389,7 @@ void XclExpStream::UpdateRecSize()
}
}
-void XclExpStream::UpdateSizeVars( sal_Size nSize )
+void XclExpStream::UpdateSizeVars( std::size_t nSize )
{
OSL_ENSURE( mnCurrSize + nSize <= mnCurrMaxSize, "XclExpStream::UpdateSizeVars - record overwritten" );
mnCurrSize = mnCurrSize + static_cast< sal_uInt16 >( nSize );
@@ -437,10 +437,10 @@ sal_uInt16 XclExpStream::PrepareWrite()
return nRet;
}
-void XclExpStream::WriteRawZeroBytes( sal_Size nBytes )
+void XclExpStream::WriteRawZeroBytes( std::size_t nBytes )
{
const sal_uInt32 nData = 0;
- sal_Size nBytesLeft = nBytes;
+ std::size_t nBytesLeft = nBytes;
while( nBytesLeft >= sizeof( nData ) )
{
mrStrm.WriteUInt32( nData );
@@ -565,12 +565,12 @@ void XclExpBiff8Encrypter::Init( const Sequence< NamedValue >& rEncryptionData )
}
}
-sal_uInt32 XclExpBiff8Encrypter::GetBlockPos( sal_Size nStrmPos )
+sal_uInt32 XclExpBiff8Encrypter::GetBlockPos( std::size_t nStrmPos )
{
return static_cast< sal_uInt32 >( nStrmPos / EXC_ENCR_BLOCKSIZE );
}
-sal_uInt16 XclExpBiff8Encrypter::GetOffsetInBlock( sal_Size nStrmPos )
+sal_uInt16 XclExpBiff8Encrypter::GetOffsetInBlock( std::size_t nStrmPos )
{
return static_cast< sal_uInt16 >( nStrmPos % EXC_ENCR_BLOCKSIZE );
}
@@ -623,7 +623,7 @@ void XclExpBiff8Encrypter::EncryptBytes( SvStream& rStrm, vector<sal_uInt8>& aBy
OSL_ENSURE(bRet, "XclExpBiff8Encrypter::EncryptBytes: encryption failed!!");
(void) bRet; // to remove a silly compiler warning.
- sal_Size nRet = rStrm.WriteBytes(&aBytes[nPos], nEncBytes);
+ std::size_t nRet = rStrm.WriteBytes(&aBytes[nPos], nEncBytes);
OSL_ENSURE(nRet == nEncBytes, "XclExpBiff8Encrypter::EncryptBytes: fail to write to stream!!");
(void) nRet; // to remove a silly compiler warning.
diff --git a/sc/source/filter/excel/xestring.cxx b/sc/source/filter/excel/xestring.cxx
index cdb1601bb30f..7a388d805500 100644
--- a/sc/source/filter/excel/xestring.cxx
+++ b/sc/source/filter/excel/xestring.cxx
@@ -240,12 +240,12 @@ sal_uInt16 XclExpString::GetHeaderSize() const
(IsWriteFormats() ? 2 : 0); // richtext formattting count
}
-sal_Size XclExpString::GetBufferSize() const
+std::size_t XclExpString::GetBufferSize() const
{
- return static_cast<sal_Size>(mnLen) * (mbIsUnicode ? 2 : 1);
+ return static_cast<std::size_t>(mnLen) * (mbIsUnicode ? 2 : 1);
}
-sal_Size XclExpString::GetSize() const
+std::size_t XclExpString::GetSize() const
{
return
GetHeaderSize() + // header
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index 8be5f2bedfff..bed5e720b746 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -535,7 +535,7 @@ XclExpTableopRef XclExpTableopBuffer::TryCreate( const ScAddress& rScPos, const
// Cell records
XclExpCellBase::XclExpCellBase(
- sal_uInt16 nRecId, sal_Size nContSize, const XclAddress& rXclPos ) :
+ sal_uInt16 nRecId, std::size_t nContSize, const XclAddress& rXclPos ) :
XclExpRecord( nRecId, nContSize + 4 ),
maXclPos( rXclPos )
{
@@ -564,7 +564,7 @@ void XclExpCellBase::RemoveUnusedBlankCells( const ScfUInt16Vec& /*rXFIndexes*/
// Single cell records ========================================================
XclExpSingleCellBase::XclExpSingleCellBase(
- sal_uInt16 nRecId, sal_Size nContSize, const XclAddress& rXclPos, sal_uInt32 nXFId ) :
+ sal_uInt16 nRecId, std::size_t nContSize, const XclAddress& rXclPos, sal_uInt32 nXFId ) :
XclExpCellBase( nRecId, 2, rXclPos ),
maXFId( nXFId ),
mnContSize( nContSize )
@@ -572,7 +572,7 @@ XclExpSingleCellBase::XclExpSingleCellBase(
}
XclExpSingleCellBase::XclExpSingleCellBase( const XclExpRoot& rRoot,
- sal_uInt16 nRecId, sal_Size nContSize, const XclAddress& rXclPos,
+ sal_uInt16 nRecId, std::size_t nContSize, const XclAddress& rXclPos,
const ScPatternAttr* pPattern, sal_Int16 nScript, sal_uInt32 nForcedXFId ) :
XclExpCellBase( nRecId, 2, rXclPos ),
maXFId( nForcedXFId ),
@@ -1103,7 +1103,7 @@ void XclExpFormulaCell::WriteContents( XclExpStream& rStrm )
// Multiple cell records ======================================================
XclExpMultiCellBase::XclExpMultiCellBase(
- sal_uInt16 nRecId, sal_uInt16 nMulRecId, sal_Size nContSize, const XclAddress& rXclPos ) :
+ sal_uInt16 nRecId, sal_uInt16 nMulRecId, std::size_t nContSize, const XclAddress& rXclPos ) :
XclExpCellBase( nRecId, 0, rXclPos ),
mnMulRecId( nMulRecId ),
mnContSize( nContSize )
@@ -1165,7 +1165,7 @@ void XclExpMultiCellBase::Save( XclExpStream& rStrm )
{
sal_uInt16 nCount = nEndXclCol - nBegXclCol;
bool bIsMulti = nCount > 1;
- sal_Size nTotalSize = GetRecSize() + (2 + mnContSize) * nCount;
+ std::size_t nTotalSize = GetRecSize() + (2 + mnContSize) * nCount;
if( bIsMulti ) nTotalSize += 2;
rStrm.StartRecord( bIsMulti ? mnMulRecId : GetRecId(), nTotalSize );
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index f160e2b2e490..8739a44d73a1 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -4320,7 +4320,7 @@ void XclImpChart::UpdateObjFrame( const XclObjLineData& rLineData, const XclObjF
mxChartData->UpdateObjFrame( rLineData, rFillData );
}
-sal_Size XclImpChart::GetProgressSize() const
+std::size_t XclImpChart::GetProgressSize() const
{
return
(mxChartData ? XclImpChChart::GetProgressSize() : 0) +
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index bec74d6084d6..27e84eb56000 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -113,7 +113,7 @@ void lclAppendString32( OUString& rString, XclImpStream& rStrm, sal_uInt32 nChar
sal_uInt16 nReadChars = ulimit_cast< sal_uInt16 >( nChars );
rString += rStrm.ReadRawUniString( nReadChars, b16Bit );
// ignore remaining chars
- sal_Size nIgnore = nChars - nReadChars;
+ std::size_t nIgnore = nChars - nReadChars;
if( b16Bit )
nIgnore *= 2;
rStrm.Ignore( nIgnore );
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 11a46f47565c..0ae25f02a302 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -410,7 +410,7 @@ ScRange XclImpDrawObjBase::GetUsedArea( SCTAB nScTab ) const
return aScUsedArea;
}
-sal_Size XclImpDrawObjBase::GetProgressSize() const
+std::size_t XclImpDrawObjBase::GetProgressSize() const
{
return DoGetProgressSize();
}
@@ -790,7 +790,7 @@ void XclImpDrawObjBase::DoReadObj8SubRec( XclImpStream&, sal_uInt16, sal_uInt16
{
}
-sal_Size XclImpDrawObjBase::DoGetProgressSize() const
+std::size_t XclImpDrawObjBase::DoGetProgressSize() const
{
return 1;
}
@@ -886,7 +886,7 @@ void XclImpDrawObjBase::ImplReadObj8( XclImpStream& rStrm )
nSubRecSize = rStrm.ReaduInt16();
rStrm.PushPosition();
// sometimes the last subrecord has an invalid length (OBJLBSDATA) -> min()
- nSubRecSize = static_cast< sal_uInt16 >( ::std::min< sal_Size >( nSubRecSize, rStrm.GetRecLeft() ) );
+ nSubRecSize = static_cast< sal_uInt16 >( ::std::min< std::size_t >( nSubRecSize, rStrm.GetRecLeft() ) );
switch( nSubRecId )
{
@@ -952,9 +952,9 @@ void XclImpDrawObjVector::InsertGrouped( XclImpDrawObjRef const & xDrawObj )
mObjs.push_back( xDrawObj );
}
-sal_Size XclImpDrawObjVector::GetProgressSize() const
+std::size_t XclImpDrawObjVector::GetProgressSize() const
{
- sal_Size nProgressSize = 0;
+ std::size_t nProgressSize = 0;
for( ::std::vector< XclImpDrawObjRef >::const_iterator aIt = mObjs.begin(), aEnd = mObjs.end(); aIt != aEnd; ++aIt )
nProgressSize += (*aIt)->GetProgressSize();
return nProgressSize;
@@ -1006,7 +1006,7 @@ void XclImpGroupObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_u
ReadMacro5( rStrm, nMacroSize );
}
-sal_Size XclImpGroupObj::DoGetProgressSize() const
+std::size_t XclImpGroupObj::DoGetProgressSize() const
{
return XclImpDrawObjBase::DoGetProgressSize() + maChildren.GetProgressSize();
}
@@ -1681,7 +1681,7 @@ void XclImpChartObj::DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId
}
}
-sal_Size XclImpChartObj::DoGetProgressSize() const
+std::size_t XclImpChartObj::DoGetProgressSize() const
{
return mxChart ? mxChart->GetProgressSize() : 1;
}
@@ -2657,9 +2657,9 @@ XclImpListBoxObj::XclImpListBoxObj( const XclImpRoot& rRoot ) :
{
}
-void XclImpListBoxObj::ReadFullLbsData( XclImpStream& rStrm, sal_Size nRecLeft )
+void XclImpListBoxObj::ReadFullLbsData( XclImpStream& rStrm, std::size_t nRecLeft )
{
- sal_Size nRecEnd = rStrm.GetRecPos() + nRecLeft;
+ std::size_t nRecEnd = rStrm.GetRecPos() + nRecLeft;
ReadLbsData( rStrm );
OSL_ENSURE( (rStrm.GetRecPos() == nRecEnd) || (rStrm.GetRecPos() + mnEntryCount == nRecEnd),
"XclImpListBoxObj::ReadFullLbsData - invalid size of OBJLBSDATA record" );
@@ -3037,7 +3037,7 @@ void XclImpPictureObj::ReadFlags8( XclImpStream& rStrm )
void XclImpPictureObj::ReadPictFmla( XclImpStream& rStrm, sal_uInt16 nLinkSize )
{
- sal_Size nLinkEnd = rStrm.GetRecPos() + nLinkSize;
+ std::size_t nLinkEnd = rStrm.GetRecPos() + nLinkSize;
if( nLinkSize >= 6 )
{
sal_uInt16 nFmlaSize;
@@ -3120,8 +3120,8 @@ void XclImpPictureObj::ReadPictFmla( XclImpStream& rStrm, sal_uInt16 nLinkSize )
if( rStrm.GetRecLeft() <= 8 ) return;
// position and size of control data in 'Ctls' stream
- mnCtlsStrmPos = static_cast< sal_Size >( rStrm.ReaduInt32() );
- mnCtlsStrmSize = static_cast< sal_Size >( rStrm.ReaduInt32() );
+ mnCtlsStrmPos = static_cast< std::size_t >( rStrm.ReaduInt32() );
+ mnCtlsStrmSize = static_cast< std::size_t >( rStrm.ReaduInt32() );
if( rStrm.GetRecLeft() <= 8 ) return;
@@ -3285,14 +3285,14 @@ OUString XclImpObjectManager::GetOleNameOverride( SCTAB nTab, sal_uInt16 nObjId
return sOleName;
}
-void XclImpDffConverter::StartProgressBar( sal_Size nProgressSize )
+void XclImpDffConverter::StartProgressBar( std::size_t nProgressSize )
{
mxProgress.reset( new ScfProgressBar( GetDocShell(), STR_PROGRESS_CALCULATING ) );
mxProgress->AddSegment( nProgressSize );
mxProgress->Activate();
}
-void XclImpDffConverter::Progress( sal_Size nDelta )
+void XclImpDffConverter::Progress( std::size_t nDelta )
{
OSL_ENSURE( mxProgress, "XclImpDffConverter::Progress - invalid call, no progress bar" );
mxProgress->Progress( nDelta );
@@ -3689,7 +3689,7 @@ OUString XclImpDffConverter::ReadHlinkProperty( SvStream& rDffStrm ) const
void XclImpDffConverter::ProcessDgContainer( SvStream& rDffStrm, const DffRecordHeader& rDgHeader )
{
- sal_Size nEndPos = rDgHeader.GetRecEndFilePos();
+ std::size_t nEndPos = rDgHeader.GetRecEndFilePos();
while( rDffStrm.Tell() < nEndPos )
{
DffRecordHeader aHeader;
@@ -3718,7 +3718,7 @@ void XclImpDffConverter::ProcessDgContainer( SvStream& rDffStrm, const DffRecord
void XclImpDffConverter::ProcessShGrContainer( SvStream& rDffStrm, const DffRecordHeader& rShGrHeader )
{
- sal_Size nEndPos = rShGrHeader.GetRecEndFilePos();
+ std::size_t nEndPos = rShGrHeader.GetRecEndFilePos();
while( rDffStrm.Tell() < nEndPos )
{
DffRecordHeader aHeader;
@@ -3951,9 +3951,9 @@ void XclImpDrawing::SetSkipObj( sal_uInt16 nObjId )
maSkipObjs.push_back( nObjId );
}
-sal_Size XclImpDrawing::GetProgressSize() const
+std::size_t XclImpDrawing::GetProgressSize() const
{
- sal_Size nProgressSize = maRawObjs.GetProgressSize();
+ std::size_t nProgressSize = maRawObjs.GetProgressSize();
for( XclImpObjMap::const_iterator aIt = maObjMap.begin(), aEnd = maObjMap.end(); aIt != aEnd; ++aIt )
nProgressSize += aIt->second->GetProgressSize();
return nProgressSize;
@@ -4251,7 +4251,7 @@ void XclImpObjectManager::ConvertObjects()
return;
// get total progress bar size for all sheet drawing managers
- sal_Size nProgressSize = 0;
+ std::size_t nProgressSize = 0;
for( XclImpSheetDrawingMap::iterator aIt = maSheetDrawings.begin(), aEnd = maSheetDrawings.end(); aIt != aEnd; ++aIt )
nProgressSize += aIt->second->GetProgressSize();
// nothing to do if progress bar is zero (no objects present)
diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx
index 6a5c2bf334f5..38cdc4ceffdc 100644
--- a/sc/source/filter/excel/xilink.cxx
+++ b/sc/source/filter/excel/xilink.cxx
@@ -243,11 +243,11 @@ void XclImpTabInfo::ReadTabid( XclImpStream& rStrm )
if( rStrm.GetRoot().GetBiff() == EXC_BIFF8 )
{
rStrm.EnableDecryption();
- sal_Size nReadCount = rStrm.GetRecLeft() / 2;
+ std::size_t nReadCount = rStrm.GetRecLeft() / 2;
OSL_ENSURE( nReadCount <= 0xFFFF, "XclImpTabInfo::ReadTabid - record too long" );
maTabIdVec.clear();
maTabIdVec.reserve( nReadCount );
- for( sal_Size nIndex = 0; rStrm.IsValid() && (nIndex < nReadCount); ++nIndex )
+ for( std::size_t nIndex = 0; rStrm.IsValid() && (nIndex < nReadCount); ++nIndex )
// zero index is not allowed in BIFF8, but it seems that it occurs in real life
maTabIdVec.push_back( rStrm.ReaduInt16() );
}
@@ -774,8 +774,8 @@ void XclImpLinkManagerImpl::ReadExternsheet( XclImpStream& rStrm )
{
sal_uInt16 nXtiCount;
nXtiCount = rStrm.ReaduInt16();
- OSL_ENSURE( static_cast< sal_Size >( nXtiCount * 6 ) == rStrm.GetRecLeft(), "XclImpLinkManagerImpl::ReadExternsheet - invalid count" );
- nXtiCount = static_cast< sal_uInt16 >( ::std::min< sal_Size >( nXtiCount, rStrm.GetRecLeft() / 6 ) );
+ OSL_ENSURE( static_cast< std::size_t >( nXtiCount * 6 ) == rStrm.GetRecLeft(), "XclImpLinkManagerImpl::ReadExternsheet - invalid count" );
+ nXtiCount = static_cast< sal_uInt16 >( ::std::min< std::size_t >( nXtiCount, rStrm.GetRecLeft() / 6 ) );
/* #i104057# A weird external XLS generator writes multiple EXTERNSHEET
records instead of only one as expected. Surprisingly, Excel seems to
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index a2be5dadf7c4..31cf3d5ced08 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -179,7 +179,7 @@ bool XclImpBiff5Decrypter::OnVerifyEncryptionData( const uno::Sequence< beans::N
return maEncryptionData.getLength();
}
-void XclImpBiff5Decrypter::OnUpdate( sal_Size /*nOldStrmPos*/, sal_Size nNewStrmPos, sal_uInt16 nRecSize )
+void XclImpBiff5Decrypter::OnUpdate( std::size_t /*nOldStrmPos*/, std::size_t nNewStrmPos, sal_uInt16 nRecSize )
{
maCodec.InitCipher();
maCodec.Skip( (nNewStrmPos + nRecSize) & 0x0F );
@@ -256,7 +256,7 @@ bool XclImpBiff8Decrypter::OnVerifyEncryptionData( const uno::Sequence< beans::N
return maEncryptionData.getLength();
}
-void XclImpBiff8Decrypter::OnUpdate( sal_Size nOldStrmPos, sal_Size nNewStrmPos, sal_uInt16 /*nRecSize*/ )
+void XclImpBiff8Decrypter::OnUpdate( std::size_t nOldStrmPos, std::size_t nNewStrmPos, sal_uInt16 /*nRecSize*/ )
{
if( nNewStrmPos != nOldStrmPos )
{
@@ -304,12 +304,12 @@ sal_uInt16 XclImpBiff8Decrypter::OnRead( SvStream& rStrm, sal_uInt8* pnData, sal
return nRet;
}
-sal_uInt32 XclImpBiff8Decrypter::GetBlock( sal_Size nStrmPos )
+sal_uInt32 XclImpBiff8Decrypter::GetBlock( std::size_t nStrmPos )
{
return static_cast< sal_uInt32 >( nStrmPos / EXC_ENCR_BLOCKSIZE );
}
-sal_uInt16 XclImpBiff8Decrypter::GetOffset( sal_Size nStrmPos )
+sal_uInt16 XclImpBiff8Decrypter::GetOffset( std::size_t nStrmPos )
{
return static_cast< sal_uInt16 >( nStrmPos % EXC_ENCR_BLOCKSIZE );
}
@@ -327,7 +327,7 @@ XclImpStreamPos::XclImpStreamPos() :
}
void XclImpStreamPos::Set(
- const SvStream& rStrm, sal_Size nNextPos, sal_Size nCurrSize,
+ const SvStream& rStrm, std::size_t nNextPos, std::size_t nCurrSize,
sal_uInt16 nRawRecId, sal_uInt16 nRawRecSize, sal_uInt16 nRawRecLeft,
bool bValid )
{
@@ -341,7 +341,7 @@ void XclImpStreamPos::Set(
}
void XclImpStreamPos::Get(
- SvStream& rStrm, sal_Size& rnNextPos, sal_Size& rnCurrSize,
+ SvStream& rStrm, std::size_t& rnNextPos, std::size_t& rnCurrSize,
sal_uInt16& rnRawRecId, sal_uInt16& rnRawRecSize, sal_uInt16& rnRawRecLeft,
bool& rbValid ) const
{
@@ -430,7 +430,7 @@ bool XclImpStream::StartNextRecord()
/* #i4266# Counter to ignore zero records (id==len==0) (i.e. the application
"Crystal Report" writes zero records between other records) */
- sal_Size nZeroRecCount = 5;
+ std::size_t nZeroRecCount = 5;
bool bIsZeroRec = false;
do
@@ -449,7 +449,7 @@ bool XclImpStream::StartNextRecord()
return mbValidRec;
}
-bool XclImpStream::StartNextRecord( sal_Size nNextRecPos )
+bool XclImpStream::StartNextRecord( std::size_t nNextRecPos )
{
mnNextRecPos = nNextRecPos;
return StartNextRecord();
@@ -537,12 +537,12 @@ void XclImpStream::SeekGlobalPosition()
}
}
-sal_Size XclImpStream::GetRecPos() const
+std::size_t XclImpStream::GetRecPos() const
{
return mbValid ? (mnCurrRecSize - mnRawRecLeft) : EXC_REC_SEEK_TO_END;
}
-sal_Size XclImpStream::GetRecSize()
+std::size_t XclImpStream::GetRecSize()
{
if( !mbHasComplRec )
{
@@ -555,7 +555,7 @@ sal_Size XclImpStream::GetRecSize()
return mnComplRecSize;
}
-sal_Size XclImpStream::GetRecLeft()
+std::size_t XclImpStream::GetRecLeft()
{
return mbValid ? (GetRecSize() - GetRecPos()) : 0;
}
@@ -577,12 +577,12 @@ sal_uInt16 XclImpStream::GetNextRecId()
return nRecId;
}
-sal_uInt16 XclImpStream::PeekRecId( sal_Size nPos )
+sal_uInt16 XclImpStream::PeekRecId( std::size_t nPos )
{
sal_uInt16 nRecId = EXC_ID_UNKNOWN;
if (mbValidRec && nPos < mnStreamSize)
{
- sal_Size nCurPos = mrStrm.Tell();
+ sal_uInt64 const nCurPos = mrStrm.Tell();
mrStrm.Seek(nPos);
mrStrm.ReadUInt16( nRecId );
mrStrm.Seek(nCurPos);
@@ -694,13 +694,13 @@ double XclImpStream::ReadDouble()
return nValue;
}
-sal_Size XclImpStream::Read( void* pData, sal_Size nBytes )
+std::size_t XclImpStream::Read( void* pData, std::size_t nBytes )
{
- sal_Size nRet = 0;
+ std::size_t nRet = 0;
if( mbValid && pData && (nBytes > 0) )
{
sal_uInt8* pnBuffer = static_cast< sal_uInt8* >( pData );
- sal_Size nBytesLeft = nBytes;
+ std::size_t nBytesLeft = nBytes;
while( mbValid && (nBytesLeft > 0) )
{
@@ -719,18 +719,18 @@ sal_Size XclImpStream::Read( void* pData, sal_Size nBytes )
return nRet;
}
-sal_Size XclImpStream::CopyToStream( SvStream& rOutStrm, sal_Size nBytes )
+std::size_t XclImpStream::CopyToStream( SvStream& rOutStrm, std::size_t nBytes )
{
- sal_Size nRet = 0;
+ std::size_t nRet = 0;
if( mbValid && (nBytes > 0) )
{
- const sal_Size nMaxBuffer = 4096;
+ const std::size_t nMaxBuffer = 4096;
std::unique_ptr<sal_uInt8[]> pnBuffer(new sal_uInt8[ ::std::min( nBytes, nMaxBuffer ) ]);
- sal_Size nBytesLeft = nBytes;
+ std::size_t nBytesLeft = nBytes;
while( mbValid && (nBytesLeft > 0) )
{
- sal_Size nReadSize = ::std::min( nBytesLeft, nMaxBuffer );
+ std::size_t nReadSize = ::std::min( nBytesLeft, nMaxBuffer );
nRet += Read( pnBuffer.get(), nReadSize );
// writing more bytes than read results in invalid memory access
SAL_WARN_IF(nRet != nReadSize, "sc", "read less bytes than requested");
@@ -752,11 +752,11 @@ void XclImpStream::CopyRecordToStream( SvStream& rOutStrm )
}
}
-void XclImpStream::Seek( sal_Size nPos )
+void XclImpStream::Seek( std::size_t nPos )
{
if( mbValidRec )
{
- sal_Size nCurrPos = GetRecPos();
+ std::size_t nCurrPos = GetRecPos();
if( !mbValid || (nPos < nCurrPos) ) // from invalid state or backward
{
RestorePosition( maFirstRec );
@@ -769,10 +769,10 @@ void XclImpStream::Seek( sal_Size nPos )
}
}
-void XclImpStream::Ignore( sal_Size nBytes )
+void XclImpStream::Ignore( std::size_t nBytes )
{
// implementation similar to Read(), but without really reading anything
- sal_Size nBytesLeft = nBytes;
+ std::size_t nBytesLeft = nBytes;
while( mbValid && (nBytesLeft > 0) )
{
sal_uInt16 nReadSize = GetMaxRawReadSize( nBytesLeft );
@@ -785,7 +785,7 @@ void XclImpStream::Ignore( sal_Size nBytes )
}
}
-sal_Size XclImpStream::ReadUniStringExtHeader(
+std::size_t XclImpStream::ReadUniStringExtHeader(
bool& rb16Bit, bool& rbRich, bool& rbFareast,
sal_uInt16& rnFormatRuns, sal_uInt32& rnExtInf, sal_uInt8 nFlags )
{
@@ -798,7 +798,7 @@ sal_Size XclImpStream::ReadUniStringExtHeader(
return rnExtInf + 4 * rnFormatRuns;
}
-sal_Size XclImpStream::ReadUniStringExtHeader( bool& rb16Bit, sal_uInt8 nFlags )
+std::size_t XclImpStream::ReadUniStringExtHeader( bool& rb16Bit, sal_uInt8 nFlags )
{
bool bRich, bFareast;
sal_uInt16 nCrun;
@@ -861,7 +861,7 @@ OUString XclImpStream::ReadRawUniString( sal_uInt16 nChars, bool b16Bit )
OUString XclImpStream::ReadUniString( sal_uInt16 nChars, sal_uInt8 nFlags )
{
bool b16Bit;
- sal_Size nExtSize = ReadUniStringExtHeader( b16Bit, nFlags );
+ std::size_t nExtSize = ReadUniStringExtHeader( b16Bit, nFlags );
OUString aRet( ReadRawUniString( nChars, b16Bit ) );
Ignore( nExtSize );
return aRet;
@@ -906,7 +906,7 @@ void XclImpStream::IgnoreRawUniString( sal_uInt16 nChars, bool b16Bit )
void XclImpStream::IgnoreUniString( sal_uInt16 nChars, sal_uInt8 nFlags )
{
bool b16Bit;
- sal_Size nExtSize = ReadUniStringExtHeader( b16Bit, nFlags );
+ std::size_t nExtSize = ReadUniStringExtHeader( b16Bit, nFlags );
IgnoreRawUniString( nChars, b16Bit );
Ignore( nExtSize );
}
@@ -946,7 +946,7 @@ void XclImpStream::RestorePosition( const XclImpStreamPos& rPos )
bool XclImpStream::ReadNextRawRecHeader()
{
- sal_Size nSeekedPos = mrStrm.Seek( mnNextRecPos );
+ std::size_t nSeekedPos = mrStrm.Seek( mnNextRecPos );
bool bRet = (nSeekedPos == mnNextRecPos) && (mnNextRecPos + 4 <= mnStreamSize);
if( bRet )
{
@@ -1035,9 +1035,9 @@ bool XclImpStream::EnsureRawReadSize( sal_uInt16 nBytes )
return mbValid;
}
-sal_uInt16 XclImpStream::GetMaxRawReadSize( sal_Size nBytes ) const
+sal_uInt16 XclImpStream::GetMaxRawReadSize( std::size_t nBytes ) const
{
- return static_cast< sal_uInt16 >( ::std::min< sal_Size >( nBytes, mnRawRecLeft ) );
+ return static_cast< sal_uInt16 >( ::std::min< std::size_t >( nBytes, mnRawRecLeft ) );
}
sal_uInt16 XclImpStream::ReadRawData( void* pData, sal_uInt16 nBytes )
diff --git a/sc/source/filter/ftools/fprogressbar.cxx b/sc/source/filter/ftools/fprogressbar.cxx
index 170d5e51ec46..a958629e288f 100644
--- a/sc/source/filter/ftools/fprogressbar.cxx
+++ b/sc/source/filter/ftools/fprogressbar.cxx
@@ -23,7 +23,7 @@
#include <osl/diagnose.h>
#include <o3tl/make_unique.hxx>
-ScfProgressBar::ScfProgressSegment::ScfProgressSegment( sal_Size nSize ) :
+ScfProgressBar::ScfProgressSegment::ScfProgressSegment( std::size_t nSize ) :
mnSize( nSize ),
mnPos( 0 )
{
@@ -105,15 +105,15 @@ void ScfProgressBar::SetCurrSegment( ScfProgressSegment* pSegment )
}
}
-void ScfProgressBar::IncreaseProgressBar( sal_Size nDelta )
+void ScfProgressBar::IncreaseProgressBar( std::size_t nDelta )
{
- sal_Size nNewPos = mnTotalPos + nDelta;
+ std::size_t nNewPos = mnTotalPos + nDelta;
// call back to parent progress bar
if( mpParentProgress && mpParentSegment )
{
// calculate new position of parent progress bar
- sal_Size nParentPos = static_cast< sal_Size >(
+ std::size_t nParentPos = static_cast< std::size_t >(
static_cast< double >( nNewPos ) * mpParentSegment->mnSize / mnTotalSize );
mpParentProgress->ProgressAbs( nParentPos );
}
@@ -134,7 +134,7 @@ void ScfProgressBar::IncreaseProgressBar( sal_Size nDelta )
mnTotalPos = nNewPos;
}
-sal_Int32 ScfProgressBar::AddSegment( sal_Size nSize )
+sal_Int32 ScfProgressBar::AddSegment( std::size_t nSize )
{
OSL_ENSURE( !mbInProgress, "ScfProgressBar::AddSegment - already in progress mode" );
if( nSize == 0 )
@@ -171,7 +171,7 @@ void ScfProgressBar::ActivateSegment( sal_Int32 nSegment )
SetCurrSegment( GetSegment( nSegment ) );
}
-void ScfProgressBar::ProgressAbs( sal_Size nPos )
+void ScfProgressBar::ProgressAbs( std::size_t nPos )
{
OSL_ENSURE( mbInProgress && mpCurrSegment, "ScfProgressBar::ProgressAbs - no segment started" );
if( mpCurrSegment )
@@ -186,24 +186,24 @@ void ScfProgressBar::ProgressAbs( sal_Size nPos )
}
}
-void ScfProgressBar::Progress( sal_Size nDelta )
+void ScfProgressBar::Progress( std::size_t nDelta )
{
ProgressAbs( mpCurrSegment ? (mpCurrSegment->mnPos + nDelta) : 0 );
}
-ScfSimpleProgressBar::ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, const OUString& rText ) :
+ScfSimpleProgressBar::ScfSimpleProgressBar( std::size_t nSize, SfxObjectShell* pDocShell, const OUString& rText ) :
maProgress( pDocShell, rText )
{
Init( nSize );
}
-ScfSimpleProgressBar::ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, sal_uInt16 nResId ) :
+ScfSimpleProgressBar::ScfSimpleProgressBar( std::size_t nSize, SfxObjectShell* pDocShell, sal_uInt16 nResId ) :
maProgress( pDocShell, nResId )
{
Init( nSize );
}
-void ScfSimpleProgressBar::Init( sal_Size nSize )
+void ScfSimpleProgressBar::Init( std::size_t nSize )
{
sal_Int32 nSegment = maProgress.AddSegment( nSize );
if( nSegment >= 0 )
@@ -223,9 +223,9 @@ void ScfStreamProgressBar::Progress()
void ScfStreamProgressBar::Init( SfxObjectShell* pDocShell, const OUString& rText )
{
- sal_Size nPos = mrStrm.Tell();
+ sal_uInt64 const nPos = mrStrm.Tell();
mrStrm.Seek( STREAM_SEEK_TO_END );
- sal_Size nSize = mrStrm.Tell();
+ sal_uInt64 const nSize = mrStrm.Tell();
mrStrm.Seek( nPos );
mxProgress.reset( new ScfSimpleProgressBar( nSize, pDocShell, rText ) );
diff --git a/sc/source/filter/inc/XclExpChangeTrack.hxx b/sc/source/filter/inc/XclExpChangeTrack.hxx
index 6da99a5969d9..eedb6fc64560 100644
--- a/sc/source/filter/inc/XclExpChangeTrack.hxx
+++ b/sc/source/filter/inc/XclExpChangeTrack.hxx
@@ -32,7 +32,7 @@
class ExcXmlRecord : public ExcRecord
{
public:
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
virtual sal_uInt16 GetNum() const override;
virtual void Save( XclExpStream& rStrm ) override;
};
@@ -53,7 +53,7 @@ public:
inline const sal_uInt8* GetGUID() const { return aGUID; }
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
// XclExpUserBViewList - list of UserBView records
@@ -90,7 +90,7 @@ private:
public:
XclExpUsersViewBegin( const sal_uInt8* pGUID, sal_uInt32 nTab );
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
// XclExpUsersViewEnd - end of view block (one per sheet)
@@ -102,7 +102,7 @@ private:
public:
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
// dummy record for "User Names" stream
@@ -114,7 +114,7 @@ private:
public:
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
// dummy record for "User Names" stream
@@ -126,7 +126,7 @@ private:
public:
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
// dummy record for "User Names" stream
@@ -138,7 +138,7 @@ private:
public:
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
// dummy record for "User Names" stream
@@ -150,7 +150,7 @@ private:
public:
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
// dummy record without content
@@ -165,7 +165,7 @@ public:
virtual ~XclExpChTrEmpty() override;
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
// dummy record for "Revision Log" stream
@@ -179,7 +179,7 @@ public:
virtual ~XclExpChTr0x0195() override;
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
// dummy record for "Revision Log" stream
@@ -197,7 +197,7 @@ public:
virtual ~XclExpChTr0x0194() override;
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
inline XclExpChTr0x0194::XclExpChTr0x0194( const ScChangeTrack& rChangeTrack ) :
@@ -224,7 +224,7 @@ public:
inline void SetCount( sal_uInt32 nNew ) { nCount = nNew; }
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
};
@@ -281,7 +281,7 @@ public:
virtual ~XclExpChTrInfo() override;
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
// XclExpChTrTabIdBuffer - buffer for tab id's
@@ -332,7 +332,7 @@ public:
void Copy( const XclExpChTrTabIdBuffer& rBuffer );
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
// XclExpChTrAction - base class for action records
@@ -368,12 +368,12 @@ protected:
// save header data, call SaveActionData()
virtual void SaveCont( XclExpStream& rStrm ) override;
- static inline sal_Size GetHeaderByteCount() { return 12; }
+ static inline std::size_t GetHeaderByteCount() { return 12; }
// override to save action data without header, called by SaveCont()
virtual void SaveActionData( XclExpStream& rStrm ) const = 0;
// override to get action size without header, called by GetLen()
- virtual sal_Size GetActionByteCount() const = 0;
+ virtual std::size_t GetActionByteCount() const = 0;
// do something before writing the record
virtual void PrepareSaveAction( XclExpStream& rStrm ) const;
@@ -400,7 +400,7 @@ public:
void SetIndex( sal_uInt32& rIndex );
virtual void Save( XclExpStream& rStrm ) override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
inline XclExpChTrAction* GetAddAction() { return pAddAction; }
inline sal_uInt32 GetActionNumber() const { return nIndex; }
@@ -442,7 +442,7 @@ struct XclExpChTrData
double fValue;
sal_Int32 nRKValue;
sal_uInt16 nType;
- sal_Size nSize;
+ std::size_t nSize;
XclExpChTrData();
~XclExpChTrData();
@@ -484,7 +484,7 @@ public:
virtual ~XclExpChTrCellContent() override;
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetActionByteCount() const override;
+ virtual std::size_t GetActionByteCount() const override;
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
};
@@ -513,7 +513,7 @@ public:
virtual ~XclExpChTrInsert() override;
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetActionByteCount() const override;
+ virtual std::size_t GetActionByteCount() const override;
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
};
@@ -536,7 +536,7 @@ public:
virtual ~XclExpChTrInsertTab() override;
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetActionByteCount() const override;
+ virtual std::size_t GetActionByteCount() const override;
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
};
@@ -562,7 +562,7 @@ public:
virtual ~XclExpChTrMoveRange() override;
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetActionByteCount() const override;
+ virtual std::size_t GetActionByteCount() const override;
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
};
@@ -579,7 +579,7 @@ public:
virtual ~XclExpChTr0x014A() override;
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetActionByteCount() const override;
+ virtual std::size_t GetActionByteCount() const override;
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
};
diff --git a/sc/source/filter/inc/excform.hxx b/sc/source/filter/inc/excform.hxx
index 05bed91bbef8..9a64b40afec0 100644
--- a/sc/source/filter/inc/excform.hxx
+++ b/sc/source/filter/inc/excform.hxx
@@ -47,15 +47,15 @@ protected:
public:
ExcelToSc( XclImpRoot& rRoot );
virtual ~ExcelToSc() override;
- virtual ConvErr Convert( const ScTokenArray*&, XclImpStream& rStrm, sal_Size nFormulaLen,
+ virtual ConvErr Convert( const ScTokenArray*&, XclImpStream& rStrm, std::size_t nFormulaLen,
bool bAllowArrays, const FORMULA_TYPE eFT = FT_CellFormula ) override;
- virtual ConvErr Convert( ScRangeListTabs&, XclImpStream& rStrm, sal_Size nFormulaLen, SCsTAB nTab, const FORMULA_TYPE eFT = FT_CellFormula ) override;
+ virtual ConvErr Convert( ScRangeListTabs&, XclImpStream& rStrm, std::size_t nFormulaLen, SCsTAB nTab, const FORMULA_TYPE eFT = FT_CellFormula ) override;
- virtual void ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, sal_Size nFormulaLen,
+ virtual void ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, std::size_t nFormulaLen,
const OUString& rUrl, const ::std::vector<OUString>& rTabNames );
- virtual void GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen );
+ virtual void GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, std::size_t nLen );
void GetDummy( const ScTokenArray*& );
const ScTokenArray* GetBoolErr( XclBoolError );
@@ -121,16 +121,16 @@ public:
ExcelToSc8( XclImpRoot& rRoot );
virtual ~ExcelToSc8() override;
- virtual ConvErr Convert( const ScTokenArray*& rpTokArray, XclImpStream& rStrm, sal_Size nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT = FT_CellFormula ) override;
+ virtual ConvErr Convert( const ScTokenArray*& rpTokArray, XclImpStream& rStrm, std::size_t nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT = FT_CellFormula ) override;
- virtual ConvErr Convert( ScRangeListTabs&, XclImpStream& rStrm, sal_Size nFormulaLen, SCsTAB nTab, const FORMULA_TYPE eFT = FT_CellFormula ) override;
+ virtual ConvErr Convert( ScRangeListTabs&, XclImpStream& rStrm, std::size_t nFormulaLen, SCsTAB nTab, const FORMULA_TYPE eFT = FT_CellFormula ) override;
- virtual void ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, sal_Size nFormulaLen,
+ virtual void ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, std::size_t nFormulaLen,
const OUString& rUrl, const ::std::vector<OUString>& rTabNames ) override;
static inline bool IsComplRowRange( const sal_uInt16 nRow1, const sal_uInt16 nRow2 );
- virtual void GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen ) override;
+ virtual void GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, std::size_t nLen ) override;
};
inline bool ExcelToSc8::IsComplRowRange( const sal_uInt16 nRow1, const sal_uInt16 nRow2 )
diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx
index 4223adcea0d5..514310075cac 100644
--- a/sc/source/filter/inc/excrecds.hxx
+++ b/sc/source/filter/inc/excrecds.hxx
@@ -53,7 +53,7 @@ public:
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
virtual sal_uInt16 GetNum() const = 0;
- virtual sal_Size GetLen() const = 0;
+ virtual std::size_t GetLen() const = 0;
protected:
virtual void SaveCont( XclExpStream& rStrm );
@@ -72,7 +72,7 @@ protected:
public:
virtual void Save( XclExpStream& rStrm ) override;
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
//--------------------------------------------------------- class ExcDummyRec -
@@ -100,7 +100,7 @@ protected:
inline ExcBoolRecord() : bVal( false ) {}
public:
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
//--------------------------------------------------------- class ExcBof_Base -
@@ -128,7 +128,7 @@ public:
ExcBof();
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
//------------------------------------------------------------- class ExcBofW -
@@ -142,7 +142,7 @@ public:
ExcBofW();
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
//-------------------------------------------------------------- class ExcEof -
@@ -152,7 +152,7 @@ class ExcEof : public ExcRecord
private:
public:
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
//--------------------------------------------------------- class ExcDummy_00 -
@@ -162,9 +162,9 @@ class ExcDummy_00 : public ExcDummyRec
{
private:
static const sal_uInt8 pMyData[];
- static const sal_Size nMyLen;
+ static const std::size_t nMyLen;
public:
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
virtual const sal_uInt8* GetData() const override;
};
@@ -212,9 +212,9 @@ class ExcDummy_040 : public ExcDummyRec
{
private:
static const sal_uInt8 pMyData[];
- static const sal_Size nMyLen;
+ static const std::size_t nMyLen;
public:
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
virtual const sal_uInt8* GetData() const override;
};
@@ -222,9 +222,9 @@ class ExcDummy_041 : public ExcDummyRec
{
private:
static const sal_uInt8 pMyData[];
- static const sal_Size nMyLen;
+ static const std::size_t nMyLen;
public:
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
virtual const sal_uInt8* GetData() const override;
};
@@ -271,7 +271,7 @@ private:
public:
ExcBundlesheet( RootData& rRootData, SCTAB nTab );
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
//--------------------------------------------------------- class ExcDummy_02 -
@@ -281,9 +281,9 @@ class ExcDummy_02a : public ExcDummyRec
{
private:
static const sal_uInt8 pMyData[];
- static const sal_Size nMyLen;
+ static const std::size_t nMyLen;
public:
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
virtual const sal_uInt8* GetData() const override;
};
@@ -359,7 +359,7 @@ public:
~ExcFilterCondition();
inline bool IsEmpty() const { return (nType == EXC_AFTYPE_NOTUSED); }
- sal_uLong GetTextBytes() const;
+ std::size_t GetTextBytes() const;
void SetCondition( sal_uInt8 nTp, sal_uInt8 nOp, double fV, OUString* pT );
diff --git a/sc/source/filter/inc/formel.hxx b/sc/source/filter/inc/formel.hxx
index 4a63dbdf0d45..494cd0a164ca 100644
--- a/sc/source/filter/inc/formel.hxx
+++ b/sc/source/filter/inc/formel.hxx
@@ -104,9 +104,9 @@ public:
void Reset();
void Reset( const ScAddress& rEingPos );
- virtual ConvErr Convert( const ScTokenArray*& rpErg, XclImpStream& rStrm, sal_Size nFormulaLen,
+ virtual ConvErr Convert( const ScTokenArray*& rpErg, XclImpStream& rStrm, std::size_t nFormulaLen,
bool bAllowArrays, const FORMULA_TYPE eFT = FT_CellFormula ) = 0;
- virtual ConvErr Convert( ScRangeListTabs&, XclImpStream& rStrm, sal_Size nFormulaLen, SCsTAB nTab,
+ virtual ConvErr Convert( ScRangeListTabs&, XclImpStream& rStrm, std::size_t nFormulaLen, SCsTAB nTab,
const FORMULA_TYPE eFT = FT_CellFormula ) = 0;
};
diff --git a/sc/source/filter/inc/fprogressbar.hxx b/sc/source/filter/inc/fprogressbar.hxx
index 8df4e74ac492..dc2fd81a6a3d 100644
--- a/sc/source/filter/inc/fprogressbar.hxx
+++ b/sc/source/filter/inc/fprogressbar.hxx
@@ -112,7 +112,7 @@ public:
/** Adds a new segment to the progress bar.
@return the identifier of the segment. */
- sal_Int32 AddSegment( sal_Size nSize );
+ sal_Int32 AddSegment( std::size_t nSize );
/** Returns a complete progress bar for the specified segment.
@descr The progress bar can be used to create sub segments inside of the
segment. Do not delete it (done by root progress bar)!
@@ -127,9 +127,9 @@ public:
/** Starts the progress bar (with first segment). */
inline void Activate() { ActivateSegment( 0 ); }
/** Set current segment to the specified absolute position. */
- void ProgressAbs( sal_Size nPos );
+ void ProgressAbs( std::size_t nPos );
/** Increase current segment by the passed value. */
- void Progress( sal_Size nDelta = 1 );
+ void Progress( std::size_t nDelta = 1 );
private:
struct ScfProgressSegment;
@@ -147,7 +147,7 @@ private:
/** Activates progress bar and sets current segment. */
void SetCurrSegment( ScfProgressSegment* pSegment );
/** Increases mnTotalPos and calls the system progress bar. */
- void IncreaseProgressBar( sal_Size nDelta );
+ void IncreaseProgressBar( std::size_t nDelta );
private:
/** Contains all data of a segment of the progress bar. */
@@ -156,10 +156,10 @@ private:
typedef ::std::unique_ptr< ScfProgressBar > ScfProgressBarPtr;
ScfProgressBarPtr mxProgress; /// Pointer to sub progress bar for this segment.
- sal_Size mnSize; /// Size of this segment.
- sal_Size mnPos; /// Current position of this segment.
+ std::size_t mnSize; /// Size of this segment.
+ std::size_t mnPos; /// Current position of this segment.
- explicit ScfProgressSegment( sal_Size nSize );
+ explicit ScfProgressSegment( std::size_t nSize );
~ScfProgressSegment();
};
@@ -175,11 +175,11 @@ private:
ScfProgressSegment* mpParentSegment; /// Parent segment, if this is a segment progress bar.
ScfProgressSegment* mpCurrSegment; /// Current segment for progress.
- sal_Size mnTotalSize; /// Total size of all segments.
- sal_Size mnTotalPos; /// Sum of positions of all segments.
- sal_Size mnUnitSize; /// Size between two calls of system progress.
- sal_Size mnNextUnitPos; /// Limit for next system progress call.
- sal_Size mnSysProgressScale; /// Additionally scaling factor for system progress.
+ std::size_t mnTotalSize; /// Total size of all segments.
+ std::size_t mnTotalPos; /// Sum of positions of all segments.
+ std::size_t mnUnitSize; /// Size between two calls of system progress.
+ std::size_t mnNextUnitPos; /// Limit for next system progress call.
+ std::size_t mnSysProgressScale; /// Additionally scaling factor for system progress.
bool mbInProgress; /// true = progress bar started.
};
@@ -187,15 +187,15 @@ private:
class ScfSimpleProgressBar
{
public:
- explicit ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, const OUString& rText );
- explicit ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, sal_uInt16 nResId );
+ explicit ScfSimpleProgressBar( std::size_t nSize, SfxObjectShell* pDocShell, const OUString& rText );
+ explicit ScfSimpleProgressBar( std::size_t nSize, SfxObjectShell* pDocShell, sal_uInt16 nResId );
/** Set progress bar to the specified position. */
- inline void ProgressAbs( sal_Size nPos ) { maProgress.ProgressAbs( nPos ); }
+ inline void ProgressAbs( std::size_t nPos ) { maProgress.ProgressAbs( nPos ); }
private:
/** Initializes and starts the progress bar. */
- void Init( sal_Size nSize );
+ void Init( std::size_t nSize );
private:
ScfProgressBar maProgress; /// The used progress bar.
diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx
index 51f9fcd572d4..0c8dc964af2e 100644
--- a/sc/source/filter/inc/xcl97rec.hxx
+++ b/sc/source/filter/inc/xcl97rec.hxx
@@ -209,7 +209,7 @@ public:
virtual void Save( XclExpStream& rStrm ) override;
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
private:
virtual void SaveCont( XclExpStream& rStrm ) override;
@@ -279,7 +279,7 @@ public:
ExcBof8_Base();
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
// --- class ExcBofW8 ------------------------------------------------
@@ -314,7 +314,7 @@ public:
ExcBundlesheet8( RootData& rRootData, SCTAB nTab );
ExcBundlesheet8( const OUString& rString );
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
};
@@ -325,7 +325,7 @@ class XclObproj : public ExcRecord
{
public:
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
// ---- class XclCodename --------------------------------------------
@@ -339,7 +339,7 @@ public:
XclCodename( const OUString& );
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
// ---- Scenarios ----------------------------------------------------
@@ -358,7 +358,7 @@ protected:
public:
ExcEScenarioCell( sal_uInt16 nC, sal_uInt16 nR, const OUString& rTxt );
- inline sal_Size GetStringBytes() const
+ inline std::size_t GetStringBytes() const
{ return sText.GetSize(); }
void WriteAddress( XclExpStream& rStrm ) const ;
@@ -370,7 +370,7 @@ public:
class ExcEScenario : public ExcRecord
{
private:
- sal_Size nRecLen;
+ std::size_t nRecLen;
XclExpString sName;
XclExpString sComment;
XclExpString sUserName;
@@ -388,7 +388,7 @@ public:
virtual ~ExcEScenario() override;
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
};
@@ -410,7 +410,7 @@ public:
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
};
/** Represents a FEATHDR (SHEETPROTECTION) record that stores sheet protection
@@ -453,7 +453,7 @@ public:
XclCalccount( const ScDocument& );
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
};
@@ -468,7 +468,7 @@ public:
XclIteration( const ScDocument& );
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
};
@@ -483,7 +483,7 @@ public:
XclDelta( const ScDocument& );
virtual sal_uInt16 GetNum() const override;
- virtual sal_Size GetLen() const override;
+ virtual std::size_t GetLen() const override;
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
};
diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx
index 7fc0d18c1502..365256cb00c9 100644
--- a/sc/source/filter/inc/xechart.hxx
+++ b/sc/source/filter/inc/xechart.hxx
@@ -164,7 +164,7 @@ class XclExpChGroupBase : public XclExpRecord, protected XclExpChRoot
public:
explicit XclExpChGroupBase(
const XclExpChRoot& rRoot, sal_uInt16 nFrType,
- sal_uInt16 nRecId, sal_Size nRecSize = 0 );
+ sal_uInt16 nRecId, std::size_t nRecSize = 0 );
virtual ~XclExpChGroupBase() override;
/** Saves the header record. Calls WriteSubRecords() to let derived classes write sub records. */
@@ -190,7 +190,7 @@ class XclExpChFutureRecordBase : public XclExpFutureRecord, protected XclExpChRo
{
public:
explicit XclExpChFutureRecordBase( const XclExpChRoot& rRoot,
- XclFutureRecType eRecType, sal_uInt16 nRecId, sal_Size nRecSize = 0 );
+ XclFutureRecType eRecType, sal_uInt16 nRecId, std::size_t nRecSize = 0 );
/** Writes missing CHFRBLOCKBEGIN records and this record. */
virtual void Save( XclExpStream& rStrm ) override;
diff --git a/sc/source/filter/inc/xehelper.hxx b/sc/source/filter/inc/xehelper.hxx
index 81f89463c40e..477adc9218c0 100644
--- a/sc/source/filter/inc/xehelper.hxx
+++ b/sc/source/filter/inc/xehelper.hxx
@@ -69,7 +69,7 @@ private:
ScfProgressBar* mpSubRowFinal; /// Sub progress bar for finalizing ROW records.
sal_Int32 mnSegRowFinal; /// Progress segment for finalizing ROW records.
- sal_Size mnRowCount; /// Number of created ROW records.
+ std::size_t mnRowCount; /// Number of created ROW records.
};
// Calc->Excel cell address/range conversion ==================================
@@ -426,7 +426,7 @@ public:
~XclExpCachedMatrix();
/** Returns the byte count of all contained data. */
- sal_Size GetSize() const;
+ std::size_t GetSize() const;
/** Writes the complete matrix to stream. */
void Save( XclExpStream& rStrm ) const;
diff --git a/sc/source/filter/inc/xepivot.hxx b/sc/source/filter/inc/xepivot.hxx
index dd94d57ccd95..c8c1fbbf02dc 100644
--- a/sc/source/filter/inc/xepivot.hxx
+++ b/sc/source/filter/inc/xepivot.hxx
@@ -89,7 +89,7 @@ public:
sal_uInt16 GetItemIndex( const OUString& rItemName ) const;
/** Returns the size an item index needs to write out. */
- sal_Size GetIndexSize() const;
+ std::size_t GetIndexSize() const;
/** Writes the item index at the passed source row position as part of the SXINDEXLIST record. */
void WriteIndex( XclExpStream& rStrm, sal_uInt32 nSrcRow ) const;
diff --git a/sc/source/filter/inc/xerecord.hxx b/sc/source/filter/inc/xerecord.hxx
index 8cf66e174dd7..69b7bbf4c171 100644
--- a/sc/source/filter/inc/xerecord.hxx
+++ b/sc/source/filter/inc/xerecord.hxx
@@ -120,23 +120,23 @@ public:
@param nRecSize The predicted record size. May be set later with SetRecSize(). */
explicit XclExpRecord(
sal_uInt16 nRecId = EXC_ID_UNKNOWN,
- sal_Size nRecSize = 0 );
+ std::size_t nRecSize = 0 );
virtual ~XclExpRecord() override;
/** Returns the current record ID. */
inline sal_uInt16 GetRecId() const { return mnRecId; }
/** Returns the current record size prediction. */
- inline sal_Size GetRecSize() const { return mnRecSize; }
+ inline std::size_t GetRecSize() const { return mnRecSize; }
/** Sets a new record ID. */
inline void SetRecId( sal_uInt16 nRecId ) { mnRecId = nRecId; }
/** Sets a new record size prediction. */
- inline void SetRecSize( sal_Size nRecSize ) { mnRecSize = nRecSize; }
+ inline void SetRecSize( std::size_t nRecSize ) { mnRecSize = nRecSize; }
/** Adds a size value to the record size prediction. */
- inline void AddRecSize( sal_Size nRecSize ) { mnRecSize += nRecSize; }
+ inline void AddRecSize( std::size_t nRecSize ) { mnRecSize += nRecSize; }
/** Sets record ID and size with one call. */
- void SetRecHeader( sal_uInt16 nRecId, sal_Size nRecSize );
+ void SetRecHeader( sal_uInt16 nRecId, std::size_t nRecSize );
/** Writes the record header and calls WriteBody(). */
virtual void Save( XclExpStream& rStrm ) override;
@@ -147,7 +147,7 @@ protected:
virtual void WriteBody( XclExpStream& rStrm );
private:
- sal_Size mnRecSize; /// The predicted record size.
+ std::size_t mnRecSize; /// The predicted record size.
sal_uInt16 mnRecId; /// The record ID.
};
@@ -173,7 +173,7 @@ public:
/** @param nRecId The record ID of this record.
@param rValue The value for the record body.
@param nSize Record size. Uses sizeof( Type ), if this parameter is omitted. */
- inline explicit XclExpValueRecord( sal_uInt16 nRecId, const Type& rValue, sal_Size nSize = sizeof( Type ) ) :
+ inline explicit XclExpValueRecord( sal_uInt16 nRecId, const Type& rValue, std::size_t nSize = sizeof( Type ) ) :
XclExpRecord( nRecId, nSize ), maValue( rValue ), mnAttribute( -1 ) {}
/** Returns the value of the record. */
@@ -255,10 +255,10 @@ public:
@param pRecData Pointer to the data array representing the record body.
@param nRecSize Size of the data array. */
explicit XclExpDummyRecord(
- sal_uInt16 nRecId, const void* pRecData, sal_Size nRecSize );
+ sal_uInt16 nRecId, const void* pRecData, std::size_t nRecSize );
/** Sets a data array. */
- void SetData( const void* pRecData, sal_Size nRecSize );
+ void SetData( const void* pRecData, std::size_t nRecSize );
private:
/** Writes the body of the record. */
@@ -274,7 +274,7 @@ class XclExpFutureRecord : public XclExpRecord
{
public:
explicit XclExpFutureRecord( XclFutureRecType eRecType,
- sal_uInt16 nRecId, sal_Size nRecSize = 0 );
+ sal_uInt16 nRecId, std::size_t nRecSize = 0 );
/** Writes the extended record header and calls WriteBody(). */
virtual void Save( XclExpStream& rStrm ) override;
diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx
index 25193d8cab2f..81c3f43c2f3a 100644
--- a/sc/source/filter/inc/xestream.hxx
+++ b/sc/source/filter/inc/xestream.hxx
@@ -87,7 +87,7 @@ public:
inline const XclExpRoot& GetRoot() const { return mrRoot; }
/** Starts a new record: writes header data, stores calculated record size. */
- void StartRecord( sal_uInt16 nRecId, sal_Size nRecSize );
+ void StartRecord( sal_uInt16 nRecId, std::size_t nRecSize );
/** Checks and corrects real record length. Must be called every time a record is finished. */
void EndRecord();
@@ -107,11 +107,11 @@ public:
XclExpStream& operator<<( double fValue );
/** Writes nBytes bytes from memory. */
- sal_Size Write( const void* pData, sal_Size nBytes );
+ std::size_t Write( const void* pData, std::size_t nBytes );
/** Writes a sequence of nBytes zero bytes (respects slice setting). */
- void WriteZeroBytes( sal_Size nBytes );
+ void WriteZeroBytes( std::size_t nBytes );
- void WriteZeroBytesToRecord( sal_Size nBytes );
+ void WriteZeroBytesToRecord( std::size_t nBytes );
/** Copies nBytes bytes from current position of the stream rInStrm.
@descr Omitting the second parameter means: read to end of stream. */
@@ -153,7 +153,7 @@ private:
/** Rewrites correct record length, if different from calculated. */
void UpdateRecSize();
/** Recalculates mnCurrSize and mnSliceSize. */
- void UpdateSizeVars( sal_Size nSize );
+ void UpdateSizeVars( std::size_t nSize );
/** Writes CONTINUE header, internal setup. */
void StartContinue();
/** Refreshes counter vars, creates CONTINUE records. */
@@ -163,7 +163,7 @@ private:
sal_uInt16 PrepareWrite();
/** Writes a raw sequence of zero bytes. */
- void WriteRawZeroBytes( sal_Size nBytes );
+ void WriteRawZeroBytes( std::size_t nBytes );
private:
SvStream& mrStrm; /// Reference to the system output stream.
@@ -180,10 +180,10 @@ private:
sal_uInt16 mnHeaderSize; /// Record size written in last record header.
sal_uInt16 mnCurrSize; /// Count of bytes already written in current record.
sal_uInt16 mnSliceSize; /// Count of bytes already written in current slice.
- sal_Size mnPredictSize; /// Predicted size received from calling function.
+ std::size_t mnPredictSize; /// Predicted size received from calling function.
// stream position data
- sal_Size mnLastSizePos; /// Stream position of size field in current header.
+ std::size_t mnLastSizePos; /// Stream position of size field in current header.
bool mbInRec; /// true = currently writing inside of a record.
};
@@ -215,8 +215,8 @@ public:
private:
void Init( const css::uno::Sequence< css::beans::NamedValue >& aEncryptionData );
- static sal_uInt32 GetBlockPos( sal_Size nStrmPos );
- static sal_uInt16 GetOffsetInBlock( sal_Size nStrmPos );
+ static sal_uInt32 GetBlockPos( std::size_t nStrmPos );
+ static sal_uInt16 GetOffsetInBlock( std::size_t nStrmPos );
private:
::msfilter::MSCodec_Std97 maCodec; /// Crypto algorithm implementation.
diff --git a/sc/source/filter/inc/xestring.hxx b/sc/source/filter/inc/xestring.hxx
index 60956b6014c3..570a3f0e25a7 100644
--- a/sc/source/filter/inc/xestring.hxx
+++ b/sc/source/filter/inc/xestring.hxx
@@ -133,9 +133,9 @@ public:
/** Returns the byte count the header will take on export. */
sal_uInt16 GetHeaderSize() const;
/** Returns the byte count the character buffer will take on export. */
- sal_Size GetBufferSize() const;
+ std::size_t GetBufferSize() const;
/** Returns the byte count the whole string will take on export. */
- sal_Size GetSize() const;
+ std::size_t GetSize() const;
/** Returns the specified character from the (already encoded) string. */
sal_uInt16 GetChar( sal_uInt16 nCharIdx ) const;
diff --git a/sc/source/filter/inc/xetable.hxx b/sc/source/filter/inc/xetable.hxx
index 5137de6eca27..4eaea1511b78 100644
--- a/sc/source/filter/inc/xetable.hxx
+++ b/sc/source/filter/inc/xetable.hxx
@@ -305,7 +305,7 @@ public:
protected:
explicit XclExpCellBase(
- sal_uInt16 nRecId, sal_Size nContSize, const XclAddress& rXclPos );
+ sal_uInt16 nRecId, std::size_t nContSize, const XclAddress& rXclPos );
/** Sets this record to a new column position. */
inline void SetXclCol( sal_uInt16 nXclCol ) { maXclPos.mnCol = nXclCol; }
@@ -334,15 +334,15 @@ public:
virtual void Save( XclExpStream& rStrm ) override;
protected:
- explicit XclExpSingleCellBase( sal_uInt16 nRecId, sal_Size nContSize,
+ explicit XclExpSingleCellBase( sal_uInt16 nRecId, std::size_t nContSize,
const XclAddress& rXclPos, sal_uInt32 nXFId );
explicit XclExpSingleCellBase( const XclExpRoot& rRoot,
- sal_uInt16 nRecId, sal_Size nContSize, const XclAddress& rXclPos,
+ sal_uInt16 nRecId, std::size_t nContSize, const XclAddress& rXclPos,
const ScPatternAttr* pPattern, sal_Int16 nScript, sal_uInt32 nForcedXFId );
- inline void SetContSize( sal_Size nContSize ) { mnContSize = nContSize; }
- inline sal_Size GetContSize() const { return mnContSize; }
+ inline void SetContSize( std::size_t nContSize ) { mnContSize = nContSize; }
+ inline std::size_t GetContSize() const { return mnContSize; }
inline void SetXFId( sal_uInt32 nXFId ) { maXFId.mnXFId = nXFId; }
inline sal_uInt32 GetXFId() const { return maXFId.mnXFId; }
@@ -355,7 +355,7 @@ private:
private:
XclExpXFId maXFId; /// The XF identifier of the cell formatting.
- sal_Size mnContSize; /// The size of the cell contents.
+ std::size_t mnContSize; /// The size of the cell contents.
};
/** Represents a NUMBER record that describes a cell with a double value. */
@@ -494,7 +494,7 @@ public:
protected:
explicit XclExpMultiCellBase( sal_uInt16 nRecId, sal_uInt16 nMulRecId,
- sal_Size nContSize, const XclAddress& rXclPos );
+ std::size_t nContSize, const XclAddress& rXclPos );
/** Returns the number of cells this record represents. */
sal_uInt16 GetCellCount() const;
@@ -525,7 +525,7 @@ private:
typedef ::std::vector< XclExpMultiXFId > XclExpMultiXFIdDeq;
sal_uInt16 mnMulRecId; /// Record ID for multiple record variant.
- sal_Size mnContSize; /// Data size of contents for one cell
+ std::size_t mnContSize; /// Data size of contents for one cell
XclExpMultiXFIdDeq maXFIds; /// The XF identifiers of the cell formatting.
};
diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx
index 6d26ed2bdb46..d97c722d387a 100644
--- a/sc/source/filter/inc/xichart.hxx
+++ b/sc/source/filter/inc/xichart.hxx
@@ -1301,7 +1301,7 @@ public:
/** Returns true, if the plot area has benn moved and/or resized manually. */
bool IsManualPlotArea() const;
/** Returns the number of units on the progress bar needed for the chart. */
- static inline sal_Size GetProgressSize() { return 2 * EXC_CHART_PROGRESS_SIZE; }
+ static inline std::size_t GetProgressSize() { return 2 * EXC_CHART_PROGRESS_SIZE; }
/** Converts and writes all properties to the passed chart. */
void Convert(
@@ -1391,7 +1391,7 @@ public:
void UpdateObjFrame( const XclObjLineData& rLineData, const XclObjFillData& rFillData );
/** Returns the number of units on the progress bar needed for the chart. */
- sal_Size GetProgressSize() const;
+ std::size_t GetProgressSize() const;
/** Returns true, if the chart is based on a pivot table. */
inline bool IsPivotChart() const { return mbIsPivotChart; }
diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx
index f69770332cfe..6c0552d31677 100644
--- a/sc/source/filter/inc/xiescher.hxx
+++ b/sc/source/filter/inc/xiescher.hxx
@@ -125,7 +125,7 @@ public:
inline bool IsInsertSdrObj() const { return mbInsertSdr; }
/** Returns the needed size on the progress bar (calls virtual DoGetProgressSize() function). */
- sal_Size GetProgressSize() const;
+ std::size_t GetProgressSize() const;
/** Creates and returns an SdrObject from the contained data. Caller takes ownership! */
SdrObjectPtr CreateSdrObject( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect, bool bIsDff ) const;
/** Additional processing for the passed SdrObject before insertion into
@@ -170,7 +170,7 @@ protected:
virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize );
/** Derived classes may return a progress bar size different from 1. */
- virtual sal_Size DoGetProgressSize() const;
+ virtual std::size_t DoGetProgressSize() const;
/** Derived classes create and return a new SdrObject from the contained data. Caller takes ownership! */
virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const;
/** Derived classes may perform additional processing for the passed SdrObject before insertion. */
@@ -225,7 +225,7 @@ public:
void InsertGrouped( XclImpDrawObjRef const & xDrawObj );
/** Returns the needed size on the progress bar for all contained objects. */
- sal_Size GetProgressSize() const;
+ std::size_t GetProgressSize() const;
};
/** A placeholder object for unknown object types. */
@@ -252,7 +252,7 @@ protected:
/** Reads the contents of the a BIFF5 OBJ record from the passed stream. */
virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
/** Returns a progress bar size that takes all group children into account. */
- virtual sal_Size DoGetProgressSize() const override;
+ virtual std::size_t DoGetProgressSize() const override;
/** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */
virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override;
@@ -424,7 +424,7 @@ protected:
/** Reads the contents of the specified subrecord of a BIFF8 OBJ record from stream. */
virtual void DoReadObj8SubRec( XclImpStream& rStrm, sal_uInt16 nSubRecId, sal_uInt16 nSubRecSize ) override;
/** Returns the needed size on the progress bar. */
- virtual sal_Size DoGetProgressSize() const override;
+ virtual std::size_t DoGetProgressSize() const override;
/** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */
virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const Rectangle& rAnchorRect ) const override;
/** Converts the chart document. */
@@ -761,7 +761,7 @@ public:
protected:
/** Reads listbox settings and selection. */
- void ReadFullLbsData( XclImpStream& rStrm, sal_Size nRecLeft );
+ void ReadFullLbsData( XclImpStream& rStrm, std::size_t nRecLeft );
/** Reads the contents of the a BIFF5 OBJ record from the passed stream. */
virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
@@ -833,9 +833,9 @@ public:
/** Returns true, if this object is an OCX form control. */
inline bool IsOcxControl() const { return mbEmbedded && mbControl && mbUseCtlsStrm; }
/** Returns the position in the 'Ctls' stream for additional form control data. */
- inline sal_Size GetCtlsStreamPos() const { return mnCtlsStrmPos; }
+ inline std::size_t GetCtlsStreamPos() const { return mnCtlsStrmPos; }
/** Returns the size in the 'Ctls' stream for additional form control data. */
- inline sal_Size GetCtlsStreamSize() const { return mnCtlsStrmSize; }
+ inline std::size_t GetCtlsStreamSize() const { return mnCtlsStrmSize; }
protected:
/** Reads the contents of the a BIFF3 OBJ record from the passed stream. */
@@ -864,8 +864,8 @@ private:
Rectangle maVisArea; /// Size of graphic.
OUString maClassName; /// Class name of embedded OLE object.
sal_uInt32 mnStorageId; /// Identifier of the storage for this object.
- sal_Size mnCtlsStrmPos; /// Position in 'Ctls' stream for this control.
- sal_Size mnCtlsStrmSize; /// Size in 'Ctls' stream for this control.
+ std::size_t mnCtlsStrmPos; /// Position in 'Ctls' stream for this control.
+ std::size_t mnCtlsStrmSize; /// Size in 'Ctls' stream for this control.
bool mbEmbedded; /// true = Embedded OLE object.
bool mbLinked; /// true = Linked OLE object.
bool mbSymbol; /// true = Show as symbol.
@@ -939,9 +939,9 @@ public:
virtual ~XclImpDffConverter() override;
/** Initializes the internal progress bar with the passed size and starts it. */
- void StartProgressBar( sal_Size nProgressSize );
+ void StartProgressBar( std::size_t nProgressSize );
/** Increase the progress bar by the passed value. */
- void Progress( sal_Size nDelta = 1 );
+ void Progress( std::size_t nDelta = 1 );
/** Initially called before the objects of the passed drawing manager are converted. */
void InitializeDrawing( XclImpDrawing& rDrawing, SdrModel& rSdrModel, SdrPage& rSdrPage );
@@ -1079,7 +1079,7 @@ public:
/** Sets the object with the passed identification to be skipped on import. */
void SetSkipObj( sal_uInt16 nObjId );
/** Returns the size of the progress bar shown while processing all objects. */
- sal_Size GetProgressSize() const;
+ std::size_t GetProgressSize() const;
/** Derived classes calculate the resulting rectangle of the passed anchor. */
virtual Rectangle CalcAnchorRect( const XclObjAnchor& rAnchor, bool bDffAnchor ) const = 0;
@@ -1106,10 +1106,10 @@ private:
void ReadTxo( XclImpStream& rStrm );
private:
- typedef std::map< sal_Size, XclImpDrawObjRef > XclImpObjMap;
+ typedef std::map< std::size_t, XclImpDrawObjRef > XclImpObjMap;
typedef std::map< sal_uInt16, XclImpDrawObjRef > XclImpObjMapById;
typedef std::shared_ptr< XclImpObjTextData > XclImpObjTextRef;
- typedef std::map< sal_Size, XclImpObjTextRef > XclImpObjTextMap;
+ typedef std::map< std::size_t, XclImpObjTextRef > XclImpObjTextMap;
XclImpDrawObjVector maRawObjs; /// BIFF5 objects without DFF data.
SvMemoryStream maDffStrm; /// Copy of the DFF page stream in memory.
diff --git a/sc/source/filter/inc/xiname.hxx b/sc/source/filter/inc/xiname.hxx
index 969fdae70520..a7e686c5556d 100644
--- a/sc/source/filter/inc/xiname.hxx
+++ b/sc/source/filter/inc/xiname.hxx
@@ -39,8 +39,8 @@ class XclImpName : protected XclImpRoot
{
XclImpStream& mrStrm;
XclImpStreamPos maStrmPos;
- sal_Size mnStrmPos;
- sal_Size mnStrmSize;
+ std::size_t mnStrmPos;
+ std::size_t mnStrmSize;
TokenStrmData( XclImpStream& rStrm );
};
diff --git a/sc/source/filter/inc/xistream.hxx b/sc/source/filter/inc/xistream.hxx
index c0bc09bf36b4..4e0e63bd84e5 100644
--- a/sc/source/filter/inc/xistream.hxx
+++ b/sc/source/filter/inc/xistream.hxx
@@ -78,7 +78,7 @@ private:
virtual bool OnVerifyEncryptionData( const css::uno::Sequence< css::beans::NamedValue >& rEncryptionData ) = 0;
/** Implementation of updating the decrypter. */
- virtual void OnUpdate( sal_Size nOldStrmPos, sal_Size nNewStrmPos, sal_uInt16 nRecSize ) = 0;
+ virtual void OnUpdate( std::size_t nOldStrmPos, std::size_t nNewStrmPos, sal_uInt16 nRecSize ) = 0;
/** Implementation of the decryption. */
virtual sal_uInt16 OnRead( SvStream& rStrm, sal_uInt8* pnData, sal_uInt16 nBytes ) = 0;
@@ -105,7 +105,7 @@ private:
OnVerifyPassword( const OUString& rPassword ) override;
virtual bool OnVerifyEncryptionData( const css::uno::Sequence< css::beans::NamedValue >& rEncryptionData ) override;
/** Implementation of updating the decrypter. */
- virtual void OnUpdate( sal_Size nOldStrmPos, sal_Size nNewStrmPos, sal_uInt16 nRecSize ) override;
+ virtual void OnUpdate( std::size_t nOldStrmPos, std::size_t nNewStrmPos, sal_uInt16 nRecSize ) override;
/** Implementation of the decryption. */
virtual sal_uInt16 OnRead( SvStream& rStrm, sal_uInt8* pnData, sal_uInt16 nBytes ) override;
@@ -134,14 +134,14 @@ private:
OnVerifyPassword( const OUString& rPassword ) override;
virtual bool OnVerifyEncryptionData( const css::uno::Sequence< css::beans::NamedValue >& rEncryptionData ) override;
/** Implementation of updating the decrypter. */
- virtual void OnUpdate( sal_Size nOldStrmPos, sal_Size nNewStrmPos, sal_uInt16 nRecSize ) override;
+ virtual void OnUpdate( std::size_t nOldStrmPos, std::size_t nNewStrmPos, sal_uInt16 nRecSize ) override;
/** Implementation of the decryption. */
virtual sal_uInt16 OnRead( SvStream& rStrm, sal_uInt8* pnData, sal_uInt16 nBytes ) override;
/** Returns the block number corresponding to the passed stream position. */
- static sal_uInt32 GetBlock( sal_Size nStrmPos );
+ static sal_uInt32 GetBlock( std::size_t nStrmPos );
/** Returns the block offset corresponding to the passed stream position. */
- static sal_uInt16 GetOffset( sal_Size nStrmPos );
+ static sal_uInt16 GetOffset( std::size_t nStrmPos );
private:
::msfilter::MSCodec_Std97 maCodec; /// Crypto algorithm implementation.
@@ -163,22 +163,22 @@ public:
explicit XclImpStreamPos();
/** Sets the stream position data to the passed values. */
- void Set( const SvStream& rStrm, sal_Size nNextPos, sal_Size nCurrSize,
+ void Set( const SvStream& rStrm, std::size_t nNextPos, std::size_t nCurrSize,
sal_uInt16 nRawRecId, sal_uInt16 nRawRecSize, sal_uInt16 nRawRecLeft,
bool bValid );
/** Writes the contained stream position data to the given variables. */
- void Get( SvStream& rStrm, sal_Size& rnNextPos, sal_Size& rnCurrSize,
+ void Get( SvStream& rStrm, std::size_t& rnNextPos, std::size_t& rnCurrSize,
sal_uInt16& rnRawRecId, sal_uInt16& rnRawRecSize, sal_uInt16& rnRawRecLeft,
bool& rbValid ) const;
/** Returns the stored stream position. */
- inline sal_Size GetPos() const { return mnPos; }
+ inline std::size_t GetPos() const { return mnPos; }
private:
- sal_Size mnPos; /// Absolute position of the stream.
- sal_Size mnNextPos; /// Absolute position of next record.
- sal_Size mnCurrSize; /// Current calculated size of the record.
+ std::size_t mnPos; /// Absolute position of the stream.
+ std::size_t mnNextPos; /// Absolute position of next record.
+ std::size_t mnCurrSize; /// Current calculated size of the record.
sal_uInt16 mnRawRecId; /// Current raw record ID (including CONTINUEs).
sal_uInt16 mnRawRecSize; /// Current raw record size (without following CONTINUEs).
sal_uInt16 mnRawRecLeft; /// Bytes left in current raw record (without following CONTINUEs).
@@ -258,7 +258,7 @@ public:
/** Sets stream pointer to the start of the record content for the record
at the passed absolute stream position.
@return false = no record found (end of stream). */
- bool StartNextRecord( sal_Size nNextRecPos );
+ bool StartNextRecord( std::size_t nNextRecPos );
/** Sets stream pointer to begin of record content.
@param bContLookup Automatic CONTINUE lookup on/off. In difference
to other stream settings, this setting is persistent until next call of
@@ -312,15 +312,15 @@ public:
/** Returns the current record ID. */
inline sal_uInt16 GetRecId() const { return mnRecId; }
/** Returns the position inside of the whole record content. */
- sal_Size GetRecPos() const;
+ std::size_t GetRecPos() const;
/** Returns the data size of the whole record without record headers. */
- sal_Size GetRecSize();
+ std::size_t GetRecSize();
/** Returns remaining data size of the whole record without record headers. */
- sal_Size GetRecLeft();
+ std::size_t GetRecLeft();
/** Returns the record ID of the following record. */
sal_uInt16 GetNextRecId();
- sal_uInt16 PeekRecId( sal_Size nPos );
+ sal_uInt16 PeekRecId( std::size_t nPos );
SAL_WARN_UNUSED_RESULT
sal_uInt8 ReaduInt8();
@@ -337,19 +337,19 @@ public:
/** Reads nBytes bytes to the existing(!) buffer pData.
@return Count of bytes really read. */
- sal_Size Read( void* pData, sal_Size nBytes );
+ std::size_t Read( void* pData, std::size_t nBytes );
/** Copies nBytes bytes to rOutStrm.
@return Count of bytes really written. */
- sal_Size CopyToStream( SvStream& rOutStrm, sal_Size nBytes );
+ std::size_t CopyToStream( SvStream& rOutStrm, std::size_t nBytes );
/** Copies the entire record to rOutStrm. The current record position keeps unchanged. */
void CopyRecordToStream( SvStream& rOutStrm );
/** Seeks absolute in record content to the specified position.
@descr The value 0 means start of record, independent from physical stream position. */
- void Seek( sal_Size nPos );
+ void Seek( std::size_t nPos );
/** Seeks forward inside the current record. */
- void Ignore( sal_Size nBytes );
+ void Ignore( std::size_t nBytes );
// *** special string functions *** ---------------------------------------
@@ -373,12 +373,12 @@ public:
/** Reads ext. header, detects 8/16 bit mode, sets all ext. info.
@return Total size of ext. data. */
- sal_Size ReadUniStringExtHeader(
+ std::size_t ReadUniStringExtHeader(
bool& rb16Bit, bool& rbRich, bool& rbFareast,
sal_uInt16& rnFormatRuns, sal_uInt32& rnExtInf, sal_uInt8 nFlags );
/** Seeks to begin of character array, detects 8/16 bit mode.
@return Total size of ext. data. */
- sal_Size ReadUniStringExtHeader( bool& rb16Bit, sal_uInt8 nFlags );
+ std::size_t ReadUniStringExtHeader( bool& rb16Bit, sal_uInt8 nFlags );
/** Sets a replacement character for NUL characters.
@descr NUL characters must be replaced, because Tools strings cannot
@@ -416,9 +416,9 @@ public:
// *** SvStream functions *** ---------------------------------------------
/** Returns the absolute stream position. */
- inline sal_Size GetSvStreamPos() const { return mrStrm.Tell(); }
+ inline std::size_t GetSvStreamPos() const { return mrStrm.Tell(); }
/** Returns the stream size. */
- inline sal_Size GetSvStreamSize() const { return mnStreamSize; }
+ inline std::size_t GetSvStreamSize() const { return mnStreamSize; }
/** Stores current stream position into rPos. */
void StorePosition( XclImpStreamPos& rPos );
@@ -463,7 +463,7 @@ private:
@return Copy of mbValid. */
bool EnsureRawReadSize( sal_uInt16 nBytes );
/** Returns the maximum size of raw data possible to read in one block. */
- sal_uInt16 GetMaxRawReadSize( sal_Size nBytes ) const;
+ sal_uInt16 GetMaxRawReadSize( std::size_t nBytes ) const;
/** Reads and decrypts nBytes bytes to the existing(!) buffer pData.
@return Count of bytes really read. */
@@ -489,10 +489,10 @@ private:
bool mbGlobValidRec; /// Was user position a valid record?
bool mbHasGlobPos; /// Is user position defined?
- sal_Size mnStreamSize; /// Size of system stream.
- sal_Size mnNextRecPos; /// Start of next record header.
- sal_Size mnCurrRecSize; /// Helper for record position.
- sal_Size mnComplRecSize; /// Size of complete record data (with CONTINUEs).
+ std::size_t mnStreamSize; /// Size of system stream.
+ std::size_t mnNextRecPos; /// Start of next record header.
+ std::size_t mnCurrRecSize; /// Helper for record position.
+ std::size_t mnComplRecSize; /// Size of complete record data (with CONTINUEs).
bool mbHasComplRec; /// true = mnComplRecSize is valid.
sal_uInt16 mnRecId; /// Current record ID (not the CONTINUE ID).
diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx
index 152d876c76ac..b47d4080d935 100644
--- a/sc/source/filter/inc/xlchart.hxx
+++ b/sc/source/filter/inc/xlchart.hxx
@@ -147,7 +147,7 @@ class XclRoot;
// Constants and Enumerations =================================================
-const sal_Size EXC_CHART_PROGRESS_SIZE = 10;
+const std::size_t EXC_CHART_PROGRESS_SIZE = 10;
const sal_uInt16 EXC_CHART_AUTOROTATION = 0xFFFF; /// Automatic rotation, e.g. axis labels (internal use only).
const sal_Int32 EXC_CHART_AXIS_NONE = -1; /// For internal use only.
diff --git a/sc/source/filter/inc/xlstream.hxx b/sc/source/filter/inc/xlstream.hxx
index 0f63f3251afe..0c45575199ed 100644
--- a/sc/source/filter/inc/xlstream.hxx
+++ b/sc/source/filter/inc/xlstream.hxx
@@ -25,8 +25,8 @@
// Constants ==================================================================
-const sal_Size EXC_REC_SEEK_TO_BEGIN = 0;
-const sal_Size EXC_REC_SEEK_TO_END = static_cast< sal_Size >( -1 );
+const std::size_t EXC_REC_SEEK_TO_BEGIN = 0;
+const std::size_t EXC_REC_SEEK_TO_END = static_cast<std::size_t>( -1 );
const sal_uInt16 EXC_MAXRECSIZE_BIFF5 = 2080;
const sal_uInt16 EXC_MAXRECSIZE_BIFF8 = 8224;
diff --git a/sc/source/filter/lotus/filter.cxx b/sc/source/filter/lotus/filter.cxx
index 6a7bf213ef38..eca690eb3b81 100644
--- a/sc/source/filter/lotus/filter.cxx
+++ b/sc/source/filter/lotus/filter.cxx
@@ -61,7 +61,7 @@ generate_Opcodes(LotusContext &rContext, SvStream& aStream,
// #i76299# seems that SvStream::IsEof() does not work correctly
aStream.Seek( STREAM_SEEK_TO_END );
- sal_Size nStrmSize = aStream.Tell();
+ sal_uInt64 const nStrmSize = aStream.Tell();
aStream.Seek( STREAM_SEEK_TO_BEGIN );
while( !rContext.bEOF && !aStream.IsEof() && (aStream.Tell() < nStrmSize) )
{
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index 2d2e675ad008..82d0f78f2c7a 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -69,9 +69,9 @@ static void lcl_WriteDateTime( XclExpStream& rStrm, const DateTime& rDateTime )
// write string and fill rest of <nLength> with zero bytes
// <nLength> is without string header
-static void lcl_WriteFixedString( XclExpStream& rStrm, const XclExpString& rString, sal_Size nLength )
+static void lcl_WriteFixedString( XclExpStream& rStrm, const XclExpString& rString, std::size_t nLength )
{
- sal_Size nStrBytes = rString.GetBufferSize();
+ std::size_t nStrBytes = rString.GetBufferSize();
OSL_ENSURE( nLength >= nStrBytes, "lcl_WriteFixedString - String too long" );
if( rString.Len() > 0 )
rStrm << rString;
@@ -88,7 +88,7 @@ static inline void lcl_GenerateGUID( sal_uInt8* pGUID, bool& rValidGUID )
static inline void lcl_WriteGUID( XclExpStream& rStrm, const sal_uInt8* pGUID )
{
rStrm.SetSliceSize( 16 );
- for( sal_Size nIndex = 0; nIndex < 16; nIndex++ )
+ for( std::size_t nIndex = 0; nIndex < 16; nIndex++ )
rStrm << pGUID[ nIndex ];
rStrm.SetSliceSize( 0 );
}
@@ -121,7 +121,7 @@ sal_uInt16 XclExpUserBView::GetNum() const
return 0x01A9;
}
-sal_Size XclExpUserBView::GetLen() const
+std::size_t XclExpUserBView::GetLen() const
{
return 50 + ((sUsername.Len() > 0) ? sUsername.GetSize() : 0);
}
@@ -181,7 +181,7 @@ sal_uInt16 XclExpUsersViewBegin::GetNum() const
return 0x01AA;
}
-sal_Size XclExpUsersViewBegin::GetLen() const
+std::size_t XclExpUsersViewBegin::GetLen() const
{
return 64;
}
@@ -196,7 +196,7 @@ sal_uInt16 XclExpUsersViewEnd::GetNum() const
return 0x01AB;
}
-sal_Size XclExpUsersViewEnd::GetLen() const
+std::size_t XclExpUsersViewEnd::GetLen() const
{
return 2;
}
@@ -211,7 +211,7 @@ sal_uInt16 XclExpChTr0x0191::GetNum() const
return 0x0191;
}
-sal_Size XclExpChTr0x0191::GetLen() const
+std::size_t XclExpChTr0x0191::GetLen() const
{
return 2;
}
@@ -227,7 +227,7 @@ sal_uInt16 XclExpChTr0x0198::GetNum() const
return 0x0198;
}
-sal_Size XclExpChTr0x0198::GetLen() const
+std::size_t XclExpChTr0x0198::GetLen() const
{
return 4;
}
@@ -243,7 +243,7 @@ sal_uInt16 XclExpChTr0x0192::GetNum() const
return 0x0192;
}
-sal_Size XclExpChTr0x0192::GetLen() const
+std::size_t XclExpChTr0x0192::GetLen() const
{
return 512;
}
@@ -258,7 +258,7 @@ sal_uInt16 XclExpChTr0x0197::GetNum() const
return 0x0197;
}
-sal_Size XclExpChTr0x0197::GetLen() const
+std::size_t XclExpChTr0x0197::GetLen() const
{
return 2;
}
@@ -272,7 +272,7 @@ sal_uInt16 XclExpChTrEmpty::GetNum() const
return nRecNum;
}
-sal_Size XclExpChTrEmpty::GetLen() const
+std::size_t XclExpChTrEmpty::GetLen() const
{
return 0;
}
@@ -291,7 +291,7 @@ sal_uInt16 XclExpChTr0x0195::GetNum() const
return 0x0195;
}
-sal_Size XclExpChTr0x0195::GetLen() const
+std::size_t XclExpChTr0x0195::GetLen() const
{
return 162;
}
@@ -313,7 +313,7 @@ sal_uInt16 XclExpChTr0x0194::GetNum() const
return 0x0194;
}
-sal_Size XclExpChTr0x0194::GetLen() const
+std::size_t XclExpChTr0x0194::GetLen() const
{
return 162;
}
@@ -340,7 +340,7 @@ sal_uInt16 XclExpChTrHeader::GetNum() const
return 0x0196;
}
-sal_Size XclExpChTrHeader::GetLen() const
+std::size_t XclExpChTrHeader::GetLen() const
{
return 50;
}
@@ -531,7 +531,7 @@ sal_uInt16 XclExpChTrInfo::GetNum() const
return 0x0138;
}
-sal_Size XclExpChTrInfo::GetLen() const
+std::size_t XclExpChTrInfo::GetLen() const
{
return 158;
}
@@ -642,7 +642,7 @@ sal_uInt16 XclExpChTrTabId::GetNum() const
return 0x013D;
}
-sal_Size XclExpChTrTabId::GetLen() const
+std::size_t XclExpChTrTabId::GetLen() const
{
return nTabCount << 1;
}
@@ -743,7 +743,7 @@ void XclExpChTrAction::Save( XclExpStream& rStrm )
CompleteSaveAction( rStrm );
}
-sal_Size XclExpChTrAction::GetLen() const
+std::size_t XclExpChTrAction::GetLen() const
{
return GetHeaderByteCount() + GetActionByteCount();
}
@@ -932,7 +932,7 @@ void XclExpChTrCellContent::GetCellData(
rpData->mxTokArr = GetFormulaCompiler().CreateFormula(
EXC_FMLATYPE_CELL, *pTokenArray, &pFmlCell->aPos, &rRefLog );
rpData->nType = EXC_CHTR_TYPE_FORMULA;
- sal_Size nSize = rpData->mxTokArr->GetSize() + 3;
+ std::size_t nSize = rpData->mxTokArr->GetSize() + 3;
for( XclExpRefLog::const_iterator aIt = rRefLog.begin(), aEnd = rRefLog.end(); aIt != aEnd; ++aIt )
{
@@ -941,7 +941,7 @@ void XclExpChTrCellContent::GetCellData(
else
nSize += (aIt->mnFirstXclTab == aIt->mnLastXclTab) ? 6 : 8;
}
- rpData->nSize = ::std::min< sal_Size >( nSize, 0xFFFF );
+ rpData->nSize = ::std::min< std::size_t >( nSize, 0xFFFF );
rXclLength1 = 0x00000052;
rXclLength2 = 0x0018;
}
@@ -970,9 +970,9 @@ sal_uInt16 XclExpChTrCellContent::GetNum() const
return 0x013B;
}
-sal_Size XclExpChTrCellContent::GetActionByteCount() const
+std::size_t XclExpChTrCellContent::GetActionByteCount() const
{
- sal_Size nLen = 16;
+ std::size_t nLen = 16;
if( pOldData )
nLen += pOldData->nSize;
if( pNewData )
@@ -1166,7 +1166,7 @@ sal_uInt16 XclExpChTrInsert::GetNum() const
return 0x0137;
}
-sal_Size XclExpChTrInsert::GetActionByteCount() const
+std::size_t XclExpChTrInsert::GetActionByteCount() const
{
return 16;
}
@@ -1237,7 +1237,7 @@ sal_uInt16 XclExpChTrInsertTab::GetNum() const
return 0x014D;
}
-sal_Size XclExpChTrInsertTab::GetActionByteCount() const
+std::size_t XclExpChTrInsertTab::GetActionByteCount() const
{
return 276;
}
@@ -1304,7 +1304,7 @@ sal_uInt16 XclExpChTrMoveRange::GetNum() const
return 0x0140;
}
-sal_Size XclExpChTrMoveRange::GetActionByteCount() const
+std::size_t XclExpChTrMoveRange::GetActionByteCount() const
{
return 24;
}
@@ -1356,7 +1356,7 @@ sal_uInt16 XclExpChTr0x014A::GetNum() const
return 0x014A;
}
-sal_Size XclExpChTr0x014A::GetActionByteCount() const
+std::size_t XclExpChTr0x014A::GetActionByteCount() const
{
return 14;
}
@@ -1378,7 +1378,7 @@ void XclExpChTr0x014A::SaveXml( XclExpXmlStream& rStrm )
pStream->endElement( XML_rfmt );
}
-sal_Size ExcXmlRecord::GetLen() const
+std::size_t ExcXmlRecord::GetLen() const
{
return 0;
}
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index daac9e2d20c4..8017afe57c08 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -864,7 +864,7 @@ sal_uInt16 XclTxo::GetNum() const
return EXC_ID_TXO;
}
-sal_Size XclTxo::GetLen() const
+std::size_t XclTxo::GetLen() const
{
return 18;
}
@@ -1194,7 +1194,7 @@ sal_uInt16 ExcBof8_Base::GetNum() const
return 0x0809;
}
-sal_Size ExcBof8_Base::GetLen() const
+std::size_t ExcBof8_Base::GetLen() const
{
return 16;
}
@@ -1237,7 +1237,7 @@ void ExcBundlesheet8::SaveCont( XclExpStream& rStrm )
rStrm << nGrbit << GetName();
}
-sal_Size ExcBundlesheet8::GetLen() const
+std::size_t ExcBundlesheet8::GetLen() const
{ // Text max 255 chars
return 8 + GetName().GetBufferSize();
}
@@ -1268,7 +1268,7 @@ sal_uInt16 XclObproj::GetNum() const
return 0x00D3;
}
-sal_Size XclObproj::GetLen() const
+std::size_t XclObproj::GetLen() const
{
return 0;
}
@@ -1289,7 +1289,7 @@ sal_uInt16 XclCodename::GetNum() const
return 0x01BA;
}
-sal_Size XclCodename::GetLen() const
+std::size_t XclCodename::GetLen() const
{
return aName.GetSize();
}
@@ -1428,7 +1428,7 @@ sal_uInt16 ExcEScenario::GetNum() const
return 0x00AF;
}
-sal_Size ExcEScenario::GetLen() const
+std::size_t ExcEScenario::GetLen() const
{
return nRecLen;
}
@@ -1521,7 +1521,7 @@ sal_uInt16 ExcEScenarioManager::GetNum() const
return 0x00AE;
}
-sal_Size ExcEScenarioManager::GetLen() const
+std::size_t ExcEScenarioManager::GetLen() const
{
return 8;
}
@@ -1646,7 +1646,7 @@ sal_uInt16 XclCalccount::GetNum() const
return 0x000C;
}
-sal_Size XclCalccount::GetLen() const
+std::size_t XclCalccount::GetLen() const
{
return 2;
}
@@ -1673,7 +1673,7 @@ sal_uInt16 XclIteration::GetNum() const
return 0x0011;
}
-sal_Size XclIteration::GetLen() const
+std::size_t XclIteration::GetLen() const
{
return 2;
}
@@ -1700,7 +1700,7 @@ sal_uInt16 XclDelta::GetNum() const
return 0x0010;
}
-sal_Size XclDelta::GetLen() const
+std::size_t XclDelta::GetLen() const
{
return 8;
}
@@ -1797,8 +1797,8 @@ void XclExpWriteAccess::WriteBody( XclExpStream& rStrm )
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20 };
- sal_Size nDataSize = sizeof(aData);
- for (sal_Size i = 0; i < nDataSize; ++i)
+ std::size_t nDataSize = sizeof(aData);
+ for (std::size_t i = 0; i < nDataSize; ++i)
rStrm << aData[i];
}
diff --git a/sc/source/ui/unoobj/exceldetect.cxx b/sc/source/ui/unoobj/exceldetect.cxx
index ae8f2e657af0..027febb19876 100644
--- a/sc/source/ui/unoobj/exceldetect.cxx
+++ b/sc/source/ui/unoobj/exceldetect.cxx
@@ -55,7 +55,7 @@ bool hasStream(const uno::Reference<io::XInputStream>& xInStream, const OUString
return false;
pStream->Seek(STREAM_SEEK_TO_END);
- sal_Size nSize = pStream->Tell();
+ sal_uInt64 const nSize = pStream->Tell();
pStream->Seek(0);
if (!nSize)
@@ -93,7 +93,7 @@ bool isExcel40(const uno::Reference<io::XInputStream>& xInStream)
return false;
pStream->Seek(STREAM_SEEK_TO_END);
- sal_Size nSize = pStream->Tell();
+ sal_uInt64 const nSize = pStream->Tell();
pStream->Seek(0);
if (nSize < 4)
@@ -117,7 +117,7 @@ bool isExcel40(const uno::Reference<io::XInputStream>& xInStream)
// BOF record must be sized between 4 and 16 for BIFF 2, 3 and 4.
return false;
- sal_Size nPos = pStream->Tell();
+ sal_uInt64 const nPos = pStream->Tell();
if (nSize - nPos < nBofSize)
// BOF record doesn't have required bytes.
return false;