summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/XPropertyTable.cxx
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2011-08-29 07:04:18 -0700
committerJoseph Powers <jpowers27@cox.net>2011-08-29 07:18:46 -0700
commit79fee152187615ce4735883ab5d5347e34de4e60 (patch)
tree60fbf9ebff39bf39474b8717eadb370bc707bfd6 /svx/source/unodraw/XPropertyTable.cxx
parent10938788cee4387b2c8ada8b127142c8eef754b3 (diff)
class SvxUnoXPropertyTable no longer needs to support class XProprtyTable
It was supporting both XPropertyTable & XPropertyLis. XColorTable is now based on XPropertyList and it was the only on that was based on the Table class. TODO: we might be able to remove some of the "if(mpList)" statements; this needs more research.
Diffstat (limited to 'svx/source/unodraw/XPropertyTable.cxx')
-rw-r--r--svx/source/unodraw/XPropertyTable.cxx23
1 files changed, 4 insertions, 19 deletions
diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx
index fc152e7a3725..5e5f9810ed8c 100644
--- a/svx/source/unodraw/XPropertyTable.cxx
+++ b/svx/source/unodraw/XPropertyTable.cxx
@@ -54,15 +54,13 @@ using namespace ::rtl;
class SvxUnoXPropertyTable : public WeakImplHelper2< container::XNameContainer, lang::XServiceInfo >
{
private:
- XPropertyTable* mpTable;
XPropertyList* mpList;
sal_Int16 mnWhich;
- long getCount() const { return mpList ? mpList->Count() : (mpTable?mpTable->Count():0); }
+ long getCount() const { return mpList ? mpList->Count() : 0; }
XPropertyEntry* get( long index ) const;
public:
SvxUnoXPropertyTable( sal_Int16 nWhich, XPropertyList* pList ) throw();
- SvxUnoXPropertyTable( sal_Int16 nWhich, XPropertyTable* pTable ) throw();
virtual ~SvxUnoXPropertyTable() throw();
@@ -88,13 +86,8 @@ public:
virtual sal_Bool SAL_CALL hasElements( ) throw( uno::RuntimeException);
};
-SvxUnoXPropertyTable::SvxUnoXPropertyTable( sal_Int16 nWhich, XPropertyTable* pTable ) throw()
-: mpTable( pTable ), mpList( NULL ), mnWhich( nWhich )
-{
-}
-
SvxUnoXPropertyTable::SvxUnoXPropertyTable( sal_Int16 nWhich, XPropertyList* pList ) throw()
-: mpTable( NULL ), mpList( pList ), mnWhich( nWhich )
+: mpList( pList ), mnWhich( nWhich )
{
}
@@ -104,9 +97,7 @@ SvxUnoXPropertyTable::~SvxUnoXPropertyTable() throw()
XPropertyEntry* SvxUnoXPropertyTable::get( long index ) const
{
- if( mpTable )
- return mpTable->Get( index, 0 );
- else if( mpList )
+ if( mpList )
return mpList->Get( index, 0 );
else
return NULL;
@@ -135,7 +126,7 @@ void SAL_CALL SvxUnoXPropertyTable::insertByName( const OUString& aName, const
{
SolarMutexGuard aGuard;
- if( NULL == mpList && NULL == mpTable )
+ if( NULL == mpList )
throw lang::IllegalArgumentException();
if( hasByName( aName ) )
@@ -150,8 +141,6 @@ void SAL_CALL SvxUnoXPropertyTable::insertByName( const OUString& aName, const
if( mpList )
mpList->Insert( pNewEntry );
- else
- mpTable->Insert( mpTable->Count(), pNewEntry );
}
void SAL_CALL SvxUnoXPropertyTable::removeByName( const OUString& Name )
@@ -172,8 +161,6 @@ void SAL_CALL SvxUnoXPropertyTable::removeByName( const OUString& Name )
{
if( mpList )
delete mpList->Remove( i );
- else
- delete mpTable->Remove( i );
return;
}
}
@@ -204,8 +191,6 @@ void SAL_CALL SvxUnoXPropertyTable::replaceByName( const OUString& aName, const
if( mpList )
delete mpList->Replace( pNewEntry, i );
- else
- delete mpTable->Replace( i, pNewEntry );
return;
}
}