summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-10-08 20:17:41 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-10-09 08:05:43 +0200
commitc7e4e197892319831de6b7a2fd007844237058c1 (patch)
treeb224a278c2e94e791319e46fe246ed0d5d1415d4 /sot
parent7ca450cbe524807d51893382fcaa0d1a47c939c6 (diff)
sot: prefix members of StgHeader
Change-Id: I4885ae825484afd53d7026a8d55a0ec8eddf4d86
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stgelem.cxx172
-rw-r--r--sot/source/sdstor/stgelem.hxx52
2 files changed, 112 insertions, 112 deletions
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index bb85e9f7171a..d217dd98ce9b 100644
--- a/sot/source/sdstor/stgelem.cxx
+++ b/sot/source/sdstor/stgelem.cxx
@@ -70,43 +70,43 @@ SvStream& WriteClsId( SvStream& r, const ClsId& rId )
///////////////////////////// class StgHeader
StgHeader::StgHeader()
-: nVersion( 0 )
-, nByteOrder( 0 )
-, nPageSize( 0 )
-, nDataPageSize( 0 )
-, bDirty( sal_uInt8(false) )
-, nFATSize( 0 )
-, nTOCstrm( 0 )
-, nReserved( 0 )
-, nThreshold( 0 )
-, nDataFAT( 0 )
-, nDataFATSize( 0 )
-, nMasterChain( 0 )
-, nMaster( 0 )
+: m_nVersion( 0 )
+, m_nByteOrder( 0 )
+, m_nPageSize( 0 )
+, m_nDataPageSize( 0 )
+, m_bDirty( sal_uInt8(false) )
+, m_nFATSize( 0 )
+, m_nTOCstrm( 0 )
+, m_nReserved( 0 )
+, m_nThreshold( 0 )
+, m_nDataFAT( 0 )
+, m_nDataFATSize( 0 )
+, m_nMasterChain( 0 )
+, m_nMaster( 0 )
{
- memset( cSignature, 0, sizeof( cSignature ) );
- memset( &aClsId, 0, sizeof( ClsId ) );
- memset( cReserved, 0, sizeof( cReserved ) );
- memset( nMasterFAT, 0, sizeof( nMasterFAT ) );
+ memset( m_cSignature, 0, sizeof( m_cSignature ) );
+ memset( &m_aClsId, 0, sizeof( ClsId ) );
+ memset( m_cReserved, 0, sizeof( m_cReserved ) );
+ memset( m_nMasterFAT, 0, sizeof( m_nMasterFAT ) );
}
void StgHeader::Init()
{
- memcpy( cSignature, cStgSignature, 8 );
- memset( &aClsId, 0, sizeof( ClsId ) );
- nVersion = 0x0003003B;
- nByteOrder = 0xFFFE;
- nPageSize = 9; // 512 bytes
- nDataPageSize = 6; // 64 bytes
- bDirty = sal_uInt8(false);
- memset( cReserved, 0, sizeof( cReserved ) );
- nFATSize = 0;
- nTOCstrm = 0;
- nReserved = 0;
- nThreshold = 4096;
- nDataFAT = 0;
- nDataFATSize = 0;
- nMasterChain = STG_EOF;
+ memcpy( m_cSignature, cStgSignature, 8 );
+ memset( &m_aClsId, 0, sizeof( ClsId ) );
+ m_nVersion = 0x0003003B;
+ m_nByteOrder = 0xFFFE;
+ m_nPageSize = 9; // 512 bytes
+ m_nDataPageSize = 6; // 64 bytes
+ m_bDirty = sal_uInt8(false);
+ memset( m_cReserved, 0, sizeof( m_cReserved ) );
+ m_nFATSize = 0;
+ m_nTOCstrm = 0;
+ m_nReserved = 0;
+ m_nThreshold = 4096;
+ m_nDataFAT = 0;
+ m_nDataFATSize = 0;
+ m_nMasterChain = STG_EOF;
SetTOCStart( STG_EOF );
SetDataFATStart( STG_EOF );
@@ -130,53 +130,53 @@ bool StgHeader::Load( StgIo& rIo )
bool StgHeader::Load( SvStream& r )
{
r.Seek( 0L );
- r.Read( cSignature, 8 );
- ReadClsId( r, aClsId ); // 08 Class ID
- r.ReadInt32( nVersion ) // 1A version number
- .ReadUInt16( nByteOrder ) // 1C Unicode byte order indicator
- .ReadInt16( nPageSize ) // 1E 1 << nPageSize = block size
- .ReadInt16( nDataPageSize ); // 20 1 << this size == data block size
+ r.Read( m_cSignature, 8 );
+ ReadClsId( r, m_aClsId ); // 08 Class ID
+ r.ReadInt32( m_nVersion ) // 1A version number
+ .ReadUInt16( m_nByteOrder ) // 1C Unicode byte order indicator
+ .ReadInt16( m_nPageSize ) // 1E 1 << nPageSize = block size
+ .ReadInt16( m_nDataPageSize ); // 20 1 << this size == data block size
r.SeekRel( 10 );
- r.ReadInt32( nFATSize ) // 2C total number of FAT pages
- .ReadInt32( nTOCstrm ) // 30 starting page for the TOC stream
- .ReadInt32( nReserved ) // 34
- .ReadInt32( nThreshold ) // 38 minimum file size for big data
- .ReadInt32( nDataFAT ) // 3C page # of 1st data FAT block
- .ReadInt32( nDataFATSize ) // 40 # of data FATpages
- .ReadInt32( nMasterChain ) // 44 chain to the next master block
- .ReadInt32( nMaster ); // 48 # of additional master blocks
+ r.ReadInt32( m_nFATSize ) // 2C total number of FAT pages
+ .ReadInt32( m_nTOCstrm ) // 30 starting page for the TOC stream
+ .ReadInt32( m_nReserved ) // 34
+ .ReadInt32( m_nThreshold ) // 38 minimum file size for big data
+ .ReadInt32( m_nDataFAT ) // 3C page # of 1st data FAT block
+ .ReadInt32( m_nDataFATSize ) // 40 # of data FATpages
+ .ReadInt32( m_nMasterChain ) // 44 chain to the next master block
+ .ReadInt32( m_nMaster ); // 48 # of additional master blocks
for( short i = 0; i < cFATPagesInHeader; i++ )
- r.ReadInt32( nMasterFAT[ i ] );
+ r.ReadInt32( m_nMasterFAT[ i ] );
return (r.GetErrorCode() == ERRCODE_NONE) && Check();
}
bool StgHeader::Store( StgIo& rIo )
{
- if( !bDirty )
+ if( !m_bDirty )
return true;
SvStream& r = *rIo.GetStrm();
r.Seek( 0L );
- r.Write( cSignature, 8 );
- WriteClsId( r, aClsId ); // 08 Class ID
- r.WriteInt32( nVersion ) // 1A version number
- .WriteUInt16( nByteOrder ) // 1C Unicode byte order indicator
- .WriteInt16( nPageSize ) // 1E 1 << nPageSize = block size
- .WriteInt16( nDataPageSize ) // 20 1 << this size == data block size
+ r.Write( m_cSignature, 8 );
+ WriteClsId( r, m_aClsId ); // 08 Class ID
+ r.WriteInt32( m_nVersion ) // 1A version number
+ .WriteUInt16( m_nByteOrder ) // 1C Unicode byte order indicator
+ .WriteInt16( m_nPageSize ) // 1E 1 << nPageSize = block size
+ .WriteInt16( m_nDataPageSize ) // 20 1 << this size == data block size
.WriteInt32( 0 ).WriteInt32( 0 ).WriteInt16( 0 )
- .WriteInt32( nFATSize ) // 2C total number of FAT pages
- .WriteInt32( nTOCstrm ) // 30 starting page for the TOC stream
- .WriteInt32( nReserved ) // 34
- .WriteInt32( nThreshold ) // 38 minimum file size for big data
- .WriteInt32( nDataFAT ) // 3C page # of 1st data FAT block
- .WriteInt32( nDataFATSize ) // 40 # of data FAT pages
- .WriteInt32( nMasterChain ) // 44 chain to the next master block
- .WriteInt32( nMaster ); // 48 # of additional master blocks
+ .WriteInt32( m_nFATSize ) // 2C total number of FAT pages
+ .WriteInt32( m_nTOCstrm ) // 30 starting page for the TOC stream
+ .WriteInt32( m_nReserved ) // 34
+ .WriteInt32( m_nThreshold ) // 38 minimum file size for big data
+ .WriteInt32( m_nDataFAT ) // 3C page # of 1st data FAT block
+ .WriteInt32( m_nDataFATSize ) // 40 # of data FAT pages
+ .WriteInt32( m_nMasterChain ) // 44 chain to the next master block
+ .WriteInt32( m_nMaster ); // 48 # of additional master blocks
for( short i = 0; i < cFATPagesInHeader; i++ )
- r.WriteInt32( nMasterFAT[ i ] );
- bDirty = sal_uInt8(!rIo.Good());
- return !bDirty;
+ r.WriteInt32( m_nMasterFAT[ i ] );
+ m_bDirty = sal_uInt8(!rIo.Good());
+ return !m_bDirty;
}
static bool lcl_wontoverflow(short shift)
@@ -195,23 +195,23 @@ static bool isKnownSpecial(sal_Int32 nLocation)
// Perform thorough checks also on unknown variables
bool StgHeader::Check()
{
- return memcmp( cSignature, cStgSignature, 8 ) == 0
- && (short) ( nVersion >> 16 ) == 3
- && nPageSize == 9
- && lcl_wontoverflow(nPageSize)
- && lcl_wontoverflow(nDataPageSize)
- && nFATSize > 0
- && nTOCstrm >= 0
- && nThreshold > 0
- && ( isKnownSpecial(nDataFAT) || ( nDataFAT >= 0 && nDataFATSize > 0 ) )
- && ( isKnownSpecial(nMasterChain) || nMasterChain >=0 )
- && nMaster >= 0;
+ return memcmp( m_cSignature, cStgSignature, 8 ) == 0
+ && (short) ( m_nVersion >> 16 ) == 3
+ && m_nPageSize == 9
+ && lcl_wontoverflow(m_nPageSize)
+ && lcl_wontoverflow(m_nDataPageSize)
+ && m_nFATSize > 0
+ && m_nTOCstrm >= 0
+ && m_nThreshold > 0
+ && ( isKnownSpecial(m_nDataFAT) || ( m_nDataFAT >= 0 && m_nDataFATSize > 0 ) )
+ && ( isKnownSpecial(m_nMasterChain) || m_nMasterChain >=0 )
+ && m_nMaster >= 0;
}
sal_Int32 StgHeader::GetFATPage( short n ) const
{
if( n >= 0 && n < cFATPagesInHeader )
- return nMasterFAT[ n ];
+ return m_nMasterFAT[ n ];
else
return STG_EOF;
}
@@ -220,40 +220,40 @@ void StgHeader::SetFATPage( short n, sal_Int32 nb )
{
if( n >= 0 && n < cFATPagesInHeader )
{
- if( nMasterFAT[ n ] != nb )
- bDirty = sal_uInt8(true), nMasterFAT[ n ] = nb;
+ if( m_nMasterFAT[ n ] != nb )
+ m_bDirty = sal_uInt8(true), m_nMasterFAT[ n ] = nb;
}
}
void StgHeader::SetTOCStart( sal_Int32 n )
{
- if( n != nTOCstrm ) bDirty = sal_uInt8(true), nTOCstrm = n;
+ if( n != m_nTOCstrm ) m_bDirty = sal_uInt8(true), m_nTOCstrm = n;
}
void StgHeader::SetDataFATStart( sal_Int32 n )
{
- if( n != nDataFAT ) bDirty = sal_uInt8(true), nDataFAT = n;
+ if( n != m_nDataFAT ) m_bDirty = sal_uInt8(true), m_nDataFAT = n;
}
void StgHeader::SetDataFATSize( sal_Int32 n )
{
- if( n != nDataFATSize ) bDirty = sal_uInt8(true), nDataFATSize = n;
+ if( n != m_nDataFATSize ) m_bDirty = sal_uInt8(true), m_nDataFATSize = n;
}
void StgHeader::SetFATSize( sal_Int32 n )
{
- if( n != nFATSize ) bDirty = sal_uInt8(true), nFATSize = n;
+ if( n != m_nFATSize ) m_bDirty = sal_uInt8(true), m_nFATSize = n;
}
void StgHeader::SetFATChain( sal_Int32 n )
{
- if( n != nMasterChain )
- bDirty = sal_uInt8(true), nMasterChain = n;
+ if( n != m_nMasterChain )
+ m_bDirty = sal_uInt8(true), m_nMasterChain = n;
}
void StgHeader::SetMasters( sal_Int32 n )
{
- if( n != nMaster ) bDirty = sal_uInt8(true), nMaster = n;
+ if( n != m_nMaster ) m_bDirty = sal_uInt8(true), m_nMaster = n;
}
///////////////////////////// class StgEntry
diff --git a/sot/source/sdstor/stgelem.hxx b/sot/source/sdstor/stgelem.hxx
index 678b5810d2db..35ad8259881c 100644
--- a/sot/source/sdstor/stgelem.hxx
+++ b/sot/source/sdstor/stgelem.hxx
@@ -35,25 +35,25 @@ class StgHeader
{
static const sal_uInt8 cFATPagesInHeader = 109;
- sal_uInt8 cSignature[ 8 ]; // 00 signature (see below)
- ClsId aClsId; // 08 Class ID
- sal_Int32 nVersion; // 18 version number
- sal_uInt16 nByteOrder; // 1C Unicode byte order indicator
- sal_Int16 nPageSize; // 1E 1 << nPageSize = block size
- sal_Int16 nDataPageSize; // 20 1 << this size == data block size
- sal_uInt8 bDirty; // 22 internal dirty flag (should be
+ sal_uInt8 m_cSignature[ 8 ]; // 00 signature (see below)
+ ClsId m_aClsId; // 08 Class ID
+ sal_Int32 m_nVersion; // 18 version number
+ sal_uInt16 m_nByteOrder; // 1C Unicode byte order indicator
+ sal_Int16 m_nPageSize; // 1E 1 << nPageSize = block size
+ sal_Int16 m_nDataPageSize; // 20 1 << this size == data block size
+ sal_uInt8 m_bDirty; // 22 internal dirty flag (should be
// bool, but probably required to
// be exactly one byte)
- sal_uInt8 cReserved[ 9 ]; // 23
- sal_Int32 nFATSize; // 2C total number of FAT pages
- sal_Int32 nTOCstrm; // 30 starting page for the TOC stream
- sal_Int32 nReserved; // 34
- sal_Int32 nThreshold; // 38 minimum file size for big data
- sal_Int32 nDataFAT; // 3C page # of 1st data FAT block
- sal_Int32 nDataFATSize; // 40 # of data fat blocks
- sal_Int32 nMasterChain; // 44 chain to the next master block
- sal_Int32 nMaster; // 48 # of additional master blocks
- sal_Int32 nMasterFAT[ cFATPagesInHeader ]; // 4C first [cFATPagesInHeader] master FAT pages
+ sal_uInt8 m_cReserved[ 9 ]; // 23
+ sal_Int32 m_nFATSize; // 2C total number of FAT pages
+ sal_Int32 m_nTOCstrm; // 30 starting page for the TOC stream
+ sal_Int32 m_nReserved; // 34
+ sal_Int32 m_nThreshold; // 38 minimum file size for big data
+ sal_Int32 m_nDataFAT; // 3C page # of 1st data FAT block
+ sal_Int32 m_nDataFATSize; // 40 # of data fat blocks
+ sal_Int32 m_nMasterChain; // 44 chain to the next master block
+ sal_Int32 m_nMaster; // 48 # of additional master blocks
+ sal_Int32 m_nMasterFAT[ cFATPagesInHeader ]; // 4C first [cFATPagesInHeader] master FAT pages
public:
StgHeader();
@@ -62,20 +62,20 @@ public:
bool Load( SvStream& );
bool Store( StgIo& );
bool Check(); // check the signature and version
- sal_Int32 GetTOCStart() const { return nTOCstrm; }
+ sal_Int32 GetTOCStart() const { return m_nTOCstrm; }
void SetTOCStart( sal_Int32 n );
- sal_Int32 GetDataFATStart() const { return nDataFAT; }
+ sal_Int32 GetDataFATStart() const { return m_nDataFAT; }
void SetDataFATStart( sal_Int32 n );
- sal_Int32 GetDataFATSize() const { return nDataFATSize; }
+ sal_Int32 GetDataFATSize() const { return m_nDataFATSize; }
void SetDataFATSize( sal_Int32 n );
- sal_Int32 GetThreshold() const { return nThreshold; }
- short GetPageSize() const { return nPageSize; }
- short GetDataPageSize() const { return nDataPageSize; }
- sal_Int32 GetFATSize() const { return nFATSize; }
+ sal_Int32 GetThreshold() const { return m_nThreshold; }
+ short GetPageSize() const { return m_nPageSize; }
+ short GetDataPageSize() const { return m_nDataPageSize; }
+ sal_Int32 GetFATSize() const { return m_nFATSize; }
void SetFATSize( sal_Int32 n );
- sal_Int32 GetFATChain() const { return nMasterChain; }
+ sal_Int32 GetFATChain() const { return m_nMasterChain; }
void SetFATChain( sal_Int32 n );
- sal_Int32 GetMasters() const { return nMaster; }
+ sal_Int32 GetMasters() const { return m_nMaster; }
void SetMasters( sal_Int32 n );
static short GetFAT1Size() { return cFATPagesInHeader; }
sal_Int32 GetFATPage( short ) const;