Kaydet (Commit) 09c657eb authored tarafından Arkadiy Illarionov's avatar Arkadiy Illarionov Kaydeden (comit) Stephan Bergmann

tdf#39593 use UNO3_GETIMPLEMENTATION* macros

Change-Id: I4e9af3b43a5baf19e100f42b3f37a2ade89ada5d
Reviewed-on: https://gerrit.libreoffice.org/73320
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 675a3928
......@@ -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)
{
......
......@@ -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;
......
......@@ -65,7 +65,7 @@ const css::uno::Sequence< sal_Int8 > & classname::getUnoTunnelId() throw() \
return the##classname##UnoTunnelId::get().getSeq(); \
} \
\
classname* classname::getImplementation( const uno::Reference< uno::XInterface >& xInt ) \
classname* classname::getImplementation( const css::uno::Reference< css::uno::XInterface >& xInt ) \
{ \
css::uno::Reference< css::lang::XUnoTunnel > xUT( xInt, css::uno::UNO_QUERY ); \
if( xUT.is() ) \
......
......@@ -13,6 +13,7 @@
#include <functional>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
class AsyncFunc : public cppu::WeakImplHelper<css::lang::XUnoTunnel>
......@@ -24,14 +25,10 @@ public:
AsyncFunc(const std::function<void()>&);
virtual ~AsyncFunc() override;
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
static AsyncFunc* getImplementation(const css::uno::Reference<css::uno::XInterface>&);
void Execute();
//XUnoTunnel
virtual sal_Int64 SAL_CALL
getSomething(const css::uno::Sequence<sal_Int8>& aIdentifier) override;
UNO3_GETIMPLEMENTATION_DECL(AsyncFunc)
};
#endif
......
......@@ -22,6 +22,7 @@
#include <svl/svldllapi.h>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase2.hxx>
#include <memory>
......@@ -59,11 +60,7 @@ public:
getNumberFormats() override;
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
static SvNumberFormatsSupplierObj* getImplementation( const css::uno::Reference<
css::util::XNumberFormatsSupplier>& rObj );
UNO3_GETIMPLEMENTATION_DECL(SvNumberFormatsSupplierObj)
::comphelper::SharedMutex& getSharedMutex() const;
};
......
......@@ -36,6 +36,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Type.hxx>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/servicehelper.hxx>
#include <editeng/AccessibleContextBase.hxx>
#include <editeng/AccessibleComponentBase.hxx>
#include <rtl/ustring.hxx>
......@@ -327,9 +328,7 @@ public:
//===== XUnoTunnel ========================================================
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelImplementationId() throw();
static AccessibleShape* getImplementation( const css::uno::Reference< css::uno::XInterface >& _rxIFace ) throw();
sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& _rIdentifier ) override;
UNO3_GETIMPLEMENTATION_DECL(AccessibleShape)
//===== XAccessibleHypertext ========================================================
virtual sal_Int32 SAL_CALL getHyperLinkCount() override;
......
......@@ -44,6 +44,7 @@
#include <tools/wintypes.hxx>
#include <toolkit/controls/unocontrol.hxx>
#include <toolkit/awt/vclxwindow.hxx>
#include <comphelper/servicehelper.hxx>
#include <comphelper/uno3.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/implbase10.hxx>
......@@ -377,9 +378,7 @@ public:
void Create(vcl::Window* pParent, WinBits nStyle);
// css::lang::XUnoTunnel
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelImplementationId() throw();
static FmXGridPeer* getImplementation( const css::uno::Reference< css::uno::XInterface >& _rxIFace ) throw();
sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& _rIdentifier ) override;
UNO3_GETIMPLEMENTATION_DECL(FmXGridPeer)
// css::form::XGridPeer
virtual css::uno::Reference< css::container::XIndexContainer > SAL_CALL getColumns( ) override;
......
......@@ -26,6 +26,7 @@
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
#include <memory>
......@@ -45,11 +46,8 @@ public:
css::xml::sax::XAttributeList> & rAttrList );
virtual ~SvXMLAttributeList() override;
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
static SvXMLAttributeList* getImplementation( const css::uno::Reference< css::uno::XInterface >& ) throw();
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
UNO3_GETIMPLEMENTATION_DECL(SvXMLAttributeList)
// css::xml::sax::XAttributeList
virtual sal_Int16 SAL_CALL getLength() override;
......
......@@ -45,6 +45,7 @@
#include <unotools/saveopt.hxx>
#include <xmloff/XMLPageExport.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
#include <tools/fldunit.hxx>
#include <vcl/errcode.hxx>
......@@ -289,9 +290,6 @@ public:
virtual void collectAutoStyles();
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
static SvXMLExport* getImplementation( const css::uno::Reference< css::uno::XInterface >& ) throw();
// XExporter
virtual void SAL_CALL setSourceDocument( const css::uno::Reference< css::lang::XComponent >& xDoc ) override;
......@@ -312,7 +310,7 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) final override;
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
UNO3_GETIMPLEMENTATION_DECL(SvXMLExport)
/** ensures that the given namespace is in scope at the next started
element.
......
......@@ -28,6 +28,7 @@
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
class ScAutoFormatFieldObj;
......@@ -145,11 +146,7 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence<
sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
static ScAutoFormatObj* getImplementation(const css::uno::Reference<css::uno::XInterface>& rObj);
UNO3_GETIMPLEMENTATION_DECL(ScAutoFormatObj)
};
class ScAutoFormatFieldObj : public ::cppu::WeakImplHelper<
......
......@@ -84,6 +84,7 @@
#include <com/sun/star/beans/XTolerantMultiPropertySet.hpp>
#include <com/sun/star/sheet/XExternalSheetName.hpp>
#include <com/sun/star/document/XEventsSupplier.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/weakref.hxx>
......@@ -382,10 +383,7 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
static ScCellRangesBase* getImplementation(const css::uno::Reference<css::uno::XInterface>& rObj);
UNO3_GETIMPLEMENTATION_DECL(ScCellRangesBase)
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
......@@ -968,11 +966,7 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence<
sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
static ScTableSheetObj* getImplementation(const css::uno::Reference< css::uno::XInterface>& rObj);
UNO3_GETIMPLEMENTATION_DECL(ScTableSheetObj);
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
......
......@@ -42,6 +42,7 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/util/XRefreshable.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
#include <rtl/ref.hxx>
#include <svl/itemprop.hxx>
......@@ -161,10 +162,7 @@ public:
const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
static ScSubTotalDescriptorBase* getImplementation(const css::uno::Reference<css::sheet::XSubTotalDescriptor>& rObj);
UNO3_GETIMPLEMENTATION_DECL(ScSubTotalDescriptorBase)
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
......
......@@ -34,6 +34,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/util/XRefreshable.hpp>
#include <com/sun/star/util/DateTime.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/component.hxx>
#include <cppuhelper/implbase.hxx>
#include <osl/mutex.hxx>
......@@ -199,9 +200,6 @@ private:
void setPropertyValueSheet(const OUString& rName, const css::uno::Any& rVal);
public:
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
static ScEditFieldObj* getImplementation(const css::uno::Reference<css::text::XTextContent>& xObj);
ScEditFieldObj(
const css::uno::Reference<css::text::XTextRange>& rContent,
std::unique_ptr<ScEditSource> pEditSrc, sal_Int32 eType, const ESelection& rSel);
......@@ -244,7 +242,7 @@ public:
const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
UNO3_GETIMPLEMENTATION_DECL(ScEditFieldObj)
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
......
......@@ -36,6 +36,7 @@
#include <com/sun/star/sheet/XMultiFormulaTokens.hpp>
#include <com/sun/star/sheet/FormulaToken.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
#include "address.hxx"
......@@ -108,10 +109,7 @@ public:
virtual sal_Bool SAL_CALL hasElements() override;
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
static ScTableConditionalFormat* getImplementation(const css::uno::Reference<css::sheet::XSheetConditionalEntries>& rObj);
UNO3_GETIMPLEMENTATION_DECL(ScTableConditionalFormat)
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
......@@ -235,10 +233,7 @@ public:
const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
static ScTableValidationObj* getImplementation(const css::uno::Reference<css::beans::XPropertySet>& rObj);
UNO3_GETIMPLEMENTATION_DECL(ScTableValidationObj)
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
......
......@@ -25,6 +25,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <svl/itemprop.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
class SvxSearchItem;
......@@ -71,11 +72,7 @@ public:
const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence<
sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
static ScCellSearchObj* getImplementation(const css::uno::Reference<css::util::XSearchDescriptor>& rObj);
UNO3_GETIMPLEMENTATION_DECL(ScCellSearchObj)
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
......
......@@ -32,6 +32,7 @@
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/beans/XMultiPropertyStates.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
namespace com { namespace sun { namespace star { namespace container { class XIndexReplace; } } } }
......@@ -264,11 +265,7 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
static ScStyleObj* getImplementation(const css::uno::Reference<css::uno::XInterface>& rObj);
UNO3_GETIMPLEMENTATION_DECL(ScStyleObj)
};
#endif
......
......@@ -27,6 +27,7 @@
#include <com/sun/star/sheet/XHeaderFooterContent.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/weakref.hxx>
......@@ -236,10 +237,7 @@ public:
getEnd() override;
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
static ScCellTextCursor* getImplementation(const css::uno::Reference< css::uno::XInterface>& rObj);
UNO3_GETIMPLEMENTATION_DECL(ScCellTextCursor)
};
class ScHeaderFooterTextCursor : public SvxUnoTextCursor
......@@ -265,10 +263,7 @@ public:
getEnd() override;
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
static ScHeaderFooterTextCursor* getImplementation(const css::uno::Reference<css::uno::XInterface>& rObj);
UNO3_GETIMPLEMENTATION_DECL(ScHeaderFooterTextCursor)
};
class ScDrawTextCursor : public SvxUnoTextCursor
......@@ -295,10 +290,7 @@ public:
getEnd() override;
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
static ScDrawTextCursor* getImplementation(const css::uno::Reference<css::uno::XInterface>& rObj);
UNO3_GETIMPLEMENTATION_DECL(ScDrawTextCursor)
};
// ScAnnotationTextCursor isn't needed anymore - SvxUnoTextCursor is used instead
......
......@@ -38,6 +38,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/datatransfer/XTransferableSupplier.hpp>
#include <comphelper/servicehelper.hxx>
#include "types.hxx"
......@@ -268,11 +269,7 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence<
sal_Int8 >& aIdentifier ) override;
static const css::uno::Sequence<sal_Int8>& getUnoTunnelId();
static ScTabViewObj* getImplementation(const css::uno::Reference<css::uno::XInterface>& rObj);
UNO3_GETIMPLEMENTATION_DECL(ScTabViewObj)
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
......
......@@ -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
......
......@@ -42,7 +42,6 @@
#include <sfx2/bindings.hxx>
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <float.h>
......@@ -4067,36 +4066,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea
// XUnoTunnel
sal_Int64 SAL_CALL ScCellRangesBase::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 theScCellRangesBaseUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theScCellRangesBaseUnoTunnelId> {};
}
const uno::Sequence<sal_Int8>& ScCellRangesBase::getUnoTunnelId()
{
return theScCellRangesBaseUnoTunnelId::get().getSeq();
}
ScCellRangesBase* ScCellRangesBase::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
ScCellRangesBase* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScCellRangesBase*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
return pRet;
}
UNO3_GETIMPLEMENTATION_IMPL(ScCellRangesBase);
typedef std::vector<ScNamedEntry> ScNamedEntryArr_Impl;
......@@ -8423,37 +8393,7 @@ uno::Sequence<OUString> SAL_CALL ScTableSheetObj::getSupportedServiceNames()
// XUnoTunnel
sal_Int64 SAL_CALL ScTableSheetObj::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 ScCellRangeObj::getSomething( rId );
}
namespace
{
class theScTableSheetObjUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theScTableSheetObjUnoTunnelId> {};
}
const uno::Sequence<sal_Int8>& ScTableSheetObj::getUnoTunnelId()
{
return theScTableSheetObjUnoTunnelId::get().getSeq();
}
ScTableSheetObj* ScTableSheetObj::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
ScTableSheetObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScTableSheetObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
return pRet;
}
UNO3_GETIMPLEMENTATION2_IMPL(ScTableSheetObj, ScCellRangeObj);
ScTableColumnObj::ScTableColumnObj( ScDocShell* pDocSh, SCCOL nCol, SCTAB nTab ) :
ScCellRangeObj( pDocSh, ScRange(nCol,0,nTab, nCol,MAXROW,nTab) ),
......
......@@ -57,7 +57,6 @@
#include <dpobject.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <svx/dataaccessdescriptor.hxx>
......@@ -740,36 +739,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScSubTotalDescriptorBase )
// XUnoTunnel
sal_Int64 SAL_CALL ScSubTotalDescriptorBase::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 theScSubTotalDescriptorBaseUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theScSubTotalDescriptorBaseUnoTunnelId> {};
}
const uno::Sequence<sal_Int8>& ScSubTotalDescriptorBase::getUnoTunnelId()
{
return theScSubTotalDescriptorBaseUnoTunnelId::get().getSeq();
}
ScSubTotalDescriptorBase* ScSubTotalDescriptorBase::getImplementation(const uno::Reference<sheet::XSubTotalDescriptor>& rObj)
{
ScSubTotalDescriptorBase* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScSubTotalDescriptorBase*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
return pRet;
}
UNO3_GETIMPLEMENTATION_IMPL(ScSubTotalDescriptorBase);
ScSubTotalDescriptor::ScSubTotalDescriptor()
{
......
......@@ -38,7 +38,6 @@
#include <editeng/editobj.hxx>
#include <editeng/flditem.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
......@@ -1284,36 +1283,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScEditFieldObj )
// XUnoTunnel
sal_Int64 SAL_CALL ScEditFieldObj::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 theScEditFieldObjUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theScEditFieldObjUnoTunnelId> {};
}
const uno::Sequence<sal_Int8>& ScEditFieldObj::getUnoTunnelId()
{
return theScEditFieldObjUnoTunnelId::get().getSeq();
}
ScEditFieldObj* ScEditFieldObj::getImplementation(const uno::Reference<text::XTextContent>& xObj)
{
ScEditFieldObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT( xObj, uno::UNO_QUERY );
if (xUT.is())
pRet = reinterpret_cast<ScEditFieldObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
return pRet;
}
UNO3_GETIMPLEMENTATION_IMPL(ScEditFieldObj);
// XServiceInfo
......
......@@ -21,7 +21,6 @@
#include <osl/diagnose.h>
#include <vcl/svapp.hxx>
#include <comphelper/servicehelper.hxx>
#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
#include <com/sun/star/sheet/ConditionOperator2.hpp>
#include <com/sun/star/sheet/ValidationAlertStyle.hpp>
......@@ -453,36 +452,7 @@ sal_Bool SAL_CALL ScTableConditionalFormat::hasByName( const OUString& aName )
// XUnoTunnel
sal_Int64 SAL_CALL ScTableConditionalFormat::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 theScTableConditionalFormatUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theScTableConditionalFormatUnoTunnelId> {};
}
const uno::Sequence<sal_Int8>& ScTableConditionalFormat::getUnoTunnelId()
{
return theScTableConditionalFormatUnoTunnelId::get().getSeq();
}