diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-06-01 20:50:37 +0300 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-06-03 09:32:50 +0200 |
commit | 09c657ebe69fe1c2516a10a4452996870f4237d2 (patch) | |
tree | 1e0d6154aa3674599994bd8a4a90e1e4a83af813 /dbaccess/source | |
parent | 675a3928e1cab27cf310c316be65acdbb764ed65 (diff) |
tdf#39593 use UNO3_GETIMPLEMENTATION* macros
Change-Id: I4e9af3b43a5baf19e100f42b3f37a2ade89ada5d
Reviewed-on: https://gerrit.libreoffice.org/73320
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'dbaccess/source')
-rw-r--r-- | dbaccess/source/ui/browser/sbagrid.cxx | 29 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/sbagrid.hxx | 5 |
2 files changed, 3 insertions, 31 deletions
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index c41a4e395c67..0bf3e8a4fec8 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -71,7 +71,6 @@ #include <connectivity/dbconversion.hxx> #include <cppuhelper/typeprovider.hxx> #include <comphelper/processfactory.hxx> -#include <comphelper/servicehelper.hxx> #include <comphelper/types.hxx> #include <com/sun/star/sdbcx/XTablesSupplier.hpp> #include <com/sun/star/sdbc/DataType.hpp> @@ -506,16 +505,6 @@ void SAL_CALL SbaXGridPeer::removeStatusListener(const Reference< css::frame::XS pCont->removeInterface(xControl); } -namespace -{ - class theSbaXGridPeerUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSbaXGridPeerUnoTunnelId > {}; -} - -const Sequence< sal_Int8 > & SbaXGridPeer::getUnoTunnelId() -{ - return theSbaXGridPeerUnoTunnelId::get().getSeq(); -} - Sequence< Type > SAL_CALL SbaXGridPeer::getTypes() { return comphelper::concatSequences( @@ -523,23 +512,7 @@ Sequence< Type > SAL_CALL SbaXGridPeer::getTypes() Sequence { cppu::UnoType<css::frame::XDispatch>::get() }); } -// return implementation specific data -sal_Int64 SAL_CALL SbaXGridPeer::getSomething( const Sequence< sal_Int8 > & rId ) -{ - if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) - return reinterpret_cast< sal_Int64 >( this ); - - return FmXGridPeer::getSomething(rId); -} - -SbaXGridPeer* SbaXGridPeer::getImplementation(const Reference< XInterface >& _rxIFace) -{ - Reference< XUnoTunnel > xTunnel( - _rxIFace, UNO_QUERY); - if (xTunnel.is()) - return reinterpret_cast<SbaXGridPeer*>(xTunnel->getSomething(getUnoTunnelId())); - return nullptr; -} +UNO3_GETIMPLEMENTATION2_IMPL(SbaXGridPeer, FmXGridPeer); VclPtr<FmGridControl> SbaXGridPeer::imp_CreateControl(vcl::Window* pParent, WinBits nStyle) { diff --git a/dbaccess/source/ui/inc/sbagrid.hxx b/dbaccess/source/ui/inc/sbagrid.hxx index 1629fbdb1463..4401a527cf46 100644 --- a/dbaccess/source/ui/inc/sbagrid.hxx +++ b/dbaccess/source/ui/inc/sbagrid.hxx @@ -27,6 +27,7 @@ #include <com/sun/star/sdb/XSQLQueryComposer.hpp> #include <com/sun/star/frame/XDispatch.hpp> #include <com/sun/star/util/URL.hpp> +#include <comphelper/servicehelper.hxx> #include <comphelper/uno3.hxx> #include "sbamultiplex.hxx" #include <svx/dataaccessdescriptor.hxx> @@ -114,9 +115,7 @@ namespace dbaui virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId(); - sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 > & rId ) override; - static SbaXGridPeer* getImplementation(const css::uno::Reference< css::uno::XInterface>& _rxIFace); + UNO3_GETIMPLEMENTATION_DECL(SbaXGridPeer) // css::frame::XDispatch virtual void SAL_CALL dispatch(const css::util::URL& aURL, const css::uno::Sequence< css::beans::PropertyValue >& aArgs) override; |