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 /sc/source/ui/unoobj/afmtuno.cxx | |
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 'sc/source/ui/unoobj/afmtuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/afmtuno.cxx | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx index 56c711623df0..2ca01d150496 100644 --- a/sc/source/ui/unoobj/afmtuno.cxx +++ b/sc/source/ui/unoobj/afmtuno.cxx @@ -26,7 +26,6 @@ #include <vcl/svapp.hxx> #include <svx/unomid.hxx> #include <unowids.hxx> -#include <comphelper/servicehelper.hxx> #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> #include <com/sun/star/table/BorderLine.hpp> #include <com/sun/star/table/CellVertJustify2.hpp> @@ -379,36 +378,7 @@ void ScAutoFormatObj::InitFormat( sal_uInt16 nNewIndex ) // XUnoTunnel -sal_Int64 SAL_CALL ScAutoFormatObj::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)); - } - return 0; -} - -namespace -{ - class theScAutoFormatObjUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theScAutoFormatObjUnoTunnelId> {}; -} - -const uno::Sequence<sal_Int8>& ScAutoFormatObj::getUnoTunnelId() -{ - return theScAutoFormatObjUnoTunnelId::get().getSeq(); -} - -ScAutoFormatObj* ScAutoFormatObj::getImplementation(const uno::Reference<uno::XInterface>& rObj) -{ - ScAutoFormatObj* pRet = nullptr; - uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY); - if (xUT.is()) - pRet = reinterpret_cast<ScAutoFormatObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId()))); - return pRet; -} +UNO3_GETIMPLEMENTATION_IMPL(ScAutoFormatObj); // XTableAutoFormat |