diff options
Diffstat (limited to 'svx/source/table/cell.cxx')
-rw-r--r-- | svx/source/table/cell.cxx | 74 |
1 files changed, 73 insertions, 1 deletions
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 9ffbd38e7ac4..7878426e1fe8 100644 --- a/svx/source/table/cell.cxx +++ b/svx/source/table/cell.cxx @@ -297,7 +297,7 @@ rtl::Reference< Cell > Cell::create( SdrTableObj& rTableObj, OutlinerParaObject* Cell::Cell( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject ) throw() : SdrText( rTableObj, pOutlinerParaObject ) -, Cell_Base( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() ) +, SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() ) , mpPropSet( ImplGetSvxCellPropertySet() ) , mpProperties( new sdr::properties::CellProperties( rTableObj, this ) ) , mnCellContentType( CellContentType_EMPTY ) @@ -744,6 +744,78 @@ sdr::properties::TextProperties* Cell::CloneProperties( SdrObject& rNewObj, Cell } // ----------------------------------------------------------------------------- +// XInterface +// ----------------------------------------------------------------------------- + +Any SAL_CALL Cell::queryInterface( const Type & rType ) throw(RuntimeException) +{ + if( rType == XMergeableCell::static_type() ) + return Any( Reference< XMergeableCell >( this ) ); + + if( rType == XCell::static_type() ) + return Any( Reference< XCell >( this ) ); + + if( rType == XLayoutConstrains::static_type() ) + return Any( Reference< XLayoutConstrains >( this ) ); + + if( rType == XEventListener::static_type() ) + return Any( Reference< XEventListener >( this ) ); + + Any aRet( SvxUnoTextBase::queryAggregation( rType ) ); + if( aRet.hasValue() ) + return aRet; + + return ::cppu::OWeakObject::queryInterface( rType ); +} + +// ----------------------------------------------------------------------------- + +void SAL_CALL Cell::acquire() throw () +{ + ::cppu::OWeakObject::acquire(); +} + +// ----------------------------------------------------------------------------- + +void SAL_CALL Cell::release() throw () +{ + ::cppu::OWeakObject::release(); +} + +// ----------------------------------------------------------------------------- +// XTypeProvider +// ----------------------------------------------------------------------------- + +Sequence< Type > SAL_CALL Cell::getTypes( ) throw (RuntimeException) +{ + Sequence< Type > aTypes( SvxUnoTextBase::getTypes() ); + + sal_Int32 nLen = aTypes.getLength(); + aTypes.realloc(nLen + 2); + aTypes[nLen++] = XMergeableCell::static_type(); + aTypes[nLen++] = XLayoutConstrains::static_type(); + + return aTypes; +} + +// ----------------------------------------------------------------------------- + +Sequence< sal_Int8 > SAL_CALL Cell::getImplementationId( ) throw (RuntimeException) +{ + static ::cppu::OImplementationId* pId = 0; + if (! pId) + { + ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); + if (! pId) + { + static ::cppu::OImplementationId aId; + pId = &aId; + } + } + return pId->getImplementationId(); +} + +// ----------------------------------------------------------------------------- // XServiceInfo // ----------------------------------------------------------------------------- |