summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2024-05-29 17:36:55 +0200
committerStephan Bergmann <stephan.bergmann@allotropia.de>2024-05-30 09:35:06 +0200
commite303b3bba8caaefd3a7897a773deb69643967047 (patch)
treea914bafd9155dbca7e7b7d6bb62ca7e87e6c4cb5 /bridges
parent91dbd5ca9fa2e689dcdbc5be4a60c8b65cbefc9f (diff)
Implement attribute handling
Change-Id: Ic30d2de582f952555ec672984da78a07a9319443 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168224 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
index 4b4cdb2bbadb..fcc978ab672e 100644
--- a/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_wasm/uno2cpp.cxx
@@ -18,7 +18,9 @@
#include <com/sun/star/uno/Exception.hpp>
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/uno/genfunc.hxx>
+#include <cppu/unotype.hxx>
#include <o3tl/runtimetooustring.hxx>
+#include <o3tl/temporary.hxx>
#include <o3tl/unreachable.hxx>
#include <rtl/strbuf.hxx>
#include <typelib/typeclass.h>
@@ -324,7 +326,21 @@ void unoInterfaceProxyDispatch(uno_Interface* pUnoI, const typelib_TypeDescripti
{
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
{
- std::abort();
+ auto const atd
+ = reinterpret_cast<typelib_InterfaceAttributeTypeDescription const*>(pMemberDescr);
+ VtableSlot slot(getVtableSlot(atd));
+ if (pReturn == nullptr)
+ {
+ slot.index += 1;
+ call(pThis, slot, cppu::UnoType<void>::get().getTypeLibType(), 1,
+ &o3tl::temporary(
+ typelib_MethodParameter{ nullptr, atd->pAttributeTypeRef, true, false }),
+ pReturn, pArgs, ppException);
+ }
+ else
+ {
+ call(pThis, slot, atd->pAttributeTypeRef, 0, nullptr, pReturn, pArgs, ppException);
+ }
break;
}
case typelib_TypeClass_INTERFACE_METHOD: