Kaydet (Commit) 10938788 authored tarafından Joseph Powers's avatar Joseph Powers

Fix my bug: XColorTable is based on XPropertyList not XPropertyTable

I should have changed this in the "rebase patch".
üst c142263e
...@@ -147,7 +147,7 @@ void SAL_CALL SvxUnoColorTable::insertByName( const OUString& aName, const uno:: ...@@ -147,7 +147,7 @@ void SAL_CALL SvxUnoColorTable::insertByName( const OUString& aName, const uno::
void SAL_CALL SvxUnoColorTable::removeByName( const OUString& Name ) void SAL_CALL SvxUnoColorTable::removeByName( const OUString& Name )
throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{ {
long nIndex = pTable ? ((XPropertyTable*)pTable)->Get( Name ) : -1; long nIndex = pTable ? ((XPropertyList*)pTable)->Get( Name ) : -1;
if( nIndex == -1 ) if( nIndex == -1 )
throw container::NoSuchElementException(); throw container::NoSuchElementException();
...@@ -162,7 +162,7 @@ void SAL_CALL SvxUnoColorTable::replaceByName( const OUString& aName, const uno: ...@@ -162,7 +162,7 @@ void SAL_CALL SvxUnoColorTable::replaceByName( const OUString& aName, const uno:
if( !(aElement >>= nColor) ) if( !(aElement >>= nColor) )
throw lang::IllegalArgumentException(); throw lang::IllegalArgumentException();
long nIndex = pTable ? ((XPropertyTable*)pTable)->Get( aName ) : -1; long nIndex = pTable ? ((XPropertyList*)pTable)->Get( aName ) : -1;
if( nIndex == -1 ) if( nIndex == -1 )
throw container::NoSuchElementException(); throw container::NoSuchElementException();
...@@ -174,7 +174,7 @@ void SAL_CALL SvxUnoColorTable::replaceByName( const OUString& aName, const uno: ...@@ -174,7 +174,7 @@ void SAL_CALL SvxUnoColorTable::replaceByName( const OUString& aName, const uno:
uno::Any SAL_CALL SvxUnoColorTable::getByName( const OUString& aName ) uno::Any SAL_CALL SvxUnoColorTable::getByName( const OUString& aName )
throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException) throw( container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException)
{ {
long nIndex = pTable ? ((XPropertyTable*)pTable)->Get( aName ) : -1; long nIndex = pTable ? ((XPropertyList*)pTable)->Get( aName ) : -1;
if( nIndex == -1 ) if( nIndex == -1 )
throw container::NoSuchElementException(); throw container::NoSuchElementException();
...@@ -202,7 +202,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoColorTable::getElementNames( ) ...@@ -202,7 +202,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoColorTable::getElementNames( )
sal_Bool SAL_CALL SvxUnoColorTable::hasByName( const OUString& aName ) sal_Bool SAL_CALL SvxUnoColorTable::hasByName( const OUString& aName )
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{ {
long nIndex = pTable ? ((XPropertyTable*)pTable)->Get( aName ) : -1; long nIndex = pTable ? ((XPropertyList*)pTable)->Get( aName ) : -1;
return nIndex != -1; return nIndex != -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment