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
This commit is contained in:
@@ -101,7 +101,7 @@ OUString getTextEngineText (ExtTextEngine& rEngine)
|
||||
aMemStream.SetStreamCharSet( RTL_TEXTENCODING_UTF8 );
|
||||
aMemStream.SetLineDelimiter( LINEEND_LF );
|
||||
rEngine.Write( aMemStream );
|
||||
sal_Size nSize = aMemStream.Tell();
|
||||
std::size_t nSize = aMemStream.Tell();
|
||||
OUString aText( static_cast<const sal_Char*>(aMemStream.GetData()),
|
||||
nSize, RTL_TEXTENCODING_UTF8 );
|
||||
return aText;
|
||||
|
||||
@@ -987,7 +987,7 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora
|
||||
|
||||
bool BasicManager::ImplEncryptStream( SvStream& rStrm )
|
||||
{
|
||||
sal_Size nPos = rStrm.Tell();
|
||||
sal_uInt64 const nPos = rStrm.Tell();
|
||||
sal_uInt32 nCreator;
|
||||
rStrm.ReadUInt32( nCreator );
|
||||
rStrm.Seek( nPos );
|
||||
@@ -1832,7 +1832,8 @@ uno::Sequence< sal_Int8 > implGetDialogData( SbxObject* pDialog )
|
||||
{
|
||||
SvMemoryStream aMemStream;
|
||||
pDialog->Store( aMemStream );
|
||||
sal_Size nLen = aMemStream.Tell();
|
||||
sal_Int32 nLen = aMemStream.Tell();
|
||||
if (nLen < 0) { abort(); }
|
||||
uno::Sequence< sal_Int8 > aData( nLen );
|
||||
sal_Int8* pDestData = aData.getArray();
|
||||
const sal_Int8* pSrcData = static_cast<const sal_Int8*>(aMemStream.GetData());
|
||||
|
||||
@@ -213,8 +213,8 @@ class OslStream : public SvStream
|
||||
public:
|
||||
OslStream( const OUString& rName, StreamMode nStrmMode );
|
||||
virtual ~OslStream() override;
|
||||
virtual sal_Size GetData( void* pData, sal_Size nSize ) override;
|
||||
virtual sal_Size PutData( const void* pData, sal_Size nSize ) override;
|
||||
virtual std::size_t GetData(void* pData, std::size_t nSize) override;
|
||||
virtual std::size_t PutData(const void* pData, std::size_t nSize) override;
|
||||
virtual sal_uInt64 SeekPos( sal_uInt64 nPos ) override;
|
||||
virtual void FlushData() override;
|
||||
virtual void SetSize( sal_uInt64 nSize) override;
|
||||
@@ -257,14 +257,14 @@ OslStream::~OslStream()
|
||||
maFile.close();
|
||||
}
|
||||
|
||||
sal_Size OslStream::GetData(void* pData, sal_Size nSize)
|
||||
std::size_t OslStream::GetData(void* pData, std::size_t nSize)
|
||||
{
|
||||
sal_uInt64 nBytesRead = nSize;
|
||||
maFile.read( pData, nBytesRead, nBytesRead );
|
||||
return nBytesRead;
|
||||
}
|
||||
|
||||
sal_Size OslStream::PutData(const void* pData, sal_Size nSize)
|
||||
std::size_t OslStream::PutData(const void* pData, std::size_t nSize)
|
||||
{
|
||||
sal_uInt64 nBytesWritten;
|
||||
maFile.write( pData, nSize, nBytesWritten );
|
||||
@@ -309,8 +309,8 @@ public:
|
||||
explicit UCBStream( Reference< XInputStream > & xIS );
|
||||
explicit UCBStream( Reference< XStream > & xS );
|
||||
virtual ~UCBStream() override;
|
||||
virtual sal_Size GetData( void* pData, sal_Size nSize ) override;
|
||||
virtual sal_Size PutData( const void* pData, sal_Size nSize ) override;
|
||||
virtual std::size_t GetData( void* pData, std::size_t nSize ) override;
|
||||
virtual std::size_t PutData( const void* pData, std::size_t nSize ) override;
|
||||
virtual sal_uInt64 SeekPos( sal_uInt64 nPos ) override;
|
||||
virtual void FlushData() override;
|
||||
virtual void SetSize( sal_uInt64 nSize ) override;
|
||||
@@ -352,7 +352,7 @@ UCBStream::~UCBStream()
|
||||
}
|
||||
}
|
||||
|
||||
sal_Size UCBStream::GetData(void* pData, sal_Size nSize)
|
||||
std::size_t UCBStream::GetData(void* pData, std::size_t nSize)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -383,7 +383,7 @@ sal_Size UCBStream::GetData(void* pData, sal_Size nSize)
|
||||
return 0;
|
||||
}
|
||||
|
||||
sal_Size UCBStream::PutData(const void* pData, sal_Size nSize)
|
||||
std::size_t UCBStream::PutData(const void* pData, std::size_t nSize)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -905,7 +905,7 @@ RTLFUNC(InStr)
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
|
||||
sal_Size nArgCount = rPar.Count()-1;
|
||||
std::size_t nArgCount = rPar.Count()-1;
|
||||
if ( nArgCount < 2 )
|
||||
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
|
||||
else
|
||||
@@ -978,7 +978,7 @@ RTLFUNC(InStrRev)
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
|
||||
sal_Size nArgCount = rPar.Count()-1;
|
||||
std::size_t nArgCount = rPar.Count()-1;
|
||||
if ( nArgCount < 2 )
|
||||
{
|
||||
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
|
||||
@@ -1340,7 +1340,7 @@ RTLFUNC(Replace)
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
|
||||
sal_Size nArgCount = rPar.Count()-1;
|
||||
std::size_t nArgCount = rPar.Count()-1;
|
||||
if ( nArgCount < 3 || nArgCount > 6 )
|
||||
{
|
||||
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
|
||||
@@ -3388,7 +3388,7 @@ RTLFUNC(Loc)
|
||||
return;
|
||||
}
|
||||
SvStream* pSvStrm = pSbStrm->GetStrm();
|
||||
sal_Size nPos;
|
||||
std::size_t nPos;
|
||||
if( pSbStrm->IsRandom())
|
||||
{
|
||||
short nBlockLen = pSbStrm->GetBlockLen();
|
||||
@@ -3436,8 +3436,8 @@ RTLFUNC(Lof)
|
||||
return;
|
||||
}
|
||||
SvStream* pSvStrm = pSbStrm->GetStrm();
|
||||
sal_Size nOldPos = pSvStrm->Tell();
|
||||
sal_Size nLen = pSvStrm->Seek( STREAM_SEEK_TO_END );
|
||||
sal_uInt64 const nOldPos = pSvStrm->Tell();
|
||||
sal_uInt64 const nLen = pSvStrm->Seek( STREAM_SEEK_TO_END );
|
||||
pSvStrm->Seek( nOldPos );
|
||||
rPar.Get(0)->PutLong( (sal_Int32)nLen );
|
||||
}
|
||||
@@ -3468,7 +3468,7 @@ RTLFUNC(Seek)
|
||||
|
||||
if ( nArgs == 2 ) // Seek-Function
|
||||
{
|
||||
sal_Size nPos = pStrm->Tell();
|
||||
sal_uInt64 nPos = pStrm->Tell();
|
||||
if( pSbStrm->IsRandom() )
|
||||
{
|
||||
nPos = nPos / pSbStrm->GetBlockLen();
|
||||
@@ -3490,7 +3490,7 @@ RTLFUNC(Seek)
|
||||
{
|
||||
nPos *= pSbStrm->GetBlockLen();
|
||||
}
|
||||
pStrm->Seek( (sal_Size)nPos );
|
||||
pStrm->Seek( static_cast<sal_uInt64>(nPos) );
|
||||
pSbStrm->SetExpandOnWriteTo( nPos );
|
||||
}
|
||||
}
|
||||
@@ -3602,7 +3602,7 @@ RTLFUNC(Shell)
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
|
||||
sal_Size nArgCount = rPar.Count();
|
||||
std::size_t nArgCount = rPar.Count();
|
||||
if ( nArgCount < 2 || nArgCount > 5 )
|
||||
{
|
||||
rPar.Get(0)->PutLong(0);
|
||||
@@ -4247,7 +4247,7 @@ RTLFUNC(StrConv)
|
||||
(void)pBasic;
|
||||
(void)bWrite;
|
||||
|
||||
sal_Size nArgCount = rPar.Count()-1;
|
||||
std::size_t nArgCount = rPar.Count()-1;
|
||||
if( nArgCount < 2 || nArgCount > 3 )
|
||||
{
|
||||
StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
|
||||
|
||||
@@ -984,7 +984,7 @@ RTLFUNC(FindPropertyObject)
|
||||
static bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
|
||||
bool bBinary, short nBlockLen, bool bIsArray )
|
||||
{
|
||||
sal_Size nFPos = pStrm->Tell();
|
||||
sal_uInt64 const nFPos = pStrm->Tell();
|
||||
|
||||
bool bIsVariant = !rVar.IsFixed();
|
||||
SbxDataType eType = rVar.GetType();
|
||||
@@ -1091,7 +1091,7 @@ static bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm,
|
||||
|
||||
double aDouble;
|
||||
|
||||
sal_Size nFPos = pStrm->Tell();
|
||||
sal_uInt64 const nFPos = pStrm->Tell();
|
||||
|
||||
bool bIsVariant = !rVar.IsFixed();
|
||||
SbxDataType eVarType = rVar.GetType();
|
||||
@@ -1261,7 +1261,9 @@ void PutGet( SbxArray& rPar, bool bPut )
|
||||
|
||||
if( bHasRecordNo )
|
||||
{
|
||||
sal_Size nFilePos = bRandom ? (sal_Size)(nBlockLen * nRecordNo) : (sal_Size)nRecordNo;
|
||||
sal_uInt64 const nFilePos = bRandom
|
||||
? static_cast<sal_uInt64>(nBlockLen * nRecordNo)
|
||||
: static_cast<sal_uInt64>(nRecordNo);
|
||||
pStrm->Seek( nFilePos );
|
||||
}
|
||||
|
||||
@@ -1277,7 +1279,7 @@ void PutGet( SbxArray& rPar, bool bPut )
|
||||
|
||||
if( pArr )
|
||||
{
|
||||
sal_Size nFPos = pStrm->Tell();
|
||||
sal_uInt64 const nFPos = pStrm->Tell();
|
||||
short nDims = pArr->GetDims();
|
||||
std::unique_ptr<short[]> pDims(new short[ nDims ]);
|
||||
bRet = lcl_WriteReadSbxArray(*pArr,pStrm,!bRandom,nDims,pDims.get(),bPut);
|
||||
|
||||
@@ -198,7 +198,7 @@ SbxBase* SbxBase::Load( SvStream& rStrm )
|
||||
if( nFlags & SbxFlagBits::Reserved )
|
||||
nFlags = ( nFlags & ~SbxFlagBits::Reserved ) | SbxFlagBits::GlobalSearch;
|
||||
|
||||
sal_Size nOldPos = rStrm.Tell();
|
||||
sal_uInt64 nOldPos = rStrm.Tell();
|
||||
rStrm.ReadUInt32( nSize );
|
||||
SbxBase* p = Create( nSbxId, nCreator );
|
||||
if( p )
|
||||
@@ -206,7 +206,7 @@ SbxBase* SbxBase::Load( SvStream& rStrm )
|
||||
p->nFlags = nFlags;
|
||||
if( p->LoadData( rStrm, nVer ) )
|
||||
{
|
||||
sal_Size nNewPos = rStrm.Tell();
|
||||
sal_uInt64 const nNewPos = rStrm.Tell();
|
||||
nOldPos += nSize;
|
||||
DBG_ASSERT( nOldPos >= nNewPos, "SBX: Too much data loaded" );
|
||||
if( nOldPos != nNewPos )
|
||||
@@ -239,10 +239,10 @@ bool SbxBase::Store( SvStream& rStrm )
|
||||
.WriteUInt16( GetSbxId() )
|
||||
.WriteUInt16( static_cast<sal_uInt16>(GetFlags()) )
|
||||
.WriteUInt16( GetVersion() );
|
||||
sal_Size nOldPos = rStrm.Tell();
|
||||
sal_uInt64 const nOldPos = rStrm.Tell();
|
||||
rStrm.WriteUInt32( 0 );
|
||||
bool bRes = StoreData( rStrm );
|
||||
sal_Size nNewPos = rStrm.Tell();
|
||||
sal_uInt64 const nNewPos = rStrm.Tell();
|
||||
rStrm.Seek( nOldPos );
|
||||
rStrm.WriteUInt32( nNewPos - nOldPos );
|
||||
rStrm.Seek( nNewPos );
|
||||
|
||||
@@ -603,9 +603,9 @@ bool SbxObject::LoadData( SvStream& rStrm, sal_uInt16 nVer )
|
||||
OUString aDfltProp;
|
||||
aClassName = read_uInt16_lenPrefixed_uInt8s_ToOUString(rStrm, RTL_TEXTENCODING_ASCII_US);
|
||||
aDfltProp = read_uInt16_lenPrefixed_uInt8s_ToOUString(rStrm, RTL_TEXTENCODING_ASCII_US);
|
||||
sal_Size nPos = rStrm.Tell();
|
||||
sal_uInt64 nPos = rStrm.Tell();
|
||||
rStrm.ReadUInt32( nSize );
|
||||
sal_Size nNewPos = rStrm.Tell();
|
||||
sal_uInt64 const nNewPos = rStrm.Tell();
|
||||
nPos += nSize;
|
||||
DBG_ASSERT( nPos >= nNewPos, "SBX: Loaded too much data" );
|
||||
if( nPos != nNewPos )
|
||||
@@ -640,9 +640,9 @@ bool SbxObject::StoreData( SvStream& rStrm ) const
|
||||
}
|
||||
write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, aClassName, RTL_TEXTENCODING_ASCII_US);
|
||||
write_uInt16_lenPrefixed_uInt8s_FromOUString(rStrm, aDfltProp, RTL_TEXTENCODING_ASCII_US);
|
||||
sal_Size nPos = rStrm.Tell();
|
||||
sal_uInt64 const nPos = rStrm.Tell();
|
||||
rStrm.WriteUInt32( 0 );
|
||||
sal_Size nNew = rStrm.Tell();
|
||||
sal_uInt64 const nNew = rStrm.Tell();
|
||||
rStrm.Seek( nPos );
|
||||
rStrm.WriteUInt32( nNew - nPos );
|
||||
rStrm.Seek( nNew );
|
||||
|
||||
@@ -634,7 +634,8 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons
|
||||
SvMemoryStream aMemStream;
|
||||
/*sal_Bool bStore = */pMod->StoreBinaryData( aMemStream, B_CURVERSION );
|
||||
|
||||
sal_Size nSize = aMemStream.Tell();
|
||||
sal_Int32 const nSize = aMemStream.Tell();
|
||||
if (nSize < 0) { abort(); }
|
||||
Sequence< sal_Int8 > aBinSeq( nSize );
|
||||
sal_Int8* pData = aBinSeq.getArray();
|
||||
memcpy( pData, aMemStream.GetData(), nSize );
|
||||
@@ -775,7 +776,8 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons
|
||||
SvMemoryStream aMemStream;
|
||||
/*sal_Bool bStore = */pMod->StoreBinaryData( aMemStream, B_CURVERSION );
|
||||
|
||||
sal_Size nSize = aMemStream.Tell();
|
||||
sal_Int32 const nSize = aMemStream.Tell();
|
||||
if (nSize < 0) { abort(); }
|
||||
Sequence< sal_Int8 > aBinSeq( nSize );
|
||||
sal_Int8* pData = aBinSeq.getArray();
|
||||
memcpy( pData, aMemStream.GetData(), nSize );
|
||||
|
||||
@@ -143,7 +143,7 @@ private:
|
||||
by slotCount)
|
||||
@return the size of the raw vtable block, in bytes
|
||||
*/
|
||||
static sal_Size getBlockSize(sal_Int32 slotCount);
|
||||
static std::size_t getBlockSize(sal_Int32 slotCount);
|
||||
|
||||
// This function is not defined in the generic part, but instead has to be
|
||||
// defined individually for each CPP--UNO bridge:
|
||||
|
||||
@@ -579,7 +579,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -501,7 +501,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot);
|
||||
|
||||
@@ -492,7 +492,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot);
|
||||
|
||||
@@ -462,7 +462,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot);
|
||||
|
||||
@@ -396,7 +396,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block) {
|
||||
return static_cast<Slot *>(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -593,7 +593,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -493,7 +493,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -638,7 +638,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -601,7 +601,7 @@ bridges::cpp_uno::shared::VtableFactory::Slot * bridges::cpp_uno::shared::Vtable
|
||||
}
|
||||
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -445,7 +445,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block) {
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -450,7 +450,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -731,7 +731,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
}
|
||||
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -628,7 +628,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
}
|
||||
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -710,7 +710,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -672,7 +672,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -610,7 +610,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -573,7 +573,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -485,7 +485,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -658,7 +658,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -444,7 +444,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -440,7 +440,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -439,7 +439,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -483,7 +483,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -435,7 +435,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -439,7 +439,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 2;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -431,7 +431,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
||||
return static_cast< Slot * >(block) + 1;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount)
|
||||
{
|
||||
return (slotCount + 1) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -450,7 +450,7 @@ bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(
|
||||
return static_cast< Slot * >(block) + 1;
|
||||
}
|
||||
|
||||
sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
|
||||
sal_Int32 slotCount )
|
||||
{
|
||||
return (slotCount + 1) * sizeof (Slot) + slotCount * codeSnippetSize;
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace {
|
||||
extern "C" void * SAL_CALL allocExec(
|
||||
SAL_UNUSED_PARAMETER rtl_arena_type *, sal_Size * size)
|
||||
{
|
||||
sal_Size pagesize;
|
||||
std::size_t pagesize;
|
||||
#if defined SAL_UNX
|
||||
#if defined FREEBSD || defined NETBSD || defined OPENBSD || defined DRAGONFLY
|
||||
pagesize = getpagesize();
|
||||
@@ -81,7 +81,7 @@ extern "C" void * SAL_CALL allocExec(
|
||||
#else
|
||||
#error Unsupported platform
|
||||
#endif
|
||||
sal_Size n = (*size + (pagesize - 1)) & ~(pagesize - 1);
|
||||
std::size_t n = (*size + (pagesize - 1)) & ~(pagesize - 1);
|
||||
void * p;
|
||||
#if defined SAL_UNX
|
||||
p = mmap(
|
||||
@@ -228,8 +228,8 @@ VtableFactory::Vtables VtableFactory::getVtables(
|
||||
#ifdef USE_DOUBLE_MMAP
|
||||
bool VtableFactory::createBlock(Block &block, sal_Int32 slotCount) const
|
||||
{
|
||||
sal_Size size = getBlockSize(slotCount);
|
||||
sal_Size pagesize = sysconf(_SC_PAGESIZE);
|
||||
std::size_t size = getBlockSize(slotCount);
|
||||
std::size_t pagesize = sysconf(_SC_PAGESIZE);
|
||||
block.size = (size + (pagesize - 1)) & ~(pagesize - 1);
|
||||
block.fd = -1;
|
||||
|
||||
|
||||
@@ -1629,14 +1629,14 @@ namespace cairocanvas
|
||||
virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertToRGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const double* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::RGBColor > aRes(nLen/4);
|
||||
rendering::RGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
const double fAlpha(pIn[3]);
|
||||
if( fAlpha == 0.0 )
|
||||
@@ -1650,14 +1650,14 @@ namespace cairocanvas
|
||||
virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToARGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const double* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
|
||||
rendering::ARGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
const double fAlpha(pIn[3]);
|
||||
if( fAlpha == 0.0 )
|
||||
@@ -1671,14 +1671,14 @@ namespace cairocanvas
|
||||
virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToPARGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const double* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
|
||||
rendering::ARGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = rendering::ARGBColor(pIn[3],pIn[2],pIn[1],pIn[1]);
|
||||
pIn += 4;
|
||||
@@ -1688,11 +1688,11 @@ namespace cairocanvas
|
||||
virtual uno::Sequence< double > SAL_CALL convertFromRGB( const uno::Sequence< rendering::RGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::RGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< double > aRes(nLen*4);
|
||||
double* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = pIn->Blue;
|
||||
*pColors++ = pIn->Green;
|
||||
@@ -1705,11 +1705,11 @@ namespace cairocanvas
|
||||
virtual uno::Sequence< double > SAL_CALL convertFromARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< double > aRes(nLen*4);
|
||||
double* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = pIn->Alpha*pIn->Blue;
|
||||
*pColors++ = pIn->Alpha*pIn->Green;
|
||||
@@ -1722,11 +1722,11 @@ namespace cairocanvas
|
||||
virtual uno::Sequence< double > SAL_CALL convertFromPARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< double > aRes(nLen*4);
|
||||
double* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = pIn->Blue;
|
||||
*pColors++ = pIn->Green;
|
||||
@@ -1757,14 +1757,14 @@ namespace cairocanvas
|
||||
if( dynamic_cast<CairoColorSpace*>(targetColorSpace.get()) )
|
||||
{
|
||||
const sal_Int8* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence<double> aRes(nLen);
|
||||
double* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = vcl::unotools::toDoubleColor(*pIn++);
|
||||
*pOut++ = vcl::unotools::toDoubleColor(*pIn++);
|
||||
@@ -1804,14 +1804,14 @@ namespace cairocanvas
|
||||
throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const sal_Int8* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::RGBColor > aRes(nLen/4);
|
||||
rendering::RGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
const double fAlpha((sal_uInt8)pIn[3]);
|
||||
if( fAlpha )
|
||||
@@ -1830,14 +1830,14 @@ namespace cairocanvas
|
||||
throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const sal_Int8* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
|
||||
rendering::ARGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
const double fAlpha((sal_uInt8)pIn[3]);
|
||||
if( fAlpha )
|
||||
@@ -1856,14 +1856,14 @@ namespace cairocanvas
|
||||
throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const sal_Int8* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
|
||||
rendering::ARGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = rendering::ARGBColor(
|
||||
vcl::unotools::toDoubleColor(pIn[3]),
|
||||
@@ -1879,11 +1879,11 @@ namespace cairocanvas
|
||||
throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::RGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< sal_Int8 > aRes(nLen*4);
|
||||
sal_Int8* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Blue);
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Green);
|
||||
@@ -1898,11 +1898,11 @@ namespace cairocanvas
|
||||
throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< sal_Int8 > aRes(nLen*4);
|
||||
sal_Int8* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
const double fAlpha(pIn->Alpha);
|
||||
*pColors++ = vcl::unotools::toByteColor(fAlpha*pIn->Blue);
|
||||
@@ -1917,11 +1917,11 @@ namespace cairocanvas
|
||||
throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< sal_Int8 > aRes(nLen*4);
|
||||
sal_Int8* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Blue);
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Green);
|
||||
@@ -1986,14 +1986,14 @@ namespace cairocanvas
|
||||
virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertToRGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const double* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::RGBColor > aRes(nLen/4);
|
||||
rendering::RGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = rendering::RGBColor(pIn[2], pIn[1], pIn[0]);
|
||||
pIn += 4;
|
||||
@@ -2003,14 +2003,14 @@ namespace cairocanvas
|
||||
uno::Sequence< rendering::ARGBColor > impl_convertToARGB( const uno::Sequence< double >& deviceColor )
|
||||
{
|
||||
const double* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
|
||||
rendering::ARGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = rendering::ARGBColor(1.0, pIn[2], pIn[1], pIn[0]);
|
||||
pIn += 4;
|
||||
@@ -2028,11 +2028,11 @@ namespace cairocanvas
|
||||
virtual uno::Sequence< double > SAL_CALL convertFromRGB( const uno::Sequence< rendering::RGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::RGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< double > aRes(nLen*4);
|
||||
double* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = pIn->Blue;
|
||||
*pColors++ = pIn->Green;
|
||||
@@ -2045,11 +2045,11 @@ namespace cairocanvas
|
||||
uno::Sequence< double > impl_convertFromARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor )
|
||||
{
|
||||
const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< double > aRes(nLen*4);
|
||||
double* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = pIn->Blue;
|
||||
*pColors++ = pIn->Green;
|
||||
@@ -2088,14 +2088,14 @@ namespace cairocanvas
|
||||
if( dynamic_cast<CairoColorSpace*>(targetColorSpace.get()) )
|
||||
{
|
||||
const sal_Int8* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence<double> aRes(nLen);
|
||||
double* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = vcl::unotools::toDoubleColor(*pIn++);
|
||||
*pOut++ = vcl::unotools::toDoubleColor(*pIn++);
|
||||
@@ -2135,14 +2135,14 @@ namespace cairocanvas
|
||||
throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const sal_Int8* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::RGBColor > aRes(nLen/4);
|
||||
rendering::RGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = rendering::RGBColor( pIn[2], pIn[1], pIn[0] );
|
||||
pIn += 4;
|
||||
@@ -2163,14 +2163,14 @@ namespace cairocanvas
|
||||
uno::Sequence< rendering::ARGBColor > impl_convertIntegerToARGB( const uno::Sequence< ::sal_Int8 >& deviceColor )
|
||||
{
|
||||
const sal_Int8* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
|
||||
rendering::ARGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = rendering::ARGBColor(
|
||||
1.0,
|
||||
@@ -2186,11 +2186,11 @@ namespace cairocanvas
|
||||
throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::RGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< sal_Int8 > aRes(nLen*4);
|
||||
sal_Int8* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Blue);
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Green);
|
||||
@@ -2214,11 +2214,11 @@ namespace cairocanvas
|
||||
uno::Sequence< ::sal_Int8 > impl_convertIntegerFromARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor )
|
||||
{
|
||||
const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< sal_Int8 > aRes(nLen*4);
|
||||
sal_Int8* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Blue);
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Green);
|
||||
|
||||
@@ -213,14 +213,14 @@ namespace canvas
|
||||
virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertToRGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const double* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::RGBColor > aRes(nLen/4);
|
||||
rendering::RGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = rendering::RGBColor(pIn[0],pIn[1],pIn[2]);
|
||||
pIn += 4;
|
||||
@@ -231,14 +231,14 @@ namespace canvas
|
||||
{
|
||||
SAL_WARN_IF(deviceColor.getLength() == 0, "canvas", "empty deviceColor argument");
|
||||
const double* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
|
||||
rendering::ARGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = rendering::ARGBColor(pIn[3],pIn[0],pIn[1],pIn[2]);
|
||||
pIn += 4;
|
||||
@@ -248,14 +248,14 @@ namespace canvas
|
||||
virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToPARGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const double* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
|
||||
rendering::ARGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = rendering::ARGBColor(pIn[3],pIn[3]*pIn[0],pIn[3]*pIn[1],pIn[3]*pIn[2]);
|
||||
pIn += 4;
|
||||
@@ -265,11 +265,11 @@ namespace canvas
|
||||
virtual uno::Sequence< double > SAL_CALL convertFromRGB( const uno::Sequence< rendering::RGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::RGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< double > aRes(nLen*4);
|
||||
double* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = pIn->Red;
|
||||
*pColors++ = pIn->Green;
|
||||
@@ -282,11 +282,11 @@ namespace canvas
|
||||
virtual uno::Sequence< double > SAL_CALL convertFromARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< double > aRes(nLen*4);
|
||||
double* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = pIn->Red;
|
||||
*pColors++ = pIn->Green;
|
||||
@@ -299,11 +299,11 @@ namespace canvas
|
||||
virtual uno::Sequence< double > SAL_CALL convertFromPARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< double > aRes(nLen*4);
|
||||
double* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = pIn->Red/pIn->Alpha;
|
||||
*pColors++ = pIn->Green/pIn->Alpha;
|
||||
@@ -334,14 +334,14 @@ namespace canvas
|
||||
if( dynamic_cast<StandardColorSpace*>(targetColorSpace.get()) )
|
||||
{
|
||||
const sal_Int8* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence<double> aRes(nLen);
|
||||
double* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = vcl::unotools::toDoubleColor(*pIn++);
|
||||
*pOut++ = vcl::unotools::toDoubleColor(*pIn++);
|
||||
@@ -380,14 +380,14 @@ namespace canvas
|
||||
virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertIntegerToRGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const sal_Int8* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::RGBColor > aRes(nLen/4);
|
||||
rendering::RGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = rendering::RGBColor(
|
||||
vcl::unotools::toDoubleColor(pIn[0]),
|
||||
@@ -401,14 +401,14 @@ namespace canvas
|
||||
virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertIntegerToARGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const sal_Int8* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
|
||||
rendering::ARGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = rendering::ARGBColor(
|
||||
vcl::unotools::toDoubleColor(pIn[3]),
|
||||
@@ -423,14 +423,14 @@ namespace canvas
|
||||
virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertIntegerToPARGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const sal_Int8* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
|
||||
rendering::ARGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
const sal_Int8 nAlpha( pIn[3] );
|
||||
*pOut++ = rendering::ARGBColor(
|
||||
@@ -446,11 +446,11 @@ namespace canvas
|
||||
virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromRGB( const uno::Sequence< rendering::RGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::RGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< sal_Int8 > aRes(nLen*4);
|
||||
sal_Int8* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Red);
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Green);
|
||||
@@ -464,11 +464,11 @@ namespace canvas
|
||||
virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< sal_Int8 > aRes(nLen*4);
|
||||
sal_Int8* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Red);
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Green);
|
||||
@@ -482,11 +482,11 @@ namespace canvas
|
||||
virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromPARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< sal_Int8 > aRes(nLen*4);
|
||||
sal_Int8* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Red/pIn->Alpha);
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Green/pIn->Alpha);
|
||||
@@ -551,14 +551,14 @@ namespace canvas
|
||||
virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertToRGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const double* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::RGBColor > aRes(nLen/4);
|
||||
rendering::RGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = rendering::RGBColor(pIn[0],pIn[1],pIn[2]);
|
||||
pIn += 4;
|
||||
@@ -568,14 +568,14 @@ namespace canvas
|
||||
virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToARGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const double* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
|
||||
rendering::ARGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = rendering::ARGBColor(1.0,pIn[0],pIn[1],pIn[2]);
|
||||
pIn += 4;
|
||||
@@ -585,14 +585,14 @@ namespace canvas
|
||||
virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertToPARGB( const uno::Sequence< double >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const double* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
|
||||
rendering::ARGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = rendering::ARGBColor(1.0,pIn[0],pIn[1],pIn[2]);
|
||||
pIn += 4;
|
||||
@@ -602,11 +602,11 @@ namespace canvas
|
||||
virtual uno::Sequence< double > SAL_CALL convertFromRGB( const uno::Sequence< rendering::RGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::RGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< double > aRes(nLen*4);
|
||||
double* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = pIn->Red;
|
||||
*pColors++ = pIn->Green;
|
||||
@@ -619,11 +619,11 @@ namespace canvas
|
||||
virtual uno::Sequence< double > SAL_CALL convertFromARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< double > aRes(nLen*4);
|
||||
double* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = pIn->Red;
|
||||
*pColors++ = pIn->Green;
|
||||
@@ -636,11 +636,11 @@ namespace canvas
|
||||
virtual uno::Sequence< double > SAL_CALL convertFromPARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< double > aRes(nLen*4);
|
||||
double* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = pIn->Red/pIn->Alpha;
|
||||
*pColors++ = pIn->Green/pIn->Alpha;
|
||||
@@ -671,14 +671,14 @@ namespace canvas
|
||||
if( dynamic_cast<StandardNoAlphaColorSpace*>(targetColorSpace.get()) )
|
||||
{
|
||||
const sal_Int8* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence<double> aRes(nLen);
|
||||
double* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = vcl::unotools::toDoubleColor(*pIn++);
|
||||
*pOut++ = vcl::unotools::toDoubleColor(*pIn++);
|
||||
@@ -717,14 +717,14 @@ namespace canvas
|
||||
virtual uno::Sequence< rendering::RGBColor > SAL_CALL convertIntegerToRGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const sal_Int8* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::RGBColor > aRes(nLen/4);
|
||||
rendering::RGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = rendering::RGBColor(
|
||||
vcl::unotools::toDoubleColor(pIn[0]),
|
||||
@@ -738,14 +738,14 @@ namespace canvas
|
||||
virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertIntegerToARGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const sal_Int8* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
|
||||
rendering::ARGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = rendering::ARGBColor(
|
||||
1.0,
|
||||
@@ -760,14 +760,14 @@ namespace canvas
|
||||
virtual uno::Sequence< rendering::ARGBColor > SAL_CALL convertIntegerToPARGB( const uno::Sequence< ::sal_Int8 >& deviceColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const sal_Int8* pIn( deviceColor.getConstArray() );
|
||||
const sal_Size nLen( deviceColor.getLength() );
|
||||
const std::size_t nLen( deviceColor.getLength() );
|
||||
ENSURE_ARG_OR_THROW2(nLen%4==0,
|
||||
"number of channels no multiple of 4",
|
||||
static_cast<rendering::XColorSpace*>(this), 0);
|
||||
|
||||
uno::Sequence< rendering::ARGBColor > aRes(nLen/4);
|
||||
rendering::ARGBColor* pOut( aRes.getArray() );
|
||||
for( sal_Size i=0; i<nLen; i+=4 )
|
||||
for( std::size_t i=0; i<nLen; i+=4 )
|
||||
{
|
||||
*pOut++ = rendering::ARGBColor(
|
||||
1.0,
|
||||
@@ -782,11 +782,11 @@ namespace canvas
|
||||
virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromRGB( const uno::Sequence< rendering::RGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::RGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< sal_Int8 > aRes(nLen*4);
|
||||
sal_Int8* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Red);
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Green);
|
||||
@@ -800,11 +800,11 @@ namespace canvas
|
||||
virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< sal_Int8 > aRes(nLen*4);
|
||||
sal_Int8* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Red);
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Green);
|
||||
@@ -818,11 +818,11 @@ namespace canvas
|
||||
virtual uno::Sequence< ::sal_Int8 > SAL_CALL convertIntegerFromPARGB( const uno::Sequence< rendering::ARGBColor >& rgbColor ) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) override
|
||||
{
|
||||
const rendering::ARGBColor* pIn( rgbColor.getConstArray() );
|
||||
const sal_Size nLen( rgbColor.getLength() );
|
||||
const std::size_t nLen( rgbColor.getLength() );
|
||||
|
||||
uno::Sequence< sal_Int8 > aRes(nLen*4);
|
||||
sal_Int8* pColors=aRes.getArray();
|
||||
for( sal_Size i=0; i<nLen; ++i )
|
||||
for( std::size_t i=0; i<nLen; ++i )
|
||||
{
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Red/pIn->Alpha);
|
||||
*pColors++ = vcl::unotools::toByteColor(pIn->Green/pIn->Alpha);
|
||||
|
||||
@@ -77,9 +77,9 @@ using namespace ::com::sun::star::i18n;
|
||||
|
||||
namespace
|
||||
{
|
||||
sal_Size lcl_getFileSize(SvStream& _rStream)
|
||||
std::size_t lcl_getFileSize(SvStream& _rStream)
|
||||
{
|
||||
sal_Size nFileSize = 0;
|
||||
std::size_t nFileSize = 0;
|
||||
_rStream.Seek(STREAM_SEEK_TO_END);
|
||||
_rStream.SeekRel(-1);
|
||||
char cEOL;
|
||||
@@ -538,13 +538,13 @@ void ODbaseTable::construct()
|
||||
}
|
||||
fillColumns();
|
||||
|
||||
sal_Size nFileSize = lcl_getFileSize(*m_pFileStream);
|
||||
std::size_t nFileSize = lcl_getFileSize(*m_pFileStream);
|
||||
m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN);
|
||||
// seems to be empty or someone wrote bullshit into the dbase file
|
||||
// try and recover if m_aHeader.db_slng is sane
|
||||
if (m_aHeader.db_anz == 0 && m_aHeader.db_slng)
|
||||
{
|
||||
sal_Size nRecords = (nFileSize-m_aHeader.db_kopf)/m_aHeader.db_slng;
|
||||
std::size_t nRecords = (nFileSize-m_aHeader.db_kopf)/m_aHeader.db_slng;
|
||||
if (nRecords > 0)
|
||||
m_aHeader.db_anz = nRecords;
|
||||
}
|
||||
@@ -804,12 +804,12 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
|
||||
if (!bRetrieveData)
|
||||
return true;
|
||||
|
||||
sal_Size nByteOffset = 1;
|
||||
std::size_t nByteOffset = 1;
|
||||
// Fields:
|
||||
OSQLColumns::Vector::const_iterator aIter = _rCols.get().begin();
|
||||
OSQLColumns::Vector::const_iterator aEnd = _rCols.get().end();
|
||||
const sal_Size nCount = _rRow->get().size();
|
||||
for (sal_Size i = 1; aIter != aEnd && nByteOffset <= m_nBufferSize && i < nCount;++aIter, i++)
|
||||
const std::size_t nCount = _rRow->get().size();
|
||||
for (std::size_t i = 1; aIter != aEnd && nByteOffset <= m_nBufferSize && i < nCount;++aIter, i++)
|
||||
{
|
||||
// Lengths depending on data type:
|
||||
sal_Int32 nLen = 0;
|
||||
@@ -1509,13 +1509,13 @@ bool ODbaseTable::InsertRow(OValueRefVector& rRow, const Reference<XIndexAccess>
|
||||
|
||||
// Copy new row completely:
|
||||
// ... and add at the end as new Record:
|
||||
sal_Size nTempPos = m_nFilePos;
|
||||
std::size_t nTempPos = m_nFilePos;
|
||||
|
||||
m_nFilePos = (sal_Size)m_aHeader.db_anz + 1;
|
||||
m_nFilePos = (std::size_t)m_aHeader.db_anz + 1;
|
||||
bool bInsertRow = UpdateBuffer( rRow, nullptr, _xCols, true );
|
||||
if ( bInsertRow )
|
||||
{
|
||||
sal_Size nFileSize = 0, nMemoFileSize = 0;
|
||||
std::size_t nFileSize = 0, nMemoFileSize = 0;
|
||||
|
||||
nFileSize = lcl_getFileSize(*m_pFileStream);
|
||||
|
||||
@@ -1562,11 +1562,11 @@ bool ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow, const
|
||||
return false;
|
||||
|
||||
// position on desired record:
|
||||
sal_Size nPos = m_aHeader.db_kopf + (long)(m_nFilePos-1) * m_aHeader.db_slng;
|
||||
std::size_t nPos = m_aHeader.db_kopf + (long)(m_nFilePos-1) * m_aHeader.db_slng;
|
||||
m_pFileStream->Seek(nPos);
|
||||
m_pFileStream->ReadBytes(m_pBuffer, m_aHeader.db_slng);
|
||||
|
||||
sal_Size nMemoFileSize( 0 );
|
||||
std::size_t nMemoFileSize( 0 );
|
||||
if (HasMemoFields() && m_pMemoStream)
|
||||
{
|
||||
m_pMemoStream->Seek(STREAM_SEEK_TO_END);
|
||||
@@ -1589,7 +1589,7 @@ bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols)
|
||||
{
|
||||
// Set the Delete-Flag (be it set or not):
|
||||
// Position on desired record:
|
||||
sal_Size nFilePos = m_aHeader.db_kopf + (long)(m_nFilePos-1) * m_aHeader.db_slng;
|
||||
std::size_t nFilePos = m_aHeader.db_kopf + (long)(m_nFilePos-1) * m_aHeader.db_slng;
|
||||
m_pFileStream->Seek(nFilePos);
|
||||
|
||||
OValueRefRow aRow = new OValueRefVector(_rCols.get().size());
|
||||
@@ -1958,7 +1958,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
|
||||
char cNext = pData[nLen]; // Mark's scratch and replaced by 0
|
||||
pData[nLen] = '\0'; // This is because the buffer is always a sign of greater ...
|
||||
|
||||
sal_Size nBlockNo = strtol(pData,nullptr,10); // Block number read
|
||||
std::size_t nBlockNo = strtol(pData,nullptr,10); // Block number read
|
||||
|
||||
// Next initial character restore again:
|
||||
pData[nLen] = cNext;
|
||||
@@ -2015,10 +2015,10 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
|
||||
}
|
||||
|
||||
|
||||
bool ODbaseTable::WriteMemo(const ORowSetValue& aVariable, sal_Size& rBlockNr)
|
||||
bool ODbaseTable::WriteMemo(const ORowSetValue& aVariable, std::size_t& rBlockNr)
|
||||
{
|
||||
// if the BlockNo 0 is given, the block will be appended at the end
|
||||
sal_Size nSize = 0;
|
||||
std::size_t nSize = 0;
|
||||
OString aStr;
|
||||
css::uno::Sequence<sal_Int8> aValue;
|
||||
sal_uInt8 nHeader[4];
|
||||
@@ -2051,7 +2051,7 @@ bool ODbaseTable::WriteMemo(const ORowSetValue& aVariable, sal_Size& rBlockNr)
|
||||
m_pMemoStream->SeekRel(4L);
|
||||
m_pMemoStream->ReadBytes(sHeader, 4);
|
||||
|
||||
sal_Size nOldSize;
|
||||
std::size_t nOldSize;
|
||||
if (m_aMemoHeader.db_typ == MemoFoxPro)
|
||||
nOldSize = ((((unsigned char)sHeader[0]) * 256 +
|
||||
(unsigned char)sHeader[1]) * 256 +
|
||||
@@ -2064,7 +2064,7 @@ bool ODbaseTable::WriteMemo(const ORowSetValue& aVariable, sal_Size& rBlockNr)
|
||||
(unsigned char)sHeader[0] - 8;
|
||||
|
||||
// fits the new length in the used blocks
|
||||
sal_Size nUsedBlocks = ((nSize + 8) / m_aMemoHeader.db_size) + (((nSize + 8) % m_aMemoHeader.db_size > 0) ? 1 : 0),
|
||||
std::size_t nUsedBlocks = ((nSize + 8) / m_aMemoHeader.db_size) + (((nSize + 8) % m_aMemoHeader.db_size > 0) ? 1 : 0),
|
||||
nOldUsedBlocks = ((nOldSize + 8) / m_aMemoHeader.db_size) + (((nOldSize + 8) % m_aMemoHeader.db_size > 0) ? 1 : 0);
|
||||
bAppend = nUsedBlocks > nOldUsedBlocks;
|
||||
}
|
||||
@@ -2073,7 +2073,7 @@ bool ODbaseTable::WriteMemo(const ORowSetValue& aVariable, sal_Size& rBlockNr)
|
||||
|
||||
if (bAppend)
|
||||
{
|
||||
sal_Size nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END);
|
||||
sal_uInt64 const nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END);
|
||||
// fill last block
|
||||
rBlockNr = (nStreamSize / m_aMemoHeader.db_size) + ((nStreamSize % m_aMemoHeader.db_size) > 0 ? 1 : 0);
|
||||
|
||||
@@ -2137,7 +2137,7 @@ bool ODbaseTable::WriteMemo(const ORowSetValue& aVariable, sal_Size& rBlockNr)
|
||||
// Write the new block number
|
||||
if (bAppend)
|
||||
{
|
||||
sal_Size nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END);
|
||||
sal_uInt64 const nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END);
|
||||
m_aMemoHeader.db_next = (nStreamSize / m_aMemoHeader.db_size) + ((nStreamSize % m_aMemoHeader.db_size) > 0 ? 1 : 0);
|
||||
|
||||
// Write the new block number
|
||||
@@ -2629,16 +2629,16 @@ bool ODbaseTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32
|
||||
goto Error;
|
||||
else
|
||||
{
|
||||
sal_Size nEntryLen = m_aHeader.db_slng;
|
||||
std::size_t nEntryLen = m_aHeader.db_slng;
|
||||
|
||||
OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position");
|
||||
sal_Size nPos = m_aHeader.db_kopf + (sal_Size)(m_nFilePos-1) * nEntryLen;
|
||||
std::size_t nPos = m_aHeader.db_kopf + (std::size_t)(m_nFilePos-1) * nEntryLen;
|
||||
|
||||
m_pFileStream->Seek(nPos);
|
||||
if (m_pFileStream->GetError() != ERRCODE_NONE)
|
||||
goto Error;
|
||||
|
||||
sal_Size nRead = m_pFileStream->ReadBytes(m_pBuffer, nEntryLen);
|
||||
std::size_t nRead = m_pFileStream->ReadBytes(m_pBuffer, nEntryLen);
|
||||
if (nRead != nEntryLen)
|
||||
{
|
||||
SAL_WARN("connectivity.drivers", "ODbaseTable::seekRow: short read!");
|
||||
@@ -2675,7 +2675,7 @@ End:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ODbaseTable::ReadMemo(sal_Size nBlockNo, ORowSetValue& aVariable)
|
||||
bool ODbaseTable::ReadMemo(std::size_t nBlockNo, ORowSetValue& aVariable)
|
||||
{
|
||||
m_pMemoStream->Seek(nBlockNo * m_aMemoHeader.db_size);
|
||||
switch (m_aMemoHeader.db_typ)
|
||||
@@ -2776,7 +2776,7 @@ bool ODbaseTable::WriteBuffer()
|
||||
OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position");
|
||||
|
||||
// position on desired record:
|
||||
sal_Size nPos = m_aHeader.db_kopf + (long)(m_nFilePos-1) * m_aHeader.db_slng;
|
||||
std::size_t nPos = m_aHeader.db_kopf + (long)(m_nFilePos-1) * m_aHeader.db_slng;
|
||||
m_pFileStream->Seek(nPos);
|
||||
return m_pFileStream->WriteBytes(m_pBuffer, m_aHeader.db_slng) > 0;
|
||||
}
|
||||
|
||||
@@ -862,7 +862,7 @@ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage)
|
||||
SvStream& connectivity::dbase::WriteONDXPage(SvStream &rStream, const ONDXPage& rPage)
|
||||
{
|
||||
// Page doesn't exist yet
|
||||
sal_Size nSize = rPage.GetPagePos() + 1;
|
||||
std::size_t nSize = rPage.GetPagePos() + 1;
|
||||
nSize *= DINDEX_PAGE_SIZE;
|
||||
if (nSize > rStream.Seek(STREAM_SEEK_TO_END))
|
||||
{
|
||||
@@ -886,9 +886,9 @@ SvStream& connectivity::dbase::WriteONDXPage(SvStream &rStream, const ONDXPage&
|
||||
// check if we have to fill the stream with '\0'
|
||||
if(i < rPage.rIndex.getHeader().db_maxkeys)
|
||||
{
|
||||
sal_Size nTell = rStream.Tell() % DINDEX_PAGE_SIZE;
|
||||
std::size_t nTell = rStream.Tell() % DINDEX_PAGE_SIZE;
|
||||
sal_uInt16 nBufferSize = rStream.GetBufferSize();
|
||||
sal_Size nRemainSize = nBufferSize - nTell;
|
||||
std::size_t nRemainSize = nBufferSize - nTell;
|
||||
if ( nRemainSize <= nBufferSize )
|
||||
{
|
||||
std::unique_ptr<char[]> pEmptyData( new char[nRemainSize] );
|
||||
|
||||
@@ -106,9 +106,9 @@ namespace connectivity
|
||||
bool CreateMemoFile(const INetURLObject& aFile);
|
||||
bool HasMemoFields() const { return m_aHeader.db_typ > dBaseIV;}
|
||||
bool ReadMemoHeader();
|
||||
bool ReadMemo(sal_Size nBlockNo, ORowSetValue& aVariable);
|
||||
bool ReadMemo(std::size_t nBlockNo, ORowSetValue& aVariable);
|
||||
|
||||
bool WriteMemo(const ORowSetValue& aVariable, sal_Size& rBlockNr);
|
||||
bool WriteMemo(const ORowSetValue& aVariable, std::size_t& rBlockNr);
|
||||
bool WriteBuffer();
|
||||
bool UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRow, const css::uno::Reference< css::container::XIndexAccess>& _xCols, bool bForceAllFields);
|
||||
css::uno::Reference< css::beans::XPropertySet> isUniqueByColumnName(sal_Int32 _nColumnPos);
|
||||
|
||||
@@ -584,7 +584,7 @@ namespace cppcanvas
|
||||
s.ReadInt32( pathLength );
|
||||
SAL_INFO("cppcanvas.emf", "EMF+\tpath length: " << pathLength);
|
||||
|
||||
sal_Size pos = s.Tell ();
|
||||
sal_uInt64 const pos = s.Tell ();
|
||||
|
||||
sal_uInt32 pathHeader;
|
||||
sal_Int32 pathPoints, pathFlags;
|
||||
@@ -1068,7 +1068,7 @@ namespace cppcanvas
|
||||
{
|
||||
s.ReadInt32( customStartCapLen );
|
||||
SAL_INFO("cppcanvas.emf", "EMF+\t\tcustomStartCapLen: " << customStartCapLen);
|
||||
sal_Size pos = s.Tell();
|
||||
sal_uInt64 const pos = s.Tell();
|
||||
|
||||
customStartCap = new EMFPCustomLineCap();
|
||||
customStartCap->Read(s, rR);
|
||||
@@ -1083,7 +1083,7 @@ namespace cppcanvas
|
||||
{
|
||||
s.ReadInt32( customEndCapLen );
|
||||
SAL_INFO("cppcanvas.emf", "EMF+\t\tcustomEndCapLen: " << customEndCapLen);
|
||||
sal_Size pos = s.Tell();
|
||||
sal_uInt64 const pos = s.Tell();
|
||||
|
||||
customEndCap = new EMFPCustomLineCap();
|
||||
customEndCap->Read(s, rR);
|
||||
@@ -1822,7 +1822,7 @@ namespace cppcanvas
|
||||
while (length >= 12) {
|
||||
sal_uInt16 type, flags;
|
||||
sal_uInt32 size, dataSize;
|
||||
sal_Size next;
|
||||
sal_uInt64 next;
|
||||
|
||||
rMF.ReadUInt16( type ).ReadUInt16( flags ).ReadUInt32( size ).ReadUInt32( dataSize );
|
||||
|
||||
|
||||
@@ -361,9 +361,9 @@ struct uno_ThreadPool_Equal
|
||||
|
||||
struct uno_ThreadPool_Hash
|
||||
{
|
||||
sal_Size operator () ( const uno_ThreadPool &a ) const
|
||||
std::size_t operator () ( const uno_ThreadPool &a ) const
|
||||
{
|
||||
return reinterpret_cast<sal_Size>( a );
|
||||
return reinterpret_cast<std::size_t>( a );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace cppu
|
||||
|
||||
|
||||
static inline uno_Sequence * reallocSeq(
|
||||
uno_Sequence * pReallocate, sal_Size nElementSize, sal_Int32 nElements )
|
||||
uno_Sequence * pReallocate, std::size_t nElementSize, sal_Int32 nElements )
|
||||
{
|
||||
OSL_ASSERT( nElements >= 0 );
|
||||
uno_Sequence * pNew = nullptr;
|
||||
|
||||
@@ -148,7 +148,7 @@ void OHTMLReader::NextToken( int nToken )
|
||||
case HTML_THEAD_ON:
|
||||
case HTML_TBODY_ON:
|
||||
{
|
||||
sal_Size nTell = rInput.Tell(); // perhaps alters position of the stream
|
||||
sal_uInt64 const nTell = rInput.Tell(); // perhaps alters position of the stream
|
||||
if ( !m_xTable.is() )
|
||||
{// use first line as header
|
||||
m_bError = !CreateTable(nToken);
|
||||
|
||||
@@ -140,7 +140,7 @@ void ORTFReader::NextToken( int nToken )
|
||||
bool bInsertRow = true;
|
||||
if ( !m_xTable.is() ) // use first line as header
|
||||
{
|
||||
sal_Size nTell = rInput.Tell(); // perhaps alters position of the stream
|
||||
sal_uInt64 const nTell = rInput.Tell(); // perhaps alters position of the stream
|
||||
|
||||
m_bError = !CreateTable(nToken);
|
||||
bInsertRow = m_bAppendFirstLine;
|
||||
|
||||
@@ -482,7 +482,7 @@ void OWizTypeSelect::fillColumnList(sal_uInt32 nRows)
|
||||
{
|
||||
if(m_pParserStream)
|
||||
{
|
||||
sal_Size nTell = m_pParserStream->Tell(); // might change seek position of stream
|
||||
sal_uInt64 const nTell = m_pParserStream->Tell(); // might change seek position of stream
|
||||
|
||||
SvParser *pReader = createReader(nRows);
|
||||
if(pReader)
|
||||
|
||||
@@ -108,7 +108,7 @@ const OUString OfficePipeId::operator () ()
|
||||
|
||||
sal_uInt8 const * data =
|
||||
reinterpret_cast<sal_uInt8 const *>(userPath.getStr());
|
||||
sal_Size size = (userPath.getLength() * sizeof (sal_Unicode));
|
||||
std::size_t size = (userPath.getLength() * sizeof (sal_Unicode));
|
||||
sal_uInt32 md5_key_len = rtl_digest_queryLength( digest );
|
||||
std::unique_ptr<sal_uInt8[]> md5_buf( new sal_uInt8 [ md5_key_len ] );
|
||||
|
||||
|
||||
@@ -602,7 +602,7 @@ OUString replaceOrigin(
|
||||
OString origin;
|
||||
sal_Char const * pBytes = reinterpret_cast<sal_Char const *>(
|
||||
bytes.data());
|
||||
sal_Size nBytes = bytes.size();
|
||||
std::size_t nBytes = bytes.size();
|
||||
size_t write_pos = 0;
|
||||
while (nBytes > 0)
|
||||
{
|
||||
|
||||
@@ -119,8 +119,8 @@ bool IsUserWordbook( const OUString& rFile )
|
||||
if ( pStream && !pStream->GetError() )
|
||||
{
|
||||
static const sal_Char* pVerOOo7 = "OOoUserDict1";
|
||||
sal_Size nSniffPos = pStream->Tell();
|
||||
static sal_Size nVerOOo7Len = sal::static_int_cast< sal_Size >(strlen( pVerOOo7 ));
|
||||
sal_uInt64 const nSniffPos = pStream->Tell();
|
||||
static std::size_t nVerOOo7Len = sal::static_int_cast< std::size_t >(strlen( pVerOOo7 ));
|
||||
sal_Char pMagicHeader[MAX_HEADER_LENGTH];
|
||||
pMagicHeader[ nVerOOo7Len ] = '\0';
|
||||
if ((pStream->ReadBytes(static_cast<void *>(pMagicHeader), nVerOOo7Len) == nVerOOo7Len))
|
||||
|
||||
@@ -371,7 +371,7 @@ void EditTextObject::Store( SvStream& rOStream ) const
|
||||
if ( rOStream.GetError() )
|
||||
return;
|
||||
|
||||
sal_Size nStartPos = rOStream.Tell();
|
||||
sal_uInt64 const nStartPos = rOStream.Tell();
|
||||
|
||||
sal_uInt16 nWhich = static_cast<sal_uInt16>(EE_FORMAT_BIN);
|
||||
rOStream.WriteUInt16( nWhich );
|
||||
@@ -381,7 +381,7 @@ void EditTextObject::Store( SvStream& rOStream ) const
|
||||
|
||||
StoreData( rOStream );
|
||||
|
||||
sal_Size nEndPos = rOStream.Tell();
|
||||
sal_uInt64 const nEndPos = rOStream.Tell();
|
||||
nStructSz = nEndPos - nStartPos - sizeof( nWhich ) - sizeof( nStructSz );
|
||||
rOStream.Seek( nStartPos + sizeof( nWhich ) );
|
||||
rOStream.WriteUInt32( nStructSz );
|
||||
@@ -390,7 +390,7 @@ void EditTextObject::Store( SvStream& rOStream ) const
|
||||
|
||||
EditTextObject* EditTextObject::Create( SvStream& rIStream )
|
||||
{
|
||||
sal_Size nStartPos = rIStream.Tell();
|
||||
sal_uInt64 const nStartPos = rIStream.Tell();
|
||||
|
||||
// First check what type of Object...
|
||||
sal_uInt16 nWhich;
|
||||
@@ -413,7 +413,7 @@ EditTextObject* EditTextObject::Create( SvStream& rIStream )
|
||||
pTxtObj->CreateData(rIStream);
|
||||
|
||||
// Make sure that the stream is left at the correct place.
|
||||
sal_Size nFullSz = sizeof( nWhich ) + sizeof( nStructSz ) + nStructSz;
|
||||
std::size_t nFullSz = sizeof( nWhich ) + sizeof( nStructSz ) + nStructSz;
|
||||
rIStream.Seek( nStartPos + nFullSz );
|
||||
return pTxtObj;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,8 @@ uno::Any EditDataObject::getTransferData( const datatransfer::DataFlavor& rFlavo
|
||||
|
||||
SvMemoryStream* pStream = ( nT == SotClipboardFormatId::EDITENGINE ) ? &GetStream() : &GetRTFStream();
|
||||
pStream->Seek( STREAM_SEEK_TO_END );
|
||||
sal_Size nLen = pStream->Tell();
|
||||
sal_Int32 nLen = pStream->Tell();
|
||||
if (nLen < 0) { abort(); }
|
||||
pStream->Seek(0);
|
||||
|
||||
uno::Sequence< sal_Int8 > aSeq( nLen );
|
||||
|
||||
@@ -116,7 +116,7 @@ SvxBulletItem::SvxBulletItem( SvStream& rStrm, sal_uInt16 _nWhich )
|
||||
{
|
||||
// Safe Load with Test on empty Bitmap
|
||||
Bitmap aBmp;
|
||||
const sal_Size nOldPos = rStrm.Tell();
|
||||
sal_uInt64 const nOldPos = rStrm.Tell();
|
||||
// Ignore Errorcode when reading Bitmap,
|
||||
// see comment in SvxBulletItem::Store()
|
||||
bool bOldError = rStrm.GetError() != 0;
|
||||
@@ -288,7 +288,7 @@ SvStream& SvxBulletItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) c
|
||||
StoreFont( rStrm, aFont );
|
||||
else
|
||||
{
|
||||
sal_Size _nStart = rStrm.Tell();
|
||||
sal_uInt64 const _nStart = rStrm.Tell();
|
||||
|
||||
// Small preliminary estimate of the size ...
|
||||
sal_uInt16 nFac = ( rStrm.GetCompressMode() != SvStreamCompressFlags::NONE ) ? 3 : 1;
|
||||
@@ -299,7 +299,7 @@ SvStream& SvxBulletItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) c
|
||||
WriteDIB(aBmp, rStrm, false, true);
|
||||
}
|
||||
|
||||
sal_Size nEnd = rStrm.Tell();
|
||||
sal_uInt64 const nEnd = rStrm.Tell();
|
||||
// Item can not write with an overhead more than 64K or SfxMultiRecord
|
||||
// will crash. Then prefer to forego on the bitmap, it is only
|
||||
// important for the outliner and only for <= 5.0.
|
||||
|
||||
@@ -745,7 +745,7 @@ SfxPoolItem* SvxLRSpaceItem::Create( SvStream& rStrm, sal_uInt16 nVersion ) cons
|
||||
{
|
||||
rStrm.ReadUInt16( left ).ReadUInt16( prpleft ).ReadUInt16( right ).ReadUInt16( prpright ).ReadInt16( firstline ). ReadUInt16( prpfirstline ).ReadUInt16( txtleft ).ReadSChar( autofirst );
|
||||
|
||||
sal_Size nPos = rStrm.Tell();
|
||||
sal_uInt64 const nPos = rStrm.Tell();
|
||||
sal_uInt32 nMarker;
|
||||
rStrm.ReadUInt32( nMarker );
|
||||
if ( nMarker == BULLETLR_MARKER )
|
||||
|
||||
@@ -400,7 +400,7 @@ SfxPoolItem* SvxFontItem::Create(SvStream& rStrm, sal_uInt16) const
|
||||
eFontTextEncoding = RTL_TEXTENCODING_SYMBOL;
|
||||
|
||||
// Check if we have stored unicode
|
||||
sal_Size nStreamPos = rStrm.Tell();
|
||||
sal_uInt64 const nStreamPos = rStrm.Tell();
|
||||
sal_uInt32 nMagic = STORE_UNICODE_MAGIC_MARKER;
|
||||
rStrm.ReadUInt32( nMagic );
|
||||
if ( nMagic == STORE_UNICODE_MAGIC_MARKER )
|
||||
|
||||
@@ -316,7 +316,7 @@ static bool RenderAsBMPThroughHelper(const sal_uInt8* pBuf, sal_uInt32 nBytesRea
|
||||
oslFileError eFileErr = osl_readFile(pOut, aBuf, 32000, &nCount);
|
||||
while (eFileErr == osl_File_E_None && nCount)
|
||||
{
|
||||
aMemStm.WriteBytes(aBuf, sal::static_int_cast< sal_Size >(nCount));
|
||||
aMemStm.WriteBytes(aBuf, sal::static_int_cast<std::size_t>(nCount));
|
||||
eFileErr = osl_readFile(pOut, aBuf, 32000, &nCount);
|
||||
}
|
||||
|
||||
|
||||
@@ -1297,7 +1297,7 @@ bool DffPropSet::GetPropertyBool( sal_uInt32 nId ) const
|
||||
|
||||
OUString DffPropSet::GetPropertyString( sal_uInt32 nId, SvStream& rStrm ) const
|
||||
{
|
||||
sal_Size nOldPos = rStrm.Tell();
|
||||
sal_uInt64 const nOldPos = rStrm.Tell();
|
||||
OUStringBuffer aBuffer;
|
||||
sal_uInt32 nBufferSize = GetPropertyValue( nId, 0 );
|
||||
if( (nBufferSize > 0) && SeekToContent( nId, rStrm ) )
|
||||
|
||||
@@ -4946,8 +4946,8 @@ SvStream* EscherExGlobal::ImplQueryPictureStream()
|
||||
class SvNullStream : public SvStream
|
||||
{
|
||||
protected:
|
||||
virtual sal_Size GetData( void* pData, sal_Size nSize ) override { memset( pData, 0, nSize ); return nSize; }
|
||||
virtual sal_Size PutData( const void*, sal_Size nSize ) override { return nSize; }
|
||||
virtual std::size_t GetData( void* pData, std::size_t nSize ) override { memset( pData, 0, nSize ); return nSize; }
|
||||
virtual std::size_t PutData( const void*, std::size_t nSize ) override { return nSize; }
|
||||
virtual sal_uInt64 SeekPos( sal_uInt64 nPos ) override { return nPos; }
|
||||
virtual void SetSize( sal_uInt64 ) override {}
|
||||
virtual void FlushData() override {}
|
||||
|
||||
@@ -60,23 +60,23 @@ inline void lclRotateLeft( Type& rnValue, sal_uInt8 nBits, sal_uInt8 nWidth )
|
||||
((rnValue << nBits) | ((rnValue & nMask) >> (nWidth - nBits))) & nMask );
|
||||
}
|
||||
|
||||
sal_Size lclGetLen( const sal_uInt8* pnPassData, sal_Size nBufferSize )
|
||||
std::size_t lclGetLen( const sal_uInt8* pnPassData, std::size_t nBufferSize )
|
||||
{
|
||||
sal_Size nLen = 0;
|
||||
std::size_t nLen = 0;
|
||||
while( (nLen < nBufferSize) && pnPassData[ nLen ] ) ++nLen;
|
||||
return nLen;
|
||||
}
|
||||
|
||||
sal_uInt16 lclGetKey( const sal_uInt8* pnPassData, sal_Size nBufferSize )
|
||||
sal_uInt16 lclGetKey( const sal_uInt8* pnPassData, std::size_t nBufferSize )
|
||||
{
|
||||
sal_Size nLen = lclGetLen( pnPassData, nBufferSize );
|
||||
std::size_t nLen = lclGetLen( pnPassData, nBufferSize );
|
||||
if( !nLen ) return 0;
|
||||
|
||||
sal_uInt16 nKey = 0;
|
||||
sal_uInt16 nKeyBase = 0x8000;
|
||||
sal_uInt16 nKeyEnd = 0xFFFF;
|
||||
const sal_uInt8* pnChar = pnPassData + nLen - 1;
|
||||
for( sal_Size nIndex = 0; nIndex < nLen; ++nIndex, --pnChar )
|
||||
for( std::size_t nIndex = 0; nIndex < nLen; ++nIndex, --pnChar )
|
||||
{
|
||||
sal_uInt8 cChar = *pnChar & 0x7F;
|
||||
for( sal_uInt8 nBit = 0; nBit < 8; ++nBit )
|
||||
@@ -92,16 +92,16 @@ sal_uInt16 lclGetKey( const sal_uInt8* pnPassData, sal_Size nBufferSize )
|
||||
return nKey ^ nKeyEnd;
|
||||
}
|
||||
|
||||
sal_uInt16 lclGetHash( const sal_uInt8* pnPassData, sal_Size nBufferSize )
|
||||
sal_uInt16 lclGetHash( const sal_uInt8* pnPassData, std::size_t nBufferSize )
|
||||
{
|
||||
sal_Size nLen = lclGetLen( pnPassData, nBufferSize );
|
||||
std::size_t nLen = lclGetLen( pnPassData, nBufferSize );
|
||||
|
||||
sal_uInt16 nHash = static_cast< sal_uInt16 >( nLen );
|
||||
if( nLen )
|
||||
nHash ^= 0xCE4B;
|
||||
|
||||
const sal_uInt8* pnChar = pnPassData;
|
||||
for( sal_Size nIndex = 0; nIndex < nLen; ++nIndex, ++pnChar )
|
||||
for( std::size_t nIndex = 0; nIndex < nLen; ++nIndex, ++pnChar )
|
||||
{
|
||||
sal_uInt16 cChar = *pnChar;
|
||||
sal_uInt8 nRot = static_cast< sal_uInt8 >( (nIndex + 1) % 15 );
|
||||
@@ -145,8 +145,8 @@ void MSCodec_Xor95::InitKey( const sal_uInt8 pnPassData[ 16 ] )
|
||||
0xBF, 0x0F, 0x00, 0x00
|
||||
};
|
||||
|
||||
sal_Size nIndex;
|
||||
sal_Size nLen = lclGetLen( pnPassData, 16 );
|
||||
std::size_t nIndex;
|
||||
std::size_t nLen = lclGetLen( pnPassData, 16 );
|
||||
const sal_uInt8* pnFillChar = spnFillChars;
|
||||
for( nIndex = nLen; nIndex < sizeof( mpnKey ); ++nIndex, ++pnFillChar )
|
||||
mpnKey[ nIndex ] = *pnFillChar;
|
||||
@@ -202,7 +202,7 @@ void MSCodec_Xor95::InitCipher()
|
||||
mnOffset = 0;
|
||||
}
|
||||
|
||||
void MSCodec_XorXLS95::Decode( sal_uInt8* pnData, sal_Size nBytes )
|
||||
void MSCodec_XorXLS95::Decode( sal_uInt8* pnData, std::size_t nBytes )
|
||||
{
|
||||
const sal_uInt8* pnCurrKey = mpnKey + mnOffset;
|
||||
const sal_uInt8* pnKeyLast = mpnKey + 0x0F;
|
||||
@@ -218,7 +218,7 @@ void MSCodec_XorXLS95::Decode( sal_uInt8* pnData, sal_Size nBytes )
|
||||
Skip( nBytes );
|
||||
}
|
||||
|
||||
void MSCodec_XorWord95::Decode( sal_uInt8* pnData, sal_Size nBytes )
|
||||
void MSCodec_XorWord95::Decode( sal_uInt8* pnData, std::size_t nBytes )
|
||||
{
|
||||
const sal_uInt8* pnCurrKey = mpnKey + mnOffset;
|
||||
const sal_uInt8* pnKeyLast = mpnKey + 0x0F;
|
||||
@@ -240,7 +240,7 @@ void MSCodec_XorWord95::Decode( sal_uInt8* pnData, sal_Size nBytes )
|
||||
}
|
||||
|
||||
|
||||
void MSCodec_Xor95::Skip( sal_Size nBytes )
|
||||
void MSCodec_Xor95::Skip( std::size_t nBytes )
|
||||
{
|
||||
mnOffset = (mnOffset + nBytes) & 0x0F;
|
||||
}
|
||||
@@ -432,8 +432,8 @@ void MSCodec_Std97::CreateSaltDigest( const sal_uInt8 nSaltData[16], sal_uInt8 n
|
||||
}
|
||||
|
||||
bool MSCodec_Std97::Encode (
|
||||
const void *pData, sal_Size nDatLen,
|
||||
sal_uInt8 *pBuffer, sal_Size nBufLen)
|
||||
const void *pData, std::size_t nDatLen,
|
||||
sal_uInt8 *pBuffer, std::size_t nBufLen)
|
||||
{
|
||||
rtlCipherError result;
|
||||
|
||||
@@ -444,8 +444,8 @@ bool MSCodec_Std97::Encode (
|
||||
}
|
||||
|
||||
bool MSCodec_Std97::Decode (
|
||||
const void *pData, sal_Size nDatLen,
|
||||
sal_uInt8 *pBuffer, sal_Size nBufLen)
|
||||
const void *pData, std::size_t nDatLen,
|
||||
sal_uInt8 *pBuffer, std::size_t nBufLen)
|
||||
{
|
||||
rtlCipherError result;
|
||||
|
||||
@@ -455,15 +455,15 @@ bool MSCodec_Std97::Decode (
|
||||
return (result == rtl_Cipher_E_None);
|
||||
}
|
||||
|
||||
bool MSCodec_Std97::Skip( sal_Size nDatLen )
|
||||
bool MSCodec_Std97::Skip( std::size_t nDatLen )
|
||||
{
|
||||
sal_uInt8 pnDummy[ 1024 ];
|
||||
sal_Size nDatLeft = nDatLen;
|
||||
std::size_t nDatLeft = nDatLen;
|
||||
bool bResult = true;
|
||||
|
||||
while (bResult && nDatLeft)
|
||||
{
|
||||
sal_Size nBlockLen = ::std::min< sal_Size >( nDatLeft, sizeof(pnDummy) );
|
||||
std::size_t nBlockLen = ::std::min< std::size_t >( nDatLeft, sizeof(pnDummy) );
|
||||
bResult = Decode( pnDummy, nBlockLen, pnDummy, nBlockLen );
|
||||
nDatLeft -= nBlockLen;
|
||||
}
|
||||
|
||||
@@ -2215,7 +2215,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
|
||||
sal_uInt16 nElemSizeSeg = 2;
|
||||
rIn.ReadUInt16( nNumElemSeg ).ReadUInt16( nNumElemMemSeg ).ReadUInt16( nElemSizeSeg );
|
||||
}
|
||||
sal_Size nMaxEntriesPossible = rIn.remainingSize() / sizeof(sal_uInt16);
|
||||
std::size_t nMaxEntriesPossible = rIn.remainingSize() / sizeof(sal_uInt16);
|
||||
if (nNumElemSeg > nMaxEntriesPossible)
|
||||
{
|
||||
SAL_WARN("filter.ms", "NumElem list is longer than remaining bytes, ppt or parser is wrong");
|
||||
@@ -5724,13 +5724,13 @@ void SvxMSDffManager::GetFidclData( sal_uInt32 nOffsDggL )
|
||||
|
||||
if ( mnIdClusters-- > 2 )
|
||||
{
|
||||
const sal_Size nFIDCLsize = sizeof(sal_uInt32) * 2;
|
||||
const std::size_t nFIDCLsize = sizeof(sal_uInt32) * 2;
|
||||
if ( aDggAtomHd.nRecLen == ( mnIdClusters * nFIDCLsize + 16 ) )
|
||||
{
|
||||
sal_Size nMaxEntriesPossible = rStCtrl.remainingSize() / nFIDCLsize;
|
||||
std::size_t nMaxEntriesPossible = rStCtrl.remainingSize() / nFIDCLsize;
|
||||
SAL_WARN_IF(nMaxEntriesPossible < mnIdClusters,
|
||||
"filter.ms", "FIDCL list longer than remaining bytes, ppt or parser is wrong");
|
||||
mnIdClusters = std::min(nMaxEntriesPossible, static_cast<sal_Size>(mnIdClusters));
|
||||
mnIdClusters = std::min(nMaxEntriesPossible, static_cast<std::size_t>(mnIdClusters));
|
||||
|
||||
maFidcls.resize(mnIdClusters);
|
||||
for (sal_uInt32 i = 0; i < mnIdClusters; ++i)
|
||||
|
||||
@@ -55,7 +55,7 @@ struct GradientStop
|
||||
struct Gradient
|
||||
{
|
||||
enum GradientType { LINEAR, RADIAL};
|
||||
std::vector<sal_Size> maStops;
|
||||
std::vector<std::size_t> maStops;
|
||||
basegfx::B2DHomMatrix maTransform;
|
||||
GradientType meType;
|
||||
union
|
||||
|
||||
@@ -151,7 +151,7 @@ bool PolyPolygonIsMixedOpenAndClosed( const basegfx::B2DPolyPolygon& rPoly )
|
||||
return bRetval;
|
||||
}
|
||||
|
||||
typedef std::map<OUString,sal_Size> ElementRefMapType;
|
||||
typedef std::map<OUString,std::size_t> ElementRefMapType;
|
||||
|
||||
struct AnnotatingVisitor
|
||||
{
|
||||
@@ -499,7 +499,7 @@ struct AnnotatingVisitor
|
||||
mrStopVec(rStopVec)
|
||||
{}
|
||||
|
||||
bool operator()( sal_Size rLHS, sal_Size rRHS )
|
||||
bool operator()( std::size_t rLHS, std::size_t rRHS )
|
||||
{
|
||||
return mrStopVec[rLHS].mnStopPosition < mrStopVec[rRHS].mnStopPosition;
|
||||
}
|
||||
@@ -517,8 +517,8 @@ struct AnnotatingVisitor
|
||||
return; //easy! :-)
|
||||
|
||||
// join similar colors
|
||||
std::vector<sal_Size> aNewStops { rGradient.maStops.front() };
|
||||
for( sal_Size i=1; i<rGradient.maStops.size(); ++i )
|
||||
std::vector<std::size_t> aNewStops { rGradient.maStops.front() };
|
||||
for( std::size_t i=1; i<rGradient.maStops.size(); ++i )
|
||||
{
|
||||
if( maGradientStopVector[rGradient.maStops[i]].maStopColor !=
|
||||
maGradientStopVector[aNewStops.back()].maStopColor )
|
||||
@@ -545,9 +545,9 @@ struct AnnotatingVisitor
|
||||
// those two stops around this border (metric is
|
||||
// super-simplistic: take euclidean distance of colors, weigh
|
||||
// with stop distance)
|
||||
sal_Size nMaxIndex=0;
|
||||
std::size_t nMaxIndex=0;
|
||||
double fMaxDistance=0.0;
|
||||
for( sal_Size i=1; i<rGradient.maStops.size(); ++i )
|
||||
for( std::size_t i=1; i<rGradient.maStops.size(); ++i )
|
||||
{
|
||||
const double fCurrDistance(
|
||||
colorDiffSquared(
|
||||
|
||||
@@ -46,7 +46,7 @@ bool IsHTMLStream( const uno::Reference<io::XInputStream>& xInStream )
|
||||
|
||||
// Read the stream header
|
||||
pInStream->StartReadingUnicodeText( RTL_TEXTENCODING_DONTKNOW );
|
||||
const sal_Size nUniPos = pInStream->Tell();
|
||||
const sal_uInt64 nUniPos = pInStream->Tell();
|
||||
const sal_uInt16 nSize = 4096;
|
||||
|
||||
OString sHeader;
|
||||
|
||||
@@ -95,7 +95,7 @@ OUString SAL_CALL FilterDetect::detect( css::uno::Sequence< css::beans::Property
|
||||
|
||||
std::unique_ptr< SvStream > pInStream( ::utl::UcbStreamHelper::CreateStream( xInStream ) );
|
||||
pInStream->StartReadingUnicodeText( RTL_TEXTENCODING_DONTKNOW );
|
||||
sal_Size nUniPos = pInStream->Tell();
|
||||
sal_uInt64 const nUniPos = pInStream->Tell();
|
||||
|
||||
const sal_uInt16 nSize = 4000;
|
||||
bool bTryUtf16 = false;
|
||||
|
||||
@@ -44,8 +44,8 @@ public:
|
||||
explicit ImgProdLockBytes( css::uno::Reference< css::io::XInputStream > & rStreamRef );
|
||||
virtual ~ImgProdLockBytes() override;
|
||||
|
||||
virtual ErrCode ReadAt( sal_uInt64 nPos, void* pBuffer, sal_Size nCount, sal_Size * pRead ) const override;
|
||||
virtual ErrCode WriteAt( sal_uInt64 nPos, const void* pBuffer, sal_Size nCount, sal_Size * pWritten ) override;
|
||||
virtual ErrCode ReadAt( sal_uInt64 nPos, void* pBuffer, std::size_t nCount, std::size_t * pRead ) const override;
|
||||
virtual ErrCode WriteAt( sal_uInt64 nPos, const void* pBuffer, std::size_t nCount, std::size_t * pWritten ) override;
|
||||
virtual ErrCode Flush() const override;
|
||||
virtual ErrCode SetSize( sal_uInt64 nSize ) override;
|
||||
virtual ErrCode Stat( SvLockBytesStat*, SvLockBytesStatFlag ) const override;
|
||||
@@ -90,7 +90,7 @@ ImgProdLockBytes::~ImgProdLockBytes()
|
||||
|
||||
|
||||
ErrCode ImgProdLockBytes::ReadAt(sal_uInt64 const nPos,
|
||||
void* pBuffer, sal_Size nCount, sal_Size * pRead) const
|
||||
void* pBuffer, std::size_t nCount, std::size_t * pRead) const
|
||||
{
|
||||
if( GetStream() )
|
||||
{
|
||||
@@ -101,7 +101,7 @@ ErrCode ImgProdLockBytes::ReadAt(sal_uInt64 const nPos,
|
||||
}
|
||||
else
|
||||
{
|
||||
const sal_Size nSeqLen = maSeq.getLength();
|
||||
const std::size_t nSeqLen = maSeq.getLength();
|
||||
ErrCode nErr = ERRCODE_NONE;
|
||||
|
||||
if( nPos < nSeqLen )
|
||||
@@ -121,7 +121,7 @@ ErrCode ImgProdLockBytes::ReadAt(sal_uInt64 const nPos,
|
||||
|
||||
|
||||
ErrCode ImgProdLockBytes::WriteAt(sal_uInt64 const nPos,
|
||||
const void* pBuffer, sal_Size nCount, sal_Size * pWritten)
|
||||
const void* pBuffer, std::size_t nCount, std::size_t * pWritten)
|
||||
{
|
||||
if( GetStream() )
|
||||
return SvLockBytes::WriteAt( nPos, pBuffer, nCount, pWritten );
|
||||
|
||||
@@ -124,7 +124,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportHWP(const OUString &rURL
|
||||
SvFileStream aFileStream(rURL, StreamMode::READ);
|
||||
std::unique_ptr<HStream> stream(new HStream);
|
||||
byte aData[32768];
|
||||
sal_Size nRead, nBlock = 32768;
|
||||
std::size_t nRead, nBlock = 32768;
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
||||
@@ -44,12 +44,12 @@ public:
|
||||
{ return nFilePos + DFF_COMMON_RECORD_HEADER_SIZE + nRecLen; }
|
||||
bool SeekToEndOfRecord(SvStream& rIn) const
|
||||
{
|
||||
sal_Size nPos = nFilePos + DFF_COMMON_RECORD_HEADER_SIZE + nRecLen;
|
||||
sal_uInt64 const nPos = nFilePos + DFF_COMMON_RECORD_HEADER_SIZE + nRecLen;
|
||||
return nPos == rIn.Seek(nPos);
|
||||
}
|
||||
bool SeekToContent(SvStream& rIn) const
|
||||
{
|
||||
sal_Size nPos = nFilePos + DFF_COMMON_RECORD_HEADER_SIZE;
|
||||
sal_uInt64 const nPos = nFilePos + DFF_COMMON_RECORD_HEADER_SIZE;
|
||||
return nPos == rIn.Seek(nPos);
|
||||
}
|
||||
bool SeekToBegOfRecord(SvStream& rIn) const
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
@param nBytes
|
||||
Size of the passed data block.
|
||||
*/
|
||||
virtual void Decode( sal_uInt8* pnData, sal_Size nBytes )=0;
|
||||
virtual void Decode( sal_uInt8* pnData, std::size_t nBytes )=0;
|
||||
|
||||
/** Lets the cipher skip a specific amount of bytes.
|
||||
|
||||
@@ -117,11 +117,11 @@ public:
|
||||
@param nBytes
|
||||
Number of bytes to be skipped (cipher "seeks" forward).
|
||||
*/
|
||||
void Skip( sal_Size nBytes );
|
||||
void Skip( std::size_t nBytes );
|
||||
|
||||
protected:
|
||||
sal_uInt8 mpnKey[ 16 ]; /// Encryption key.
|
||||
sal_Size mnOffset; /// Key offset.
|
||||
std::size_t mnOffset; /// Key offset.
|
||||
|
||||
private:
|
||||
MSCodec_Xor95( const MSCodec_Xor95& ) = delete;
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
@param nBytes
|
||||
Size of the passed data block.
|
||||
*/
|
||||
virtual void Decode( sal_uInt8* pnData, sal_Size nBytes ) override;
|
||||
virtual void Decode( sal_uInt8* pnData, std::size_t nBytes ) override;
|
||||
};
|
||||
|
||||
/** Encodes and decodes data from protected MSO Word 95- documents.
|
||||
@@ -171,7 +171,7 @@ public:
|
||||
@param nBytes
|
||||
Size of the passed data block.
|
||||
*/
|
||||
virtual void Decode( sal_uInt8* pnData, sal_Size nBytes ) override;
|
||||
virtual void Decode( sal_uInt8* pnData, std::size_t nBytes ) override;
|
||||
};
|
||||
|
||||
|
||||
@@ -278,8 +278,8 @@ public:
|
||||
true = Encoding was successful (no error occurred).
|
||||
*/
|
||||
bool Encode(
|
||||
const void* pData, sal_Size nDatLen,
|
||||
sal_uInt8* pBuffer, sal_Size nBufLen );
|
||||
const void* pData, std::size_t nDatLen,
|
||||
sal_uInt8* pBuffer, std::size_t nBufLen );
|
||||
|
||||
/** Decodes a block of memory.
|
||||
|
||||
@@ -304,8 +304,8 @@ public:
|
||||
true = Decoding was successful (no error occurred).
|
||||
*/
|
||||
bool Decode(
|
||||
const void* pData, sal_Size nDatLen,
|
||||
sal_uInt8* pBuffer, sal_Size nBufLen );
|
||||
const void* pData, std::size_t nDatLen,
|
||||
sal_uInt8* pBuffer, std::size_t nBufLen );
|
||||
|
||||
/** Lets the cipher skip a specific amount of bytes.
|
||||
|
||||
@@ -319,7 +319,7 @@ public:
|
||||
@param nDatLen
|
||||
Number of bytes to be skipped (cipher "seeks" forward).
|
||||
*/
|
||||
bool Skip( sal_Size nDatLen );
|
||||
bool Skip( std::size_t nDatLen );
|
||||
|
||||
/** Gets salt data and salt digest.
|
||||
|
||||
|
||||
@@ -961,7 +961,7 @@ public:
|
||||
void writeChar( sal_Unicode cChar, sal_Int32 nCount = 1 );
|
||||
void writeAscii( const sal_Char* pcStr );
|
||||
void writeString( const OUString& rStr );
|
||||
void writeArray( const sal_uInt8* pnData, sal_Size nSize, sal_Unicode cSep = OOX_DUMP_LISTSEP );
|
||||
void writeArray( const sal_uInt8* pnData, std::size_t nSize, sal_Unicode cSep = OOX_DUMP_LISTSEP );
|
||||
void writeBool( bool bData );
|
||||
void writeDateTime( const css::util::DateTime& rDateTime );
|
||||
|
||||
@@ -1217,7 +1217,7 @@ protected:
|
||||
void writeInfoItem( const String& rName, const String& rData );
|
||||
void writeCharItem( const String& rName, sal_Unicode cData );
|
||||
void writeStringItem( const String& rName, const OUString& rData );
|
||||
void writeArrayItem( const String& rName, const sal_uInt8* pnData, sal_Size nSize, sal_Unicode cSep = OOX_DUMP_LISTSEP );
|
||||
void writeArrayItem( const String& rName, const sal_uInt8* pnData, std::size_t nSize, sal_Unicode cSep = OOX_DUMP_LISTSEP );
|
||||
void writeDateTimeItem( const String& rName, const css::util::DateTime& rDateTime );
|
||||
void writeGuidItem( const String& rName, const OUString& rGuid );
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ class VBACompressionChunk
|
||||
{
|
||||
public:
|
||||
|
||||
VBACompressionChunk(SvStream& rCompressedStream, const sal_uInt8* pData, sal_Size nChunkSize);
|
||||
VBACompressionChunk(SvStream& rCompressedStream, const sal_uInt8* pData, std::size_t nChunkSize);
|
||||
|
||||
void write();
|
||||
|
||||
@@ -63,7 +63,7 @@ private:
|
||||
sal_uInt8* mpCompressedChunkStream;
|
||||
|
||||
// same as DecompressedChunkEnd in the spec
|
||||
sal_Size mnChunkSize;
|
||||
std::size_t mnChunkSize;
|
||||
|
||||
// CompressedCurrent according to the spec
|
||||
sal_uInt64 mnCompressedCurrent;
|
||||
|
||||
@@ -38,8 +38,8 @@ class SOT_DLLPUBLIC SotStorageStream : virtual public SotObject, public SvStream
|
||||
friend class SotStorage;
|
||||
BaseStorageStream * pOwnStm; // pointer to the own stream
|
||||
protected:
|
||||
virtual sal_uLong GetData( void* pData, sal_uLong nSize ) override;
|
||||
virtual sal_uLong PutData( const void* pData, sal_uLong nSize ) override;
|
||||
virtual std::size_t GetData(void* pData, std::size_t nSize) override;
|
||||
virtual std::size_t PutData(const void* pData, std::size_t nSize) override;
|
||||
virtual sal_uInt64 SeekPos(sal_uInt64 nPos) override;
|
||||
virtual void FlushData() override;
|
||||
virtual ~SotStorageStream() override;
|
||||
|
||||
@@ -41,9 +41,9 @@ class SVL_DLLPUBLIC SvInputStream: public SvStream
|
||||
|
||||
SVL_DLLPRIVATE bool open();
|
||||
|
||||
SVL_DLLPRIVATE virtual sal_uLong GetData(void * pData, sal_uLong nSize) override;
|
||||
SVL_DLLPRIVATE virtual std::size_t GetData(void * pData, std::size_t nSize) override;
|
||||
|
||||
SVL_DLLPRIVATE virtual sal_uLong PutData(void const *, sal_uLong) override;
|
||||
SVL_DLLPRIVATE virtual std::size_t PutData(void const *, std::size_t) override;
|
||||
|
||||
SVL_DLLPRIVATE virtual sal_uInt64 SeekPos(sal_uInt64 nPos) override;
|
||||
|
||||
|
||||
@@ -33,9 +33,9 @@ class SVL_DLLPUBLIC SvOutputStream: public SvStream
|
||||
{
|
||||
css::uno::Reference< css::io::XOutputStream > m_xStream;
|
||||
|
||||
SVL_DLLPRIVATE virtual sal_uLong GetData(void *, sal_uLong) override;
|
||||
SVL_DLLPRIVATE virtual std::size_t GetData(void *, std::size_t) override;
|
||||
|
||||
SVL_DLLPRIVATE virtual sal_uLong PutData(void const * pData, sal_uLong nSize) override;
|
||||
SVL_DLLPRIVATE virtual std::size_t PutData(void const * pData, std::size_t nSize) override;
|
||||
|
||||
SVL_DLLPRIVATE virtual sal_uInt64 SeekPos(sal_uInt64) override;
|
||||
|
||||
|
||||
@@ -139,8 +139,8 @@ private:
|
||||
Index nStartIdx;
|
||||
const SvPersistStream * pRefStm;
|
||||
|
||||
virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize ) override;
|
||||
virtual sal_uIntPtr PutData( const void* pData, sal_uIntPtr nSize ) override;
|
||||
virtual std::size_t GetData(void* pData, std::size_t nSize) override;
|
||||
virtual std::size_t PutData(const void* pData, std::size_t nSize) override;
|
||||
virtual sal_uInt64 SeekPos(sal_uInt64 nPos) override;
|
||||
virtual void FlushData() override;
|
||||
|
||||
|
||||
+41
-41
@@ -93,7 +93,7 @@ enum LockType {};
|
||||
|
||||
struct SvLockBytesStat
|
||||
{
|
||||
sal_Size nSize;
|
||||
std::size_t nSize;
|
||||
|
||||
SvLockBytesStat() : nSize(0) {}
|
||||
};
|
||||
@@ -123,10 +123,10 @@ public:
|
||||
void SetSynchronMode(bool bTheSync = true) { m_bSync = bTheSync; }
|
||||
bool IsSynchronMode() const { return m_bSync; }
|
||||
|
||||
virtual ErrCode ReadAt(sal_uInt64 nPos, void * pBuffer, sal_Size nCount,
|
||||
sal_Size * pRead) const;
|
||||
virtual ErrCode WriteAt(sal_uInt64 nPos, const void * pBuffer, sal_Size nCount,
|
||||
sal_Size * pWritten);
|
||||
virtual ErrCode ReadAt(sal_uInt64 nPos, void * pBuffer, std::size_t nCount,
|
||||
std::size_t * pRead) const;
|
||||
virtual ErrCode WriteAt(sal_uInt64 nPos, const void * pBuffer, std::size_t nCount,
|
||||
std::size_t * pWritten);
|
||||
|
||||
virtual ErrCode Flush() const;
|
||||
|
||||
@@ -188,8 +188,8 @@ protected:
|
||||
StreamMode m_eStreamMode;
|
||||
bool m_isWritable;
|
||||
|
||||
virtual sal_Size GetData( void* pData, sal_Size nSize );
|
||||
virtual sal_Size PutData( const void* pData, sal_Size nSize );
|
||||
virtual std::size_t GetData( void* pData, std::size_t nSize );
|
||||
virtual std::size_t PutData( const void* pData, std::size_t nSize );
|
||||
virtual sal_uInt64 SeekPos( sal_uInt64 nPos );
|
||||
virtual void FlushData();
|
||||
virtual void SetSize(sal_uInt64 nSize);
|
||||
@@ -198,10 +198,10 @@ protected:
|
||||
void ClearBuffer();
|
||||
|
||||
// encrypt and write in blocks
|
||||
sal_Size CryptAndWriteBuffer( const void* pStart, sal_Size nLen );
|
||||
bool EncryptBuffer( void* pStart, sal_Size nLen );
|
||||
std::size_t CryptAndWriteBuffer( const void* pStart, std::size_t nLen );
|
||||
bool EncryptBuffer( void* pStart, std::size_t nLen );
|
||||
|
||||
void SyncSvStream( sal_Size nNewStreamPos ); ///< SvStream <- Medium
|
||||
void SyncSvStream( std::size_t nNewStreamPos ); ///< SvStream <- Medium
|
||||
void SyncSysStream(); ///< SvStream -> Medium
|
||||
|
||||
public:
|
||||
@@ -275,8 +275,8 @@ public:
|
||||
SvStream& WriteUInt32AsString( sal_uInt32 nUInt32 );
|
||||
SvStream& WriteInt32AsString( sal_Int32 nInt32 );
|
||||
|
||||
sal_Size ReadBytes( void* pData, sal_Size nSize );
|
||||
sal_Size WriteBytes( const void* pData, sal_Size nSize );
|
||||
std::size_t ReadBytes( void* pData, std::size_t nSize );
|
||||
std::size_t WriteBytes( const void* pData, std::size_t nSize );
|
||||
sal_uInt64 Seek( sal_uInt64 nPos );
|
||||
sal_uInt64 SeekRel( sal_Int64 nPos );
|
||||
sal_uInt64 Tell() const { return m_nBufFilePos + m_nBufActualPos; }
|
||||
@@ -435,11 +435,11 @@ TOOLS_DLLPUBLIC SvStream& endlub( SvStream& rStr );
|
||||
/// Attempt to read nUnits 8bit units to an OString, returned OString's
|
||||
/// length is number of units successfully read
|
||||
TOOLS_DLLPUBLIC OString read_uInt8s_ToOString(SvStream& rStrm,
|
||||
sal_Size nUnits);
|
||||
std::size_t nUnits);
|
||||
|
||||
/// Attempt to read nUnits 8bit units to an OUString
|
||||
inline OUString read_uInt8s_ToOUString(SvStream& rStrm,
|
||||
sal_Size nUnits, rtl_TextEncoding eEnc)
|
||||
std::size_t nUnits, rtl_TextEncoding eEnc)
|
||||
{
|
||||
return OStringToOUString(read_uInt8s_ToOString(rStrm, nUnits), eEnc);
|
||||
}
|
||||
@@ -447,7 +447,7 @@ inline OUString read_uInt8s_ToOUString(SvStream& rStrm,
|
||||
/// Attempt to read nUnits 16bit units to an OUString, returned
|
||||
/// OUString's length is number of units successfully read
|
||||
TOOLS_DLLPUBLIC OUString read_uInt16s_ToOUString(SvStream& rStrm,
|
||||
sal_Size nUnits);
|
||||
std::size_t nUnits);
|
||||
|
||||
/// Attempt to read a pascal-style length (of type prefix) prefixed sequence of
|
||||
/// 16bit units to an OUString, returned OString's length is number of
|
||||
@@ -468,10 +468,10 @@ inline OUString read_uInt32_lenPrefixed_uInt16s_ToOUString(SvStream& rStrm)
|
||||
|
||||
/// Attempt to write a prefixed sequence of nUnits 16bit units from an OUString,
|
||||
/// returned value is number of bytes written
|
||||
TOOLS_DLLPUBLIC sal_Size write_uInt16s_FromOUString(SvStream& rStrm,
|
||||
const OUString& rStr, sal_Size nUnits);
|
||||
TOOLS_DLLPUBLIC std::size_t write_uInt16s_FromOUString(SvStream& rStrm,
|
||||
const OUString& rStr, std::size_t nUnits);
|
||||
|
||||
inline sal_Size write_uInt16s_FromOUString(SvStream& rStrm,
|
||||
inline std::size_t write_uInt16s_FromOUString(SvStream& rStrm,
|
||||
const OUString& rStr)
|
||||
{
|
||||
return write_uInt16s_FromOUString(rStrm, rStr, rStr.getLength());
|
||||
@@ -480,13 +480,13 @@ inline sal_Size write_uInt16s_FromOUString(SvStream& rStrm,
|
||||
/// Attempt to write a pascal-style length (of type prefix) prefixed sequence
|
||||
/// of 16bit units from an OUString, returned value is number of bytes written
|
||||
/// (including byte-count of prefix)
|
||||
TOOLS_DLLPUBLIC sal_Size write_uInt32_lenPrefixed_uInt16s_FromOUString(SvStream& rStrm,
|
||||
TOOLS_DLLPUBLIC std::size_t write_uInt32_lenPrefixed_uInt16s_FromOUString(SvStream& rStrm,
|
||||
const OUString &rStr);
|
||||
|
||||
/// Attempt to write a pascal-style length (of type prefix) prefixed sequence
|
||||
/// of 16bit units from an OUString, returned value is number of bytes written
|
||||
/// (including byte-count of prefix)
|
||||
TOOLS_DLLPUBLIC sal_Size write_uInt16_lenPrefixed_uInt16s_FromOUString(SvStream& rStrm,
|
||||
TOOLS_DLLPUBLIC std::size_t write_uInt16_lenPrefixed_uInt16s_FromOUString(SvStream& rStrm,
|
||||
const OUString &rStr);
|
||||
|
||||
/// Attempt to read 8bit units to an OString until a zero terminator is
|
||||
@@ -533,13 +533,13 @@ inline OUString read_uInt8_lenPrefixed_uInt8s_ToOUString(SvStream& rStrm,
|
||||
|
||||
/// Attempt to write a prefixed sequence of nUnits 8bit units from an OString,
|
||||
/// returned value is number of bytes written
|
||||
inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const OString& rStr,
|
||||
sal_Size nUnits)
|
||||
inline std::size_t write_uInt8s_FromOString(SvStream& rStrm, const OString& rStr,
|
||||
std::size_t nUnits)
|
||||
{
|
||||
return rStrm.WriteBytes(rStr.getStr(), nUnits);
|
||||
}
|
||||
|
||||
inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const OString& rStr)
|
||||
inline std::size_t write_uInt8s_FromOString(SvStream& rStrm, const OString& rStr)
|
||||
{
|
||||
return write_uInt8s_FromOString(rStrm, rStr, rStr.getLength());
|
||||
}
|
||||
@@ -547,13 +547,13 @@ inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const OString& rStr)
|
||||
/// Attempt to write a pascal-style length (of type prefix) prefixed
|
||||
/// sequence of units from a string-type, returned value is number of bytes
|
||||
/// written (including byte-count of prefix)
|
||||
TOOLS_DLLPUBLIC sal_Size write_uInt16_lenPrefixed_uInt8s_FromOString(SvStream& rStrm,
|
||||
TOOLS_DLLPUBLIC std::size_t write_uInt16_lenPrefixed_uInt8s_FromOString(SvStream& rStrm,
|
||||
const OString &rStr);
|
||||
|
||||
/// Attempt to write a pascal-style length (of type prefix) prefixed sequence
|
||||
/// of 8bit units from an OUString, returned value is number of bytes written
|
||||
/// (including byte-count of prefix)
|
||||
inline sal_Size write_uInt16_lenPrefixed_uInt8s_FromOUString(SvStream& rStrm,
|
||||
inline std::size_t write_uInt16_lenPrefixed_uInt8s_FromOUString(SvStream& rStrm,
|
||||
const OUString &rStr,
|
||||
rtl_TextEncoding eEnc)
|
||||
{
|
||||
@@ -573,14 +573,14 @@ private:
|
||||
SvFileStream (const SvFileStream&) = delete;
|
||||
SvFileStream & operator= (const SvFileStream&) = delete;
|
||||
|
||||
bool LockRange( sal_Size nByteOffset, sal_Size nBytes );
|
||||
bool UnlockRange( sal_Size nByteOffset, sal_Size nBytes );
|
||||
bool LockRange( std::size_t nByteOffset, std::size_t nBytes );
|
||||
bool UnlockRange( std::size_t nByteOffset, std::size_t nBytes );
|
||||
bool LockFile();
|
||||
void UnlockFile();
|
||||
|
||||
protected:
|
||||
virtual sal_Size GetData( void* pData, sal_Size nSize ) override;
|
||||
virtual sal_Size PutData( const void* pData, sal_Size nSize ) override;
|
||||
virtual std::size_t GetData( void* pData, std::size_t nSize ) override;
|
||||
virtual std::size_t PutData( const void* pData, std::size_t nSize ) override;
|
||||
virtual sal_uInt64 SeekPos( sal_uInt64 nPos ) override;
|
||||
virtual void SetSize( sal_uInt64 nSize ) override;
|
||||
virtual void FlushData() override;
|
||||
@@ -608,22 +608,22 @@ class TOOLS_DLLPUBLIC SvMemoryStream : public SvStream
|
||||
SvMemoryStream & operator= (const SvMemoryStream&) = delete;
|
||||
|
||||
protected:
|
||||
sal_Size nSize;
|
||||
sal_Size nResize;
|
||||
sal_Size nPos;
|
||||
sal_Size nEndOfData;
|
||||
std::size_t nSize;
|
||||
std::size_t nResize;
|
||||
std::size_t nPos;
|
||||
std::size_t nEndOfData;
|
||||
sal_uInt8* pBuf;
|
||||
bool bOwnsData;
|
||||
|
||||
virtual sal_Size GetData( void* pData, sal_Size nSize ) override;
|
||||
virtual sal_Size PutData( const void* pData, sal_Size nSize ) override;
|
||||
virtual std::size_t GetData( void* pData, std::size_t nSize ) override;
|
||||
virtual std::size_t PutData( const void* pData, std::size_t nSize ) override;
|
||||
virtual sal_uInt64 SeekPos( sal_uInt64 nPos ) override;
|
||||
virtual void SetSize( sal_uInt64 nSize ) override;
|
||||
virtual void FlushData() override;
|
||||
|
||||
/// AllocateMemory must update pBuf accordingly
|
||||
/// - pBuf: Address of new block
|
||||
bool AllocateMemory( sal_Size nSize );
|
||||
bool AllocateMemory( std::size_t nSize );
|
||||
|
||||
/// ReAllocateMemory must update the following variables:
|
||||
/// - pBuf: Address of new block
|
||||
@@ -638,23 +638,23 @@ protected:
|
||||
void FreeMemory();
|
||||
|
||||
public:
|
||||
SvMemoryStream( void* pBuf, sal_Size nSize, StreamMode eMode);
|
||||
SvMemoryStream( sal_Size nInitSize=512, sal_Size nResize=64 );
|
||||
SvMemoryStream( void* pBuf, std::size_t nSize, StreamMode eMode);
|
||||
SvMemoryStream( std::size_t nInitSize=512, std::size_t nResize=64 );
|
||||
virtual ~SvMemoryStream() override;
|
||||
|
||||
virtual void ResetError() override;
|
||||
|
||||
const void* GetBuffer();
|
||||
sal_uInt64 GetSize();
|
||||
sal_Size GetEndOfData() const { return nEndOfData; }
|
||||
std::size_t GetEndOfData() const { return nEndOfData; }
|
||||
const void* GetData() { Flush(); return pBuf; }
|
||||
|
||||
void* SwitchBuffer();
|
||||
// the buffer is not owned by this class
|
||||
void SetBuffer( void* pBuf, sal_Size nSize, sal_Size nEOF );
|
||||
void SetBuffer( void* pBuf, std::size_t nSize, std::size_t nEOF );
|
||||
|
||||
void ObjectOwnsMemory( bool bOwn ) { bOwnsData = bOwn; }
|
||||
void SetResizeOffset( sal_Size nNewResize ) { nResize = nNewResize; }
|
||||
void SetResizeOffset( std::size_t nNewResize ) { nResize = nNewResize; }
|
||||
virtual sal_uInt64 remainingSize() override { return GetEndOfData() - Tell(); }
|
||||
};
|
||||
|
||||
|
||||
@@ -94,8 +94,8 @@ sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, bool &bNeg )
|
||||
if (!rpStream.get() || rpStream->GetError())
|
||||
return -1;
|
||||
|
||||
sal_Size nSniffPos = rpStream->Tell();
|
||||
static sal_Size nVerOOo7Len = sal::static_int_cast< sal_Size >(strlen( pVerOOo7 ));
|
||||
sal_uInt64 const nSniffPos = rpStream->Tell();
|
||||
static std::size_t nVerOOo7Len = sal::static_int_cast< std::size_t >(strlen( pVerOOo7 ));
|
||||
pMagicHeader[ nVerOOo7Len ] = '\0';
|
||||
if ((rpStream->ReadBytes(static_cast<void *>(pMagicHeader), nVerOOo7Len) == nVerOOo7Len) &&
|
||||
!strcmp(pMagicHeader, pVerOOo7))
|
||||
|
||||
@@ -181,8 +181,8 @@ public: // Overridden methods
|
||||
sal_uLong GetSize() { return m_ulValueLength; };
|
||||
protected: // Overridden methods
|
||||
|
||||
virtual sal_uLong GetData( void* pData, sal_uLong nSize ) override;
|
||||
virtual sal_uLong PutData( const void* pData, sal_uLong nSize ) override;
|
||||
virtual std::size_t GetData(void* pData, std::size_t nSize) override;
|
||||
virtual std::size_t PutData(const void* pData, std::size_t nSize) override;
|
||||
virtual sal_uInt64 SeekPos( sal_uInt64 nPos ) override;
|
||||
virtual void SetSize( sal_uInt64 nSize ) override;
|
||||
virtual void FlushData() override;
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace OpenStormBento
|
||||
* @param number of bytes to be read
|
||||
* @return number of bytes read
|
||||
*/
|
||||
sal_uLong LtcUtBenValueStream::GetData( void* pData, sal_uLong nSize )
|
||||
std::size_t LtcUtBenValueStream::GetData(void* pData, std::size_t nSize)
|
||||
{
|
||||
//unsigned long AmtLeft;
|
||||
unsigned long AmtRead;
|
||||
@@ -82,7 +82,7 @@ sal_uLong LtcUtBenValueStream::GetData( void* pData, sal_uLong nSize )
|
||||
* @param size of buffer to be written
|
||||
* @return number of bytes written into value stream
|
||||
*/
|
||||
sal_uLong LtcUtBenValueStream::PutData( const void* /*pData*/, sal_uLong nSize )
|
||||
std::size_t LtcUtBenValueStream::PutData(const void* /*pData*/, std::size_t nSize)
|
||||
{
|
||||
/* Because we only support IMPORT filter, PutData implementation is ignored
|
||||
It won't bring negative influence to read-only stream object */
|
||||
|
||||
@@ -1665,7 +1665,7 @@ void Output::writeString( const OUString& rStr )
|
||||
StringHelper::appendEncString( maLine, rStr );
|
||||
}
|
||||
|
||||
void Output::writeArray( const sal_uInt8* pnData, sal_Size nSize, sal_Unicode cSep )
|
||||
void Output::writeArray( const sal_uInt8* pnData, std::size_t nSize, sal_Unicode cSep )
|
||||
{
|
||||
const sal_uInt8* pnEnd = pnData ? (pnData + nSize) : nullptr;
|
||||
for( const sal_uInt8* pnByte = pnData; pnByte < pnEnd; ++pnByte )
|
||||
@@ -1991,7 +1991,7 @@ void OutputObjectBase::writeStringItem( const String& rName, const OUString& rDa
|
||||
mxOut->writeAscii( ",cut" );
|
||||
}
|
||||
|
||||
void OutputObjectBase::writeArrayItem( const String& rName, const sal_uInt8* pnData, sal_Size nSize, sal_Unicode cSep )
|
||||
void OutputObjectBase::writeArrayItem( const String& rName, const sal_uInt8* pnData, std::size_t nSize, sal_Unicode cSep )
|
||||
{
|
||||
ItemGuard aItem( mxOut, rName );
|
||||
mxOut->writeArray( pnData, nSize, cSep );
|
||||
@@ -2169,7 +2169,7 @@ OUString InputObjectBase::dumpCharArray( const String& rName, sal_Int32 nLen, rt
|
||||
OUString aString;
|
||||
if( nDumpSize > 0 )
|
||||
{
|
||||
::std::vector< sal_Char > aBuffer( static_cast< sal_Size >( nLen ) + 1 );
|
||||
::std::vector< sal_Char > aBuffer( static_cast< std::size_t >( nLen ) + 1 );
|
||||
sal_Int32 nCharsRead = mxStrm->readMemory( &aBuffer.front(), nLen );
|
||||
aBuffer[ nCharsRead ] = 0;
|
||||
aString = OStringToOUString( OString( &aBuffer.front() ), eTextEnc );
|
||||
|
||||
@@ -839,7 +839,7 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic , bool bRelPathToMedia )
|
||||
|
||||
SvMemoryStream aStream;
|
||||
const void* aData = aLink.GetData();
|
||||
sal_Size nDataSize = aLink.GetDataSize();
|
||||
std::size_t nDataSize = aLink.GetDataSize();
|
||||
|
||||
switch ( aLink.GetType() )
|
||||
{
|
||||
|
||||
@@ -112,7 +112,7 @@ OUString generateGUIDString()
|
||||
|
||||
}
|
||||
|
||||
VBACompressionChunk::VBACompressionChunk(SvStream& rCompressedStream, const sal_uInt8* pData, sal_Size nChunkSize)
|
||||
VBACompressionChunk::VBACompressionChunk(SvStream& rCompressedStream, const sal_uInt8* pData, std::size_t nChunkSize)
|
||||
: mrCompressedStream(rCompressedStream)
|
||||
, mpUncompressedData(pData)
|
||||
, mpCompressedChunkStream(nullptr)
|
||||
@@ -357,7 +357,7 @@ void VBACompressionChunk::writeRawChunk()
|
||||
// we need to use up to 4096 bytes of the original stream
|
||||
// and fill the rest with padding
|
||||
mrCompressedStream.WriteBytes(mpUncompressedData, mnChunkSize);
|
||||
sal_Size nPadding = 4096 - mnChunkSize;
|
||||
std::size_t nPadding = 4096 - mnChunkSize;
|
||||
for (size_t i = 0; i < nPadding; ++i)
|
||||
{
|
||||
mrCompressedStream.WriteUInt8(0);
|
||||
@@ -378,11 +378,11 @@ void VBACompression::write()
|
||||
mrCompressedStream.WriteUInt8(0x01); // signature byte of a compressed container
|
||||
bool bStreamNotEnded = true;
|
||||
const sal_uInt8* pData = static_cast<const sal_uInt8*>(mrUncompressedStream.GetData());
|
||||
sal_Size nSize = mrUncompressedStream.GetEndOfData();
|
||||
sal_Size nRemainingSize = nSize;
|
||||
std::size_t nSize = mrUncompressedStream.GetEndOfData();
|
||||
std::size_t nRemainingSize = nSize;
|
||||
while(bStreamNotEnded)
|
||||
{
|
||||
sal_Size nChunkSize = nRemainingSize > 4096 ? 4096 : nRemainingSize;
|
||||
std::size_t nChunkSize = nRemainingSize > 4096 ? 4096 : nRemainingSize;
|
||||
VBACompressionChunk aChunk(mrCompressedStream, &pData[nSize - nRemainingSize], nChunkSize);
|
||||
aChunk.write();
|
||||
|
||||
|
||||
@@ -347,7 +347,7 @@ public:
|
||||
|
||||
bool open(SvStream* pStream)
|
||||
{
|
||||
sal_Size nSize = pStream->remainingSize();
|
||||
std::size_t nSize = pStream->remainingSize();
|
||||
std::vector<sal_uInt8> aBuffer(nSize + 1);
|
||||
pStream->ReadBytes(aBuffer.data(), nSize);
|
||||
aBuffer[nSize] = 0;
|
||||
|
||||
@@ -1660,7 +1660,7 @@ OUString GeometryHandler::impl_ConvertUIToMimeType_nothrow(const OUString& _sUIN
|
||||
::std::vector< OUString >::const_iterator aFind = ::std::find(aList.begin(),aList.end(),_sUIName);
|
||||
if ( aFind != aList.end() )
|
||||
{
|
||||
const sal_Size nPos = aFind - aList.begin();
|
||||
const std::size_t nPos = aFind - aList.begin();
|
||||
const uno::Reference< report::XReportDefinition> xReportDefinition(m_xReportComponent,uno::UNO_QUERY);
|
||||
if ( xReportDefinition.is() )
|
||||
{
|
||||
|
||||
@@ -867,7 +867,7 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile,
|
||||
|
||||
if (aLine.indexOf(';') == -1)
|
||||
{
|
||||
const sal_Size nImgListStartPos = aIStm.Tell();
|
||||
const sal_uInt64 nImgListStartPos = aIStm.Tell();
|
||||
|
||||
do
|
||||
{
|
||||
@@ -913,7 +913,7 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile,
|
||||
}
|
||||
}
|
||||
|
||||
const sal_Size nImgListEndPos = aIStm.Tell();
|
||||
const sal_uInt64 nImgListEndPos = aIStm.Tell();
|
||||
aIStm.Seek( nImgListStartPos );
|
||||
while( aIStm.Tell() < nImgListEndPos )
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding )
|
||||
{
|
||||
sal_Size nMaxUniCodeBuf = strlen( pStr ) + 1;
|
||||
std::size_t nMaxUniCodeBuf = strlen( pStr ) + 1;
|
||||
if( nMaxUniCodeBuf * 6 > 0x0FFFFF )
|
||||
RscExit( 10 );
|
||||
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ blobs to avoid needlessly complicating the Calc logic.
|
||||
struct AutoFormatSwBlob
|
||||
{
|
||||
sal_uInt8 *pData;
|
||||
sal_Size size;
|
||||
std::size_t size;
|
||||
|
||||
AutoFormatSwBlob() : pData(nullptr), size(0)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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) )
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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--;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user