From 745c0074f9d18f5c6184ecbd6438b04f27b756d1 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 8 Oct 2015 21:43:30 +0200 Subject: sot: prefix members of StgDirEntry Change-Id: Ic861d57e62cdeec7b2864eb4d1d19a1780382313 --- sot/source/sdstor/stg.cxx | 98 +++++----- sot/source/sdstor/stgdir.cxx | 422 ++++++++++++++++++++--------------------- sot/source/sdstor/stgdir.hxx | 44 ++--- sot/source/sdstor/stgio.cxx | 12 +- sot/source/sdstor/stgstrms.cxx | 16 +- 5 files changed, 296 insertions(+), 296 deletions(-) (limited to 'sot') diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx index 787c5adc3208..9e897f49b5ff 100644 --- a/sot/source/sdstor/stg.cxx +++ b/sot/source/sdstor/stg.cxx @@ -86,17 +86,17 @@ OLEStorageBase::OLEStorageBase( StgIo* p, StgDirEntry* pe, StreamMode& nMode ) if ( p ) p->IncRef(); if( pe ) - pe->nRefCnt++; + pe->m_nRefCnt++; } OLEStorageBase::~OLEStorageBase() { if( pEntry ) { - DBG_ASSERT( pEntry->nRefCnt, "RefCount unter 0" ); - if( !--pEntry->nRefCnt ) + DBG_ASSERT( pEntry->m_nRefCnt, "RefCount unter 0" ); + if( !--pEntry->m_nRefCnt ) { - if( pEntry->bZombie ) + if( pEntry->m_bZombie ) delete pEntry; else pEntry->Close(); @@ -120,8 +120,8 @@ bool OLEStorageBase::Validate_Impl( bool bWrite ) const if( pIo && pIo->pTOC && pEntry - && !pEntry->bInvalid - && ( !bWrite || !pEntry->bDirect || ( nStreamMode & StreamMode::WRITE ) ) ) + && !pEntry->m_bInvalid + && ( !bWrite || !pEntry->m_bDirect || ( nStreamMode & StreamMode::WRITE ) ) ) return true; return false; } @@ -130,7 +130,7 @@ bool OLEStorageBase::ValidateMode_Impl( StreamMode m, StgDirEntry* p ) { if( m == INTERNAL_MODE ) return true; - StreamMode nCurMode = ( p && p->nRefCnt ) ? p->nMode : StreamMode::SHARE_DENYALL; + StreamMode nCurMode = ( p && p->m_nRefCnt ) ? p->m_nMode : StreamMode::SHARE_DENYALL; if( ( m & STREAM_READWRITE ) == StreamMode::READ ) { // only SHARE_DENYWRITE or SHARE_DENYALL allowed @@ -163,9 +163,9 @@ StorageStream::StorageStream( StgIo* p, StgDirEntry* q, StreamMode m ) // The dir entry may be 0; this means that the stream is invalid. if( q && p ) { - if( q->nRefCnt == 1 ) + if( q->m_nRefCnt == 1 ) { - q->nMode = m; + q->m_nMode = m; q->OpenStream( *p ); } } @@ -179,7 +179,7 @@ StorageStream::~StorageStream() // Do an auto-commit if the entry is open in direct mode if( m_bAutoCommit ) Commit(); - if( pEntry && pEntry->nRefCnt && pEntry->bDirect && (m_nMode & StreamMode::WRITE) ) + if( pEntry && pEntry->m_nRefCnt && pEntry->m_bDirect && (m_nMode & StreamMode::WRITE) ) pEntry->Commit(); } @@ -298,10 +298,10 @@ bool StorageStream::ValidateMode( StreamMode nMode ) const SvStorageInfo::SvStorageInfo( const StgDirEntry& rE ) { - rE.aEntry.GetName( aName ); - bStorage = rE.aEntry.GetType() == STG_STORAGE; - bStream = rE.aEntry.GetType() == STG_STREAM; - nSize = bStorage ? 0 : rE.aEntry.GetSize(); + rE.m_aEntry.GetName( aName ); + bStorage = rE.m_aEntry.GetType() == STG_STORAGE; + bStream = rE.m_aEntry.GetType() == STG_STREAM; + nSize = bStorage ? 0 : rE.m_aEntry.GetSize(); } /////////////////////////// class Storage @@ -356,9 +356,9 @@ Storage::Storage( const OUString& rFile, StreamMode m, bool bDirect ) Init( ( m & ( StreamMode::TRUNC | StreamMode::NOCREATE ) ) == StreamMode::TRUNC ); if( pEntry ) { - pEntry->bDirect = bDirect; - pEntry->nMode = m; - pEntry->bTemp = bTemp; + pEntry->m_bDirect = bDirect; + pEntry->m_nMode = m; + pEntry->m_bTemp = bTemp; } } else @@ -386,8 +386,8 @@ Storage::Storage( SvStream& r, bool bDirect ) Init( nSize == 0 ); if( pEntry ) { - pEntry->bDirect = bDirect; - pEntry->nMode = m_nMode; + pEntry->m_bDirect = bDirect; + pEntry->m_nMode = m_nMode; } pIo->MoveError( *this ); } @@ -431,8 +431,8 @@ Storage::Storage( UCBStorageStream& rStrm, bool bDirect ) Init( nSize == 0 ); if( pEntry ) { - pEntry->bDirect = bDirect; - pEntry->nMode = m_nMode; + pEntry->m_bDirect = bDirect; + pEntry->m_nMode = m_nMode; } pIo->MoveError( *this ); @@ -472,7 +472,7 @@ void Storage::Init( bool bCreate ) if( pIo->Good() && pIo->pTOC ) { pEntry = pIo->pTOC->GetRoot(); - pEntry->nRefCnt++; + pEntry->m_nRefCnt++; } } @@ -482,12 +482,12 @@ Storage::Storage( StgIo* p, StgDirEntry* q, StreamMode m ) : OLEStorageBase( p, q, m_nMode ), bIsRoot( false ) { if( q ) - q->aEntry.GetName( aName ); + q->m_aEntry.GetName( aName ); else m &= ~StreamMode(STREAM_READWRITE); m_nMode = m; - if( q && q->nRefCnt == 1 ) - q->nMode = m; + if( q && q->m_nRefCnt == 1 ) + q->m_nMode = m; } Storage::~Storage() @@ -498,16 +498,16 @@ Storage::~Storage() if( pEntry ) { // Do an auto-commit if the entry is open in direct mode - if( pEntry->nRefCnt && pEntry->bDirect && (m_nMode & StreamMode::WRITE) ) + if( pEntry->m_nRefCnt && pEntry->m_bDirect && (m_nMode & StreamMode::WRITE) ) Commit(); - if( pEntry->nRefCnt == 1 ) + if( pEntry->m_nRefCnt == 1 ) pEntry->Invalidate(); } // close the stream is root storage if( bIsRoot ) pIo->Close(); // remove the file if temporary root storage - if( bIsRoot && pEntry && pEntry->bTemp ) + if( bIsRoot && pEntry && pEntry->m_bTemp ) { osl::File::remove( GetName() ); } @@ -516,7 +516,7 @@ Storage::~Storage() const OUString& Storage::GetName() const { if( !bIsRoot && Validate() ) - pEntry->aEntry.GetName( const_cast(this)->aName ); + pEntry->m_aEntry.GetName( const_cast(this)->aName ); return aName; } @@ -530,7 +530,7 @@ void Storage::FillInfoList( SvStorageInfoList* pList ) const StgDirEntry* p = aIter.First(); while( p ) { - if( !p->bInvalid ) + if( !p->m_bInvalid ) { SvStorageInfo aInfo( *p ); pList->push_back( aInfo ); @@ -557,7 +557,7 @@ BaseStorage* Storage::OpenStorage( const OUString& rName, StreamMode m, bool bDi { if( !Validate() || !ValidateMode( m ) ) return new Storage( pIo, NULL, m ); - if( bDirect && !pEntry->bDirect ) + if( bDirect && !pEntry->m_bDirect ) bDirect = false; StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName ); @@ -575,7 +575,7 @@ BaseStorage* Storage::OpenStorage( const OUString& rName, StreamMode m, bool bDi } p = pIo->pTOC->Create( *pEntry, aNewName, STG_STORAGE ); if( p ) - p->bTemp = bTemp; + p->m_bTemp = bTemp; } if( !p ) pIo->SetError( ( m & StreamMode::WRITE ) @@ -583,20 +583,20 @@ BaseStorage* Storage::OpenStorage( const OUString& rName, StreamMode m, bool bDi } else if( !ValidateMode( m, p ) ) p = NULL; - if( p && p->aEntry.GetType() != STG_STORAGE ) + if( p && p->m_aEntry.GetType() != STG_STORAGE ) { pIo->SetError( SVSTREAM_FILE_NOT_FOUND ); p = NULL; } // Either direct or transacted mode is supported - if( p && pEntry->nRefCnt == 1 ) - p->bDirect = bDirect; + if( p && pEntry->m_nRefCnt == 1 ) + p->m_bDirect = bDirect; // Dont check direct conflict if opening readonly if( p && (m & StreamMode::WRITE )) { - if( p->bDirect != bDirect ) + if( p->m_bDirect != bDirect ) SetError( SVSTREAM_ACCESS_DENIED ); } Storage* pStg = new Storage( pIo, p, m ); @@ -636,18 +636,18 @@ BaseStorageStream* Storage::OpenStream( const OUString& rName, StreamMode m, boo } else if( !ValidateMode( m, p ) ) p = NULL; - if( p && p->aEntry.GetType() != STG_STREAM ) + if( p && p->m_aEntry.GetType() != STG_STREAM ) { pIo->SetError( SVSTREAM_FILE_NOT_FOUND ); p = NULL; } if( p ) { - p->bTemp = bTemp; - p->bDirect = pEntry->bDirect; + p->m_bTemp = bTemp; + p->m_bDirect = pEntry->m_bDirect; } StorageStream* pStm = new StorageStream( pIo, p, m ); - if( p && !p->bDirect ) + if( p && !p->m_bDirect ) pStm->SetAutoCommit( true ); pIo->MoveError( *pStm ); return pStm; @@ -681,11 +681,11 @@ bool Storage::CopyTo( const OUString& rElem, BaseStorage* pDest, const OUString& StgDirEntry* pElem = pIo->pTOC->Find( *pEntry, rElem ); if( pElem ) { - if( pElem->aEntry.GetType() == STG_STORAGE ) + if( pElem->m_aEntry.GetType() == STG_STORAGE ) { // copy the entire storage BaseStorage* p1 = OpenStorage( rElem, INTERNAL_MODE ); - BaseStorage* p2 = pDest->OpenOLEStorage( rNew, StreamMode::WRITE | StreamMode::SHARE_DENYALL, pEntry->bDirect ); + BaseStorage* p2 = pDest->OpenOLEStorage( rNew, StreamMode::WRITE | StreamMode::SHARE_DENYALL, pEntry->m_bDirect ); if ( p2 ) { @@ -714,7 +714,7 @@ bool Storage::CopyTo( const OUString& rElem, BaseStorage* pDest, const OUString& { // stream copy BaseStorageStream* p1 = OpenStream( rElem, INTERNAL_MODE ); - BaseStorageStream* p2 = pDest->OpenStream( rNew, StreamMode::WRITE | StreamMode::SHARE_DENYALL, pEntry->bDirect ); + BaseStorageStream* p2 = pDest->OpenStream( rNew, StreamMode::WRITE | StreamMode::SHARE_DENYALL, pEntry->m_bDirect ); if ( p2 ) { @@ -772,7 +772,7 @@ bool Storage::IsStorage( const OUString& rName ) const { StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName ); if( p ) - return p->aEntry.GetType() == STG_STORAGE; + return p->m_aEntry.GetType() == STG_STORAGE; } return false; } @@ -783,7 +783,7 @@ bool Storage::IsStream( const OUString& rName ) const { StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName ); if( p ) - return p->aEntry.GetType() == STG_STREAM; + return p->m_aEntry.GetType() == STG_STREAM; } return false; } @@ -842,7 +842,7 @@ void Storage::SetClass( const SvGlobalName & rClass, if( Validate( true ) ) { // set the class name in the root entry - pEntry->aEntry.SetClassId( (const ClsId&) rClass.GetCLSID() ); + pEntry->m_aEntry.SetClassId( (const ClsId&) rClass.GetCLSID() ); pEntry->SetDirty(); // then create the streams StgCompObjStream aCompObj( *this, true ); @@ -870,7 +870,7 @@ SvGlobalName Storage::GetClassName() pIo->ResetError(); if ( pEntry ) - return SvGlobalName( pEntry->aEntry.GetClassId() ); + return SvGlobalName( pEntry->m_aEntry.GetClassId() ); return SvGlobalName(); } @@ -910,13 +910,13 @@ void Storage::SetDirty() void Storage::SetClassId( const ClsId& rId ) { if ( pEntry ) - pEntry->aEntry.SetClassId( rId ); + pEntry->m_aEntry.SetClassId( rId ); } const ClsId& Storage::GetClassId() const { if ( pEntry ) - return pEntry->aEntry.GetClassId(); + return pEntry->m_aEntry.GetClassId(); static ClsId aDummyId = {0,0,0,{0,0,0,0,0,0,0,0}}; return aDummyId; diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx index 8af41b05bd1b..642049a88eea 100644 --- a/sot/source/sdstor/stgdir.cxx +++ b/sot/source/sdstor/stgdir.cxx @@ -50,12 +50,12 @@ StgDirEntry::StgDirEntry( const void* pBuffer, sal_uInt32 nBufferLen, sal_uInt64 nUnderlyingStreamSize, bool * pbOk ) : StgAvlNode() { - *pbOk = aEntry.Load( pBuffer, nBufferLen, nUnderlyingStreamSize ); + *pbOk = m_aEntry.Load( pBuffer, nBufferLen, nUnderlyingStreamSize ); InitMembers(); } -StgDirEntry::StgDirEntry( const StgEntry& r ) : StgAvlNode(), aEntry( r ) +StgDirEntry::StgDirEntry( const StgEntry& r ) : StgAvlNode(), m_aEntry( r ) { InitMembers(); } @@ -64,33 +64,33 @@ StgDirEntry::StgDirEntry( const StgEntry& r ) : StgAvlNode(), aEntry( r ) void StgDirEntry::InitMembers() { - aSave = aEntry; - pUp = - pDown = NULL; - ppRoot = NULL; - pStgStrm = NULL; - pCurStrm = - pTmpStrm = NULL; - nPos = - nEntry = - nRefCnt = 0; - nMode = StreamMode::READ; - bDirect = true; - bInvalid = - bCreated = - bRenamed = - bRemoved = - bTemp = - bDirty = - bZombie = false; + m_aSave = m_aEntry; + m_pUp = + m_pDown = NULL; + m_ppRoot = NULL; + m_pStgStrm = NULL; + m_pCurStrm = + m_pTmpStrm = NULL; + m_nPos = + m_nEntry = + m_nRefCnt = 0; + m_nMode = StreamMode::READ; + m_bDirect = true; + m_bInvalid = + m_bCreated = + m_bRenamed = + m_bRemoved = + m_bTemp = + m_bDirty = + m_bZombie = false; } StgDirEntry::~StgDirEntry() { Close(); - delete pCurStrm; - delete pStgStrm; - delete pDown; + delete m_pCurStrm; + delete m_pStgStrm; + delete m_pDown; } // Comparison function @@ -101,7 +101,7 @@ short StgDirEntry::Compare( const StgAvlNode* p ) const if ( p ) { const StgDirEntry* pEntry = static_cast(p); - nResult = aEntry.Compare( pEntry->aEntry ); + nResult = m_aEntry.Compare( pEntry->m_aEntry ); } return nResult; } @@ -115,24 +115,24 @@ short StgDirEntry::Compare( const StgAvlNode* p ) const void StgDirEntry::Enum( sal_Int32& n ) { sal_Int32 nLeft = STG_FREE, nRight = STG_FREE, nDown = STG_FREE; - nEntry = n++; + m_nEntry = n++; if( pLeft ) { static_cast(pLeft)->Enum( n ); - nLeft = static_cast(pLeft)->nEntry; + nLeft = static_cast(pLeft)->m_nEntry; } if( pRight ) { static_cast(pRight)->Enum( n ); - nRight = static_cast(pRight)->nEntry; + nRight = static_cast(pRight)->m_nEntry; } - if( pDown ) + if( m_pDown ) { - pDown->Enum( n ); nDown = pDown->nEntry; + m_pDown->Enum( n ); nDown = m_pDown->m_nEntry; } - aSave.SetLeaf( STG_LEFT, nLeft ); - aSave.SetLeaf( STG_RIGHT, nRight ); - aSave.SetLeaf( STG_CHILD, nDown ); + m_aSave.SetLeaf( STG_LEFT, nLeft ); + m_aSave.SetLeaf( STG_RIGHT, nRight ); + m_aSave.SetLeaf( STG_CHILD, nDown ); } // Delete all temporary entries before writing the TOC stream. @@ -144,26 +144,26 @@ void StgDirEntry::DelTemp( bool bForce ) static_cast(pLeft)->DelTemp( false ); if( pRight ) static_cast(pRight)->DelTemp( false ); - if( pDown ) + if( m_pDown ) { // If the storage is dead, of course all elements are dead, too - if( bInvalid && aEntry.GetType() == STG_STORAGE ) + if( m_bInvalid && m_aEntry.GetType() == STG_STORAGE ) bForce = true; - pDown->DelTemp( bForce ); + m_pDown->DelTemp( bForce ); } - if( ( bForce || bInvalid ) - && ( aEntry.GetType() != STG_ROOT ) /* && ( nRefCnt <= 1 ) */ ) + if( ( bForce || m_bInvalid ) + && ( m_aEntry.GetType() != STG_ROOT ) /* && ( nRefCnt <= 1 ) */ ) { Close(); - if( pUp ) + if( m_pUp ) { // this deletes the element if refcnt == 0! - bool bDel = nRefCnt == 0; - StgAvlNode::Remove( reinterpret_cast(&pUp->pDown), this, bDel ); + bool bDel = m_nRefCnt == 0; + StgAvlNode::Remove( reinterpret_cast(&m_pUp->m_pDown), this, bDel ); if( !bDel ) { - pLeft = pRight = pDown = 0; - bInvalid = bZombie = true; + pLeft = pRight = m_pDown = 0; + m_bInvalid = m_bZombie = true; } } } @@ -173,37 +173,37 @@ void StgDirEntry::DelTemp( bool bForce ) bool StgDirEntry::Store( StgDirStrm& rStrm ) { - void* pEntry = rStrm.GetEntry( nEntry, true ); + void* pEntry = rStrm.GetEntry( m_nEntry, true ); if( !pEntry ) return false; // Do not store the current (maybe not committed) entry - aSave.Store( pEntry ); + m_aSave.Store( pEntry ); if( pLeft ) if( !static_cast(pLeft)->Store( rStrm ) ) return false; if( pRight ) if( !static_cast(pRight)->Store( rStrm ) ) return false; - if( pDown ) - if( !pDown->Store( rStrm ) ) + if( m_pDown ) + if( !m_pDown->Store( rStrm ) ) return false; return true; } bool StgDirEntry::StoreStream( StgIo& rIo ) { - if( aEntry.GetType() == STG_STREAM || aEntry.GetType() == STG_ROOT ) + if( m_aEntry.GetType() == STG_STREAM || m_aEntry.GetType() == STG_ROOT ) { - if( bInvalid ) + if( m_bInvalid ) { // Delete the stream if needed - if( !pStgStrm ) + if( !m_pStgStrm ) { OpenStream( rIo ); - delete pStgStrm, pStgStrm = NULL; + delete m_pStgStrm, m_pStgStrm = NULL; } else - pStgStrm->SetSize( 0 ); + m_pStgStrm->SetSize( 0 ); } // or write the data stream else if( !Tmp2Strm() ) @@ -224,8 +224,8 @@ bool StgDirEntry::StoreStreams( StgIo& rIo ) if( pRight ) if( !static_cast(pRight)->StoreStreams( rIo ) ) return false; - if( pDown ) - if( !pDown->StoreStreams( rIo ) ) + if( m_pDown ) + if( !m_pDown->StoreStreams( rIo ) ) return false; return true; } @@ -234,26 +234,26 @@ bool StgDirEntry::StoreStreams( StgIo& rIo ) void StgDirEntry::RevertAll() { - aEntry = aSave; + m_aEntry = m_aSave; if( pLeft ) static_cast(pLeft)->RevertAll(); if( pRight ) static_cast(pRight)->RevertAll(); - if( pDown ) - pDown->RevertAll(); + if( m_pDown ) + m_pDown->RevertAll(); } // Look if any element of the tree is dirty bool StgDirEntry::IsDirty() { - if( bDirty || bInvalid ) + if( m_bDirty || m_bInvalid ) return true; if( pLeft && static_cast(pLeft)->IsDirty() ) return true; if( pRight && static_cast(pRight)->IsDirty() ) return true; - if( pDown && pDown->IsDirty() ) + if( m_pDown && m_pDown->IsDirty() ) return true; return false; } @@ -263,18 +263,18 @@ bool StgDirEntry::IsDirty() void StgDirEntry::OpenStream( StgIo& rIo, bool bForceBig ) { sal_Int32 nThreshold = (sal_uInt16) rIo.aHdr.GetThreshold(); - delete pStgStrm; - if( !bForceBig && aEntry.GetSize() < nThreshold ) - pStgStrm = new StgSmallStrm( rIo, *this ); + delete m_pStgStrm; + if( !bForceBig && m_aEntry.GetSize() < nThreshold ) + m_pStgStrm = new StgSmallStrm( rIo, *this ); else - pStgStrm = new StgDataStrm( rIo, *this ); - if( bInvalid && aEntry.GetSize() ) + m_pStgStrm = new StgDataStrm( rIo, *this ); + if( m_bInvalid && m_aEntry.GetSize() ) { // This entry has invalid data, so delete that data SetSize( 0L ); // bRemoved = bInvalid = false; } - nPos = 0; + m_nPos = 0; } // Close the open stream without committing. If the entry is marked as @@ -284,10 +284,10 @@ void StgDirEntry::OpenStream( StgIo& rIo, bool bForceBig ) void StgDirEntry::Close() { - delete pTmpStrm; - pTmpStrm = NULL; + delete m_pTmpStrm; + m_pTmpStrm = NULL; // nRefCnt = 0; - bInvalid = bTemp; + m_bInvalid = m_bTemp; } // Get the current stream size @@ -295,11 +295,11 @@ void StgDirEntry::Close() sal_Int32 StgDirEntry::GetSize() { sal_Int32 n; - if( pTmpStrm ) - n = pTmpStrm->GetSize(); - else if( pCurStrm ) - n = pCurStrm->GetSize(); - else n = aEntry.GetSize(); + if( m_pTmpStrm ) + n = m_pTmpStrm->GetSize(); + else if( m_pCurStrm ) + n = m_pCurStrm->GetSize(); + else n = m_aEntry.GetSize(); return n; } @@ -308,47 +308,47 @@ sal_Int32 StgDirEntry::GetSize() bool StgDirEntry::SetSize( sal_Int32 nNewSize ) { if ( - !( nMode & StreamMode::WRITE ) || - (!bDirect && !pTmpStrm && !Strm2Tmp()) + !( m_nMode & StreamMode::WRITE ) || + (!m_bDirect && !m_pTmpStrm && !Strm2Tmp()) ) { return false; } - if( nNewSize < nPos ) - nPos = nNewSize; - if( pTmpStrm ) + if( nNewSize < m_nPos ) + m_nPos = nNewSize; + if( m_pTmpStrm ) { - pTmpStrm->SetSize( nNewSize ); - pStgStrm->GetIo().SetError( pTmpStrm->GetError() ); - return pTmpStrm->GetError() == SVSTREAM_OK; + m_pTmpStrm->SetSize( nNewSize ); + m_pStgStrm->GetIo().SetError( m_pTmpStrm->GetError() ); + return m_pTmpStrm->GetError() == SVSTREAM_OK; } else { - OSL_ENSURE( pStgStrm, "The pointer may not be NULL!" ); - if ( !pStgStrm ) + OSL_ENSURE( m_pStgStrm, "The pointer may not be NULL!" ); + if ( !m_pStgStrm ) return false; bool bRes = false; - StgIo& rIo = pStgStrm->GetIo(); + StgIo& rIo = m_pStgStrm->GetIo(); sal_Int32 nThreshold = rIo.aHdr.GetThreshold(); // ensure the correct storage stream! StgStrm* pOld = NULL; sal_uInt16 nOldSize = 0; - if( nNewSize >= nThreshold && pStgStrm->IsSmallStrm() ) + if( nNewSize >= nThreshold && m_pStgStrm->IsSmallStrm() ) { - pOld = pStgStrm; + pOld = m_pStgStrm; nOldSize = (sal_uInt16) pOld->GetSize(); - pStgStrm = new StgDataStrm( rIo, STG_EOF, 0 ); + m_pStgStrm = new StgDataStrm( rIo, STG_EOF, 0 ); } - else if( nNewSize < nThreshold && !pStgStrm->IsSmallStrm() ) + else if( nNewSize < nThreshold && !m_pStgStrm->IsSmallStrm() ) { - pOld = pStgStrm; + pOld = m_pStgStrm; nOldSize = (sal_uInt16) nNewSize; - pStgStrm = new StgSmallStrm( rIo, STG_EOF, 0 ); + m_pStgStrm = new StgSmallStrm( rIo, STG_EOF, 0 ); } // now set the new size - if( pStgStrm->SetSize( nNewSize ) ) + if( m_pStgStrm->SetSize( nNewSize ) ) { // did we create a new stream? if( pOld ) @@ -358,9 +358,9 @@ bool StgDirEntry::SetSize( sal_Int32 nNewSize ) { std::unique_ptr pBuf(new sal_uInt8[ nOldSize ]); pOld->Pos2Page( 0L ); - pStgStrm->Pos2Page( 0L ); + m_pStgStrm->Pos2Page( 0L ); if( pOld->Read( pBuf.get(), nOldSize ) - && pStgStrm->Write( pBuf.get(), nOldSize ) ) + && m_pStgStrm->Write( pBuf.get(), nOldSize ) ) bRes = true; } else @@ -369,19 +369,19 @@ bool StgDirEntry::SetSize( sal_Int32 nNewSize ) { pOld->SetSize( 0 ); delete pOld; - pStgStrm->Pos2Page( nPos ); - pStgStrm->SetEntry( *this ); + m_pStgStrm->Pos2Page( m_nPos ); + m_pStgStrm->SetEntry( *this ); } else { - pStgStrm->SetSize( 0 ); - delete pStgStrm; - pStgStrm = pOld; + m_pStgStrm->SetSize( 0 ); + delete m_pStgStrm; + m_pStgStrm = pOld; } } else { - pStgStrm->Pos2Page( nPos ); + m_pStgStrm->Pos2Page( m_nPos ); bRes = true; } } @@ -393,25 +393,25 @@ bool StgDirEntry::SetSize( sal_Int32 nNewSize ) sal_Int32 StgDirEntry::Seek( sal_Int32 nNew ) { - if( pTmpStrm ) + if( m_pTmpStrm ) { if( nNew < 0 ) - nNew = pTmpStrm->GetSize(); - nNew = pTmpStrm->Seek( nNew ); + nNew = m_pTmpStrm->GetSize(); + nNew = m_pTmpStrm->Seek( nNew ); } - else if( pCurStrm ) + else if( m_pCurStrm ) { if( nNew < 0 ) - nNew = pCurStrm->GetSize(); - nNew = pCurStrm->Seek( nNew ); + nNew = m_pCurStrm->GetSize(); + nNew = m_pCurStrm->Seek( nNew ); } else { - OSL_ENSURE( pStgStrm, "The pointer may not be NULL!" ); - if ( !pStgStrm ) - return nPos; + OSL_ENSURE( m_pStgStrm, "The pointer may not be NULL!" ); + if ( !m_pStgStrm ) + return m_nPos; - sal_Int32 nSize = aEntry.GetSize(); + sal_Int32 nSize = m_aEntry.GetSize(); if( nNew < 0 ) nNew = nSize; @@ -419,20 +419,20 @@ sal_Int32 StgDirEntry::Seek( sal_Int32 nNew ) // try to enlarge, the readonly streams should not allow this if( nNew > nSize ) { - if ( !( nMode & StreamMode::WRITE ) || !SetSize( nNew ) ) + if ( !( m_nMode & StreamMode::WRITE ) || !SetSize( nNew ) ) { - SAL_WARN_IF(!(nMode & StreamMode::WRITE), "sot", + SAL_WARN_IF(!(m_nMode & StreamMode::WRITE), "sot", "Trying to resize readonly stream by seeking, could be a wrong offset: " << nNew); - return nPos; + return m_nPos; } else return Seek( nNew ); } - pStgStrm->Pos2Page( nNew ); - nNew = pStgStrm->GetPos(); + m_pStgStrm->Pos2Page( nNew ); + nNew = m_pStgStrm->GetPos(); } - return nPos = nNew; + return m_nPos = nNew; } // Read @@ -441,20 +441,20 @@ sal_Int32 StgDirEntry::Read( void* p, sal_Int32 nLen ) { if( nLen <= 0 ) return 0; - if( pTmpStrm ) - nLen = pTmpStrm->Read( p, nLen ); - else if( pCurStrm ) - nLen = pCurStrm->Read( p, nLen ); + if( m_pTmpStrm ) + nLen = m_pTmpStrm->Read( p, nLen ); + else if( m_pCurStrm ) + nLen = m_pCurStrm->Read( p, nLen ); else { - OSL_ENSURE( pStgStrm, "The pointer may not be NULL!" ); - if ( !pStgStrm ) + OSL_ENSURE( m_pStgStrm, "The pointer may not be NULL!" ); + if ( !m_pStgStrm ) return 0; - nLen = pStgStrm->Read( p, nLen ); + nLen = m_pStgStrm->Read( p, nLen ); } - nPos += nLen; + m_nPos += nLen; return nLen; } @@ -462,37 +462,37 @@ sal_Int32 StgDirEntry::Read( void* p, sal_Int32 nLen ) sal_Int32 StgDirEntry::Write( const void* p, sal_Int32 nLen ) { - if( nLen <= 0 || !( nMode & StreamMode::WRITE ) ) + if( nLen <= 0 || !( m_nMode & StreamMode::WRITE ) ) return 0; // Was this stream committed internally and reopened in direct mode? - if( bDirect && ( pCurStrm || pTmpStrm ) && !Tmp2Strm() ) + if( m_bDirect && ( m_pCurStrm || m_pTmpStrm ) && !Tmp2Strm() ) return 0; // Is this stream opened in transacted mode? Do we have to make a copy? - if( !bDirect && !pTmpStrm && !Strm2Tmp() ) + if( !m_bDirect && !m_pTmpStrm && !Strm2Tmp() ) return 0; - OSL_ENSURE( pStgStrm, "The pointer may not be NULL!" ); - if ( !pStgStrm ) + OSL_ENSURE( m_pStgStrm, "The pointer may not be NULL!" ); + if ( !m_pStgStrm ) return 0; - if( pTmpStrm ) + if( m_pTmpStrm ) { - nLen = pTmpStrm->Write( p, nLen ); - pStgStrm->GetIo().SetError( pTmpStrm->GetError() ); + nLen = m_pTmpStrm->Write( p, nLen ); + m_pStgStrm->GetIo().SetError( m_pTmpStrm->GetError() ); } else { - sal_Int32 nNew = nPos + nLen; - if( nNew > pStgStrm->GetSize() ) + sal_Int32 nNew = m_nPos + nLen; + if( nNew > m_pStgStrm->GetSize() ) { if( !SetSize( nNew ) ) return 0L; - pStgStrm->Pos2Page( nPos ); + m_pStgStrm->Pos2Page( m_nPos ); } - nLen = pStgStrm->Write( p, nLen ); + nLen = m_pStgStrm->Write( p, nLen ); } - nPos += nLen; + m_nPos += nLen; return nLen; } @@ -527,18 +527,18 @@ bool StgDirEntry::Commit() { // OSL_ENSURE( nMode & StreamMode::WRITE, "Trying to commit readonly stream!" ); - aSave = aEntry; + m_aSave = m_aEntry; bool bRes = true; - if( aEntry.GetType() == STG_STREAM ) + if( m_aEntry.GetType() == STG_STREAM ) { - if( pTmpStrm ) - delete pCurStrm, pCurStrm = pTmpStrm, pTmpStrm = NULL; - if( bRemoved ) + if( m_pTmpStrm ) + delete m_pCurStrm, m_pCurStrm = m_pTmpStrm, m_pTmpStrm = NULL; + if( m_bRemoved ) // Delete the stream if needed - if( pStgStrm ) - pStgStrm->SetSize( 0 ); + if( m_pStgStrm ) + m_pStgStrm->SetSize( 0 ); } - else if( aEntry.GetType() == STG_STORAGE && bDirect && bRes ) + else if( m_aEntry.GetType() == STG_STORAGE && m_bDirect && bRes ) { StgIterator aIter( *this ); for( StgDirEntry* p = aIter.First(); p && bRes; p = aIter.Next() ) @@ -551,45 +551,45 @@ bool StgDirEntry::Commit() bool StgDirEntry::Strm2Tmp() { - if( !pTmpStrm ) + if( !m_pTmpStrm ) { sal_uLong n = 0; - if( pCurStrm ) + if( m_pCurStrm ) { // It was already committed once - pTmpStrm = new StgTmpStrm; - if( pTmpStrm->GetError() == SVSTREAM_OK && pTmpStrm->Copy( *pCurStrm ) ) + m_pTmpStrm = new StgTmpStrm; + if( m_pTmpStrm->GetError() == SVSTREAM_OK && m_pTmpStrm->Copy( *m_pCurStrm ) ) return true; n = 1; // indicates error } else { - n = aEntry.GetSize(); - pTmpStrm = new StgTmpStrm( n ); - if( pTmpStrm->GetError() == SVSTREAM_OK ) + n = m_aEntry.GetSize(); + m_pTmpStrm = new StgTmpStrm( n ); + if( m_pTmpStrm->GetError() == SVSTREAM_OK ) { if( n ) { - OSL_ENSURE( pStgStrm, "The pointer may not be NULL!" ); - if ( !pStgStrm ) + OSL_ENSURE( m_pStgStrm, "The pointer may not be NULL!" ); + if ( !m_pStgStrm ) return false; sal_uInt8 aTempBytes[ 4096 ]; void* p = static_cast( aTempBytes ); - pStgStrm->Pos2Page( 0L ); + m_pStgStrm->Pos2Page( 0L ); while( n ) { sal_uLong nn = n; if( nn > 4096 ) nn = 4096; - if( (sal_uLong) pStgStrm->Read( p, nn ) != nn ) + if( (sal_uLong) m_pStgStrm->Read( p, nn ) != nn ) break; - if( pTmpStrm->Write( p, nn ) != nn ) + if( m_pTmpStrm->Write( p, nn ) != nn ) break; n -= nn; } - pStgStrm->Pos2Page( nPos ); - pTmpStrm->Seek( nPos ); + m_pStgStrm->Pos2Page( m_nPos ); + m_pTmpStrm->Seek( m_nPos ); } } else @@ -598,12 +598,12 @@ bool StgDirEntry::Strm2Tmp() if( n ) { - OSL_ENSURE( pStgStrm, "The pointer may not be NULL!" ); - if ( pStgStrm ) - pStgStrm->GetIo().SetError( pTmpStrm->GetError() ); + OSL_ENSURE( m_pStgStrm, "The pointer may not be NULL!" ); + if ( m_pStgStrm ) + m_pStgStrm->GetIo().SetError( m_pTmpStrm->GetError() ); - delete pTmpStrm; - pTmpStrm = NULL; + delete m_pTmpStrm; + m_pTmpStrm = NULL; return false; } } @@ -615,16 +615,16 @@ bool StgDirEntry::Strm2Tmp() bool StgDirEntry::Tmp2Strm() { // We did commit once, but have not written since then - if( !pTmpStrm ) - pTmpStrm = pCurStrm, pCurStrm = NULL; - if( pTmpStrm ) + if( !m_pTmpStrm ) + m_pTmpStrm = m_pCurStrm, m_pCurStrm = NULL; + if( m_pTmpStrm ) { - OSL_ENSURE( pStgStrm, "The pointer may not be NULL!" ); - if ( !pStgStrm ) + OSL_ENSURE( m_pStgStrm, "The pointer may not be NULL!" ); + if ( !m_pStgStrm ) return false; - sal_uLong n = pTmpStrm->GetSize(); + sal_uLong n = m_pTmpStrm->GetSize(); StgStrm* pNewStrm; - StgIo& rIo = pStgStrm->GetIo(); + StgIo& rIo = m_pStgStrm->GetIo(); sal_uLong nThreshold = (sal_uLong) rIo.aHdr.GetThreshold(); if( n < nThreshold ) pNewStrm = new StgSmallStrm( rIo, STG_EOF, 0 ); @@ -633,13 +633,13 @@ bool StgDirEntry::Tmp2Strm() if( pNewStrm->SetSize( n ) ) { sal_uInt8 p[ 4096 ]; - pTmpStrm->Seek( 0L ); + m_pTmpStrm->Seek( 0L ); while( n ) { sal_uLong nn = n; if( nn > 4096 ) nn = 4096; - if( pTmpStrm->Read( p, nn ) != nn ) + if( m_pTmpStrm->Read( p, nn ) != nn ) break; if( (sal_uLong) pNewStrm->Write( p, nn ) != nn ) break; @@ -647,22 +647,22 @@ bool StgDirEntry::Tmp2Strm() } if( n ) { - pTmpStrm->Seek( nPos ); - pStgStrm->GetIo().SetError( pTmpStrm->GetError() ); + m_pTmpStrm->Seek( m_nPos ); + m_pStgStrm->GetIo().SetError( m_pTmpStrm->GetError() ); delete pNewStrm; return false; } else { - pStgStrm->SetSize( 0L ); - delete pStgStrm; - pStgStrm = pNewStrm; + m_pStgStrm->SetSize( 0L ); + delete m_pStgStrm; + m_pStgStrm = pNewStrm; pNewStrm->SetEntry( *this ); - pNewStrm->Pos2Page( nPos ); - delete pTmpStrm; - delete pCurStrm; - pTmpStrm = pCurStrm = NULL; - aSave = aEntry; + pNewStrm->Pos2Page( m_nPos ); + delete m_pTmpStrm; + delete m_pCurStrm; + m_pTmpStrm = m_pCurStrm = NULL; + m_aSave = m_aEntry; } } } @@ -673,15 +673,15 @@ bool StgDirEntry::Tmp2Strm() bool StgDirEntry::IsContained( StgDirEntry* pStg ) { - if( aEntry.GetType() == STG_STORAGE ) + if( m_aEntry.GetType() == STG_STORAGE ) { StgIterator aIter( *this ); StgDirEntry* p = aIter.First(); while( p ) { - if( !p->aEntry.Compare( pStg->aEntry ) ) + if( !p->m_aEntry.Compare( pStg->m_aEntry ) ) return false; - if( p->aEntry.GetType() == STG_STORAGE ) + if( p->m_aEntry.GetType() == STG_STORAGE ) if( !p->IsContained( pStg ) ) return false; p = aIter.Next(); @@ -698,8 +698,8 @@ void StgDirEntry::Invalidate( bool bDel ) { // nRefCnt = 0; if( bDel ) - bRemoved = bInvalid = true; - switch( aEntry.GetType() ) + m_bRemoved = m_bInvalid = true; + switch( m_aEntry.GetType() ) { case STG_STORAGE: case STG_ROOT: @@ -775,15 +775,15 @@ void StgDirStrm::SetupEntry( sal_Int32 n, StgDirEntry* pUpper ) // better it is if( !pUpper ) - pCur->aEntry.SetType( STG_ROOT ); + pCur->m_aEntry.SetType( STG_ROOT ); - sal_Int32 nLeft = pCur->aEntry.GetLeaf( STG_LEFT ); - sal_Int32 nRight = pCur->aEntry.GetLeaf( STG_RIGHT ); + sal_Int32 nLeft = pCur->m_aEntry.GetLeaf( STG_LEFT ); + sal_Int32 nRight = pCur->m_aEntry.GetLeaf( STG_RIGHT ); // substorage? sal_Int32 nLeaf = STG_FREE; - if( pCur->aEntry.GetType() == STG_STORAGE || pCur->aEntry.GetType() == STG_ROOT ) + if( pCur->m_aEntry.GetType() == STG_STORAGE || pCur->m_aEntry.GetType() == STG_ROOT ) { - nLeaf = pCur->aEntry.GetLeaf( STG_CHILD ); + nLeaf = pCur->m_aEntry.GetLeaf( STG_CHILD ); if (nLeaf != STG_FREE && nLeaf == n) { delete pCur; @@ -797,15 +797,15 @@ void StgDirStrm::SetupEntry( sal_Int32 n, StgDirEntry* pUpper ) //fdo#41642 Do we need to check full chain upwards for loops ? if (pUpper) { - if (pUpper->aEntry.GetLeaf(STG_CHILD) == nLeaf) + if (pUpper->m_aEntry.GetLeaf(STG_CHILD) == nLeaf) { OSL_FAIL("Leaf node of upper StgDirEntry is same as current StgDirEntry's leaf node. Circular entry chain, discarding link"); delete pCur; return; } - StgDirEntry *pUpperUpper = pUpper->pUp; - if (pUpperUpper && pUpperUpper->aEntry.GetLeaf(STG_CHILD) == nLeaf) + StgDirEntry *pUpperUpper = pUpper->m_pUp; + if (pUpperUpper && pUpperUpper->m_aEntry.GetLeaf(STG_CHILD) == nLeaf) { OSL_FAIL("Leaf node of upper-upper StgDirEntry is same as current StgDirEntry's leaf node. Circular entry chain, discarding link"); delete pCur; @@ -814,10 +814,10 @@ void StgDirStrm::SetupEntry( sal_Int32 n, StgDirEntry* pUpper ) } if( StgAvlNode::Insert - ( reinterpret_cast( pUpper ? &pUpper->pDown : &pRoot ), pCur ) ) + ( reinterpret_cast( pUpper ? &pUpper->m_pDown : &pRoot ), pCur ) ) { - pCur->pUp = pUpper; - pCur->ppRoot = &pRoot; + pCur->m_pUp = pUpper; + pCur->m_ppRoot = &pRoot; } else { @@ -923,7 +923,7 @@ void* StgDirStrm::GetEntry( sal_Int32 n, bool bDirty ) StgDirEntry* StgDirStrm::Find( StgDirEntry& rStg, const OUString& rName ) { - if( rStg.pDown ) + if( rStg.m_pDown ) { StgEntry aEntry; aEntry.Init(); @@ -934,7 +934,7 @@ StgDirEntry* StgDirStrm::Find( StgDirEntry& rStg, const OUString& rName ) } // Look in the directory attached to the entry StgDirEntry aTest( aEntry ); - return static_cast( rStg.pDown->Find( &aTest ) ); + return static_cast( rStg.m_pDown->Find( &aTest ) ); } else return NULL; @@ -955,26 +955,26 @@ StgDirEntry* StgDirStrm::Create( StgDirEntry& rStg, const OUString& rName, StgEn StgDirEntry* pRes = Find( rStg, rName ); if( pRes ) { - if( !pRes->bInvalid ) + if( !pRes->m_bInvalid ) { rIo.SetError( SVSTREAM_CANNOT_MAKE ); return NULL; } - pRes->bInvalid = - pRes->bRemoved = - pRes->bTemp = false; - pRes->bCreated = - pRes->bDirty = true; + pRes->m_bInvalid = + pRes->m_bRemoved = + pRes->m_bTemp = false; + pRes->m_bCreated = + pRes->m_bDirty = true; } else { pRes = new StgDirEntry( aEntry ); - if( StgAvlNode::Insert( reinterpret_cast(&rStg.pDown), pRes ) ) + if( StgAvlNode::Insert( reinterpret_cast(&rStg.m_pDown), pRes ) ) { - pRes->pUp = &rStg; - pRes->ppRoot = &pRoot; - pRes->bCreated = - pRes->bDirty = true; + pRes->m_pUp = &rStg; + pRes->m_ppRoot = &pRoot; + pRes->m_bCreated = + pRes->m_bDirty = true; } else { diff --git a/sot/source/sdstor/stgdir.hxx b/sot/source/sdstor/stgdir.hxx index 0f945b36b5fe..bd6cfb3a0456 100644 --- a/sot/source/sdstor/stgdir.hxx +++ b/sot/source/sdstor/stgdir.hxx @@ -34,19 +34,19 @@ class StgDirEntry : public StgAvlNode { friend class StgIterator; friend class StgDirStrm; - StgEntry aSave; // original dir entry - StgDirEntry* pUp; // parent directory - StgDirEntry* pDown; // child directory for storages - StgDirEntry** ppRoot; // root of TOC tree - StgStrm* pStgStrm; // storage stream - StgTmpStrm* pTmpStrm; // temporary stream - StgTmpStrm* pCurStrm; // temp stream after commit - sal_Int32 nEntry; // entry # in TOC stream (temp) - sal_Int32 nPos; // current position - bool bDirty; // dirty directory entry - bool bCreated; // newly created entry - bool bRemoved; // removed per Invalidate() - bool bRenamed; // renamed + StgEntry m_aSave; // original dir entry + StgDirEntry* m_pUp; // parent directory + StgDirEntry* m_pDown; // child directory for storages + StgDirEntry** m_ppRoot; // root of TOC tree + StgStrm* m_pStgStrm; // storage stream + StgTmpStrm* m_pTmpStrm; // temporary stream + StgTmpStrm* m_pCurStrm; // temp stream after commit + sal_Int32 m_nEntry; // entry # in TOC stream (temp) + sal_Int32 m_nPos; // current position + bool m_bDirty; // dirty directory entry + bool m_bCreated; // newly created entry + bool m_bRemoved; // removed per Invalidate() + bool m_bRenamed; // renamed void InitMembers(); // ctor helper virtual short Compare( const StgAvlNode* ) const SAL_OVERRIDE; bool StoreStream( StgIo& ); // store the stream @@ -55,13 +55,13 @@ class StgDirEntry : public StgAvlNode bool Strm2Tmp(); // copy stgstream to temp file bool Tmp2Strm(); // copy temp file to stgstream public: - StgEntry aEntry; // entry data - sal_Int32 nRefCnt; // reference count - StreamMode nMode; // open mode - bool bTemp; // true: delete on dir flush - bool bDirect; // true: direct mode - bool bZombie; // true: Removed From StgIo - bool bInvalid; // true: invalid entry + StgEntry m_aEntry; // entry data + sal_Int32 m_nRefCnt; // reference count + StreamMode m_nMode; // open mode + bool m_bTemp; // true: delete on dir flush + bool m_bDirect; // true: direct mode + bool m_bZombie; // true: Removed From StgIo + bool m_bInvalid; // true: invalid entry StgDirEntry(const void* pBuffer, sal_uInt32 nBufferLen, sal_uInt64 nUnderlyingStreamSize, bool * pbOk); explicit StgDirEntry( const StgEntry& ); @@ -73,7 +73,7 @@ public: bool Store( StgDirStrm& ); // save entry into dir strm bool IsContained( StgDirEntry* ); // check if subentry - void SetDirty() { bDirty = true; } + void SetDirty() { m_bDirty = true; } bool IsDirty(); bool Commit(); @@ -108,7 +108,7 @@ public: class StgIterator : public StgAvlIterator { public: - explicit StgIterator( StgDirEntry& rStg ) : StgAvlIterator( rStg.pDown ) {} + explicit StgIterator( StgDirEntry& rStg ) : StgAvlIterator( rStg.m_pDown ) {} StgDirEntry* First() { return static_cast( StgAvlIterator::First() ); } StgDirEntry* Next() { return static_cast( StgAvlIterator::Next() ); } }; diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx index b26ee9f1d7d9..ac9afdc89f4d 100644 --- a/sot/source/sdstor/stgio.cxx +++ b/sot/source/sdstor/stgio.cxx @@ -281,7 +281,7 @@ sal_uLong Validator::MarkAll( StgDirEntry *pEntry ) sal_uLong nErr = FAT_OK; for( StgDirEntry* p = aIter.First(); p ; p = aIter.Next() ) { - if( p->aEntry.GetType() == STG_STORAGE ) + if( p->m_aEntry.GetType() == STG_STORAGE ) { nErr = MarkAll( p ); if( nErr != FAT_OK ) @@ -289,11 +289,11 @@ sal_uLong Validator::MarkAll( StgDirEntry *pEntry ) } else { - sal_Int32 nSize = p->aEntry.GetSize(); + sal_Int32 nSize = p->m_aEntry.GetSize(); if( nSize < rIo.aHdr.GetThreshold() ) - nErr = aSmallFat.Mark( p->aEntry.GetStartPage(),nSize, -2 ); + nErr = aSmallFat.Mark( p->m_aEntry.GetStartPage(),nSize, -2 ); else - nErr = aFat.Mark( p->aEntry.GetStartPage(),nSize, -2 ); + nErr = aFat.Mark( p->m_aEntry.GetStartPage(),nSize, -2 ); if( nErr != FAT_OK ) return nErr; } @@ -311,8 +311,8 @@ sal_uLong Validator::ValidateDirectoryEntries() if( nErr != FAT_OK ) return nErr; // Small Data - nErr = aFat.Mark( rIo.pTOC->GetRoot()->aEntry.GetStartPage(), - rIo.pTOC->GetRoot()->aEntry.GetSize(), -2 ); + nErr = aFat.Mark( rIo.pTOC->GetRoot()->m_aEntry.GetStartPage(), + rIo.pTOC->GetRoot()->m_aEntry.GetSize(), -2 ); if( nErr != FAT_OK ) return nErr; // Small Data FAT diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx index 2471c005b000..0545d7de2deb 100644 --- a/sot/source/sdstor/stgstrms.cxx +++ b/sot/source/sdstor/stgstrms.cxx @@ -324,8 +324,8 @@ StgStrm::~StgStrm() void StgStrm::SetEntry( StgDirEntry& r ) { - r.aEntry.SetLeaf( STG_DATA, nStart ); - r.aEntry.SetSize( nSize ); + r.m_aEntry.SetLeaf( STG_DATA, nStart ); + r.m_aEntry.SetSize( nSize ); pEntry = &r; r.SetDirty(); } @@ -525,8 +525,8 @@ bool StgStrm::SetSize( sal_Int32 nBytes ) { // change the dir entry? if( !nSize || !nBytes ) - pEntry->aEntry.SetLeaf( STG_DATA, nStart ); - pEntry->aEntry.SetSize( nBytes ); + pEntry->m_aEntry.SetLeaf( STG_DATA, nStart ); + pEntry->m_aEntry.SetSize( nBytes ); pEntry->SetDirty(); } nSize = nBytes; @@ -801,8 +801,8 @@ StgDataStrm::StgDataStrm( StgIo& r, sal_Int32 nBgn, sal_Int32 nLen ) : StgStrm( StgDataStrm::StgDataStrm( StgIo& r, StgDirEntry& p ) : StgStrm( r ) { pEntry = &p; - Init( p.aEntry.GetLeaf( STG_DATA ), - p.aEntry.GetSize() ); + Init( p.m_aEntry.GetLeaf( STG_DATA ), + p.m_aEntry.GetSize() ); } void StgDataStrm::Init( sal_Int32 nBgn, sal_Int32 nLen ) @@ -1007,8 +1007,8 @@ StgSmallStrm::StgSmallStrm( StgIo& r, sal_Int32 nBgn, sal_Int32 nLen ) : StgStrm StgSmallStrm::StgSmallStrm( StgIo& r, StgDirEntry& p ) : StgStrm( r ) { pEntry = &p; - Init( p.aEntry.GetLeaf( STG_DATA ), - p.aEntry.GetSize() ); + Init( p.m_aEntry.GetLeaf( STG_DATA ), + p.m_aEntry.GetSize() ); } void StgSmallStrm::Init( sal_Int32 nBgn, sal_Int32 nLen ) -- cgit v1.2.3