From 2df1dcc324c67d2205f0ff86378f07e2eeddc1b2 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 29 Jan 2024 12:05:13 +0100 Subject: [PATCH] Some renaming of generated identifiers uno_Type_com$sun$star$... and uno_Reference_com$sun$star$... Change-Id: Ibc19f423a60c521c376172807b4d5a34cf0179a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162696 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- static/source/embindmaker/embindmaker.cxx | 49 ++++++++++++----------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/static/source/embindmaker/embindmaker.cxx b/static/source/embindmaker/embindmaker.cxx index 0eb3bc684db5..b7c9b1a51eb2 100644 --- a/static/source/embindmaker/embindmaker.cxx +++ b/static/source/embindmaker/embindmaker.cxx @@ -455,8 +455,8 @@ void writeJsMap(std::ostream& out, Module const& module, std::string const& pref { out << ",\n"; } - out << prefix << "'" << ifc.copy(ifc.lastIndexOf('.') + 1) << "': instance." << jsName(ifc) - << "Ref"; + out << prefix << "'" << ifc.copy(ifc.lastIndexOf('.') + 1) << "': instance.uno_Reference_" + << jsName(ifc); comma = true; } for (auto const & [ id, sub ] : module.modules) @@ -544,30 +544,31 @@ SAL_IMPLEMENT_MAIN() cppOut << "static void __attribute__((noinline)) register" << n << "() {\n" " ::emscripten::class_<" - << cppName(ifc) << ">(\"" << jsName(ifc) << "\")\n"; + << cppName(ifc) << ">(\"uno_Type_" << jsName(ifc) << "\")\n"; dumpAttributes(cppOut, ifc, ifcEnt); dumpMethods(cppOut, mgr, ifc, ifcEnt, false); - cppOut << " ;\n" - " ::emscripten::class_<::com::sun::star::uno::Reference<" - << cppName(ifc) - << ">, ::emscripten::base<::com::sun::star::uno::BaseReference>>(\"" - << jsName(ifc) - << "Ref\")\n" - " .constructor<>()\n" - " .constructor<::com::sun::star::uno::BaseReference, " - "::com::sun::star::uno::UnoReference_Query>()\n" - " .function(\"is\", &::com::sun::star::uno::Reference<" - << cppName(ifc) - << ">::is)\n" - " .function(\"get\", &::com::sun::star::uno::Reference<" - << cppName(ifc) - << ">::get, ::emscripten::allow_raw_pointers())\n" - " .function(\"set\", " - "::emscripten::select_overload(&::com::sun::star::uno::" - "Reference<" - << cppName(ifc) << ">::set))\n"; + cppOut + << " ;\n" + " ::emscripten::class_<::com::sun::star::uno::Reference<" + << cppName(ifc) + << ">, ::emscripten::base<::com::sun::star::uno::BaseReference>>(\"uno_Reference_" + << jsName(ifc) + << "\")\n" + " .constructor<>()\n" + " .constructor<::com::sun::star::uno::BaseReference, " + "::com::sun::star::uno::UnoReference_Query>()\n" + " .function(\"is\", &::com::sun::star::uno::Reference<" + << cppName(ifc) + << ">::is)\n" + " .function(\"get\", &::com::sun::star::uno::Reference<" + << cppName(ifc) + << ">::get, ::emscripten::allow_raw_pointers())\n" + " .function(\"set\", " + "::emscripten::select_overload(&::com::sun::star::uno::" + "Reference<" + << cppName(ifc) << ">::set))\n"; dumpAttributes(cppOut, ifc, ifcEnt); dumpMethods(cppOut, mgr, ifc, ifcEnt, true); cppOut << " ;\n"