diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-08 21:51:47 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-10-09 08:05:47 +0200 |
commit | 0567de24079290a1379dc23b51c89e738185f30a (patch) | |
tree | 17472f100bb35be8690e58e93c0c9446dd92ca55 /sot | |
parent | 56bc686c2a0dbfffc6e9f40df0e61c7b98fb3340 (diff) |
sot: prefix members of StgIo
Change-Id: Ibbe274514a145ab0b271100514bc3fea9f7076d5
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/stg.cxx | 24 | ||||
-rw-r--r-- | sot/source/sdstor/stgdir.cxx | 10 | ||||
-rw-r--r-- | sot/source/sdstor/stgio.cxx | 106 | ||||
-rw-r--r-- | sot/source/sdstor/stgio.hxx | 12 | ||||
-rw-r--r-- | sot/source/sdstor/stgstrms.cxx | 30 |
5 files changed, 91 insertions, 91 deletions
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx index 9e897f49b5ff..9e17f34d3cc7 100644 --- a/sot/source/sdstor/stg.cxx +++ b/sot/source/sdstor/stg.cxx @@ -118,7 +118,7 @@ OLEStorageBase::~OLEStorageBase() bool OLEStorageBase::Validate_Impl( bool bWrite ) const { if( pIo - && pIo->pTOC + && pIo->m_pTOC && pEntry && !pEntry->m_bInvalid && ( !bWrite || !pEntry->m_bDirect || ( nStreamMode & StreamMode::WRITE ) ) ) @@ -469,9 +469,9 @@ void Storage::Init( bool bCreate ) // the file is empty if( !bHdrLoaded ) pIo->Init(); - if( pIo->Good() && pIo->pTOC ) + if( pIo->Good() && pIo->m_pTOC ) { - pEntry = pIo->pTOC->GetRoot(); + pEntry = pIo->m_pTOC->GetRoot(); pEntry->m_nRefCnt++; } } @@ -560,7 +560,7 @@ BaseStorage* Storage::OpenStorage( const OUString& rName, StreamMode m, bool bDi if( bDirect && !pEntry->m_bDirect ) bDirect = false; - StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName ); + StgDirEntry* p = pIo->m_pTOC->Find( *pEntry, rName ); if( !p ) { if( !( m & StreamMode::NOCREATE ) ) @@ -573,7 +573,7 @@ BaseStorage* Storage::OpenStorage( const OUString& rName, StreamMode m, bool bDi aNewName = "Temp Stg " + OUString::number( ++nTmpCount ); bTemp = true; } - p = pIo->pTOC->Create( *pEntry, aNewName, STG_STORAGE ); + p = pIo->m_pTOC->Create( *pEntry, aNewName, STG_STORAGE ); if( p ) p->m_bTemp = bTemp; } @@ -614,7 +614,7 @@ BaseStorageStream* Storage::OpenStream( const OUString& rName, StreamMode m, boo if( !Validate() || !ValidateMode( m ) ) return new StorageStream( pIo, NULL, m ); - StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName ); + StgDirEntry* p = pIo->m_pTOC->Find( *pEntry, rName ); bool bTemp = false; if( !p ) { @@ -628,7 +628,7 @@ BaseStorageStream* Storage::OpenStream( const OUString& rName, StreamMode m, boo aNewName = "Temp Strm " + OUString::number( ++nTmpCount ); bTemp = true; } - p = pIo->pTOC->Create( *pEntry, aNewName, STG_STREAM ); + p = pIo->m_pTOC->Create( *pEntry, aNewName, STG_STREAM ); } if( !p ) pIo->SetError( ( m & StreamMode::WRITE ) @@ -659,7 +659,7 @@ bool Storage::Remove( const OUString& rName ) { if( !Validate( true ) ) return false; - StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName ); + StgDirEntry* p = pIo->m_pTOC->Find( *pEntry, rName ); if( p ) { p->Invalidate( true ); @@ -678,7 +678,7 @@ bool Storage::CopyTo( const OUString& rElem, BaseStorage* pDest, const OUString& { if( !Validate() || !pDest || !pDest->Validate( true ) ) return false; - StgDirEntry* pElem = pIo->pTOC->Find( *pEntry, rElem ); + StgDirEntry* pElem = pIo->m_pTOC->Find( *pEntry, rElem ); if( pElem ) { if( pElem->m_aEntry.GetType() == STG_STORAGE ) @@ -770,7 +770,7 @@ bool Storage::IsStorage( const OUString& rName ) const { if( Validate() ) { - StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName ); + StgDirEntry* p = pIo->m_pTOC->Find( *pEntry, rName ); if( p ) return p->m_aEntry.GetType() == STG_STORAGE; } @@ -781,7 +781,7 @@ bool Storage::IsStream( const OUString& rName ) const { if( Validate() ) { - StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName ); + StgDirEntry* p = pIo->m_pTOC->Find( *pEntry, rName ); if( p ) return p->m_aEntry.GetType() == STG_STREAM; } @@ -791,7 +791,7 @@ bool Storage::IsStream( const OUString& rName ) const bool Storage::IsContained( const OUString& rName ) const { if( Validate() ) - return pIo->pTOC->Find( *pEntry, rName ) != NULL; + return pIo->m_pTOC->Find( *pEntry, rName ) != NULL; else return false; } diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx index 79dcb1247477..04585c70736c 100644 --- a/sot/source/sdstor/stgdir.cxx +++ b/sot/source/sdstor/stgdir.cxx @@ -262,7 +262,7 @@ bool StgDirEntry::IsDirty() void StgDirEntry::OpenStream( StgIo& rIo, bool bForceBig ) { - sal_Int32 nThreshold = (sal_uInt16) rIo.aHdr.GetThreshold(); + sal_Int32 nThreshold = (sal_uInt16) rIo.m_aHdr.GetThreshold(); delete m_pStgStrm; if( !bForceBig && m_aEntry.GetSize() < nThreshold ) m_pStgStrm = new StgSmallStrm( rIo, *this ); @@ -331,7 +331,7 @@ bool StgDirEntry::SetSize( sal_Int32 nNewSize ) bool bRes = false; StgIo& rIo = m_pStgStrm->GetIo(); - sal_Int32 nThreshold = rIo.aHdr.GetThreshold(); + sal_Int32 nThreshold = rIo.m_aHdr.GetThreshold(); // ensure the correct storage stream! StgStrm* pOld = NULL; sal_uInt16 nOldSize = 0; @@ -625,7 +625,7 @@ bool StgDirEntry::Tmp2Strm() sal_uLong n = m_pTmpStrm->GetSize(); StgStrm* pNewStrm; StgIo& rIo = m_pStgStrm->GetIo(); - sal_uLong nThreshold = (sal_uLong) rIo.aHdr.GetThreshold(); + sal_uLong nThreshold = (sal_uLong) rIo.m_aHdr.GetThreshold(); if( n < nThreshold ) pNewStrm = new StgSmallStrm( rIo, STG_EOF, 0 ); else @@ -719,7 +719,7 @@ void StgDirEntry::Invalidate( bool bDel ) // This specialized stream is the maintenance stream for the directory tree. StgDirStrm::StgDirStrm( StgIo& r ) - : StgDataStrm( r, r.aHdr.GetTOCStart(), -1 ) + : StgDataStrm( r, r.m_aHdr.GetTOCStart(), -1 ) , pRoot( NULL ) , nEntries( 0 ) { @@ -907,7 +907,7 @@ bool StgDirStrm::Store() } // Now we can release the old stream pFat->FreePages( nOldStart, true ); - rIo.aHdr.SetTOCStart( nStart ); + rIo.m_aHdr.SetTOCStart( nStart ); return true; } diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx index 7fa5a3e178f6..c73811a4f9d8 100644 --- a/sot/source/sdstor/stgio.cxx +++ b/sot/source/sdstor/stgio.cxx @@ -32,19 +32,19 @@ StgIo::StgIo() : StgCache() { - pTOC = NULL; - pDataFAT = NULL; - pDataStrm = NULL; - pFAT = NULL; - bCopied = false; + m_pTOC = NULL; + m_pDataFAT = NULL; + m_pDataStrm = NULL; + m_pFAT = NULL; + m_bCopied = false; } StgIo::~StgIo() { - delete pTOC; - delete pDataFAT; - delete pDataStrm; - delete pFAT; + delete m_pTOC; + delete m_pDataFAT; + delete m_pDataStrm; + delete m_pFAT; } // Load the header. Do not set an error code if the header is invalid. @@ -53,9 +53,9 @@ bool StgIo::Load() { if( m_pStrm ) { - if( aHdr.Load( *this ) ) + if( m_aHdr.Load( *this ) ) { - if( aHdr.Check() ) + if( m_aHdr.Check() ) SetupStreams(); else return false; @@ -70,35 +70,35 @@ bool StgIo::Load() bool StgIo::Init() { - aHdr.Init(); + m_aHdr.Init(); SetupStreams(); return CommitAll(); } void StgIo::SetupStreams() { - delete pTOC; - delete pDataFAT; - delete pDataStrm; - delete pFAT; - pTOC = NULL; - pDataFAT = NULL; - pDataStrm = NULL; - pFAT = NULL; + delete m_pTOC; + delete m_pDataFAT; + delete m_pDataStrm; + delete m_pFAT; + m_pTOC = NULL; + m_pDataFAT = NULL; + m_pDataStrm = NULL; + m_pFAT = NULL; ResetError(); - SetPhysPageSize( 1 << aHdr.GetPageSize() ); - pFAT = new StgFATStrm( *this ); - pTOC = new StgDirStrm( *this ); + SetPhysPageSize( 1 << m_aHdr.GetPageSize() ); + m_pFAT = new StgFATStrm( *this ); + m_pTOC = new StgDirStrm( *this ); if( !GetError() ) { - StgDirEntry* pRoot = pTOC->GetRoot(); + StgDirEntry* pRoot = m_pTOC->GetRoot(); if( pRoot ) { - pDataFAT = new StgDataStrm( *this, aHdr.GetDataFATStart(), -1 ); - pDataStrm = new StgDataStrm( *this, *pRoot ); - pDataFAT->SetIncrement( 1 << aHdr.GetPageSize() ); - pDataStrm->SetIncrement( GetDataPageSize() ); - pDataStrm->SetEntry( *pRoot ); + m_pDataFAT = new StgDataStrm( *this, m_aHdr.GetDataFATStart(), -1 ); + m_pDataStrm = new StgDataStrm( *this, *pRoot ); + m_pDataFAT->SetIncrement( 1 << m_aHdr.GetPageSize() ); + m_pDataStrm->SetIncrement( GetDataPageSize() ); + m_pDataStrm->SetEntry( *pRoot ); } else SetError( SVSTREAM_FILEFORMAT_ERROR ); @@ -109,7 +109,7 @@ void StgIo::SetupStreams() short StgIo::GetDataPageSize() { - return 1 << aHdr.GetDataPageSize(); + return 1 << m_aHdr.GetDataPageSize(); } // Commit everything @@ -117,14 +117,14 @@ short StgIo::GetDataPageSize() bool StgIo::CommitAll() { // Store the data (all streams and the TOC) - if( pTOC && pTOC->Store() && pDataFAT ) + if( m_pTOC && m_pTOC->Store() && m_pDataFAT ) { if( Commit() ) { - aHdr.SetDataFATStart( pDataFAT->GetStart() ); - aHdr.SetDataFATSize( pDataFAT->GetPages() ); - aHdr.SetTOCStart( pTOC->GetStart() ); - if( aHdr.Store( *this ) ) + m_aHdr.SetDataFATStart( m_pDataFAT->GetStart() ); + m_aHdr.SetDataFATSize( m_pDataFAT->GetPages() ); + m_aHdr.SetTOCStart( m_pTOC->GetStart() ); + if( m_aHdr.Store( *this ) ) { m_pStrm->Flush(); sal_uLong n = m_pStrm->GetError(); @@ -166,7 +166,7 @@ EasyFat::EasyFat( StgIo& rIo, StgStrm* pFatStream, sal_Int32 nPSize ) pFree = new bool[ nPages ]; rtl::Reference< StgPage > pPage; - sal_Int32 nFatPageSize = (1 << rIo.aHdr.GetPageSize()) - 2; + sal_Int32 nFatPageSize = (1 << rIo.m_aHdr.GetPageSize()) - 2; for( sal_Int32 nPage = 0; nPage < nPages; nPage++ ) { @@ -239,8 +239,8 @@ public: }; Validator::Validator( StgIo &rIoP ) - : aSmallFat( rIoP, rIoP.pDataFAT, 1 << rIoP.aHdr.GetDataPageSize() ), - aFat( rIoP, rIoP.pFAT, 1 << rIoP.aHdr.GetPageSize() ), + : aSmallFat( rIoP, rIoP.m_pDataFAT, 1 << rIoP.m_aHdr.GetDataPageSize() ), + aFat( rIoP, rIoP.m_pFAT, 1 << rIoP.m_aHdr.GetPageSize() ), rIo( rIoP ) { sal_uLong nErr = nError = FAT_OK; @@ -255,18 +255,18 @@ Validator::Validator( StgIo &rIoP ) sal_uLong Validator::ValidateMasterFATs() { - sal_Int32 nCount = rIo.aHdr.GetFATSize(); + sal_Int32 nCount = rIo.m_aHdr.GetFATSize(); sal_uLong nErr; - if ( !rIo.pFAT ) + if ( !rIo.m_pFAT ) return FAT_INMEMORYERROR; for( sal_Int32 i = 0; i < nCount; i++ ) { - if( ( nErr = aFat.Mark(rIo.pFAT->GetPage( short(i), false ), aFat.GetPageSize(), -3 )) != FAT_OK ) + if( ( nErr = aFat.Mark(rIo.m_pFAT->GetPage( short(i), false ), aFat.GetPageSize(), -3 )) != FAT_OK ) return nErr; } - if( rIo.aHdr.GetMasters() ) - if( ( nErr = aFat.Mark(rIo.aHdr.GetFATChain( ), aFat.GetPageSize(), -4 )) != FAT_OK ) + if( rIo.m_aHdr.GetMasters() ) + if( ( nErr = aFat.Mark(rIo.m_aHdr.GetFATChain( ), aFat.GetPageSize(), -4 )) != FAT_OK ) return nErr; return FAT_OK; @@ -290,7 +290,7 @@ sal_uLong Validator::MarkAll( StgDirEntry *pEntry ) else { sal_Int32 nSize = p->m_aEntry.GetSize(); - if( nSize < rIo.aHdr.GetThreshold() ) + if( nSize < rIo.m_aHdr.GetThreshold() ) nErr = aSmallFat.Mark( p->m_aEntry.GetStartPage(),nSize, -2 ); else nErr = aFat.Mark( p->m_aEntry.GetStartPage(),nSize, -2 ); @@ -303,27 +303,27 @@ sal_uLong Validator::MarkAll( StgDirEntry *pEntry ) sal_uLong Validator::ValidateDirectoryEntries() { - if ( !rIo.pTOC ) + if ( !rIo.m_pTOC ) return FAT_INMEMORYERROR; // Normale DirEntries - sal_uLong nErr = MarkAll( rIo.pTOC->GetRoot() ); + sal_uLong nErr = MarkAll( rIo.m_pTOC->GetRoot() ); if( nErr != FAT_OK ) return nErr; // Small Data - nErr = aFat.Mark( rIo.pTOC->GetRoot()->m_aEntry.GetStartPage(), - rIo.pTOC->GetRoot()->m_aEntry.GetSize(), -2 ); + nErr = aFat.Mark( rIo.m_pTOC->GetRoot()->m_aEntry.GetStartPage(), + rIo.m_pTOC->GetRoot()->m_aEntry.GetSize(), -2 ); if( nErr != FAT_OK ) return nErr; // Small Data FAT nErr = aFat.Mark( - rIo.aHdr.GetDataFATStart(), - rIo.aHdr.GetDataFATSize() * aFat.GetPageSize(), -2 ); + rIo.m_aHdr.GetDataFATStart(), + rIo.m_aHdr.GetDataFATSize() * aFat.GetPageSize(), -2 ); if( nErr != FAT_OK ) return nErr; // TOC nErr = aFat.Mark( - rIo.aHdr.GetTOCStart(), -1, -2 ); + rIo.m_aHdr.GetTOCStart(), -1, -2 ); return nErr; } @@ -374,13 +374,13 @@ sal_uLong StgIo::ValidateFATs() if( bRet1 != bRet2 ) nErr = bRet1 ? FAT_ONFILEERROR : FAT_INMEMORYERROR; else nErr = bRet1 ? FAT_OK : FAT_BOTHERROR; - if( nErr != FAT_OK && !bCopied ) + if( nErr != FAT_OK && !m_bCopied ) { StgLinkArg aArg; aArg.aFile = pFileStrm->GetFileName(); aArg.nErr = nErr; ErrorLink::get().Call( aArg ); - bCopied = true; + m_bCopied = true; } // DBG_ASSERT( nErr == FAT_OK ,"Storage kaputt"); return nErr; diff --git a/sot/source/sdstor/stgio.hxx b/sot/source/sdstor/stgio.hxx index f53652d7604e..40a66825e08a 100644 --- a/sot/source/sdstor/stgio.hxx +++ b/sot/source/sdstor/stgio.hxx @@ -50,15 +50,15 @@ struct StgLinkArg class StgIo : public StgCache { void SetupStreams(); // load all internal streams - bool bCopied; + bool m_bCopied; public: StgIo(); ~StgIo(); - StgHeader aHdr; // storage file header - StgFATStrm* pFAT; // FAT stream - StgDirStrm* pTOC; // TOC stream - StgDataStrm* pDataFAT; // small data FAT stream - StgDataStrm* pDataStrm; // small data stream + StgHeader m_aHdr; // storage file header + StgFATStrm* m_pFAT; // FAT stream + StgDirStrm* m_pTOC; // TOC stream + StgDataStrm* m_pDataFAT; // small data FAT stream + StgDataStrm* m_pDataStrm; // small data stream short GetDataPageSize(); // get the logical data page size bool Load(); // load a storage file bool Init(); // set up an empty file diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx index 16d1db748087..b813a360b9f7 100644 --- a/sot/source/sdstor/stgstrms.cxx +++ b/sot/source/sdstor/stgstrms.cxx @@ -546,7 +546,7 @@ bool StgStrm::SetSize( sal_Int32 nBytes ) StgFATStrm::StgFATStrm( StgIo& r ) : StgStrm( r ) { pFat = new StgFAT( *this, true ); - nSize = rIo.aHdr.GetFATSize() * nPageSize; + nSize = rIo.m_aHdr.GetFATSize() * nPageSize; } bool StgFATStrm::Pos2Page( sal_Int32 nBytePos ) @@ -568,7 +568,7 @@ sal_Int32 StgFATStrm::GetPage( short nOff, bool bMake, sal_uInt16 *pnMasterAlloc OSL_ENSURE( nOff >= 0, "The offset may not be negative!" ); if( pnMasterAlloc ) *pnMasterAlloc = 0; if( nOff < StgHeader::GetFAT1Size() ) - return rIo.aHdr.GetFATPage( nOff ); + return rIo.m_aHdr.GetFATPage( nOff ); sal_Int32 nMaxPage = nSize >> 2; nOff = nOff - StgHeader::GetFAT1Size(); // Anzahl der Masterpages, durch die wir iterieren muessen @@ -579,7 +579,7 @@ sal_Int32 StgFATStrm::GetPage( short nOff, bool bMake, sal_uInt16 *pnMasterAlloc rtl::Reference< StgPage > pOldPage; rtl::Reference< StgPage > pMaster; - sal_Int32 nFAT = rIo.aHdr.GetFATChain(); + sal_Int32 nFAT = rIo.m_aHdr.GetFATChain(); for( sal_uInt16 nCount = 0; nCount <= nBlocks; nCount++ ) { if( nFAT == STG_EOF || nFAT == STG_FREE ) @@ -597,7 +597,7 @@ sal_Int32 StgFATStrm::GetPage( short nOff, bool bMake, sal_uInt16 *pnMasterAlloc rIo.SetToPage( pMaster, k, STG_FREE ); // Verkettung herstellen if( !pOldPage.is() ) - rIo.aHdr.SetFATChain( nFAT ); + rIo.m_aHdr.SetFATChain( nFAT ); else rIo.SetToPage( pOldPage, nMasterCount, nFAT ); if( nMaxPage >= rIo.GetPhysPages() ) @@ -616,7 +616,7 @@ sal_Int32 StgFATStrm::GetPage( short nOff, bool bMake, sal_uInt16 *pnMasterAlloc } else (*pnMasterAlloc)++; - rIo.aHdr.SetMasters( nCount + 1 ); + rIo.m_aHdr.SetMasters( nCount + 1 ); pOldPage = pMaster; } } @@ -647,7 +647,7 @@ bool StgFATStrm::SetPage( short nOff, sal_Int32 nNewPage ) bool bRes = true; if( nOff < StgHeader::GetFAT1Size() ) - rIo.aHdr.SetFATPage( nOff, nNewPage ); + rIo.m_aHdr.SetFATPage( nOff, nNewPage ); else { nOff = nOff - StgHeader::GetFAT1Size(); @@ -658,7 +658,7 @@ bool StgFATStrm::SetPage( short nOff, sal_Int32 nNewPage ) nOff = nOff % nMasterCount; rtl::Reference< StgPage > pMaster; - sal_Int32 nFAT = rIo.aHdr.GetFATChain(); + sal_Int32 nFAT = rIo.m_aHdr.GetFATChain(); for( sal_uInt16 nCount = 0; nCount <= nBlocks; nCount++ ) { if( nFAT == STG_EOF || nFAT == STG_FREE ) @@ -755,8 +755,8 @@ bool StgFATStrm::SetSize( sal_Int32 nBytes ) // MegaMasterPages were created, mark it them as used - sal_uInt32 nMax = rIo.aHdr.GetMasters( ); - sal_uInt32 nFAT = rIo.aHdr.GetFATChain(); + sal_uInt32 nMax = rIo.m_aHdr.GetMasters( ); + sal_uInt32 nFAT = rIo.m_aHdr.GetFATChain(); if( nMasterAlloc ) for( sal_uInt32 nCount = 0; nCount < nMax; nCount++ ) { @@ -782,7 +782,7 @@ bool StgFATStrm::SetSize( sal_Int32 nBytes ) } } nSize = nNew * nPageSize; - rIo.aHdr.SetFATSize( nNew ); + rIo.m_aHdr.SetFATSize( nNew ); return true; } @@ -807,8 +807,8 @@ StgDataStrm::StgDataStrm( StgIo& r, StgDirEntry& p ) : StgStrm( r ) void StgDataStrm::Init( sal_Int32 nBgn, sal_Int32 nLen ) { - if ( rIo.pFAT ) - pFat = new StgFAT( *rIo.pFAT, true ); + if ( rIo.m_pFAT ) + pFat = new StgFAT( *rIo.m_pFAT, true ); OSL_ENSURE( pFat, "The pointer should not be empty!" ); @@ -1013,9 +1013,9 @@ StgSmallStrm::StgSmallStrm( StgIo& r, StgDirEntry& p ) : StgStrm( r ) void StgSmallStrm::Init( sal_Int32 nBgn, sal_Int32 nLen ) { - if ( rIo.pDataFAT ) - pFat = new StgFAT( *rIo.pDataFAT, false ); - pData = rIo.pDataStrm; + if ( rIo.m_pDataFAT ) + pFat = new StgFAT( *rIo.m_pDataFAT, false ); + pData = rIo.m_pDataStrm; OSL_ENSURE( pFat && pData, "The pointers should not be empty!" ); nPageSize = rIo.GetDataPageSize(); |