diff options
Diffstat (limited to 'sw/source/uibase/uno')
-rw-r--r-- | sw/source/uibase/uno/unoatxt.cxx | 12 | ||||
-rw-r--r-- | sw/source/uibase/uno/unodispatch.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxvw.cxx | 10 |
4 files changed, 12 insertions, 22 deletions
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx index 4987717d9a25..1e3fe183463b 100644 --- a/sw/source/uibase/uno/unoatxt.cxx +++ b/sw/source/uibase/uno/unoatxt.cxx @@ -222,11 +222,9 @@ const uno::Sequence< sal_Int8 > & SwXAutoTextGroup::getUnoTunnelId() sal_Int64 SAL_CALL SwXAutoTextGroup::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if( rId.getLength() == 16 - && 0 == memcmp( getUnoTunnelId().getConstArray(), - rId.getConstArray(), 16 ) ) + if( isUnoTunnelId<SwXAutoTextGroup>(rId) ) { - return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); + return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); } return 0; } @@ -689,11 +687,9 @@ const uno::Sequence< sal_Int8 > & SwXAutoTextEntry::getUnoTunnelId() sal_Int64 SAL_CALL SwXAutoTextEntry::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if( rId.getLength() == 16 - && 0 == memcmp( getUnoTunnelId().getConstArray(), - rId.getConstArray(), 16 ) ) + if( isUnoTunnelId<SwXAutoTextEntry>(rId) ) { - return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); + return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); } return 0; } diff --git a/sw/source/uibase/uno/unodispatch.cxx b/sw/source/uibase/uno/unodispatch.cxx index 40353c7baba3..822b467d35ad 100644 --- a/sw/source/uibase/uno/unodispatch.cxx +++ b/sw/source/uibase/uno/unodispatch.cxx @@ -163,11 +163,9 @@ const uno::Sequence< sal_Int8 > & SwXDispatchProviderInterceptor::getUnoTunnelId sal_Int64 SwXDispatchProviderInterceptor::getSomething( const uno::Sequence< sal_Int8 >& aIdentifier ) { - if( aIdentifier.getLength() == 16 - && 0 == memcmp( getUnoTunnelId().getConstArray(), - aIdentifier.getConstArray(), 16 ) ) + if( isUnoTunnelId<SwXDispatchProviderInterceptor>(aIdentifier) ) { - return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); + return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); } return 0; } diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 3299a6f043e9..6dd0738d85d1 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -298,11 +298,9 @@ const Sequence< sal_Int8 > & SwXTextDocument::getUnoTunnelId() sal_Int64 SAL_CALL SwXTextDocument::getSomething( const Sequence< sal_Int8 >& rId ) { - if( rId.getLength() == 16 - && 0 == memcmp( getUnoTunnelId().getConstArray(), - rId.getConstArray(), 16 ) ) + if( isUnoTunnelId<SwXTextDocument>(rId) ) { - return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); + return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); } if( rId.getLength() == 16 && 0 == memcmp( SfxObjectShell::getUnoTunnelId().getConstArray(), diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index 9bc4abcfd985..dd04e6f53a5f 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -1680,12 +1680,10 @@ const uno::Sequence< sal_Int8 > & SwXTextViewCursor::getUnoTunnelId() sal_Int64 SAL_CALL SwXTextViewCursor::getSomething( const uno::Sequence< sal_Int8 >& rId ) { - if( rId.getLength() == 16 - && 0 == memcmp( getUnoTunnelId().getConstArray(), - rId.getConstArray(), 16 ) ) - { - return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); - } + if( isUnoTunnelId<SwXTextViewCursor>(rId) ) + { + return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); + } return OTextCursorHelper::getSomething(rId); } |