[Libreoffice-commits] core.git: 6 commits - external/boost filter/source include/tools RepositoryExternal.mk solenv/bin sot/source tools/source

Michael Stahl mstahl at redhat.com
Fri Jul 31 05:53:15 PDT 2015


 RepositoryExternal.mk                                                      |    1 
 external/boost/UnpackedTarball_boost.mk                                    |    2 
 external/boost/boost.concept_check.Wunused-local-typedefs.warnings.patch.1 |   13 
 filter/source/graphicfilter/ios2met/ios2met.cxx                            |    4 
 filter/source/graphicfilter/itiff/itiff.cxx                                |    4 
 include/tools/stream.hxx                                                   |   94 -
 solenv/bin/concat-deps.c                                                   |    9 
 sot/source/sdstor/stgole.cxx                                               |    2 
 sot/source/sdstor/storage.cxx                                              |   12 
 tools/source/ref/pstm.cxx                                                  |    2 
 tools/source/stream/stream.cxx                                             |  540 +++++-----
 tools/source/stream/strmunx.cxx                                            |   38 
 tools/source/stream/strmwnt.cxx                                            |   12 
 13 files changed, 378 insertions(+), 355 deletions(-)

New commits:
commit 168bf78980691229c1831ad19f098167a09e1dd5
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Jul 31 14:08:10 2015 +0200

    boost: fix Clang > 3.5 -Wunused-local-typedefs in concept_check
    
    Change-Id: I84ee651a51e1919be036ffd47d80eb1ab7433973

diff --git a/external/boost/UnpackedTarball_boost.mk b/external/boost/UnpackedTarball_boost.mk
index 8e9d624..732b564 100644
--- a/external/boost/UnpackedTarball_boost.mk
+++ b/external/boost/UnpackedTarball_boost.mk
@@ -93,6 +93,8 @@ boost_patches += boost_1_59_0.multi_array.wshadow.patch
 boost_patches += boost_1_59_0.signal2.wshadow.patch
 # https://svn.boost.org/trac/boost/ticket/11501
 boost_patches += boost_1_59_0.property_tree.wreturn-type.patch
+# fixed upstream by bdcd06c4cc1971d763e528b8cb1d0f16fcc5ecf4
+boost_patches += boost.concept_check.Wunused-local-typedefs.warnings.patch.1
 
 $(eval $(call gb_UnpackedTarball_UnpackedTarball,boost))
 
diff --git a/external/boost/boost.concept_check.Wunused-local-typedefs.warnings.patch.1 b/external/boost/boost.concept_check.Wunused-local-typedefs.warnings.patch.1
new file mode 100644
index 0000000..c85fc7e
--- /dev/null
+++ b/external/boost/boost.concept_check.Wunused-local-typedefs.warnings.patch.1
@@ -0,0 +1,13 @@
+Fixed differently upstream by commit bdcd06c4cc1971d763e528b8cb1d0f16fcc5ecf4
+
+--- boost/boost/concept/detail/general.hpp.orig	2015-07-31 14:03:08.184447736 +0200
++++ boost/boost/concept/detail/general.hpp	2015-07-31 14:03:10.048447591 +0200
+@@ -67,7 +67,7 @@
+ 
+ // Version check from https://svn.boost.org/trac/boost/changeset/82886
+ // (boost/static_assert.hpp)
+-#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7))) 
++#if defined(__GNUC__) && (((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7))) || defined(__clang__))
+ #define BOOST_CONCEPT_UNUSED_TYPEDEF __attribute__((unused))
+ #else
+ #define BOOST_CONCEPT_UNUSED_TYPEDEF /**/
commit aedd003086e5d14dad584e4bd36ab5e4c06e0e18
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Jul 31 13:50:46 2015 +0200

    tools: prefix members of SvStream
    
    Change-Id: Iba845749d645bc1cf9eb6d6c41829717831bc487

diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 3b9f268..6983407 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -189,39 +189,39 @@ class TOOLS_DLLPUBLIC SvStream
 {
 private:
     // LockBytes Interface
-    SvLockBytesRef  xLockBytes;  // Default implementation
+    SvLockBytesRef  m_xLockBytes; ///< Default implementation
     sal_uInt64      m_nActPos;
 
-    // Puffer-Verwaltung
-    sal_uInt8*      pRWBuf;         // Points to read/write buffer
-    sal_uInt8*      pBufPos;        // pRWBuf + nBufActualPos
-    sal_uInt16      nBufSize;       // Allocated size of buffer
-    sal_uInt16      nBufActualLen;  // Length of used segment of puffer
-                                // = nBufSize, if EOF did not occur
-    sal_uInt16      nBufActualPos;  // current position in buffer (0..nBufSize-1)
-    sal_uInt16      nBufFree;       // number of free slots in buffer to IO of type eIOMode
-    bool            bIoRead;
-    bool            bIoWrite;
+    // buffer management
+    sal_uInt8*      m_pRWBuf;     ///< Points to read/write buffer
+    sal_uInt8*      m_pBufPos;    ///< m_pRWBuf + m_nBufActualPos
+    sal_uInt16      m_nBufSize;   ///< Allocated size of buffer
+    sal_uInt16      m_nBufActualLen; ///< Length of used segment of puffer
+                                  ///< = m_nBufSize, if EOF did not occur
+    sal_uInt16      m_nBufActualPos; ///< current position in buffer (0..m_nBufSize-1)
+    sal_uInt16      m_nBufFree;   ///< number of free slots in buffer to IO of type eIOMode
+    bool            m_isIoRead;
+    bool            m_isIoWrite;
 
     // Error codes, conversion, compression, ...
-    bool            bIsDirty; // true: Stream != buffer content
-    bool            bIsConsistent;// false: Buffer contains data, which were
-                                // NOT allowed to be written by PutData
-                                // into the derived stream (cf. PutBack)
-    bool            bSwap;
-    bool            bIsEof;
-    sal_uInt32      nError;
-    SvStreamEndian  nEndian;
-    SvStreamCompressFlags nCompressMode;
-    LineEnd         eLineDelimiter;
-    rtl_TextEncoding eStreamCharSet;
+    bool            m_isDirty;  ///< true: Stream != buffer content
+    bool            m_isConsistent; ///< false: Buffer contains data, which were
+                                ///< NOT allowed to be written by PutData
+                                ///< into the derived stream (cf. PutBack)
+    bool            m_isSwap;
+    bool            m_isEof;
+    sal_uInt32      m_nError;
+    SvStreamEndian  m_nEndian;
+    SvStreamCompressFlags m_nCompressMode;
+    LineEnd         m_eLineDelimiter;
+    rtl_TextEncoding m_eStreamCharSet;
 
     // Encryption
     OString m_aCryptMaskKey;// aCryptMaskKey.getLength != 0  -> Encryption used
-    unsigned char   nCryptMask;
+    unsigned char   m_nCryptMask;
 
     // Userdata
-    long            nVersion;   // for external use
+    long            m_nVersion;   // for external use
 
     // helper methods
     TOOLS_DLLPRIVATE void ImpInit();
@@ -231,8 +231,8 @@ private:
 
 protected:
     sal_uInt64      m_nBufFilePos; ///< File position of pBuf[0]
-    StreamMode      eStreamMode;
-    bool            bIsWritable;
+    StreamMode      m_eStreamMode;
+    bool            m_isWritable;
 
     virtual sal_Size GetData( void* pData, sal_Size nSize );
     virtual sal_Size PutData( const void* pData, sal_Size nSize );
@@ -255,32 +255,32 @@ public:
                     SvStream( SvLockBytes *pLockBytes);
     virtual         ~SvStream();
 
-    SvLockBytes*    GetLockBytes() const { return xLockBytes; }
+    SvLockBytes*    GetLockBytes() const { return m_xLockBytes; }
 
-    sal_uInt32      GetError() const { return ERRCODE_TOERROR(nError); }
-    sal_uInt32      GetErrorCode() const { return nError; }
+    sal_uInt32      GetError() const { return ERRCODE_TOERROR(m_nError); }
+    sal_uInt32      GetErrorCode() const { return m_nError; }
 
     void            SetError( sal_uInt32 nErrorCode );
     virtual void    ResetError();
 
     void            SetEndian( SvStreamEndian SvStreamEndian );
-    SvStreamEndian  GetEndian() const { return nEndian; }
+    SvStreamEndian  GetEndian() const { return m_nEndian; }
     /// returns status of endian swap flag
-    bool            IsEndianSwap() const { return bSwap; }
+    bool            IsEndianSwap() const { return m_isSwap; }
 
     void            SetCompressMode( SvStreamCompressFlags nNewMode )
-                        { nCompressMode = nNewMode; }
-    SvStreamCompressFlags GetCompressMode() const { return nCompressMode; }
+                        { m_nCompressMode = nNewMode; }
+    SvStreamCompressFlags GetCompressMode() const { return m_nCompressMode; }
 
     void SetCryptMaskKey(const OString& rCryptMaskKey);
 
     void            SetStreamCharSet( rtl_TextEncoding eCharSet )
-                        { eStreamCharSet = eCharSet; }
-    rtl_TextEncoding GetStreamCharSet() const { return eStreamCharSet; }
+                        { m_eStreamCharSet = eCharSet; }
+    rtl_TextEncoding GetStreamCharSet() const { return m_eStreamCharSet; }
 
     void            SetLineDelimiter( LineEnd eLineEnd )
-                        { eLineDelimiter = eLineEnd; }
-    LineEnd         GetLineDelimiter() const { return eLineDelimiter; }
+                        { m_eLineDelimiter = eLineEnd; }
+    LineEnd         GetLineDelimiter() const { return m_eLineDelimiter; }
 
     SvStream&       ReadUInt16( sal_uInt16& rUInt16 );
     SvStream&       ReadUInt32( sal_uInt32& rUInt32 );
@@ -324,11 +324,11 @@ public:
     sal_Size        Write( 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 + nBufActualPos;  }
+    sal_uInt64      Tell() const { return m_nBufFilePos + m_nBufActualPos;  }
     // length between current (Tell()) pos and end of stream
     virtual sal_uInt64 remainingSize();
     void            Flush();
-    bool            IsEof() const { return bIsEof; }
+    bool            IsEof() const { return m_isEof; }
     // next Tell() <= nSize
     bool            SetStreamSize( sal_uInt64 nSize );
 
@@ -430,21 +430,21 @@ public:
     bool            WriteUniOrByteChar( sal_Unicode ch )
                     { return WriteUniOrByteChar( ch, GetStreamCharSet() ); }
 
-    void            SetBufferSize( sal_uInt16 nBufSize );
-    sal_uInt16      GetBufferSize() const { return nBufSize; }
+    void            SetBufferSize( sal_uInt16 m_nBufSize );
+    sal_uInt16      GetBufferSize() const { return m_nBufSize; }
 
     void            RefreshBuffer();
 
-    bool            IsWritable() const { return bIsWritable; }
-    StreamMode      GetStreamMode() const { return eStreamMode; }
+    bool            IsWritable() const { return m_isWritable; }
+    StreamMode      GetStreamMode() const { return m_eStreamMode; }
 
-    long            GetVersion() { return nVersion; }
-    void            SetVersion( long n ) { nVersion = n; }
+    long            GetVersion() { return m_nVersion; }
+    void            SetVersion( long n ) { m_nVersion = n; }
 
     friend SvStream& operator<<( SvStream& rStr, SvStrPtr f ); // for Manips
 
     /// end of input seen during previous i/o operation
-    bool eof() const { return bIsEof; }
+    bool eof() const { return m_isEof; }
 
     /// stream is broken
     bool bad() const { return GetError() != 0; }
@@ -474,7 +474,7 @@ inline SvStream& operator<<( SvStream& rStr, SvStrPtr f )
 TOOLS_DLLPUBLIC SvStream& endl( SvStream& rStr );
 /// same as endl() but Unicode
 TOOLS_DLLPUBLIC SvStream& endlu( SvStream& rStr );
-/// call endlu() if eStreamCharSet==RTL_TEXTECODING_UNICODE otherwise endl()
+/// call endlu() if m_eStreamCharSet==RTL_TEXTECODING_UNICODE otherwise endl()
 TOOLS_DLLPUBLIC SvStream& endlub( SvStream& rStr );
 
 /// Attempt to read nUnits 8bit units to an OString, returned OString's
diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx
index 6d5ff46..67657b2 100644
--- a/sot/source/sdstor/stgole.cxx
+++ b/sot/source/sdstor/stgole.cxx
@@ -32,7 +32,7 @@
 
 StgInternalStream::StgInternalStream( BaseStorage& rStg, const OUString& rName, bool bWr )
 {
-    bIsWritable = true;
+    m_isWritable = true;
     StreamMode nMode = bWr
                  ? StreamMode::WRITE | StreamMode::SHARE_DENYALL
                  : StreamMode::READ | StreamMode::SHARE_DENYWRITE | StreamMode::NOCREATE;
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index db02b17..6730712 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -107,9 +107,9 @@ SotStorageStream::SotStorageStream( const OUString & rName, StreamMode nMode )
     , pOwnStm( NULL )
 {
     if( nMode & StreamMode::WRITE )
-        bIsWritable = true;
+        m_isWritable = true;
     else
-        bIsWritable = false;
+        m_isWritable = false;
 }
 
 SotStorageStream::SotStorageStream( BaseStorageStream * pStm )
@@ -117,9 +117,9 @@ SotStorageStream::SotStorageStream( BaseStorageStream * pStm )
     if( pStm )
     {
         if( StreamMode::WRITE & pStm->GetMode() )
-            bIsWritable = true;
+            m_isWritable = true;
         else
-            bIsWritable = false;
+            m_isWritable = false;
 
         pOwnStm = pStm;
         SetError( pStm->GetError() );
@@ -128,7 +128,7 @@ SotStorageStream::SotStorageStream( BaseStorageStream * pStm )
     else
     {
         pOwnStm = NULL;
-        bIsWritable = true;
+        m_isWritable = true;
         SetError( SVSTREAM_INVALID_PARAMETER );
     }
 }
@@ -137,7 +137,7 @@ SotStorageStream::SotStorageStream()
     : pOwnStm( NULL )
 {
     // ??? wenn Init virtuell ist, entsprechen setzen
-    bIsWritable = true;
+    m_isWritable = true;
 }
 
 SotStorageStream::~SotStorageStream()
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx
index 71b4d92..7cf4225 100644
--- a/tools/source/ref/pstm.cxx
+++ b/tools/source/ref/pstm.cxx
@@ -62,7 +62,7 @@ SvPersistStream::SvPersistStream( SvClassManager & rMgr, SvStream * pStream, sal
     , pRefStm( NULL )
 {
     DBG_ASSERT( nStartIdx != 0, "zero index not allowed" );
-    bIsWritable = true;
+    m_isWritable = true;
     if( pStm )
     {
         SetVersion( pStm->GetVersion() );
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 7dd5dd4..88b320e 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-// TODO: Read->RefreshBuffer-> React to changes from nBufActualLen
+// TODO: Read->RefreshBuffer-> React to changes from m_nBufActualLen
 
 #include <cstddef>
 
@@ -130,13 +130,13 @@ inline static void SwapDouble( double& r )
 //SDO
 
 #define READNUMBER_WITHOUT_SWAP(datatype,value) \
-    if( bIoRead && sizeof(datatype)<=nBufFree)             \
+    if (m_isIoRead && sizeof(datatype) <= m_nBufFree)       \
     {                                                       \
         for (std::size_t i = 0; i < sizeof(datatype); i++)  \
-            reinterpret_cast<char *>(&value)[i] = pBufPos[i]; \
-        nBufActualPos += sizeof(datatype);                  \
-        pBufPos += sizeof(datatype);                        \
-        nBufFree -= sizeof(datatype);                       \
+            reinterpret_cast<char *>(&value)[i] = m_pBufPos[i]; \
+        m_nBufActualPos += sizeof(datatype);                \
+        m_pBufPos += sizeof(datatype);                      \
+        m_nBufFree -= sizeof(datatype);                     \
     }                                                       \
     else                                                    \
     {                                                       \
@@ -145,16 +145,16 @@ inline static void SwapDouble( double& r )
 
 
 #define WRITENUMBER_WITHOUT_SWAP(datatype,value) \
-    if( bIoWrite && sizeof(datatype) <= nBufFree)    \
+    if (m_isIoWrite && sizeof(datatype) <= m_nBufFree)      \
     {                                                   \
         for (std::size_t i = 0; i < sizeof(datatype); i++)  \
-            pBufPos[i] = reinterpret_cast<char const *>(&value)[i]; \
-        nBufFree -= sizeof(datatype);                       \
-        nBufActualPos += sizeof(datatype);                  \
-        if( nBufActualPos > nBufActualLen )                 \
-            nBufActualLen = nBufActualPos;                  \
-        pBufPos += sizeof(datatype);                        \
-        bIsDirty = true;                                    \
+            m_pBufPos[i] = reinterpret_cast<char const *>(&value)[i]; \
+        m_nBufFree -= sizeof(datatype);                     \
+        m_nBufActualPos += sizeof(datatype);                \
+        if (m_nBufActualPos > m_nBufActualLen)              \
+            m_nBufActualLen = m_nBufActualPos;              \
+        m_pBufPos += sizeof(datatype);                      \
+        m_isDirty = true;                                   \
     }                                                       \
     else                                                    \
     {                                                       \
@@ -311,9 +311,9 @@ sal_Size SvStream::GetData( void* pData, sal_Size nSize )
 {
     if( !GetError() )
     {
-        DBG_ASSERT( xLockBytes.Is(), "pure virtual function" );
+        DBG_ASSERT( m_xLockBytes.Is(), "pure virtual function" );
         sal_Size nRet(0);
-        nError = xLockBytes->ReadAt(m_nActPos, pData, nSize, &nRet);
+        m_nError = m_xLockBytes->ReadAt(m_nActPos, pData, nSize, &nRet);
         m_nActPos += nRet;
         return nRet;
     }
@@ -324,9 +324,9 @@ sal_Size SvStream::PutData( const void* pData, sal_Size nSize )
 {
     if( !GetError() )
     {
-        DBG_ASSERT( xLockBytes.Is(), "pure virtual function" );
+        DBG_ASSERT( m_xLockBytes.Is(), "pure virtual function" );
         sal_Size nRet(0);
-        nError = xLockBytes->WriteAt(m_nActPos, pData, nSize, &nRet);
+        m_nError = m_xLockBytes->WriteAt(m_nActPos, pData, nSize, &nRet);
         m_nActPos += nRet;
         return nRet;
     }
@@ -339,9 +339,9 @@ sal_uInt64 SvStream::SeekPos(sal_uInt64 const nPos)
     assert(nPos != SAL_MAX_UINT32);
     if( !GetError() && nPos == STREAM_SEEK_TO_END )
     {
-        DBG_ASSERT( xLockBytes.Is(), "pure virtual function" );
+        DBG_ASSERT( m_xLockBytes.Is(), "pure virtual function" );
         SvLockBytesStat aStat;
-        xLockBytes->Stat( &aStat, SVSTATFLAG_DEFAULT );
+        m_xLockBytes->Stat( &aStat, SVSTATFLAG_DEFAULT );
         m_nActPos = aStat.nSize;
     }
     else
@@ -353,49 +353,49 @@ void SvStream::FlushData()
 {
     if( !GetError() )
     {
-        DBG_ASSERT( xLockBytes.Is(), "pure virtual function" );
-        nError = xLockBytes->Flush();
+        DBG_ASSERT( m_xLockBytes.Is(), "pure virtual function" );
+        m_nError = m_xLockBytes->Flush();
     }
 }
 
 void SvStream::SetSize(sal_uInt64 const nSize)
 {
-    DBG_ASSERT( xLockBytes.Is(), "pure virtual function" );
-    nError = xLockBytes->SetSize( nSize );
+    DBG_ASSERT( m_xLockBytes.Is(), "pure virtual function" );
+    m_nError = m_xLockBytes->SetSize( nSize );
 }
 
 void SvStream::ImpInit()
 {
     m_nActPos           = 0;
-    nCompressMode       = SvStreamCompressFlags::NONE;
-    eStreamCharSet      = osl_getThreadTextEncoding();
-    nCryptMask          = 0;
-    bIsEof              = false;
+    m_nCompressMode     = SvStreamCompressFlags::NONE;
+    m_eStreamCharSet    = osl_getThreadTextEncoding();
+    m_nCryptMask        = 0;
+    m_isEof             = false;
 #if defined UNX
-    eLineDelimiter      = LINEEND_LF;   // UNIX-Format
+    m_eLineDelimiter    = LINEEND_LF;   // UNIX-Format
 #else
-    eLineDelimiter      = LINEEND_CRLF; // DOS-Format
+    m_eLineDelimiter    = LINEEND_CRLF; // DOS-Format
 #endif
 
     SetEndian( SvStreamEndian::LITTLE );
 
     m_nBufFilePos       = 0;
-    nBufActualPos       = 0;
-    bIsDirty            = false;
-    bIsConsistent       = true;
-    bIsWritable         = true;
+    m_nBufActualPos     = 0;
+    m_isDirty           = false;
+    m_isConsistent      = true;
+    m_isWritable        = true;
 
-    pRWBuf              = 0;
-    pBufPos             = 0;
-    nBufSize            = 0;
-    nBufActualLen       = 0;
-    bIoRead             = false;
-    bIoWrite            = false;
-    nBufFree            = 0;
+    m_pRWBuf            = nullptr;
+    m_pBufPos           = nullptr;
+    m_nBufSize          = 0;
+    m_nBufActualLen     = 0;
+    m_isIoRead          = false;
+    m_isIoWrite         = false;
+    m_nBufFree          = 0;
 
-    eStreamMode         = StreamMode::NONE;
+    m_eStreamMode       = StreamMode::NONE;
 
-    nVersion           = 0;
+    m_nVersion          = 0;
 
     ClearError();
 }
@@ -403,7 +403,7 @@ void SvStream::ImpInit()
 SvStream::SvStream( SvLockBytes* pLockBytesP )
 {
     ImpInit();
-    xLockBytes = pLockBytesP;
+    m_xLockBytes = pLockBytesP;
     if( pLockBytesP ) {
         const SvStream* pStrm = pLockBytesP->GetStream();
         if( pStrm ) {
@@ -420,75 +420,75 @@ SvStream::SvStream()
 
 SvStream::~SvStream()
 {
-    if ( xLockBytes.Is() )
+    if (m_xLockBytes.Is())
         Flush();
 
-    delete[] pRWBuf;
+    delete[] m_pRWBuf;
 }
 
 void SvStream::ClearError()
 {
-    bIsEof = false;
-    nError = SVSTREAM_OK;
+    m_isEof = false;
+    m_nError = SVSTREAM_OK;
 }
 
 void SvStream::SetError( sal_uInt32 nErrorCode )
 {
-    if ( nError == SVSTREAM_OK )
-        nError = nErrorCode;
+    if (m_nError == SVSTREAM_OK)
+        m_nError = nErrorCode;
 }
 
 void SvStream::SetEndian( SvStreamEndian nNewFormat )
 {
-    nEndian = nNewFormat;
-    bSwap = false;
+    m_nEndian = nNewFormat;
+    m_isSwap = false;
 #ifdef OSL_BIGENDIAN
-    if( nEndian == SvStreamEndian::LITTLE )
-        bSwap = true;
+    if (m_nEndian == SvStreamEndian::LITTLE)
+        m_isSwap = true;
 #else
-    if( nEndian == SvStreamEndian::BIG )
-        bSwap = true;
+    if (m_nEndian == SvStreamEndian::BIG)
+        m_isSwap = true;
 #endif
 }
 
 void SvStream::SetBufferSize( sal_uInt16 nBufferSize )
 {
     sal_uInt64 const nActualFilePos = Tell();
-    bool bDontSeek = (pRWBuf == 0);
+    bool bDontSeek = (m_pRWBuf == nullptr);
 
-    if( bIsDirty && bIsConsistent && bIsWritable )  // due to Windows NT: Access denied
+    if (m_isDirty && m_isConsistent && m_isWritable)  // due to Windows NT: Access denied
         Flush();
 
-    if( nBufSize )
+    if (m_nBufSize)
     {
-        delete[] pRWBuf;
-        m_nBufFilePos += nBufActualPos;
+        delete[] m_pRWBuf;
+        m_nBufFilePos += m_nBufActualPos;
     }
 
-    pRWBuf          = 0;
-    nBufActualLen   = 0;
-    nBufActualPos   = 0;
-    nBufSize        = nBufferSize;
-    if( nBufSize )
-        pRWBuf = new sal_uInt8[ nBufSize ];
-    bIsConsistent   = true;
-    pBufPos         = pRWBuf;
-    bIoRead = bIoWrite = false;
+    m_pRWBuf        = nullptr;
+    m_nBufActualLen = 0;
+    m_nBufActualPos = 0;
+    m_nBufSize      = nBufferSize;
+    if (m_nBufSize)
+        m_pRWBuf = new sal_uInt8[ m_nBufSize ];
+    m_isConsistent  = true;
+    m_pBufPos       = m_pRWBuf;
+    m_isIoRead = m_isIoWrite = false;
     if( !bDontSeek )
         SeekPos( nActualFilePos );
 }
 
 void SvStream::ClearBuffer()
 {
-    nBufActualLen   = 0;
-    nBufActualPos   = 0;
+    m_nBufActualLen = 0;
+    m_nBufActualPos = 0;
     m_nBufFilePos   = 0;
-    pBufPos         = pRWBuf;
-    bIsDirty        = false;
-    bIsConsistent   = true;
-    bIoRead = bIoWrite = false;
+    m_pBufPos       = m_pRWBuf;
+    m_isDirty       = false;
+    m_isConsistent  = true;
+    m_isIoRead = m_isIoWrite = false;
 
-    bIsEof          = false;
+    m_isEof         = false;
 }
 
 void SvStream::ResetError()
@@ -523,7 +523,7 @@ bool SvStream::ReadLine( OString& rStr, sal_Int32 nMaxBytesToRead )
             if ( aBuf.isEmpty() )
             {
                 // Exit on first block-read error
-                bIsEof = true;
+                m_isEof = true;
                 rStr.clear();
                 return false;
             }
@@ -574,7 +574,7 @@ bool SvStream::ReadLine( OString& rStr, sal_Int32 nMaxBytesToRead )
     }
 
     if ( bEnd )
-        bIsEof = false;
+        m_isEof = false;
     rStr = aBuf.makeStringAndClear();
     return bEnd;
 }
@@ -600,7 +600,7 @@ bool SvStream::ReadUniStringLine( OUString& rStr, sal_Int32 nMaxCodepointsToRead
             if ( aBuf.isEmpty() )
             {
                 // exit on first BlockRead error
-                bIsEof = true;
+                m_isEof = true;
                 rStr.clear();
                 return false;
             }
@@ -611,7 +611,7 @@ bool SvStream::ReadUniStringLine( OUString& rStr, sal_Int32 nMaxCodepointsToRead
         sal_uInt16 j, n;
         for( j = n = 0; j < nLen ; ++j )
         {
-            if ( bSwap )
+            if (m_isSwap)
                 SwapUShort( buf[n] );
             c = buf[j];
             if ( c == '\n' || c == '\r' )
@@ -653,14 +653,14 @@ bool SvStream::ReadUniStringLine( OUString& rStr, sal_Int32 nMaxCodepointsToRead
     {
         sal_Unicode cTemp;
         Read( &cTemp, sizeof(cTemp) );
-        if ( bSwap )
+        if (m_isSwap)
             SwapUShort( cTemp );
         if( cTemp == c || (cTemp != '\n' && cTemp != '\r') )
             Seek( nOldFilePos );
     }
 
     if ( bEnd )
-        bIsEof = false;
+        m_isEof = false;
     rStr = aBuf.makeStringAndClear();
     return bEnd;
 }
@@ -747,13 +747,13 @@ bool SvStream::WriteUnicodeOrByteText( const OUString& rStr, rtl_TextEncoding eD
     if ( eDestCharSet == RTL_TEXTENCODING_UNICODE )
     {
         write_uInt16s_FromOUString(*this, rStr, rStr.getLength());
-        return nError == SVSTREAM_OK;
+        return m_nError == SVSTREAM_OK;
     }
     else
     {
         OString aStr(OUStringToOString(rStr, eDestCharSet));
         write_uInt8s_FromOString(*this, aStr, aStr.getLength());
-        return nError == SVSTREAM_OK;
+        return m_nError == SVSTREAM_OK;
     }
 }
 
@@ -766,7 +766,7 @@ bool SvStream::WriteLine(const OString& rStr)
 {
     Write(rStr.getStr(), rStr.getLength());
     endl(*this);
-    return nError == SVSTREAM_OK;
+    return m_nError == SVSTREAM_OK;
 }
 
 bool SvStream::WriteUniOrByteChar( sal_Unicode ch, rtl_TextEncoding eDestCharSet )
@@ -778,7 +778,7 @@ bool SvStream::WriteUniOrByteChar( sal_Unicode ch, rtl_TextEncoding eDestCharSet
         OString aStr(&ch, 1, eDestCharSet);
         Write(aStr.getStr(), aStr.getLength());
     }
-    return nError == SVSTREAM_OK;
+    return m_nError == SVSTREAM_OK;
 }
 
 bool SvStream::StartWritingUnicodeText()
@@ -788,7 +788,7 @@ bool SvStream::StartWritingUnicodeText()
     // Upon read: 0xfeff(-257) => no swap; 0xfffe(-2) => swap
     sal_uInt16 v = 0xfeff;
     WRITENUMBER_WITHOUT_SWAP(sal_uInt16, v); // write native format
-    return nError == SVSTREAM_OK;
+    return m_nError == SVSTREAM_OK;
 }
 
 bool SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet )
@@ -815,18 +815,18 @@ bool SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet )
             if (    eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
                     eReadBomCharSet == RTL_TEXTENCODING_UNICODE)
             {
-                SetEndian( nEndian == SvStreamEndian::BIG ? SvStreamEndian::LITTLE : SvStreamEndian::BIG );
+                SetEndian( m_nEndian == SvStreamEndian::BIG ? SvStreamEndian::LITTLE : SvStreamEndian::BIG );
                 nBack = 0;
             }
         break;
         case 0xefbb :
-            if (nEndian == SvStreamEndian::BIG &&
+            if (m_nEndian == SvStreamEndian::BIG &&
                     (eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
                      eReadBomCharSet == RTL_TEXTENCODING_UTF8))
                 bTryUtf8 = true;
         break;
         case 0xbbef :
-            if (nEndian == SvStreamEndian::LITTLE &&
+            if (m_nEndian == SvStreamEndian::LITTLE &&
                     (eReadBomCharSet == RTL_TEXTENCODING_DONTKNOW ||
                      eReadBomCharSet == RTL_TEXTENCODING_UTF8))
                 bTryUtf8 = true;
@@ -844,7 +844,7 @@ bool SvStream::StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet )
     }
     if (nBack)
         SeekRel( -nBack );      // no BOM, pure data
-    return nError == SVSTREAM_OK;
+    return m_nError == SVSTREAM_OK;
 }
 
 sal_uInt64 SvStream::SeekRel(sal_Int64 const nPos)
@@ -863,7 +863,7 @@ sal_uInt64 SvStream::SeekRel(sal_Int64 const nPos)
             nActualPos -= nAbsPos;
     }
 
-    pBufPos = pRWBuf + nActualPos;
+    m_pBufPos = m_pRWBuf + nActualPos;
     return Seek( nActualPos );
 }
 
@@ -873,7 +873,7 @@ SvStream& SvStream::ReadUInt16(sal_uInt16& r)
     READNUMBER_WITHOUT_SWAP(sal_uInt16, n)
     if (good())
     {
-        if (bSwap)
+        if (m_isSwap)
             SwapUShort(n);
         r = n;
     }
@@ -886,7 +886,7 @@ SvStream& SvStream::ReadUInt32(sal_uInt32& r)
     READNUMBER_WITHOUT_SWAP(sal_uInt32, n)
     if (good())
     {
-        if (bSwap)
+        if (m_isSwap)
             SwapULong(n);
         r = n;
     }
@@ -899,7 +899,7 @@ SvStream& SvStream::ReadUInt64(sal_uInt64& r)
     READNUMBER_WITHOUT_SWAP(sal_uInt64, n)
     if (good())
     {
-        if (bSwap)
+        if (m_isSwap)
             SwapUInt64(n);
         r = n;
     }
@@ -912,7 +912,7 @@ SvStream& SvStream::ReadInt16(sal_Int16& r)
     READNUMBER_WITHOUT_SWAP(sal_Int16, n)
     if (good())
     {
-        if (bSwap)
+        if (m_isSwap)
             SwapShort(n);
         r = n;
     }
@@ -925,7 +925,7 @@ SvStream& SvStream::ReadInt32(sal_Int32& r)
     READNUMBER_WITHOUT_SWAP(sal_Int32, n)
     if (good())
     {
-        if (bSwap)
+        if (m_isSwap)
             SwapLongInt(n);
         r = n;
     }
@@ -938,7 +938,7 @@ SvStream& SvStream::ReadInt64(sal_Int64& r)
     READNUMBER_WITHOUT_SWAP(sal_Int64, n)
     if (good())
     {
-        if (bSwap)
+        if (m_isSwap)
             SwapInt64(n);
         r = n;
     }
@@ -947,13 +947,13 @@ SvStream& SvStream::ReadInt64(sal_Int64& r)
 
 SvStream& SvStream::ReadSChar( signed char& r )
 {
-    if( (bIoRead || !bIsConsistent) &&
-        sizeof(signed char) <= nBufFree )
+    if ((m_isIoRead || !m_isConsistent) &&
+        sizeof(signed char) <= m_nBufFree)
     {
-        r = *pBufPos;
-        nBufActualPos += sizeof(signed char);
-        pBufPos += sizeof(signed char);
-        nBufFree -= sizeof(signed char);
+        r = *m_pBufPos;
+        m_nBufActualPos += sizeof(signed char);
+        m_pBufPos += sizeof(signed char);
+        m_nBufFree -= sizeof(signed char);
     }
     else
         Read( &r, sizeof(signed char) );
@@ -964,13 +964,13 @@ SvStream& SvStream::ReadSChar( signed char& r )
 
 SvStream& SvStream::ReadChar( char& r )
 {
-    if( (bIoRead || !bIsConsistent) &&
-        sizeof(char) <= nBufFree )
+    if ((m_isIoRead || !m_isConsistent) &&
+        sizeof(char) <= m_nBufFree)
     {
-        r = *pBufPos;
-        nBufActualPos += sizeof(char);
-        pBufPos += sizeof(char);
-        nBufFree -= sizeof(char);
+        r = *m_pBufPos;
+        m_nBufActualPos += sizeof(char);
+        m_pBufPos += sizeof(char);
+        m_nBufFree -= sizeof(char);
     }
     else
         Read( &r, sizeof(char) );
@@ -979,13 +979,13 @@ SvStream& SvStream::ReadChar( char& r )
 
 SvStream& SvStream::ReadUChar( unsigned char& r )
 {
-    if( (bIoRead || !bIsConsistent) &&
-        sizeof(char) <= nBufFree )
+    if ((m_isIoRead || !m_isConsistent) &&
+        sizeof(char) <= m_nBufFree)
     {
-        r = *pBufPos;
-        nBufActualPos += sizeof(char);
-        pBufPos += sizeof(char);
-        nBufFree -= sizeof(char);
+        r = *m_pBufPos;
+        m_nBufActualPos += sizeof(char);
+        m_pBufPos += sizeof(char);
+        m_nBufFree -= sizeof(char);
     }
     else
         Read( &r, sizeof(char) );
@@ -994,15 +994,15 @@ SvStream& SvStream::ReadUChar( unsigned char& r )
 
 SvStream& SvStream::ReadCharAsBool( bool& r )
 {
-    if( (bIoRead || !bIsConsistent) &&
-        sizeof(char) <= nBufFree )
+    if ((m_isIoRead || !m_isConsistent) &&
+        sizeof(char) <= m_nBufFree)
     {
         SAL_WARN_IF(
-            *pBufPos > 1, "tools.stream", unsigned(*pBufPos) << " not 0/1");
-        r = *pBufPos != 0;
-        nBufActualPos += sizeof(char);
-        pBufPos += sizeof(char);
-        nBufFree -= sizeof(char);
+            *m_pBufPos > 1, "tools.stream", unsigned(*m_pBufPos) << " not 0/1");
+        r = *m_pBufPos != 0;
+        m_nBufActualPos += sizeof(char);
+        m_pBufPos += sizeof(char);
+        m_nBufFree -= sizeof(char);
     }
     else
     {
@@ -1023,7 +1023,7 @@ SvStream& SvStream::ReadFloat(float& r)
     if (good())
     {
 #if defined UNX
-        if (bSwap)
+        if (m_isSwap)
           SwapFloat(n);
 #endif
         r = n;
@@ -1038,7 +1038,7 @@ SvStream& SvStream::ReadDouble(double& r)
     if (good())
     {
 #if defined UNX
-        if (bSwap)
+        if (m_isSwap)
           SwapDouble(n);
 #endif
         r = n;
@@ -1063,7 +1063,7 @@ SvStream& SvStream::ReadStream( SvStream& rStream )
 
 SvStream& SvStream::WriteUInt16( sal_uInt16 v )
 {
-    if( bSwap )
+    if (m_isSwap)
         SwapUShort(v);
     WRITENUMBER_WITHOUT_SWAP(sal_uInt16,v)
     return *this;
@@ -1071,7 +1071,7 @@ SvStream& SvStream::WriteUInt16( sal_uInt16 v )
 
 SvStream& SvStream::WriteUInt32( sal_uInt32 v )
 {
-    if( bSwap )
+    if (m_isSwap)
         SwapULong(v);
     WRITENUMBER_WITHOUT_SWAP(sal_uInt32,v)
     return *this;
@@ -1079,7 +1079,7 @@ SvStream& SvStream::WriteUInt32( sal_uInt32 v )
 
 SvStream& SvStream::WriteUInt64( sal_uInt64 v )
 {
-    if( bSwap )
+    if (m_isSwap)
         SwapUInt64(v);
     WRITENUMBER_WITHOUT_SWAP(sal_uInt64,v)
     return *this;
@@ -1087,7 +1087,7 @@ SvStream& SvStream::WriteUInt64( sal_uInt64 v )
 
 SvStream& SvStream::WriteInt16( sal_Int16 v )
 {
-    if( bSwap )
+    if (m_isSwap)
         SwapShort(v);
     WRITENUMBER_WITHOUT_SWAP(sal_Int16,v)
     return *this;
@@ -1095,7 +1095,7 @@ SvStream& SvStream::WriteInt16( sal_Int16 v )
 
 SvStream& SvStream::WriteInt32( sal_Int32 v )
 {
-    if( bSwap )
+    if (m_isSwap)
         SwapLongInt(v);
     WRITENUMBER_WITHOUT_SWAP(sal_Int32,v)
     return *this;
@@ -1103,7 +1103,7 @@ SvStream& SvStream::WriteInt32( sal_Int32 v )
 
 SvStream& SvStream::WriteInt64  (sal_Int64 v)
 {
-    if( bSwap )
+    if (m_isSwap)
         SwapInt64(v);
     WRITENUMBER_WITHOUT_SWAP(sal_Int64,v)
     return *this;
@@ -1112,15 +1112,15 @@ SvStream& SvStream::WriteInt64  (sal_Int64 v)
 SvStream& SvStream::WriteSChar( signed char v )
 {
     //SDO
-    if(bIoWrite && sizeof(signed char) <= nBufFree )
+    if (m_isIoWrite && sizeof(signed char) <= m_nBufFree)
     {
-        *pBufPos = v;
-        pBufPos++; // sizeof(char);
-        nBufActualPos++;
-        if( nBufActualPos > nBufActualLen )  // Append ?
-            nBufActualLen = nBufActualPos;
-        nBufFree--; // = sizeof(char);
-        bIsDirty = true;
+        *m_pBufPos = v;
+        m_pBufPos++; // sizeof(char);
+        m_nBufActualPos++;
+        if (m_nBufActualPos > m_nBufActualLen)  // Append ?
+            m_nBufActualLen = m_nBufActualPos;
+        m_nBufFree--; // = sizeof(char);
+        m_isDirty = true;
     }
     else
         Write( &v, sizeof(signed char) );
@@ -1132,15 +1132,15 @@ SvStream& SvStream::WriteSChar( signed char v )
 SvStream& SvStream::WriteChar( char v )
 {
     //SDO
-    if(bIoWrite && sizeof(char) <= nBufFree )
+    if (m_isIoWrite && sizeof(char) <= m_nBufFree)
     {
-        *pBufPos = v;
-        pBufPos++; // sizeof(char);
-        nBufActualPos++;
-        if( nBufActualPos > nBufActualLen )  // Append ?
-            nBufActualLen = nBufActualPos;
-        nBufFree--; // = sizeof(char);
-        bIsDirty = true;
+        *m_pBufPos = v;
+        m_pBufPos++; // sizeof(char);
+        m_nBufActualPos++;
+        if (m_nBufActualPos > m_nBufActualLen)  // Append ?
+            m_nBufActualLen = m_nBufActualPos;
+        m_nBufFree--; // = sizeof(char);
+        m_isDirty = true;
     }
     else
         Write( &v, sizeof(char) );
@@ -1150,15 +1150,15 @@ SvStream& SvStream::WriteChar( char v )
 SvStream& SvStream::WriteUChar( unsigned char v )
 {
 //SDO
-    if(bIoWrite && sizeof(char) <= nBufFree )
+    if (m_isIoWrite && sizeof(char) <= m_nBufFree)
     {
-        *reinterpret_cast<unsigned char*>(pBufPos) = v;
-        pBufPos++; // = sizeof(char);
-        nBufActualPos++; // = sizeof(char);
-        if( nBufActualPos > nBufActualLen )  // Append ?
-            nBufActualLen = nBufActualPos;
-        nBufFree--;
-        bIsDirty = true;
+        *reinterpret_cast<unsigned char*>(m_pBufPos) = v;
+        m_pBufPos++; // = sizeof(char);
+        m_nBufActualPos++; // = sizeof(char);
+        if (m_nBufActualPos > m_nBufActualLen)  // Append ?
+            m_nBufActualLen = m_nBufActualPos;
+        m_nBufFree--;
+        m_isDirty = true;
     }
     else
         Write( &v, sizeof(char) );
@@ -1178,7 +1178,7 @@ SvStream& SvStream::WriteUnicode( sal_Unicode v )
 SvStream& SvStream::WriteFloat( float v )
 {
 #ifdef UNX
-    if( bSwap )
+    if (m_isSwap)
       SwapFloat(v);
 #endif
     WRITENUMBER_WITHOUT_SWAP(float,v)
@@ -1188,7 +1188,7 @@ SvStream& SvStream::WriteFloat( float v )
 SvStream& SvStream::WriteDouble ( const double& r )
 {
 #if defined UNX
-    if( bSwap )
+    if (m_isSwap)
     {
       double nHelp = r;
       SwapDouble(nHelp);
@@ -1244,87 +1244,87 @@ SvStream& SvStream::WriteUniOrByteString( const OUString& rStr, rtl_TextEncoding
 sal_Size SvStream::Read( void* pData, sal_Size nCount )
 {
     sal_Size nSaveCount = nCount;
-    if( !bIsConsistent )
+    if (!m_isConsistent)
         RefreshBuffer();
 
-    if( !pRWBuf )
+    if (!m_pRWBuf)
     {
         nCount = GetData( pData,nCount);
-        if( nCryptMask )
+        if (m_nCryptMask)
             EncryptBuffer(pData, nCount);
         m_nBufFilePos += nCount;
     }
     else
     {
         // check if block is completely within buffer
-        bIoRead = true;
-        bIoWrite = false;
-        if( nCount <= (sal_Size)(nBufActualLen - nBufActualPos ) )
+        m_isIoRead = true;
+        m_isIoWrite = false;
+        if (nCount <= static_cast<sal_Size>(m_nBufActualLen - m_nBufActualPos))
         {
             // => yes
-            memcpy(pData, pBufPos, (size_t) nCount);
-            nBufActualPos = nBufActualPos + (sal_uInt16)nCount;
-            pBufPos += nCount;
-            nBufFree = nBufFree - (sal_uInt16)nCount;
+            memcpy(pData, m_pBufPos, (size_t) nCount);
+            m_nBufActualPos = m_nBufActualPos + (sal_uInt16)nCount;
+            m_pBufPos += nCount;
+            m_nBufFree = m_nBufFree - (sal_uInt16)nCount;
         }
         else
         {
-            if( bIsDirty ) // Does stream require a flush?
+            if (m_isDirty) // Does stream require a flush?
             {
                 SeekPos(m_nBufFilePos);
-                if( nCryptMask )
-                    CryptAndWriteBuffer(pRWBuf, nBufActualLen);
+                if (m_nCryptMask)
+                    CryptAndWriteBuffer(m_pRWBuf, m_nBufActualLen);
                 else
-                    PutData( pRWBuf, nBufActualLen );
-                bIsDirty = false;
+                    PutData(m_pRWBuf, m_nBufActualLen);
+                m_isDirty = false;
             }
 
             // Does data block fit into buffer?
-            if( nCount > nBufSize )
+            if (nCount > m_nBufSize)
             {
                 // => No! Thus read directly
                 // into target area without using the buffer
 
-                bIoRead = false;
+                m_isIoRead = false;
 
-                SeekPos(m_nBufFilePos + nBufActualPos);
-                nBufActualLen = 0;
-                pBufPos       = pRWBuf;
+                SeekPos(m_nBufFilePos + m_nBufActualPos);
+                m_nBufActualLen = 0;
+                m_pBufPos     = m_pRWBuf;
                 nCount = GetData( pData, nCount );
-                if( nCryptMask )
+                if (m_nCryptMask)
                     EncryptBuffer(pData, nCount);
                 m_nBufFilePos += nCount;
-                m_nBufFilePos += nBufActualPos;
-                nBufActualPos = 0;
+                m_nBufFilePos += m_nBufActualPos;
+                m_nBufActualPos = 0;
             }
             else
             {
                 // => Yes. Fill buffer first, then copy to target area
 
-                m_nBufFilePos += nBufActualPos;
+                m_nBufFilePos += m_nBufActualPos;
                 SeekPos(m_nBufFilePos);
 
                 // TODO: Typecast before GetData, sal_uInt16 nCountTmp
-                sal_Size nCountTmp = GetData( pRWBuf, nBufSize );
-                if( nCryptMask )
-                    EncryptBuffer(pRWBuf, nCountTmp);
-                nBufActualLen = (sal_uInt16)nCountTmp;
+                sal_Size nCountTmp = GetData( m_pRWBuf, m_nBufSize );
+                if (m_nCryptMask)
+                    EncryptBuffer(m_pRWBuf, nCountTmp);
+                m_nBufActualLen = (sal_uInt16)nCountTmp;
                 if( nCount > nCountTmp )
                 {
                     nCount = nCountTmp;  // trim count back, EOF see below
                 }
-                memcpy( pData, pRWBuf, (size_t)nCount );
-                nBufActualPos = (sal_uInt16)nCount;
-                pBufPos = pRWBuf + nCount;
+                memcpy( pData, m_pRWBuf, (size_t)nCount );
+                m_nBufActualPos = (sal_uInt16)nCount;
+                m_pBufPos = m_pRWBuf + nCount;
             }
         }
     }
-    bIsEof = false;
-    nBufFree = nBufActualLen - nBufActualPos;
-    if( nCount != nSaveCount && nError != ERRCODE_IO_PENDING )
-        bIsEof = true;
-    if( nCount == nSaveCount && nError == ERRCODE_IO_PENDING )
-        nError = ERRCODE_NONE;
+    m_isEof = false;
+    m_nBufFree = m_nBufActualLen - m_nBufActualPos;
+    if (nCount != nSaveCount && m_nError != ERRCODE_IO_PENDING)
+        m_isEof = true;
+    if (nCount == nSaveCount && m_nError == ERRCODE_IO_PENDING)
+        m_nError = ERRCODE_NONE;
     return nCount;
 }
 
@@ -1332,17 +1332,17 @@ sal_Size SvStream::Write( const void* pData, sal_Size nCount )
 {
     if( !nCount )
         return 0;
-    if( !bIsWritable )
+    if (!m_isWritable)
     {
         SetError( ERRCODE_IO_CANTWRITE );
         return 0;
     }
-    if( !bIsConsistent )
+    if (!m_isConsistent)
         RefreshBuffer();   // Remove changes in buffer through PutBack
 
-    if( !pRWBuf )
+    if (!m_pRWBuf)
     {
-        if( nCryptMask )
+        if (m_nCryptMask)
             nCount = CryptAndWriteBuffer( pData, nCount );
         else
             nCount = PutData( pData, nCount );
@@ -1350,42 +1350,42 @@ sal_Size SvStream::Write( const void* pData, sal_Size nCount )
         return nCount;
     }
 
-    bIoRead = false;
-    bIoWrite = true;
-    if( nCount <= (sal_Size)(nBufSize - nBufActualPos) )
+    m_isIoRead = false;
+    m_isIoWrite = true;
+    if (nCount <= static_cast<sal_Size>(m_nBufSize - m_nBufActualPos))
     {
-        memcpy( pBufPos, pData, (size_t)nCount );
-        nBufActualPos = nBufActualPos + (sal_uInt16)nCount;
+        memcpy( m_pBufPos, pData, (size_t)nCount );
+        m_nBufActualPos = m_nBufActualPos + (sal_uInt16)nCount;
         // Update length if buffer was updated
-        if( nBufActualPos > nBufActualLen )
-            nBufActualLen = nBufActualPos;
+        if (m_nBufActualPos > m_nBufActualLen)
+            m_nBufActualLen = m_nBufActualPos;
 
-        pBufPos += nCount;
-        bIsDirty = true;
+        m_pBufPos += nCount;
+        m_isDirty = true;
     }
     else
     {
         // Does stream require flushing?
-        if( bIsDirty )
+        if (m_isDirty)
         {
             SeekPos(m_nBufFilePos);
-            if( nCryptMask )
-                CryptAndWriteBuffer( pRWBuf, (sal_Size)nBufActualLen );
+            if (m_nCryptMask)
+                CryptAndWriteBuffer( m_pRWBuf, (sal_Size)m_nBufActualLen );
             else
-                PutData( pRWBuf, nBufActualLen );
-            bIsDirty = false;
+                PutData( m_pRWBuf, m_nBufActualLen );
+            m_isDirty = false;
         }
 
         // Does data block fit into buffer?
-        if( nCount > nBufSize )
+        if (nCount > m_nBufSize)
         {
-            bIoWrite = false;
-            m_nBufFilePos += nBufActualPos;
-            nBufActualLen = 0;
-            nBufActualPos = 0;
-            pBufPos       = pRWBuf;
+            m_isIoWrite = false;
+            m_nBufFilePos += m_nBufActualPos;
+            m_nBufActualLen = 0;
+            m_nBufActualPos = 0;
+            m_pBufPos     = m_pRWBuf;
             SeekPos(m_nBufFilePos);
-            if( nCryptMask )
+            if (m_nCryptMask)
                 nCount = CryptAndWriteBuffer( pData, nCount );
             else
                 nCount = PutData( pData, nCount );
@@ -1394,25 +1394,25 @@ sal_Size SvStream::Write( const void* pData, sal_Size nCount )
         else
         {
             // Copy block to buffer
-            memcpy( pRWBuf, pData, (size_t)nCount );
+            memcpy( m_pRWBuf, pData, (size_t)nCount );
 
             // Mind the order!
-            m_nBufFilePos += nBufActualPos;
-            nBufActualPos = (sal_uInt16)nCount;
-            pBufPos = pRWBuf + nCount;
-            nBufActualLen = (sal_uInt16)nCount;
-            bIsDirty = true;
+            m_nBufFilePos += m_nBufActualPos;
+            m_nBufActualPos = (sal_uInt16)nCount;
+            m_pBufPos = m_pRWBuf + nCount;
+            m_nBufActualLen = (sal_uInt16)nCount;
+            m_isDirty = true;
         }
     }
-    nBufFree = nBufSize - nBufActualPos;
+    m_nBufFree = m_nBufSize - m_nBufActualPos;
     return nCount;
 }
 
 sal_uInt64 SvStream::Seek(sal_uInt64 const nFilePos)
 {
-    bIoRead = bIoWrite = false;
-    bIsEof = false;
-    if( !pRWBuf )
+    m_isIoRead = m_isIoWrite = false;
+    m_isEof = false;
+    if (!m_pRWBuf)
     {
         m_nBufFilePos = SeekPos( nFilePos );
         DBG_ASSERT(Tell() == m_nBufFilePos,"Out Of Sync!");
@@ -1420,30 +1420,30 @@ sal_uInt64 SvStream::Seek(sal_uInt64 const nFilePos)
     }
 
     // Is seek position within buffer?
-    if (nFilePos >= m_nBufFilePos && nFilePos <= (m_nBufFilePos + nBufActualLen))
+    if (nFilePos >= m_nBufFilePos && nFilePos <= (m_nBufFilePos + m_nBufActualLen))
     {
-        nBufActualPos = (sal_uInt16)(nFilePos - m_nBufFilePos);
-        pBufPos = pRWBuf + nBufActualPos;
-        // Update nBufFree to avoid crash upon PutBack
-        nBufFree = nBufActualLen - nBufActualPos;
+        m_nBufActualPos = (sal_uInt16)(nFilePos - m_nBufFilePos);
+        m_pBufPos = m_pRWBuf + m_nBufActualPos;
+        // Update m_nBufFree to avoid crash upon PutBack
+        m_nBufFree = m_nBufActualLen - m_nBufActualPos;
     }
     else
     {
-        if( bIsDirty && bIsConsistent)
+        if (m_isDirty && m_isConsistent)
         {
             SeekPos(m_nBufFilePos);
-            if( nCryptMask )
-                CryptAndWriteBuffer( pRWBuf, nBufActualLen );
+            if (m_nCryptMask)
+                CryptAndWriteBuffer( m_pRWBuf, m_nBufActualLen );
             else
-                PutData( pRWBuf, nBufActualLen );
-            bIsDirty = false;
+                PutData( m_pRWBuf, m_nBufActualLen );
+            m_isDirty = false;
         }
-        nBufActualLen = 0;
-        nBufActualPos = 0;
-        pBufPos       = pRWBuf;
+        m_nBufActualLen = 0;
+        m_nBufActualPos = 0;
+        m_pBufPos     = m_pRWBuf;
         m_nBufFilePos = SeekPos( nFilePos );
     }
-    return m_nBufFilePos + nBufActualPos;
+    return m_nBufFilePos + m_nBufActualPos;
 }
 
 //STREAM_SEEK_TO_END in the some of the Seek backends is special cased to be
@@ -1460,39 +1460,39 @@ sal_uInt64 SvStream::remainingSize()
 
 void SvStream::Flush()
 {
-    if( bIsDirty && bIsConsistent )
+    if (m_isDirty && m_isConsistent)
     {
         SeekPos(m_nBufFilePos);
-        if( nCryptMask )
-            CryptAndWriteBuffer( pRWBuf, (sal_Size)nBufActualLen );
+        if (m_nCryptMask)
+            CryptAndWriteBuffer( m_pRWBuf, (sal_Size)m_nBufActualLen );
         else
-            if( PutData( pRWBuf, nBufActualLen ) != nBufActualLen )
+            if (PutData( m_pRWBuf, m_nBufActualLen ) != m_nBufActualLen)
                 SetError( SVSTREAM_WRITE_ERROR );
-        bIsDirty = false;
+        m_isDirty = false;
     }
-    if( bIsWritable )
+    if (m_isWritable)
         FlushData();
 }
 
 void SvStream::RefreshBuffer()
 {
-    if( bIsDirty && bIsConsistent )
+    if (m_isDirty && m_isConsistent)
     {
         SeekPos(m_nBufFilePos);
-        if( nCryptMask )
-            CryptAndWriteBuffer( pRWBuf, (sal_Size)nBufActualLen );
+        if (m_nCryptMask)
+            CryptAndWriteBuffer( m_pRWBuf, (sal_Size)m_nBufActualLen );
         else
-            PutData( pRWBuf, nBufActualLen );
-        bIsDirty = false;
+            PutData( m_pRWBuf, m_nBufActualLen );
+        m_isDirty = false;
     }
     SeekPos(m_nBufFilePos);
-    nBufActualLen = (sal_uInt16)GetData( pRWBuf, nBufSize );
-    if( nBufActualLen && nError == ERRCODE_IO_PENDING )
-        nError = ERRCODE_NONE;
-    if( nCryptMask )
-        EncryptBuffer(pRWBuf, (sal_Size)nBufActualLen);
-    bIsConsistent = true;
-    bIoRead = bIoWrite = false;
+    m_nBufActualLen = (sal_uInt16)GetData( m_pRWBuf, m_nBufSize );
+    if (m_nBufActualLen && m_nError == ERRCODE_IO_PENDING)
+        m_nError = ERRCODE_NONE;
+    if (m_nCryptMask)
+        EncryptBuffer(m_pRWBuf, (sal_Size)m_nBufActualLen);
+    m_isConsistent = true;
+    m_isIoRead = m_isIoWrite = false;
 }
 
 SvStream& SvStream::WriteInt32AsString(sal_Int32 nInt32)
@@ -1520,7 +1520,7 @@ sal_Size SvStream::CryptAndWriteBuffer( const void* pStart, sal_Size nLen)
     unsigned char const * pDataPtr = static_cast<unsigned char const *>(pStart);
     sal_Size nCount = 0;
     sal_Size nBufCount;
-    unsigned char nMask = nCryptMask;
+    unsigned char nMask = m_nCryptMask;
     do
     {
         if( nLen >= CRYPT_BUFSIZE )
@@ -1548,7 +1548,7 @@ sal_Size SvStream::CryptAndWriteBuffer( const void* pStart, sal_Size nLen)
 bool SvStream::EncryptBuffer(void* pStart, sal_Size nLen)
 {
     unsigned char* pTemp = static_cast<unsigned char*>(pStart);
-    unsigned char nMask = nCryptMask;
+    unsigned char nMask = m_nCryptMask;
 
     for ( sal_Size n=0; n < nLen; n++, pTemp++ )
     {
@@ -1598,7 +1598,7 @@ static unsigned char implGetCryptMask(const sal_Char* pStr, sal_Int32 nLen, long
 void SvStream::SetCryptMaskKey(const OString& rCryptMaskKey)
 {
     m_aCryptMaskKey = rCryptMaskKey;
-    nCryptMask = implGetCryptMask(m_aCryptMaskKey.getStr(),
+    m_nCryptMask = implGetCryptMask(m_aCryptMaskKey.getStr(),
         m_aCryptMaskKey.getLength(), GetVersion());
 }
 
@@ -1619,14 +1619,14 @@ bool SvStream::SetStreamSize(sal_uInt64 const nSize)
 #ifdef DBG_UTIL
     sal_uInt64 nFPos = Tell();
 #endif
-    sal_uInt16 nBuf = nBufSize;
+    sal_uInt16 nBuf = m_nBufSize;
     SetBufferSize( 0 );
     SetSize( nSize );
     SetBufferSize( nBuf );
 #ifdef DBG_UTIL
     DBG_ASSERT(Tell()==nFPos,"SetStreamSize failed");
 #endif
-    return (nError == 0);
+    return (m_nError == 0);
 }
 
 SvStream& endl( SvStream& rStr )
@@ -1669,9 +1669,9 @@ SvMemoryStream::SvMemoryStream( void* pBuffer, sal_Size bufSize,
                                 StreamMode eMode )
 {
     if( eMode & StreamMode::WRITE )
-        bIsWritable = true;
+        m_isWritable = true;
     else
-        bIsWritable = false;
+        m_isWritable = false;
     nEndOfData  = bufSize;
     bOwnsData   = false;
     pBuf        = static_cast<sal_uInt8 *>(pBuffer);
@@ -1683,7 +1683,7 @@ SvMemoryStream::SvMemoryStream( void* pBuffer, sal_Size bufSize,
 
 SvMemoryStream::SvMemoryStream( sal_Size nInitSize, sal_Size nResizeOffset )
 {
-    bIsWritable = true;
+    m_isWritable = true;
     bOwnsData   = true;
     nEndOfData  = 0L;
     nResize     = nResizeOffset;
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index 1a7ab56..ac50988 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -273,7 +273,7 @@ SvFileStream::SvFileStream( const OUString& rFileName, StreamMode nOpenMode )
 {
     bIsOpen             = false;
     nLockCounter        = 0;
-    bIsWritable         = false;
+    m_isWritable        = false;
     pInstanceData       = new StreamData;
 
     SetBufferSize( 1024 );
@@ -291,7 +291,7 @@ SvFileStream::SvFileStream()
 {
     bIsOpen             = false;
     nLockCounter        = 0;
-    bIsWritable         = false;
+    m_isWritable        = false;
     pInstanceData       = new StreamData;
     SetBufferSize( 1024 );
 }
@@ -394,32 +394,32 @@ bool SvFileStream::LockRange( sal_Size nByteOffset, sal_Size nBytes )
     if ( ! IsOpen() )
         return false;
 
-    if ( eStreamMode & StreamMode::SHARE_DENYALL )
-        {
-        if (bIsWritable)
+    if (m_eStreamMode & StreamMode::SHARE_DENYALL)
+    {
+        if (m_isWritable)
             nLockMode = F_WRLCK;
         else
             nLockMode = F_RDLCK;
-        }
+    }
 
-    if ( eStreamMode & StreamMode::SHARE_DENYREAD )
-        {
-        if (bIsWritable)
+    if (m_eStreamMode & StreamMode::SHARE_DENYREAD)
+    {
+        if (m_isWritable)
             nLockMode = F_WRLCK;
         else
         {
             SetError(SVSTREAM_LOCKING_VIOLATION);
             return false;
         }
-        }
+    }
 
-    if ( eStreamMode & StreamMode::SHARE_DENYWRITE )
-        {
-        if (bIsWritable)
+    if (m_eStreamMode & StreamMode::SHARE_DENYWRITE)
+    {
+        if (m_isWritable)
             nLockMode = F_WRLCK;
         else
             nLockMode = F_RDLCK;
-        }
+    }
 
     if (!nLockMode)
         return true;
@@ -463,8 +463,8 @@ void SvFileStream::Open( const OUString& rFilename, StreamMode nOpenMode )
 
     Close();
     errno = 0;
-    eStreamMode = nOpenMode;
-    eStreamMode &= ~StreamMode::TRUNC; // don't truncat on reopen
+    m_eStreamMode = nOpenMode;
+    m_eStreamMode &= ~StreamMode::TRUNC; // don't truncat on reopen
 
     aFilename = rFilename;
 
@@ -547,13 +547,13 @@ void SvFileStream::Open( const OUString& rFilename, StreamMode nOpenMode )
         pInstanceData->rHandle = nHandleTmp;
         bIsOpen = true;
         if ( uFlags & osl_File_OpenFlag_Write )
-            bIsWritable = true;
+            m_isWritable = true;
 
         if ( !LockFile() ) // whole file
         {
             rc = osl_closeFile( nHandleTmp );
             bIsOpen = false;
-            bIsWritable = false;
+            m_isWritable = false;
             pInstanceData->rHandle = 0;
         }
     }
@@ -580,7 +580,7 @@ void SvFileStream::Close()
     }
 
     bIsOpen     = false;
-    bIsWritable = false;
+    m_isWritable = false;
     SvStream::ClearBuffer();
     SvStream::ClearError();
 }
diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx
index 6076205..e73f1b4 100644
--- a/tools/source/stream/strmwnt.cxx
+++ b/tools/source/stream/strmwnt.cxx
@@ -104,7 +104,7 @@ SvFileStream::SvFileStream( const OUString& rFileName, StreamMode nMode )
 {
     bIsOpen             = false;
     nLockCounter        = 0;
-    bIsWritable         = false;
+    m_isWritable        = false;
     pInstanceData       = new StreamData;
 
     SetBufferSize( 8192 );
@@ -120,7 +120,7 @@ SvFileStream::SvFileStream()
 {
     bIsOpen             = false;
     nLockCounter        = 0;
-    bIsWritable         = false;
+    m_isWritable        = false;
     pInstanceData       = new StreamData;
 
     SetBufferSize( 8192 );
@@ -273,8 +273,8 @@ void SvFileStream::Open( const OUString& rFilename, StreamMode nMode )
     Close();
     SvStream::ClearBuffer();
 
-    eStreamMode = nMode;
-    eStreamMode &= ~StreamMode::TRUNC; // don't truncate on reopen
+    m_eStreamMode = nMode;
+    m_eStreamMode &= ~StreamMode::TRUNC; // don't truncate on reopen
 
     aFilename = aParsedFilename;
     OString aFileNameA(OUStringToOString(aFilename, osl_getThreadTextEncoding()));
@@ -376,7 +376,7 @@ void SvFileStream::Open( const OUString& rFilename, StreamMode nMode )
         bIsOpen     = true;
         // pInstanceData->bIsEof = false;
         if( nAccessMode & GENERIC_WRITE )
-            bIsWritable = true;
+            m_isWritable = true;
     }
     SetErrorMode( nOldErrorMode );
 }
@@ -395,7 +395,7 @@ void SvFileStream::Close()
     }
     bIsOpen     = false;
     nLockCounter= 0;
-    bIsWritable = false;
+    m_isWritable = false;
     SvStream::ClearBuffer();
     SvStream::ClearError();
 }
commit 19310906553d846104cff9fe7df54d40068ddbc0
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Jul 31 14:15:09 2015 +0200

    filter: valgrind uninitialized warning in filter_met_test
    
    Change-Id: Iaa6a6ed0ef1b9ca3b3f72706ec3934c6c4a93322

diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index e58a069..f2e0b45 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -789,10 +789,10 @@ sal_uLong OS2METReader::ReadLittleEndian3BytesLong()
 
 long OS2METReader::ReadCoord(bool b32)
 {
-    sal_Int32 l;
+    sal_Int32 l(0);
 
     if (b32) pOS2MET->ReadInt32( l );
-    else  { short s;pOS2MET->ReadInt16( s ); l=(sal_Int32)s; }
+    else { short s(0); pOS2MET->ReadInt16( s ); l = static_cast<sal_Int32>(s); }
     return l;
 }
 
commit 72edadf15dbbabade4a9c2c9be88bf844a8f6fb4
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Jul 31 12:56:20 2015 +0200

    filter: valgrind uninitialized nDataLen warning in filter_tiff_test
    
    Change-Id: I70e38970394ca291de2de184b80bb5bb7c2cccac

diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index c730e81..fc5ffe0 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -1229,6 +1229,10 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
             // loop through tags:
             for( i = 0; i < nNumTags; i++ )
             {
+                nTagType = 0;
+                nDataType = USHRT_MAX;
+                nDataLen = 0;
+                nOffset = 0;
                 pTIFF->ReadUInt16( nTagType ).ReadUInt16( nDataType ).ReadUInt32( nDataLen ).ReadUInt32( nOffset );
 
                 if( DataTypeSize() * nDataLen > 4 )
commit 56b2bb53d22dd7e7dc4fdab84c8c0b3dd83b60bf
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Jul 31 11:08:04 2015 +0200

    RepositoryExternal.mk: xsltproc needs to depend on libxml2 package
    
    ... so the libxml2.dll is copied to instdir.
    
    Change-Id: Ibb5e57c01826e089e9a81b79fb56c3d2489d653b

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 7c87f5e..f5e6cef 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -4002,6 +4002,7 @@ define gb_ExternalExecutable__register_xsltproc
 $(call gb_ExternalExecutable_set_internal,xsltproc,$(WORKDIR_FOR_BUILD)/UnpackedTarball/xslt/$(if $(filter MSC,$(COM)),win32/bin.msvc,xsltproc)/xsltproc$(gb_Executable_EXT_for_build),xslt)
 $(call gb_ExternalExecutable_add_dependencies,xsltproc,\
 	$(if $(filter WNT,$(OS)),$(call gb_Package_get_target,icu_ure)) \
+	$(call gb_Package_get_target,xml2) \
 	$(call gb_Package_get_target,xslt) \
 )
 
commit e9149cdc2e7a4d85e5626188a95dfc52319c1055
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Jul 30 18:16:58 2015 +0200

    concat-deps: fix build with gcc -fsanitize=... -std=gnu89
    
    Apparently Clang C89 mode is sloppily implemented and allows this.
    
    Change-Id: I78ef943bc4c5f8590dae8879dad65ad9fbe9a9bb

diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c
index 38d009b..62b5ff1 100644
--- a/solenv/bin/concat-deps.c
+++ b/solenv/bin/concat-deps.c
@@ -1174,10 +1174,13 @@ const char *env_str;
 #endif
     }
 #if !ENABLE_RUNTIME_OPTIMIZATIONS
-    hash_destroy(dep_hash);
-    for (size_t i = 0; i != file_load_buffer_count; ++i)
     {
-        free(file_load_buffers[i]);
+        size_t i;
+        hash_destroy(dep_hash);
+        for (i = 0; i != file_load_buffer_count; ++i)
+        {
+            free(file_load_buffers[i]);
+        }
     }
 #endif
     return rc;


More information about the Libreoffice-commits mailing list