diff options
Diffstat (limited to 'toolkit/source/controls')
-rw-r--r-- | toolkit/source/controls/grid/gridcolumn.cxx | 3 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrolmodel.cxx | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx index 5b52b183daf4..5cada204bc77 100644 --- a/toolkit/source/controls/grid/gridcolumn.cxx +++ b/toolkit/source/controls/grid/gridcolumn.cxx @@ -21,6 +21,7 @@ #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <comphelper/servicehelper.hxx> #include <cppuhelper/supportsservice.hxx> #include <cppuhelper/typeprovider.hxx> @@ -285,7 +286,7 @@ namespace toolkit sal_Int64 SAL_CALL GridColumn::getSomething( const Sequence< sal_Int8 >& i_identifier ) { - if ( ( i_identifier.getLength() == 16 ) && ( i_identifier == getUnoTunnelId() ) ) + if ( isUnoTunnelId<GridColumn>(i_identifier) ) return ::sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this ) ); return 0; } diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index 8b9b09fe489f..b81f7ae49d83 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -433,14 +433,14 @@ namespace class theUnoControlModelUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theUnoControlModelUnoTunnelId> {}; } -const css::uno::Sequence< sal_Int8 >& UnoControlModel::GetUnoTunnelId() throw() +const css::uno::Sequence< sal_Int8 >& UnoControlModel::getUnoTunnelId() throw() { return theUnoControlModelUnoTunnelId::get().getSeq(); } sal_Int64 UnoControlModel::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) { - if( ( rIdentifier.getLength() == 16 ) && ( memcmp( UnoControlModel::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) == 0 ) ) + if( isUnoTunnelId<UnoControlModel>(rIdentifier) ) return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_IntPtr >(this)); return 0; |