Kaydet (Commit) 3b3d738c authored tarafından Michael Meeks's avatar Michael Meeks

sot: remove unused Owner construct on StgPage

Change-Id: Idd6616ac11e16b4c4631c607a3dc92417a796521
üst 045227f1
...@@ -70,7 +70,6 @@ StgPage::StgPage( StgCache* p, short n ) ...@@ -70,7 +70,6 @@ StgPage::StgPage( StgCache* p, short n )
pNext2 = pNext2 =
pLast1 = pLast1 =
pLast2 = NULL; pLast2 = NULL;
pOwner = NULL;
} }
StgPage::~StgPage() StgPage::~StgPage()
......
...@@ -85,7 +85,6 @@ class StgPage { ...@@ -85,7 +85,6 @@ class StgPage {
StgCache* pCache; // the cache StgCache* pCache; // the cache
StgPage *pNext1, *pLast1; // LRU chain StgPage *pNext1, *pLast1; // LRU chain
StgPage *pNext2, *pLast2; // ordered chain StgPage *pNext2, *pLast2; // ordered chain
StgDirEntry* pOwner; // owner
sal_Int32 nPage; // page # sal_Int32 nPage; // page #
sal_uInt8* pData; // nPageSize characters sal_uInt8* pData; // nPageSize characters
short nData; // size of this page short nData; // size of this page
...@@ -97,7 +96,6 @@ public: ...@@ -97,7 +96,6 @@ public:
sal_Int32 GetPage() { return nPage; } sal_Int32 GetPage() { return nPage; }
void* GetData() { return pData; } void* GetData() { return pData; }
short GetSize() { return nData; } short GetSize() { return nData; }
void SetOwner( StgDirEntry* p ) { pOwner = p; }
// routines for accessing FAT pages // routines for accessing FAT pages
// Assume that the data is a FAT page and get/put FAT data. // Assume that the data is a FAT page and get/put FAT data.
sal_Int32 GetPage( short nOff ) sal_Int32 GetPage( short nOff )
......
...@@ -868,7 +868,6 @@ void* StgDataStrm::GetPtr( sal_Int32 Pos, sal_Bool bForce, sal_Bool bDirty ) ...@@ -868,7 +868,6 @@ void* StgDataStrm::GetPtr( sal_Int32 Pos, sal_Bool bForce, sal_Bool bDirty )
StgPage* pPg = rIo.Get( nPage, bForce ); StgPage* pPg = rIo.Get( nPage, bForce );
if (pPg && nOffset < pPg->GetSize()) if (pPg && nOffset < pPg->GetSize())
{ {
pPg->SetOwner( pEntry );
if( bDirty ) if( bDirty )
pPg->SetDirty(); pPg->SetDirty();
return ((sal_uInt8 *)pPg->GetData()) + nOffset; return ((sal_uInt8 *)pPg->GetData()) + nOffset;
...@@ -905,7 +904,6 @@ sal_Int32 StgDataStrm::Read( void* pBuf, sal_Int32 n ) ...@@ -905,7 +904,6 @@ sal_Int32 StgDataStrm::Read( void* pBuf, sal_Int32 n )
if( pPg ) if( pPg )
{ {
// data is present, so use the cached data // data is present, so use the cached data
pPg->SetOwner( pEntry );
memcpy( p, pPg->GetData(), nBytes ); memcpy( p, pPg->GetData(), nBytes );
nRes = nBytes; nRes = nBytes;
} }
...@@ -919,7 +917,6 @@ sal_Int32 StgDataStrm::Read( void* pBuf, sal_Int32 n ) ...@@ -919,7 +917,6 @@ sal_Int32 StgDataStrm::Read( void* pBuf, sal_Int32 n )
pPg = rIo.Get( nPage, sal_False ); pPg = rIo.Get( nPage, sal_False );
if( !pPg ) if( !pPg )
break; break;
pPg->SetOwner( pEntry );
memcpy( p, (sal_uInt8*)pPg->GetData() + nOffset, nBytes ); memcpy( p, (sal_uInt8*)pPg->GetData() + nOffset, nBytes );
nRes = nBytes; nRes = nBytes;
} }
...@@ -966,7 +963,6 @@ sal_Int32 StgDataStrm::Write( const void* pBuf, sal_Int32 n ) ...@@ -966,7 +963,6 @@ sal_Int32 StgDataStrm::Write( const void* pBuf, sal_Int32 n )
if( pPg ) if( pPg )
{ {
// data is present, so use the cached data // data is present, so use the cached data
pPg->SetOwner( pEntry );
memcpy( pPg->GetData(), p, nBytes ); memcpy( pPg->GetData(), p, nBytes );
pPg->SetDirty(); pPg->SetDirty();
nRes = nBytes; nRes = nBytes;
...@@ -981,7 +977,6 @@ sal_Int32 StgDataStrm::Write( const void* pBuf, sal_Int32 n ) ...@@ -981,7 +977,6 @@ sal_Int32 StgDataStrm::Write( const void* pBuf, sal_Int32 n )
pPg = rIo.Get( nPage, sal_False ); pPg = rIo.Get( nPage, sal_False );
if( !pPg ) if( !pPg )
break; break;
pPg->SetOwner( pEntry );
memcpy( (sal_uInt8*)pPg->GetData() + nOffset, p, nBytes ); memcpy( (sal_uInt8*)pPg->GetData() + nOffset, p, nBytes );
pPg->SetDirty(); pPg->SetDirty();
nRes = nBytes; nRes = nBytes;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment