summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/XPropertyTable.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/unodraw/XPropertyTable.cxx')
-rw-r--r--svx/source/unodraw/XPropertyTable.cxx27
1 files changed, 6 insertions, 21 deletions
diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx
index 8f4a9e5ad54b..297c619916c6 100644
--- a/svx/source/unodraw/XPropertyTable.cxx
+++ b/svx/source/unodraw/XPropertyTable.cxx
@@ -50,15 +50,13 @@ using namespace ::vos;
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();
@@ -84,13 +82,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 )
{
}
@@ -100,9 +93,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;
@@ -131,7 +122,7 @@ void SAL_CALL SvxUnoXPropertyTable::insertByName( const OUString& aName, const
{
OGuard aGuard( Application::GetSolarMutex() );
- if( NULL == mpList && NULL == mpTable )
+ if( NULL == mpList )
throw lang::IllegalArgumentException();
if( hasByName( aName ) )
@@ -146,8 +137,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 )
@@ -168,8 +157,6 @@ void SAL_CALL SvxUnoXPropertyTable::removeByName( const OUString& Name )
{
if( mpList )
delete mpList->Remove( i, 0 );
- else
- delete mpTable->Remove( i, 0 );
return;
}
}
@@ -200,8 +187,6 @@ void SAL_CALL SvxUnoXPropertyTable::replaceByName( const OUString& aName, const
if( mpList )
delete mpList->Replace( pNewEntry, i );
- else
- delete mpTable->Replace( i, pNewEntry );
return;
}
}
@@ -291,7 +276,7 @@ sal_Bool SAL_CALL SvxUnoXPropertyTable::hasElements( )
class SvxUnoXColorTable : public SvxUnoXPropertyTable
{
public:
- SvxUnoXColorTable( XPropertyTable* pTable ) throw() : SvxUnoXPropertyTable( XATTR_LINECOLOR, pTable ) {};
+ SvxUnoXColorTable( XPropertyList* pTable ) throw() : SvxUnoXPropertyTable( XATTR_LINECOLOR, pTable ) {};
// SvxUnoXPropertyTable
virtual uno::Any getAny( const XPropertyEntry* pEntry ) const throw();
@@ -305,7 +290,7 @@ public:
virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw( uno::RuntimeException);
};
-uno::Reference< uno::XInterface > SAL_CALL SvxUnoXColorTable_createInstance( XPropertyTable* pTable ) throw()
+uno::Reference< uno::XInterface > SAL_CALL SvxUnoXColorTable_createInstance( XPropertyList* pTable ) throw()
{
return (OWeakObject*) new SvxUnoXColorTable( pTable );
}