summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-06-03 14:45:59 +0200
committerMichael Stahl <mstahl@redhat.com>2016-06-06 18:09:11 +0000
commit62d270116bf34778bf581f21b27fa9cdbff7de0e (patch)
tree0402df0506ab8f6825ef497f27426f01d2e01850 /sc/source
parentd0bc637426060593046c8d3a4d01d0b05b052cc5 (diff)
tools: rename SvStream::Read/Write to ReadBytes/WriteBytes
Change-Id: Ib788a30d413436aa03f813aa2fddcbc4d6cd2f9a Reviewed-on: https://gerrit.libreoffice.org/25972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/tool/autoform.cxx4
-rw-r--r--sc/source/core/tool/rechead.cxx4
-rw-r--r--sc/source/filter/dif/difexp.cxx6
-rw-r--r--sc/source/filter/excel/xeescher.cxx4
-rw-r--r--sc/source/filter/excel/xestream.cxx10
-rw-r--r--sc/source/filter/excel/xiescher.cxx4
-rw-r--r--sc/source/filter/excel/xiformula.cxx4
-rw-r--r--sc/source/filter/excel/xistream.cxx10
-rw-r--r--sc/source/filter/ftools/ftools.cxx2
-rw-r--r--sc/source/filter/lotus/filter.cxx2
-rw-r--r--sc/source/filter/lotus/lotform.cxx2
-rw-r--r--sc/source/filter/lotus/lotimpop.cxx2
-rw-r--r--sc/source/filter/lotus/op.cxx10
-rw-r--r--sc/source/filter/qpro/qpro.cxx2
-rw-r--r--sc/source/filter/starcalc/scflt.cxx42
-rw-r--r--sc/source/ui/docshell/docsh.cxx6
-rw-r--r--sc/source/ui/docshell/impex.cxx2
-rw-r--r--sc/source/ui/unoobj/confuno.cxx2
18 files changed, 59 insertions, 59 deletions
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 5f03d87da5b5..f2f81e7b6222 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -97,7 +97,7 @@ namespace
{
blob.pData = new sal_uInt8[blobSize];
blob.size = static_cast<sal_Size>(blobSize);
- stream.Read(blob.pData, blob.size);
+ stream.ReadBytes(blob.pData, blob.size);
}
return stream;
@@ -109,7 +109,7 @@ namespace
const sal_uInt64 endOfBlob = stream.Tell() + sizeof(sal_uInt64) + blob.size;
stream.WriteUInt64( endOfBlob );
if (blob.size)
- stream.Write(blob.pData, blob.size);
+ stream.WriteBytes(blob.pData, blob.size);
return stream;
}
diff --git a/sc/source/core/tool/rechead.cxx b/sc/source/core/tool/rechead.cxx
index dbf3bffda443..babe8a9755ae 100644
--- a/sc/source/core/tool/rechead.cxx
+++ b/sc/source/core/tool/rechead.cxx
@@ -49,7 +49,7 @@ ScMultipleReadHeader::ScMultipleReadHeader(SvStream& rNewStream) :
sal_uInt32 nSizeTableLen;
rStream.ReadUInt32( nSizeTableLen );
pBuf = new sal_uInt8[nSizeTableLen];
- rStream.Read( pBuf, nSizeTableLen );
+ rStream.ReadBytes( pBuf, nSizeTableLen );
pMemStream = new SvMemoryStream( pBuf, nSizeTableLen, StreamMode::READ );
}
@@ -122,7 +122,7 @@ ScMultipleWriteHeader::~ScMultipleWriteHeader()
rStream.WriteUInt16( SCID_SIZES );
rStream.WriteUInt32( aMemStream.Tell() );
- rStream.Write( aMemStream.GetData(), aMemStream.Tell() );
+ rStream.WriteBytes( aMemStream.GetData(), aMemStream.Tell() );
if ( nDataEnd - nDataPos != nDataSize ) // matched default ?
{
diff --git a/sc/source/filter/dif/difexp.cxx b/sc/source/filter/dif/difexp.cxx
index b5c620f03007..a68c0d236f39 100644
--- a/sc/source/filter/dif/difexp.cxx
+++ b/sc/source/filter/dif/difexp.cxx
@@ -246,9 +246,9 @@ void ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc,
aStrDelimEncoded, nPos+1+aStrDelimEncoded.getLength());
}
// write byte encoded
- rOut.Write(aStrDelimEncoded.getStr(), aStrDelimEncoded.getLength());
- rOut.Write(aStrEnc.getStr(), aStrEnc.getLength());
- rOut.Write(aStrDelimEncoded.getStr(), aStrDelimEncoded.getLength());
+ rOut.WriteBytes(aStrDelimEncoded.getStr(), aStrDelimEncoded.getLength());
+ rOut.WriteBytes(aStrEnc.getStr(), aStrEnc.getLength());
+ rOut.WriteBytes(aStrDelimEncoded.getStr(), aStrDelimEncoded.getLength());
}
rOut.WriteUniOrByteChar( '\n', eCharSet );
}
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 8859baac227e..99ad68eea835 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -370,7 +370,7 @@ XclExpMsoDrawingGroup::XclExpMsoDrawingGroup( XclEscherEx& rEscherEx ) :
0x00, 0x08
};
mrEscherEx.AddAtom( sizeof( spnDffOpt ), ESCHER_OPT, 3, 3 );
- rDffStrm.Write( spnDffOpt, sizeof( spnDffOpt ) );
+ rDffStrm.WriteBytes(spnDffOpt, sizeof(spnDffOpt));
// SPLITMENUCOLORS contains colors in toolbar
static const sal_uInt8 spnDffSplitMenuColors[] = {
@@ -378,7 +378,7 @@ XclExpMsoDrawingGroup::XclExpMsoDrawingGroup( XclEscherEx& rEscherEx ) :
0x17, 0x00, 0x00, 0x08, 0xF7, 0x00, 0x00, 0x10
};
mrEscherEx.AddAtom( sizeof( spnDffSplitMenuColors ), ESCHER_SplitMenuColors, 0, 4 );
- rDffStrm.Write( spnDffSplitMenuColors, sizeof( spnDffSplitMenuColors ) );
+ rDffStrm.WriteBytes(spnDffSplitMenuColors, sizeof(spnDffSplitMenuColors));
// close the DGGCONTAINER
mrEscherEx.CloseContainer();
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 171479c69cd0..99117a8ee119 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -231,7 +231,7 @@ sal_Size XclExpStream::Write( const void* pData, sal_Size nBytes )
}
else
{
- nWriteRet = mrStrm.Write( pBuffer, nWriteLen );
+ nWriteRet = mrStrm.WriteBytes(pBuffer, nWriteLen);
bValid = (nWriteLen == nWriteRet);
OSL_ENSURE( bValid, "XclExpStream::Write - stream write error" );
}
@@ -242,7 +242,7 @@ sal_Size XclExpStream::Write( const void* pData, sal_Size nBytes )
}
}
else
- nRet = mrStrm.Write( pData, nBytes );
+ nRet = mrStrm.WriteBytes(pData, nBytes);
}
return nRet;
}
@@ -289,7 +289,7 @@ void XclExpStream::CopyFromStream(SvStream& rInStrm, sal_uInt64 const nBytes)
while( bValid && (nBytesLeft > 0) )
{
sal_Size nWriteLen = ::std::min<sal_Size>(nBytesLeft, nMaxBuffer);
- rInStrm.Read( pBuffer.get(), nWriteLen );
+ rInStrm.ReadBytes(pBuffer.get(), nWriteLen);
sal_Size nWriteRet = Write( pBuffer.get(), nWriteLen );
bValid = (nWriteLen == nWriteRet);
nBytesLeft -= nWriteRet;
@@ -447,7 +447,7 @@ void XclExpStream::WriteRawZeroBytes( sal_Size nBytes )
nBytesLeft -= sizeof( nData );
}
if( nBytesLeft )
- mrStrm.Write( &nData, nBytesLeft );
+ mrStrm.WriteBytes(&nData, nBytesLeft);
}
XclExpBiff8Encrypter::XclExpBiff8Encrypter( const XclExpRoot& rRoot ) :
@@ -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.Write(&aBytes[nPos], nEncBytes);
+ sal_Size nRet = rStrm.WriteBytes(&aBytes[nPos], nEncBytes);
OSL_ENSURE(nRet == nEncBytes, "XclExpBiff8Encrypter::EncryptBytes: fail to write to stream!!");
(void) nRet; // to remove a silly compiler warning.
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 6d5421894e5f..aa32a829c74f 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -3675,9 +3675,9 @@ OUString XclImpDffConverter::ReadHlinkProperty( SvStream& rDffStrm ) const
// copy from DFF stream to memory stream
::std::vector< sal_uInt8 > aBuffer( nBufferSize );
sal_uInt8* pnData = &aBuffer.front();
- if( rDffStrm.Read( pnData, nBufferSize ) == nBufferSize )
+ if (rDffStrm.ReadBytes(pnData, nBufferSize) == nBufferSize)
{
- aMemStream.Write( pnData, nBufferSize );
+ aMemStream.WriteBytes(pnData, nBufferSize);
// create BIFF import stream to be able to use XclImpHyperlink class
XclImpStream aXclStrm( aMemStream, GetRoot() );
diff --git a/sc/source/filter/excel/xiformula.cxx b/sc/source/filter/excel/xiformula.cxx
index 9a919cbabc17..9a00004dd329 100644
--- a/sc/source/filter/excel/xiformula.cxx
+++ b/sc/source/filter/excel/xiformula.cxx
@@ -56,7 +56,7 @@ void XclImpFmlaCompImpl::CreateRangeList(
{
SvMemoryStream aMemStrm;
aMemStrm.WriteUInt16( EXC_ID_EOF ).WriteUInt16( rXclTokArr.GetSize() );
- aMemStrm.Write( rXclTokArr.GetData(), rXclTokArr.GetSize() );
+ aMemStrm.WriteBytes(rXclTokArr.GetData(), rXclTokArr.GetSize());
XclImpStream aFmlaStrm( aMemStrm, GetRoot() );
aFmlaStrm.StartNextRecord();
GetOldFmlaConverter().GetAbsRefs( rScRanges, aFmlaStrm, aFmlaStrm.GetRecSize() );
@@ -72,7 +72,7 @@ const ScTokenArray* XclImpFmlaCompImpl::CreateFormula(
// evil hack! are we trying to phase out the old style formula converter ?
SvMemoryStream aMemStrm;
aMemStrm.WriteUInt16( EXC_ID_EOF ).WriteUInt16( rXclTokArr.GetSize() );
- aMemStrm.Write( rXclTokArr.GetData(), rXclTokArr.GetSize() );
+ aMemStrm.WriteBytes(rXclTokArr.GetData(), rXclTokArr.GetSize());
XclImpStream aFmlaStrm( aMemStrm, GetRoot() );
aFmlaStrm.StartNextRecord();
const ScTokenArray* pArray = nullptr;
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index 7873eef9c3f4..51802a9fe091 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -98,7 +98,7 @@ sal_uInt16 XclImpDecrypter::Read( SvStream& rStrm, void* pData, sal_uInt16 nByte
mnOldPos = rStrm.Tell();
}
else
- nRet = static_cast< sal_uInt16 >( rStrm.Read( pData, nBytes ) );
+ nRet = static_cast<sal_uInt16>(rStrm.ReadBytes(pData, nBytes));
}
return nRet;
}
@@ -187,7 +187,7 @@ void XclImpBiff5Decrypter::OnUpdate( sal_Size /*nOldStrmPos*/, sal_Size nNewStrm
sal_uInt16 XclImpBiff5Decrypter::OnRead( SvStream& rStrm, sal_uInt8* pnData, sal_uInt16 nBytes )
{
- sal_uInt16 nRet = static_cast< sal_uInt16 >( rStrm.Read( pnData, nBytes ) );
+ sal_uInt16 nRet = static_cast<sal_uInt16>(rStrm.ReadBytes(pnData, nBytes));
maCodec.Decode( pnData, nRet );
return nRet;
}
@@ -291,7 +291,7 @@ sal_uInt16 XclImpBiff8Decrypter::OnRead( SvStream& rStrm, sal_uInt8* pnData, sal
sal_uInt16 nDecBytes = ::std::min< sal_uInt16 >( nBytesLeft, nBlockLeft );
// read the block from stream
- nRet = nRet + static_cast< sal_uInt16 >( rStrm.Read( pnCurrData, nDecBytes ) );
+ nRet = nRet + static_cast<sal_uInt16>(rStrm.ReadBytes(pnCurrData, nDecBytes));
// decode the block inplace
maCodec.Decode( pnCurrData, nDecBytes, pnCurrData, nDecBytes );
if( GetOffset( rStrm.Tell() ) == 0 )
@@ -734,7 +734,7 @@ sal_Size XclImpStream::CopyToStream( SvStream& rOutStrm, sal_Size nBytes )
nRet += Read( pnBuffer.get(), nReadSize );
// writing more bytes than read results in invalid memory access
SAL_WARN_IF(nRet != nReadSize, "sc", "read less bytes than requested");
- rOutStrm.Write( pnBuffer.get(), nReadSize );
+ rOutStrm.WriteBytes(pnBuffer.get(), nReadSize);
nBytesLeft -= nReadSize;
}
}
@@ -1047,7 +1047,7 @@ sal_uInt16 XclImpStream::ReadRawData( void* pData, sal_uInt16 nBytes )
if( mbUseDecr )
nRet = mxDecrypter->Read( mrStrm, pData, nBytes );
else
- nRet = static_cast< sal_uInt16 >( mrStrm.Read( pData, nBytes ) );
+ nRet = static_cast<sal_uInt16>(mrStrm.ReadBytes(pData, nBytes));
mnRawRecLeft = mnRawRecLeft - nRet;
return nRet;
}
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index 19616c52b664..4a2aafd38a4c 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -73,7 +73,7 @@ SEEEEEEE EEEEEEEE IMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM MMMMMMMM
long double lfFakt = 256.0;
sal_uInt8 pDouble10[ 10 ];
- rStrm.Read( pDouble10, 10 ); // Intel-10 in pDouble10
+ rStrm.ReadBytes(pDouble10, 10); // Intel-10 in pDouble10
lfDouble = static_cast< long double >( pDouble10[ 7 ] ); // Byte 7
lfDouble *= lfFakt;
diff --git a/sc/source/filter/lotus/filter.cxx b/sc/source/filter/lotus/filter.cxx
index bc8780660297..be0bf63f509c 100644
--- a/sc/source/filter/lotus/filter.cxx
+++ b/sc/source/filter/lotus/filter.cxx
@@ -142,7 +142,7 @@ WKTYP ScanVersion(LotusContext &rContext, SvStream& aStream)
if( nVersNr == 0x0004 && nRecLen == 26 )
{ // 4 bytes of 26 read => skip 22 (read instead of seek to make IsEof() work just in case)
sal_Char aDummy[22];
- aStream.Read( aDummy, 22 );
+ aStream.ReadBytes(aDummy, 22);
return aStream.IsEof() ? eWK_Error : eWK3;
}
break;
diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx
index 1b80a498331f..29fe90997914 100644
--- a/sc/source/filter/lotus/lotform.cxx
+++ b/sc/source/filter/lotus/lotform.cxx
@@ -602,7 +602,7 @@ void LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest )
std::unique_ptr<sal_Char[]> p(new (::std::nothrow) sal_Char[ nStrLen + 1 ]);
if (p)
{
- aIn.Read( p.get(), nStrLen );
+ aIn.ReadBytes(p.get(), nStrLen);
p[ nStrLen ] = 0x00;
DoFunc( ocNoName, nAnz, p.get() );
diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx
index fa937c510021..580fcd8fec3e 100644
--- a/sc/source/filter/lotus/lotimpop.cxx
+++ b/sc/source/filter/lotus/lotimpop.cxx
@@ -189,7 +189,7 @@ void ImportLotus::Userrange()
Read( nRangeType );
sal_Char aBuffer[ 17 ];
- pIn->Read( aBuffer, 16 );
+ pIn->ReadBytes(aBuffer, 16);
aBuffer[ 16 ] = 0;
OUString aName( aBuffer, strlen(aBuffer), eQuellChar );
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index 56895530b5c4..9893dd3bd112 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -118,7 +118,7 @@ void OP_Label(LotusContext& rContext, SvStream& r, sal_uInt16 n)
n -= (n > 5) ? 5 : n;
std::unique_ptr<sal_Char[]> pText(new sal_Char[n + 1]);
- r.Read( pText.get(), n );
+ r.ReadBytes(pText.get(), n);
pText[n] = 0;
if (ValidColRow(nCol, nRow))
@@ -196,7 +196,7 @@ void OP_NamedRange(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
sal_uInt16 nColSt, nRowSt, nColEnd, nRowEnd;
sal_Char cPuffer[ 16+1 ];
- r.Read( cPuffer, 16 );
+ r.ReadBytes(cPuffer, 16);
cPuffer[ 16 ] = 0;
r.ReadUInt16( nColSt ).ReadUInt16( nRowSt ).ReadUInt16( nColEnd ).ReadUInt16( nRowEnd );
@@ -235,7 +235,7 @@ void OP_SymphNamedRange(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
sal_uInt8 nType;
sal_Char cPuffer[ 16+1 ];
- r.Read( cPuffer, 16 );
+ r.ReadBytes(cPuffer, 16);
cPuffer[ 16 ] = 0;
r.ReadUInt16( nColSt ).ReadUInt16( nRowSt ).ReadUInt16( nColEnd ).ReadUInt16( nRowEnd ).ReadUChar( nType );
@@ -357,7 +357,7 @@ void OP_Label123(LotusContext& rContext, SvStream& r, sal_uInt16 n)
n -= (n > 4) ? 4 : n;
std::unique_ptr<sal_Char[]> pText(new sal_Char[n + 1]);
- r.Read( pText.get(), n );
+ r.ReadBytes(pText.get(), n);
pText[ n ] = 0;
PutFormString(rContext, nCol, nRow, nTab, pText.get());
@@ -438,7 +438,7 @@ void OP_Note123(LotusContext& rContext, SvStream& r, sal_uInt16 n)
n -= (n > 4) ? 4 : n;
std::unique_ptr<sal_Char[]> pText(new sal_Char[n + 1]);
- r.Read( pText.get(), n );
+ r.ReadBytes(pText.get(), n);
pText[ n ] = 0;
OUString aNoteText(pText.get(), strlen(pText.get()), rContext.pLotusRoot->eCharsetQ);
diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx
index 2cf780751233..153c693be79d 100644
--- a/sc/source/filter/qpro/qpro.cxx
+++ b/sc/source/filter/qpro/qpro.cxx
@@ -224,7 +224,7 @@ bool ScQProReader::nextRecord()
void ScQProReader::readString( OUString &rString, sal_uInt16 nLength )
{
std::unique_ptr<sal_Char[]> pText(new sal_Char[ nLength + 1 ]);
- nLength = mpStream->Read(pText.get(), nLength);
+ nLength = mpStream->ReadBytes(pText.get(), nLength);
pText[ nLength ] = 0;
rString = OUString( pText.get(), strlen(pText.get()), mpStream->GetStreamCharSet() );
}
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index b4309cc76f8c..9c98fc4e115c 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -86,7 +86,7 @@ static void lcl_ReadFixedString( SvStream& rStream, void* pData, size_t nLen )
pBuf[0] = 0;
else
{
- rStream.Read( pBuf, nLen);
+ rStream.ReadBytes(pBuf, nLen);
pBuf[nLen-1] = 0;
}
}
@@ -95,7 +95,7 @@ static void lcl_ReadFileHeader(SvStream& rStream, Sc10FileHeader& rFileHeader)
{
lcl_ReadFixedString( rStream, &rFileHeader.CopyRight, sizeof(rFileHeader.CopyRight));
rStream.ReadUInt16( rFileHeader.Version );
- rStream.Read(&rFileHeader.Reserved, sizeof(rFileHeader.Reserved));
+ rStream.ReadBytes(&rFileHeader.Reserved, sizeof(rFileHeader.Reserved));
}
static void lcl_ReadTabProtect(SvStream& rStream, Sc10TableProtect& rProtect)
@@ -196,13 +196,13 @@ static void lcl_ReadPageFormat(SvStream& rStream, Sc10PageFormat& rFormat)
rStream.ReadUChar( rFormat.TopBottomDir );
lcl_ReadFixedString( rStream, &rFormat.PrintAreaName, sizeof(rFormat.PrintAreaName));
lcl_ReadBlockRect(rStream, rFormat.PrintArea);
- rStream.Read(&rFormat.PrnZoom, sizeof(rFormat.PrnZoom));
+ rStream.ReadBytes(&rFormat.PrnZoom, sizeof(rFormat.PrnZoom));
rStream.ReadInt16( rFormat.FirstPageNo );
rStream.ReadInt16( rFormat.RowRepeatStart );
rStream.ReadInt16( rFormat.RowRepeatEnd );
rStream.ReadInt16( rFormat.ColRepeatStart );
rStream.ReadInt16( rFormat.ColRepeatEnd );
- rStream.Read(&rFormat.Reserved, sizeof(rFormat.Reserved));
+ rStream.ReadBytes(&rFormat.Reserved, sizeof(rFormat.Reserved));
}
static void lcl_ReadGraphHeader(SvStream& rStream, Sc10GraphHeader& rHeader)
@@ -221,7 +221,7 @@ static void lcl_ReadGraphHeader(SvStream& rStream, Sc10GraphHeader& rHeader)
rStream.ReadUChar( rHeader.IsTransparent );
lcl_ReadRGB(rStream, rHeader.FrameColor);
lcl_ReadRGB(rStream, rHeader.BackColor);
- rStream.Read(&rHeader.Reserved, sizeof(rHeader.Reserved));
+ rStream.ReadBytes(&rHeader.Reserved, sizeof(rHeader.Reserved));
}
static void lcl_ReadImageHeaer(SvStream& rStream, Sc10ImageHeader& rHeader)
@@ -269,7 +269,7 @@ static void lcl_ReadChartSheetData(SvStream& rStream, Sc10ChartSheetData& rSheet
rStream.ReadInt16( rSheetData.DataY1 );
rStream.ReadInt16( rSheetData.DataX2 );
rStream.ReadInt16( rSheetData.DataY2 );
- rStream.Read(&rSheetData.Reserved, sizeof(rSheetData.Reserved));
+ rStream.ReadBytes(&rSheetData.Reserved, sizeof(rSheetData.Reserved));
}
static void lcl_ReadChartTypeData(SvStream& rStream, Sc10ChartTypeData& rTypeData)
@@ -311,7 +311,7 @@ static void lcl_ReadChartTypeData(SvStream& rStream, Sc10ChartTypeData& rTypeDat
for (i = 0; i < 50; i++)
lcl_ReadFixedString( rStream, &rTypeData.LabelText[i], sizeof(Sc10ChartText));
lcl_ReadFixedString( rStream, &rTypeData.LeftTitle, sizeof(rTypeData.LeftTitle));
- rStream.Read(&rTypeData.Reserved, sizeof(rTypeData.Reserved));
+ rStream.ReadBytes(&rTypeData.Reserved, sizeof(rTypeData.Reserved));
}
static double lcl_PascalToDouble(sal_Char* tp6)
@@ -394,7 +394,7 @@ Sc10FontData::Sc10FontData(SvStream& rStream)
sal_uInt16 nLen(0);
rStream.ReadUInt16( nLen );
if (nLen < sizeof(FaceName))
- rStream.Read(FaceName, nLen);
+ rStream.ReadBytes(FaceName, nLen);
else
rStream.SetError(ERRCODE_IO_WRONGFORMAT);
}
@@ -427,17 +427,17 @@ Sc10NameData::Sc10NameData(SvStream& rStream)
{
sal_uInt8 nLen;
rStream.ReadUChar( nLen );
- rStream.Read(Name, sizeof(Name) - 1);
+ rStream.ReadBytes(Name, sizeof(Name) - 1);
if (nLen >= sizeof(Name))
nLen = sizeof(Name) - 1;
Name[nLen] = 0;
rStream.ReadUChar( nLen );
- rStream.Read(Reference, sizeof(Reference) - 1);
+ rStream.ReadBytes(Reference, sizeof(Reference) - 1);
if (nLen >= sizeof(Reference))
nLen = sizeof(Reference) - 1;
Reference[nLen] = 0;
- rStream.Read(Reserved, sizeof(Reserved));
+ rStream.ReadBytes(Reserved, sizeof(Reserved));
}
Sc10NameCollection::Sc10NameCollection(SvStream& rStream) :
@@ -487,7 +487,7 @@ Sc10PatternData::Sc10PatternData(SvStream& rStream)
rStream.ReadUInt16( FrameColor );
rStream.ReadUInt16( Flags );
rStream.ReadUInt16( FormatFlags );
- rStream.Read(Reserved, sizeof(Reserved));
+ rStream.ReadBytes(Reserved, sizeof(Reserved));
}
Sc10PatternCollection::Sc10PatternCollection(SvStream& rStream)
@@ -1012,10 +1012,10 @@ void Sc10Import::LoadFileHeader()
void Sc10Import::LoadFileInfo()
{
Sc10FileInfo FileInfo;
- rStream.Read(&FileInfo, sizeof(FileInfo));
+ rStream.ReadBytes(&FileInfo, sizeof(FileInfo));
nError = rStream.GetError();
- // TODO: ? copy info
+ // TODO: ? copy info, byte swapping
}
void Sc10Import::LoadEditStateInfo()
@@ -1033,7 +1033,7 @@ void Sc10Import::LoadEditStateInfo()
rStream.ReadUInt16(EditStateInfo.DeltaY);
rStream.ReadUInt16(EditStateInfo.DeltaZ);
rStream.ReadUChar(EditStateInfo.DataBaseMode);
- rStream.Read(EditStateInfo.Reserved, sizeof(EditStateInfo.Reserved));
+ rStream.ReadBytes(EditStateInfo.Reserved, sizeof(EditStateInfo.Reserved));
assert(rStream.GetError() || rStream.Tell() == nOldPos + sizeof(Sc10EditStateInfo));
@@ -1066,7 +1066,7 @@ void Sc10Import::LoadScrZoom()
{
// TODO: unfortunately Zoom is a 6-byte TP real number (don't know how to translate that)
sal_Char cZoom[6];
- rStream.Read(cZoom, sizeof(cZoom));
+ rStream.ReadBytes(cZoom, sizeof(cZoom));
nError = rStream.GetError();
}
@@ -1425,7 +1425,7 @@ void Sc10Import::LoadTables()
sal_uInt8 nLen;
rStream.ReadUChar( nLen );
- rStream.Read(TabName, sizeof(TabName) - 1);
+ rStream.ReadBytes(TabName, sizeof(TabName) - 1);
if (nLen >= sizeof(TabName))
nLen = sizeof(TabName) - 1;
TabName[nLen] = 0;
@@ -1637,7 +1637,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
sal_uInt8 Len;
sal_Char s[256];
rStream.ReadUChar( Len );
- rStream.Read(s, Len);
+ rStream.ReadBytes(s, Len);
s[Len] = 0;
pDoc->SetString( Col, static_cast<SCROW> (Row), Tab, SC10TOSTRING( s ) );
@@ -1649,7 +1649,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
sal_uInt8 Len;
sal_Char s[256+1];
rStream.ReadUChar( Len );
- rStream.Read(&s[1], Len);
+ rStream.ReadBytes(&s[1], Len);
s[0] = '=';
s[Len + 1] = 0;
ScFormulaCell* pCell = new ScFormulaCell( pDoc, ScAddress( Col, static_cast<SCROW> (Row), Tab ) );
@@ -1672,7 +1672,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab)
if (nNoteLen != 0)
{
std::unique_ptr<sal_Char[]> xNote(new sal_Char[nNoteLen+1]);
- nNoteLen = rStream.Read(xNote.get(), nNoteLen);
+ nNoteLen = rStream.ReadBytes(xNote.get(), nNoteLen);
xNote[nNoteLen] = 0;
OUString aNoteText( SC10TOSTRING(xNote.get()));
xNote.reset();
@@ -2308,7 +2308,7 @@ void Sc10Import::LoadObjects()
sal_uInt16 nAnz;
rStream.ReadUInt16( nAnz );
sal_Char Reserved[32];
- rStream.Read(Reserved, sizeof(Reserved));
+ rStream.ReadBytes(Reserved, sizeof(Reserved));
nError = rStream.GetError();
if ((nAnz > 0) && (nError == 0))
{
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 163024e2d1b5..95bb72d16f6e 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -2138,11 +2138,11 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
// write byte encoded
if ( bNeedQuotes )
- rStream.Write(
+ rStream.WriteBytes(
aStrDelimEncoded.getStr(), aStrDelimEncoded.getLength());
- rStream.Write(aStrEnc.getStr(), aStrEnc.getLength());
+ rStream.WriteBytes(aStrEnc.getStr(), aStrEnc.getLength());
if ( bNeedQuotes )
- rStream.Write(
+ rStream.WriteBytes(
aStrDelimEncoded.getStr(), aStrDelimEncoded.getLength());
}
}
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 038a53dd3a01..193a6041b620 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -480,7 +480,7 @@ void ScImportExport::WriteUnicodeOrByteString( SvStream& rStrm, const OUString&
if ( eEnc == RTL_TEXTENCODING_UNICODE )
{
if ( !IsEndianSwap( rStrm ) )
- rStrm.Write( rString.getStr(), rString.getLength() * sizeof(sal_Unicode) );
+ rStrm.WriteBytes(rString.getStr(), rString.getLength() * sizeof(sal_Unicode));
else
{
const sal_Unicode* p = rString.getStr();
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 129e0f29c40f..6f57f18264fc 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -424,7 +424,7 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const OUString& aPr
sal_uInt32 nSize = aStream.Tell();
aStream.Seek ( STREAM_SEEK_TO_BEGIN );
uno::Sequence < sal_Int8 > aSequence( nSize );
- aStream.Read ( aSequence.getArray(), nSize );
+ aStream.ReadBytes(aSequence.getArray(), nSize);
aRet <<= aSequence;
}
else