diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-09-06 00:50:24 +0300 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-09-06 11:55:50 +0200 |
commit | f599c31fe68882f510cf3d101102e71f9bf795c8 (patch) | |
tree | ced0a58620c5aea8420638847192f298d139297b /svtools | |
parent | 8811516e2e9e71dd45198081d26c748cdf4d831a (diff) |
tdf#39593 use isUnoTunnelId
Adapt getUnoTunnelId methods where required: rename or make public.
Change-Id: I0fd2120bf9f0ff1aa690329a65ff64a154c89315
Reviewed-on: https://gerrit.libreoffice.org/78680
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/valueacc.cxx | 8 | ||||
-rw-r--r-- | svtools/source/control/valueimp.hxx | 12 |
2 files changed, 8 insertions, 12 deletions
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 50ae750f068b..08838f343d1a 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -602,7 +602,7 @@ sal_Int64 SAL_CALL ValueSetAcc::getSomething( const uno::Sequence< sal_Int8 >& r { sal_Int64 nRet; - if( ( rId.getLength() == 16 ) && ( 0 == memcmp( ValueSetAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) + if( isUnoTunnelId<ValueSetAcc>(rId) ) nRet = reinterpret_cast< sal_Int64 >( this ); else nRet = 0; @@ -1056,7 +1056,7 @@ sal_Int64 SAL_CALL ValueItemAcc::getSomething( const uno::Sequence< sal_Int8 >& { sal_Int64 nRet; - if( ( rId.getLength() == 16 ) && ( 0 == memcmp( ValueItemAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) + if( isUnoTunnelId<ValueItemAcc>(rId) ) nRet = reinterpret_cast< sal_Int64 >( this ); else nRet = 0; @@ -1405,7 +1405,7 @@ sal_Int64 SAL_CALL SvtValueItemAcc::getSomething( const uno::Sequence< sal_Int8 { sal_Int64 nRet; - if( ( rId.getLength() == 16 ) && ( 0 == memcmp( SvtValueItemAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) + if( isUnoTunnelId<SvtValueItemAcc>(rId) ) nRet = reinterpret_cast< sal_Int64 >( this ); else nRet = 0; @@ -1929,7 +1929,7 @@ sal_Int64 SAL_CALL SvtValueSetAcc::getSomething( const uno::Sequence< sal_Int8 > { sal_Int64 nRet; - if( ( rId.getLength() == 16 ) && ( 0 == memcmp( SvtValueSetAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) + if( isUnoTunnelId<SvtValueSetAcc>(rId) ) nRet = reinterpret_cast< sal_Int64 >( this ); else nRet = 0; diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx index 635a7d0da624..840d92fda434 100644 --- a/svtools/source/control/valueimp.hxx +++ b/svtools/source/control/valueimp.hxx @@ -165,6 +165,7 @@ public: virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) override; // XUnoTunnel + static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId(); virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) override; private: @@ -174,8 +175,6 @@ private: /// The current FOCUSED state. bool mbIsFocused; - static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId(); - /** Tell all listeners that the object is dying. This callback is usually called from the WeakComponentImplHelper class. */ @@ -279,6 +278,7 @@ public: virtual void SAL_CALL deselectAccessibleChild( sal_Int32 nSelectedChildIndex ) override; // XUnoTunnel + static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId(); virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) override; private: @@ -288,8 +288,6 @@ private: /// The current FOCUSED state. bool mbIsFocused; - static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId(); - /** Tell all listeners that the object is dying. This callback is usually called from the WeakComponentImplHelper class. */ @@ -342,8 +340,6 @@ private: ValueSetItem* mpParent; bool const mbIsTransientChildrenDisabled; - static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId(); - public: ValueItemAcc( ValueSetItem* pParent, bool bIsTransientChildrenDisabled ); @@ -388,6 +384,7 @@ public: virtual sal_Int32 SAL_CALL getBackground( ) override; // XUnoTunnel + static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId(); virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) override; }; @@ -405,8 +402,6 @@ private: SvtValueSetItem* mpParent; bool const mbIsTransientChildrenDisabled; - static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId(); - public: SvtValueItemAcc(SvtValueSetItem* pParent, bool bIsTransientChildrenDisabled); @@ -451,6 +446,7 @@ public: virtual sal_Int32 SAL_CALL getBackground( ) override; // XUnoTunnel + static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId(); virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& rId ) override; }; |