From 830ec75f2f172847d350a0801823cf87e004b33c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 18 Apr 2024 13:21:56 +0200 Subject: [PATCH] Embind: We no longer need interface FromAny ctor ...now that we have uno_Any get() since 8428368d79118f1d0e09615c5d2b92065b8838d4 "Improve Embing'ing of UNO Any somewhat" Change-Id: I06572e1ca152117c5c93a1552e50b1399af84780 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166244 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- include/static/unoembindhelpers/PrimaryBindings.hxx | 5 ----- static/README.wasm.md | 2 +- static/source/embindmaker/embindmaker.cxx | 5 ----- static/source/unoembindhelpers/PrimaryBindings.cxx | 2 -- 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/include/static/unoembindhelpers/PrimaryBindings.hxx b/include/static/unoembindhelpers/PrimaryBindings.hxx index 259c9c2944f8..6acf2803132a 100644 --- a/include/static/unoembindhelpers/PrimaryBindings.hxx +++ b/include/static/unoembindhelpers/PrimaryBindings.hxx @@ -41,11 +41,6 @@ namespace detail void registerUnoType(css::uno::Type const& type, std::type_info const* id); } -enum class uno_Reference -{ - FromAny -}; - enum class uno_Sequence { FromSize diff --git a/static/README.wasm.md b/static/README.wasm.md index 69176bb8acbc..19da4518030c 100644 --- a/static/README.wasm.md +++ b/static/README.wasm.md @@ -246,7 +246,7 @@ xEnumAccess = new css.container.XEnumerationAccess(xText); xParaEnumeration = xEnumAccess.createEnumeration(); while (xParaEnumeration.hasMoreElements()) { - xParagraph = new css.text.XTextRange(xParaEnumeration.nextElement(), Module.uno_Reference.FromAny); + xParagraph = new css.text.XTextRange(xParaEnumeration.nextElement().get()); if (xParagraph.$is()) { xParaProps = new css.beans.XPropertySet(xParagraph); let color = new Module.uno_Any( diff --git a/static/source/embindmaker/embindmaker.cxx b/static/source/embindmaker/embindmaker.cxx index 6d89f5a5ab10..ea7879ecceb0 100644 --- a/static/source/embindmaker/embindmaker.cxx +++ b/static/source/embindmaker/embindmaker.cxx @@ -1088,11 +1088,6 @@ SAL_IMPLEMENT_MAIN() "XInterface> const & the_object) { return ::com::sun::star::uno::Reference<" << cppName(ifc) << ">(the_object, ::com::sun::star::uno::UNO_QUERY); })\n" - " .constructor(+[](::com::sun::star::uno::Any const & the_object, " - "[[maybe_unused]] ::unoembindhelpers::uno_Reference) { return " - "::com::sun::star::uno::Reference<" - << cppName(ifc) - << ">(the_object, ::com::sun::star::uno::UNO_QUERY); })\n" " .function(\"$is\", +[](::com::sun::star::uno::Reference<" << cppName(ifc) << "> const & the_self) { return the_self.is(); })\n" diff --git a/static/source/unoembindhelpers/PrimaryBindings.cxx b/static/source/unoembindhelpers/PrimaryBindings.cxx index d74b63ab8402..fee0c3e214d1 100644 --- a/static/source/unoembindhelpers/PrimaryBindings.cxx +++ b/static/source/unoembindhelpers/PrimaryBindings.cxx @@ -200,8 +200,6 @@ void registerUnoType(css::uno::Type const& type, std::type_info const* id) { uno EMSCRIPTEN_BINDINGS(PrimaryBindings) { - enum_("uno_Reference") - .value("FromAny", unoembindhelpers::uno_Reference::FromAny); enum_("uno_Sequence") .value("FromSize", unoembindhelpers::uno_Sequence::FromSize); -- 2.11.4.GIT