static/source/embindmaker/embindmaker.cxx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
New commits: commit 41706fcd962a38627d20f62488c6110967396ee7 Author: Stephan Bergmann <stephan.bergm...@allotropia.de> AuthorDate: Fri Apr 19 11:00:05 2024 +0200 Commit: Stephan Bergmann <stephan.bergm...@allotropia.de> CommitDate: Fri Apr 19 21:20:41 2024 +0200 Embind: Don't expose special XInterface methods to JS client code Change-Id: I8592466b96406a1658d0a5a1b961142f862a9e4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166290 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de> diff --git a/static/source/embindmaker/embindmaker.cxx b/static/source/embindmaker/embindmaker.cxx index ea7879ecceb0..252d7b25451c 100644 --- a/static/source/embindmaker/embindmaker.cxx +++ b/static/source/embindmaker/embindmaker.cxx @@ -667,16 +667,19 @@ void dumpMethods(std::ostream& out, rtl::Reference<TypeManager> const& manager, OUString const& name, rtl::Reference<unoidl::InterfaceTypeEntity> const& entity, std::list<OUString> const& baseTrail) { - for (auto const& meth : entity->getDirectMethods()) + if (name != "com.sun.star.uno.XInterface") { - if (!baseTrail.empty() || hasInOutParameters(meth)) + for (auto const& meth : entity->getDirectMethods()) { - dumpWrapper(out, manager, name, meth, baseTrail); - } - else - { - out << " .function(\"" << meth.name << "\", &" << cppName(name) - << "::" << meth.name << ", ::emscripten::pure_virtual()) "; + if (!baseTrail.empty() || hasInOutParameters(meth)) + { + dumpWrapper(out, manager, name, meth, baseTrail); + } + else + { + out << " .function(\"" << meth.name << "\", &" << cppName(name) + << "::" << meth.name << ", ::emscripten::pure_virtual()) "; + } } } }