Repository.mk | 93 +++++++++--- RepositoryExternal.mk | 4 RepositoryModule_host.mk | 44 +++++- basctl/Library_basctl.mk | 5 chart2/Library_chartcontroller.mk | 5 chart2/source/controller/main/ChartController_TextEdit.cxx | 2 config_host.mk.in | 17 ++ config_host/config_wasm_strip.h.in | 19 ++ configure.ac | 16 ++ cui/Library_cui.mk | 14 + cui/UIConfig_cui.mk | 7 cui/source/factory/dlgfact.cxx | 27 +++ desktop/Module_desktop.mk | 4 desktop/source/app/app.cxx | 31 ++++ drawinglayer/Library_drawinglayer.mk | 11 + editeng/Library_editeng.mk | 5 editeng/source/misc/splwrap.cxx | 6 extensions/Module_extensions.mk | 2 external/hunspell/StaticLibrary_hunspell.mk | 7 external/hyphen/ExternalProject_hyphen.mk | 2 external/mythes/ExternalProject_mythes.mk | 2 extras/Module_extras.mk | 2 framework/Library_fwk.mk | 9 + framework/util/fwk.component | 1 framework/util/fwk.component.autorecovery | 7 i18npool/source/breakiterator/breakiteratorImpl.cxx | 1 include/vcl/BitmapTools.hxx | 4 lingucomponent/Library_guesslang.mk | 7 lingucomponent/Module_lingucomponent.mk | 12 + oox/Library_oox.mk | 50 +++--- oox/source/drawingml/shape.cxx | 12 + oox/source/export/shapes.cxx | 9 + oox/source/ppt/pptimport.cxx | 8 - oox/source/shape/ShapeFilterBase.cxx | 7 sd/Library_sd.mk | 29 ++-- sfx2/Library_sfx.mk | 17 +- sfx2/source/appl/appserv.cxx | 6 sfx2/source/view/viewfrm.cxx | 8 + sfx2/util/sfx.component | 1 sfx2/util/sfx.component.extended | 7 solenv/gbuild/extensions/pre_MergedLibsList.mk | 2 svx/Library_svx.mk | 25 ++- svx/Library_svxcore.mk | 4 svx/source/dialog/charmap.cxx | 12 + svx/source/dialog/dlgctrl.cxx | 22 +++ svx/source/dialog/frmsel.cxx | 24 ++- svx/source/dialog/graphctl.cxx | 9 + svx/source/dialog/searchcharmap.cxx | 4 svx/source/dialog/weldeditview.cxx | 14 + svx/util/svx.component | 1 svx/util/svx.component.recoveryui | 7 svx/util/svxcore.component | 1 svx/util/svxcore.component.draw | 7 sw/Library_sw.mk | 15 +- sw/source/core/crsr/crsrsh.cxx | 10 + sw/source/core/docnode/ndsect.cxx | 6 sw/source/core/docnode/ndtbl.cxx | 6 sw/source/core/docnode/node.cxx | 6 sw/source/core/draw/dview.cxx | 12 + sw/source/core/layout/anchoreddrawobject.cxx | 4 sw/source/core/layout/fly.cxx | 18 ++ sw/source/core/layout/flylay.cxx | 10 + sw/source/core/layout/frmtool.cxx | 12 + sw/source/core/layout/layact.cxx | 3 sw/source/core/layout/pagechg.cxx | 8 - sw/source/core/layout/sectfrm.cxx | 6 sw/source/core/layout/ssfrm.cxx | 4 sw/source/core/layout/tabfrm.cxx | 21 ++ sw/source/core/layout/wsfrm.cxx | 14 + sw/source/core/text/frmform.cxx | 7 sw/source/core/text/txtfrm.cxx | 8 + sw/source/core/txtnode/txtedt.cxx | 4 sw/source/core/view/pagepreviewlayout.cxx | 4 sw/source/core/view/viewimp.cxx | 6 sw/source/core/view/viewpg.cxx | 6 sw/source/core/view/viewsh.cxx | 12 + sw/source/filter/ww8/docxexport.cxx | 9 + sw/source/uibase/app/apphdl.cxx | 39 +++-- sw/source/uibase/app/docst.cxx | 6 sw/source/uibase/docvw/AnnotationWin.cxx | 7 sw/source/uibase/docvw/AnnotationWin2.cxx | 8 + sw/source/uibase/docvw/PostItMgr.cxx | 4 sw/source/uibase/docvw/SidebarTxtControl.cxx | 4 sw/source/uibase/docvw/edtwin.cxx | 10 + sw/source/uibase/shells/basesh.cxx | 1 sw/source/uibase/uiview/pview.cxx | 7 sw/source/uibase/uiview/view.cxx | 3 sw/source/uibase/uiview/view0.cxx | 6 toolkit/source/helper/accessibilityclient.cxx | 7 unotools/Library_utl.mk | 7 vcl/Library_vcl.mk | 2 vcl/Module_vcl.mk | 7 vcl/headless/CairoCommon.cxx | 14 + vcl/headless/SvpGraphicsBackend.cxx | 16 ++ vcl/source/bitmap/BitmapTools.cxx | 94 +++++++++++++ vcl/source/filter/png/PngImageReader.cxx | 14 + vcl/source/helper/svtaccessiblefactory.cxx | 7 writerperfect/Library_wpftwriter.mk | 30 +++- writerperfect/Module_writerperfect.mk | 2 writerperfect/source/writer/wpftwriter.component | 8 + writerperfect/source/writer/wpftwriter.component.extended | 8 + writerperfect/source/writer/wpftwriter.component.extended2 | 12 + xmloff/Library_xo.mk | 15 ++ xmloff/Library_xof.mk | 8 + xmloff/source/core/xmlexp.cxx | 9 + xmloff/source/core/xmlimp.cxx | 13 + xmloff/source/draw/shapeexport.cxx | 9 + xmloff/source/draw/ximpshap.cxx | 8 + xmloff/source/style/xmlstyle.cxx | 9 + xmloff/source/transform/OOo2Oasis.cxx | 8 - xmloff/source/transform/xof.component | 5 xmloff/source/transform/xof.component.chart | 11 + xmloff/util/xo.component | 36 ++++ xmloff/util/xo.component.chart | 17 ++ xmloff/util/xo.component.draw | 18 ++ xmloff/util/xo.component.impress | 18 ++ xmloff/util/xo.component.writer | 7 117 files changed, 1246 insertions(+), 131 deletions(-)
New commits: commit 02140554ee1d70b219a42546191e2219d58be4b0 Author: Armin Le Grand (Allotropia) <[email protected]> AuthorDate: Fri Apr 30 17:26:41 2021 +0200 Commit: Jan-Marek Glogowski <[email protected]> CommitDate: Thu Jan 20 12:28:54 2022 +0100 WASM --enable-wasm-strip now skips lots of LO code ... resulting in a stripped-down, Writer-only build to decrease the resulting WASM bytecode size. It removes the following code from the build: * All other major modules: Base, Calc, Chart, Draw, Impress and Math and related writerperfect filters * The premultiply tables * The (auto-)recovery functionality * All accessibility (but not the accessibility document checker) * The LanguageGuess component * EPUB support * The start center / BackingWindow * The TipOfTheDay functionality * The splash screen communication Currently crashs with anything different then soffice --writer. Closing the document also still crashes. FYI: many of these features are now behind ENABLE_WASM_STRIP_* defines, but they normally don't work on their own, globally! That's because we started with stripping the main components. Change-Id: Ib9c0f9452815910c0a2aceaf142ba1ad4a9cb0d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126182 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <[email protected]> diff --git a/Repository.mk b/Repository.mk index 4cf3aa6d3f48..5c164d73729d 100644 --- a/Repository.mk +++ b/Repository.mk @@ -17,13 +17,18 @@ # the License at http://www.apache.org/licenses/LICENSE-2.0 . # +ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE) +$(eval $(call gb_Helper_register_executables,NONE, \ + canvasdemo \ +)) +endif + $(eval $(call gb_Helper_register_executables,NONE, \ $(call gb_Helper_optional,HELPTOOLS, \ HelpIndexer \ HelpLinker \ ) \ bestreversemap \ - canvasdemo \ cfgex \ concat-deps \ cpp \ @@ -93,6 +98,12 @@ $(eval $(call gb_Helper_register_executables_for_install,SDK,sdk, \ $(if $(filter ODK,$(BUILD_TYPE)),uno-skeletonmaker) \ )) +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) +$(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \ + $(if $(filter-out ANDROID HAIKU iOS MACOSX WNT,$(OS)),oosplash) \ +)) +endif + $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \ $(if $(ENABLE_ONLINE_UPDATE_MAR),\ mar \ @@ -147,7 +158,6 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \ $(call gb_Helper_optional,FUZZERS,htmlfuzzer) \ $(call gb_Helper_optional,FUZZERS,sftfuzzer) \ $(call gb_Helper_optional,FUZZERS,dbffuzzer) \ - $(if $(filter-out ANDROID HAIKU iOS MACOSX WNT,$(OS)),oosplash) \ soffice_bin \ $(call gb_CondExeUnopkg, \ unopkg_bin \ @@ -324,6 +334,37 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ogltrans, \ OGLTrans \ )) +ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE) +$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ + canvastools \ + $(if $(ENABLE_CAIRO_CANVAS),cairocanvas) \ + canvasfactory \ + cppcanvas \ + $(if $(filter WNT,$(OS)),directx9canvas) \ + $(if $(ENABLE_OPENGL_CANVAS),oglcanvas) \ + $(if $(filter WNT,$(OS)),gdipluscanvas) \ + simplecanvas \ + vclcanvas \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_GUESSLANG),TRUE) +$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ + guesslang \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE) +$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ + hyphen \ + lnth \ + spell \ + $(if $(filter iOS MACOSX,$(OS)), \ + MacOSXSpell \ + ) \ +)) +endif + $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ avmedia \ $(call gb_Helper_optional,AVMEDIA, \ @@ -337,14 +378,10 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ ) \ basegfx \ bib \ - $(if $(ENABLE_CAIRO_CANVAS),cairocanvas) \ - canvasfactory \ - canvastools \ chartcore \ chartcontroller \ $(call gb_Helper_optional,OPENCL,clew) \ $(if $(filter $(OS),WNT),,cmdmail) \ - cppcanvas \ configmgr \ ctl \ dba \ @@ -356,8 +393,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ deploymentmisc \ $(if $(filter-out MACOSX WNT,$(OS)),desktopbe1) \ $(call gb_Helper_optional,SCRIPTING,dlgprov) \ - $(if $(filter WNT,$(OS)),directx9canvas) \ - $(if $(ENABLE_OPENGL_CANVAS),oglcanvas) \ drawinglayercore \ drawinglayer \ editeng \ @@ -374,19 +409,15 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ frm \ fsstorage \ fwk \ - $(if $(filter WNT,$(OS)),gdipluscanvas) \ - guesslang \ $(call gb_Helper_optionals_or,HELPTOOLS XMLHELP,helplinker) \ i18npool \ i18nsearch \ - hyphen \ $(if $(ENABLE_JAVA),jdbc) \ $(if $(ENABLE_LDAP),ldapbe2) \ $(if $(filter WNT,$(OS)),WinUserInfoBe) \ localebe1 \ log \ lng \ - lnth \ $(if $(filter $(OS),MACOSX),macbe1) \ $(if $(MERGELIBS),merged) \ migrationoo2 \ @@ -415,11 +446,9 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ sdd \ sdfilt \ sfx \ - simplecanvas \ slideshow \ sot \ - spell \ - $(if $(DISABLE_GUI),,spl) \ + $(if $(or $(DISABLE_GUI),$(ENABLE_WASM_STRIP_SPLASH)),,spl) \ storagefd \ $(call gb_Helper_optional,SCRIPTING,stringresource) \ svgio \ @@ -449,7 +478,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ vbahelper \ ) \ vcl \ - vclcanvas \ writerperfect \ xmlscript \ xmlfa \ @@ -470,9 +498,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ ) \ fps_aqua \ ) \ - $(if $(filter iOS MACOSX,$(OS)), \ - MacOSXSpell \ - ) \ )) $(eval $(call gb_Helper_register_plugins_for_install,OOOLIBS,ooo, \ @@ -606,6 +631,14 @@ $(eval $(call gb_Helper_register_plugins_for_install,PRIVATELIBS_URE,ure, \ $(call gb_CondLibSalTextenc,sal_textenc) \ )) +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) +$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \ + $(if $(filter WNT,$(OS)), \ + winaccessibility \ + ) \ +)) +endif + $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \ $(call gb_Helper_optional,AVMEDIA, \ $(if $(ENABLE_GSTREAMER_1_0),avmediagst) \ @@ -650,7 +683,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \ fps \ inprocserv \ UAccCOM \ - winaccessibility \ ) \ )) @@ -884,6 +916,18 @@ $(eval $(call gb_Helper_register_packages_for_install,sdk,\ ) \ )) +ifneq ($(ENABLE_WASM_STRIP_PINGUSER),TRUE) +$(eval $(call gb_Helper_register_packages_for_install,ooo,\ + tipoftheday_images \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE) +$(eval $(call gb_Helper_register_packages_for_install,ooo,\ + $(if $(ENABLE_OPENGL_CANVAS),canvas_opengl_shader) \ +)) +endif + $(eval $(call gb_Helper_register_packages_for_install,ooo,\ $(if $(SYSTEM_LIBEXTTEXTCAT),,libexttextcat_fingerprint) \ officecfg_misc \ @@ -968,13 +1012,11 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\ wizards_basicusr \ wizards_properties \ wizards_wizardshare \ - tipoftheday_images \ toolbarmode_images \ vcl_theme_definitions \ $(if $(filter WNT,$(OS)), \ vcl_opengl_denylist \ ) \ - $(if $(ENABLE_OPENGL_CANVAS),canvas_opengl_shader) \ $(if $(filter SKIA,$(BUILD_TYPE)), \ vcl_skia_denylist ) \ $(if $(DISABLE_PYTHON),,$(if $(filter-out AIX,$(OS)), \ @@ -1165,9 +1207,14 @@ $(eval $(call gb_Helper_register_mos,\ )) # UI configuration +ifneq ($(ENABLE_WASM_STRIP_DBACCESS),TRUE) $(eval $(call gb_Helper_register_uiconfigs,\ - cui \ $(call gb_Helper_optional,DBCONNECTIVITY,dbaccess) \ +)) +endif + +$(eval $(call gb_Helper_register_uiconfigs,\ + cui \ desktop \ editeng \ filter \ diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index e29847e4eff1..dc9276a40641 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -567,6 +567,7 @@ endef gb_ExternalProject__use_hunspell := else # !SYSTEM_HUNSPELL +ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE) define gb_LinkTarget__use_hunspell $(call gb_LinkTarget_add_defs,$(1),\ @@ -594,6 +595,7 @@ $(call gb_ExternalProject_use_external_project,$(1),hunspell) endef +endif # ENABLE_WASM_STRIP_HUNSPELL endif # SYSTEM_HUNSPELL @@ -1762,6 +1764,7 @@ endef gb_ExternalProject__use_epubgen := else # !SYSTEM_EPUBGEN +ifneq ($(ENABLE_WASM_STRIP_EPUB),TRUE) define gb_LinkTarget__use_epubgen $(call gb_LinkTarget_set_include,$(1),\ @@ -1779,6 +1782,7 @@ $(call gb_ExternalProject_use_external_project,$(1),libepubgen) endef +endif # ENABLE_WASM_STRIP_EPUB endif # SYSTEM_EPUBGEN ifneq ($(SYSTEM_REVENGE),) diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk index 041496c14ae4..49118cd6259d 100644 --- a/RepositoryModule_host.mk +++ b/RepositoryModule_host.mk @@ -20,31 +20,58 @@ $(eval $(call gb_Module_add_targets,libreoffice,\ )) endif +# WASM_CHART change +ifneq ($(ENABLE_WASM_STRIP_CHART),TRUE) +$(eval $(call gb_Module_add_moduledirs,libreoffice,\ + chart2 \ +)) +endif + +# WASM_CANVAS change +ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE) +$(eval $(call gb_Module_add_moduledirs,libreoffice,\ + canvas \ + cppcanvas \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_DBACCESS),TRUE) +$(eval $(call gb_Module_add_moduledirs,libreoffice,\ + dbaccess \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) $(eval $(call gb_Module_add_moduledirs,libreoffice,\ accessibility \ + winaccessibility \ +)) +endif + +$(eval $(call gb_Module_add_moduledirs,libreoffice,\ android \ + $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \ animations \ + ) \ apple_remote \ avmedia \ + $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \ basctl \ + ) \ basegfx \ basic \ bean \ binaryurp \ bridges \ - canvas \ - chart2 \ cli_ure \ codemaker \ comphelper \ configmgr \ connectivity \ - cppcanvas \ cppu \ cppuhelper \ cpputools \ cui \ - dbaccess \ desktop \ $(call gb_Helper_optional,DICTIONARIES,dictionaries) \ drawinglayer \ @@ -103,22 +130,30 @@ $(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),, \ sd \ sdext \ + ) \ $(call gb_Helper_optional,DESKTOP,setup_native) \ sfx2 \ shell \ + $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \ slideshow \ + ) \ smoketest \ solenv \ soltools \ sot \ + $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \ starmath \ + ) \ $(if $(ENABLE_CUSTOMTARGET_COMPONENTS),static) \ stoc \ store \ @@ -149,7 +184,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\ uui \ vbahelper \ vcl \ - winaccessibility \ wizards \ writerfilter \ writerperfect \ diff --git a/basctl/Library_basctl.mk b/basctl/Library_basctl.mk index 32ebe55c2bb3..693ac39cc0e1 100644 --- a/basctl/Library_basctl.mk +++ b/basctl/Library_basctl.mk @@ -62,9 +62,14 @@ $(eval $(call gb_Library_use_libraries,basctl,\ xmlscript \ )) +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) $(eval $(call gb_Library_add_exception_objects,basctl,\ basctl/source/accessibility/accessibledialogcontrolshape \ basctl/source/accessibility/accessibledialogwindow \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,basctl,\ basctl/source/basicide/basdoc \ basctl/source/basicide/IDEComboBox \ basctl/source/basicide/basicrenderable \ diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk index f73d335eca69..b7c449cef582 100644 --- a/chart2/Library_chartcontroller.mk +++ b/chart2/Library_chartcontroller.mk @@ -52,6 +52,7 @@ $(eval $(call gb_Library_use_libraries,chartcontroller,\ $(eval $(call gb_Library_set_componentfile,chartcontroller,chart2/source/controller/chartcontroller,services)) +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) $(eval $(call gb_Library_add_exception_objects,chartcontroller,\ chart2/source/controller/accessibility/AccessibleBase \ chart2/source/controller/accessibility/AccessibleChartElement \ @@ -60,6 +61,10 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\ chart2/source/controller/accessibility/AccessibleTextHelper \ chart2/source/controller/accessibility/AccessibleViewForwarder \ chart2/source/controller/accessibility/ChartElementFactory \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,chartcontroller,\ chart2/source/controller/chartapiwrapper/AreaWrapper \ chart2/source/controller/chartapiwrapper/AxisWrapper \ chart2/source/controller/chartapiwrapper/Chart2ModelContact \ diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index adc7b3cb0dda..1f893e3e1fc5 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <ChartController.hxx> #include <ResId.hxx> diff --git a/config_host.mk.in b/config_host.mk.in index ee7d7cbce492..bec47fe80b15 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -211,7 +211,22 @@ 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=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_ACCESSIBILITY=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_CANVAS=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_CHART=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_DBACCESS=@ENABLE_WASM_STRIP@ +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_LOCALES=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_PINGUSER=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_PREMULTIPLY=@ENABLE_WASM_STRIP@ +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_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 new file mode 100644 index 000000000000..3150a960995c --- /dev/null +++ b/config_host/config_wasm_strip.h.in @@ -0,0 +1,19 @@ +#ifndef CONFIG_FEATURE_WASM_STRIP_H +#define CONFIG_FEATURE_WASM_STRIP_H + +#define ENABLE_WASM_STRIP_ACCESSIBILITY 0 +#define ENABLE_WASM_STRIP_CANVAS 0 +#define ENABLE_WASM_STRIP_CHART 0 +#define ENABLE_WASM_STRIP_DBACCESS 0 +#define ENABLE_WASM_STRIP_EPUB 0 +#define ENABLE_WASM_STRIP_EXTRA 0 +#define ENABLE_WASM_STRIP_GUESSLANG 0 +#define ENABLE_WASM_STRIP_HUNSPELL 0 +#define ENABLE_WASM_STRIP_PINGUSER 0 +#define ENABLE_WASM_STRIP_PREMULTIPLY 0 +#define ENABLE_WASM_STRIP_RECENT 0 +#define ENABLE_WASM_STRIP_RECOVERYUI 0 +#define ENABLE_WASM_STRIP_SPLASH 0 +#define ENABLE_WASM_STRIP_SWEXPORTS 0 + +#endif diff --git a/configure.ac b/configure.ac index 7c168e154c4d..8aa4a58ed81e 100644 --- a/configure.ac +++ b/configure.ac @@ -3015,6 +3015,21 @@ 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_CANVAS) + AC_DEFINE(ENABLE_WASM_STRIP_CHART) + AC_DEFINE(ENABLE_WASM_STRIP_DBACCESS) + AC_DEFINE(ENABLE_WASM_STRIP_EPUB) + AC_DEFINE(ENABLE_WASM_STRIP_EXTRA) + AC_DEFINE(ENABLE_WASM_STRIP_GUESSLANG) +# AC_DEFINE(ENABLE_WASM_STRIP_HUNSPELL) + AC_DEFINE(ENABLE_WASM_STRIP_PINGUSER) + AC_DEFINE(ENABLE_WASM_STRIP_PREMULTIPLY) + AC_DEFINE(ENABLE_WASM_STRIP_RECENT) + AC_DEFINE(ENABLE_WASM_STRIP_RECOVERYUI) + AC_DEFINE(ENABLE_WASM_STRIP_SPLASH) + AC_DEFINE(ENABLE_WASM_STRIP_SWEXPORTS) fi if test "$enable_wasm_exceptions" = yes; then @@ -14623,6 +14638,7 @@ AC_CONFIG_HEADERS([config_host/config_oauth2.h]) AC_CONFIG_HEADERS([config_host/config_poppler.h]) AC_CONFIG_HEADERS([config_host/config_python.h]) AC_CONFIG_HEADERS([config_host/config_writerperfect.h]) +AC_CONFIG_HEADERS([config_host/config_wasm_strip.h]) AC_CONFIG_HEADERS([solenv/lockfile/autoconf.h]) AC_OUTPUT diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index 295b8f2eed3f..8f8e73afe6cd 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -89,6 +89,18 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ )) endif +ifneq ($(ENABLE_WASM_STRIP_PINGUSER),TRUE) +$(eval $(call gb_Library_add_exception_objects,cui,\ + cui/source/dialogs/tipofthedaydlg \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE) +$(eval $(call gb_Library_add_exception_objects,cui,\ + cui/source/dialogs/hyphen \ +)) +endif + $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/customize/acccfg \ cui/source/customize/cfg \ @@ -122,9 +134,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/dialogs/hlmailtp \ cui/source/dialogs/hlmarkwn \ cui/source/dialogs/hltpbase \ - cui/source/dialogs/hyphen \ cui/source/dialogs/iconcdlg \ - cui/source/dialogs/tipofthedaydlg \ cui/source/dialogs/insdlg \ cui/source/dialogs/insrc \ cui/source/dialogs/linkdlg \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 25fda742ab60..eda70a1dd29c 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -15,6 +15,12 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ )) endif +ifneq ($(ENABLE_WASM_STRIP_PINGUSER),TRUE) +$(eval $(call gb_UIConfig_add_uifiles,cui,\ + cui/uiconfig/ui/tipofthedaydialog \ +)) +endif + $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/aboutdialog \ cui/uiconfig/ui/aboutconfigdialog\ @@ -99,7 +105,6 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/hyphenate \ cui/uiconfig/ui/iconchangedialog \ cui/uiconfig/ui/iconselectordialog \ - cui/uiconfig/ui/tipofthedaydialog \ cui/uiconfig/ui/insertfloatingframe \ cui/uiconfig/ui/insertoleobject \ cui/uiconfig/ui/insertrowcolumn \ diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 560548e8066b..7b0a1971d1fe 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -18,6 +18,7 @@ */ #include <config_extensions.h> +#include <config_wasm_strip.h> #include <align.hxx> #include "dlgfact.hxx" @@ -110,7 +111,6 @@ IMPL_ABSTDLG_CLASS(AbstractFmShowColsDialog) IMPL_ABSTDLG_CLASS(AbstractGalleryIdDialog) IMPL_ABSTDLG_CLASS(AbstractGraphicFilterDialog) IMPL_ABSTDLG_CLASS(AbstractHangulHanjaConversionDialog) -IMPL_ABSTDLG_CLASS(AbstractHyphenWordDialog) IMPL_ABSTDLG_CLASS(AbstractInsertObjectDialog) IMPL_ABSTDLG_CLASS(AbstractLinksDialog) IMPL_ABSTDLG_CLASS(AbstractPasswordToOpenModifyDialog) @@ -144,6 +144,15 @@ IMPL_ABSTDLG_CLASS_ASYNC(CuiAbstractTabController,SfxTabDialogController) IMPL_ABSTDLG_CLASS(CuiAbstractController) IMPL_ABSTDLG_CLASS(CuiAbstractSingleTabController) +short AbstractHyphenWordDialog_Impl::Execute() +{ +#if !ENABLE_WASM_STRIP_HUNSPELL + return m_xDlg->run(); +#else + return 0; +#endif +} + const SfxItemSet* AbstractSvxCharacterMapDialog_Impl::GetOutputItemSet() const { return m_xDlg->GetOutputItemSet(); @@ -896,7 +905,16 @@ VclPtr<AbstractHyphenWordDialog> AbstractDialogFactory_Impl::CreateHyphenWordDia css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen, SvxSpellWrapper* pWrapper) { +#if !ENABLE_WASM_STRIP_EXTRA return VclPtr<AbstractHyphenWordDialog_Impl>::Create(std::make_unique<SvxHyphenWordDialog>(rWord, nLang, pParent, xHyphen, pWrapper)); +#else + (void) pParent; + (void) rWord; + (void) nLang; + (void) xHyphen; + (void) pWrapper; + return nullptr; +#endif } VclPtr<AbstractFmShowColsDialog> AbstractDialogFactory_Impl::CreateFmShowColsDialog(weld::Window* pParent) @@ -1475,7 +1493,7 @@ VclPtr<AbstractAdditionsDialog> AbstractDialogFactory_Impl::CreateAdditionsDialo #else (void) pParent; (void) sAdditionsTag; - return VclPtr<AbstractAdditionsDialog>(nullptr); + return nullptr; #endif } @@ -1489,8 +1507,13 @@ AbstractDialogFactory_Impl::CreateAboutDialog(weld::Window* pParent) VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateTipOfTheDayDialog(weld::Window* pParent) { +#if !ENABLE_WASM_STRIP_PINGUSER return VclPtr<CuiAbstractControllerAsync_Impl>::Create( std::make_shared<TipOfTheDayDialog>(pParent)); +#else + (void) pParent; + return nullptr; +#endif } VclPtr<VclAbstractDialog> diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk index 191a2cba4c6f..d160bc6128dc 100644 --- a/desktop/Module_desktop.mk +++ b/desktop/Module_desktop.mk @@ -20,7 +20,7 @@ $(eval $(call gb_Module_add_targets,desktop,\ $(if $(ENABLE_BREAKPAD), \ Library_crashreport \ ) \ - $(if $(DISABLE_GUI),,Library_spl) \ + $(if $(or $(DISABLE_GUI),$(ENABLE_WASM_STRIP_SPLASH)),,Library_spl) \ Package_branding \ $(if $(CUSTOM_BRAND_DIR),Package_branding_custom) \ UIConfig_deployment \ @@ -103,7 +103,7 @@ $(eval $(call gb_Module_add_targets,desktop,\ )) endif -endif +endif # $(OS) ifneq (,$(filter Extension_test-active,$(MAKECMDGOALS))) $(eval $(call gb_Module_add_targets,desktop, \ diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 32d5b31278c1..b14c0d94299a 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -24,6 +24,7 @@ #include <config_java.h> #include <config_folders.h> #include <config_extensions.h> +#include <config_wasm_strip.h> #include <sal/config.h> @@ -99,7 +100,9 @@ #include <osl/process.h> #include <rtl/byteseq.hxx> #include <unotools/pathoptions.hxx> +#if !ENABLE_WASM_STRIP_PINGUSER #include <unotools/VersionConfig.hxx> +#endif #include <rtl/bootstrap.hxx> #include <vcl/test/GraphicsRenderTests.hxx> #include <vcl/glxtestprocess.hxx> @@ -339,10 +342,12 @@ namespace { void runGraphicsRenderTests() { +#if !ENABLE_WASM_STRIP_PINGUSER if (!utl::isProductVersionUpgraded(false)) { return; } +#endif GraphicsRenderTests TestObject; TestObject.run(); } @@ -967,6 +972,7 @@ struct RefClearGuard @param bEmergencySave differs between EMERGENCY_SAVE and RECOVERY */ +#if !ENABLE_WASM_STRIP_RECOVERYUI bool impl_callRecoveryUI(bool bEmergencySave , bool bExistsRecoveryData) { @@ -998,6 +1004,7 @@ bool impl_callRecoveryUI(bool bEmergencySave , aRet >>= bRet; return bRet; } +#endif bool impl_bringToFrontRecoveryUI() { @@ -1146,9 +1153,11 @@ void Desktop::Exception(ExceptionCategory nCategory) // Save all open documents so they will be reopened // the next time the application is started // returns true if at least one document could be saved... +#if !ENABLE_WASM_STRIP_RECOVERYUI bRestart = impl_callRecoveryUI( true , // force emergency save false); +#endif } FlushConfiguration(); @@ -1162,8 +1171,10 @@ void Desktop::Exception(ExceptionCategory nCategory) osl_removeSignalHandler( pSignalHandler ); restartOnMac(false); +#if !ENABLE_WASM_STRIP_SPLASH if ( m_rSplashScreen.is() ) m_rSplashScreen->reset(); +#endif _exit( EXITHELPER_CRASH_WITH_RESTART ); } @@ -1266,7 +1277,9 @@ int Desktop::Main() Translate::SetReadStringHook(ReplaceStringHookProc); // Startup screen +#if !ENABLE_WASM_STRIP_SPLASH OpenSplashScreen(); +#endif SetSplashScreenProgress(10); @@ -1702,8 +1715,10 @@ int Desktop::doShutdown() if ( bRR ) { restartOnMac(true); +#if !ENABLE_WASM_STRIP_SPLASH if ( m_rSplashScreen.is() ) m_rSplashScreen->reset(); +#endif return EXITHELPER_NORMAL_RESTART; } @@ -1999,8 +2014,9 @@ void Desktop::OpenClients() } else { - bool bCrashed = false; bool bExistsRecoveryData = false; +#if !ENABLE_WASM_STRIP_RECOVERYUI + bool bCrashed = false; bool bExistsSessionData = false; bool const bDisableRecovery = getenv("OOO_DISABLE_RECOVERY") != nullptr @@ -2026,6 +2042,7 @@ void Desktop::OpenClients() TOOLS_WARN_EXCEPTION( "desktop.app", "Error during recovery"); } } +#endif Reference< XSessionManagerListener2 > xSessionListener; try @@ -2384,6 +2401,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent ) } } +#if !ENABLE_WASM_STRIP_SPLASH void Desktop::OpenSplashScreen() { const CommandLineArgs &rCmdLine = GetCommandLineArgs(); @@ -2433,31 +2451,42 @@ void Desktop::OpenSplashScreen() m_rSplashScreen->start("SplashScreen", 100); } +#endif void Desktop::SetSplashScreenProgress(sal_Int32 iProgress) { +#if ENABLE_WASM_STRIP_SPLASH + (void) iProgress; +#else if(m_rSplashScreen.is()) { m_rSplashScreen->setValue(iProgress); } +#endif } void Desktop::SetSplashScreenText( const OUString& rText ) { +#if ENABLE_WASM_STRIP_SPLASH + (void) rText; +#else if( m_rSplashScreen.is() ) { m_rSplashScreen->setText( rText ); } +#endif } void Desktop::CloseSplashScreen() { +#if !ENABLE_WASM_STRIP_SPLASH if(m_rSplashScreen.is()) { SolarMutexGuard ensureSolarMutex; m_rSplashScreen->end(); m_rSplashScreen = nullptr; } +#endif } diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk index fc1d93332ae0..2430852d33bd 100644 --- a/drawinglayer/Library_drawinglayer.mk +++ b/drawinglayer/Library_drawinglayer.mk @@ -29,14 +29,19 @@ $(eval $(call gb_Library_use_externals,drawinglayer,\ libxml2 \ )) +ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE) $(eval $(call gb_Library_use_libraries,drawinglayer,\ - drawinglayercore \ - basegfx \ canvastools \ - comphelper \ cppcanvas \ +)) +endif + +$(eval $(call gb_Library_use_libraries,drawinglayer,\ + basegfx \ + comphelper \ cppu \ cppuhelper \ + drawinglayercore \ i18nlangtag \ sal \ salhelper \ diff --git a/editeng/Library_editeng.mk b/editeng/Library_editeng.mk index 1237954ad6e9..6602793e3e02 100644 --- a/editeng/Library_editeng.mk +++ b/editeng/Library_editeng.mk @@ -35,6 +35,7 @@ $(eval $(call gb_Library_add_defs,editeng,\ $(eval $(call gb_Library_use_sdk_api,editeng)) +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) $(eval $(call gb_Library_add_exception_objects,editeng,\ editeng/source/accessibility/AccessibleComponentBase \ editeng/source/accessibility/AccessibleContextBase \ @@ -45,6 +46,10 @@ $(eval $(call gb_Library_add_exception_objects,editeng,\ editeng/source/accessibility/AccessibleSelectionBase \ editeng/source/accessibility/AccessibleStaticTextBase \ editeng/source/accessibility/AccessibleStringWrap \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,editeng,\ editeng/source/editeng/editattr \ editeng/source/editeng/editdata \ editeng/source/editeng/editdbg \ diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx index 669546a8e5cb..134c7211f1a3 100644 --- a/editeng/source/misc/splwrap.cxx +++ b/editeng/source/misc/splwrap.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <rtl/ustring.hxx> #include <i18nlangtag/languagetag.hxx> #include <vcl/svapp.hxx> @@ -249,6 +251,9 @@ void SvxSpellWrapper::InsertHyphen( const sal_Int32 ) // Testing of the document areas in the order specified by the flags void SvxSpellWrapper::SpellDocument( ) { +#if ENABLE_WASM_STRIP_HUNSPELL + return; +#else if ( bOtherCntnt ) { bReverse = false; @@ -275,6 +280,7 @@ void SvxSpellWrapper::SpellDocument( ) xHyph, this )); pDlg->Execute(); } +#endif } diff --git a/extensions/Module_extensions.mk b/extensions/Module_extensions.mk index 327314fb4250..8b3a20127637 100644 --- a/extensions/Module_extensions.mk +++ b/extensions/Module_extensions.mk @@ -56,6 +56,7 @@ $(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 \ )) @@ -71,6 +72,7 @@ $(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/hunspell/StaticLibrary_hunspell.mk b/external/hunspell/StaticLibrary_hunspell.mk index 02d534f69169..3a2eccafb0aa 100644 --- a/external/hunspell/StaticLibrary_hunspell.mk +++ b/external/hunspell/StaticLibrary_hunspell.mk @@ -20,6 +20,12 @@ $(eval $(call gb_StaticLibrary_add_defs,hunspell,\ -DOPENOFFICEORG \ )) +ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE) +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,hunspell,\ + UnpackedTarball/hunspell/src/hunspell/hunspell \ +)) +endif + $(eval $(call gb_StaticLibrary_add_generated_exception_objects,hunspell,\ UnpackedTarball/hunspell/src/hunspell/affentry \ UnpackedTarball/hunspell/src/hunspell/affixmgr \ @@ -30,7 +36,6 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,hunspell,\ UnpackedTarball/hunspell/src/hunspell/hunzip \ UnpackedTarball/hunspell/src/hunspell/filemgr \ UnpackedTarball/hunspell/src/hunspell/replist \ - UnpackedTarball/hunspell/src/hunspell/hunspell \ )) # vim: set noet sw=4 ts=4: diff --git a/external/hyphen/ExternalProject_hyphen.mk b/external/hyphen/ExternalProject_hyphen.mk index 63d167f7804b..1419c9b02890 100644 --- a/external/hyphen/ExternalProject_hyphen.mk +++ b/external/hyphen/ExternalProject_hyphen.mk @@ -9,7 +9,9 @@ $(eval $(call gb_ExternalProject_ExternalProject,hyphen)) +ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE) $(eval $(call gb_ExternalProject_use_external,hyphen,hunspell)) +endif $(eval $(call gb_ExternalProject_register_targets,hyphen,\ build \ diff --git a/external/mythes/ExternalProject_mythes.mk b/external/mythes/ExternalProject_mythes.mk index 298607f0aa73..6a1e9b14e882 100644 --- a/external/mythes/ExternalProject_mythes.mk +++ b/external/mythes/ExternalProject_mythes.mk @@ -9,7 +9,9 @@ $(eval $(call gb_ExternalProject_ExternalProject,mythes)) +ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE) $(eval $(call gb_ExternalProject_use_external,mythes,hunspell)) +endif $(eval $(call gb_ExternalProject_register_targets,mythes,\ build \ diff --git a/extras/Module_extras.mk b/extras/Module_extras.mk index cf7177c21180..516209c5df49 100644 --- a/extras/Module_extras.mk +++ b/extras/Module_extras.mk @@ -61,7 +61,7 @@ $(eval $(call gb_Module_add_l10n_targets,extras,\ ifneq ($(WITH_GALLERY_BUILD),) $(eval $(call gb_Module_add_targets,extras,\ Gallery_backgrounds \ - Gallery_sound \ + $(call gb_Helper_optional,AVMEDIA,Gallery_sound) \ )) endif diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk index 07ffd62770b8..cb893808900e 100644 --- a/framework/Library_fwk.mk +++ b/framework/Library_fwk.mk @@ -61,6 +61,14 @@ $(eval $(call gb_Library_use_libraries,fwk,\ vcl \ )) +ifneq ($(ENABLE_WASM_STRIP_RECOVERYUI),TRUE) +$(eval $(call gb_Library_add_exception_objects,fwk,\ + framework/source/services/autorecovery \ +)) + +$(eval $(call gb_Library_add_componentimpl,fwk,autorecovery)) +endif + $(eval $(call gb_Library_add_exception_objects,fwk,\ framework/source/accelerators/acceleratorcache \ framework/source/accelerators/acceleratorconfiguration \ @@ -149,7 +157,6 @@ $(eval $(call gb_Library_add_exception_objects,fwk,\ framework/source/recording/dispatchrecorder \ framework/source/recording/dispatchrecordersupplier \ framework/source/services/ContextChangeEventMultiplexer \ - framework/source/services/autorecovery \ framework/source/services/desktop \ framework/source/services/dispatchhelper \ framework/source/services/frame \ diff --git a/framework/util/fwk.component b/framework/util/fwk.component index 2b9eb7807fee..b8fef412703d 100644 --- a/framework/util/fwk.component +++ b/framework/util/fwk.component @@ -32,6 +32,7 @@ single-instance="true"> <service name="com.sun.star.frame.AutoRecovery"/> <singleton name="com.sun.star.frame.theAutoRecovery"/> + <optional/> </implementation> <implementation name="com.sun.star.comp.framework.ControlMenuController" constructor="com_sun_star_comp_framework_ControlMenuController_get_implementation"> diff --git a/framework/util/fwk.component.autorecovery b/framework/util/fwk.component.autorecovery new file mode 100644 index 000000000000..9f178cd0e6d5 --- /dev/null +++ b/framework/util/fwk.component.autorecovery @@ -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/. + +com.sun.star.comp.framework.AutoRecovery diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx index a449be4d17fe..71f371a7eddc 100644 --- a/i18npool/source/breakiterator/breakiteratorImpl.cxx +++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx @@ -16,6 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ + #include <config_locales.h> #include <breakiteratorImpl.hxx> diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx index aebe6ad82424..36ccd707a62d 100644 --- a/include/vcl/BitmapTools.hxx +++ b/include/vcl/BitmapTools.hxx @@ -11,6 +11,8 @@ #define INCLUDED_VCL_BITMAP_TOOLS_HXX #include <config_cairo_canvas.h> +#include <config_wasm_strip.h> + #include <vcl/bitmapex.hxx> #include <vcl/ImageTree.hxx> #if ENABLE_CAIRO_CANVAS @@ -26,10 +28,12 @@ namespace com::sun::star::geometry { struct IntegerRectangle2D; } namespace vcl::bitmap { +#if !ENABLE_WASM_STRIP_PREMULTIPLY typedef std::array<std::array<sal_uInt8, 256>, 256> lookup_table; VCL_DLLPUBLIC lookup_table const & get_premultiply_table(); VCL_DLLPUBLIC lookup_table const & get_unpremultiply_table(); +#endif sal_uInt8 unpremultiply(sal_uInt8 c, sal_uInt8 a); sal_uInt8 premultiply(sal_uInt8 c, sal_uInt8 a); diff --git a/lingucomponent/Library_guesslang.mk b/lingucomponent/Library_guesslang.mk index c421f2154dc3..a700ed545bde 100644 --- a/lingucomponent/Library_guesslang.mk +++ b/lingucomponent/Library_guesslang.mk @@ -12,10 +12,15 @@ $(eval $(call gb_Library_Library,guesslang)) $(eval $(call gb_Library_set_componentfile,guesslang,lingucomponent/source/languageguessing/guesslang,services)) +ifneq ($(ENABLE_WASM_STRIP_GUESSLANG),TRUE) $(eval $(call gb_Library_use_externals,guesslang,\ - boost_headers \ libexttextcat \ )) +endif + +$(eval $(call gb_Library_use_externals,guesslang,\ + boost_headers \ +)) $(eval $(call gb_Library_use_sdk_api,guesslang)) diff --git a/lingucomponent/Module_lingucomponent.mk b/lingucomponent/Module_lingucomponent.mk index 2bde5d5391e5..9f19dcedbc67 100644 --- a/lingucomponent/Module_lingucomponent.mk +++ b/lingucomponent/Module_lingucomponent.mk @@ -10,13 +10,23 @@ $(eval $(call gb_Module_Module,lingucomponent)) +ifneq ($(ENABLE_WASM_STRIP_GUESSLANG),TRUE) $(eval $(call gb_Module_add_targets,lingucomponent,\ Library_guesslang \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE) +$(eval $(call gb_Module_add_targets,lingucomponent,\ Library_hyphen \ Library_lnth \ - $(if $(filter iOS MACOSX,$(OS)),Library_MacOSXSpell) \ Library_spell \ StaticLibrary_ulingu \ +)) +endif + +$(eval $(call gb_Module_add_targets,lingucomponent,\ + $(if $(filter iOS MACOSX,$(OS)),Library_MacOSXSpell) \ Library_numbertext \ )) diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk index f9a059b30147..979635a2f213 100644 --- a/oox/Library_oox.mk +++ b/oox/Library_oox.mk @@ -83,28 +83,10 @@ endif $(eval $(call gb_Library_set_componentfile,oox,oox/util/oox,services)) +# WASM_CHART change +ifeq (,$(ENABLE_WASM_STRIP_CHART)) $(eval $(call gb_Library_add_exception_objects,oox,\ - oox/source/core/binarycodec \ - oox/source/core/contexthandler2 \ - oox/source/core/contexthandler \ - oox/source/core/fastparser \ - oox/source/core/fasttokenhandler \ - oox/source/core/filterbase \ - oox/source/core/filterdetect \ - oox/source/core/fragmenthandler2 \ - oox/source/core/fragmenthandler \ - oox/source/core/recordparser \ - oox/source/core/relations \ - oox/source/core/relationshandler \ - oox/source/core/xmlfilterbase \ - oox/source/crypto/AgileEngine \ - oox/source/crypto/CryptTools \ - oox/source/crypto/DocumentEncryption \ - oox/source/crypto/DocumentDecryption \ - oox/source/crypto/Standard2007Engine \ - oox/source/crypto/StrongEncryptionDataSpace \ - oox/source/docprop/docprophandler \ - oox/source/docprop/ooxmldocpropimport \ + oox/source/export/chartexport \ oox/source/drawingml/chart/axiscontext \ oox/source/drawingml/chart/axisconverter \ oox/source/drawingml/chart/axismodel \ @@ -132,6 +114,31 @@ $(eval $(call gb_Library_add_exception_objects,oox,\ oox/source/drawingml/chart/typegroupcontext \ oox/source/drawingml/chart/typegroupconverter \ oox/source/drawingml/chart/typegroupmodel \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,oox,\ + oox/source/core/binarycodec \ + oox/source/core/contexthandler2 \ + oox/source/core/contexthandler \ + oox/source/core/fastparser \ + oox/source/core/fasttokenhandler \ + oox/source/core/filterbase \ + oox/source/core/filterdetect \ + oox/source/core/fragmenthandler2 \ + oox/source/core/fragmenthandler \ + oox/source/core/recordparser \ + oox/source/core/relations \ + oox/source/core/relationshandler \ + oox/source/core/xmlfilterbase \ + oox/source/crypto/AgileEngine \ + oox/source/crypto/CryptTools \ + oox/source/crypto/DocumentEncryption \ + oox/source/crypto/DocumentDecryption \ + oox/source/crypto/Standard2007Engine \ + oox/source/crypto/StrongEncryptionDataSpace \ + oox/source/docprop/docprophandler \ + oox/source/docprop/ooxmldocpropimport \ oox/source/drawingml/clrschemecontext \ oox/source/drawingml/clrscheme \ oox/source/drawingml/colorchoicecontext \ @@ -214,7 +221,6 @@ $(eval $(call gb_Library_add_exception_objects,oox,\ oox/source/dump/dumperbase \ oox/source/dump/oledumper \ oox/source/dump/pptxdumper \ - oox/source/export/chartexport \ oox/source/export/ColorPropertySet \ oox/source/export/drawingml \ oox/source/export/DMLPresetShapeExport \ diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index d0502558670e..6b0eb8c7102f 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <oox/drawingml/shape.hxx> #include <drawingml/customshapeproperties.hxx> #include <oox/drawingml/theme.hxx> @@ -1943,6 +1945,15 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >& Reference< chart2::XChartDocument > xChartDoc( xDocModel, UNO_QUERY_THROW ); // load the chart data from the XML fragment +#if ENABLE_WASM_STRIP_CHART + (void) rFilter; + (void) rxShapes; +#else + // WASM_CHART change + // TODO: Instead of using convertFromModel an alternative may be + // added to convert not to Chart/OLE SdrObejct, but to GraphicObject + // with the Chart visualization. There should be a preiew available + // in the imported chart data bool bMSO2007Doc = rFilter.isMSO2007Document(); chart::ChartSpaceModel aModel(bMSO2007Doc); rtl::Reference<chart::ChartSpaceFragment> pChartSpaceFragment = new chart::ChartSpaceFragment( @@ -1997,6 +2008,7 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >& // Restore the original theme. pPowerPointImport->getActualSlidePersist()->setTheme(pTheme); } +#endif } catch( Exception& ) { diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 1bc728854edd..54c6a58299e9 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -17,9 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sal/config.h> +#include <config_wasm_strip.h> +#include <sal/config.h> #include <sal/log.hxx> + #include <filter/msfilter/util.hxx> #include <o3tl/string_view.hxx> #include <oox/core/xmlfilterbase.hxx> @@ -2176,9 +2178,14 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape ) xPropSet->getPropertyValue("Model") >>= xChartDoc; assert(xChartDoc.is()); //export the chart +#if !ENABLE_WASM_STRIP_CHART + // WASM_CHART change + // TODO: With Chart extracted this cannot really happen since + // no Chart could've been added at all ChartExport aChartExport( mnXmlNamespace, GetFS(), xChartDoc, GetFB(), GetDocumentType() ); static sal_Int32 nChartCount = 0; aChartExport.WriteChartObj( xShape, GetNewShapeID( xShape ), ++nChartCount ); +#endif return *this; } diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx index 1f569d099876..8e35217ea590 100644 --- a/oox/source/ppt/pptimport.cxx +++ b/oox/source/ppt/pptimport.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <sal/config.h> #include <sal/log.hxx> @@ -60,8 +62,12 @@ XmlFilterBase* PowerPointImport::mpDebugFilterBase = nullptr; PowerPointImport::PowerPointImport( const Reference< XComponentContext >& rxContext ) : XmlFilterBase( rxContext ), +#if ENABLE_WASM_STRIP_CHART + // WASM_CHART change + mxChartConv( ) +#else mxChartConv( std::make_shared<::oox::drawingml::chart::ChartConverter>() ) - +#endif { #if OSL_DEBUG_LEVEL > 0 mpDebugFilterBase = this; diff --git a/oox/source/shape/ShapeFilterBase.cxx b/oox/source/shape/ShapeFilterBase.cxx index f5bb1af03955..38c310b47663 100644 --- a/oox/source/shape/ShapeFilterBase.cxx +++ b/oox/source/shape/ShapeFilterBase.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <oox/shape/ShapeFilterBase.hxx> #include <oox/drawingml/chart/chartconverter.hxx> #include <oox/drawingml/themefragmenthandler.hxx> @@ -34,7 +36,12 @@ using namespace ::com::sun::star; ShapeFilterBase::ShapeFilterBase( const uno::Reference< uno::XComponentContext >& rxContext ) : XmlFilterBase( rxContext ), +#if ENABLE_WASM_STRIP_CHART + // WASM_CHART change + mxChartConv( ) +#else mxChartConv( std::make_shared<::oox::drawingml::chart::ChartConverter>() ) +#endif { } diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index c9a2e8c5e4c4..6705a8c572cd 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -128,6 +128,23 @@ endif $(eval $(call gb_Library_set_componentfile,sd,sd/util/sd,services)) +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) +$(eval $(call gb_Library_add_exception_objects,sd,\ + sd/source/ui/accessibility/AccessibleDocumentViewBase \ + sd/source/ui/accessibility/AccessibleDrawDocumentView \ + sd/source/ui/accessibility/AccessibleOutlineEditSource \ + sd/source/ui/accessibility/AccessibleOutlineView \ + sd/source/ui/accessibility/AccessiblePageShape \ + sd/source/ui/accessibility/AccessiblePresentationGraphicShape \ + sd/source/ui/accessibility/AccessiblePresentationOLEShape \ + sd/source/ui/accessibility/AccessiblePresentationShape \ + sd/source/ui/accessibility/AccessibleSlideSorterObject \ + sd/source/ui/accessibility/AccessibleSlideSorterView \ + sd/source/ui/accessibility/AccessibleViewForwarder \ + sd/source/ui/accessibility/SdShapeTypes \ +)) +endif + $(eval $(call gb_Library_add_exception_objects,sd,\ sd/source/core/CustomAnimationCloner \ sd/source/core/CustomAnimationEffect \ @@ -171,18 +188,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\ sd/source/filter/xml/sdtransform \ sd/source/filter/xml/sdxmlwrp \ sd/source/helper/simplereferencecomponent \ - sd/source/ui/accessibility/AccessibleDocumentViewBase \ - sd/source/ui/accessibility/AccessibleDrawDocumentView \ - sd/source/ui/accessibility/AccessibleOutlineEditSource \ - sd/source/ui/accessibility/AccessibleOutlineView \ - sd/source/ui/accessibility/AccessiblePageShape \ - sd/source/ui/accessibility/AccessiblePresentationGraphicShape \ - sd/source/ui/accessibility/AccessiblePresentationOLEShape \ - sd/source/ui/accessibility/AccessiblePresentationShape \ - sd/source/ui/accessibility/AccessibleSlideSorterObject \ - sd/source/ui/accessibility/AccessibleSlideSorterView \ - sd/source/ui/accessibility/AccessibleViewForwarder \ - sd/source/ui/accessibility/SdShapeTypes \ sd/source/ui/animations/CustomAnimationDialog \ sd/source/ui/animations/CustomAnimationList \ sd/source/ui/animations/CustomAnimationPane \ diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk index 51a34d510771..d790d9fef901 100644 --- a/sfx2/Library_sfx.mk +++ b/sfx2/Library_sfx.mk @@ -23,6 +23,10 @@ $(eval $(call gb_Library_add_sdi_headers,sfx,sfx2/sdi/sfxslots)) $(eval $(call gb_Library_set_componentfile,sfx,sfx2/util/sfx,services)) +$(eval $(call gb_Library_add_componentimpls,sfx, \ + $(if $(ENABLE_WASM_STRIP_RECENT),,extended) \ +)) + $(eval $(call gb_Library_set_precompiled_header,sfx,sfx2/inc/pch/precompiled_sfx)) $(eval $(call gb_Library_use_custom_headers,sfx,\ @@ -81,6 +85,15 @@ $(eval $(call gb_Library_use_externals,sfx,\ orcus-parser\ )) +ifneq ($(ENABLE_WASM_STRIP_RECENT),TRUE) +$(eval $(call gb_Library_add_exception_objects,sfx,\ + sfx2/source/dialog/backingcomp \ + sfx2/source/dialog/backingwindow \ + sfx2/source/control/recentdocsview \ + sfx2/source/control/recentdocsviewitem \ +)) +endif + $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/accessibility/AccessibilityCheck \ sfx2/source/accessibility/AccessibilityIssue \ @@ -142,8 +155,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/control/msg \ sfx2/source/control/msgpool \ sfx2/source/control/objface \ - sfx2/source/control/recentdocsview \ - sfx2/source/control/recentdocsviewitem \ sfx2/source/control/request \ sfx2/source/control/sfxstatuslistener \ sfx2/source/control/shell \ @@ -170,8 +181,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/devtools/DocumentModelTreeHandler \ sfx2/source/devtools/ObjectInspectorTreeHandler \ sfx2/source/dialog/alienwarn \ - sfx2/source/dialog/backingcomp \ - sfx2/source/dialog/backingwindow \ sfx2/source/dialog/basedlgs \ sfx2/source/dialog/checkin \ sfx2/source/dialog/dialoghelper \ diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index b8c80823daf3..980d4cb057e9 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -18,6 +18,8 @@ */ #include <config_features.h> +#include <config_wasm_strip.h> + #include <com/sun/star/drawing/ModuleDispatcher.hpp> #include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/frame/DispatchResultEvent.hpp> @@ -504,6 +506,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) sfx2::openUriExternally(sURL, false, rReq.GetFrameWeld()); break; } +#if !ENABLE_WASM_STRIP_PINGUSER case SID_GETINVOLVED: { // Open get involved/join us page based on locales @@ -539,6 +542,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) sfx2::openUriExternally(sURL, false, rReq.GetFrameWeld()); break; } +#endif case SID_SHOW_LICENSE: { LicenseDialog aDialog(rReq.GetFrameWeld()); @@ -618,6 +622,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) break; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +#if !ENABLE_WASM_STRIP_PINGUSER case SID_TIPOFTHEDAY: { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); @@ -626,6 +631,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) bDone = true; break; } +#endif // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_ABOUT: diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 7050dee85964..0c9a742158d2 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -18,6 +18,8 @@ */ #include <config_feature_desktop.h> +#include <config_wasm_strip.h> + #include <osl/file.hxx> #include <sfx2/docfilt.hxx> #include <sfx2/infobar.hxx> @@ -47,7 +49,9 @@ #include <vcl/stdtext.hxx> #include <vcl/weld.hxx> #include <vcl/weldutils.hxx> +#if !ENABLE_WASM_STRIP_PINGUSER #include <unotools/VersionConfig.hxx> +#endif #include <svtools/miscopt.hxx> #include <tools/diagnose_ex.h> #include <com/sun/star/container/XIndexAccess.hpp> @@ -1396,6 +1400,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) rBind.Invalidate( SID_RELOAD ); rBind.Invalidate( SID_EDITDOC ); +#if !ENABLE_WASM_STRIP_PINGUSER bool bIsHeadlessOrUITest = SfxApplication::IsHeadlessOrUITest(); //uitest.uicheck fails when the dialog is open //what's new infobar @@ -1476,6 +1481,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) officecfg::Setup::Product::LastTimeDonateShown::set(nNow, batch); batch->commit(); } +#endif // read-only infobar if necessary const SfxViewShell *pVSh; @@ -1628,6 +1634,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) } } +#if !ENABLE_WASM_STRIP_PINGUSER IMPL_LINK_NOARG(SfxViewFrame, WhatsNewHandler, weld::Button&, void) { GetDispatcher()->Execute(SID_WHATSNEW); @@ -1642,6 +1649,7 @@ IMPL_LINK_NOARG(SfxViewFrame, DonationHandler, weld::Button&, void) { GetDispatcher()->Execute(SID_DONATION); } +#endif IMPL_LINK(SfxViewFrame, SwitchReadOnlyHandler, weld::Button&, rButton, void) { diff --git a/sfx2/util/sfx.component b/sfx2/util/sfx.component index a7c9930e0ec8..7970342db206 100644 --- a/sfx2/util/sfx.component +++ b/sfx2/util/sfx.component @@ -23,6 +23,7 @@ constructor="com_sun_star_comp_sfx2_BackingComp_get_implementation"> <service name="com.sun.star.frame.StartModule"/> <service name="com.sun.star.frame.ProtocolHandler"/> + <optional/> </implementation> <implementation name="SfxDocumentMetaData" constructor="SfxDocumentMetaData_get_implementation"> diff --git a/sfx2/util/sfx.component.extended b/sfx2/util/sfx.component.extended new file mode 100644 index 000000000000..2695e06a0d1a --- /dev/null +++ b/sfx2/util/sfx.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/. + +com.sun.star.comp.sfx2.BackingComp diff --git a/solenv/gbuild/extensions/pre_MergedLibsList.mk b/solenv/gbuild/extensions/pre_MergedLibsList.mk index 8bbba842e029..d5bf6f9c0862 100644 --- a/solenv/gbuild/extensions/pre_MergedLibsList.mk +++ b/solenv/gbuild/extensions/pre_MergedLibsList.mk @@ -70,7 +70,7 @@ MERGE_LIBRARY_LIST := \ sofficeapp \ sot \ spell \ - $(if $(DISABLE_GUI),,spl) \ + $(if $(or $(DISABLE_GUI),$(ENABLE_WASM_STRIP_SPLASH)),,spl) \ srtrs1 \ $(call gb_Helper_optional,SCRIPTING,stringresource) \ svgio \ diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index 22e266ff19c6..092a4613f374 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -21,7 +21,10 @@ $(eval $(call gb_Library_Library,svx)) $(eval $(call gb_Library_set_componentfile,svx,svx/util/svx,services)) -$(eval $(call gb_Helper_optional,BREAKPAD,$(call gb_Library_add_componentimpl,svx,crashreport))) +$(eval $(call gb_Library_add_componentimpls,svx, \ + $(call gb_Helper_optional,BREAKPAD,crashreport) \ + $(if $(ENABLE_WASM_STRIP_RECOVERYUI),,recoveryui) \ +)) $(eval $(call gb_Library_set_include,svx,\ -I$(SRCDIR)/svx/inc \ @@ -82,10 +85,17 @@ $(eval $(call gb_Library_use_externals,svx,\ icu_headers \ )) +ifneq ($(ENABLE_WASM_STRIP_RECOVERYUI),TRUE) +$(eval $(call gb_Library_add_exception_objects,svx,\ + svx/source/dialog/docrecovery \ + svx/source/unodraw/recoveryui \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/accessibility/AccessibleControlShape \ svx/source/accessibility/AccessibleEmptyEditSource \ - svx/source/accessibility/AccessibleFrameSelector \ svx/source/accessibility/AccessibleGraphicShape \ svx/source/accessibility/AccessibleOLEShape \ svx/source/accessibility/AccessibleShape \ @@ -99,9 +109,14 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/accessibility/GraphCtlAccessibleContext \ svx/source/accessibility/ShapeTypeHandler \ svx/source/accessibility/SvxShapeTypes \ - svx/source/accessibility/charmapacc \ svx/source/accessibility/lookupcolorname \ - svx/source/accessibility/svxpixelctlaccessiblecontext \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,svx,\ + svx/source/accessibility/AccessibleFrameSelector \ + svx/source/accessibility/charmapacc \ + svx/source/accessibility/svxpixelctlaccessiblecontext \ svx/source/accessibility/svxrectctaccessiblecontext \ svx/source/customshapes/EnhancedCustomShape3d \ svx/source/customshapes/EnhancedCustomShapeEngine \ @@ -127,7 +142,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/dialog/dialcontrol \ svx/source/dialog/dlgctl3d \ svx/source/dialog/dlgctrl \ - svx/source/dialog/docrecovery \ svx/source/dialog/fntctrl \ svx/source/dialog/fontwork \ svx/source/dialog/frmdirlbox \ @@ -259,7 +273,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/tbxctrls/tbxdrctl \ svx/source/tbxctrls/verttexttbxctrl \ svx/source/uitest/uiobject \ - svx/source/unodraw/recoveryui \ svx/source/unodraw/unoctabl \ svx/source/unodraw/UnoNamespaceMap \ svx/source/unodraw/unopool \ diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk index fd6dcfd6f455..b386f72ef15c 100644 --- a/svx/Library_svxcore.mk +++ b/svx/Library_svxcore.mk @@ -21,6 +21,10 @@ $(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) \ +)) + $(eval $(call gb_Library_add_sdi_headers,svxcore,svx/sdi/svxslots)) $(eval $(call gb_Library_use_custom_headers,svxcore,\ diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index fd72c77d52d6..3617e48a82c8 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <vcl/event.hxx> #include <vcl/fontcharmap.hxx> #include <vcl/svapp.hxx> @@ -732,6 +734,7 @@ void SvxShowCharSet::SelectIndex(int nNewIndex, bool bFocus) if( nSelectedIndex >= 0 ) { getSelectedChar() = mxFontCharMap->GetCharFromIndex( nSelectedIndex ); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( m_xAccessible.is() ) { svx::SvxShowCharSetItem* pItem = ImplGetItem(nSelectedIndex); @@ -751,6 +754,7 @@ void SvxShowCharSet::SelectIndex(int nNewIndex, bool bFocus) aNewAny <<= AccessibleStateType::SELECTED; pItem->m_xItem->fireEvent( AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny ); } +#endif } aHighHdl.Call( this ); } @@ -785,6 +789,7 @@ IMPL_LINK_NOARG(SvxShowCharSet, VscrollHdl, weld::ScrolledWindow&, void) } else if( nSelectedIndex > LastInView() ) { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( m_xAccessible.is() ) { css::uno::Any aOldAny, aNewAny; @@ -795,6 +800,7 @@ IMPL_LINK_NOARG(SvxShowCharSet, VscrollHdl, weld::ScrolledWindow&, void) m_xAccessible ->fireEvent( AccessibleEventId::CHILD, aOldAny, aNewAny ); } } +#endif SelectIndex( (LastInView() - COLUMN_COUNT + 1) + (nSelectedIndex % COLUMN_COUNT) ); } @@ -803,18 +809,22 @@ IMPL_LINK_NOARG(SvxShowCharSet, VscrollHdl, weld::ScrolledWindow&, void) SvxShowCharSet::~SvxShowCharSet() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (m_xAccessible.is()) { m_aItems.clear(); m_xAccessible->clearCharSetControl(); m_xAccessible.clear(); } +#endif } css::uno::Reference< XAccessible > SvxShowCharSet::CreateAccessible() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY OSL_ENSURE(!m_xAccessible.is(),"Accessible already created!"); m_xAccessible = new svx::SvxShowCharSetAcc(this); +#endif return m_xAccessible; } @@ -823,7 +833,9 @@ svx::SvxShowCharSetItem* SvxShowCharSet::ImplGetItem( int _nPos ) ItemsMap::iterator aFind = m_aItems.find(_nPos); if ( aFind == m_aItems.end() ) { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY OSL_ENSURE(m_xAccessible.is(), "Who wants to create a child of my table without a parent?"); +#endif auto xItem = std::make_shared<svx::SvxShowCharSetItem>(*this, m_xAccessible.get(), sal::static_int_cast< sal_uInt16 >(_nPos)); aFind = m_aItems.emplace(_nPos, xItem).first; diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index f14cc1822a39..35737285a231 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <vcl/svapp.hxx> #include <vcl/settings.hxx> #include <vcl/virdev.hxx> @@ -89,7 +91,9 @@ void SvxRectCtl::SetControlSettings(RectPoint eRpt, sal_uInt16 nBorder) SvxRectCtl::~SvxRectCtl() { pBitmap.reset(); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY pAccContext.clear(); +#endif } void SvxRectCtl::Resize() @@ -415,11 +419,13 @@ void SvxRectCtl::GetFocus() { Invalidate(); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY // Send accessibility event. if (pAccContext.is()) { pAccContext->FireChildFocus(GetActualRP()); } +#endif } void SvxRectCtl::LoseFocus() @@ -499,9 +505,11 @@ void SvxRectCtl::SetActualRP( RectPoint eNewRP ) Invalidate(); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY // notify accessibility object about change if (pAccContext.is()) pAccContext->selectChild( eNewRP /* MT, bFireFocus */ ); +#endif } void SvxRectCtl::SetState( CTL_STATE nState ) @@ -552,7 +560,9 @@ tools::Rectangle SvxRectCtl::CalculateFocusRectangle( RectPoint eRectPoint ) con Reference< XAccessible > SvxRectCtl::CreateAccessible() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY pAccContext = new SvxRectCtlAccessibleContext(this); +#endif return pAccContext; } @@ -572,8 +582,10 @@ void SvxRectCtl::DoCompletelyDisable(bool bNew) css::uno::Reference< css::accessibility::XAccessible > SvxPixelCtl::CreateAccessible() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (!m_xAccess.is()) m_xAccess = new SvxPixelCtlAccessible(this); +#endif return m_xAccess; } @@ -673,10 +685,14 @@ bool SvxPixelCtl::MouseButtonDown( const MouseEvent& rMEvt ) tools::Long nIndex = ShowPosition(rMEvt.GetPosPixel()); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if(m_xAccess.is()) { m_xAccess->NotifyChild(nIndex,true, true); } +#else + (void)nIndex; +#endif return true; } @@ -816,6 +832,7 @@ bool SvxPixelCtl::KeyInput( const KeyEvent& rKEvt ) default: return CustomWidgetController::KeyInput( rKEvt ); } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if(m_xAccess.is()) { tools::Long nIndex = GetFocusPosIndex(); @@ -837,6 +854,9 @@ bool SvxPixelCtl::KeyInput( const KeyEvent& rKEvt ) break; } } +#else + (void)bFocusPosChanged; +#endif return true; } else @@ -850,10 +870,12 @@ void SvxPixelCtl::GetFocus() { Invalidate(implCalFocusRect(aFocusPosition)); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (m_xAccess.is()) { m_xAccess->NotifyChild(GetFocusPosIndex(),true,false); } +#endif } void SvxPixelCtl::LoseFocus() diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index 117bec6f6784..f7d470896cc5 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <sal/config.h> #include <o3tl/safeint.hxx> @@ -236,8 +238,10 @@ FrameSelectorImpl::FrameSelectorImpl( FrameSelector& rFrameSel ) : mbBLTR( false ), mbFullRepaint( true ), mbAutoSelect( true ), - mbHCMode( false ), - maChildVec( 8 ) + mbHCMode( false ) +#if !ENABLE_WASM_STRIP_ACCESSIBILITY + ,maChildVec( 8 ) +#endif { maAllBorders.resize( FRAMEBORDERTYPE_COUNT, nullptr ); maAllBorders[ GetIndexFromFrameBorderType( FrameBorderType::Left ) ] = &maLeft; @@ -269,11 +273,12 @@ FrameSelectorImpl::FrameSelectorImpl( FrameSelector& rFrameSel ) : } FrameSelectorImpl::~FrameSelectorImpl() - { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY for( auto& rpChild : maChildVec ) if( rpChild.is() ) rpChild->Invalidate(); +#endif } // initialization @@ -754,17 +759,24 @@ void FrameSelectorImpl::SetBorderState( FrameBorder& rBorder, FrameBorderState e Any aNew; Any& rMod = eState == FrameBorderState::Show ? aNew : aOld; rMod <<= AccessibleStateType::CHECKED; + +#if !ENABLE_WASM_STRIP_ACCESSIBILITY rtl::Reference< a11y::AccFrameSelectorChild > xRet; size_t nVecIdx = static_cast< size_t >( rBorder.GetType() ); if( GetBorder(rBorder.GetType()).IsEnabled() && (1 <= nVecIdx) && (nVecIdx <= maChildVec.size()) ) xRet = maChildVec[ --nVecIdx ].get(); +#endif if( eState == FrameBorderState::Show ) SetBorderCoreStyle( rBorder, &maCurrStyle ); else rBorder.SetState( eState ); + +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (xRet.is()) xRet->NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOld, aNew ); +#endif + DoInvalidate( true ); } @@ -838,8 +850,10 @@ void FrameSelector::SetDrawingArea(weld::DrawingArea* pDrawingArea) FrameSelector::~FrameSelector() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( mxAccess.is() ) mxAccess->Invalidate(); +#endif } void FrameSelector::Initialize( FrameSelFlags nFlags ) @@ -972,6 +986,7 @@ bool FrameSelector::IsBorderSelected( FrameBorderType eBorder ) const void FrameSelector::SelectBorder( FrameBorderType eBorder ) { mxImpl->SelectBorder( mxImpl->GetBorderAccess( eBorder ), true/*bSelect*/ ); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY // MT: bFireFox as API parameter is ugly... // if (bFocus) { @@ -983,6 +998,7 @@ void FrameSelector::SelectBorder( FrameBorderType eBorder ) xRet->NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); } } +#endif } bool FrameSelector::IsAnyBorderSelected() const @@ -1026,8 +1042,10 @@ SvxBorderLineStyle FrameSelector::getCurrentStyleLineStyle() const // accessibility Reference< XAccessible > FrameSelector::CreateAccessible() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( !mxAccess.is() ) mxAccess = new a11y::AccFrameSelector(*this); +#endif return mxAccess; } diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index ba44840a9b16..136eae27b52c 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <svl/itempool.hxx> #include <vcl/settings.hxx> #include <vcl/ptrstyle.hxx> @@ -74,11 +76,14 @@ GraphCtrl::~GraphCtrl() { aUpdateIdle.Stop(); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( mpAccContext.is() ) { mpAccContext->disposing(); mpAccContext.clear(); } +#endif + pView.reset(); pModel.reset(); pUserCall.reset(); @@ -142,9 +147,11 @@ void GraphCtrl::InitSdrModel() pView->SetBufferedOutputAllowed(true); pView->SetBufferedOverlayAllowed(true); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY // Tell the accessibility object about the changes. if (mpAccContext.is()) mpAccContext->setModelAndView (pModel.get(), pView.get()); +#endif } void GraphCtrl::SetGraphic( const Graphic& rGraphic, bool bNewModel ) @@ -829,12 +836,14 @@ Point GraphCtrl::GetPositionInDialog() const css::uno::Reference< css::accessibility::XAccessible > GraphCtrl::CreateAccessible() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if(mpAccContext == nullptr ) { // Disable accessibility if no model/view data available if (pView && pModel) mpAccContext = new SvxGraphCtrlAccessibleContext(*this); } +#endif return mpAccContext; } diff --git a/svx/source/dialog/searchcharmap.cxx b/svx/source/dialog/searchcharmap.cxx index 1cdb3cfc082a..201e018d5652 100644 --- a/svx/source/dialog/searchcharmap.cxx +++ b/svx/source/dialog/searchcharmap.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <vcl/event.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> @@ -394,7 +396,9 @@ svx::SvxShowCharSetItem* SvxSearchCharSet::ImplGetItem( int _nPos ) ItemsMap::iterator aFind = m_aItems.find(_nPos); if ( aFind == m_aItems.end() ) { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY OSL_ENSURE(m_xAccessible.is(), "Who wants to create a child of my table without a parent?"); +#endif auto xItem = std::make_shared<svx::SvxShowCharSetItem>(*this, m_xAccessible.get(), sal::static_int_cast< sal_uInt16 >(_nPos)); aFind = m_aItems.emplace(_nPos, xItem).first; diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index 341a7cc58a67..d3f3c3f79c9e 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <basegfx/matrix/b2dhommatrix.hxx> #include <com/sun/star/accessibility/AccessibleRole.hpp> #include <com/sun/star/accessibility/AccessibleStateType.hpp> @@ -846,18 +848,22 @@ public: css::uno::Reference<css::accessibility::XAccessible> WeldEditView::CreateAccessible() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (!m_xAccessible.is()) m_xAccessible.set(new WeldEditAccessible(this)); +#endif return m_xAccessible; } WeldEditView::~WeldEditView() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (m_xAccessible.is()) { m_xAccessible->ClearWin(); // make Accessible nonfunctional m_xAccessible.clear(); } +#endif } bool WeldViewForwarder::IsValid() const { return m_rEditAcc.GetEditView() != nullptr; } @@ -1566,14 +1572,18 @@ void WeldEditView::SetDrawingArea(weld::DrawingArea* pDrawingArea) pDrawingArea->set_cursor(PointerStyle::Text); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY InitAccessible(); +#endif } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY void WeldEditView::InitAccessible() { if (m_xAccessible.is()) m_xAccessible->Init(GetEditEngine(), GetEditView()); } +#endif int WeldEditView::GetSurroundingText(OUString& rSurrounding) { @@ -1603,6 +1613,7 @@ void WeldEditView::GetFocus() weld::CustomWidgetController::GetFocus(); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (m_xAccessible.is()) { // Note: will implicitly send the AccessibleStateType::FOCUSED event @@ -1610,6 +1621,7 @@ void WeldEditView::GetFocus() if (pHelper) pHelper->SetFocus(); } +#endif } void WeldEditView::LoseFocus() @@ -1617,6 +1629,7 @@ void WeldEditView::LoseFocus() weld::CustomWidgetController::LoseFocus(); Invalidate(); // redraw without cursor +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (m_xAccessible.is()) { // Note: will implicitly send the AccessibleStateType::FOCUSED event @@ -1624,6 +1637,7 @@ void WeldEditView::LoseFocus() if (pHelper) pHelper->SetFocus(false); } +#endif } bool WeldEditView::CanFocus() const { return true; } diff --git a/svx/util/svx.component b/svx/util/svx.component index db47c36fc1e7..c655da210995 100644 --- a/svx/util/svx.component +++ b/svx/util/svx.component @@ -31,6 +31,7 @@ <implementation name="com.sun.star.comp.svx.RecoveryUI" constructor="com_sun_star_comp_svx_RecoveryUI_get_implementation"> <service name="com.sun.star.dialog.RecoveryUI"/> + <optional/> </implementation> <implementation name="com.sun.star.comp.svx.CrashReportUI" constructor="com_sun_star_comp_svx_CrashReportUI_get_implementation"> diff --git a/svx/util/svx.component.recoveryui b/svx/util/svx.component.recoveryui new file mode 100644 index 000000000000..2a3f4b0aed89 --- /dev/null +++ b/svx/util/svx.component.recoveryui @@ -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/. + +com.sun.star.comp.svx.RecoveryUI diff --git a/svx/util/svxcore.component b/svx/util/svxcore.component index d8989b71f4e9..d3b0942f4a84 100644 --- a/svx/util/svxcore.component +++ b/svx/util/svxcore.component @@ -21,6 +21,7 @@ <implementation name="com.sun.star.comp.Draw.GraphicExporter" constructor="com_sun_star_comp_Draw_GraphicExporter_get_implementation"> <service name="com.sun.star.drawing.GraphicExportFilter"/> + <optional/> </implementation> <implementation name="com.sun.star.comp.svx.ExtrusionDepthController" constructor="com_sun_star_comp_svx_ExtrusionDepthController_get_implementation"> diff --git a/svx/util/svxcore.component.draw b/svx/util/svxcore.component.draw new file mode 100644 index 000000000000..5192ae34fd88 --- /dev/null +++ b/svx/util/svxcore.component.draw @@ -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/. + +com.sun.star.comp.Draw.GraphicExporter diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk index 46f601c65d3d..daa08fb9f3f7 100644 --- a/sw/Library_sw.mk +++ b/sw/Library_sw.mk @@ -94,11 +94,8 @@ $(eval $(call gb_Library_use_externals,sw,\ libxml2 \ )) +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) $(eval $(call gb_Library_add_exception_objects,sw,\ - sw/source/core/SwNumberTree/SwNodeNum \ - sw/source/core/SwNumberTree/SwNumberTree \ - sw/source/core/access/AccessibilityCheck \ - sw/source/core/access/AccessibilityIssue \ sw/source/core/access/acccell \ sw/source/core/access/acccontext \ sw/source/core/access/accdoc \ @@ -125,6 +122,15 @@ $(eval $(call gb_Library_add_exception_objects,sw,\ sw/source/core/access/acctextframe \ sw/source/core/access/parachangetrackinginfo \ sw/source/core/access/textmarkuphelper \ + sw/source/uibase/docvw/SidebarWinAcc \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,sw,\ + sw/source/core/SwNumberTree/SwNodeNum \ + sw/source/core/SwNumberTree/SwNumberTree \ + sw/source/core/access/AccessibilityCheck \ + sw/source/core/access/AccessibilityIssue \ sw/source/core/attr/BorderCacheOwner \ sw/source/core/attr/calbck \ sw/source/core/attr/cellatr \ @@ -626,7 +632,6 @@ $(eval $(call gb_Library_add_exception_objects,sw,\ sw/source/uibase/docvw/PostItMgr \ sw/source/uibase/docvw/ShadowOverlayObject \ sw/source/uibase/docvw/SidebarTxtControl \ - sw/source/uibase/docvw/SidebarWinAcc \ sw/source/uibase/docvw/HeaderFooterWin \ sw/source/uibase/docvw/OutlineContentVisibilityWin \ sw/source/uibase/docvw/edtdd \ diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index ae7b2c81133d..e4b1d55b1d9e 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <memory> #include <com/sun/star/text/XTextRange.hpp> @@ -1545,6 +1547,7 @@ static void lcl_CheckHiddenPara( SwPosition& rPos ) rPos = SwPosition( aTmp, SwIndex( pTextNd, 0 ) ); } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY namespace { // #i27301# - helper class that notifies the accessibility about invalid text @@ -1566,6 +1569,7 @@ class SwNotifyAccAboutInvalidTextSelections }; } +#endif void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) { @@ -1579,7 +1583,9 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) return; // if not then no update } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY SwNotifyAccAboutInvalidTextSelections aInvalidateTextSelections( *this ); +#endif if ( m_bIgnoreReadonly ) { @@ -1747,8 +1753,10 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) m_pVisibleCursor->Show(); // show again } m_eMvState = CursorMoveState::NONE; // state for cursor travelling - GetModelPositionForViewPoint +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (Imp()->IsAccessible()) Imp()->InvalidateAccessibleCursorPosition( pTableFrame ); +#endif return; } } @@ -2019,8 +2027,10 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) m_eMvState = CursorMoveState::NONE; // state for cursor travelling - GetModelPositionForViewPoint +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (Imp()->IsAccessible()) Imp()->InvalidateAccessibleCursorPosition( pFrame ); +#endif // switch from blinking cursor to read-only-text-selection cursor const sal_uInt64 nBlinkTime = GetOut()->GetSettings().GetStyleSettings(). diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 6c1afc01070e..1087f9eebfa4 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <libxml/xmlwriter.h> #include <hintids.hxx> @@ -1117,6 +1119,7 @@ void SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if ( pNew->IsTextFrame() ) { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); @@ -1130,6 +1133,7 @@ void SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx) pPrev ? pPrev->DynCastTextFrame() : nullptr ); } } +#endif pNew = pSct; } @@ -1145,6 +1149,7 @@ void SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if ( pNew->IsTextFrame() ) { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); @@ -1158,6 +1163,7 @@ void SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx) pPrev ? pPrev->DynCastTextFrame() : nullptr ); } } +#endif if ( bInitNewSect ) static_cast<SwSectionFrame*>(pNew)->Init(); } diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 1b0e09f9b0f2..302fbd007b8d 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <memory> #include <fesh.hxx> #include <hintids.hxx> @@ -2427,6 +2429,7 @@ void SwTableNode::MakeOwnFrames(SwNodeIndex* pIdxBehind) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && @@ -2439,6 +2442,7 @@ void SwTableNode::MakeOwnFrames(SwNodeIndex* pIdxBehind) pPrev ? pPrev->DynCastTextFrame() : nullptr ); } } +#endif pNew->RegistFlys(); } } @@ -2464,6 +2468,7 @@ void SwTableNode::DelFrames(SwRootFrame const*const pLayout) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for current next paragraph will change // and relation CONTENT_FLOWS_TO for current previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && @@ -2476,6 +2481,7 @@ void SwTableNode::DelFrames(SwRootFrame const*const pLayout) pPrev ? pPrev->DynCastTextFrame() : nullptr ); } } +#endif if (pFrame->GetUpper()) pFrame->Cut(); SwFrame::DestroyFrame(pFrame); diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index f0ee2aad5b6c..1995377f9a51 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <hintids.hxx> #include <editeng/protitem.hxx> #include <osl/diagnose.h> @@ -1385,6 +1387,7 @@ void SwContentNode::MakeFramesForAdjacentContentNode(SwContentNode& rNode) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if ( pNew->IsTextFrame() ) { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); @@ -1398,6 +1401,7 @@ void SwContentNode::MakeFramesForAdjacentContentNode(SwContentNode& rNode) pPrev ? pPrev->DynCastTextFrame() : nullptr ); } } +#endif } } @@ -1482,6 +1486,7 @@ void SwContentNode::DelFrames(SwRootFrame const*const pLayout) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for current next paragraph will change // and relation CONTENT_FLOWS_TO for current previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) @@ -1492,6 +1497,7 @@ void SwContentNode::DelFrames(SwRootFrame const*const pLayout) pNext ? pNext->DynCastTextFrame() : nullptr, pPrev ? pPrev->DynCastTextFrame() : nullptr ); } +#endif } if( pFrame->IsFollow() ) diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index 12b955d04ee5..b7e0aa638839 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <hintids.hxx> #include <svtools/optionsdrawinglayer.hxx> #include <svx/svdpage.hxx> @@ -379,6 +381,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, nNewPos ); pDrawPage->RecalcObjOrdNums(); // adjustments for accessibility API +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if ( auto pTmpFlyFrame = pAnchoredObj->DynCastFlyFrame() ) { m_rImp.DisposeAccessibleFrame( pTmpFlyFrame ); @@ -389,6 +392,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, m_rImp.DisposeAccessibleObj(pAnchoredObj->GetDrawObj(), true); m_rImp.AddAccessibleObj( pAnchoredObj->GetDrawObj() ); } +#endif } aAnchoredObjs.pop_back(); } @@ -412,6 +416,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, nTmpNewPos ); pDrawPage->RecalcObjOrdNums(); // adjustments for accessibility API +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if ( auto pTmpFlyFrame = pAnchoredObj->DynCastFlyFrame() ) { m_rImp.DisposeAccessibleFrame( pTmpFlyFrame ); @@ -422,6 +427,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, m_rImp.DisposeAccessibleObj(pAnchoredObj->GetDrawObj(), true); m_rImp.AddAccessibleObj( pAnchoredObj->GetDrawObj() ); } +#endif } aAnchoredObjs.pop_back(); } @@ -589,8 +595,10 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos, if ( auto pFlyFrame = pMovedAnchoredObj->DynCastFlyFrame() ) { // adjustments for accessibility API +#if !ENABLE_WASM_STRIP_ACCESSIBILITY m_rImp.DisposeAccessibleFrame( pFlyFrame ); m_rImp.AddAccessibleFrame( pFlyFrame ); +#endif const sal_uInt32 nChildNewPos = bMovedForward ? nNewPos : nNewPos+1; size_t i = bMovedForward ? nOldPos : nObjCount-1; @@ -617,6 +625,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos, // collect 'child' object aMovedChildObjs.push_back( pTmpObj ); // adjustments for accessibility API +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if ( auto pFlyDrawObj = dynamic_cast<SwVirtFlyDrawObj *>( pTmpObj ) ) { const SwFlyFrame *pTmpFlyFrame = pFlyDrawObj->GetFlyFrame(); @@ -628,6 +637,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos, m_rImp.DisposeAccessibleObj(pTmpObj, true); m_rImp.AddAccessibleObj( pTmpObj ); } +#endif } else { @@ -641,12 +651,14 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos, } while ( ( bMovedForward && i < ( nObjCount - aMovedChildObjs.size() ) ) || ( !bMovedForward && i > ( nNewPos + aMovedChildObjs.size() ) ) ); } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY else { // adjustments for accessibility API m_rImp.DisposeAccessibleObj(pObj, true); m_rImp.AddAccessibleObj( pObj ); } +#endif MoveRepeatedObjs( *pMovedAnchoredObj, aMovedChildObjs ); } diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx index 3e37961dffd6..996aa1f3a5bb 100644 --- a/sw/source/core/layout/anchoreddrawobject.cxx +++ b/sw/source/core/layout/anchoreddrawobject.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <dcontact.hxx> #include <rootfrm.hxx> #include <pagefrm.hxx> @@ -123,11 +125,13 @@ SwPosNotify::~SwPosNotify() COVERITY_NOEXCEPT_FALSE } } // tdf#101464 notify SwAccessibleMap about new drawing object position +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (mpOldPageFrame && mpOldPageFrame->getRootFrame()->IsAnyShellAccessible()) { mpOldPageFrame->getRootFrame()->GetCurrShell()->Imp()->MoveAccessible( nullptr, mpAnchoredDrawObj->GetDrawObj(), maOldObjRect); } +#endif } // --> #i32795# diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index b4b98f6e76cc..28cd55a2dbcc 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <svl/itemiter.hxx> #include <vcl/imap.hxx> #include <tools/helpers.hxx> @@ -262,6 +264,7 @@ void SwFlyFrame::DestroyImpl() // For frames bound as char or frames that don't have an anchor we have // to do that ourselves. For any other frame the call RemoveFly at the // anchor will do that. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( IsAccessibleFrame() && GetFormat() && (IsFlyInContentFrame() || !GetAnchorFrame()) ) { SwRootFrame *pRootFrame = getRootFrame(); @@ -276,6 +279,7 @@ void SwFlyFrame::DestroyImpl() } } } +#endif if( GetFormat() && !GetFormat()->GetDoc()->IsInDtor() ) { @@ -485,6 +489,7 @@ void SwFlyFrame::ChainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) } // invalidate accessible relation set (accessibility wrapper) +#if !ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pSh = pMaster->getRootFrame()->GetCurrShell(); if( pSh ) { @@ -492,6 +497,7 @@ void SwFlyFrame::ChainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) if( pLayout && pLayout->IsAnyShellAccessible() ) pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow ); } +#endif } void SwFlyFrame::UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) @@ -531,6 +537,7 @@ void SwFlyFrame::UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) pFollow->GetFormat()->GetDoc(), ++nIndex ); // invalidate accessible relation set (accessibility wrapper) +#if !ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pSh = pMaster->getRootFrame()->GetCurrShell(); if( pSh ) { @@ -538,6 +545,7 @@ void SwFlyFrame::UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) if( pLayout && pLayout->IsAnyShellAccessible() ) pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow ); } +#endif } SwFlyFrame *SwFlyFrame::FindChainNeighbour( SwFrameFormat const &rChain, SwFrame *pAnch ) @@ -794,12 +802,14 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, const SvxProtectItem *pP = static_cast<const SvxProtectItem*>(pNew); GetVirtDrawObj()->SetMoveProtect( pP->IsPosProtected() ); GetVirtDrawObj()->SetResizeProtect( pP->IsSizeProtected() ); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( pSh ) { SwRootFrame* pLayout = getRootFrame(); if( pLayout && pLayout->IsAnyShellAccessible() ) pSh->Imp()->InvalidateAccessibleEditableState( true, this ); } +#endif } break; case RES_COL: @@ -977,6 +987,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, rIDDMA.GetHeavenId() : rIDDMA.GetHellId(); GetVirtDrawObj()->SetLayer( nId ); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( pSh ) { SwRootFrame* pLayout = getRootFrame(); @@ -986,6 +997,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, pSh->Imp()->AddAccessibleFrame( this ); } } +#endif // #i28701# - perform reorder of object lists // at anchor frame and at page frame. rInvFlags |= SwFlyFrameInvFlags::UpdateObjInSortedList; @@ -2204,6 +2216,7 @@ void SwFrame::RemoveFly( SwFlyFrame *pToRemove ) pPage->RemoveFlyFromPage( pToRemove ); } // #i73201# +#if !ENABLE_WASM_STRIP_ACCESSIBILITY else { if ( pToRemove->IsAccessibleFrame() && @@ -2221,6 +2234,7 @@ void SwFrame::RemoveFly( SwFlyFrame *pToRemove ) } } } +#endif m_pDrawObjs->Remove(*pToRemove); if (!m_pDrawObjs->size()) @@ -2302,6 +2316,7 @@ void SwFrame::AppendDrawObj( SwAnchoredObject& _rNewObj ) } // Notify accessible layout. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pSh = getRootFrame()->GetCurrShell(); if( pSh ) { @@ -2311,6 +2326,7 @@ void SwFrame::AppendDrawObj( SwAnchoredObject& _rNewObj ) pSh->Imp()->AddAccessibleObj( _rNewObj.GetDrawObj() ); } } +#endif assert(!m_pDrawObjs || m_pDrawObjs->is_sorted()); } @@ -2318,6 +2334,7 @@ void SwFrame::AppendDrawObj( SwAnchoredObject& _rNewObj ) void SwFrame::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj ) { // Notify accessible layout. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pSh = getRootFrame()->GetCurrShell(); if( pSh ) { @@ -2325,6 +2342,7 @@ void SwFrame::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj ) if (pLayout && pLayout->IsAnyShellAccessible()) pSh->Imp()->DisposeAccessibleObj(_rToRemoveObj.GetDrawObj(), false); } +#endif // deregister from page frame SwPageFrame* pPage = _rToRemoveObj.GetPageFrame(); diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index 44083e8a5001..cb490c366a9b 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <pagefrm.hxx> #include <rootfrm.hxx> #include <cntfrm.hxx> @@ -846,6 +848,7 @@ void SwPageFrame::AppendFlyToPage( SwFlyFrame *pNew ) // Notify accessible layout. That's required at this place for // frames only where the anchor is moved. Creation of new frames // is additionally handled by the SwFrameNotify class. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( GetUpper() && static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) @@ -853,6 +856,7 @@ void SwPageFrame::AppendFlyToPage( SwFlyFrame *pNew ) static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() ->AddAccessibleFrame( pNew ); } +#endif } // #i28701# - correction: consider also drawing objects @@ -919,6 +923,7 @@ void SwPageFrame::RemoveFlyFromPage( SwFlyFrame *pToRemove ) // Notify accessible layout. That's required at this place for // frames only where the anchor is moved. Creation of new frames // is additionally handled by the SwFrameNotify class. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( GetUpper() && static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) @@ -926,6 +931,7 @@ void SwPageFrame::RemoveFlyFromPage( SwFlyFrame *pToRemove ) static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() ->DisposeAccessibleFrame( pToRemove, true ); } +#endif // #i28701# - use new method <SetPageFrame(..)> pToRemove->SetPageFrame( nullptr ); @@ -955,6 +961,7 @@ void SwPageFrame::MoveFly( SwFlyFrame *pToMove, SwPageFrame *pDest ) // Notify accessible layout. That's required at this place for // frames only where the anchor is moved. Creation of new frames // is additionally handled by the SwFrameNotify class. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( GetUpper() && static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) @@ -962,6 +969,7 @@ void SwPageFrame::MoveFly( SwFlyFrame *pToMove, SwPageFrame *pDest ) static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() ->DisposeAccessibleFrame( pToMove, true ); } +#endif // The FlyColl might be gone already, because the page's dtor is being executed. if ( m_pSortedObjs ) @@ -991,6 +999,7 @@ void SwPageFrame::MoveFly( SwFlyFrame *pToMove, SwPageFrame *pDest ) // Notify accessible layout. That's required at this place for // frames only where the anchor is moved. Creation of new frames // is additionally handled by the SwFrameNotify class. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( GetUpper() && static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) @@ -998,6 +1007,7 @@ void SwPageFrame::MoveFly( SwFlyFrame *pToMove, SwPageFrame *pDest ) static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() ->AddAccessibleFrame( pToMove ); } +#endif // #i28701# - correction: move lowers of Writer fly frame if ( !pToMove->GetDrawObjs() ) diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index b2ac45b5ead9..ee50dcc7cd12 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <svx/svdpage.hxx> #include <editeng/brushitem.hxx> #include <editeng/shaditem.hxx> @@ -264,6 +266,7 @@ void SwFrameNotify::ImplDestroy() if ( bAbsP || bPrtP || bChgWidth || bChgHeight || bPrtWidth || bPrtHeight || bChgFlyBasePos ) { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( mpFrame->IsAccessibleFrame() ) { SwRootFrame *pRootFrame = mpFrame->getRootFrame(); @@ -273,6 +276,7 @@ void SwFrameNotify::ImplDestroy() pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( mpFrame, maFrame ); } } +#endif // Notification of anchored objects if ( mpFrame->GetDrawObjs() ) @@ -392,6 +396,7 @@ void SwFrameNotify::ImplDestroy() } } } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY else if( mpFrame->IsTextFrame() && mbValidSize != mpFrame->isFrameAreaSizeValid() ) { SwRootFrame *pRootFrame = mpFrame->getRootFrame(); @@ -401,6 +406,7 @@ void SwFrameNotify::ImplDestroy() pRootFrame->GetCurrShell()->Imp()->InvalidateAccessibleFrameContent( mpFrame ); } } +#endif // #i9046# Automatic frame width SwFlyFrame* pFly = nullptr; @@ -1600,6 +1606,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if ( pFrame->IsTextFrame() ) { SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); @@ -1623,6 +1630,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, pFrame->InvalidateInfFlags(); } } +#endif // OD 12.08.2003 #i17969# - consider horizontal/vertical layout // for setting position at newly inserted frame lcl_SetPos( *pFrame, *pLay ); @@ -1696,6 +1704,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); // no notification, if <SwViewShell> is in construction @@ -1711,6 +1720,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, pPrev ? pPrev->DynCastTextFrame() : nullptr ); } } +#endif if ( bObjsDirect && !pTable->empty() ) static_cast<SwTabFrame*>(pFrame)->RegistFlys(); // OD 12.08.2003 #i17969# - consider horizontal/vertical layout @@ -1813,6 +1823,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); ... etc. - the rest is truncated
