diff options
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/inc/editeng/unofield.hxx | 3 | ||||
-rw-r--r-- | editeng/source/uno/unofield.cxx | 20 |
2 files changed, 21 insertions, 2 deletions
diff --git a/editeng/inc/editeng/unofield.hxx b/editeng/inc/editeng/unofield.hxx index 39cf2e6fae10..bbd2a1e02eb1 100644 --- a/editeng/inc/editeng/unofield.hxx +++ b/editeng/inc/editeng/unofield.hxx @@ -74,7 +74,8 @@ public: SvxFieldData* CreateFieldData() const throw(); void SetAnchor( ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xAnchor ) { mxAnchor = xAnchor; } - UNO3_GETIMPLEMENTATION_DECL( SvxUnoTextField ) + static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw(); + virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::uno::XInterface virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index 4f4bb6978231..b0a51eb63c98 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -253,7 +253,25 @@ inline Time setTime( util::DateTime& rDate ) // ==================================================================== // class SvxUnoTextField // ==================================================================== -UNO3_GETIMPLEMENTATION_IMPL( SvxUnoTextField ); +namespace +{ + class theSvxUnoTextFieldUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSvxUnoTextFieldUnoTunnelId> {}; +} + +const ::com::sun::star::uno::Sequence< sal_Int8 > & SvxUnoTextField::getUnoTunnelId() throw() +{ + return theSvxUnoTextFieldUnoTunnelId::get().getSeq(); +} + +sal_Int64 SAL_CALL SvxUnoTextField::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException) +{ + if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), + rId.getConstArray(), 16 ) ) + { + return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); + } + return 0; +} SvxUnoTextField::SvxUnoTextField( sal_Int32 nServiceId ) throw() : OComponentHelper( getMutex() ) |