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 /dbaccess/source/ui | |
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 'dbaccess/source/ui')
-rw-r--r-- | dbaccess/source/ui/inc/JoinExchange.hxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/JoinExchange.cxx | 7 |
2 files changed, 5 insertions, 5 deletions
diff --git a/dbaccess/source/ui/inc/JoinExchange.hxx b/dbaccess/source/ui/inc/JoinExchange.hxx index 0d750a444e81..72aa0d1de73e 100644 --- a/dbaccess/source/ui/inc/JoinExchange.hxx +++ b/dbaccess/source/ui/inc/JoinExchange.hxx @@ -50,6 +50,7 @@ namespace dbaui virtual void SAL_CALL release( ) throw() override; // XUnoTunnel + static css::uno::Sequence< sal_Int8 > getUnoTunnelId(); virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& _rIdentifier ) override; void StartDrag( vcl::Window* pWindow, sal_Int8 nDragSourceActions, IDragTransferableListener* _pListener ); @@ -62,8 +63,6 @@ namespace dbaui virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override; virtual void DragFinished( sal_Int8 nDropAction ) override; - static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId(); - using TransferableHelper::StartDrag; }; } diff --git a/dbaccess/source/ui/querydesign/JoinExchange.cxx b/dbaccess/source/ui/querydesign/JoinExchange.cxx index 036943fac4df..3ee2e4d34b1f 100644 --- a/dbaccess/source/ui/querydesign/JoinExchange.cxx +++ b/dbaccess/source/ui/querydesign/JoinExchange.cxx @@ -19,6 +19,7 @@ #include <JoinExchange.hxx> #include <sot/formats.hxx> +#include <comphelper/servicehelper.hxx> #include <cppuhelper/typeprovider.hxx> namespace dbaui @@ -70,14 +71,14 @@ namespace dbaui Reference< XUnoTunnel > xTunnel(_rxObject, UNO_QUERY); if (xTunnel.is()) { - OJoinExchObj* pImplementation = reinterpret_cast<OJoinExchObj*>(xTunnel->getSomething(getUnoTunnelImplementationId())); + OJoinExchObj* pImplementation = reinterpret_cast<OJoinExchObj*>(xTunnel->getSomething(getUnoTunnelId())); if (pImplementation) aReturn = pImplementation->m_jxdSourceDescription; } return aReturn; } - Sequence< sal_Int8 > OJoinExchObj::getUnoTunnelImplementationId() + Sequence< sal_Int8 > OJoinExchObj::getUnoTunnelId() { static ::cppu::OImplementationId implId; @@ -86,7 +87,7 @@ namespace dbaui sal_Int64 SAL_CALL OJoinExchObj::getSomething( const Sequence< sal_Int8 >& _rIdentifier ) { - if (_rIdentifier.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 ) ) + if (isUnoTunnelId<OJoinExchObj>(_rIdentifier)) return reinterpret_cast<sal_Int64>(this); return 0; |