Rebased ref, commits from common ancestor:
commit 51a5ed689802a475157c6957aa5aca4e0f238c18
Author: Balazs Varga <[email protected]>
AuthorDate: Mon Aug 8 10:49:20 2022 +0200
Commit: Thorsten Behrens <[email protected]>
CommitDate: Fri Aug 19 14:12:16 2022 +0200
WIP: WASM activate and fix the Calc build and running
It was needed to allow accessibility for wasm calc build,
due to many addictions in calc.
This commit also revert: 26603bc9ef0116ed31c510dab82b69d3666447b5
(WASM fix orcus native exception handling (NEH))
Because Calc import using liborcus for loading styles.xml.
Change-Id: I4c330ef8eea7d08214bf357531ee0bf7383ab788
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 287bd12b8323..7c30540dfe0c 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -50,14 +50,12 @@ endif
$(eval $(call gb_Module_add_moduledirs,libreoffice,\
android \
- $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \
+ $(if $(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),, \
animations \
) \
apple_remote \
avmedia \
- $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \
basctl \
- ) \
basegfx \
basic \
bean \
@@ -129,28 +127,26 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
sal \
salhelper \
sax \
- $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \
sc \
scaddins \
sccomp \
- ) \
$(call gb_Helper_optional,DESKTOP,scp2) \
scripting \
- $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \
+ $(if $(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),, \
sd \
sdext \
) \
$(call gb_Helper_optional,DESKTOP,setup_native) \
sfx2 \
shell \
- $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \
+ $(if $(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),, \
slideshow \
) \
smoketest \
solenv \
soltools \
sot \
- $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \
+ $(if $(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),, \
starmath \
) \
$(if $(ENABLE_CUSTOMTARGET_COMPONENTS),static) \
diff --git a/android/default-document/example_test.ods
b/android/default-document/example_test.ods
new file mode 100644
index 000000000000..4ee7cb7e60ea
Binary files /dev/null and b/android/default-document/example_test.ods differ
diff --git a/config_host.mk.in b/config_host.mk.in
index 5afb150745d3..6956ec936d6e 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -214,8 +214,8 @@ export ENABLE_SKIA_DEBUG=@ENABLE_SKIA_DEBUG@
export ENABLE_SYMBOLS_FOR=@ENABLE_SYMBOLS_FOR@
export ENABLE_VALGRIND=@ENABLE_VALGRIND@
export ENABLE_WASM_EXCEPTIONS=@ENABLE_WASM_EXCEPTIONS@
-export ENABLE_WASM_STRIP_ACCESSIBILITY=@ENABLE_WASM_STRIP@
-export ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_ACCESSIBILITY=
+export ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS=@ENABLE_WASM_STRIP@
export ENABLE_WASM_STRIP_CANVAS=@ENABLE_WASM_STRIP@
export ENABLE_WASM_STRIP_CHART=
export ENABLE_WASM_STRIP_DBACCESS=@ENABLE_WASM_STRIP@
@@ -231,6 +231,7 @@ export ENABLE_WASM_STRIP_RECENT=@ENABLE_WASM_STRIP@
export ENABLE_WASM_STRIP_RECOVERYUI=@ENABLE_WASM_STRIP@
export ENABLE_WASM_STRIP_SPLASH=@ENABLE_WASM_STRIP@
export ENABLE_WASM_STRIP_SWEXPORTS=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_SCEXPORTS=@ENABLE_WASM_STRIP@
export ENABLE_WERROR=@ENABLE_WERROR@
export ENABLE_Z7_DEBUG=@ENABLE_Z7_DEBUG@
export ENDIANNESS=@ENDIANNESS@
diff --git a/config_host/config_wasm_strip.h.in
b/config_host/config_wasm_strip.h.in
index 3150a960995c..f1e63fbede53 100644
--- a/config_host/config_wasm_strip.h.in
+++ b/config_host/config_wasm_strip.h.in
@@ -15,5 +15,6 @@
#define ENABLE_WASM_STRIP_RECOVERYUI 0
#define ENABLE_WASM_STRIP_SPLASH 0
#define ENABLE_WASM_STRIP_SWEXPORTS 0
+#define ENABLE_WASM_STRIP_SCEXPORTS 0
#endif
diff --git a/configure.ac b/configure.ac
index 93982e20b899..6bd4587da6c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3048,7 +3048,7 @@ if test "$enable_wasm_strip" = "yes"; then
test "${with_fonts+set}" = set || with_fonts=yes
test "${with_locales+set}" = set || with_locales=en
- AC_DEFINE(ENABLE_WASM_STRIP_ACCESSIBILITY)
+# AC_DEFINE(ENABLE_WASM_STRIP_ACCESSIBILITY)
AC_DEFINE(ENABLE_WASM_STRIP_CANVAS)
# AC_DEFINE(ENABLE_WASM_STRIP_CHART)
AC_DEFINE(ENABLE_WASM_STRIP_DBACCESS)
@@ -3063,6 +3063,7 @@ if test "$enable_wasm_strip" = "yes"; then
AC_DEFINE(ENABLE_WASM_STRIP_RECOVERYUI)
AC_DEFINE(ENABLE_WASM_STRIP_SPLASH)
AC_DEFINE(ENABLE_WASM_STRIP_SWEXPORTS)
+ AC_DEFINE(ENABLE_WASM_STRIP_SCEXPORTS)
fi
EMSCRIPTEN_NEH_MAJOR=3
diff --git a/extensions/Module_extensions.mk b/extensions/Module_extensions.mk
index 8b3a20127637..327314fb4250 100644
--- a/extensions/Module_extensions.mk
+++ b/extensions/Module_extensions.mk
@@ -56,7 +56,6 @@ $(eval $(call gb_Module_add_targets,extensions,\
endif
ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
-ifeq (,$(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS))
$(eval $(call gb_Module_add_targets,extensions,\
Library_updatefeed \
))
@@ -72,7 +71,6 @@ $(eval $(call gb_Module_add_check_targets,extensions,\
CppunitTest_extensions_test_update \
))
endif
-endif # !ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS
endif
ifeq ($(OS),WNT)
diff --git a/external/liborcus/ExternalProject_liborcus.mk
b/external/liborcus/ExternalProject_liborcus.mk
index cd86bcf49aa8..342a8b8a0d33 100644
--- a/external/liborcus/ExternalProject_liborcus.mk
+++ b/external/liborcus/ExternalProject_liborcus.mk
@@ -85,8 +85,8 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) :
$(call gb_ExternalProject_run,build,\
$(if $(liborcus_LIBS),LIBS='$(liborcus_LIBS)') \
$(if $(liborcus_CXXFLAGS),CXXFLAGS='$(liborcus_CXXFLAGS)') \
- $(if $(liborcus_CPPFLAGS),CPPFLAGS='$(liborcus_CPPFLAGS)
$(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT)') \
- $(if $(liborcus_LDFLAGS),LDFLAGS='$(liborcus_LDFLAGS)
$(gb_EMSCRIPTEN_EXCEPT)') \
+ $(if $(liborcus_CPPFLAGS),CPPFLAGS='$(liborcus_CPPFLAGS)
$(gb_EMSCRIPTEN_CPPFLAGS)') \
+ $(if $(liborcus_LDFLAGS),LDFLAGS='$(liborcus_LDFLAGS)') \
MDDS_CFLAGS='$(MDDS_CFLAGS)' \
MDDS_LIBS=' ' \
MAKE=$(MAKE) $(gb_RUN_CONFIGURE) ./configure \
diff --git a/static/CustomTarget_emscripten_fs_image.mk
b/static/CustomTarget_emscripten_fs_image.mk
index b1aefc41d1c3..fb282dc43e75 100644
--- a/static/CustomTarget_emscripten_fs_image.mk
+++ b/static/CustomTarget_emscripten_fs_image.mk
@@ -825,6 +825,251 @@ gb_emscripten_fs_image_files := \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swxform/toolbar/textobjectbar.xml
\
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swxform/toolbar/toolbar.xml
\
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/swxform/toolbar/viewerbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/menubar/menubar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/anchor.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/audit.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/cell.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/celledit.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/colheader.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/column_operations.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/conditional.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/draw.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/drawtext.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/form.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/formrichtext.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/formulabar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/freezepanes.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/graphic.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/media.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/notebookbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/oleobject.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/pagebreak.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/pivot.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/preview.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/row_operations.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/rowheader.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/sheettab.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/popupmenu/sparkline.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/statusbar/statusbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/alignmentbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/arrowsbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/arrowshapes.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/basicshapes.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/calloutshapes.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/classificationbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/colorbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/datastreams.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/drawbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/drawobjectbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/extrusionobjectbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/findbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/flowchartshapes.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/fontworkobjectbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/fontworkshapetype.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/formatobjectbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/formcontrols.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/formdesign.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/formsfilterbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/formsnavigationbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/formtextobjectbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/fullscreenbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/graffilterbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/graphicobjectbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/insertbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/insertcellsbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/linesbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/mediaobjectbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/notebookbarshortcuts.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/previewbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/singlemode.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/standardbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/starshapes.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/symbolshapes.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/textobjectbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/toolbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/toolbar/viewerbar.xml
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/advancedfilterdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/aggregatefunctionentry.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/allheaderfooterdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/analysisofvariancedialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/autoformattable.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/autosum.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/cellprotectionpage.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/changesourcedialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/chardialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/checkwarningdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/chisquaretestdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/colormenu.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/colorrowdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/colwidthdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/condformatmanager.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/conditionalentry.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/conditionalformatdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/conditionaliconset.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/conflictsdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/consolidatedialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/correlationdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/covariancedialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/createnamesdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/dapiservicedialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/databaroptions.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/datafielddialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/datafieldoptionsdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/dataform.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/dataformfragment.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/dataproviderdlg.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/datastreams.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/datetimetransformationentry.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/definedatabaserangedialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/definename.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/deletecells.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/deletecolumnentry.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/deletecontents.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/deleterowentry.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/descriptivestatisticsdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/doubledialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/dropmenu.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/erroralerttabpage-mobile.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/erroralerttabpage.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/exponentialsmoothingdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/externaldata.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/filldlg.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/filterdropdown.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/filterlist.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/filtersubdropdown.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/findreplaceentry.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/floatingborderstyle.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/floatinglinestyle.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/footerdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/formatcellsdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/formulacalculationoptions.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/fourieranalysisdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/functionpanel.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/goalseekdlg.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/gotosheetdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/groupbydate.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/groupbynumber.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/groupdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/headerdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/headerfootercontent.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/headerfooterdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/imoptdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/inputbar.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/inputstringdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/insertcells.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/insertname.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/insertsheet.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/integerdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/leftfooterdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/leftheaderdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/listmenu.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/managenamesdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/mergecellsdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/mergecolumnentry.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/movecopysheet.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/movingaveragedialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/multipleoperationsdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/namerangesdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/navigatorpanel.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/nosolutiondialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/notebookbar.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/notebookbar_compact.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/notebookbar_groupedbar_compact.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/notebookbar_groupedbar_full.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/notebookbar_groups.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/notebookbar_online.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/numberbox.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/numbertransformationentry.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/optcalculatepage.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/optchangespage.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/optcompatibilitypage.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/optdefaultpage.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/optdlg.ui \
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/optformula.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/optimalcolwidthdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/optimalrowheightdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/optsortlists.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/pagelistmenu.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/pagetemplatedialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/paradialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/paratemplatedialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/passfragment.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/pastespecial.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/pivotfielddialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/pivotfilterdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/pivottablelayoutdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/posbox.ui \
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/printareasdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/printeroptions.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/protectsheetdlg.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/queryrunstreamscriptdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/randomnumbergenerator.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/recalcquerydialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/regressiondialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/replacenulltransformationentry.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/retypepassdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/retypepassworddialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/rightfooterdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/rightheaderdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/rowheightdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/samplingdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/scenariodialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/scenariomenu.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/scgeneralpage.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/searchresults.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/selectdatasource.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/selectrange.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/selectsource.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sharedfirstfooterdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sharedfirstheaderdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sharedfooterdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sharedheaderdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sharedleftfooterdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sharedleftheaderdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sharedocumentdlg.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sharedwarningdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sheetprintpage.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/showchangesdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/showdetaildialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/showsheetdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sidebaralignment.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sidebarcellappearance.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sidebarnumberformat.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/simplerefdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/solverdlg.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/solveroptionsdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/solverprogressdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/solversuccessdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sortcriteriapage.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sortdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sortkey.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sortoptionspage.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sorttransformationentry.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sortwarning.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sparklinedatarangedialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/sparklinedialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/splitcolumnentry.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/standardfilterdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/statisticsinfopage.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/subtotaldialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/subtotalgrppage.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/subtotaloptionspage.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/swaprowsentry.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/tabcolordialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/textimportcsv.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/textimportoptions.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/texttransformationentry.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/tpviewpage.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/ttestdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/ungroupdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/validationcriteriapage.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/validationdialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/validationhelptabpage-mobile.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/validationhelptabpage.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/warnautocorrect.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/xmlsourcedialog.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/zoombox.ui
\
+
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/modules/scalc/ui/ztestdialog.ui
\
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/sfx/ui/addtargetdialog.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/sfx/ui/alienwarndialog.ui \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/soffice.cfg/sfx/ui/autoredactdialog.ui \
@@ -1118,6 +1363,7 @@ gb_emscripten_fs_image_files := \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/registry/res/fcfg_langpack_en-US.xcd \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/registry/res/registry_en-US.xcd \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/registry/writer.xcd \
+ $(INSTROOT)/$(LIBO_SHARE_FOLDER)/registry/calc.xcd \
$(INSTROOT)/$(LIBO_SHARE_FOLDER)/registry/xsltfilter.xcd \
$(INSTROOT)/$(LIBO_SHARE_PRESETS_FOLDER)/autotext/mytexts.bau \
$(INSTROOT)/$(LIBO_SHARE_PRESETS_FOLDER)/basic/dialog.xlc \
@@ -1133,6 +1379,7 @@ gb_emscripten_fs_image_files := \
$(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
$(SRCDIR)/android/default-document/example_larger.odt \
$(SRCDIR)/android/default-document/example.odt \
+ $(SRCDIR)/android/default-document/example_test.ods \
ifneq ($(ENABLE_WASM_STRIP_CHART),TRUE)
gb_emscripten_fs_image_files += \
diff --git a/static/emscripten/soffice_args.js
b/static/emscripten/soffice_args.js
index fa5e9dd4164d..973cfa279c17 100644
--- a/static/emscripten/soffice_args.js
+++ b/static/emscripten/soffice_args.js
@@ -1,6 +1,6 @@
Module['arguments'] = [
'--norestore',
'--nologo',
- '--writer',
- '/android/default-document/example_larger.odt'
+ '--calc',
+ '/android/default-document/example_larger.ods'
];
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index 5cacdf82ebcc..925228c8959d 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -22,7 +22,7 @@ $(eval $(call gb_Library_Library,svxcore))
$(eval $(call gb_Library_set_componentfile,svxcore,svx/util/svxcore,services))
$(eval $(call gb_Library_add_componentimpls,svxcore, \
- $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),,draw) \
+ $(if $(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),,draw) \
))
$(eval $(call gb_Library_add_sdi_headers,svxcore,svx/sdi/svxslots))
diff --git a/writerperfect/Library_wpftcalc.mk
b/writerperfect/Library_wpftcalc.mk
index 1ff7398c54da..9f235603017f 100644
--- a/writerperfect/Library_wpftcalc.mk
+++ b/writerperfect/Library_wpftcalc.mk
@@ -26,6 +26,10 @@ $(eval $(call gb_Library_set_include,wpftcalc,\
$(eval $(call
gb_Library_set_componentfile,wpftcalc,writerperfect/source/calc/wpftcalc,services))
+$(eval $(call gb_Library_add_componentimpls,wpftcalc, \
+ $(if $(ENABLE_WASM_STRIP_SCEXPORTS),,extended) \
+))
+
$(eval $(call gb_Library_use_sdk_api,wpftcalc))
$(eval $(call gb_Library_use_libraries,wpftcalc,\
@@ -46,7 +50,7 @@ $(eval $(call gb_Library_use_libraries,wpftcalc,\
$(eval $(call gb_Library_use_externals,wpftcalc,\
boost_headers \
- etonyek \
+ $(if $(ENABLE_WASM_STRIP_SCEXPORTS),,etonyek) \
odfgen \
revenge \
mwaw \
@@ -60,10 +64,15 @@ $(eval $(call gb_Library_use_externals,wpftcalc,\
icuuc \
))
+ifneq ($(ENABLE_WASM_STRIP_SCEXPORTS),TRUE)
+$(eval $(call gb_Library_add_exception_objects,wpftcalc,\
+ writerperfect/source/calc/NumbersImportFilter \
+))
+endif
+
$(eval $(call gb_Library_add_exception_objects,wpftcalc,\
writerperfect/source/calc/MSWorksCalcImportFilter \
writerperfect/source/calc/MWAWCalcImportFilter \
- writerperfect/source/calc/NumbersImportFilter \
writerperfect/source/calc/StarOfficeCalcImportFilter \
))
diff --git a/writerperfect/Module_writerperfect.mk
b/writerperfect/Module_writerperfect.mk
index c09dc27b1bde..859ff5037340 100644
--- a/writerperfect/Module_writerperfect.mk
+++ b/writerperfect/Module_writerperfect.mk
@@ -20,11 +20,11 @@
$(eval $(call gb_Module_Module,writerperfect))
$(eval $(call gb_Module_add_targets,writerperfect,\
- $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \
- Library_wpftcalc \
+ $(if $(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),, \
Library_wpftdraw \
Library_wpftimpress \
) \
+ Library_wpftcalc \
Library_wpftwriter \
Library_writerperfect \
UIConfig_writerperfect \
diff --git a/writerperfect/source/calc/wpftcalc.component
b/writerperfect/source/calc/wpftcalc.component
index 404d09b6ca6a..7054f7699534 100644
--- a/writerperfect/source/calc/wpftcalc.component
+++ b/writerperfect/source/calc/wpftcalc.component
@@ -23,6 +23,7 @@
constructor="org_libreoffice_comp_Calc_NumbersImportFilter_get_implementation">
<service name="com.sun.star.document.ImportFilter"/>
<service name="com.sun.star.document.ExtendedTypeDetection"/>
+ <optional/>
</implementation>
<implementation name="org.libreoffice.comp.Calc.StarOfficeCalcImportFilter"
constructor="org_libreoffice_comp_Calc_StarOfficeCalcImportFilter_get_implementation">
diff --git a/writerperfect/source/calc/wpftcalc.component.extended
b/writerperfect/source/calc/wpftcalc.component.extended
new file mode 100644
index 000000000000..81bdc103cc95
--- /dev/null
+++ b/writerperfect/source/calc/wpftcalc.component.extended
@@ -0,0 +1,7 @@
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+org.libreoffice.comp.Calc.NumbersImportFilter
diff --git a/xmloff/Library_xo.mk b/xmloff/Library_xo.mk
index 50d268b470b1..6df660463ae6 100644
--- a/xmloff/Library_xo.mk
+++ b/xmloff/Library_xo.mk
@@ -24,10 +24,8 @@ $(eval $(call
gb_Library_set_componentfile,xo,xmloff/util/xo,services))
$(eval $(call gb_Library_add_componentimpls,xo, \
$(if $(ENABLE_WASM_STRIP_CHART),,chart) \
draw \
- $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \
- impress \
- writer \
- ) \
+ impress \
+ writer \
))
$(eval $(call
gb_Library_set_precompiled_header,xo,xmloff/inc/pch/precompiled_xo))
commit 89c65bf277937904ea45ba3dc4b1a398488a7319
Author: Thorsten Behrens <[email protected]>
AuthorDate: Sat Aug 13 08:52:43 2022 +0200
Commit: Thorsten Behrens <[email protected]>
CommitDate: Fri Aug 19 14:12:15 2022 +0200
Disable languagetool for WASM build
Change-Id: Icd0face05c33bbb1b56230a59015402d5f565422
diff --git a/config_host.mk.in b/config_host.mk.in
index 5d5d5d681b83..5afb150745d3 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -223,6 +223,7 @@ export ENABLE_WASM_STRIP_EPUB=@ENABLE_WASM_STRIP@
export ENABLE_WASM_STRIP_EXTRA=@ENABLE_WASM_STRIP@
export ENABLE_WASM_STRIP_GUESSLANG=@ENABLE_WASM_STRIP@
export ENABLE_WASM_STRIP_HUNSPELL=
+export ENABLE_WASM_STRIP_LANGUAGETOOL=@ENABLE_WASM_STRIP@
export ENABLE_WASM_STRIP_LOCALES=@ENABLE_WASM_STRIP@
export ENABLE_WASM_STRIP_PINGUSER=@ENABLE_WASM_STRIP@
export ENABLE_WASM_STRIP_PREMULTIPLY=@ENABLE_WASM_STRIP@
diff --git a/configure.ac b/configure.ac
index c639bda264fc..93982e20b899 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3056,6 +3056,7 @@ if test "$enable_wasm_strip" = "yes"; then
AC_DEFINE(ENABLE_WASM_STRIP_EXTRA)
AC_DEFINE(ENABLE_WASM_STRIP_GUESSLANG)
# AC_DEFINE(ENABLE_WASM_STRIP_HUNSPELL)
+ AC_DEFINE(ENABLE_WASM_STRIP_LANGUAGETOOL)
AC_DEFINE(ENABLE_WASM_STRIP_PINGUSER)
AC_DEFINE(ENABLE_WASM_STRIP_PREMULTIPLY)
AC_DEFINE(ENABLE_WASM_STRIP_RECENT)
diff --git a/lingucomponent/Module_lingucomponent.mk
b/lingucomponent/Module_lingucomponent.mk
index 13f1a829d98a..87e1b1f4d585 100644
--- a/lingucomponent/Module_lingucomponent.mk
+++ b/lingucomponent/Module_lingucomponent.mk
@@ -25,10 +25,15 @@ $(eval $(call gb_Module_add_targets,lingucomponent,\
))
endif
+ifneq ($(ENABLE_WASM_STRIP_LANGUAGETOOL),TRUE)
+$(eval $(call gb_Module_add_targets,lingucomponent,\
+ Library_LanguageTool \
+))
+endif
+
$(eval $(call gb_Module_add_targets,lingucomponent,\
$(if $(filter iOS MACOSX,$(OS)),Library_MacOSXSpell) \
Library_numbertext \
- Library_LanguageTool \
))
# vim: set noet sw=4 ts=4:
commit 0e7cc8f0df5b2feb7367302f9bc454a75b305415
Author: TheRock Builder <libo@therock>
AuthorDate: Thu Apr 28 14:19:46 2022 +0000
Commit: Thorsten Behrens <[email protected]>
CommitDate: Fri Aug 19 14:12:15 2022 +0200
Hack lokit API to be useable from JS
So LOWA users/embeddings can call uno slots
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 8fb88eedfae7..194ef4e2d9b3 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1032,7 +1032,7 @@ static void
doc_postWindowGestureEvent(LibreOfficeKitDocument* pThis,
int nX,
int nY,
int nOffset);
-static void doc_postUnoCommand(LibreOfficeKitDocument* pThis,
+void doc_postUnoCommand(LibreOfficeKitDocument* pThis,
const char* pCommand,
const char* pArguments,
bool bNotifyWhenFinished);
@@ -4218,7 +4218,7 @@ void LibLibreOffice_Impl::dumpState(rtl::OStringBuffer
&rState)
vcl::lok::dumpState(rState);
}
-static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char*
pCommand, const char* pArguments, bool bNotifyWhenFinished)
+void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pCommand,
const char* pArguments, bool bNotifyWhenFinished)
{
comphelper::ProfileZone aZone("doc_postUnoCommand");
@@ -6990,9 +6990,19 @@ LibreOfficeKit *libreofficekit_hook_2(const char*
install_path, const char* user
}
SAL_JNI_EXPORT
-LibreOfficeKit *libreofficekit_hook(const char* install_path)
+LibreOfficeKitDocument *libreofficekit_hook(const char*)
{
- return libreofficekit_hook_2(install_path, nullptr);
+ if (!gImpl)
+ {
+ gImpl = new LibLibreOffice_Impl();
+ xContext.set( ::comphelper::getProcessComponentContext(),
uno::UNO_SET_THROW );
+ }
+
+ uno::Reference<frame::XDesktop> xDesktop =
frame::Desktop::create(xContext);
+ uno::Reference<lang::XComponent> xComponent =
xDesktop->getCurrentComponent();
+ LibLODocument_Impl* pDocument = new LibLODocument_Impl(xComponent, 0);
+
+ return pDocument;
}
SAL_JNI_EXPORT
commit 7f2ef67814ee607f53059681bf82ed3082fc7107
Author: TheRock Builder <libo@therock>
AuthorDate: Thu Apr 28 14:19:22 2022 +0000
Commit: Thorsten Behrens <[email protected]>
CommitDate: Fri Aug 19 14:12:15 2022 +0200
Add more functions to export for LOWA
diff --git a/desktop/Executable_soffice_bin.mk
b/desktop/Executable_soffice_bin.mk
index b0711af84952..4e321fa932e9 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -50,7 +50,7 @@ endif
ifeq ($(OS),EMSCRIPTEN)
$(eval $(call gb_Executable_add_ldflags,soffice_bin,\
- -s
EXPORTED_FUNCTIONS=["_main"$(COMMA)"_libreofficekit_hook"$(COMMA)"_libreofficekit_hook_2"$(COMMA)"_lok_preinit"$(COMMA)"_lok_preinit_2"]
\
+ -s
EXPORTED_FUNCTIONS=["_main"$(COMMA)"_libreofficekit_hook"$(COMMA)"_libreofficekit_hook_2"$(COMMA)"_lok_preinit"$(COMMA)"_lok_preinit_2"$(COMMA)"_doc_postUnoCommand"]
\
))
endif
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index f4ec28673142..19ad9b86c887 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -27,7 +27,7 @@ gb_EMSCRIPTEN_LDFLAGS += -s TOTAL_MEMORY=1GB -s
PTHREAD_POOL_SIZE=4
# To keep the link time (and memory) down, prevent all rewriting options from
wasm-emscripten-finalize
# See emscripten.py, finalize_wasm, modify_wasm = True
# So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK)
-gb_EMSCRIPTEN_LDFLAGS += --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s
ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s
EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16","printErr","ccall","cwrap"]
+gb_EMSCRIPTEN_LDFLAGS += --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s
ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s
EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16","UTF8ToString","allocateUTF8","printErr","ccall","cwrap"]
gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS
-DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG
-DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
gb_Executable_EXT := .html
commit 49c8bea41e6c295c4d8f8e6f7b10f0a1b38b6f68
Author: TheRock Builder <libo@therock>
AuthorDate: Wed Apr 27 17:01:53 2022 +0000
Commit: Thorsten Behrens <[email protected]>
CommitDate: Fri Aug 19 14:12:15 2022 +0200
Revert "Hack / temp"
This reverts commit 66263d549caf2bf2892e9d6c6ca3c2423df38164.
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 36bcc145add9..8fb88eedfae7 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -9,9 +9,6 @@
#include <config_features.h>
-#include <emscripten.h>
-
-
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -1329,7 +1326,7 @@ static OUString getGenerator()
return sGenerator.replaceFirst("%1", os);
}
-//extern "C" {
+extern "C" {
CallbackFlushHandler::TimeoutIdle::TimeoutIdle( CallbackFlushHandler* handler )
: Timer( "lokit timer callback" )
@@ -6969,9 +6966,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const
char* pAppPath, const char
return bInitialized;
}
-extern "C" {
-
-EMSCRIPTEN_KEEPALIVE
+SAL_JNI_EXPORT
LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char*
user_profile_url)
{
static bool alreadyCalled = false;
@@ -6994,7 +6989,7 @@ LibreOfficeKit *libreofficekit_hook_2(const char*
install_path, const char* user
return static_cast<LibreOfficeKit*>(gImpl);
}
-EMSCRIPTEN_KEEPALIVE
+SAL_JNI_EXPORT
LibreOfficeKit *libreofficekit_hook(const char* install_path)
{
return libreofficekit_hook_2(install_path, nullptr);
commit bfd52f1d989cc8ac1472a0b072082995c6c85e85
Author: TheRock Builder <libo@therock>
AuthorDate: Wed Apr 27 17:01:34 2022 +0000
Commit: Thorsten Behrens <[email protected]>
CommitDate: Fri Aug 19 14:12:15 2022 +0200
Hack / temp
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 8fb88eedfae7..36bcc145add9 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -9,6 +9,9 @@
#include <config_features.h>
+#include <emscripten.h>
+
+
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -1326,7 +1329,7 @@ static OUString getGenerator()
return sGenerator.replaceFirst("%1", os);
}
-extern "C" {
+//extern "C" {
CallbackFlushHandler::TimeoutIdle::TimeoutIdle( CallbackFlushHandler* handler )
: Timer( "lokit timer callback" )
@@ -6966,7 +6969,9 @@ static int lo_initialize(LibreOfficeKit* pThis, const
char* pAppPath, const char
return bInitialized;
}
-SAL_JNI_EXPORT
+extern "C" {
+
+EMSCRIPTEN_KEEPALIVE
LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char*
user_profile_url)
{
static bool alreadyCalled = false;
@@ -6989,7 +6994,7 @@ LibreOfficeKit *libreofficekit_hook_2(const char*
install_path, const char* user
return static_cast<LibreOfficeKit*>(gImpl);
}
-SAL_JNI_EXPORT
+EMSCRIPTEN_KEEPALIVE
LibreOfficeKit *libreofficekit_hook(const char* install_path)
{
return libreofficekit_hook_2(install_path, nullptr);
commit 204213c37a3aab507af740c31d71b87490cd950e
Author: TheRock Builder <libo@therock>
AuthorDate: Wed Apr 27 16:51:46 2022 +0000
Commit: Thorsten Behrens <[email protected]>
CommitDate: Fri Aug 19 14:12:15 2022 +0200
More fixup of gbuild
diff --git a/desktop/Executable_soffice_bin.mk
b/desktop/Executable_soffice_bin.mk
index c5e9587d516e..b0711af84952 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -45,14 +45,14 @@ $(eval $(call gb_Executable_add_ldflags,soffice_bin,\
endif
+endif
+
ifeq ($(OS),EMSCRIPTEN)
$(eval $(call gb_Executable_add_ldflags,soffice_bin,\
-
-sEXPORTED_FUNCTIONS=_main,_libreofficekit_hook,_libreofficekit_hook_2,_lok_preinit,_lok_preinit_2
\
+ -s
EXPORTED_FUNCTIONS=["_main"$(COMMA)"_libreofficekit_hook"$(COMMA)"_libreofficekit_hook_2"$(COMMA)"_lok_preinit"$(COMMA)"_lok_preinit_2"]
\
))
endif
-endif
-
# vim: set ts=4 sw=4 et:
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 5d0ef59d8360..f4ec28673142 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -24,13 +24,10 @@ gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS)
# Initial memory size and worker thread pool
gb_EMSCRIPTEN_LDFLAGS += -s TOTAL_MEMORY=1GB -s PTHREAD_POOL_SIZE=4
-# add a few critical functions to export
-gb_EMSCRIPTEN_LDFLAGS += -sEXPORTED_RUNTIME_METHODS=ccall,cwrap
-
# To keep the link time (and memory) down, prevent all rewriting options from
wasm-emscripten-finalize
# See emscripten.py, finalize_wasm, modify_wasm = True
# So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK)
-gb_EMSCRIPTEN_LDFLAGS += --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s
ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s
EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16","printErr"]
+gb_EMSCRIPTEN_LDFLAGS += --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s
ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s
EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16","printErr","ccall","cwrap"]
gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS
-DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG
-DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
gb_Executable_EXT := .html
commit afd159727685e121a0a3a7f6c17f7759040b360b
Author: TheRock Builder <libo@therock>
AuthorDate: Wed Apr 27 16:19:59 2022 +0000
Commit: Thorsten Behrens <[email protected]>
CommitDate: Fri Aug 19 14:12:15 2022 +0200
Fix logic
diff --git a/desktop/Executable_soffice_bin.mk
b/desktop/Executable_soffice_bin.mk
index d9489bdad098..c5e9587d516e 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -45,7 +45,7 @@ $(eval $(call gb_Executable_add_ldflags,soffice_bin,\
endif
-ifeq (TRUE,$(EMSCRIPTEN))
+ifeq ($(OS),EMSCRIPTEN)
$(eval $(call gb_Executable_add_ldflags,soffice_bin,\
-sEXPORTED_FUNCTIONS=_main,_libreofficekit_hook,_libreofficekit_hook_2,_lok_preinit,_lok_preinit_2
\
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index efc117424098..c315a113ca89 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -137,7 +137,7 @@ $(eval $(call gb_Library_add_exception_objects,sofficeapp,\
desktop/source/lib/lokandroid) \
))
else
-ifeq ($(filter TRUE,$(USING_X11) $(DISABLE_GUI) $(EMSCRIPTEN)),)
+ifneq ($(filter TRUE,$(USING_X11) $(DISABLE_GUI))($filter EMSCRIPTEN,$(OS)),)
$(eval $(call gb_Library_add_exception_objects,sofficeapp,\
desktop/source/lib/init \
desktop/source/lib/lokinteractionhandler \
commit 15239881e0faae11de5f618a0d8978a1cbb151e3
Author: TheRock Builder <libo@therock>
AuthorDate: Wed Apr 27 15:36:25 2022 +0000
Commit: Thorsten Behrens <[email protected]>
CommitDate: Fri Aug 19 14:12:14 2022 +0200
Add LOKit functions and whitelist export for it to WASM
For calling into LOWA from native JS, make lokit functions available
diff --git a/desktop/Executable_soffice_bin.mk
b/desktop/Executable_soffice_bin.mk
index a3c3ff258613..d9489bdad098 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -45,6 +45,14 @@ $(eval $(call gb_Executable_add_ldflags,soffice_bin,\
endif
+ifeq (TRUE,$(EMSCRIPTEN))
+
+$(eval $(call gb_Executable_add_ldflags,soffice_bin,\
+
-sEXPORTED_FUNCTIONS=_main,_libreofficekit_hook,_libreofficekit_hook_2,_lok_preinit,_lok_preinit_2
\
+))
+
+endif
+
endif
# vim: set ts=4 sw=4 et:
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index 70f4b07ea045..efc117424098 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -137,20 +137,13 @@ $(eval $(call
gb_Library_add_exception_objects,sofficeapp,\
desktop/source/lib/lokandroid) \
))
else
-ifeq ($(USING_X11),TRUE)
+ifeq ($(filter TRUE,$(USING_X11) $(DISABLE_GUI) $(EMSCRIPTEN)),)
$(eval $(call gb_Library_add_exception_objects,sofficeapp,\
desktop/source/lib/init \
desktop/source/lib/lokinteractionhandler \
desktop/source/lib/lokclipboard \
))
endif
-ifeq ($(DISABLE_GUI),TRUE)
-$(eval $(call gb_Library_add_exception_objects,sofficeapp,\
- desktop/source/lib/init \
- desktop/source/lib/lokinteractionhandler \
- desktop/source/lib/lokclipboard \
-))
-endif
endif
# vim: set ts=4 sw=4 et:
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 61424f72c44f..5d0ef59d8360 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -24,6 +24,9 @@ gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS)
# Initial memory size and worker thread pool
gb_EMSCRIPTEN_LDFLAGS += -s TOTAL_MEMORY=1GB -s PTHREAD_POOL_SIZE=4
+# add a few critical functions to export
+gb_EMSCRIPTEN_LDFLAGS += -sEXPORTED_RUNTIME_METHODS=ccall,cwrap
+
# To keep the link time (and memory) down, prevent all rewriting options from
wasm-emscripten-finalize
# See emscripten.py, finalize_wasm, modify_wasm = True
# So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK)
commit 4ef50078a2db436fb4a0bba95324f0af1d7edb25
Author: Jan-Marek Glogowski <[email protected]>
AuthorDate: Tue Apr 26 18:11:55 2022 +0200
Commit: Thorsten Behrens <[email protected]>
CommitDate: Fri Aug 19 14:12:14 2022 +0200
WASM HACK fix NEH build
Workaround a toolchain bug. Also see comment in ~Desktop().
Change-Id: I158877b78794d81ccdc74e4d5fc023e2061c1d96
diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index 3372e751dbf1..8eb71d3b13b5 100644
--- a/desktop/inc/app.hxx
+++ b/desktop/inc/app.hxx
@@ -166,7 +166,7 @@ class Desktop final : public Application
BootstrapStatus m_aBootstrapStatus;
std::unique_ptr<Lockfile> m_xLockfile;
- Timer m_firstRunTimer;
+ Timer *m_firstRunTimer;
std::thread m_aUpdateThread;
};
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 058e953ac60e..73e55961c71b 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -426,14 +426,16 @@ Desktop::Desktop()
, m_bServicesRegistered(false)
, m_aBootstrapError(BE_OK)
, m_aBootstrapStatus(BS_OK)
- , m_firstRunTimer( "desktop::Desktop m_firstRunTimer" )
+ , m_firstRunTimer(new Timer("desktop::Desktop m_firstRunTimer"))
{
- m_firstRunTimer.SetTimeout(3000); // 3 sec.
- m_firstRunTimer.SetInvokeHandler(LINK(this, Desktop, AsyncInitFirstRun));
+ m_firstRunTimer->SetTimeout(3000); // 3 sec.
+ m_firstRunTimer->SetInvokeHandler(LINK(this, Desktop, AsyncInitFirstRun));
}
Desktop::~Desktop()
{
+// Uncommenting this delete breaks the WASM output with a runtime error
+// delete m_firstRunTimer;
}
void Desktop::Init()
@@ -2560,7 +2562,7 @@ void Desktop::CheckFirstRun( )
// use VCL timer, which won't trigger during shutdown if the
// application exits before timeout
- m_firstRunTimer.Start();
+ m_firstRunTimer->Start();
#ifdef _WIN32
// Check if Quickstarter should be started (on Windows only)
commit 4b0a4cb9a42140c4fa9f091c086421fe6219ace6
Author: Jan-Marek Glogowski <[email protected]>
AuthorDate: Sun Feb 20 14:06:54 2022 +0100
Commit: Thorsten Behrens <[email protected]>
CommitDate: Fri Aug 19 14:12:14 2022 +0200
fixme static tests
Change-Id: I2aaffa032bd531272257ca40d6f9b9d25c4de5aa
diff --git a/sal/cppunittester/cppunittester.cxx
b/sal/cppunittester/cppunittester.cxx
index 88f59bb64bcf..e48553b2cf6d 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -245,6 +245,7 @@ public:
, protectors(protectors_)
, result(result_)
{
+ (void) args_;
}
ProtectedFixtureFunctor(const ProtectedFixtureFunctor&) = delete;
ProtectedFixtureFunctor& operator=(const ProtectedFixtureFunctor&) =
delete;
commit 1ba8fada300f9c2550248258038577838965e237
Author: Jan-Marek Glogowski <[email protected]>
AuthorDate: Sun Jan 9 14:49:28 2022 +0100
Commit: Thorsten Behrens <[email protected]>
CommitDate: Fri Aug 19 14:12:14 2022 +0200
Add a larger Writer example document
Change-Id: I4bc9a82c7f99563af8da62f889b51d1b583df760
diff --git a/android/default-document/example_larger.odt
b/android/default-document/example_larger.odt
new file mode 100644
index 000000000000..1b3a1dfb877a
Binary files /dev/null and b/android/default-document/example_larger.odt differ
diff --git a/static/CustomTarget_emscripten_fs_image.mk
b/static/CustomTarget_emscripten_fs_image.mk
index 9df532cbff36..b1aefc41d1c3 100644
--- a/static/CustomTarget_emscripten_fs_image.mk
+++ b/static/CustomTarget_emscripten_fs_image.mk
@@ -1131,6 +1131,7 @@ gb_emscripten_fs_image_files := \
$(INSTROOT)/$(LIBO_SHARE_RESOURCE_FOLDER)/common/fonts/opens___.ttf \
$(INSTROOT)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
$(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
+ $(SRCDIR)/android/default-document/example_larger.odt \
$(SRCDIR)/android/default-document/example.odt \
ifneq ($(ENABLE_WASM_STRIP_CHART),TRUE)
diff --git a/static/emscripten/soffice_args.js
b/static/emscripten/soffice_args.js
index 7ecf7e8988e8..fa5e9dd4164d 100644
--- a/static/emscripten/soffice_args.js
+++ b/static/emscripten/soffice_args.js
@@ -2,5 +2,5 @@ Module['arguments'] = [
'--norestore',
'--nologo',
'--writer',
- '/android/default-document/example.odt'
+ '/android/default-document/example_larger.odt'
];
commit 177d851d43acbd76a88ee706a16b783b924e1717
Author: Jan-Marek Glogowski <[email protected]>
AuthorDate: Wed Nov 17 01:57:33 2021 +0100
Commit: Thorsten Behrens <[email protected]>
CommitDate: Fri Aug 19 14:12:14 2022 +0200
WIP: async popup menus
A first patch to get some feedback. Asnyc LO popup menus are still
buggy, as I'm not sure where to call the PopupMenu::Finish for
them.
Also the XDialogClosedListener is currently just for convenience
and might want some separate notifier.
Fun fact, that ImplExecute / ImplPopup is called for submenu, but
then doesn't execute. And generally the naming of some variables
is IMHO wrong; I might also prefix Menu members with "m_" for
easier readability.
Change-Id: Id8b413aa6b4699201e58db0113649c6b224d33b6
diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx
index ee445710b9c0..a1c0f9aa5ad2 100644
--- a/include/sfx2/dispatch.hxx
+++ b/include/sfx2/dispatch.hxx
@@ -20,6 +20,7 @@
#define INCLUDED_SFX2_DISPATCH_HXX
#include <memory>
+#include <functional>
#include <sal/config.h>
#include <sfx2/dllapi.h>
#include <sfx2/toolbarids.hxx>
@@ -42,6 +43,7 @@ struct SfxDispatcher_Impl;
namespace com::sun::star::awt { class XPopupMenu; }
namespace vcl { class Window; }
+namespace com::sun::star::ui::dialogs { struct DialogClosedEvent; }
enum class SfxDispatcherPopFlags
{
@@ -136,8 +138,14 @@ public:
SfxViewFrame* GetFrame() const;
SfxModule* GetModule() const;
- void ExecutePopup( const OUString &rResName, vcl::Window
*pWin = nullptr, const Point *pPos = nullptr );
- static void ExecutePopup( vcl::Window *pWin = nullptr, const Point
*pPosPixel = nullptr );
+ /**
+ * @param rCloseFunc
+ * If this is !nullptr, the popup will be just shown / run async and
rCloseFunc will be called on close.
+ */
+ void ExecutePopup(const OUString &rResName, vcl::Window *pWin = nullptr,
const Point *pPos = nullptr,
+ const std::function<void(sal_Int16)>& rCloseFunc =
nullptr);
+ static void ExecutePopup(vcl::Window *pWin = nullptr, const Point
*pPosPixel = nullptr,
+ const std::function<void(sal_Int16)>& rCloseFunc
= nullptr);
bool IsAppDispatcher() const;
bool IsFlushed() const;
diff --git a/include/toolkit/awt/vclxmenu.hxx b/include/toolkit/awt/vclxmenu.hxx
index 096c370bce82..ffa89e9a8511 100644
--- a/include/toolkit/awt/vclxmenu.hxx
+++ b/include/toolkit/awt/vclxmenu.hxx
@@ -25,10 +25,11 @@
#include <toolkit/helper/listenermultiplexer.hxx>
#include <com/sun/star/awt/XMenuBar.hpp>
-#include <com/sun/star/awt/XPopupMenu.hpp>
+#include <com/sun/star/awt/XPopupMenuAsync.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/ui/dialogs/XDialogClosedListener.hpp>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/weak.hxx>
@@ -39,6 +40,7 @@
#include <vector>
+struct DialogClosedEvent;
class Menu;
class MenuBar;
class PopupMenu;
@@ -51,10 +53,11 @@ typedef ::std::vector<
typedef void (*MenuUserDataReleaseFunction)(void*);
class TOOLKIT_DLLPUBLIC VCLXMenu : public css::awt::XMenuBar,
- public css::awt::XPopupMenu,
+ public css::awt::XPopupMenuAsync,
public css::lang::XServiceInfo,
public css::lang::XTypeProvider,
public css::lang::XUnoTunnel,
+ public
css::ui::dialogs::XDialogClosedListener,
public ::cppu::OWeakObject
{
private:
@@ -76,7 +79,6 @@ public:
VCLXMenu( Menu* pMenu );
virtual ~VCLXMenu() override;
-
Menu* GetMenu() const { return mpMenu; }
bool IsPopupMenu() const;
void setUserValue(sal_uInt16 nItemId, void* nUserValue,
MenuUserDataReleaseFunction aFunc);
@@ -137,10 +139,20 @@ public:
virtual void SAL_CALL setItemImage( ::sal_Int16 nItemId, const
css::uno::Reference< css::graphic::XGraphic >& xGraphic, sal_Bool bScale )
override;
virtual css::uno::Reference< css::graphic::XGraphic > SAL_CALL
getItemImage( ::sal_Int16 nItemId ) override;
+ // css::awt::XPopupMenuAsync
+ virtual sal_Bool SAL_CALL popup(const css::uno::Reference<
css::awt::XWindowPeer >& Parent, const css::awt::Rectangle& Position,
+ ::sal_Int16 Direction, const
css::uno::Reference<css::ui::dialogs::XDialogClosedListener>& xListener)
override;
+
// css::lang::XServiceInfo
virtual OUString SAL_CALL getImplementationName( ) override;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(
) override;
+
+ // css::ui::dialogs::XDialogClosedListener
+ virtual void SAL_CALL dialogClosed(const
css::ui::dialogs::DialogClosedEvent& aEvent) override;
+
+ // XEventListener (base of XDialogClosedListener)
+ virtual void SAL_CALL disposing(css::lang::EventObject const & Source)
override;
};
class UNLESS_MERGELIBS(TOOLKIT_DLLPUBLIC) VCLXMenuBar final : public VCLXMenu
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index bb0ef8cee6db..161ee029e2a8 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -44,6 +44,7 @@ class Menu;
class MenuItemList;
class Image;
class PopupMenu;
+struct PopupMenuFinishState;
class KeyEvent;
class MenuFloatingWindow;
class SalMenu;
@@ -54,6 +55,7 @@ enum class FloatWinPopupFlags;
enum class VclEventId;
namespace com::sun::star::awt { class XPopupMenu; }
+namespace com::sun::star::ui::dialogs { class XDialogClosedListener; }
namespace com::sun::star::accessibility { class XAccessible; }
namespace vcl
@@ -494,11 +496,16 @@ class VCL_DLLPUBLIC PopupMenu final : public Menu
friend struct MenuItemData;
private:
+ struct PopupMenuFinishState* m_pState;
+
SAL_DLLPRIVATE MenuFloatingWindow * ImplGetFloatingWindow() const;
SAL_DLLPRIVATE bool PrepareRun(const VclPtr<vcl::Window>& pParentWin,
tools::Rectangle& rRect, FloatWinPopupFlags& nPopupModeFlags, Menu* pSFrom,
bool& bRealExecute, VclPtr<MenuFloatingWindow>&);
- SAL_DLLPRIVATE bool Run(const VclPtr<MenuFloatingWindow>&, bool
bRealExecute, bool bPreSelectFirst, FloatWinPopupFlags nPopupModeFlags, Menu*
pSFrom, const tools::Rectangle& rRect);
+ SAL_DLLPRIVATE bool Run(const VclPtr<MenuFloatingWindow>&, bool
bRealExecute, bool bPreSelectFirst, FloatWinPopupFlags nPopupModeFlags, Menu*
pSFrom, const tools::Rectangle& rRect,
+ const
css::uno::Reference<css::ui::dialogs::XDialogClosedListener>* xListener);
SAL_DLLPRIVATE void FinishRun(const VclPtr<MenuFloatingWindow>&, const
VclPtr<vcl::Window>& pParentWin, bool bRealExecute, bool bIsNativeMenu);
SAL_DLLPRIVATE sal_uInt16 ImplExecute(const VclPtr<vcl::Window>&
pParentWin, const tools::Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags,
Menu* pSFrom, bool bPreSelectFirst);
+ SAL_DLLPRIVATE bool ImplPopup(const VclPtr<vcl::Window>& pParentWin, const
tools::Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom, bool
bPreSelectFirst,
+ const
css::uno::Reference<css::ui::dialogs::XDialogClosedListener>&);
SAL_DLLPRIVATE void ImplFlushPendingSelect();
SAL_DLLPRIVATE tools::Long ImplCalcHeight( sal_uInt16 nEntries ) const;
SAL_DLLPRIVATE sal_uInt16 ImplCalcVisEntries( tools::Long nMaxHeight,
sal_uInt16 nStartEntry, sal_uInt16* pLastVisible = nullptr ) const;
@@ -521,6 +528,12 @@ public:
sal_uInt16 Execute( vcl::Window* pWindow, const Point& rPopupPos );
sal_uInt16 Execute( vcl::Window* pWindow, const tools::Rectangle& rRect,
PopupMenuFlags nFlags = PopupMenuFlags::NONE );
+ bool Popup(vcl::Window* pParentWin, const Point& rPopupPos,
+ const
css::uno::Reference<css::ui::dialogs::XDialogClosedListener>&);
+ bool Popup(vcl::Window* pParentWin, const tools::Rectangle& rRect,
+ const
css::uno::Reference<css::ui::dialogs::XDialogClosedListener>&, PopupMenuFlags =
PopupMenuFlags::NONE);
+ void Finish();
+
// for the TestTool
void EndExecute();
virtual void SelectItem(sal_uInt16 nId) override;
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index fb3be9253e51..9c4764f04d3e 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -1857,6 +1857,7 @@ $(eval $(call
gb_UnoApi_add_idlfiles,offapi,com/sun/star/awt,\
XPatternField \
XPointer \
XPopupMenu \
+ XPopupMenuAsync \
XPrinter \
XPrinterPropertySet \
XPrinterServer \
diff --git a/offapi/com/sun/star/awt/XPopupMenuAsync.idl
b/offapi/com/sun/star/awt/XPopupMenuAsync.idl
new file mode 100644
index 000000000000..d3f7b317f086
--- /dev/null
+++ b/offapi/com/sun/star/awt/XPopupMenuAsync.idl
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+#ifndef __com_sun_star_awt_XPopupMenuAsync_idl__
+#define __com_sun_star_awt_XPopupMenuAsync_idl__
+
+#include <com/sun/star/awt/XPopupMenu.idl>
+#include <com/sun/star/ui/dialogs/XDialogClosedListener.idl>
+
+module com { module sun { module star { module awt {
+
+/** shows a pop-up menu without blocking.
+ */
+interface XPopupMenuAsync: XPopupMenu
+{
+ /** just shows the popup menu without blocking and calls the
+ XDialogClosedListener when closed,
+
+ @param Parent
+ the parent window.
+
+ @param Position
+ a Rectangle representing the coordinates system
+ where the popup menu should be executed.
+
+ @param Direction
+ the direction in which a popup menu will grow, as specified
+ by one of the PopupMenuDirection constants.
+
+ @param xListener
+ notified, if the popup is closed.
+
+ @return
+ returns true, if the popup has started to run async.
+ May fail, if the native backend doesn't implement async popups.
+ */
+ boolean popup([in] XWindowPeer Parent, [in] Rectangle Position, [in] short
Direction,
+ [in] ::com::sun::star::ui::dialogs::XDialogClosedListener
xListener);
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index 31636aa13b57..862ccedd7a07 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -806,7 +806,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt,
::sd::Window* pWin)
bool bShouldDisableEditHyperlink = ShouldDisableEditHyperlink();
if(rCEvt.IsMouseEvent())
- GetViewFrame()->GetDispatcher()->ExecutePopup( aPopupId );
+ GetViewFrame()->GetDispatcher()->ExecutePopup(aPopupId,
nullptr, nullptr, [](sal_Int16){});
else
{
//don't open contextmenu at mouse position if not opened via
mouse
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 17edf97cc16d..cce1d7d9ec19 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -60,6 +60,7 @@
#include <svl/eitem.hxx>
#include <svl/itemiter.hxx>
#include <svl/itempool.hxx>
+#include <svtools/dialogclosedlistener.hxx>
#include <toolkit/awt/vclxmenu.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/debug.hxx>
@@ -137,8 +138,12 @@ struct SfxDispatcher_Impl
SfxDisableFlags nDisableFlags;
bool bFlushed;
std::deque< std::deque<SfxToDo_Impl> > aToDoCopyStack;
+
+ static css::uno::Reference<css::frame::XPopupMenuController>*
m_pActivePopupController;
};
+css::uno::Reference<css::frame::XPopupMenuController>*
SfxDispatcher_Impl::m_pActivePopupController = nullptr;
+
/** This method checks if the stack of the SfxDispatchers is flushed, or if
push- or pop- commands are pending.
*/
@@ -1685,7 +1690,52 @@ bool SfxDispatcher::FillState_(const SfxSlotServer&
rSvr, SfxItemSet& rState,
return false;
}
-void SfxDispatcher::ExecutePopup( vcl::Window *pWin, const Point *pPos )
+namespace {
+
+static void
lcl_FinishPopupDispatch(css::uno::Reference<css::frame::XPopupMenuController>
xPopupController)
+{
+ css::uno::Reference<css::lang::XComponent> xComponent(xPopupController,
css::uno::UNO_QUERY);
+ if (xComponent.is())
+ xComponent->dispose();
+ SfxDispatcher_Impl::m_pActivePopupController = nullptr;
+}
+
+struct SfxDispatcherPopupFinish final
+{
+ css::uno::Reference<css::frame::XPopupMenuController> m_xPopupController;
+ std::function<void(sal_Int16)> m_aCloseFunc;
+ rtl::Reference<::svt::DialogClosedListener> m_xDialogListener;
+ css::uno::Reference<css::awt::XPopupMenu> m_xPopupMenu;
+
+ DECL_LINK(PopupClosedHdl, css::ui::dialogs::DialogClosedEvent*, void);
+
+
SfxDispatcherPopupFinish(css::uno::Reference<css::frame::XPopupMenuController>
xPopupController,
+ const std::function<void(sal_Int16)>& rCloseFunc,
+ css::uno::Reference<css::awt::XPopupMenu>
xPopupMenu)
+ : m_xPopupController(xPopupController)
+ , m_aCloseFunc(rCloseFunc)
+ , m_xDialogListener(new ::svt::DialogClosedListener())
+ , m_xPopupMenu(xPopupMenu)
+ {
+ m_xDialogListener->SetDialogClosedLink(LINK(this,
SfxDispatcherPopupFinish, PopupClosedHdl));
+ }
+};
+
+IMPL_LINK(SfxDispatcherPopupFinish, PopupClosedHdl,
css::ui::dialogs::DialogClosedEvent*, pEvt, void)
+{
+ assert(m_xPopupController.is());
+ if (!comphelper::LibreOfficeKit::isActive())
+ assert(SfxDispatcher_Impl::m_pActivePopupController ==
&m_xPopupController);
+ if (m_aCloseFunc)
+ m_aCloseFunc(pEvt ? pEvt->DialogResult : 0);
+ lcl_FinishPopupDispatch(m_xPopupController);
+ delete this;
+}
+
+} // anon namespace
+
+void SfxDispatcher::ExecutePopup(vcl::Window *pWin, const Point *pPos,
+ const std::function<void(sal_Int16)>& rCloseFunc)
{
SfxDispatcher &rDisp = *SfxGetpApp()->GetDispatcher_Impl();
sal_uInt16 nShLevel = 0;
@@ -1699,7 +1749,7 @@ void SfxDispatcher::ExecutePopup( vcl::Window *pWin,
const Point *pPos )
const OUString& rResName = pSh->GetInterface()->GetPopupMenuName();
if ( !rResName.isEmpty() )
{
- rDisp.ExecutePopup( rResName, pWin, pPos );
+ rDisp.ExecutePopup(rResName, pWin, pPos, rCloseFunc);
return;
}
}
@@ -1808,7 +1858,8 @@ boost::property_tree::ptree
SfxDispatcher::fillPopupMenu(const css::uno::Referen
return ::fillPopupMenu(pVCLMenu);
}
-void SfxDispatcher::ExecutePopup( const OUString& rResName, vcl::Window* pWin,
const Point* pPos )
+void SfxDispatcher::ExecutePopup( const OUString& rResName, vcl::Window* pWin,
const Point* pPos,
+ const std::function<void(sal_Int16)>& rCloseFunc)
{
css::uno::Sequence< css::uno::Any > aArgs{
css::uno::Any(comphelper::makePropertyValue( "Value", rResName )),
@@ -1817,16 +1868,29 @@ void SfxDispatcher::ExecutePopup( const OUString&
rResName, vcl::Window* pWin, c
};
css::uno::Reference< css::uno::XComponentContext > xContext =
comphelper::getProcessComponentContext();
- css::uno::Reference< css::frame::XPopupMenuController > xPopupController(
- xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- "com.sun.star.comp.framework.ResourceMenuController", aArgs, xContext
), css::uno::UNO_QUERY );
+
+ if (!comphelper::LibreOfficeKit::isActive())
+ assert(!xImp->m_pActivePopupController);
+ if (!comphelper::LibreOfficeKit::isActive() &&
xImp->m_pActivePopupController)
+ return;
+
+ css::uno::Reference<css::frame::XPopupMenuController> xPopupController =
+ css::uno::Reference<css::frame::XPopupMenuController>(
+
xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
+ "com.sun.star.comp.framework.ResourceMenuController", aArgs,
xContext), css::uno::UNO_QUERY);
+ if (!xPopupController.is())
+ return;
+ SfxDispatcher_Impl::m_pActivePopupController = &xPopupController;
css::uno::Reference< css::awt::XPopupMenu > xPopupMenu(
xContext->getServiceManager()->createInstanceWithContext(
"com.sun.star.awt.PopupMenu", xContext ), css::uno::UNO_QUERY );
-
- if ( !xPopupController.is() || !xPopupMenu.is() )
+ if (!xPopupMenu.is())
+ {
+ lcl_FinishPopupDispatch(xPopupController);
return;
+ }
+ struct SfxDispatcherPopupFinish* pFin = nullptr;
vcl::Window* pWindow = pWin ? pWin :
xImp->pFrame->GetFrame().GetWorkWindow_Impl()->GetWindow();
Point aPos = pPos ? *pPos : pWindow->GetPointerPosPixel();
@@ -1852,14 +1916,22 @@ void SfxDispatcher::ExecutePopup( const OUString&
rResName, vcl::Window* pWin, c
OUString aMenuURL = "private:resource/popupmenu/" + rResName;
if (GetFrame()->GetViewShell()->TryContextMenuInterception(xPopupMenu,
aMenuURL, aEvent))
{
+ const sal_Int16 nFlags =
css::awt::PopupMenuDirection::EXECUTE_DOWN;
+ const css::awt::Rectangle aRect(aPos.X(), aPos.Y(), 1, 1);
css::uno::Reference<css::awt::XWindowPeer>
xParent(aEvent.SourceWindow, css::uno::UNO_QUERY);
- xPopupMenu->execute(xParent, css::awt::Rectangle(aPos.X(),
aPos.Y(), 1, 1), css::awt::PopupMenuDirection::EXECUTE_DOWN);
+ css::uno::Reference<css::awt::XPopupMenuAsync>
xAsyncPopup(xPopupMenu, css::uno::UNO_QUERY);
+ pFin = new SfxDispatcherPopupFinish(xPopupController, rCloseFunc,
xPopupMenu);
+ if (!rCloseFunc || !xAsyncPopup.is() ||
!xAsyncPopup->popup(xParent, aRect, nFlags, pFin->m_xDialogListener))
+ {
+ delete pFin;
+ pFin = nullptr;
+ xPopupMenu->execute(xParent, aRect, nFlags);
+ }
}
}
- css::uno::Reference< css::lang::XComponent > xComponent( xPopupController,
css::uno::UNO_QUERY );
- if ( xComponent.is() )
- xComponent->dispose();
+ if (!pFin)
+ lcl_FinishPopupDispatch(xPopupController);
}
/** With this method the SfxDispatcher can be locked and released. A locked
diff --git a/sw/source/uibase/docvw/edtwin.cxx
b/sw/source/uibase/docvw/edtwin.cxx
index ea6752eb7ea1..7aa1c5ed0d5f 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -5587,7 +5587,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt )
}
}
else if ( !m_rView.ExecSpellPopup( aDocPos ) )
- SfxDispatcher::ExecutePopup(this, &aPixPos);
+ SfxDispatcher::ExecutePopup(this, &aPixPos,
[](sal_Int16){});
}
else if (m_pApplyTempl->nUndo <
rSh.GetDoc()->GetIDocumentUndoRedo().GetUndoActionCount())
{
diff --git a/toolkit/inc/helper/unowrapper.hxx
b/toolkit/inc/helper/unowrapper.hxx
index 03a9b525cc18..fdc65988bb62 100644
--- a/toolkit/inc/helper/unowrapper.hxx
+++ b/toolkit/inc/helper/unowrapper.hxx
@@ -56,7 +56,7 @@ public:
virtual VclPtr<vcl::Window> GetWindow(const
css::uno::Reference<css::awt::XWindow>& rxWindow) override;
// Menu
- virtual css::uno::Reference<css::awt::XPopupMenu> CreateMenuInterface(
PopupMenu* pPopupMenu ) override;
+ virtual css::uno::Reference<css::awt::XPopupMenu>
CreateMenuInterface(PopupMenu* pPopupMenu) override;
void WindowDestroyed( vcl::Window* pWindow ) override;
diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx
index b17f32c2aebc..e2f78a2528ed 100644
--- a/toolkit/source/awt/vclxmenu.cxx
+++ b/toolkit/source/awt/vclxmenu.cxx
@@ -35,6 +35,7 @@
#include <vcl/window.hxx>
#include <com/sun/star/awt/KeyModifier.hpp>
+#include <com/sun/star/ui/dialogs/DialogClosedEvent.hpp>
VCLXMenu::VCLXMenu()
: maMenuListeners( *this )
@@ -491,6 +492,33 @@ sal_Int16 VCLXMenu::execute(
static_cast<PopupMenuFlags>(nFlags) |
PopupMenuFlags::NoMouseUpClose );
}
+sal_Bool VCLXMenu::popup(
+ const css::uno::Reference< css::awt::XWindowPeer >& rxWindowPeer,
+ const css::awt::Rectangle& rPos, sal_Int16 nFlags,
+ const css::uno::Reference<css::ui::dialogs::XDialogClosedListener>&
xListener)
+{
+ SolarMutexGuard aSolarGuard;
+ std::unique_lock aGuard( maMutex );
+
+ if (!mpMenu || !IsPopupMenu())
+ return false;
+
+ return
static_cast<PopupMenu*>(mpMenu.get())->Popup(VCLUnoHelper::GetWindow(rxWindowPeer),
+ VCLRectangle(rPos), xListener.is() ?
xListener : this,
+ static_cast<PopupMenuFlags>(nFlags) |
PopupMenuFlags::NoMouseUpClose);
+}
+
+void SAL_CALL VCLXMenu::dialogClosed(const
css::ui::dialogs::DialogClosedEvent&)
+{
+ SolarMutexGuard aSolarGuard;
+ std::unique_lock aGuard( maMutex );
+
+ assert(mpMenu && IsPopupMenu());
+ if (mpMenu && IsPopupMenu())
+ static_cast<PopupMenu*>(mpMenu.get())->Finish();
+}
+
+void SAL_CALL VCLXMenu::disposing(css::lang::EventObject const&) {}
void SAL_CALL VCLXMenu::setCommand(
sal_Int16 nItemId,
diff --git a/toolkit/source/helper/unowrapper.cxx
b/toolkit/source/helper/unowrapper.cxx
index 080847154cb2..ad3d28913060 100644
--- a/toolkit/source/helper/unowrapper.cxx
+++ b/toolkit/source/helper/unowrapper.cxx
@@ -189,7 +189,7 @@ void UnoWrapper::SetWindowInterface( vcl::Window* pWindow,
const css::uno::Refer
}
}
-css::uno::Reference<css::awt::XPopupMenu> UnoWrapper::CreateMenuInterface(
PopupMenu* pPopupMenu )
+css::uno::Reference<css::awt::XPopupMenu>
UnoWrapper::CreateMenuInterface(PopupMenu* pPopupMenu)
{
return new VCLXPopupMenu(pPopupMenu);
}
diff --git a/vcl/inc/osx/salmenu.h b/vcl/inc/osx/salmenu.h
index 274d1ecd70b2..83068b8d9a7f 100644
--- a/vcl/inc/osx/salmenu.h
+++ b/vcl/inc/osx/salmenu.h
@@ -67,7 +67,9 @@ public:
virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const
Image& rImage) override;
virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem,
const vcl::KeyCode& rKeyCode, const OUString& rKeyName ) override;
virtual void GetSystemMenuData( SystemMenuData* pData ) override;
- virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const
tools::Rectangle& rRect, FloatWinPopupFlags nFlags) override;
+ virtual bool ShowNativePopupMenu(
+ FloatingWindow*, const tools::Rectangle&, FloatWinPopupFlags,
+ const css::uno::Reference<css::ui::dialogs::XDialogClosedListener>* =
nullptr) override;
virtual bool AddMenuBarButton( const SalMenuButtonItem& ) override;
virtual void RemoveMenuBarButton( sal_uInt16 nId ) override;
virtual tools::Rectangle GetMenuBarButtonRectPixel( sal_uInt16 i_nItemId,
SalFrame* i_pReferenceFrame ) override;
diff --git a/vcl/inc/qt5/QtMenu.hxx b/vcl/inc/qt5/QtMenu.hxx
index 6bb0dbcab4ec..501caaf4d089 100644
--- a/vcl/inc/qt5/QtMenu.hxx
+++ b/vcl/inc/qt5/QtMenu.hxx
@@ -40,7 +40,7 @@ class QtFrame;
class QtMenu : public QObject, public SalMenu
{
Q_OBJECT
-private:
+
std::vector<QtMenuItem*> maItems;
VclPtr<Menu> mpVCLMenu;
QtMenu* mpParentSalMenu;
@@ -53,6 +53,9 @@ private:
QMenu* mpQMenu;
QButtonGroup* m_pButtonGroup;
+ css::uno::Reference<css::ui::dialogs::XDialogClosedListener> m_xListener;
+ FloatingWindow* m_pWin;
+
void DoFullMenuUpdate(Menu* pMenuBar);
static void NativeItemText(OUString& rItemText);
@@ -78,8 +81,9 @@ public:
virtual void SetSubMenu(SalMenuItem* pSalMenuItem, SalMenu* pSubMenu,
unsigned nPos) override;
virtual void SetFrame(const SalFrame* pFrame) override;
const QtFrame* GetFrame() const;
- virtual bool ShowNativePopupMenu(FloatingWindow* pWin, const
tools::Rectangle& rRect,
- FloatWinPopupFlags nFlags) override;
+ virtual bool ShowNativePopupMenu(
+ FloatingWindow*, const tools::Rectangle&, FloatWinPopupFlags,
+ const css::uno::Reference<css::ui::dialogs::XDialogClosedListener>* =
nullptr) override;
QtMenu* GetTopLevel();
virtual void SetItemBits(unsigned nPos, MenuItemBits nBits) override;
virtual void CheckItem(unsigned nPos, bool bCheck) override;
diff --git a/vcl/inc/salmenu.hxx b/vcl/inc/salmenu.hxx
index 50c1e9f4bc8a..473a4deebd62 100644
--- a/vcl/inc/salmenu.hxx
+++ b/vcl/inc/salmenu.hxx
@@ -23,6 +23,7 @@
#include <utility>
#include <vcl/menu.hxx>
#include <vcl/image.hxx>
+#include <com/sun/star/ui/dialogs/XDialogClosedListener.hpp>
struct SystemMenuData;
class FloatingWindow;
@@ -83,7 +84,17 @@ public:
virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const
Image& rImage ) = 0;
virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem,
const vcl::KeyCode& rKeyCode, const OUString& rKeyName ) = 0;
virtual void GetSystemMenuData( SystemMenuData* pData ) = 0;
- virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const
tools::Rectangle& rRect, FloatWinPopupFlags nFlags);
+ /**
+ * @param pListener
+ * if !nullptr, the menu is supposed to be only shown and it'll run
async.
+ * Mainly means, when the menu is hidden, it must call the listener's
+ * dialogClosed. The listener will destroy the SalMenu!
+ *
+ * @return
+ * true, if the feature is implemented and was successful.
+ */
+ virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const
tools::Rectangle& rRect, FloatWinPopupFlags nFlags,
+ const
css::uno::Reference<css::ui::dialogs::XDialogClosedListener>* pListener =
nullptr);
virtual void ShowCloseButton(bool bShow);
virtual bool AddMenuBarButton( const SalMenuButtonItem& ); // return false
if not implemented or failure
virtual void RemoveMenuBarButton( sal_uInt16 nId );
diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index ec1e123e89d2..ce73fbf2b553 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -131,7 +131,8 @@ public:
#endif
void ReturnFocus();
- virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const
tools::Rectangle& rRect, FloatWinPopupFlags nFlags) override;
+ virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const
tools::Rectangle& rRect, FloatWinPopupFlags nFlags,
+ const
css::uno::Reference<css::ui::dialogs::XDialogClosedListener>* = nullptr)
override;
virtual void ShowCloseButton(bool bShow) override;
virtual bool AddMenuBarButton( const SalMenuButtonItem& rNewItem )
override;
virtual void RemoveMenuBarButton( sal_uInt16 nId ) override;
diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx
index 60cafca71df4..b1a71f224f65 100644
--- a/vcl/osx/salmenu.cxx
+++ b/vcl/osx/salmenu.cxx
@@ -282,8 +282,13 @@ AquaSalMenu::~AquaSalMenu()
}
}
-bool AquaSalMenu::ShowNativePopupMenu(FloatingWindow * pWin, const
tools::Rectangle& rRect, FloatWinPopupFlags nFlags)
+bool AquaSalMenu::ShowNativePopupMenu(
+ FloatingWindow* pWin, const tools::Rectangle& rRect, FloatWinPopupFlags
nFlags,
+ const css::uno::Reference<css::ui::dialogs::XDialogClosedListener>*
pListener)
{
+ if (pListener)
+ return false;
+
// set offsets for positioning
const float offset = 9.0;
diff --git a/vcl/qt5/QtMenu.cxx b/vcl/qt5/QtMenu.cxx
index c1e4cb0e1a29..333dc6f4e388 100644
--- a/vcl/qt5/QtMenu.cxx
+++ b/vcl/qt5/QtMenu.cxx
@@ -108,6 +108,16 @@ void QtMenu::InsertMenuItem(QtMenuItem* pSalMenuItem,
unsigned nPos)
// no QMenu set, instantiate own one
mpOwnedQMenu.reset(new QMenu);
mpQMenu = mpOwnedQMenu.get();
+
+ connect(mpQMenu, &QMenu::aboutToHide, this, [this] {
+ if (m_pWin && m_xListener.is())
+ {
+ QMenu* pMenu = mpOwnedQMenu.release();
+ css::ui::dialogs::DialogClosedEvent
aEvent(m_pWin->GetComponentInterface(), 0);
+ m_xListener->dialogClosed(aEvent);
+ pMenu->deleteLater();
+ }
+ });
}
if (pSalMenuItem->mpSubMenu)
@@ -829,7 +839,8 @@ void QtMenu::ShowCloseButton(bool bShow)
}
bool QtMenu::ShowNativePopupMenu(FloatingWindow* pWin, const tools::Rectangle&
rRect,
- FloatWinPopupFlags nFlags)
+ FloatWinPopupFlags nFlags,
+ const
css::uno::Reference<css::ui::dialogs::XDialogClosedListener>* pListener)
{
assert(mpQMenu);
DoFullMenuUpdate(mpVCLMenu);
@@ -840,7 +851,19 @@ bool QtMenu::ShowNativePopupMenu(FloatingWindow* pWin,
const tools::Rectangle& r
assert(pFrame);
const tools::Rectangle aFloatRect =
FloatingWindow::ImplConvertToAbsPos(xParent, rRect);
const QRect aRect = toQRect(aFloatRect, 1 / pFrame->devicePixelRatioF());
- mpQMenu->exec(aRect.topLeft());
+
+ if (pListener)
+ {
+ m_xListener = *pListener;
+ m_pWin = pWin;
+ mpQMenu->popup(aRect.topLeft());
+ }
+ else
+ {
+ m_xListener = nullptr;
+ m_pWin = nullptr;
+ mpQMenu->exec(aRect.topLeft());
+ }
return true;
}
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 3874e76ab79d..7ee40b597ff0 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -217,7 +217,9 @@ SalObject::~SalObject() {}
SalMenu::~SalMenu() {}
-bool SalMenu::ShowNativePopupMenu(FloatingWindow*, const tools::Rectangle&,
FloatWinPopupFlags)
+bool SalMenu::ShowNativePopupMenu(
+ FloatingWindow*, const tools::Rectangle&, FloatWinPopupFlags,
+ const css::uno::Reference<css::ui::dialogs::XDialogClosedListener>*)
{
return false;
}
diff --git a/vcl/source/control/managedmenubutton.cxx
b/vcl/source/control/managedmenubutton.cxx
index bf3065e71cdf..0bb521e201dd 100644
--- a/vcl/source/control/managedmenubutton.cxx
+++ b/vcl/source/control/managedmenubutton.cxx
@@ -13,6 +13,7 @@
#include <managedmenubutton.hxx>
#include <vcl/menu.hxx>
+#include <com/sun/star/awt/XPopupMenuAsync.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/frame/theDesktop.hpp>
#include <com/sun/star/frame/thePopupMenuControllerFactory.hpp>
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index cb110281ee66..a76a5bfcabc9 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2660,6 +2660,7 @@ MenuFloatingWindow * PopupMenu::ImplGetFloatingWindow()
const {
}
PopupMenu::PopupMenu()
+ : m_pState(nullptr)
{
mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this);
}
@@ -2672,6 +2673,7 @@ PopupMenu::PopupMenu( const PopupMenu& rMenu )
PopupMenu::~PopupMenu()
{
+ assert(!m_pState);
disposeOnce();
}
@@ -2769,6 +2771,36 @@ sal_uInt16 PopupMenu::Execute( vcl::Window* pExecWindow,
const tools::Rectangle&
return ImplExecute( pExecWindow, rRect, lcl_TranslateFlags(nFlags),
nullptr, false );
}
+struct PopupMenuFinishState final
+{
+ VclPtr<PopupMenu> pSelf;
+ VclPtr<vcl::Window> pParentWin;
+ VclPtr<MenuFloatingWindow> pWin;
+ bool bRealExecute;
+ bool bIsNativeMenu;
+
+ void clean()
+ {
+ pWin = nullptr;
+ pParentWin = nullptr;
+ pSelf = nullptr;
+ }
+};
+
+bool PopupMenu::Popup(vcl::Window* pExecWindow, const Point& rPopupPos,
+ const
css::uno::Reference<css::ui::dialogs::XDialogClosedListener>& listener)
+{
+ return Popup(pExecWindow, tools::Rectangle(rPopupPos, rPopupPos),
listener, PopupMenuFlags::ExecuteDown);
+}
+
+bool PopupMenu::Popup(vcl::Window* pExecWindow, const tools::Rectangle& rRect,
+ const
css::uno::Reference<css::ui::dialogs::XDialogClosedListener>& listener,
PopupMenuFlags nFlags)
+{
+ assert(!m_pState);
+ ENSURE_OR_RETURN(pExecWindow, "PopupMenu::Popup: need a non-NULL window!",
false);
+ return ImplPopup(pExecWindow, rRect, lcl_TranslateFlags(nFlags), nullptr,
false, listener);
+}
+
void PopupMenu::ImplFlushPendingSelect()
{
// is there still Select?
@@ -2920,7 +2952,7 @@ bool PopupMenu::PrepareRun(const VclPtr<vcl::Window>&
pParentWin, tools::Rectang
if (pStartedFrom && pStartedFrom->IsMenuBar())
nMaxHeight -= pParentWin->GetSizePixel().Height();
sal_Int32 nLeft, nTop, nRight, nBottom;
- pWindow->GetBorder( nLeft, nTop, nRight, nBottom );
+ pWindow->GetBorder(nLeft, nTop, nRight, nBottom);
nMaxHeight -= nTop+nBottom;
if ( aSz.Height() > nMaxHeight )
{
@@ -2936,10 +2968,11 @@ bool PopupMenu::PrepareRun(const VclPtr<vcl::Window>&
pParentWin, tools::Rectang
}
bool PopupMenu::Run(const VclPtr<MenuFloatingWindow>& pWin, const bool
bRealExecute, const bool bPreSelectFirst,
- const FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom,
const tools::Rectangle& rRect)
+ const FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom,
const tools::Rectangle& rRect,
+ const
css::uno::Reference<css::ui::dialogs::XDialogClosedListener>* xListener)
{
SalMenu* pMenu = ImplGetSalMenu();
- if (pMenu && bRealExecute && pMenu->ShowNativePopupMenu(pWin, rRect,
nPopupModeFlags))
+ if (pMenu && bRealExecute && pMenu->ShowNativePopupMenu(pWin, rRect,
nPopupModeFlags, xListener))
return true;
pWin->StartPopupMode(rRect, nPopupModeFlags);
@@ -2975,7 +3008,12 @@ bool PopupMenu::Run(const VclPtr<MenuFloatingWindow>&
pWin, const bool bRealExec
}
if (bRealExecute)
- pWin->Execute();
+ {
+ if (!xListener)
+ pWin->Execute();
+ else
+ pWin->Popup(*xListener);
+ }
return false;
}
@@ -3020,11 +3058,42 @@ sal_uInt16 PopupMenu::ImplExecute(const
VclPtr<vcl::Window>& pParentWin, const t
VclPtr<MenuFloatingWindow> pWin;
if (!PrepareRun(pParentWin, aRect, nPopupModeFlags, pSFrom, bRealExecute,
pWin))
return 0;
- const bool bNative = Run(pWin, bRealExecute, bPreSelectFirst,
nPopupModeFlags, pSFrom, aRect);
+ const bool bNative = Run(pWin, bRealExecute, bPreSelectFirst,
nPopupModeFlags, pSFrom, aRect, nullptr);
FinishRun(pWin, pParentWin, bRealExecute, bNative);
return nSelectedId;
}
+bool PopupMenu::ImplPopup(const VclPtr<vcl::Window>& pParentWin, const
tools::Rectangle& rRect,
+ FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom,
bool bPreSelectFirst,
+ const
css::uno::Reference<css::ui::dialogs::XDialogClosedListener>& xListener)
+{
+ // tdf#126054 hold this until after function completes
+ VclPtr<PopupMenu> xThis(this);
+ bool bRealExecute = false;
+ tools::Rectangle aRect(rRect);
+ VclPtr<MenuFloatingWindow> pWin;
+ if (!PrepareRun(pParentWin, aRect, nPopupModeFlags, pSFrom, bRealExecute,
pWin))
+ return false;
+ assert(!m_pState);
+ m_pState = new PopupMenuFinishState;
+ m_pState->bIsNativeMenu = Run(pWin, bRealExecute, bPreSelectFirst,
nPopupModeFlags, pSFrom, aRect, &xListener);
+ m_pState->pWin = pWin;
+ m_pState->pParentWin = pParentWin;
+ m_pState->bRealExecute = bRealExecute;
+ m_pState->pSelf = xThis;
+ return true;
+}
+
+void PopupMenu::Finish()
+{
+ if (!m_pState)
+ return;
+ FinishRun(m_pState->pWin, m_pState->pParentWin, m_pState->bRealExecute,
m_pState->bIsNativeMenu);
+ m_pState->clean();
+ delete m_pState;
+ m_pState = nullptr;
+}
+
sal_uInt16 PopupMenu::ImplCalcVisEntries( tools::Long nMaxHeight, sal_uInt16
nStartEntry, sal_uInt16* pLastVisible ) const
{
nMaxHeight -= 2 * ImplGetFloatingWindow()->GetScrollerHeight();
diff --git a/vcl/source/window/menufloatingwindow.cxx
b/vcl/source/window/menufloatingwindow.cxx
index cfd6a6ae190e..075fb97f5632 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -308,8 +308,15 @@ IMPL_LINK_NOARG(MenuFloatingWindow, PopupEnd,
FloatingWindow*, void)
pMenu->pStartedFrom->ClosePopup(pMenu);
}
- if ( pM )
+ if (pM)
+ {
pM->pStartedFrom = nullptr;
+ if (m_xListener.is())
+ {
+ css::ui::dialogs::DialogClosedEvent
aEvent(GetComponentInterface(), pM->GetCurItemId());
+ m_xListener->dialogClosed(aEvent);
+ }
+ }
}
IMPL_LINK_NOARG(MenuFloatingWindow, AutoScroll, Timer *, void)
@@ -443,21 +450,31 @@ void MenuFloatingWindow::End()
Window::EndSaveFocus(xFocusId);
}
+ Finish();
+
bInExecute = false;
}
-void MenuFloatingWindow::Execute()
+void MenuFloatingWindow::Popup(const
css::uno::Reference<css::ui::dialogs::XDialogClosedListener>& xListener)
{
ImplSVData* pSVData = ImplGetSVData();
-
pSVData->maAppData.mpActivePopupMenu =
static_cast<PopupMenu*>(pMenu.get());
-
+ m_xListener = xListener;
Start();
+}
+void MenuFloatingWindow::Finish()
+{
+ ImplSVData* pSVData = ImplGetSVData();
+ pSVData->maAppData.mpActivePopupMenu = nullptr;
+}
+
+void MenuFloatingWindow::Execute()
+{
+ Popup();
while (bInExecute && !Application::IsQuit())
Application::Yield();
-
- pSVData->maAppData.mpActivePopupMenu = nullptr;
+ Finish();
}
void MenuFloatingWindow::StopExecute()
@@ -474,6 +491,7 @@ void MenuFloatingWindow::StopExecute()
// notify parent, needed for accessibility
if( pMenu && pMenu->pStartedFrom )
pMenu->pStartedFrom->ImplCallEventListeners(
VclEventId::MenuSubmenuDeactivate, nPosInParent );
+ Finish();
}
void MenuFloatingWindow::KillActivePopup( PopupMenu* pThisOnly )
@@ -502,6 +520,7 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu*
pThisOnly )
PaintImmediately();
}
+ pPopup->Finish();
}
void MenuFloatingWindow::EndExecute()
diff --git a/vcl/source/window/menufloatingwindow.hxx
b/vcl/source/window/menufloatingwindow.hxx
index f26fb50373ca..b6c8b54738ce 100644
--- a/vcl/source/window/menufloatingwindow.hxx
+++ b/vcl/source/window/menufloatingwindow.hxx
@@ -46,6 +46,7 @@ private:
sal_uInt16 nScrollerHeight;
sal_uInt16 nFirstEntry;
sal_uInt16 nPosInParent;
+ css::uno::Reference<css::ui::dialogs::XDialogClosedListener> m_xListener;
bool bInExecute : 1;
bool bScrollMenu : 1;
@@ -67,6 +68,7 @@ private:
void Start();
void End();
+ static void Finish();
protected:
vcl::Region ImplCalcClipRegion() const;
@@ -107,6 +109,8 @@ public:
bool IsScrollMenu() const { return bScrollMenu; }
sal_uInt16 GetScrollerHeight() const { return nScrollerHeight; }
+ void Popup(const
css::uno::Reference<css::ui::dialogs::XDialogClosedListener>& xListener =
nullptr);
+
void Execute();
void StopExecute();
void EndExecute();
diff --git a/vcl/unx/gtk3/gtksalmenu.cxx b/vcl/unx/gtk3/gtksalmenu.cxx
index ca515f51eb9e..64098b367d76 100644
--- a/vcl/unx/gtk3/gtksalmenu.cxx
+++ b/vcl/unx/gtk3/gtksalmenu.cxx
@@ -423,9 +423,13 @@ static void MenuClosed(GtkPopover* pWidget, GMainLoop*
pLoop)
g_main_loop_quit(pLoop);
}
-bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const
tools::Rectangle& rRect,
- FloatWinPopupFlags nFlags)
+bool GtkSalMenu::ShowNativePopupMenu
+ (FloatingWindow* pWin, const tools::Rectangle& rRect, FloatWinPopupFlags
nFlags,
+ const css::uno::Reference<css::ui::dialogs::XDialogClosedListener>*
pListener)
{
+ if (pListener)
+ return false;
+
VclPtr<vcl::Window> xParent = pWin->ImplGetWindowImpl()->mpRealParent;
mpFrame = static_cast<GtkSalFrame*>(xParent->ImplGetFrame());