[Libreoffice-commits] core.git: avmedia/source basic/source connectivity/source cppcanvas/source desktop/source editeng/source extensions/source filter/source forms/source hwpfilter/source idl/source include/tools linguistic/source lotuswordpro/source oox/source opencl/inc sc/source sd/source sfx2/source sot/qa sot/source starmath/source svgio/qa svl/source svtools/source svx/source sw/source test/source tools/qa tools/source unotools/source vcl/source vcl/unx vcl/workben

Michael Stahl mstahl at redhat.com
Mon Jun 6 18:09:40 UTC 2016


 avmedia/source/opengl/oglplayer.cxx                     |    2 
 basic/source/classes/image.cxx                          |   10 +-
 basic/source/runtime/iosys.cxx                          |    2 
 connectivity/source/drivers/dbase/DIndex.cxx            |   12 +--
 connectivity/source/drivers/dbase/DTable.cxx            |   40 +++++-----
 connectivity/source/drivers/dbase/dindexnode.cxx        |    8 +-
 cppcanvas/source/mtfrenderer/emfplus.cxx                |    2 
 desktop/source/migration/services/wordbookmigration.cxx |    4 -
 editeng/source/editeng/editobj.cxx                      |   10 +-
 editeng/source/items/flditem.cxx                        |    4 -
 extensions/source/scanner/sane.cxx                      |    2 
 extensions/source/scanner/scanunx.cxx                   |    2 
 filter/source/flash/swfwriter.cxx                       |    2 
 filter/source/flash/swfwriter1.cxx                      |   20 ++---
 filter/source/flash/swfwriter2.cxx                      |    2 
 filter/source/graphicfilter/egif/egif.cxx               |    6 -
 filter/source/graphicfilter/egif/giflzwc.cxx            |    2 
 filter/source/graphicfilter/eps/eps.cxx                 |    2 
 filter/source/graphicfilter/icgm/cgm.cxx                |    6 -
 filter/source/graphicfilter/idxf/dxfgrprd.cxx           |    8 +-
 filter/source/graphicfilter/ieps/ieps.cxx               |   16 ++--
 filter/source/graphicfilter/ios2met/ios2met.cxx         |   10 +-
 filter/source/graphicfilter/ipcd/ipcd.cxx               |   18 ++--
 filter/source/graphicfilter/ipcx/ipcx.cxx               |    2 
 filter/source/graphicfilter/ipict/ipict.cxx             |   10 +-
 filter/source/graphicfilter/ipsd/ipsd.cxx               |    2 
 filter/source/graphicfilter/itga/itga.cxx               |   10 +-
 filter/source/graphicfilter/itiff/itiff.cxx             |    4 -
 filter/source/msfilter/escherex.cxx                     |   26 +++---
 filter/source/msfilter/msdffimp.cxx                     |   20 ++---
 filter/source/msfilter/msoleexp.cxx                     |    2 
 filter/source/msfilter/svdfppt.cxx                      |   21 ++---
 forms/source/component/DatabaseForm.cxx                 |    4 -
 hwpfilter/source/hwpreader.cxx                          |    2 
 idl/source/prj/svidl.cxx                                |    8 +-
 include/tools/stream.hxx                                |    6 -
 linguistic/source/dicimp.cxx                            |    8 +-
 lotuswordpro/source/filter/bencont.cxx                  |    4 -
 lotuswordpro/source/filter/explode.cxx                  |   10 +-
 lotuswordpro/source/filter/lwpdrawobj.cxx               |   12 +--
 lotuswordpro/source/filter/lwpfilter.cxx                |    8 +-
 lotuswordpro/source/filter/lwpgrfobj.cxx                |    4 -
 lotuswordpro/source/filter/lwpsdwfileloader.cxx         |    2 
 lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx   |    4 -
 lotuswordpro/source/filter/lwpsvstream.cxx              |    2 
 oox/source/export/vmlexport.cxx                         |    8 +-
 oox/source/ole/vbaexport.cxx                            |    4 -
 opencl/inc/opencl_device_selection.h                    |    4 -
 sc/source/core/tool/autoform.cxx                        |    4 -
 sc/source/core/tool/rechead.cxx                         |    4 -
 sc/source/filter/dif/difexp.cxx                         |    6 -
 sc/source/filter/excel/xeescher.cxx                     |    4 -
 sc/source/filter/excel/xestream.cxx                     |   10 +-
 sc/source/filter/excel/xiescher.cxx                     |    4 -
 sc/source/filter/excel/xiformula.cxx                    |    4 -
 sc/source/filter/excel/xistream.cxx                     |   10 +-
 sc/source/filter/ftools/ftools.cxx                      |    2 
 sc/source/filter/lotus/filter.cxx                       |    2 
 sc/source/filter/lotus/lotform.cxx                      |    2 
 sc/source/filter/lotus/lotimpop.cxx                     |    2 
 sc/source/filter/lotus/op.cxx                           |   10 +-
 sc/source/filter/qpro/qpro.cxx                          |    2 
 sc/source/filter/starcalc/scflt.cxx                     |   42 +++++-----
 sc/source/ui/docshell/docsh.cxx                         |    6 -
 sc/source/ui/docshell/impex.cxx                         |    2 
 sc/source/ui/unoobj/confuno.cxx                         |    2 
 sd/source/filter/eppt/eppt.cxx                          |   14 +--
 sd/source/filter/eppt/epptso.cxx                        |   24 +++---
 sd/source/filter/eppt/escherex.cxx                      |    2 
 sd/source/filter/eppt/pptexsoundcollection.cxx          |    4 -
 sd/source/filter/ppt/pptin.cxx                          |    4 -
 sd/source/filter/ppt/propread.cxx                       |   16 ++--
 sd/source/filter/ppt/propread.hxx                       |    2 
 sd/source/ui/app/sdmod1.cxx                             |    2 
 sfx2/source/appl/xpackcreator.cxx                       |    2 
 sfx2/source/doc/docfile.cxx                             |    4 -
 sfx2/source/doc/oleprops.cxx                            |    8 +-
 sfx2/source/doc/sfxbasemodel.cxx                        |    2 
 sot/qa/cppunit/test_sot.cxx                             |    4 -
 sot/source/sdstor/stgcache.cxx                          |    4 -
 sot/source/sdstor/stgdir.cxx                            |   10 +-
 sot/source/sdstor/stgelem.cxx                           |    4 -
 sot/source/sdstor/stgole.cxx                            |    2 
 sot/source/sdstor/stgstrms.cxx                          |   14 +--
 sot/source/sdstor/storage.cxx                           |    4 -
 sot/source/sdstor/storinfo.cxx                          |    2 
 sot/source/sdstor/ucbstorage.cxx                        |   12 +--
 starmath/source/mathtype.cxx                            |    4 -
 starmath/source/smdetect.cxx                            |    2 
 starmath/source/unomodel.cxx                            |    2 
 svgio/qa/cppunit/SvgImportTest.cxx                      |    2 
 svl/source/filerec/filerec.cxx                          |    2 
 svl/source/items/lckbitem.cxx                           |    6 -
 svtools/source/graphic/provider.cxx                     |    2 
 svtools/source/misc/embedhlp.cxx                        |    2 
 svtools/source/misc/embedtransfer.cxx                   |    2 
 svtools/source/misc/imap.cxx                            |    2 
 svtools/source/misc/imap2.cxx                           |    2 
 svtools/source/misc/transfer.cxx                        |    4 -
 svtools/source/urlobj/inetimg.cxx                       |    4 -
 svx/source/gallery2/codec.cxx                           |    4 -
 svx/source/gallery2/galobj.cxx                          |    2 
 svx/source/gallery2/galtheme.cxx                        |    4 -
 svx/source/svdraw/svdotxln.cxx                          |    2 
 svx/source/tbxctrls/Palette.cxx                         |    4 -
 svx/source/xml/xmlgrhlp.cxx                             |   10 +-
 svx/source/xoutdev/_xoutbmp.cxx                         |    4 -
 sw/source/core/edit/edglss.cxx                          |    2 
 sw/source/core/unocore/unoobj.cxx                       |    2 
 sw/source/filter/ascii/parasc.cxx                       |    4 -
 sw/source/filter/ww8/WW8FFData.cxx                      |    6 -
 sw/source/filter/ww8/WW8Sttbf.cxx                       |    2 
 sw/source/filter/ww8/wrtw8esh.cxx                       |   12 +--
 sw/source/filter/ww8/wrtw8nds.cxx                       |   12 +--
 sw/source/filter/ww8/wrtw8num.cxx                       |    6 -
 sw/source/filter/ww8/wrtw8sty.cxx                       |   28 ++-----
 sw/source/filter/ww8/wrtww8.cxx                         |   34 ++++----
 sw/source/filter/ww8/wrtww8gr.cxx                       |   10 +-
 sw/source/filter/ww8/ww8atr.cxx                         |    8 --
 sw/source/filter/ww8/ww8graf2.cxx                       |    4 -
 sw/source/filter/ww8/ww8par.cxx                         |   28 +++----
 sw/source/filter/ww8/ww8par2.cxx                        |    6 -
 sw/source/filter/ww8/ww8par3.cxx                        |    4 -
 sw/source/filter/ww8/ww8par4.cxx                        |    4 -
 sw/source/filter/ww8/ww8scan.cxx                        |   26 +++---
 sw/source/ui/dialog/ascfldlg.cxx                        |    2 
 sw/source/ui/uno/swdetect.cxx                           |    2 
 sw/source/uibase/dbui/mailmergehelper.cxx               |    2 
 sw/source/uibase/dochdl/swdtflvr.cxx                    |    2 
 sw/source/uibase/uno/SwXDocumentSettings.cxx            |    2 
 test/source/htmltesttools.cxx                           |    2 
 test/source/xmltesttools.cxx                            |    2 
 test/source/xmlwriter.cxx                               |    2 
 tools/qa/cppunit/test_stream.cxx                        |    2 
 tools/source/generic/poly.cxx                           |    8 +-
 tools/source/inet/inetstrm.cxx                          |    2 
 tools/source/rc/resmgr.cxx                              |   14 +--
 tools/source/ref/globname.cxx                           |    4 -
 tools/source/ref/pstm.cxx                               |    4 -
 tools/source/stream/stream.cxx                          |   64 ++++++++--------
 tools/source/zcodec/zcodec.cxx                          |   17 ++--
 unotools/source/streaming/streamwrap.cxx                |    6 -
 unotools/source/ucbhelper/xtempfile.cxx                 |    4 -
 vcl/source/bitmap/BitmapTools.cxx                       |    2 
 vcl/source/filter/GraphicNativeTransform.cxx            |    2 
 vcl/source/filter/graphicfilter.cxx                     |   26 +++---
 vcl/source/filter/graphicfilter2.cxx                    |    2 
 vcl/source/filter/igif/gifread.cxx                      |   12 +--
 vcl/source/filter/ixpm/xpmread.cxx                      |    2 
 vcl/source/filter/jpeg/Exif.cxx                         |    4 -
 vcl/source/filter/jpeg/JpegReader.cxx                   |    2 
 vcl/source/filter/jpeg/JpegWriter.cxx                   |    4 -
 vcl/source/filter/sgfbram.cxx                           |   28 +++----
 vcl/source/filter/sgvmain.cxx                           |    2 
 vcl/source/filter/wmf/emfwr.cxx                         |    4 -
 vcl/source/filter/wmf/enhwmf.cxx                        |   22 ++---
 vcl/source/filter/wmf/winwmf.cxx                        |   14 +--
 vcl/source/filter/wmf/wmfwr.cxx                         |    4 -
 vcl/source/gdi/dibtools.cxx                             |   56 +++++++-------
 vcl/source/gdi/gdimtf.cxx                               |    4 -
 vcl/source/gdi/gfxlink.cxx                              |   12 +--
 vcl/source/gdi/impgraph.cxx                             |    5 -
 vcl/source/gdi/jobset.cxx                               |    8 +-
 vcl/source/gdi/metaact.cxx                              |    4 -
 vcl/source/gdi/pdfextoutdevdata.cxx                     |    2 
 vcl/source/gdi/pdfwriter_impl.cxx                       |   11 +-
 vcl/source/gdi/pngread.cxx                              |    2 
 vcl/source/gdi/pngwrite.cxx                             |    2 
 vcl/source/gdi/svgdata.cxx                              |    2 
 vcl/source/gdi/svmconverter.cxx                         |   16 ++--
 vcl/source/image/ImplImageTree.cxx                      |    2 
 vcl/unx/generic/printer/jobdata.cxx                     |    4 -
 vcl/workben/svpclient.cxx                               |    2 
 173 files changed, 651 insertions(+), 651 deletions(-)

New commits:
commit 62d270116bf34778bf581f21b27fa9cdbff7de0e
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Jun 3 14:45:59 2016 +0200

    tools: rename SvStream::Read/Write to ReadBytes/WriteBytes
    
    Change-Id: Ib788a30d413436aa03f813aa2fddcbc4d6cd2f9a
    Reviewed-on: https://gerrit.libreoffice.org/25972
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/avmedia/source/opengl/oglplayer.cxx b/avmedia/source/opengl/oglplayer.cxx
index 883d0c2..61a9809 100644
--- a/avmedia/source/opengl/oglplayer.cxx
+++ b/avmedia/source/opengl/oglplayer.cxx
@@ -54,7 +54,7 @@ static bool lcl_LoadFile( glTFFile* io_pFile, const OUString& rURL)
 
     const sal_Int64 nBytes = aStream.remainingSize();
     char* pBuffer = new char[nBytes];
-    aStream.Read( pBuffer, nBytes );
+    aStream.ReadBytes(pBuffer, nBytes);
     aStream.Close();
 
     io_pFile->buffer = pBuffer;
diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx
index 4100a83..1e1fecc 100644
--- a/basic/source/classes/image.cxx
+++ b/basic/source/classes/image.cxx
@@ -178,7 +178,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
                 if( bBadVer ) break;
                 pCode = new char[ nLen ];
                 nCodeSize = nLen;
-                r.Read( pCode, nCodeSize );
+                r.ReadBytes(pCode, nCodeSize);
                 if ( bLegacy )
                 {
                     ReleaseLegacyBuffer(); // release any previously held buffer
@@ -231,7 +231,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
                     nStringSize = (sal_uInt16) nLen;
 
                     std::unique_ptr<char[]> pByteStrings(new char[ nLen ]);
-                    r.Read( pByteStrings.get(), nStringSize );
+                    r.ReadBytes(pByteStrings.get(), nStringSize);
                     for( short j = 0; j < nStrings; j++ )
                     {
                         sal_uInt16 nOff2 = (sal_uInt16) pStringOff[ j ];
@@ -427,11 +427,11 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
             aNewToLegacy.convert();
             pLegacyPCode = reinterpret_cast<char*>(aNewToLegacy.GetBuffer());
             nLegacyCodeSize = aNewToLegacy.GetSize();
-            r.Write( pLegacyPCode, nLegacyCodeSize );
+            r.WriteBytes(pLegacyPCode, nLegacyCodeSize);
         }
         else
         {
-            r.Write( pCode, nCodeSize );
+            r.WriteBytes(pCode, nCodeSize);
         }
         SbiCloseRecord( r, nPos );
     }
@@ -456,7 +456,7 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer )
             memcpy( pByteStrings.get() + nOff, aStr.getStr(), (aStr.getLength() + 1) * sizeof( char ) );
         }
         r.WriteUInt32( nStringSize );
-        r.Write( pByteStrings.get(), nStringSize );
+        r.WriteBytes(pByteStrings.get(), nStringSize);
 
         pByteStrings.reset();
         SbiCloseRecord( r, nPos );
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index f08edc8..b9b6823 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -648,7 +648,7 @@ SbError SbiStream::Write( const OString& rBuf )
         {
             return nError = ERRCODE_BASIC_BAD_RECORD_LENGTH;
         }
-        pStrm->Write(rBuf.getStr(), nLen);
+        pStrm->WriteBytes(rBuf.getStr(), nLen);
         MapError();
     }
     return nError;
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index 423fd3a..cb8d8a0 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -357,14 +357,14 @@ void connectivity::dbase::ReadHeader(
 #endif
     rStream.ReadUInt32(rHeader.db_rootpage);
     rStream.ReadUInt32(rHeader.db_pagecount);
-    rStream.Read(&rHeader.db_frei, 4);
+    rStream.ReadBytes(&rHeader.db_frei, 4);
     rStream.ReadUInt16(rHeader.db_keylen);
     rStream.ReadUInt16(rHeader.db_maxkeys);
     rStream.ReadUInt16(rHeader.db_keytype);
     rStream.ReadUInt16(rHeader.db_keyrec);
-    rStream.Read(&rHeader.db_frei1, 3);
+    rStream.ReadBytes(&rHeader.db_frei1, 3);
     rStream.ReadUChar(rHeader.db_unique);
-    rStream.Read(&rHeader.db_name, 488);
+    rStream.ReadBytes(&rHeader.db_name, 488);
     assert(rStream.GetError() || rStream.Tell() == nOldPos + DINDEX_PAGE_SIZE);
 }
 
@@ -383,14 +383,14 @@ SvStream& connectivity::dbase::WriteODbaseIndex(SvStream &rStream, ODbaseIndex&
     rStream.Seek(0);
     rStream.WriteUInt32(rIndex.m_aHeader.db_rootpage);
     rStream.WriteUInt32(rIndex.m_aHeader.db_pagecount);
-    rStream.Write(&rIndex.m_aHeader.db_frei, 4);
+    rStream.WriteBytes(&rIndex.m_aHeader.db_frei, 4);
     rStream.WriteUInt16(rIndex.m_aHeader.db_keylen);
     rStream.WriteUInt16(rIndex.m_aHeader.db_maxkeys);
     rStream.WriteUInt16(rIndex.m_aHeader.db_keytype);
     rStream.WriteUInt16(rIndex.m_aHeader.db_keyrec);
-    rStream.Write(&rIndex.m_aHeader.db_frei1, 3);
+    rStream.WriteBytes(&rIndex.m_aHeader.db_frei1, 3);
     rStream.WriteUChar(rIndex.m_aHeader.db_unique);
-    rStream.Write(&rIndex.m_aHeader.db_name, 488);
+    rStream.WriteBytes(&rIndex.m_aHeader.db_name, 488);
     assert(rStream.GetError() || rStream.Tell() == DINDEX_PAGE_SIZE);
     SAL_WARN_IF(rStream.GetError(), "connectivity.dbase", "write error");
     return rStream;
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 7dce6fe..52215a4 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -201,7 +201,7 @@ void ODbaseTable::readHeader()
     if(ERRCODE_NONE != m_pFileStream->GetErrorCode())
         throwInvalidDbaseFormat();
 
-    m_pFileStream->Read(m_aHeader.db_aedat, 3*sizeof(sal_uInt8));
+    m_pFileStream->ReadBytes(m_aHeader.db_aedat, 3);
     if(ERRCODE_NONE != m_pFileStream->GetErrorCode())
         throwInvalidDbaseFormat();
     (*m_pFileStream).ReadUInt32( m_aHeader.db_anz );
@@ -215,7 +215,7 @@ void ODbaseTable::readHeader()
         throwInvalidDbaseFormat();
     if (m_aHeader.db_slng == 0)
         throwInvalidDbaseFormat();
-    m_pFileStream->Read(m_aHeader.db_frei, 20*sizeof(sal_uInt8));
+    m_pFileStream->ReadBytes(m_aHeader.db_frei, 20);
     if(ERRCODE_NONE != m_pFileStream->GetErrorCode())
         throwInvalidDbaseFormat();
 
@@ -326,12 +326,12 @@ void ODbaseTable::fillColumns()
 #if !defined(NDEBUG)
         sal_uInt64 const nOldPos(m_pFileStream->Tell());
 #endif
-        m_pFileStream->Read(aDBFColumn.db_fnm, 11);
+        m_pFileStream->ReadBytes(aDBFColumn.db_fnm, 11);
         m_pFileStream->ReadUChar(aDBFColumn.db_typ);
         m_pFileStream->ReadUInt32(aDBFColumn.db_adr);
         m_pFileStream->ReadUChar(aDBFColumn.db_flng);
         m_pFileStream->ReadUChar(aDBFColumn.db_dez);
-        m_pFileStream->Read(aDBFColumn.db_frei2, 14);
+        m_pFileStream->ReadBytes(aDBFColumn.db_frei2, 14);
         assert(m_pFileStream->GetError() || m_pFileStream->Tell() == nOldPos + sizeof(aDBFColumn));
         if (m_pFileStream->GetError())
         {
@@ -593,7 +593,7 @@ bool ODbaseTable::ReadMemoHeader()
                 // There are files using size specification, though they are dBase-files
                 char sHeader[4];
                 m_pMemoStream->Seek(m_aMemoHeader.db_size);
-                m_pMemoStream->Read(sHeader,4);
+                m_pMemoStream->ReadBytes(sHeader, 4);
 
                 if ((m_pMemoStream->GetErrorCode() != ERRCODE_NONE) || ((sal_uInt8)sHeader[0]) != 0xFF || ((sal_uInt8)sHeader[1]) != 0xFF || ((sal_uInt8)sHeader[2]) != 0x08)
                     m_aMemoHeader.db_typ  = MemodBaseIII;
@@ -1227,7 +1227,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo)
     (*m_pFileStream).WriteUInt16( (m_pColumns->getCount()+1) * 32 + 1 );  // header information,
                                                                           // pColumns contains always an additional column
     (*m_pFileStream).WriteUInt16( 0 );                                     // record length will be determined later
-    m_pFileStream->Write(aBuffer, 20);
+    m_pFileStream->WriteBytes(aBuffer, 20);
 
     sal_uInt16 nRecLength = 1;                                              // Length 1 for deleted flag
     sal_Int32  nMaxFieldLength = m_pConnection->getMetaData()->getMaxColumnNameLength();
@@ -1255,7 +1255,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo)
             }
 
             (*m_pFileStream).WriteCharPtr( aCol.getStr() );
-            m_pFileStream->Write(aBuffer, 11 - aCol.getLength());
+            m_pFileStream->WriteBytes(aBuffer, 11 - aCol.getLength());
 
             sal_Int32 nPrecision = 0;
             xCol->getPropertyValue(sPropPrec) >>= nPrecision;
@@ -1312,7 +1312,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo)
             if ( nDbaseType == VisualFoxPro )
                 (*m_pFileStream).WriteUInt32( nRecLength-1 );
             else
-                m_pFileStream->Write(aBuffer, 4);
+                m_pFileStream->WriteBytes(aBuffer, 4);
 
             switch(cTyp)
             {
@@ -1378,7 +1378,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo)
                 default:
                     throwInvalidColumnType(STR_INVALID_COLUMN_TYPE, aName);
             }
-            m_pFileStream->Write(aBuffer, 14);
+            m_pFileStream->WriteBytes(aBuffer, 14);
             aBuffer[0] = 0x00;
         }
 
@@ -1564,7 +1564,7 @@ bool ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow, const
     // position on desired record:
     sal_Size nPos = m_aHeader.db_kopf + (long)(m_nFilePos-1) * m_aHeader.db_slng;
     m_pFileStream->Seek(nPos);
-    m_pFileStream->Read(m_pBuffer, m_aHeader.db_slng);
+    m_pFileStream->ReadBytes(m_pBuffer, m_aHeader.db_slng);
 
     sal_Size nMemoFileSize( 0 );
     if (HasMemoFields() && m_pMemoStream)
@@ -2049,7 +2049,7 @@ bool ODbaseTable::WriteMemo(const ORowSetValue& aVariable, sal_Size& rBlockNr)
                 char sHeader[4];
                 m_pMemoStream->Seek(rBlockNr * m_aMemoHeader.db_size);
                 m_pMemoStream->SeekRel(4L);
-                m_pMemoStream->Read(sHeader,4);
+                m_pMemoStream->ReadBytes(sHeader, 4);
 
                 sal_Size nOldSize;
                 if (m_aMemoHeader.db_typ == MemoFoxPro)
@@ -2091,7 +2091,7 @@ bool ODbaseTable::WriteMemo(const ORowSetValue& aVariable, sal_Size& rBlockNr)
         {
             const char cEOF = (char) DBF_EOL;
             nSize++;
-            m_pMemoStream->Write( aStr.getStr(), aStr.getLength() );
+            m_pMemoStream->WriteBytes(aStr.getStr(), aStr.getLength());
             (*m_pMemoStream).WriteChar( cEOF ).WriteChar( cEOF );
         } break;
         case MemoFoxPro:
@@ -2124,11 +2124,11 @@ bool ODbaseTable::WriteMemo(const ORowSetValue& aVariable, sal_Size& rBlockNr)
                     nHeader[i++] = (sal_uInt8) (nWriteSize % 256);
             }
 
-            m_pMemoStream->Write(nHeader,4);
+            m_pMemoStream->WriteBytes(nHeader, 4);
             if ( bBinary )
-                m_pMemoStream->Write( aValue.getConstArray(), aValue.getLength() );
+                m_pMemoStream->WriteBytes(aValue.getConstArray(), aValue.getLength());
             else
-                m_pMemoStream->Write( aStr.getStr(), aStr.getLength() );
+                m_pMemoStream->WriteBytes(aStr.getStr(), aStr.getLength());
             m_pMemoStream->Flush();
         }
     }
@@ -2638,7 +2638,7 @@ bool ODbaseTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_Int32
         if (m_pFileStream->GetError() != ERRCODE_NONE)
             goto Error;
 
-        sal_Size nRead = m_pFileStream->Read(m_pBuffer, nEntryLen);
+        sal_Size nRead = m_pFileStream->ReadBytes(m_pBuffer, nEntryLen);
         if (nRead != nEntryLen)
         {
             SAL_WARN("connectivity.drivers", "ODbaseTable::seekRow: short read!");
@@ -2690,7 +2690,7 @@ bool ODbaseTable::ReadMemo(sal_Size nBlockNo, ORowSetValue& aVariable)
 
             do
             {
-                m_pMemoStream->Read(&aBuf,512);
+                m_pMemoStream->ReadBytes(&aBuf, 512);
 
                 sal_uInt16 i = 0;
                 while (aBuf[i] != cEOF && ++i < 512)
@@ -2711,7 +2711,7 @@ bool ODbaseTable::ReadMemo(sal_Size nBlockNo, ORowSetValue& aVariable)
         {
             bool bIsText = true;
             char sHeader[4];
-            m_pMemoStream->Read(sHeader,4);
+            m_pMemoStream->ReadBytes(sHeader, 4);
             // Foxpro stores text and binary data
             if (m_aMemoHeader.db_typ == MemoFoxPro)
             {
@@ -2741,7 +2741,7 @@ bool ODbaseTable::ReadMemo(sal_Size nBlockNo, ORowSetValue& aVariable)
                 else
                 {
                     css::uno::Sequence< sal_Int8 > aData(nLength);
-                    m_pMemoStream->Read(aData.getArray(),nLength);
+                    m_pMemoStream->ReadBytes(aData.getArray(), nLength);
                     aVariable = aData;
                 }
             } // if ( nLength )
@@ -2778,7 +2778,7 @@ bool ODbaseTable::WriteBuffer()
     // position on desired record:
     sal_Size nPos = m_aHeader.db_kopf + (long)(m_nFilePos-1) * m_aHeader.db_slng;
     m_pFileStream->Seek(nPos);
-    return m_pFileStream->Write(m_pBuffer, m_aHeader.db_slng) > 0;
+    return m_pFileStream->WriteBytes(m_pBuffer, m_aHeader.db_slng) > 0;
 }
 
 sal_Int32 ODbaseTable::getCurrentLastPos() const
diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx
index f50567d..3451cb9 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -707,7 +707,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const
         {
             sal_uInt8 buf[sizeof(double)];
             memset(&buf[0], 0, sizeof(double));
-            rStream.Write(&buf[0], sizeof(double));
+            rStream.WriteBytes(&buf[0], sizeof(double));
         }
         else
             rStream.WriteDouble( (double) aKey.getValue() );
@@ -724,7 +724,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const
             strncpy(reinterpret_cast<char *>(&pBuf[0]), aText.getStr(),
                 std::min<size_t>(nLen, aText.getLength()));
         }
-        rStream.Write(&pBuf[0], nLen);
+        rStream.WriteBytes(&pBuf[0], nLen);
     }
     WriteONDXPagePtr( rStream, aChild );
 }
@@ -871,7 +871,7 @@ SvStream& connectivity::dbase::WriteONDXPage(SvStream &rStream, const ONDXPage&
 
         char aEmptyData[DINDEX_PAGE_SIZE];
         memset(aEmptyData,0x00,DINDEX_PAGE_SIZE);
-        rStream.Write(aEmptyData, DINDEX_PAGE_SIZE);
+        rStream.WriteBytes(aEmptyData, DINDEX_PAGE_SIZE);
     }
     rStream.Seek(rPage.GetPagePos() * DINDEX_PAGE_SIZE);
 
@@ -893,7 +893,7 @@ SvStream& connectivity::dbase::WriteONDXPage(SvStream &rStream, const ONDXPage&
         {
             std::unique_ptr<char[]> pEmptyData( new char[nRemainSize] );
             memset(pEmptyData.get(), 0x00, nRemainSize);
-            rStream.Write(pEmptyData.get(), nRemainSize);
+            rStream.WriteBytes(pEmptyData.get(), nRemainSize);
             rStream.Seek(nTell);
         }
     }
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 0b31a3a..bc82c84 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1848,7 +1848,7 @@ namespace cppcanvas
 
                     OSL_ENSURE(dataSize >= 4, "No room for TotalObjectSize in EmfPlusContinuedObjectRecord");
                     // 1st 4 bytes are TotalObjectSize
-                    mMStream.Write (static_cast<const char *>(rMF.GetData()) + rMF.Tell() + 4, dataSize - 4);
+                    mMStream.WriteBytes(static_cast<const char *>(rMF.GetData()) + rMF.Tell() + 4, dataSize - 4);
                     SAL_INFO("cppcanvas.emf", "EMF+ read next object part size: " << size << " type: " << type << " flags: " << flags << " data size: " << dataSize);
                 } else {
                     if (mbMultipart) {
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index fa84fe3..77b2ee6 100644
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -123,7 +123,7 @@ bool IsUserWordbook( const OUString& rFile )
         static sal_Size nVerOOo7Len = sal::static_int_cast< sal_Size >(strlen( pVerOOo7 ));
         sal_Char pMagicHeader[MAX_HEADER_LENGTH];
         pMagicHeader[ nVerOOo7Len ] = '\0';
-        if ((pStream->Read(static_cast<void *>(pMagicHeader), nVerOOo7Len) == nVerOOo7Len))
+        if ((pStream->ReadBytes(static_cast<void *>(pMagicHeader), nVerOOo7Len) == nVerOOo7Len))
         {
             if ( !strcmp(pMagicHeader, pVerOOo7) )
                 bRet = true;
@@ -134,7 +134,7 @@ bool IsUserWordbook( const OUString& rFile )
                 pStream->ReadUInt16( nLen );
                 if ( nLen < MAX_HEADER_LENGTH )
                 {
-                   pStream->Read(pMagicHeader, nLen);
+                   pStream->ReadBytes(pMagicHeader, nLen);
                    pMagicHeader[nLen] = '\0';
                     if ( !strcmp(pMagicHeader, "WBSWG2")
                      ||  !strcmp(pMagicHeader, "WBSWG5")
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index 06ac069..1ae6ff3 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -1221,14 +1221,15 @@ void EditTextObjectImpl::StoreData( SvStream& rOStream ) const
             const ContentInfo& rC = *aContents[nPara].get();
             sal_uInt16 nL = rC.GetText().getLength();
             rOStream.WriteUInt16( nL );
-            rOStream.Write(rC.GetText().getStr(), nL*sizeof(sal_Unicode));
+            // FIXME this isn't endian safe, but presumably this is just used for copy/paste?
+            rOStream.WriteBytes(rC.GetText().getStr(), nL*sizeof(sal_Unicode));
 
             // StyleSheetName must be Unicode too!
             // Copy/Paste from EA3 to BETA or from BETA to EA3 not possible, not needed...
             // If needed, change nL back to sal_uLong and increase version...
             nL = rC.GetStyle().getLength();
             rOStream.WriteUInt16( nL );
-            rOStream.Write(rC.GetStyle().getStr(), nL*sizeof(sal_Unicode));
+            rOStream.WriteBytes(rC.GetStyle().getStr(), nL*sizeof(sal_Unicode));
         }
     }
 }
@@ -1495,7 +1496,8 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
                     }
 
                     rtl_uString *pStr = rtl_uString_alloc(nL);
-                    rIStream.Read(pStr->buffer, nL*sizeof(sal_Unicode));
+                    // FIXME this isn't endian safe, but presumably this is just used for copy/paste?
+                    rIStream.ReadBytes(pStr->buffer, nL*sizeof(sal_Unicode));
                     rC.SetText((OUString(pStr, SAL_NO_ACQUIRE)));
 
                     nL = 0;
@@ -1514,7 +1516,7 @@ void EditTextObjectImpl::CreateData( SvStream& rIStream )
                     }
 
                     rtl_uString *pStr = rtl_uString_alloc(nL);
-                    rIStream.Read(pStr->buffer, nL*sizeof(sal_Unicode) );
+                    rIStream.ReadBytes(pStr->buffer, nL*sizeof(sal_Unicode) );
                     rC.GetStyle() = OUString(pStr, SAL_NO_ACQUIRE);
                 }
             }
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index 121dcf8..4f2c03e 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -529,7 +529,7 @@ static void write_unicode( SvPersistStream & rStm, const OUString& rString )
     sal_uInt16 nL =  sal::static_int_cast<sal_uInt16>(rString.getLength());
     rStm.WriteUInt16( nL );
     //endian specific?, yipes!
-    rStm.Write( rString.getStr(), nL*sizeof(sal_Unicode) );
+    rStm.WriteBytes( rString.getStr(), nL*sizeof(sal_Unicode) );
 }
 
 static OUString read_unicode( SvPersistStream & rStm )
@@ -548,7 +548,7 @@ static OUString read_unicode( SvPersistStream & rStm )
     {
         pStr = rtl_uString_alloc(nL);
         //endian specific?, yipes!
-        rStm.Read(pStr->buffer, nL*sizeof(sal_Unicode));
+        rStm.ReadBytes(pStr->buffer, nL*sizeof(sal_Unicode));
     }
     //take ownership of buffer and return, otherwise return empty string
     return pStr ? OUString(pStr, SAL_NO_ACQUIRE) : OUString();
diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx
index f1bff60..9919575 100644
--- a/extensions/source/scanner/sane.cxx
+++ b/extensions/source/scanner/sane.cxx
@@ -793,7 +793,7 @@ bool Sane::Start( BitmapTransporter& rBitmap )
                         SAL_WARN( "extensions.scanner", "short read, padding with zeros" );
                         memset(pBuffer + items_read, 0, aParams.bytes_per_line - items_read);
                     }
-                    aConverter.Write( pBuffer, aParams.bytes_per_line );
+                    aConverter.WriteBytes(pBuffer, aParams.bytes_per_line);
                 }
                 else if( eType == FrameStyle_Gray )
                 {
diff --git a/extensions/source/scanner/scanunx.cxx b/extensions/source/scanner/scanunx.cxx
index b92fb55..268ab10 100644
--- a/extensions/source/scanner/scanunx.cxx
+++ b/extensions/source/scanner/scanunx.cxx
@@ -70,7 +70,7 @@ Sequence< sal_Int8 > BitmapTransporter::getDIB() throw(std::exception)
     m_aStream.Seek( 0 );
 
     Sequence< sal_Int8 > aValue( nBytes );
-    m_aStream.Read( aValue.getArray(), nBytes );
+    m_aStream.ReadBytes( aValue.getArray(), nBytes );
     m_aStream.Seek( nPreviousPos );
 
     return aValue;
diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx
index 7e58b21..b91c0f3 100644
--- a/filter/source/flash/swfwriter.cxx
+++ b/filter/source/flash/swfwriter.cxx
@@ -120,7 +120,7 @@ void ImplCopySvStreamToXOutputStream( SvStream& rIn, Reference< XOutputStream >
             aBuffer.realloc( nSize );
         }
 
-        sal_uInt32 nRead = rIn.Read( aBuffer.getArray(), nBufferSize );
+        sal_uInt32 nRead = rIn.ReadBytes(aBuffer.getArray(), nBufferSize);
         DBG_ASSERT( nRead == nBufferSize, "ImplCopySvStreamToXOutputStream failed!" );
         xOut->writeBytes( aBuffer );
 
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 09246d6..64c234b 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -963,7 +963,7 @@ void Writer::Impl_writeBmp( sal_uInt16 nBitmapId, sal_uInt32 width, sal_uInt32 h
     mpTag->addUI16( uInt16_(width) );
     mpTag->addUI16( uInt16_(height) );
 
-    mpTag->Write( pCompressed, compressed_size );
+    mpTag->WriteBytes(pCompressed, compressed_size);
 
     endTag();
 }
@@ -1030,8 +1030,8 @@ void Writer::Impl_writeJPEG(sal_uInt16 nBitmapId, const sal_uInt8* pJpgData, sal
         {
         case 0xD8:
         case 0xD9:
-            EncodingTableStream.Write( pJpgSearch, nLength );
-            ImageBitsStream.Write( pJpgSearch, nLength );
+            EncodingTableStream.WriteBytes(pJpgSearch, nLength);
+            ImageBitsStream.WriteBytes(pJpgSearch, nLength);
             break;
 
         case 0x01:
@@ -1039,7 +1039,7 @@ void Writer::Impl_writeJPEG(sal_uInt16 nBitmapId, const sal_uInt8* pJpgData, sal
         case 0xDC:
         case 0xDD:
         case 0xC4:
-            EncodingTableStream.Write( pJpgSearch, nLength );
+            EncodingTableStream.WriteBytes(pJpgSearch, nLength);
             break;
 
         case 0xC0:
@@ -1058,7 +1058,7 @@ void Writer::Impl_writeJPEG(sal_uInt16 nBitmapId, const sal_uInt8* pJpgData, sal
         case 0xCF:
         case 0xDA:
         case 0xE0:
-            ImageBitsStream.Write( pJpgSearch, nLength );
+            ImageBitsStream.WriteBytes(pJpgSearch, nLength);
             break;
 
         default:
@@ -1084,10 +1084,10 @@ void Writer::Impl_writeJPEG(sal_uInt16 nBitmapId, const sal_uInt8* pJpgData, sal
 
         mpTag->addUI32( nEncodingTableSize + nImageBitsSize );
 
-        mpTag->Write(EncodingTableStream.GetData(), nEncodingTableSize);
-        mpTag->Write(ImageBitsStream.GetData(), nImageBitsSize);
+        mpTag->WriteBytes(EncodingTableStream.GetData(), nEncodingTableSize);
+        mpTag->WriteBytes(ImageBitsStream.GetData(), nImageBitsSize);
 
-        mpTag->Write( pAlphaCompressed, alpha_compressed_size );
+        mpTag->WriteBytes(pAlphaCompressed, alpha_compressed_size);
 
         endTag();
     }
@@ -1097,8 +1097,8 @@ void Writer::Impl_writeJPEG(sal_uInt16 nBitmapId, const sal_uInt8* pJpgData, sal
 
         mpTag->addUI16( nBitmapId );
 
-        mpTag->Write(EncodingTableStream.GetData(), nEncodingTableSize);
-        mpTag->Write(ImageBitsStream.GetData(), nImageBitsSize);
+        mpTag->WriteBytes(EncodingTableStream.GetData(), nEncodingTableSize);
+        mpTag->WriteBytes(ImageBitsStream.GetData(), nImageBitsSize);
 
         endTag();
     }
diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx
index 4d6683e..2b2e8c1 100644
--- a/filter/source/flash/swfwriter2.cxx
+++ b/filter/source/flash/swfwriter2.cxx
@@ -159,7 +159,7 @@ void Tag::write( SvStream &out )
         }
     }
 
-    out.Write( GetData(), nSz );
+    out.WriteBytes( GetData(), nSz );
 }
 #if 0
 
diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx
index 8e26156..5955b8f 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/filter/source/graphicfilter/egif/egif.cxx
@@ -286,7 +286,7 @@ void GIFWriter::WriteSignature( bool bGIF89a )
 {
     if( bStatus )
     {
-        m_rGIF.Write( bGIF89a ? "GIF89a" : "GIF87a" , 6 );
+        m_rGIF.WriteBytes(bGIF89a ? "GIF89a" : "GIF87a" , 6);
 
         if( m_rGIF.GetError() )
             bStatus = false;
@@ -345,7 +345,7 @@ void GIFWriter::WriteLoopExtension( const Animation& rAnimation )
         m_rGIF.WriteUChar( 0x21 );
         m_rGIF.WriteUChar( 0xff );
         m_rGIF.WriteUChar( 0x0b );
-        m_rGIF.Write( "NETSCAPE2.0", 11 );
+        m_rGIF.WriteBytes( "NETSCAPE2.0", 11 );
         m_rGIF.WriteUChar( 0x03 );
         m_rGIF.WriteUChar( 0x01 );
         m_rGIF.WriteUChar( cLoByte );
@@ -363,7 +363,7 @@ void GIFWriter::WriteLogSizeExtension( const Size& rSize100 )
         m_rGIF.WriteUChar( 0x21 );
         m_rGIF.WriteUChar( 0xff );
         m_rGIF.WriteUChar( 0x0b );
-        m_rGIF.Write( "STARDIV 5.0", 11 );
+        m_rGIF.WriteBytes( "STARDIV 5.0", 11 );
         m_rGIF.WriteUChar( 0x09 );
         m_rGIF.WriteUChar( 0x01 );
         m_rGIF.WriteUInt32( rSize100.Width() );
diff --git a/filter/source/graphicfilter/egif/giflzwc.cxx b/filter/source/graphicfilter/egif/giflzwc.cxx
index 7f5709a..3c2a62f 100644
--- a/filter/source/graphicfilter/egif/giflzwc.cxx
+++ b/filter/source/graphicfilter/egif/giflzwc.cxx
@@ -94,7 +94,7 @@ void GIFImageDataOutputStream::FlushBlockBuf()
     if( nBlockBufSize )
     {
         rStream.WriteUChar( nBlockBufSize );
-        rStream.Write( pBlockBuf,nBlockBufSize );
+        rStream.WriteBytes(pBlockBuf, nBlockBufSize);
         nBlockBufSize = 0;
     }
 }
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index c22e469..14a3c87 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -1173,7 +1173,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
                         ImplWriteLine( "gs" );
                         ImplGetMapMode( aMapMode );
                         ImplWriteLine( "%%BeginDocument:" );
-                        mpPS->Write( pSource, aGfxLink.GetDataSize() );
+                        mpPS->WriteBytes(pSource, aGfxLink.GetDataSize());
                         ImplWriteLine( "%%EndDocument\ngr" );
                     }
                 }
diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx
index 30804b0..00d3cec 100644
--- a/filter/source/graphicfilter/icgm/cgm.cxx
+++ b/filter/source/graphicfilter/icgm/cgm.cxx
@@ -675,7 +675,7 @@ bool CGM::Write( SvStream& rIStm )
 
     mnParaSize = 0;
     mpSource = mpBuf;
-    if (rIStm.Read(mpSource, 2) != 2)
+    if (rIStm.ReadBytes(mpSource, 2) != 2)
         return false;
     mpEndValidSource = mpSource + 2;
     mnEscape = ImplGetUI16();
@@ -685,7 +685,7 @@ bool CGM::Write( SvStream& rIStm )
 
     if ( mnElementSize == 31 )
     {
-        if (rIStm.Read(mpSource + mnParaSize, 2) != 2)
+        if (rIStm.ReadBytes(mpSource + mnParaSize, 2) != 2)
             return false;
         mpEndValidSource = mpSource + mnParaSize + 2;
         mnElementSize = ImplGetUI16();
@@ -693,7 +693,7 @@ bool CGM::Write( SvStream& rIStm )
     mnParaSize = 0;
     if (mnElementSize)
     {
-        if (rIStm.Read(mpSource, mnElementSize) != mnElementSize)
+        if (rIStm.ReadBytes(mpSource, mnElementSize) != mnElementSize)
             return false;
         mpEndValidSource = mpSource + mnElementSize;
     }
diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.cxx b/filter/source/graphicfilter/idxf/dxfgrprd.cxx
index ac1ca2d..44672ed 100644
--- a/filter/source/graphicfilter/idxf/dxfgrprd.cxx
+++ b/filter/source/graphicfilter/idxf/dxfgrprd.cxx
@@ -39,7 +39,7 @@ OString DXFReadLine(SvStream& rIStm)
     while( !bEnd && !rIStm.GetError() )   // !!! do not check for EOF
                                           // !!! because we read blockwise
     {
-        sal_uInt16 nLen = (sal_uInt16)rIStm.Read( buf, sizeof(buf)-1 );
+        sal_uInt16 nLen = static_cast<sal_uInt16>(rIStm.ReadBytes(buf, sizeof(buf)-1));
         if( !nLen )
         {
             if( aBuf.isEmpty() )
@@ -76,7 +76,7 @@ OString DXFReadLine(SvStream& rIStm)
     if( bEnd && (c=='\r' || c=='\n'))  // special treatment of DOS files
     {
         char cTemp(0);
-        rIStm.Read(&cTemp, 1);
+        rIStm.ReadBytes(&cTemp, 1);
         if( cTemp == c || (cTemp != '\n' && cTemp != '\r') )
             rIStm.Seek( nOldFilePos );
     }
@@ -89,7 +89,7 @@ void DXFSkipLine(SvStream& rIStm)
     while (rIStm.good())
     {
         char  buf[256 + 1];
-        sal_uInt16 nLen = (sal_uInt16)rIStm.Read(buf, sizeof(buf) - 1);
+        sal_uInt16 nLen = static_cast<sal_uInt16>(rIStm.ReadBytes(buf, sizeof(buf) - 1));
         for (sal_uInt16 n = 0; n < nLen; n++)
         {
             char c = buf[n];
@@ -97,7 +97,7 @@ void DXFSkipLine(SvStream& rIStm)
             {
                 rIStm.SeekRel(n-nLen+1); // return stream to next to current position
                 char c1 = 0;
-                rIStm.Read(&c1, 1);
+                rIStm.ReadBytes(&c1, 1);
                 if (c1 == c || (c1 != '\n' && c1!= '\r'))
                     rIStm.SeekRel(-1);
                 return;
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 82d397e..d6ba321 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -203,7 +203,7 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r
     osl::FileBase::getSystemPathFromFileURL(aTempInput.GetURL(), input);
 
     SvStream* pInputStream = aTempInput.GetStream(StreamMode::WRITE);
-    sal_uInt64 nCount = pInputStream->Write(pBuf, nBytesRead);
+    sal_uInt64 nCount = pInputStream->WriteBytes(pBuf, nBytesRead);
     aTempInput.CloseStream();
 
     //fdo#64161 pstoedit under non-windows uses libEMF to output the EMF, but
@@ -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.Write(aBuf, sal::static_int_cast< sal_Size >(nCount));
+            aMemStm.WriteBytes(aBuf, sal::static_int_cast< sal_Size >(nCount));
             eFileErr = osl_readFile(pOut, aBuf, 32000, &nCount);
         }
 
@@ -420,15 +420,15 @@ void CreateMtfReplacementAction( GDIMetaFile& rMtf, SvStream& rStrm, sal_uInt32
         {
             std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[ nSizeWMF ]);
             rStrm.Seek( nOrigPos + nPosWMF );
-            rStrm.Read( pBuf.get(), nSizeWMF );
-            aReplacement.Write( pBuf.get(), nSizeWMF );
+            rStrm.ReadBytes(pBuf.get(), nSizeWMF);
+            aReplacement.WriteBytes(pBuf.get(), nSizeWMF);
         }
         if ( nSizeTIFF )
         {
             std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[ nSizeTIFF ]);
             rStrm.Seek( nOrigPos + nPosTIFF );
-            rStrm.Read( pBuf.get(), nSizeTIFF );
-            aReplacement.Write( pBuf.get(), nSizeTIFF );
+            rStrm.ReadBytes(pBuf.get(), nSizeTIFF);
+            aReplacement.WriteBytes(pBuf.get(), nSizeTIFF);
         }
         rMtf.AddAction( static_cast<MetaAction*>( new MetaCommentAction( aComment, 0, static_cast<const sal_uInt8*>(aReplacement.GetData()), aReplacement.Tell() ) ) );
     }
@@ -581,7 +581,7 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
     }
     std::unique_ptr<sal_uInt8[]> pHeader( new sal_uInt8[ 22 ] );
     rStream.Seek( nPSStreamPos );
-    rStream.Read( pHeader.get(), 22 );    // check PostScript header
+    rStream.ReadBytes(pHeader.get(), 22); // check PostScript header
     if ( ImplSearchEntry( pHeader.get(), reinterpret_cast<sal_uInt8 const *>("%!PS-Adobe"), 10, 10 ) &&
         ImplSearchEntry( &pHeader[ 15 ], reinterpret_cast<sal_uInt8 const *>("EPS"), 3, 3 ) )
     {
@@ -589,7 +589,7 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
         std::unique_ptr<sal_uInt8[]> pBuf( new sal_uInt8[ nPSSize ] );
 
         sal_uInt32 nBufStartPos = rStream.Tell();
-        sal_uInt32 nBytesRead = rStream.Read( pBuf.get(), nPSSize );
+        sal_uInt32 nBytesRead = rStream.ReadBytes(pBuf.get(), nPSSize);
         if ( nBytesRead == nPSSize )
         {
             sal_uInt32 nSecurityCount = 32;
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index 253a5c8..f97bd23 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -2260,7 +2260,7 @@ void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen)
             // OK, now the map data is being pushed. Unfortunately OS2 and BMP
             // do have a different RGB ordering when using 24-bit
             std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[nDataLen]);
-            pOS2MET->Read(pBuf.get(),nDataLen);
+            pOS2MET->ReadBytes(pBuf.get(), nDataLen);
             if (p->nBitsPerPixel==24) {
                 sal_uLong i, j, nAlign, nBytesPerLine;
                 sal_uInt8 nTemp;
@@ -2278,7 +2278,7 @@ void OS2METReader::ReadImageData(sal_uInt16 nDataID, sal_uInt16 nDataLen)
                     }
                 }
             }
-            p->pBMP->Write(pBuf.get(),nDataLen);
+            p->pBMP->WriteBytes(pBuf.get(), nDataLen);
             p->nMapPos+=nDataLen;
             break;
         }
@@ -2321,7 +2321,7 @@ void OS2METReader::ReadFont(sal_uInt16 nFieldSize)
                     case 0x08: { // Font Typeface
                         char str[33];
                         pOS2MET->SeekRel(1);
-                        pOS2MET->Read( &str, 32 );
+                        pOS2MET->ReadBytes( &str, 32 );
                         str[ 32 ] = 0;
                         OUString aStr( str, strlen(str), osl_getThreadTextEncoding() );
                         if ( aStr.compareToIgnoreAsciiCase( "Helv" ) == 0 )
@@ -2588,8 +2588,8 @@ void OS2METReader::ReadField(sal_uInt16 nFieldType, sal_uInt16 nFieldSize)
                 pOrdFile->SetEndian(SvStreamEndian::LITTLE);
             }
             std::unique_ptr<sal_uInt8[]> pBuf(new sal_uInt8[nFieldSize]);
-            pOS2MET->Read(pBuf.get(),nFieldSize);
-            pOrdFile->Write(pBuf.get(),nFieldSize);
+            pOS2MET->ReadBytes(pBuf.get(), nFieldSize);
+            pOrdFile->WriteBytes(pBuf.get(), nFieldSize);
             break;
         }
         case MapCodFntMagic:
diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx
index 42861de..7ae9f32 100644
--- a/filter/source/graphicfilter/ipcd/ipcd.cxx
+++ b/filter/source/graphicfilter/ipcd/ipcd.cxx
@@ -174,7 +174,7 @@ void PCDReader::CheckPCDImagePacFile()
     char Buf[ 8 ];
 
     m_rPCD.Seek( 2048 );
-    m_rPCD.Read( Buf, 7 );
+    m_rPCD.ReadBytes(Buf, 7);
     Buf[ 7 ] = 0;
     if (OString(Buf) != "PCD_IPI")
         bStatus = false;
@@ -235,10 +235,10 @@ void PCDReader::ReadImage()
     m_rPCD.Seek( nImagePos );
 
     // next pair of rows := first pair of rows:
-    m_rPCD.Read( pL0N, nWidth );
-    m_rPCD.Read( pL1N, nWidth );
-    m_rPCD.Read( pCbN, nW2 );
-    m_rPCD.Read( pCrN, nW2 );
+    m_rPCD.ReadBytes( pL0N, nWidth );
+    m_rPCD.ReadBytes( pL1N, nWidth );
+    m_rPCD.ReadBytes( pCbN, nW2 );
+    m_rPCD.ReadBytes( pCrN, nW2 );
     pCbN[ nW2 ] = pCbN[ nW2 - 1 ];
     pCrN[ nW2 ] = pCrN[ nW2 - 1 ];
 
@@ -253,10 +253,10 @@ void PCDReader::ReadImage()
         // get the next pair of rows:
         if ( nYPair < nH2 - 1 )
         {
-            m_rPCD.Read( pL0N, nWidth );
-            m_rPCD.Read( pL1N, nWidth );
-            m_rPCD.Read( pCbN, nW2 );
-            m_rPCD.Read( pCrN, nW2 );
+            m_rPCD.ReadBytes( pL0N, nWidth );
+            m_rPCD.ReadBytes( pL1N, nWidth );
+            m_rPCD.ReadBytes( pCbN, nW2 );
+            m_rPCD.ReadBytes( pCrN, nW2 );
             pCbN[nW2]=pCbN[ nW2 - 1 ];
             pCrN[nW2]=pCrN[ nW2 - 1 ];
         }
diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx
index b5cef04..2aa8c6f 100644
--- a/filter/source/graphicfilter/ipcx/ipcx.cxx
+++ b/filter/source/graphicfilter/ipcx/ipcx.cxx
@@ -237,7 +237,7 @@ void PCXReader::ImplReadBody(BitmapWriteAccess * pAcc)
         for ( np = 0; np < nPlanes; np++)
         {
             if ( nEncoding == 0)
-                m_rPCX.Read( static_cast<void *>(pPlane[ np ]), nBytesPerPlaneLin );
+                m_rPCX.ReadBytes( static_cast<void *>(pPlane[ np ]), nBytesPerPlaneLin );
             else
             {
                 pDest = pPlane[ np ];
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index 188595f..2cafb48 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -684,7 +684,7 @@ sal_uLong PictReader::ReadAndDrawText()
 
     pPict->ReadChar( nByteLen ); nLen=((sal_uLong)nByteLen)&0x000000ff;
     nDataLen = nLen + 1;
-    pPict->Read( &sText, nLen );
+    pPict->ReadBytes(&sText, nLen);
 
     if (IsInvisible(PDM_TEXT)) return nDataLen;
     DrawingMethod(PDM_TEXT);
@@ -1177,7 +1177,7 @@ void PictReader::ReadHeader()
           nOffset = 509+st; // illogical : more logical will be nStartPos+509+st or to consider that nStartPos=0
           // a small test to check if versionOp code exists after the bdbox ( with no extra NOP codes)
           pPict->Seek(nOffset+10);
-          pPict->Read( sBuf, 2 );
+          pPict->ReadBytes(sBuf, 2);
           if (pPict->IsEof() || pPict->GetError()) break;
           if (sBuf[0] == 0x11 || (sBuf[0] == 0x00 && sBuf[1] == 0x11)) ; // maybe ok
           else continue;
@@ -1198,7 +1198,7 @@ void PictReader::ReadHeader()
 
         if (pPict->IsEof() || pPict->GetError()) continue;
         // read version
-        pPict->Read( sBuf, 2 );
+        pPict->ReadBytes(sBuf, 2);
         // version 1 file
         if ( sBuf[ 0 ] == 0x11 && sBuf[ 1 ] == 0x01 ) {
           // pict v1 must be rare and we do only few tests
@@ -1211,7 +1211,7 @@ void PictReader::ReadHeader()
           {
         numZero++;
         pPict->SeekRel(-1);
-        pPict->Read( sBuf, 2 );
+        pPict->ReadBytes(sBuf, 2);
           }
         while ( sBuf[0] == 0x00 && numZero < 10);
         actualConfid -= (numZero-1); // extra nop are dubious
@@ -1589,7 +1589,7 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode)
         else                      aActFont.SetFamily(FAMILY_ROMAN);
         aActFont.SetCharSet(GetTextEncoding(nUSHORT));
         pPict->ReadChar( nByteLen ); nLen=((sal_uInt16)nByteLen)&0x00ff;
-        pPict->Read( &sFName, nLen );
+        pPict->ReadBytes(&sFName, nLen);
         sFName[ nLen ] = 0;
         OUString aString( sFName, strlen(sFName), osl_getThreadTextEncoding() );
         aActFont.SetFamilyName( aString );
diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx
index 5b68a17..7f76383 100644
--- a/filter/source/graphicfilter/ipsd/ipsd.cxx
+++ b/filter/source/graphicfilter/ipsd/ipsd.cxx
@@ -237,7 +237,7 @@ bool PSDReader::ImplReadHeader()
             if ( nColorLength != 768 )      // we need the color map
                 return false;
             mpPalette = new sal_uInt8[ 768 ];
-            m_rPSD.Read( mpPalette, 768 );
+            m_rPSD.ReadBytes(mpPalette, 768);
         }
         break;
 
diff --git a/filter/source/graphicfilter/itga/itga.cxx b/filter/source/graphicfilter/itga/itga.cxx
index 6bf858c..33464c5 100644
--- a/filter/source/graphicfilter/itga/itga.cxx
+++ b/filter/source/graphicfilter/itga/itga.cxx
@@ -217,12 +217,12 @@ bool TGAReader::ImplReadHeader()
         {
             mnTGAVersion = 2;
 
-            m_rTGA.Read( mpExtension->sAuthorName, 41 );
-            m_rTGA.Read( mpExtension->sAuthorComment, 324 );
-            m_rTGA.Read( mpExtension->sDateTimeStamp, 12 );
-            m_rTGA.Read( mpExtension->sJobNameID, 12 );
+            m_rTGA.ReadBytes(mpExtension->sAuthorName, 41);
+            m_rTGA.ReadBytes(mpExtension->sAuthorComment, 324);
+            m_rTGA.ReadBytes(mpExtension->sDateTimeStamp, 12);
+            m_rTGA.ReadBytes(mpExtension->sJobNameID, 12);
             m_rTGA.ReadChar( mpExtension->sJobNameID[ 0 ] ).ReadChar( mpExtension->sJobNameID[ 1 ] ).ReadChar( mpExtension->sJobNameID[ 2 ] );
-            m_rTGA.Read( mpExtension->sSoftwareID, 41 );
+            m_rTGA.ReadBytes(mpExtension->sSoftwareID, 41);
             m_rTGA.ReadUInt16( mpExtension->nSoftwareVersionNumber ).ReadUChar( mpExtension->nSoftwareVersionLetter )
                .ReadUInt32( mpExtension->nKeyColor ).ReadUInt16( mpExtension->nPixelAspectRatioNumerator )
                    .ReadUInt16( mpExtension->nPixelAspectRatioDeNumerator ).ReadUInt16( mpExtension->nGammaValueNumerator )
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index d7a26ea..609786a 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -557,7 +557,7 @@ bool TIFFReader::ReadMap()
                 pTIFF->Seek( pStripOffsets[ nStrip ] + ( ny % GetRowsPerStrip() ) * nStripBytesPerRow );
                 if (np >= SAL_N_ELEMENTS(pMap))
                     return false;
-                pTIFF->Read( pMap[ np ], nBytesPerRow );
+                pTIFF->ReadBytes(pMap[ np ], nBytesPerRow);
                 if (!pTIFF->good())
                     return false;
             }
@@ -693,7 +693,7 @@ bool TIFFReader::ReadMap()
                         nRecCount=0x00000001+((sal_uLong)nRecHeader);
                         if ( nRecCount > nRowBytesLeft )
                             return false;
-                        pTIFF->Read(pdst,nRecCount);
+                        pTIFF->ReadBytes(pdst, nRecCount);
                         if (!pTIFF->good())
                             return false;
                         pdst+=nRecCount;
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 3de4007..3c85227 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -314,7 +314,7 @@ void EscherPropertyContainer::Commit( SvStream& rSt, sal_uInt16 nVersion, sal_uI
             for ( i = 0; i < nSortCount; i++ )
             {
                 if ( pSortStruct[ i ].pBuf )
-                    rSt.Write( pSortStruct[ i ].pBuf, pSortStruct[ i ].nPropSize );
+                    rSt.WriteBytes(pSortStruct[i].pBuf, pSortStruct[i].nPropSize);
             }
         }
     }
@@ -4062,7 +4062,7 @@ void EscherBlibEntry::WriteBlibEntry( SvStream& rSt, bool bWritePictureOffset, s
             rSt.WriteUChar( meBlibType );
     }
 
-    rSt.Write( &mnIdentifier[ 0 ], 16 );
+    rSt.WriteBytes(&mnIdentifier[0], 16);
     rSt.WriteUInt16( 0 )
        .WriteUInt32( mnSize + mnSizeExtra )
        .WriteUInt32( mnRefCount )
@@ -4185,8 +4185,8 @@ void EscherGraphicProvider::WriteBlibStoreContainer( SvStream& rSt, SvStream* pM
                 while ( nBlipSize )
                 {
                     sal_uInt32 nBytes = ( nBlipSize > nBuf ? nBuf : nBlipSize );
-                    pMergePicStreamBSE->Read( pBuf.get(), nBytes );
-                    rSt.Write( pBuf.get(), nBytes );
+                    pMergePicStreamBSE->ReadBytes(pBuf.get(), nBytes);
+                    rSt.WriteBytes(pBuf.get(), nBytes);
                     nBlipSize -= nBytes;
                 }
             }
@@ -4303,7 +4303,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin
                     GraphicFilter &rFilter = GraphicFilter::GetGraphicFilter();
                     SvMemoryStream  aGIFStream;
                     const char* pString = "MSOFFICE9.0";
-                    aGIFStream.Write( pString, strlen(pString) );
+                    aGIFStream.WriteBytes(pString, strlen(pString));
                     nErrCode = rFilter.ExportGraphic( aGraphic, OUString(), aGIFStream,
                         rFilter.GetExportFormatNumberForShortName( "GIF" ) );
                     css::uno::Sequence< css::beans::PropertyValue > aFilterData( 1 );
@@ -4312,7 +4312,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin
                     css::uno::Sequence< sal_Int8 > aGIFSeq( nGIFSreamLen );
                     sal_Int8* pSeq = aGIFSeq.getArray();
                     aGIFStream.Seek( STREAM_SEEK_TO_BEGIN );
-                    aGIFStream.Read( pSeq, nGIFSreamLen );
+                    aGIFStream.ReadBytes(pSeq, nGIFSreamLen);
                     css::beans::PropertyValue aChunkProp, aFilterProp;
                     aChunkProp.Name = "msOG";
                     aChunkProp.Value <<= aGIFSeq;
@@ -4382,9 +4382,9 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin
 
 
                 rPicOutStrm.WriteUInt32( nInstance ).WriteUInt32( p_EscherBlibEntry->mnSize + nExtra );
-                rPicOutStrm.Write( p_EscherBlibEntry->mnIdentifier, 16 );
+                rPicOutStrm.WriteBytes(p_EscherBlibEntry->mnIdentifier, 16);
                 rPicOutStrm.WriteUChar( 0xff );
-                rPicOutStrm.Write( pGraphicAry, p_EscherBlibEntry->mnSize );
+                rPicOutStrm.WriteBytes(pGraphicAry, p_EscherBlibEntry->mnSize);
             }
             else
             {
@@ -4403,8 +4403,8 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin
                     nInstance = ( eBlibType == WMF ) ? 0xf01b2170 : 0xf01a3d40;                 // !EMF -> no change
                     rPicOutStrm.WriteUInt32( nInstance ).WriteUInt32( p_EscherBlibEntry->mnSize + nExtra );
                     if ( eBlibType == WMF )                                                     // !EMF -> no change
-                        rPicOutStrm.Write( p_EscherBlibEntry->mnIdentifier, 16 );
-                    rPicOutStrm.Write( p_EscherBlibEntry->mnIdentifier, 16 );
+                        rPicOutStrm.WriteBytes(p_EscherBlibEntry->mnIdentifier, 16);
+                    rPicOutStrm.WriteBytes(p_EscherBlibEntry->mnIdentifier, 16);
 
                     /*
                      ##913##
@@ -4440,7 +4440,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin
                    .WriteUInt32( nHeight )
                    .WriteUInt32( p_EscherBlibEntry->mnSize )
                    .WriteUInt16( 0xfe00 );  // compression Flags
-                    rPicOutStrm.Write( pGraphicAry, p_EscherBlibEntry->mnSize );
+                    rPicOutStrm.WriteBytes(pGraphicAry, p_EscherBlibEntry->mnSize);
                 }
             }
             if ( nAtomSize )
@@ -5063,9 +5063,9 @@ void EscherEx::InsertAtCurrentPos( sal_uInt32 nBytes )
         nToCopy -= nBufSize;
         nSource -= nBufSize;
         mpOutStrm->Seek( nSource );
-        mpOutStrm->Read( pBuf.get(), nBufSize );
+        mpOutStrm->ReadBytes(pBuf.get(), nBufSize);
         mpOutStrm->Seek( nSource + nBytes );
-        mpOutStrm->Write( pBuf.get(), nBufSize );
+        mpOutStrm->WriteBytes(pBuf.get(), nBufSize);
     }
     mpOutStrm->Seek( nCurPos );
 }
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 996fa28..d547335 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -170,7 +170,7 @@ void Impl_OlePres::Write( SvStream & rStm )
     WriteClipboardFormat( rStm, SotClipboardFormatId::GDIMETAFILE );
     rStm.WriteInt32( nJobLen + 4 );       // a TargetDevice that's always empty
     if( nJobLen )
-        rStm.Write( pJob, nJobLen );
+        rStm.WriteBytes(pJob, nJobLen);
     rStm.WriteUInt32( nAspect );
     rStm.WriteInt32( -1 );      //L-Index always -1
     rStm.WriteInt32( nAdvFlags );
@@ -2708,7 +2708,7 @@ void DffPropertyReader::CheckAndCorrectExcelTextRotation( SvStream& rIn, SfxItem
             if ( nLen )
             {
                 css::uno::Sequence< sal_Int8 > aXMLDataSeq( nLen );
-                rIn.Read( aXMLDataSeq.getArray(), nLen );
+                rIn.ReadBytes(aXMLDataSeq.getArray(), nLen);
                 css::uno::Reference< css::io::XInputStream > xInputStream
                     ( new ::comphelper::SequenceInputStream( aXMLDataSeq ) );
                 try
@@ -6520,7 +6520,7 @@ bool SvxMSDffManager::ProcessClientAnchor(SvStream& rStData, sal_uInt32 nDatLen,
     {
         rBuffLen = std::min(rStData.remainingSize(), static_cast<sal_uInt64>(nDatLen));
         rpBuff = new char[rBuffLen];
-        rBuffLen = rStData.Read(rpBuff, rBuffLen);
+        rBuffLen = rStData.ReadBytes(rpBuff, rBuffLen);
     }
     return true;
 }
@@ -6532,7 +6532,7 @@ bool SvxMSDffManager::ProcessClientData(SvStream& rStData, sal_uInt32 nDatLen,
     {
         rBuffLen = std::min(rStData.remainingSize(), static_cast<sal_uInt64>(nDatLen));
         rpBuff = new char[rBuffLen];
-        rBuffLen = rStData.Read(rpBuff, rBuffLen);
+        rBuffLen = rStData.ReadBytes(rpBuff, rBuffLen);
     }
     return true;
 }
@@ -6739,7 +6739,7 @@ bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
             if( 0x10000L > nStrLen )
             {
                 std::unique_ptr<sal_Char[]> pBuf(new sal_Char[ nStrLen ]);
-                rStm.Read( pBuf.get(), nStrLen );
+                rStm.ReadBytes(pBuf.get(), nStrLen);
                 aSvrName = OUString( pBuf.get(), (sal_uInt16) nStrLen-1, osl_getThreadTextEncoding() );
             }
             else
@@ -6759,11 +6759,11 @@ bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
                 if( !pData )
                     return false;
 
-                rStm.Read( pData.get(), nDataLen );
+                rStm.ReadBytes(pData.get(), nDataLen);
 
                 // write to ole10 stream
                 xOle10Stm->WriteUInt32( nDataLen );
-                xOle10Stm->Write( pData.get(), nDataLen );
+                xOle10Stm->WriteBytes(pData.get(), nDataLen);
                 xOle10Stm = tools::SvRef<SotStorageStream>();
 
                 // set the compobj stream
@@ -6791,7 +6791,7 @@ bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
             {
                 sal_uLong nPos = rStm.Tell();
                 sal_uInt16 sz[4];
-                rStm.Read( sz, 8 );
+                rStm.ReadBytes( sz, 8 );
                 Graphic aGraphic;
                 if( ERRCODE_NONE == GraphicConverter::Import( rStm, aGraphic ) && aGraphic.GetType() != GraphicType::NONE )
                 {
@@ -7093,13 +7093,13 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
                     sal_uInt8 aTestA[10];   // exist the \1CompObj-Stream ?
                     tools::SvRef<SotStorageStream> xSrcTst = xObjStg->OpenSotStream( "\1CompObj" );
                     bValidStorage = xSrcTst.Is() && sizeof( aTestA ) ==
-                                    xSrcTst->Read( aTestA, sizeof( aTestA ) );
+                                    xSrcTst->ReadBytes(aTestA, sizeof(aTestA));
                     if( !bValidStorage )
                     {
                         // or the \1Ole-Stream ?
                         xSrcTst = xObjStg->OpenSotStream( "\1Ole" );
                         bValidStorage = xSrcTst.Is() && sizeof(aTestA) ==
-                                        xSrcTst->Read(aTestA, sizeof(aTestA));
+                                    xSrcTst->ReadBytes(aTestA, sizeof(aTestA));
                     }
                 }
 
diff --git a/filter/source/msfilter/msoleexp.cxx b/filter/source/msfilter/msoleexp.cxx
index 6660d7c..9c56db1 100644
--- a/filter/source/msfilter/msoleexp.cxx
+++ b/filter/source/msfilter/msoleexp.cxx
@@ -272,7 +272,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SotSt
                         }
                     }
 
-                    bExtentSuccess = ( xExtStm->Write( aWriteSet, 16 ) == 16 );
+                    bExtentSuccess = (xExtStm->WriteBytes(aWriteSet, 16) == 16);
                 }
             }
 
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 3b5670f..a68a19e 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -310,7 +310,7 @@ SvStream& ReadPptSlideLayoutAtom( SvStream& rIn, PptSlideLayoutAtom& rAtom )
     rIn.ReadInt32(nTmp);
     rAtom.eLayout = static_cast<PptSlideLayout>(nTmp);
     static_assert(sizeof(rAtom.aPlaceholderId) == 8, "wrong size of serialized array");
-    rIn.Read( rAtom.aPlaceholderId, 8 );
+    rIn.ReadBytes(rAtom.aPlaceholderId, 8);
     return rIn;
 }
 
@@ -371,7 +371,7 @@ SvStream& ReadPptColorSchemeAtom( SvStream& rIn, PptColorSchemeAtom& rAtom )
 {
     DffRecordHeader aHd;
     ReadDffRecordHeader( rIn, aHd );
-    rIn.Read( rAtom.aData, 32 );
+    rIn.ReadBytes(rAtom.aData, 32);
     aHd.SeekToEndOfRecord( rIn );
     return rIn;
 }
@@ -381,7 +381,7 @@ SvStream& ReadPptFontEntityAtom( SvStream& rIn, PptFontEntityAtom& rAtom )
     DffRecordHeader aHd;
     ReadDffRecordHeader( rIn, aHd );
     sal_Unicode nTemp, cData[ 32 ];
-    rIn.Read( cData, 64 );
+    rIn.ReadBytes(cData, 64);
 
     sal_uInt8   lfCharset, lfPitchAndFamily;
 
@@ -1768,7 +1768,7 @@ bool SdrPowerPointOLEDecompress( SvStream& rOutput, SvStream& rInput, sal_uInt32
 {
     sal_uInt32 nOldPos = rInput.Tell();
     std::unique_ptr<char[]> pBuf(new char[ nInputSize ]);
-    rInput.Read( pBuf.get(), nInputSize );
+    rInput.ReadBytes(pBuf.get(), nInputSize);
     ZCodec aZCodec( 0x8000, 0x8000 );
     aZCodec.BeginCompression();
     SvMemoryStream aSource( pBuf.get(), nInputSize, StreamMode::READ );
@@ -1857,11 +1857,12 @@ SdrObject* SdrPowerPointImport::ImportOLE( long nOLEId,
                         if ( xSrcTst.Is() )
                         {
                             sal_uInt8 aTestA[ 10 ];
-                            bool bGetItAsOle = ( sizeof( aTestA ) == xSrcTst->Read( aTestA, sizeof( aTestA ) ) );
+                            bool bGetItAsOle = (sizeof(aTestA) == xSrcTst->ReadBytes(aTestA, sizeof(aTestA)));
                             if ( !bGetItAsOle )
                             {   // maybe there is a contents stream in here
                                 xSrcTst = xObjStor->OpenSotStream( "Contents", STREAM_READWRITE | StreamMode::NOCREATE );
-                                bGetItAsOle = ( xSrcTst.Is() && sizeof( aTestA ) == xSrcTst->Read( aTestA, sizeof( aTestA ) ) );
+                                bGetItAsOle = (xSrcTst.Is() &&
+                                    sizeof(aTestA) == xSrcTst->ReadBytes(aTestA, sizeof(aTestA)));
                             }
                             if ( bGetItAsOle )
                             {
@@ -2065,8 +2066,8 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
                                                                     while ( nToCopy )
                                                                     {
                                                                         nBufSize = ( nToCopy >= 0x40000 ) ? 0x40000 : nToCopy;
-                                                                        rStCtrl.Read( pBuf.get(), nBufSize );
-                                                                        xOriginal->Write( pBuf.get(), nBufSize );
+                                                                        rStCtrl.ReadBytes(pBuf.get(), nBufSize);
+                                                                        xOriginal->WriteBytes(pBuf.get(), nBufSize);
                                                                         nToCopy -= nBufSize;
                                                                     }
                                                                 }
@@ -5239,7 +5240,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, const DffRecordHeader& rTextHe
         sal_uInt32 i;
         sal_Unicode nChar;
         std::unique_ptr<sal_Unicode[]> pBuf(new sal_Unicode[ ( nMaxLen >> 1 ) + 1 ]);
-        rIn.Read( pBuf.get(), nMaxLen );
+        rIn.ReadBytes(pBuf.get(), nMaxLen);
         nMaxLen >>= 1;
         pBuf[ nMaxLen ] = 0;
         sal_Unicode* pPtr = pBuf.get();
@@ -5275,7 +5276,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, const DffRecordHeader& rTextHe
     {
         std::unique_ptr<sal_Char[]> pBuf(new sal_Char[ nMaxLen + 1 ]);
         pBuf[ nMaxLen ] = 0;
-        rIn.Read( pBuf.get(), nMaxLen );
+        rIn.ReadBytes(pBuf.get(), nMaxLen);
         sal_Char* pPtr = pBuf.get();
         for (;;)
         {
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 55b2353..8d9dcf0 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -550,7 +550,9 @@ Sequence<sal_Int8> ODatabaseForm::GetDataMultiPartEncoded(const Reference<XContr
     char* pBuf = new char[1025];
     int nRead;
     while( (nRead = aMessStream.Read(pBuf, 1024)) > 0 )
-        aMemStream.Write( pBuf, nRead );
+    {
+        aMemStream.WriteBytes(pBuf, nRead);
+    }
     delete[] pBuf;
 
     aMemStream.Flush();
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 1588a7e..793c1db 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -127,7 +127,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportHWP(const OUString &rURL
 
     while (true)
     {
-        nRead = aFileStream.Read(aData, nBlock);
+        nRead = aFileStream.ReadBytes(aData, nBlock);
         if (nRead == 0)
             break;
         stream->addData(aData, (int)nRead);
diff --git a/idl/source/prj/svidl.cxx b/idl/source/prj/svidl.cxx
index 4b8d4b98..96c651e 100644
--- a/idl/source/prj/svidl.cxx
+++ b/idl/source/prj/svidl.cxx
@@ -41,8 +41,8 @@ bool FileMove_Impl( const OUString & rFile1, const OUString & rFile2, bool bImme
         {
             std::unique_ptr<sal_uInt8[]> pBuf1(new sal_uInt8[ BR ]);
             std::unique_ptr<sal_uInt8[]> pBuf2(new sal_uInt8[ BR ]);
-            nC1 = aOutStm1.Read( pBuf1.get(), BR );
-            nC2 = aOutStm2.Read( pBuf2.get(), BR );
+            nC1 = aOutStm1.ReadBytes(pBuf1.get(), BR);
+            nC2 = aOutStm2.ReadBytes(pBuf2.get(), BR);
             while( nC1 == nC2 )
             {
                 if( memcmp( pBuf1.get(), pBuf2.get(), nC1 ) )
@@ -54,8 +54,8 @@ bool FileMove_Impl( const OUString & rFile1, const OUString & rFile2, bool bImme
                 {
                     if( 0x8000 != nC1 )
                         break;
-                    nC1 = aOutStm1.Read( pBuf1.get(), BR );
-                    nC2 = aOutStm2.Read( pBuf2.get(), BR );
+                    nC1 = aOutStm1.ReadBytes(pBuf1.get(), BR);
+                    nC2 = aOutStm2.ReadBytes(pBuf2.get(), BR);
                 }
             }
         }
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index c31bc8c..1bae0a8 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -276,8 +276,8 @@ public:
     SvStream&       WriteUInt32AsString( sal_uInt32 nUInt32 );
     SvStream&       WriteInt32AsString( sal_Int32 nInt32 );
 
-    sal_Size        Read( void* pData, sal_Size nSize );
-    sal_Size        Write( const void* pData, sal_Size nSize );
+    sal_Size        ReadBytes( void* pData, sal_Size nSize );
+    sal_Size        WriteBytes( const void* pData, sal_Size nSize );
     sal_uInt64      Seek( sal_uInt64 nPos );
     sal_uInt64      SeekRel( sal_Int64 nPos );
     sal_uInt64      Tell() const { return m_nBufFilePos + m_nBufActualPos;  }
@@ -537,7 +537,7 @@ inline OUString read_uInt8_lenPrefixed_uInt8s_ToOUString(SvStream& rStrm,
 inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const OString& rStr,
                                                          sal_Size nUnits)
 {
-    return rStrm.Write(rStr.getStr(), nUnits);
+    return rStrm.WriteBytes(rStr.getStr(), nUnits);
 }
 
 inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const OString& rStr)
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index 80e424d..272de85 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -97,7 +97,7 @@ sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, bool &bNeg )
     sal_Size nSniffPos = rpStream->Tell();
     static sal_Size nVerOOo7Len = sal::static_int_cast< sal_Size >(strlen( pVerOOo7 ));
     pMagicHeader[ nVerOOo7Len ] = '\0';
-    if ((rpStream->Read(static_cast<void *>(pMagicHeader), nVerOOo7Len) == nVerOOo7Len) &&
+    if ((rpStream->ReadBytes(static_cast<void *>(pMagicHeader), nVerOOo7Len) == nVerOOo7Len) &&
         !strcmp(pMagicHeader, pVerOOo7))
     {
         bool bSuccess;
@@ -151,7 +151,7 @@ sal_Int16 ReadDicVersion( SvStreamPtr &rpStream, sal_uInt16 &nLng, bool &bNeg )
         if (nLen >= MAX_HEADER_LENGTH)
             return -1;
 
-        rpStream->Read(pMagicHeader, nLen);
+        rpStream->ReadBytes(pMagicHeader, nLen);
         pMagicHeader[nLen] = '\0';
 
         // Check version magic
@@ -291,7 +291,7 @@ sal_uLong DictionaryNeo::loadEntries(const OUString &rMainURL)
                 return nErr;
             if ( nLen < BUFSIZE )
             {
-                pStream->Read(aWordBuf, nLen);
+                pStream->ReadBytes(aWordBuf, nLen);
                 if (0 != (nErr = pStream->GetError()))
                     return nErr;
                 *(aWordBuf + nLen) = 0;
@@ -320,7 +320,7 @@ sal_uLong DictionaryNeo::loadEntries(const OUString &rMainURL)
 
             if (nLen < BUFSIZE)
             {
-                pStream->Read(aWordBuf, nLen);
+                pStream->ReadBytes(aWordBuf, nLen);
                 if (0 != (nErr = pStream->GetError()))
                     return nErr;
             }
diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx
index 868d54c..b126b48 100644
--- a/lotuswordpro/source/filter/bencont.cxx
+++ b/lotuswordpro/source/filter/bencont.cxx
@@ -331,13 +331,13 @@ void LtcBenContainer::CreateGraphicStream(SvStream * &pStream, const char *pObje
     char * pPointer = pBuf;
     if(pD)
     {
-        pD->Read(pPointer, nDLen);
+        pD->ReadBytes(pPointer, nDLen);
         delete pD;
     }
     pPointer += nDLen;
     if(pS)
     {
-        pS->Read(pPointer, nLen - nDLen);
+        pS->ReadBytes(pPointer, nLen - nDLen);
         delete pS;
     }
 
diff --git a/lotuswordpro/source/filter/explode.cxx b/lotuswordpro/source/filter/explode.cxx
index 356cc54..87f4049 100644
--- a/lotuswordpro/source/filter/explode.cxx
+++ b/lotuswordpro/source/filter/explode.cxx
@@ -183,7 +183,7 @@ sal_uInt32 Decompression::ReadBits(sal_uInt16 iCount, sal_uInt32 & nBits)
     {
         if (m_nBytesLeft == 0)
         {
-            m_nBytesLeft = m_pInStream->Read(m_Buffer, CHUNK);
+            m_nBytesLeft = m_pInStream->ReadBytes(m_Buffer, CHUNK);
             m_pBuffer = m_Buffer;
             if (m_nBytesLeft == 0)  return 1;
             }
@@ -242,7 +242,7 @@ sal_Int32 Decompression::explode()
             m_Output[m_nOutputBufferPos++] = (sal_uInt8)symbol;
             if (m_nOutputBufferPos == MAXWIN)
             {
-                m_pOutStream->Write(m_Output, m_nOutputBufferPos);
+                m_pOutStream->WriteBytes(m_Output, m_nOutputBufferPos);
                 m_nOutputBufferPos = 0;
             }
             continue;
@@ -299,7 +299,7 @@ sal_Int32 Decompression::explode()
 
             // - now copy LENGTH bytes from (output_ptr-DISTANCE) to output_ptr
             // write current buffer to output
-        m_pOutStream->Write(m_Output, m_nOutputBufferPos);
+        m_pOutStream->WriteBytes(m_Output, m_nOutputBufferPos);
         m_nOutputBufferPos = 0;
 
         // remember current position
@@ -312,7 +312,7 @@ sal_Int32 Decompression::explode()
         m_pOutStream->SeekRel(-(long)distance);
         sal_uInt8 sTemp[MAXWIN];
         sal_uInt32 nRead = distance > Length? Length:distance;
-        m_pOutStream->Read(sTemp, nRead);
+        m_pOutStream->ReadBytes(sTemp, nRead);
         if (nRead != Length)
         {
             // fill the buffer with read content repeatly until full
@@ -326,7 +326,7 @@ sal_Int32 Decompression::explode()
         m_pOutStream->Seek(nOutputPos);
 
            // write current buffer to output
-        m_pOutStream->Write(sTemp, Length);
+        m_pOutStream->WriteBytes(sTemp, Length);
     }
     return 0;
 }
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx
index cab4dd2..8361e21 100644
--- a/lotuswordpro/source/filter/lwpdrawobj.cxx
+++ b/lotuswordpro/source/filter/lwpdrawobj.cxx
@@ -151,7 +151,7 @@ void LwpDrawObj::ReadClosedObjStyle()
 
     // fill style
     m_pStream->ReadUInt16( m_aClosedObjStyleRec.nFillType );
-    m_pStream->Read(m_aClosedObjStyleRec.pFillPattern,
+    m_pStream->ReadBytes(m_aClosedObjStyleRec.pFillPattern,
         sizeof(m_aClosedObjStyleRec.pFillPattern));
 }
 
@@ -1036,7 +1036,7 @@ void LwpDrawTextBox::Read()
         m_aTextRec.nTextWidth = 1;
 
     m_pStream->ReadInt16( m_aTextRec.nTextHeight );
-    m_pStream->Read(m_aTextRec.tmpTextFaceName, DRAW_FACESIZE);
+    m_pStream->ReadBytes(m_aTextRec.tmpTextFaceName, DRAW_FACESIZE);
     m_pStream->SeekRel(1);// PitchAndFamily
 
     m_pStream->ReadInt16( m_aTextRec.nTextSize );
@@ -1062,7 +1062,7 @@ void LwpDrawTextBox::Read()
     sal_Int16 TextLength = m_aObjHeader.nRecLen - 71;
     m_aTextRec.pTextString = new sal_uInt8 [TextLength];
 
-    m_pStream->Read(m_aTextRec.pTextString, TextLength);
+    m_pStream->ReadBytes(m_aTextRec.pTextString, TextLength);
 }
 
 OUString LwpDrawTextBox::RegisterStyle()
@@ -1242,7 +1242,7 @@ void LwpDrawTextArt::Read()
 
     m_pStream->SeekRel(1);
 
-    m_pStream->Read(m_aTextArtRec.tmpTextFaceName, DRAW_FACESIZE);
+    m_pStream->ReadBytes(m_aTextArtRec.tmpTextFaceName, DRAW_FACESIZE);
     m_pStream->SeekRel(1);// PitchAndFamily
 
     m_pStream->ReadInt16( m_aTextArtRec.nTextSize );
@@ -1265,7 +1265,7 @@ void LwpDrawTextArt::Read()
         throw BadRead();
 
     m_aTextArtRec.pTextString = new sal_uInt8 [m_aTextArtRec.nTextLen];
-    m_pStream->Read(m_aTextArtRec.pTextString, m_aTextArtRec.nTextLen);
+    m_pStream->ReadBytes(m_aTextArtRec.pTextString, m_aTextArtRec.nTextLen);
     m_aTextArtRec.pTextString[m_aTextArtRec.nTextLen-1] = 0;
 
 }
@@ -1476,7 +1476,7 @@ void LwpDrawBitmap::Read()
         pPicData += 30*sizeof(sal_uInt8);
     }
 
-    m_pStream->Read(pPicData, nDIBRemaining);
+    m_pStream->ReadBytes(pPicData, nDIBRemaining);
 }
 
 OUString LwpDrawBitmap::RegisterStyle()
diff --git a/lotuswordpro/source/filter/lwpfilter.cxx b/lotuswordpro/source/filter/lwpfilter.cxx
index 05c8159..0389ee3 100644
--- a/lotuswordpro/source/filter/lwpfilter.cxx
+++ b/lotuswordpro/source/filter/lwpfilter.cxx
@@ -106,8 +106,8 @@ using namespace OpenStormBento;
     pCompressed->Seek(0);
     std::unique_ptr<SvStream> aDecompressed(new SvMemoryStream(4096, 4096));
     unsigned char buffer[512];
-    pCompressed->Read(buffer, 16);
-    aDecompressed->Write(buffer, 16);
+    pCompressed->ReadBytes(buffer, 16);
+    aDecompressed->WriteBytes(buffer, 16);
 
     std::unique_ptr<LwpSvStream> aLwpStream(new LwpSvStream(pCompressed));
     LtcBenContainer* pBentoContainer;
@@ -129,8 +129,8 @@ using namespace OpenStormBento;
     nPos += 0x10;
 
     pCompressed->Seek(nPos);
-    while (sal_uInt32 iRead = pCompressed->Read(buffer, 512))
-        aDecompressed->Write(buffer, iRead);
+    while (sal_uInt32 iRead = pCompressed->ReadBytes(buffer, 512))
+        aDecompressed->WriteBytes(buffer, iRead);
 
     //transfer ownership of aDecompressed's ptr
     pOutDecompressed = aDecompressed.release();
diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx
index bf04563..df843a9 100644
--- a/lotuswordpro/source/filter/lwpgrfobj.cxx
+++ b/lotuswordpro/source/filter/lwpgrfobj.cxx
@@ -367,7 +367,7 @@ sal_uInt32 LwpGraphicObject::GetRawGrafData(sal_uInt8*& pGrafData)
         // read image data
         sal_uInt32 nDataLen = pMemGrafStream->GetEndOfData();
         pGrafData = new sal_uInt8 [nDataLen];
-        pMemGrafStream->Read(pGrafData, nDataLen);
+        pMemGrafStream->ReadBytes(pGrafData, nDataLen);
 
         delete pMemGrafStream;
         pMemGrafStream = nullptr;
@@ -418,7 +418,7 @@ sal_uInt32 LwpGraphicObject::GetGrafData(sal_uInt8*& pGrafData)
         pGrafStream->Seek(nPos);
 
         pGrafData = new sal_uInt8 [nDataLen];
-        pMemGrafStream->Read(pGrafData, nDataLen);
+        pMemGrafStream->ReadBytes(pGrafData, nDataLen);
 
         delete pMemGrafStream;
         pMemGrafStream = nullptr;
diff --git a/lotuswordpro/source/filter/lwpsdwfileloader.cxx b/lotuswordpro/source/filter/lwpsdwfileloader.cxx
index ac2687a..5f4cd96 100644
--- a/lotuswordpro/source/filter/lwpsdwfileloader.cxx
+++ b/lotuswordpro/source/filter/lwpsdwfileloader.cxx
@@ -79,7 +79,7 @@ LwpSdwFileLoader::~LwpSdwFileLoader()
 void LwpSdwFileLoader::CreateDrawObjects(std::vector< rtl::Reference<XFFrame> >* pDrawObjVector)
 {
     unsigned char BinSignature[2];
-    m_pStream->Read(BinSignature,2);
+    m_pStream->ReadBytes(BinSignature, 2);
 
     if (BinSignature[0] == 'S' && BinSignature[1] == 'M')
     {
diff --git a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
index 6d134a0..51c8dec 100644
--- a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
+++ b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
@@ -98,7 +98,7 @@ void LwpSdwGroupLoaderV0102::BeginDrawObjects(std::vector< rtl::Reference<XFFram
 
     //flag
     unsigned char BinSignature[2];
-    m_pStream->Read(BinSignature,2);
+    m_pStream->ReadBytes(BinSignature, 2);
     if (BinSignature[0] != 'S' || BinSignature[1] != 'M')
     {
         assert(false);
@@ -243,7 +243,7 @@ XFDrawGroup* LwpSdwGroupLoaderV0102::CreateDrawGroupObject()
 {
     //flag
     unsigned char BinSignature[2];
-    m_pStream->Read(BinSignature,2);
+    m_pStream->ReadBytes(BinSignature, 2);
     if (BinSignature[0] != 'S' || BinSignature[1] != 'M')
     {
         assert(false);
diff --git a/lotuswordpro/source/filter/lwpsvstream.cxx b/lotuswordpro/source/filter/lwpsvstream.cxx
index 055b235..7ad492e 100644
--- a/lotuswordpro/source/filter/lwpsvstream.cxx
+++ b/lotuswordpro/source/filter/lwpsvstream.cxx
@@ -68,7 +68,7 @@ LwpSvStream::LwpSvStream(SvStream* pStream, LwpSvStream * pCompressed)
 */
 sal_Int32 LwpSvStream::Read(void* buf, sal_Int32 nBytesToRead)
 {
-    return m_pStream->Read(buf,nBytesToRead);
+    return m_pStream->ReadBytes(buf, nBytesToRead);
 }
 
 LwpSvStream& LwpSvStream::ReadUInt8( sal_uInt8& rUInt8 )
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 8cad39e..b58f1ad 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -586,7 +586,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect
                     {
                         SvMemoryStream aStream;
                         int nHeaderSize = 25; // The first bytes are WW8-specific, we're only interested in the PNG
-                        aStream.Write(aStruct.pBuf + nHeaderSize, aStruct.nPropSize - nHeaderSize);
+                        aStream.WriteBytes(aStruct.pBuf + nHeaderSize, aStruct.nPropSize - nHeaderSize);
                         aStream.Seek(0);
                         Graphic aGraphic;
                         GraphicConverter::Import(aStream, aGraphic);
@@ -796,7 +796,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect
                     if (rProps.GetOpt(ESCHER_Prop_gtextUNICODE, aUnicode))
                     {
                         SvMemoryStream aStream;
-                        aStream.Write(it->pBuf, it->nPropSize);
+                        aStream.WriteBytes(it->pBuf, it->nPropSize);
                         aStream.Seek(0);
                         OUString aTextPathString = SvxMSDffManager::MSDFFReadZString(aStream, it->nPropSize, true);
                         aStream.Seek(0);
@@ -813,7 +813,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect
                         OUString aStyle;
                         if (rProps.GetOpt(ESCHER_Prop_gtextFont, aFont))
                         {
-                            aStream.Write(aFont.pBuf, aFont.nPropSize);
+                            aStream.WriteBytes(aFont.pBuf, aFont.nPropSize);
                             aStream.Seek(0);
                             OUString aTextPathFont = SvxMSDffManager::MSDFFReadZString(aStream, aFont.nPropSize, true);
                             aStyle += "font-family:\"" + aTextPathFont + "\"";
@@ -844,7 +844,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect
             case ESCHER_Prop_wzName:
                 {
                     SvMemoryStream aStream;
-                    aStream.Write(it->pBuf, it->nPropSize);
+                    aStream.WriteBytes(it->pBuf, it->nPropSize);
                     aStream.Seek(0);
                     OUString idStr = SvxMSDffManager::MSDFFReadZString(aStream, it->nPropSize, true);
                     aStream.Seek(0);
diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 5beddc3..d4e6a9f 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -177,7 +177,7 @@ void VBACompressionChunk::write()
         sal_uInt16 nHeader = handleHeader(true);
         setUInt16(pCompressedChunkStream, 0, nHeader);
         // copy the compressed stream to our output stream
-        mrCompressedStream.Write(pCompressedChunkStream, mnCompressedCurrent);
+        mrCompressedStream.WriteBytes(pCompressedChunkStream, mnCompressedCurrent);
     }
 }
 
@@ -356,7 +356,7 @@ void VBACompressionChunk::writeRawChunk()
 {
     // we need to use up to 4096 bytes of the original stream
     // and fill the rest with padding
-    mrCompressedStream.Write(mpUncompressedData, mnChunkSize);
+    mrCompressedStream.WriteBytes(mpUncompressedData, mnChunkSize);
     sal_Size nPadding = 4096 - mnChunkSize;
     for (size_t i = 0; i < nPadding; ++i)
     {
diff --git a/opencl/inc/opencl_device_selection.h b/opencl/inc/opencl_device_selection.h
index 19b74ab..d49974c 100644
--- a/opencl/inc/opencl_device_selection.h
+++ b/opencl/inc/opencl_device_selection.h
@@ -244,7 +244,7 @@ private:
     static int funcWriteCallback(void* pContext, const char* sBuffer, int nLen)
     {
         SvStream* pStream = static_cast<SvStream*>(pContext);
-        return static_cast<int>(pStream->Write(sBuffer, nLen));
+        return static_cast<int>(pStream->WriteBytes(sBuffer, nLen));
     }
 
     static int funcCloseCallback(void* pContext)
@@ -340,7 +340,7 @@ public:
     {
         sal_Size nSize = pStream->remainingSize();
         std::vector<sal_uInt8> aBuffer(nSize + 1);
-        pStream->Read(aBuffer.data(), nSize);
+        pStream->ReadBytes(aBuffer.data(), nSize);
         aBuffer[nSize] = 0;
         mpDocPtr = xmlParseDoc(reinterpret_cast<xmlChar*>(aBuffer.data()));
         if (mpDocPtr == nullptr)
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 5f03d87..f2f81e7 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 dbf3bff..babe8a9 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 b5c620f..a68c0d2 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 8859baa..99ad68e 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 171479c..99117a8 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 6d54218..aa32a82 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 9a919cb..9a00004 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 7873eef..51802a9 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 19616c5..4a2aafd 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 bc87806..be0bf63f 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 1b80a49..29fe909 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 fa937c5..580fcd8 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 5689553..9893dd3 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 2cf7807..153c693 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 b4309cc..9c98fc4 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);

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list