summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2024-02-27 16:30:24 +0100
committerStephan Bergmann <stephan.bergmann@allotropia.de>2024-02-28 07:53:21 +0100
commitc7664f12a99b6e08eb334d63646c3d2a6aa75e18 (patch)
tree2b713342c8ea894b6984f7e875955818f66afd2f /desktop
parent4c20fb09d7fe6c2f4cdb672a6238c8ddb67aa437 (diff)
Init Embind-ings manually, once UNO is set up
Upcoming code that changes the Embind'ing of UNO sequences will require availability of the UNO type manager during that Embind init code, so only call that after UNO has been bootstrapped (rather than as part of the initialization of global static data, which is what EMSCRIPTEN_BINDINGS does). Change-Id: Iba19851ffb82c055dcab10a28a8c1fafa9d2a414 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164065 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/Library_sofficeapp.mk6
-rw-r--r--desktop/source/app/appinit.cxx7
2 files changed, 13 insertions, 0 deletions
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index 641efda7eda2..cc39ccd12f92 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -37,6 +37,12 @@ $(eval $(call gb_Library_use_custom_headers,sofficeapp,\
officecfg/registry \
))
+ifeq ($(OS),EMSCRIPTEN)
+$(eval $(call gb_Library_use_custom_headers,sofficeapp, \
+ static/unoembind \
+))
+endif
+
$(eval $(call gb_Library_use_api,sofficeapp,\
udkapi \
offapi \
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 51b466c6b980..1a0681f0d163 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -45,6 +45,10 @@
#include <iostream>
#include <map>
+#if defined EMSCRIPTEN
+#include <bindings_uno.hxx>
+#endif
+
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
@@ -83,6 +87,9 @@ void Desktop::InitApplicationServiceManager()
UNO_QUERY_THROW);
#endif
comphelper::setProcessServiceFactory(sm);
+#if defined EMSCRIPTEN
+ init_unoembind_uno();
+#endif
}
void Desktop::RegisterServices()