diff options
-rw-r--r-- | svx/source/unodraw/XPropertyTable.cxx | 23 |
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; } } |