19#ifndef INCLUDED_VBAHELPER_VBAHELPERINTERFACE_HXX
20#define INCLUDED_VBAHELPER_VBAHELPERINTERFACE_HXX
22#include <com/sun/star/container/XNameAccess.hpp>
23#include <com/sun/star/uno/Any.hxx>
24#include <com/sun/star/uno/Reference.hxx>
25#include <com/sun/star/uno/RuntimeException.hpp>
26#include <com/sun/star/uno/Sequence.hxx>
27#include <com/sun/star/uno/XComponentContext.hpp>
30#include <ooo/vba/XHelperInterface.hpp>
31#include <rtl/ustring.hxx>
63template<
typename... Ifc >
67 css::uno::WeakReference< ov::XHelperInterface >
mxParent;
68 css::uno::Reference< css::uno::XComponentContext >
mxContext;
79 virtual css::uno::Reference< ov::XHelperInterface > SAL_CALL
getParent( )
override {
return mxParent; }
84 css::uno::Reference< css::container::XNameAccess > xNameAccess(
mxContext, css::uno::UNO_QUERY_THROW );
85 return xNameAccess->getByName(
"Application" );
93 const OUString* pStart = sServices.getConstArray();
94 const OUString* pEnd = pStart + sServices.getLength();
95 for ( ; pStart != pEnd ; ++pStart )
102 css::uno::Sequence< OUString > aNames = getServiceNames();
107template <
typename... Ifc >
112 InheritedHelperInterfaceWeakImpl(
const css::uno::Reference< ov::XHelperInterface >& xParent,
const css::uno::Reference< css::uno::XComponentContext >& xContext ) :
Base( xParent, xContext ) {}
120#define VBAHELPER_DECL_XHELPERINTERFACE \
121 virtual OUString getServiceImplName() override; \
122 virtual css::uno::Sequence< OUString > getServiceNames() override;
129#define VBAHELPER_IMPL_XHELPERINTERFACE( classname, servicename ) \
130OUString classname::getServiceImplName() \
134css::uno::Sequence< OUString > classname::getServiceNames() \
136 static const css::uno::Sequence< OUString > saServiceNames { servicename }; \
137 return saServiceNames; \
unotools::WeakReference< AnimationNode > mxParent
virtual OUString SAL_CALL getImplementationName() override
virtual OUString getServiceImplName()=0
InheritedHelperInterfaceImpl(const css::uno::Reference< ov::XHelperInterface > &xParent, css::uno::Reference< css::uno::XComponentContext > xContext)
css::uno::Reference< css::uno::XComponentContext > mxContext
virtual ::sal_Int32 SAL_CALL getCreator() override
css::uno::WeakReference< ov::XHelperInterface > mxParent
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Any SAL_CALL Application() override
virtual css::uno::Reference< ov::XHelperInterface > SAL_CALL getParent() override
virtual css::uno::Sequence< OUString > getServiceNames()=0
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
InheritedHelperInterfaceImpl< ::cppu::WeakImplHelper< Ifc... > > Base
InheritedHelperInterfaceWeakImpl(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext)
css::uno::Sequence< OUString > getSupportedServiceNames()