diff options
author | Joseph Powers <jpowers27@cox.net> | 2011-08-29 07:48:25 -0700 |
---|---|---|
committer | Joseph Powers <jpowers27@cox.net> | 2011-08-29 20:27:24 -0700 |
commit | 382ac86a3ab9ba105aa3e469566b7cd86c6ca39f (patch) | |
tree | a7c56e228d81363cd6f0984f81ec04f6fa17f969 /svx/source | |
parent | 9914f6402909edbe5ce461307f4d26bcd864eacc (diff) |
Remove the now obsolete XPropertyTable class
XColorTable was the last class using this code and it's now based on
XPropertyList instead.
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/xoutdev/xtable.cxx | 222 |
1 files changed, 0 insertions, 222 deletions
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx index b34cf777edb5..a5630433b050 100644 --- a/svx/source/xoutdev/xtable.cxx +++ b/svx/source/xoutdev/xtable.cxx @@ -46,228 +46,6 @@ Color RGB_Color( ColorData nColorName ) return aRGBColor; } -// --------------------- -// class XPropertyTable -// --------------------- - -/************************************************************************* -|* -|* XPropertyTable::XPropertyTable() -|* -*************************************************************************/ - -XPropertyTable::XPropertyTable( - const String& rPath, - XOutdevItemPool* pInPool, - sal_uInt16 nInitSize, - sal_uInt16 nReSize -) : aName ( pszStandard, 8 ) - , aPath ( rPath ) - , pXPool ( pInPool ) - , aTable ( nInitSize, nReSize ) - , pBmpTable ( NULL ) - , bTableDirty ( sal_True ) - , bBitmapsDirty ( sal_True ) - , bOwnPool ( sal_False ) -{ - if( !pXPool ) - { - bOwnPool = sal_True; - pXPool = new XOutdevItemPool; - DBG_ASSERT( pXPool, "XOutPool konnte nicht erzeugt werden!" ); - } -} - -/************************************************************************* -|* -|* XPropertyTable::~XPropertyTable() -|* -*************************************************************************/ - -XPropertyTable::~XPropertyTable() -{ - XPropertyEntry* pEntry = (XPropertyEntry*)aTable.First(); - Bitmap* pBitmap = NULL; - for (sal_uIntPtr nIndex = 0; nIndex < aTable.Count(); nIndex++) - { - delete pEntry; - pEntry = (XPropertyEntry*)aTable.Next(); - } - // Hier wird die Bitmaptabelle geloescht - if( pBmpTable ) - { - pBitmap = (Bitmap*) pBmpTable->First(); - - for( sal_uIntPtr nIndex = 0; nIndex < pBmpTable->Count(); nIndex++ ) - { - delete pBitmap; - pBitmap = (Bitmap*) pBmpTable->Next(); - } - delete pBmpTable; - pBmpTable = NULL; - } - // Eigener Pool wird geloescht - if( bOwnPool && pXPool ) - { - SfxItemPool::Free(pXPool); - } -} - -/************************************************************************* -|* -|* XPropertyTable::Clear() -|* -*************************************************************************/ - -void XPropertyTable::Clear() -{ - aTable.Clear(); - if( pBmpTable ) - pBmpTable->Clear(); -} - -/************************************************************************/ - -long XPropertyTable::Count() const -{ - if( bTableDirty ) - { - // ( (XPropertyTable*) this )->bTableDirty = sal_False; <- im Load() - if( !( (XPropertyTable*) this )->Load() ) - ( (XPropertyTable*) this )->Create(); - } - return( aTable.Count() ); -} - -/************************************************************************* -|* -|* XPropertyEntry* XPropertyTable::Get() -|* -*************************************************************************/ - -XPropertyEntry* XPropertyTable::Get( long nIndex, sal_uInt16 /*nDummy*/) const -{ - if( bTableDirty ) - { - // ( (XPropertyTable*) this )->bTableDirty = sal_False; <- im Load() - if( !( (XPropertyTable*) this )->Load() ) - ( (XPropertyTable*) this )->Create(); - } - return (XPropertyEntry*) aTable.GetObject( (sal_uIntPtr) nIndex ); -} - -/************************************************************************* -|* -|* long XPropertyTable::Get(const String& rName) -|* -*************************************************************************/ - -long XPropertyTable::Get(const XubString& rName) -{ - if( bTableDirty ) - { - // bTableDirty = sal_False; - if( !Load() ) - Create(); - } - long nPos = 0; - XPropertyEntry* pEntry = (XPropertyEntry*)aTable.First(); - while (pEntry && pEntry->GetName() != rName) - { - nPos++; - pEntry = (XPropertyEntry*)aTable.Next(); - } - if (!pEntry) nPos = -1; - return nPos; -} - -/************************************************************************* -|* -|* Bitmap* XPropertyTable::GetBitmap() -|* -*************************************************************************/ - -Bitmap* XPropertyTable::GetBitmap( long nIndex ) const -{ - if( pBmpTable ) - { - if( bBitmapsDirty ) - { - ( (XPropertyTable*) this )->bBitmapsDirty = sal_False; - ( (XPropertyTable*) this )->CreateBitmapsForUI(); - } - - if( pBmpTable->Count() >= (sal_uIntPtr) nIndex ) - return (Bitmap*) pBmpTable->GetObject( (sal_uIntPtr) nIndex ); - } - return( NULL ); -} - -/************************************************************************* -|* -|* void XPropertyTable::Insert() -|* -*************************************************************************/ - -sal_Bool XPropertyTable::Insert( long nIndex, XPropertyEntry* pEntry ) -{ - sal_Bool bReturn = aTable.Insert( (sal_uIntPtr) nIndex, pEntry ); - - if( pBmpTable && !bBitmapsDirty ) - { - Bitmap* pBmp = CreateBitmapForUI( (sal_uIntPtr) nIndex ); - pBmpTable->Insert( (sal_uIntPtr) nIndex, pBmp ); - } - return bReturn; -} - -/************************************************************************* -|* -|* void XPropertyTable::Replace() -|* -*************************************************************************/ - -XPropertyEntry* XPropertyTable::Replace( long nIndex, XPropertyEntry* pEntry ) -{ - XPropertyEntry* pOldEntry = (XPropertyEntry*) aTable.Replace( (sal_uIntPtr) nIndex, pEntry ); - - if( pBmpTable && !bBitmapsDirty ) - { - Bitmap* pBmp = CreateBitmapForUI( (sal_uIntPtr) nIndex ); - Bitmap* pOldBmp = (Bitmap*) pBmpTable->Replace( (sal_uIntPtr) nIndex, pBmp ); - if( pOldBmp ) - delete pOldBmp; - } - return pOldEntry; -} - -/************************************************************************* -|* -|* void XPropertyTable::Remove() -|* -*************************************************************************/ - -XPropertyEntry* XPropertyTable::Remove( long nIndex ) -{ - if( pBmpTable && !bBitmapsDirty ) - { - Bitmap* pOldBmp = (Bitmap*) pBmpTable->Remove( (sal_uIntPtr) nIndex ); - if( pOldBmp ) - delete pOldBmp; - } - return (XPropertyEntry*) aTable.Remove((sal_uIntPtr)nIndex); -} - -/************************************************************************/ - -void XPropertyTable::SetName( const String& rString ) -{ - if(rString.Len()) - { - aName = rString; - } -} - // -------------------- // class XPropertyList // -------------------- |