[Libreoffice-commits] .: svx/inc svx/source unusedcode.easy

Joseph Powers jpowers at kemper.freedesktop.org
Mon Aug 29 20:35:35 PDT 2011


 svx/inc/svx/xtable.hxx        |   56 ----------
 svx/source/xoutdev/xtable.cxx |  222 ------------------------------------------
 unusedcode.easy               |    2 
 3 files changed, 280 deletions(-)

New commits:
commit 382ac86a3ab9ba105aa3e469566b7cd86c6ca39f
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Mon Aug 29 07:48:25 2011 -0700

    Remove the now obsolete XPropertyTable class
    
    XColorTable was the last class using this code and it's now based on
    XPropertyList instead.

diff --git a/svx/inc/svx/xtable.hxx b/svx/inc/svx/xtable.hxx
index 2630634..8635bff 100644
--- a/svx/inc/svx/xtable.hxx
+++ b/svx/inc/svx/xtable.hxx
@@ -186,62 +186,6 @@ public:
     XOBitmap& GetXBitmap()                    { return aXOBitmap; }
 };
 
-// ---------------------
-// class XPropertyTable
-// ---------------------
-
-class SVX_DLLPUBLIC XPropertyTable
-{
-protected:
-    String              aName; // nicht persistent !
-    String              aPath;
-    XOutdevItemPool*    pXPool;
-
-    Table               aTable;
-    Table*              pBmpTable;
-
-    sal_Bool            bTableDirty;
-    sal_Bool            bBitmapsDirty;
-    sal_Bool            bOwnPool;
-
-                        XPropertyTable(
-                            const String& rPath,
-                            XOutdevItemPool* pXPool = NULL,
-                            sal_uInt16 nInitSize = 16,
-                            sal_uInt16 nReSize = 16
-                        );
-    void                Clear();
-
-public:
-    virtual             ~XPropertyTable();
-
-    long                Count() const;
-
-    sal_Bool            Insert(long nIndex, XPropertyEntry* pEntry);
-    XPropertyEntry*     Replace(long nIndex, XPropertyEntry* pEntry);
-    XPropertyEntry*     Remove(long nIndex);
-
-                        // Note: Get(long) & Get( String& ) are ambiguous
-    XPropertyEntry*     Get( long nIndex, sal_uInt16 nDummy ) const;
-    long                Get(const String& rName);
-
-    Bitmap*             GetBitmap( long nIndex ) const;
-
-    const String&       GetName() const { return aName; }
-    void                SetName( const String& rString );
-    const String&       GetPath() const { return aPath; }
-    void                SetPath( const String& rString ) { aPath = rString; }
-    sal_Bool            IsDirty() const { return bTableDirty && bBitmapsDirty; }
-    void                SetDirty( sal_Bool bDirty = sal_True )
-                            { bTableDirty = bDirty; bBitmapsDirty = bDirty; }
-
-    virtual sal_Bool    Load() = 0;
-    virtual sal_Bool    Save() = 0;
-    virtual sal_Bool    Create() = 0;
-    virtual sal_Bool    CreateBitmapsForUI() = 0;
-    virtual Bitmap*     CreateBitmapForUI( long nIndex, sal_Bool bDelete = sal_True ) = 0;
-};
-
 // --------------------
 // class XPropertyList
 // --------------------
diff --git a/svx/source/xoutdev/xtable.cxx b/svx/source/xoutdev/xtable.cxx
index b34cf77..a563043 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
 // --------------------
diff --git a/unusedcode.easy b/unusedcode.easy
index 691fec3..cd3d6ad 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1622,8 +1622,6 @@ XMLTextParagraphExport::FindTextStyle(com::sun::star::uno::Reference<com::sun::s
 XMLTextParagraphExport::GetHeadingLevel(rtl::OUString const&)
 XMLVisAreaContext::XMLVisAreaContext(SvXMLImport&, unsigned short, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList> const&, Rectangle&, MapUnit)
 XPropertyList::Clear()
-XPropertyTable::Clear()
-XPropertyTable::GetBitmap(long) const
 XSecController::collectToSign(int, rtl::OUString const&)
 XSecController::getErrorMessage()
 XSecController::setSAXChainConnector(com::sun::star::uno::Reference<com::sun::star::xml::sax::XParser> const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler> const&, com::sun::star::uno::Reference<com::sun::star::xml::crypto::sax::XElementStackKeeper> const&)


More information about the Libreoffice-commits mailing list