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

Joseph Powers jpowers at kemper.freedesktop.org
Wed Aug 24 13:57:18 PDT 2011


 svx/inc/svx/svdmodel.hxx        |    1 
 svx/inc/svx/xattr.hxx           |    1 
 svx/inc/svx/xbtmpit.hxx         |    2 
 svx/inc/svx/xit.hxx             |    1 
 svx/inc/svx/xtable.hxx          |   29 --------------
 svx/source/xoutdev/xattrbmp.cxx |   17 +++++---
 svx/source/xoutdev/xtabbtmp.cxx |   82 ----------------------------------------
 unusedcode.easy                 |    3 -
 8 files changed, 13 insertions(+), 123 deletions(-)

New commits:
commit 9b77483aab92e9bc6b57f563cccb170af8c193a7
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Wed Aug 24 07:16:54 2011 -0700

    Remove class XBitmapTable

diff --git a/svx/inc/svx/svdmodel.hxx b/svx/inc/svx/svdmodel.hxx
index 751b645..01e2bd8 100644
--- a/svx/inc/svx/svdmodel.hxx
+++ b/svx/inc/svx/svdmodel.hxx
@@ -79,7 +79,6 @@ class SfxStyleSheet;
 class SfxUndoAction;
 class SfxUndoManager;
 class XBitmapList;
-class XBitmapTable;
 class XColorTable;
 class XDashList;
 class XGradientList;
diff --git a/svx/inc/svx/xattr.hxx b/svx/inc/svx/xattr.hxx
index 29b8fc0..598bf49 100644
--- a/svx/inc/svx/xattr.hxx
+++ b/svx/inc/svx/xattr.hxx
@@ -31,7 +31,6 @@
 class XColorTable;
 class XLineEndTable;
 class XHatchTable;
-class XBitmapTable;
 
 #include <svx/xit.hxx>
 #include <svx/xcolit.hxx>
diff --git a/svx/inc/svx/xbtmpit.hxx b/svx/inc/svx/xbtmpit.hxx
index ec0925f..8dc6f98 100644
--- a/svx/inc/svx/xbtmpit.hxx
+++ b/svx/inc/svx/xbtmpit.hxx
@@ -67,7 +67,7 @@ public:
                                     SfxMapUnit ePresMetric,
                                     String &rText, const IntlWrapper * = 0 ) const;
 
-    const XOBitmap& GetBitmapValue( const XBitmapTable* pTable = 0 ) const; // GetValue -> GetBitmapValue
+    const XOBitmap& GetBitmapValue() const; // GetValue -> GetBitmapValue
     void  SetBitmapValue( const XOBitmap& rNew )  { aXOBitmap = rNew; Detach(); } // SetValue -> SetBitmapValue
 
     static sal_Bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 );
diff --git a/svx/inc/svx/xit.hxx b/svx/inc/svx/xit.hxx
index 3cc404e..4d2f8e0 100644
--- a/svx/inc/svx/xit.hxx
+++ b/svx/inc/svx/xit.hxx
@@ -38,7 +38,6 @@
 class XColorTable;
 class XLineEndTable;
 class XHatchTable;
-class XBitmapTable;
 class SfxItemPool;
 class NameOrIndex;
 class XPropertyList;
diff --git a/svx/inc/svx/xtable.hxx b/svx/inc/svx/xtable.hxx
index a19de5c..d465dee 100644
--- a/svx/inc/svx/xtable.hxx
+++ b/svx/inc/svx/xtable.hxx
@@ -519,35 +519,6 @@ public:
     virtual Bitmap*     CreateBitmapForUI(long nIndex, sal_Bool bDelete = sal_True);
 };
 
-// ---------------------
-// class XBitmapTable
-// ---------------------
-
-class XBitmapTable : public XPropertyTable
-{
-public:
-    explicit        XBitmapTable(
-                        const String& rPath,
-                        XOutdevItemPool* pXPool = NULL,
-                        sal_uInt16 nInitSize = 16,
-                        sal_uInt16 nReSize = 16
-                    );
-    virtual         ~XBitmapTable();
-
-    using XPropertyTable::Replace;
-    XBitmapEntry*   Replace(long nIndex, XBitmapEntry* pEntry );
-    using XPropertyTable::Remove;
-    XBitmapEntry*   Remove(long nIndex);
-    using XPropertyTable::Get;
-    XBitmapEntry*   GetBitmap(long nIndex) const;
-
-    virtual sal_Bool    Load();
-    virtual sal_Bool    Save();
-    virtual sal_Bool    Create();
-    virtual sal_Bool    CreateBitmapsForUI();
-    virtual Bitmap*     CreateBitmapForUI( long nIndex, sal_Bool bDelete = sal_True );
-};
-
 // -------------------
 // class XBitmapList
 // -------------------
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index af4a403..9b37584 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -582,12 +582,19 @@ SvStream& XFillBitmapItem::Store( SvStream& rOut, sal_uInt16 nItemVersion ) cons
 |*
 *************************************************************************/
 
-const XOBitmap& XFillBitmapItem::GetBitmapValue(const XBitmapTable* pTable) const // GetValue -> GetBitmapValue
+const XOBitmap& XFillBitmapItem::GetBitmapValue(
+//    const XBitmapTable* pTable
+) const // GetValue -> GetBitmapValue
 {
-    if (!IsIndex())
-        return aXOBitmap;
-    else
-        return pTable->GetBitmap(GetIndex())->GetXBitmap();
+// Note: we never pass pTable to this method which means that it's NULL. Thus, this code would
+// fail if the Item was a list. I'm guessing that it can't be an Index or the caller makes sure
+// it's not an Index before calling. Either way, I'm just going to return the Bitmap to keep it
+// from failing. This could use some more research. (Joe P. 2011-08-24)
+//    if (!IsIndex())
+//        return aXOBitmap;
+//    else
+//        return pTable->GetBitmap(GetIndex())->GetXBitmap();
+    return aXOBitmap;
 }
 
 
diff --git a/svx/source/xoutdev/xtabbtmp.cxx b/svx/source/xoutdev/xtabbtmp.cxx
index fab3c2f..320f4fd 100644
--- a/svx/source/xoutdev/xtabbtmp.cxx
+++ b/svx/source/xoutdev/xtabbtmp.cxx
@@ -58,88 +58,6 @@ static char const aChckBitmap0[] = { 0x04, 0x00, 'S','O','B','0'};  // old
 static char const aChckBitmap1[] = { 0x04, 0x00, 'S','O','B','1'};  // = 5.2
 static char const aChckXML[]     = { 'P', 'K', 0x03, 0x04 };        // = 6.0
 
-// -------------------
-// class XBitmapTable
-// -------------------
-
-/*************************************************************************
-|*
-|* XBitmapTable::XBitmapTable()
-|*
-*************************************************************************/
-
-XBitmapTable::XBitmapTable(
-    const String& rPath,
-    XOutdevItemPool* pInPool,
-    sal_uInt16 nInitSize,
-    sal_uInt16 nReSize
-) : XPropertyTable( rPath, pInPool, nInitSize, nReSize )
-{
-    pBmpTable = new Table( nInitSize, nReSize );
-}
-
-/************************************************************************/
-
-XBitmapTable::~XBitmapTable()
-{
-}
-
-/************************************************************************/
-
-XBitmapEntry* XBitmapTable::Replace(long nIndex, XBitmapEntry* pEntry )
-{
-    return (XBitmapEntry*) XPropertyTable::Replace(nIndex, pEntry);
-}
-
-/************************************************************************/
-
-XBitmapEntry* XBitmapTable::Remove(long nIndex)
-{
-    return (XBitmapEntry*) XPropertyTable::Remove(nIndex);
-}
-
-/************************************************************************/
-
-XBitmapEntry* XBitmapTable::GetBitmap(long nIndex) const
-{
-    return (XBitmapEntry*) XPropertyTable::Get(nIndex, 0);
-}
-
-/************************************************************************/
-
-sal_Bool XBitmapTable::Load()
-{
-    return( sal_False );
-}
-
-/************************************************************************/
-
-sal_Bool XBitmapTable::Save()
-{
-    return( sal_False );
-}
-
-/************************************************************************/
-
-sal_Bool XBitmapTable::Create()
-{
-    return( sal_False );
-}
-
-/************************************************************************/
-
-sal_Bool XBitmapTable::CreateBitmapsForUI()
-{
-    return( sal_False );
-}
-
-/************************************************************************/
-
-Bitmap* XBitmapTable::CreateBitmapForUI( long /*nIndex*/, sal_Bool /*bDelete*/)
-{
-    return( NULL );
-}
-
 // ------------------
 // class XBitmapList
 // ------------------
diff --git a/unusedcode.easy b/unusedcode.easy
index 28d716a..0935a2f 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1651,9 +1651,6 @@ WrongRanges::_ForEach(unsigned short, unsigned short, unsigned char (*)(WrongRan
 X11SalGraphics::SetMask(int&, int&, unsigned int&, unsigned int&, int&, int&, unsigned long)
 X509Certificate_NssImpl::getImplementation(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>)
 XBitmapList::Replace(XBitmapEntry*, long)
-XBitmapTable::Remove(long)
-XBitmapTable::Replace(long, XBitmapEntry*)
-XBitmapTable::XBitmapTable(String const&, XOutdevItemPool*, unsigned short, unsigned short)
 XFBookmarkRef::XFBookmarkRef()
 XFCell::SetCurrency(rtl::OUString)
 XFCell::SetDate(rtl::OUString)


More information about the Libreoffice-commits mailing list