From 3526905a6245dfc6d2d5103eded6e20d1ed3e2a6 Mon Sep 17 00:00:00 2001 From: "Armin Le Grand (Allotropia)" Date: Fri, 30 Apr 2021 17:26:41 +0200 Subject: wasm strip: squashed patches from Armin + fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In addition to the squashed patches, this patch * drops the global compiler defines in favour of a config header file, for better ccache usage * revers almost all header changes in favour for empty function calls (just keeĆ¼s the premultiply table drop) * some additional changes for unused function calls * adapts more component files, so building the services.db and the component_mao.cxx from the build still works Currently crashs with anything different then soffice --writer. Closing the document also crashes. fac2aeca4010 Wasm optional premultiply table replace ec9e2c81b4ec Wasm remove hunspell/hyphen optionally 302a6f6f777a Wasm LanguageGuess optional removal 55404a55984c Wasm oprtional autorecovery remove additions 640d53e1e7c1 Wasm optional EPUB removal 4a09f57c132c Wasm strip: remove UcpHelp eeebc1383df7 Wasm optional accessibility removal b95eaa630273 Additions/corrections to dbaccess wasm removal d8c11d72aa5a Wasm: Removed dbaccess optional f7d462b61c08 WASM Removal of clucene a1c508fc1c41 Stripped canvas/cppcanvas and related ebfb45f46319 Use more expressive ENABLE_WASM_STRIP markers a3519b1a41c8 Disable wpftcalc for wasm reduction fa86c5bc36f7 Chart wasm optional removal 90d9a8dee35a BackingWindow (RecentDocsView) optional removal 68e5f972b1a6 Deeper TipOfTheDay optional removal 4ed18d09ce07 Optional removal of more startup-modules ab8d809b6ab7 Remove RecoveryCore f82517838840 Remove RecoveryUI, correct spl stuff f38dca150d58 SplashScreen and Startup Not included: 10963e79ac7d Wasm optional reduce created locales Change-Id: Ib9c0f9452815910c0a2aceaf142ba1ad4a9cb0d7 --- Repository.mk | 100 +++++++-- RepositoryExternal.mk | 5 +- RepositoryModule_host.mk | 34 ++- basctl/Library_basctl.mk | 5 + chart2/Library_chartcontroller.mk | 5 + config_host.mk.in | 15 ++ config_host/config_wasm_strip.h.in | 23 ++ configure.ac | 3 + cui/Library_cui.mk | 14 +- cui/UIConfig_cui.mk | 7 +- cui/source/factory/dlgfact.cxx | 21 +- desktop/Library_deployment.mk | 13 +- desktop/Module_desktop.mk | 4 +- desktop/Pagein_common.mk | 7 +- desktop/source/app/app.cxx | 28 ++- desktop/source/app/cmdlineargs.cxx | 20 ++ desktop/source/deployment/deployment.component | 8 - .../deployment/deployment.extended.component | 30 +++ drawinglayer/Library_drawinglayer.mk | 9 +- editeng/Library_editeng.mk | 5 + editeng/source/misc/splwrap.cxx | 6 + external/Module_external.mk | 14 +- external/hunspell/StaticLibrary_hunspell.mk | 7 +- external/hyphen/ExternalProject_hyphen.mk | 2 + external/mythes/ExternalProject_mythes.mk | 2 + extras/Module_extras.mk | 2 +- filter/source/pdf/impdialog.cxx | 6 +- framework/Library_fwk.mk | 7 +- framework/util/autorecovery.component | 28 +++ framework/util/fwk.component | 6 - .../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 + postprocess/Rdb_services.mk | 74 +++++-- sd/Library_sd.mk | 29 ++- sfx2/Library_sfx.mk | 22 +- sfx2/source/appl/appserv.cxx | 6 + sfx2/source/view/viewfrm.cxx | 6 + sfx2/util/sfx.component | 5 - sfx2/util/sfx.extended.component | 27 +++ solenv/bin/native-code.py | 243 +++++++++++---------- solenv/gbuild/extensions/pre_MergedLibsList.mk | 6 +- svx/Library_svx.mk | 26 ++- 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 | 4 - svx/util/svx.extended.component | 26 +++ sw/Library_sw.mk | 11 +- sw/source/core/crsr/crsrsh.cxx | 8 + 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 | 26 ++- 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 | 17 +- 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 | 6 + 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 | 3 + 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/svpgdi.cxx | 30 +++ vcl/source/bitmap/BitmapTools.cxx | 96 +++++++- vcl/source/filter/png/PngImageReader.cxx | 14 ++ vcl/source/helper/svtaccessiblefactory.cxx | 7 + writerperfect/Library_wpftwriter.mk | 20 +- writerperfect/source/writer/wpftwriter.component | 8 - .../source/writer/wpftwriter.extended.component | 29 +++ xmloff/Library_xo.mk | 11 + xmloff/Library_xof.mk | 15 +- xmloff/source/core/xmlexp.cxx | 9 + xmloff/source/core/xmlimp.cxx | 11 + 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 | 20 -- xmloff/source/transform/xof.extended.component | 42 ++++ xmloff/util/xo.component | 44 ---- xmloff/util/xo.extended.component | 66 ++++++ 115 files changed, 1520 insertions(+), 369 deletions(-) create mode 100644 config_host/config_wasm_strip.h.in create mode 100644 desktop/source/deployment/deployment.extended.component create mode 100644 framework/util/autorecovery.component create mode 100644 sfx2/util/sfx.extended.component create mode 100644 svx/util/svx.extended.component create mode 100644 writerperfect/source/writer/wpftwriter.extended.component create mode 100644 xmloff/source/transform/xof.extended.component create mode 100644 xmloff/util/xo.extended.component diff --git a/Repository.mk b/Repository.mk index a1a4b73ee70e..b234ae7ed69c 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 \ @@ -90,6 +95,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 \ @@ -143,7 +154,6 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \ $(call gb_Helper_optional,FUZZERS,mtpfuzzer) \ $(call gb_Helper_optional,FUZZERS,htmlfuzzer) \ $(call gb_Helper_optional,FUZZERS,sftfuzzer) \ - $(if $(filter-out ANDROID HAIKU iOS MACOSX WNT,$(OS)),oosplash) \ soffice_bin \ $(if $(filter DESKTOP,$(BUILD_TYPE)),unopkg_bin) \ $(if $(filter WNT,$(OS)), \ @@ -329,6 +339,43 @@ $(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_CLUCENE),TRUE) +$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ + $(call gb_Helper_optionals_or,HELPTOOLS XMLHELP,helplinker) \ +)) +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, \ @@ -342,14 +389,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 \ @@ -362,8 +405,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ $(if $(filter-out MACOSX WNT,$(OS)),desktopbe1) \ $(if $(USING_X11),desktop_detector) \ $(call gb_Helper_optional,SCRIPTING,dlgprov) \ - $(if $(filter WNT,$(OS)),directx9canvas) \ - $(if $(ENABLE_OPENGL_CANVAS),oglcanvas) \ drawinglayer \ editeng \ $(if $(filter WNT,$(OS)),emser) \ @@ -379,19 +420,14 @@ $(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 \ @@ -420,11 +456,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 \ @@ -454,7 +488,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ vbahelper \ ) \ vcl \ - vclcanvas \ writerperfect \ xmlscript \ xmlfa \ @@ -475,9 +508,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, \ @@ -614,6 +644,14 @@ $(eval $(call gb_Helper_register_plugins_for_install,PRIVATELIBS_URE,ure, \ 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) \ @@ -658,7 +696,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \ fps \ inprocserv \ UAccCOM \ - winaccessibility \ ) \ )) @@ -891,6 +928,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 \ @@ -974,13 +1023,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)), \ @@ -1170,9 +1217,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 39e307c17777..5e2310e57487 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -551,6 +551,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),\ @@ -578,6 +579,7 @@ $(call gb_ExternalProject_use_external_project,$(1),hunspell) endef +endif # ENABLE_WASM_STRIP_EXTRA endif # SYSTEM_HUNSPELL @@ -1898,6 +1900,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),\ @@ -1915,6 +1918,7 @@ $(call gb_ExternalProject_use_external_project,$(1),libepubgen) endef +endif # ENABLE_WASM_STRIP_EPUB endif # SYSTEM_EPUBGEN ifneq ($(SYSTEM_REVENGE),) @@ -2856,7 +2860,6 @@ endif # SYSTEM_POPPLER endif # ENABLE_POPPLER - ifneq ($(SYSTEM_CLUCENE),) define gb_LinkTarget__use_clucene diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk index a54157d40f6e..d9ca2aaf93c3 100644 --- a/RepositoryModule_host.mk +++ b/RepositoryModule_host.mk @@ -20,8 +20,35 @@ $(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 \ animations \ apple_remote \ @@ -34,19 +61,15 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\ bean \ binaryurp \ bridges \ - canvas \ - chart2 \ cli_ure \ $(call gb_Helper_optional,DESKTOP,codemaker) \ comphelper \ configmgr \ connectivity \ - cppcanvas \ cppu \ cppuhelper \ cpputools \ cui \ - dbaccess \ desktop \ $(call gb_Helper_optional,DICTIONARIES,dictionaries) \ drawinglayer \ @@ -119,7 +142,9 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\ $(call gb_Helper_optional,DESKTOP,setup_native) \ sfx2 \ shell \ + $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \ slideshow \ + ) \ smoketest \ solenv \ soltools \ @@ -157,7 +182,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 f874dfe9cc54..122ae4a909a3 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 05f031415213..7eddba17f348 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)) +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/config_host.mk.in b/config_host.mk.in index 5fcf903f2a1b..9011beb030d9 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -205,7 +205,22 @@ export ENABLE_SKIA_DEBUG=@ENABLE_SKIA_DEBUG@ export ENABLE_SYMBOLS_FOR=@ENABLE_SYMBOLS_FOR@ export ENABLE_VALGRIND=@ENABLE_VALGRIND@ 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_CLUCENE=@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=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_LOCALES=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_PINGUSER=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_PREMULTIPLY=@ENABLE_WASM_STRIP@ +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_WERROR=@ENABLE_WERROR@ export ENDIANNESS=@ENDIANNESS@ export EPM=@EPM@ diff --git a/config_host/config_wasm_strip.h.in b/config_host/config_wasm_strip.h.in new file mode 100644 index 000000000000..42df865f10ba --- /dev/null +++ b/config_host/config_wasm_strip.h.in @@ -0,0 +1,23 @@ +#ifndef CONFIG_FEATURE_WASM_STRIP_H +#define CONFIG_FEATURE_WASM_STRIP_H + +#define HAVE_FEATURE_WASM_STRIP 0 + +#if HAVE_FEATURE_WASM_STRIP +#define ENABLE_WASM_STRIP_ACCESSIBILITY +#define ENABLE_WASM_STRIP_CANVAS +#define ENABLE_WASM_STRIP_CHART +#define ENABLE_WASM_STRIP_CLUCENE +#define ENABLE_WASM_STRIP_DBACCESS +#define ENABLE_WASM_STRIP_EPUB +#define ENABLE_WASM_STRIP_EXTRA +#define ENABLE_WASM_STRIP_GUESSLANG +#define ENABLE_WASM_STRIP_HUNSPELL +#define ENABLE_WASM_STRIP_PINGUSER +#define ENABLE_WASM_STRIP_PREMULTIPLY +#define ENABLE_WASM_STRIP_RECENT +#define ENABLE_WASM_STRIP_RECOVERYUI +#define ENABLE_WASM_STRIP_SPLASH +#endif + +#endif diff --git a/configure.ac b/configure.ac index 909b3210a2d1..cc3b25313873 100644 --- a/configure.ac +++ b/configure.ac @@ -2955,6 +2955,8 @@ if test "$enable_wasm_strip" = "yes"; then with_x=no test "${with_fonts+set}" = set || with_fonts=yes + + AC_DEFINE(HAVE_FEATURE_WASM_STRIP) fi ENABLE_SERVICES_RDB_FROM_BUILD= @@ -14424,6 +14426,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 01e2bd8cd191..dda524c97c41 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -93,6 +93,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_EXTRA),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 \ @@ -126,9 +138,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 ff3c718b21d6..355c39faa265 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\ @@ -96,7 +102,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 ebfd9bfb0ea5..6a0300824621 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include "dlgfact.hxx" @@ -133,7 +134,11 @@ short AbstractFmShowColsDialog_Impl::Execute() short AbstractHyphenWordDialog_Impl::Execute() { +#ifndef ENABLE_WASM_STRIP_HUNSPELL return m_xDlg->run(); +#else + return 0; +#endif } short AbstractThesaurusDialog_Impl::Execute() @@ -1094,7 +1099,16 @@ VclPtr AbstractDialogFactory_Impl::CreateHyphenWordDia css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen, SvxSpellWrapper* pWrapper) { +#ifndef ENABLE_WASM_STRIP_EXTRA return VclPtr::Create(std::make_unique(rWord, nLang, pParent, xHyphen, pWrapper)); +#else + (void) pParent; + (void) rWord; + (void) nLang; + (void) xHyphen; + (void) pWrapper; + return nullptr; +#endif } VclPtr AbstractDialogFactory_Impl::CreateFmShowColsDialog(weld::Window* pParent) @@ -1678,7 +1692,7 @@ VclPtr AbstractDialogFactory_Impl::CreateAdditionsDialo #else (void) pParent; (void) sAdditionsTag; - return VclPtr(nullptr); + return nullptr; #endif } @@ -1692,8 +1706,13 @@ AbstractDialogFactory_Impl::CreateAboutDialog(weld::Window* pParent) VclPtr AbstractDialogFactory_Impl::CreateTipOfTheDayDialog(weld::Window* pParent) { +#ifndef ENABLE_WASM_STRIP_PINGUSER return VclPtr::Create( std::make_shared(pParent)); +#else + (void) pParent; + return nullptr; +#endif } VclPtr diff --git a/desktop/Library_deployment.mk b/desktop/Library_deployment.mk index 57fe1c55a0b6..dc36691b63b1 100644 --- a/desktop/Library_deployment.mk +++ b/desktop/Library_deployment.mk @@ -39,6 +39,15 @@ $(eval $(call gb_Library_use_libraries,deployment,\ $(eval $(call gb_Library_set_componentfile,deployment,desktop/source/deployment/deployment)) +ifneq ($(ENABLE_WASM_STRIP_CLUCENE),TRUE) +$(eval $(call gb_Library_set_componentfile,deployment,desktop/source/deployment/deployment.extended)) + +$(eval $(call gb_Library_add_exception_objects,deployment,\ + desktop/source/deployment/registry/help/dp_help \ + desktop/source/deployment/registry/component/dp_component \ +)) +endif + $(eval $(call gb_Library_add_exception_objects,deployment,\ desktop/source/deployment/dp_log \ desktop/source/deployment/dp_persmap \ @@ -51,7 +60,6 @@ $(eval $(call gb_Library_add_exception_objects,deployment,\ desktop/source/deployment/manager/dp_managerfac \ desktop/source/deployment/manager/dp_properties \ desktop/source/deployment/registry/component/dp_compbackenddb \ - desktop/source/deployment/registry/component/dp_component \ desktop/source/deployment/registry/configuration/dp_configuration \ desktop/source/deployment/registry/configuration/dp_configurationbackenddb \ desktop/source/deployment/registry/dp_backend \ @@ -59,7 +67,6 @@ $(eval $(call gb_Library_add_exception_objects,deployment,\ desktop/source/deployment/registry/dp_registry \ desktop/source/deployment/registry/executable/dp_executable \ desktop/source/deployment/registry/executable/dp_executablebackenddb \ - desktop/source/deployment/registry/help/dp_help \ desktop/source/deployment/registry/help/dp_helpbackenddb \ desktop/source/deployment/registry/package/dp_extbackenddb \ desktop/source/deployment/registry/package/dp_package \ @@ -71,11 +78,9 @@ $(eval $(call gb_Library_add_exception_objects,deployment,\ )) ifneq (,$(filter XMLHELP,$(BUILD_TYPE))) - $(eval $(call gb_Library_use_libraries,deployment,\ helplinker \ )) - endif # vim: set ts=4 sw=4 et: diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk index 3be81056aad9..265f0248534e 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 \ @@ -107,9 +107,11 @@ $(eval $(call gb_Module_add_targets,desktop,\ else ifeq (,$(filter MACOSX ANDROID iOS HAIKU,$(OS))) +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) $(eval $(call gb_Module_add_targets,desktop,\ $(if $(DISABLE_DYNLOADING),,Executable_oosplash) \ )) +endif # ENABLE_WASM_STRIP_ACCESSIBILITY endif diff --git a/desktop/Pagein_common.mk b/desktop/Pagein_common.mk index d0a0e689c2d2..96d5fe49f919 100644 --- a/desktop/Pagein_common.mk +++ b/desktop/Pagein_common.mk @@ -9,6 +9,12 @@ $(eval $(call gb_Pagein_Pagein,common)) +ifneq ($(ENABLE_WASM_STRIP_CLUCENE),TRUE) +$(eval $(call gb_Pagein_add_objects,common,\ + helplinker \ +)) +endif + # sorted in approx. reverse load order (ld.so.1) $(eval $(call gb_Pagein_add_objects,common,\ $(if $(MERGELIBS),merged) \ @@ -56,7 +62,6 @@ $(eval $(call gb_Pagein_add_objects,common,\ svt \ spl \ avmedia \ - helplinker \ sax \ fsstorage \ desktopbe1 \ diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index b0c4fac53e10..98e64ec9df2c 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include @@ -957,6 +958,7 @@ struct RefClearGuard @param bEmergencySave differs between EMERGENCY_SAVE and RECOVERY */ +#ifndef ENABLE_WASM_STRIP_RECOVERYUI bool impl_callRecoveryUI(bool bEmergencySave , bool bExistsRecoveryData) { @@ -988,6 +990,7 @@ bool impl_callRecoveryUI(bool bEmergencySave , aRet >>= bRet; return bRet; } +#endif bool impl_bringToFrontRecoveryUI() { @@ -1137,9 +1140,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... +#ifndef ENABLE_WASM_STRIP_RECOVERYUI bRestart = impl_callRecoveryUI( true , // force emergency save false); +#endif } FlushConfiguration(); @@ -1153,8 +1158,10 @@ void Desktop::Exception(ExceptionCategory nCategory) osl_removeSignalHandler( pSignalHandler ); restartOnMac(false); +#ifndef ENABLE_WASM_STRIP_SPLASH if ( m_rSplashScreen.is() ) m_rSplashScreen->reset(); +#endif _exit( EXITHELPER_CRASH_WITH_RESTART ); } @@ -1257,7 +1264,9 @@ int Desktop::Main() Translate::SetReadStringHook(ReplaceStringHookProc); // Startup screen +#ifndef ENABLE_WASM_STRIP_SPLASH OpenSplashScreen(); +#endif SetSplashScreenProgress(10); @@ -1697,8 +1706,10 @@ int Desktop::doShutdown() if ( bRR ) { restartOnMac(true); +#ifndef ENABLE_WASM_STRIP_SPLASH if ( m_rSplashScreen.is() ) m_rSplashScreen->reset(); +#endif return EXITHELPER_NORMAL_RESTART; } @@ -1992,8 +2003,9 @@ void Desktop::OpenClients() } else { - bool bCrashed = false; bool bExistsRecoveryData = false; +#ifndef ENABLE_WASM_STRIP_RECOVERYUI + bool bCrashed = false; bool bExistsSessionData = false; bool const bDisableRecovery = getenv("OOO_DISABLE_RECOVERY") != nullptr @@ -2019,6 +2031,7 @@ void Desktop::OpenClients() TOOLS_WARN_EXCEPTION( "desktop.app", "Error during recovery"); } } +#endif Reference< XSessionManagerListener2 > xSessionListener; try @@ -2377,6 +2390,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent ) } } +#ifndef ENABLE_WASM_STRIP_SPLASH void Desktop::OpenSplashScreen() { const CommandLineArgs &rCmdLine = GetCommandLineArgs(); @@ -2426,33 +2440,43 @@ void Desktop::OpenSplashScreen() if(m_rSplashScreen.is()) m_rSplashScreen->start("SplashScreen", 100); - } +#endif void Desktop::SetSplashScreenProgress(sal_Int32 iProgress) { +#ifdef ENABLE_WASM_STRIP_SPLASH + (void) iProgress; +#else if(m_rSplashScreen.is()) { m_rSplashScreen->setValue(iProgress); } +#endif } void Desktop::SetSplashScreenText( const OUString& rText ) { +#ifdef ENABLE_WASM_STRIP_SPLASH + (void) rText; +#else if( m_rSplashScreen.is() ) { m_rSplashScreen->setText( rText ); } +#endif } void Desktop::CloseSplashScreen() { +#ifndef ENABLE_WASM_STRIP_SPLASH if(m_rSplashScreen.is()) { SolarMutexGuard ensureSolarMutex; m_rSplashScreen->end(); m_rSplashScreen = nullptr; } +#endif } diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index 4d5a3bb78396..6c64502e9d38 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -275,6 +275,26 @@ CommandLineArgs::CommandLineArgs( Supplier& supplier ) void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) { +#ifdef ENABLE_WASM_STRIP + // use hard-coded init-params for wasm '-nolockcheck -norestore -nologo -writer' + // no restore tries + m_norestore = true; + // no logo needed + m_nologo = true; +#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT + // no lock-checks needed + m_nolockcheck = true; +#endif + // start with writer only + m_writer = true; + m_bDocumentArgs = true; + + m_bEmpty = false; + + // return to avoid #elif + return; +#endif + m_cwdUrl = supplier.getCwdUrl(); CommandLineEvent eCurrentEvent = CommandLineEvent::Open; diff --git a/desktop/source/deployment/deployment.component b/desktop/source/deployment/deployment.component index f7a481bf43c9..79c966deadc0 100644 --- a/desktop/source/deployment/deployment.component +++ b/desktop/source/deployment/deployment.component @@ -38,10 +38,6 @@ constructor="com_sun_star_comp_deployment_ProgressLog_get_implementation"> - - - @@ -50,10 +46,6 @@ constructor="com_sun_star_comp_deployment_executable_PackageRegistryBackend_get_implementation"> - - - diff --git a/desktop/source/deployment/deployment.extended.component b/desktop/source/deployment/deployment.extended.component new file mode 100644 index 000000000000..8d0b70a9c028 --- /dev/null +++ b/desktop/source/deployment/deployment.extended.component @@ -0,0 +1,30 @@ + + + + + + + + + + + diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk index 43a42b83b42c..06c803f5bd37 100644 --- a/drawinglayer/Library_drawinglayer.mk +++ b/drawinglayer/Library_drawinglayer.mk @@ -29,11 +29,16 @@ $(eval $(call gb_Library_use_externals,drawinglayer,\ libxml2 \ )) +ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE) $(eval $(call gb_Library_use_libraries,drawinglayer,\ - basegfx \ canvastools \ - comphelper \ cppcanvas \ +)) +endif + +$(eval $(call gb_Library_use_libraries,drawinglayer,\ + basegfx \ + comphelper \ cppu \ cppuhelper \ i18nlangtag \ 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 b51c9c97b613..ef3d7bb89ac0 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 + #include #include #include @@ -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( ) { +#ifdef 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/external/Module_external.mk b/external/Module_external.mk index 4566d825301c..6d015590587e 100644 --- a/external/Module_external.mk +++ b/external/Module_external.mk @@ -13,6 +13,18 @@ ifeq ($(COM),MSC) $(eval $(call gb_Module_add_moduledir,external,msc-externals)) endif +ifneq ($(ENABLE_WASM_STRIP_CLUCENE),TRUE) +$(eval $(call gb_Module_add_moduledirs,external,\ + $(call gb_Helper_optional,CLUCENE,clucene) \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_EPUB),TRUE) +$(eval $(call gb_Module_add_moduledirs,external,\ + $(call gb_Helper_optional,EPUBGEN,libepubgen) \ +)) +endif + $(eval $(call gb_Module_add_moduledirs,external,\ $(call gb_Helper_optional,XMLSEC,xmlsec) \ $(call gb_Helper_optional,ABW,libabw) \ @@ -25,7 +37,6 @@ $(eval $(call gb_Module_add_moduledirs,external,\ $(call gb_Helper_optional,CAIRO,cairo) \ $(call gb_Helper_optional,CDR,libcdr) \ $(call gb_Helper_optional,OPENCL,clew) \ - $(call gb_Helper_optional,CLUCENE,clucene) \ $(call gb_Helper_optional,LIBCMIS,libcmis) \ $(call gb_Helper_optional,COINMP,coinmp) \ $(call gb_Helper_optional,CPPUNIT,cppunit) \ @@ -35,7 +46,6 @@ $(eval $(call gb_Module_add_moduledirs,external,\ $(call gb_Helper_optional,EBOOK,libebook) \ $(call gb_Helper_optional,EPM,epm) \ $(call gb_Helper_optional,EPOXY,epoxy) \ - $(call gb_Helper_optional,EPUBGEN,libepubgen) \ $(call gb_Helper_optional,ETONYEK,libetonyek) \ $(call gb_Helper_optional,EXPAT,expat) \ $(call gb_Helper_optional,FIREBIRD,firebird) \ 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/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 7162cd2de2b2..e184eea8d39c 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include "impdialog.hxx" #include #include @@ -349,7 +351,7 @@ short ImpPDFTabDialog::Ok( ) { // here the whole mechanism of the base class is not used // when Ok is hit, the user means 'convert to PDF', so simply close with ok - +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (getGeneralPage()->IsPdfUaSelected()) { SfxObjectShell* pShell = SfxObjectShell::GetShellFromComponent(mrDoc); @@ -363,6 +365,8 @@ short ImpPDFTabDialog::Ok( ) } } } +#endif + return RET_OK; } diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk index 2d4fdda1c1ef..1f2f9c1aaff2 100644 --- a/framework/Library_fwk.mk +++ b/framework/Library_fwk.mk @@ -61,6 +61,12 @@ $(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 \ +)) +endif + $(eval $(call gb_Library_add_exception_objects,fwk,\ framework/source/accelerators/acceleratorcache \ framework/source/accelerators/acceleratorconfiguration \ @@ -150,7 +156,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/autorecovery.component b/framework/util/autorecovery.component new file mode 100644 index 000000000000..d3e457cb1ce0 --- /dev/null +++ b/framework/util/autorecovery.component @@ -0,0 +1,28 @@ + + + + + + + + + diff --git a/framework/util/fwk.component b/framework/util/fwk.component index 2b9eb7807fee..019549f29de7 100644 --- a/framework/util/fwk.component +++ b/framework/util/fwk.component @@ -27,12 +27,6 @@ constructor="com_sun_star_comp_framework_AddonsToolBarFactory_get_implementation"> - - - - 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 #include diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx index fa7a43bc99a6..a5479763c888 100644 --- a/include/vcl/BitmapTools.hxx +++ b/include/vcl/BitmapTools.hxx @@ -11,6 +11,8 @@ #define INCLUDED_VCL_BITMAP_TOOLS_HXX #include +#include + #include #include #if ENABLE_CAIRO_CANVAS @@ -26,10 +28,12 @@ namespace com::sun::star::geometry { struct IntegerRectangle2D; } namespace vcl::bitmap { +#ifndef ENABLE_WASM_STRIP_PREMULTIPLY typedef std::array, 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 55f9225722a5..3363e6aa1831 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)) +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 287a4bb70003..4473423d0dd8 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)) +# 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/shapes \ diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index b0e2ddef30e7..9c773441e6ee 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 + #include #include #include @@ -1905,6 +1907,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 +#ifdef 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 pChartSpaceFragment = new chart::ChartSpaceFragment( @@ -1945,6 +1956,7 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >& } } +#endif } catch( Exception& ) { diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index f45b0aabc61d..a47825d1cead 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 +#include +#include #include + #include #include #include @@ -2005,9 +2007,14 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape ) xPropSet->getPropertyValue("Model") >>= xChartDoc; assert(xChartDoc.is()); //export the chart +#ifndef 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 573dbd0c4234..12adc9fc5b7d 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 + #include #include @@ -60,8 +62,12 @@ XmlFilterBase* PowerPointImport::mpDebugFilterBase = nullptr; PowerPointImport::PowerPointImport( const Reference< XComponentContext >& rxContext ) : XmlFilterBase( rxContext ), +#ifdef 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..486e844a3542 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 + #include #include #include @@ -34,7 +36,12 @@ using namespace ::com::sun::star; ShapeFilterBase::ShapeFilterBase( const uno::Reference< uno::XComponentContext >& rxContext ) : XmlFilterBase( rxContext ), +#ifdef ENABLE_WASM_STRIP_CHART + // WASM_CHART change + mxChartConv( ) +#else mxChartConv( std::make_shared<::oox::drawingml::chart::ChartConverter>() ) +#endif { } diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk index 82110c712127..a5843e6becab 100644 --- a/postprocess/Rdb_services.mk +++ b/postprocess/Rdb_services.mk @@ -15,9 +15,8 @@ ifeq (,$(ENABLE_SERVICES_RDB_FROM_BUILD)) # # "minimal" list of services for cross-compiling build tools # +ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE) $(eval $(call gb_Rdb_add_components,services,\ - $(call gb_Helper_optional,AVMEDIA,avmedia/util/avmedia) \ - $(call gb_Helper_optional,SCRIPTING,basic/util/sb) \ canvas/source/factory/canvasfactory \ canvas/source/simplecanvas/simplecanvas \ canvas/source/vcl/vclcanvas \ @@ -27,13 +26,19 @@ $(eval $(call gb_Rdb_add_components,services,\ canvas/source/directx/directx9canvas \ canvas/source/directx/gdipluscanvas \ ) \ + cppcanvas/source/uno/mtfrenderer \ +)) +endif + +$(eval $(call gb_Rdb_add_components,services,\ + $(call gb_Helper_optional,AVMEDIA,avmedia/util/avmedia) \ + $(call gb_Helper_optional,SCRIPTING,basic/util/sb) \ comphelper/util/comphelp \ configmgr/source/configmgr \ $(if $(filter DBCONNECTIVITY,$(BUILD_TYPE)), \ connectivity/source/dbtools/dbtools \ connectivity/source/drivers/dbase/dbase \ ) \ - cppcanvas/source/uno/mtfrenderer \ drawinglayer/drawinglayer \ emfio/emfio \ filter/source/config/cache/filterconfig1 \ @@ -72,10 +77,45 @@ $(eval $(call gb_Rdb_add_components,services,\ ifeq ($(gb_Side),host) +# WASM_CHART change +ifneq ($(ENABLE_WASM_STRIP_CHART),TRUE) $(eval $(call gb_Rdb_add_components,services,\ - animations/source/animcore/animcore \ chart2/source/controller/chartcontroller \ chart2/source/chartcore \ + writerperfect/source/calc/wpftcalc \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_CLUCENE),TRUE) +$(eval $(call gb_Rdb_add_components,services,\ + desktop/source/deployment/deployment.extended \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) +$(eval $(call gb_Rdb_add_components,services,\ + $(if $(filter WNT,$(OS)), \ + winaccessibility/source/service/winaccessibility \ + ) \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_GUESSLANG),TRUE) +$(eval $(call gb_Rdb_add_components,services,\ + lingucomponent/source/languageguessing/guesslang \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE) +$(eval $(call gb_Rdb_add_components,services,\ + lingucomponent/source/hyphenator/hyphen/hyphen \ + lingucomponent/source/thesaurus/libnth/lnth \ + lingucomponent/source/spellcheck/spell/spell \ +)) +endif + +$(eval $(call gb_Rdb_add_components,services,\ + animations/source/animcore/animcore \ cui/util/cui \ desktop/source/deployment/deployment \ embeddedobj/util/embobj \ @@ -94,10 +134,6 @@ $(eval $(call gb_Rdb_add_components,services,\ $(call gb_Helper_optional,DESKTOP,fpicker/source/office/fps_office) \ $(if $(filter MACOSX,$(OS)),fpicker/source/aqua/fps_aqua) \ hwpfilter/source/hwp \ - lingucomponent/source/hyphenator/hyphen/hyphen \ - lingucomponent/source/languageguessing/guesslang \ - lingucomponent/source/spellcheck/spell/spell \ - lingucomponent/source/thesaurus/libnth/lnth \ lingucomponent/source/numbertext/numbertext \ linguistic/source/lng \ $(if $(ENABLE_LWP), \ @@ -156,7 +192,6 @@ $(eval $(call gb_Rdb_add_components,services,\ writerperfect/source/draw/wpftdraw \ writerperfect/source/impress/wpftimpress \ writerperfect/source/writer/wpftwriter \ - writerperfect/source/calc/wpftcalc \ $(if $(filter MACOSX,$(OS)), \ $(call gb_Helper_optional,AVMEDIA,avmedia/source/macavf/avmediaMacAVF) \ shell/source/backends/macbe/macbe1 \ @@ -173,7 +208,6 @@ $(eval $(call gb_Rdb_add_components,services,\ shell/source/backends/wininetbe/wininetbe1 \ shell/source/win32/simplemail/smplmail \ shell/source/win32/syssh \ - winaccessibility/source/service/winaccessibility \ ) \ $(if $(filter-out WNT,$(OS)), \ embeddedobj/source/msole/emboleobj \ @@ -232,13 +266,26 @@ $(eval $(call gb_Rdb_add_components,services,\ $(call gb_Helper_optional,XMLHELP,xmlhelp/util/ucpchelp1) \ )) +ifneq ($(ENABLE_WASM_STRIP_DBACCESS),TRUE) $(eval $(call gb_Rdb_add_components,services,\ - extensions/source/bibliography/bib \ dbaccess/util/dba \ )) +endif + +$(eval $(call gb_Rdb_add_components,services,\ + extensions/source/bibliography/bib \ +)) ifneq (,$(filter DBCONNECTIVITY,$(BUILD_TYPE))) +ifneq ($(ENABLE_WASM_STRIP_DBACCESS),TRUE) +$(eval $(call gb_Rdb_add_components,services,\ + dbaccess/source/filter/xml/dbaxml \ + dbaccess/util/dbu \ + dbaccess/util/sdbt \ +)) +endif + $(eval $(call gb_Rdb_add_components,services,\ extensions/source/dbpilots/dbp \ extensions/source/propctrlr/pcr \ @@ -267,9 +314,6 @@ $(eval $(call gb_Rdb_add_components,services,\ connectivity/source/drivers/mysql_jdbc/mysql_jdbc \ connectivity/source/manager/sdbc2 \ connectivity/source/drivers/writer/writer \ - dbaccess/source/filter/xml/dbaxml \ - dbaccess/util/dbu \ - dbaccess/util/sdbt \ forms/util/frm \ reportdesign/util/rpt \ reportdesign/util/rptui \ @@ -295,7 +339,7 @@ $(eval $(call gb_Rdb_add_components,services,\ desktop/source/migration/services/migrationoo2 \ desktop/source/migration/services/migrationoo3 \ desktop/source/offacc/offacc \ - $(if $(DISABLE_GUI),,desktop/source/splash/spl) \ + $(if $(or $(DISABLE_GUI),$(ENABLE_WASM_STRIP_SPLASH)),,desktop/source/splash/spl) \ $(if $(DISABLE_DYNLOADING),,extensions/source/abpilot/abp) \ $(if $(ENABLE_LDAP),extensions/source/config/ldap/ldapbe2) \ $(if $(filter WNT,$(OS)),\ diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index 647f975e1f16..6dd18c73ae71 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -127,6 +127,23 @@ endif $(eval $(call gb_Library_set_componentfile,sd,sd/util/sd)) +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 \ @@ -170,18 +187,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 cab55c2a3335..91afa70bba50 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)) +ifneq ($(ENABLE_WASM_STRIP_RECENT),TRUE) +$(eval $(call gb_Library_set_componentfile,sfx,sfx2/util/sfx.extended)) +endif + $(eval $(call gb_Library_set_precompiled_header,sfx,sfx2/inc/pch/precompiled_sfx)) $(eval $(call gb_Library_use_custom_headers,sfx,\ @@ -77,9 +81,23 @@ $(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 + +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/accessibility/AccessibilityCheck \ sfx2/source/accessibility/AccessibilityIssue \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/appl/app \ sfx2/source/appl/appbas \ sfx2/source/appl/appbaslib \ @@ -142,8 +160,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 \ @@ -171,8 +187,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 6138bd936082..f4ebfdd5c54f 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -18,6 +18,8 @@ */ #include +#include + #include #include #include @@ -504,6 +506,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) sfx2::openUriExternally(sURL, false); break; } +#ifndef ENABLE_WASM_STRIP_PINGUSER case SID_GETINVOLVED: { // Open get involved/join us page based on locales @@ -531,6 +534,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) sfx2::openUriExternally(sURL, false); break; } +#endif case SID_SHOW_LICENSE: { LicenseDialog aDialog(rReq.GetFrameWeld()); @@ -606,6 +610,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) break; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +#ifndef ENABLE_WASM_STRIP_PINGUSER case SID_TIPOFTHEDAY: { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); @@ -614,6 +619,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 d8d5bf69465a..6abc03354911 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -18,6 +18,8 @@ */ #include +#include + #include #include #include @@ -1344,6 +1346,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) const auto t0 = std::chrono::system_clock::now().time_since_epoch(); +#ifndef ENABLE_WASM_STRIP_PINGUSER bool bIsUITest = false; //uitest.uicheck fails when the dialog is open for( sal_uInt16 i = 0; i < Application::GetCommandLineParamCount(); i++ ) { @@ -1440,6 +1443,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; @@ -1583,6 +1587,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) } } +#ifndef ENABLE_WASM_STRIP_PINGUSER IMPL_LINK_NOARG(SfxViewFrame, WhatsNewHandler, weld::Button&, void) { GetDispatcher()->Execute(SID_WHATSNEW); @@ -1597,6 +1602,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..af29af66defd 100644 --- a/sfx2/util/sfx.component +++ b/sfx2/util/sfx.component @@ -19,11 +19,6 @@ - - - - diff --git a/sfx2/util/sfx.extended.component b/sfx2/util/sfx.extended.component new file mode 100644 index 000000000000..f501c997cba5 --- /dev/null +++ b/sfx2/util/sfx.extended.component @@ -0,0 +1,27 @@ + + + + + + + + + diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py index 32288b4e529d..8ba288ee1ae6 100755 --- a/solenv/bin/native-code.py +++ b/solenv/bin/native-code.py @@ -35,62 +35,62 @@ core_constructor_list = [ "stardiv_UnoControls_ProgressMonitor_get_implementation", "stardiv_UnoControls_StatusIndicator_get_implementation", # canvas/source/factory/canvasfactory.component - "com_sun_star_comp_rendering_CanvasFactory_get_implementation", + ("com_sun_star_comp_rendering_CanvasFactory_get_implementation", "#ifndef ENABLE_WASM_STRIP_CANVAS"), # canvas/source/vcl/vclcanvas.component - "com_sun_star_comp_rendering_Canvas_VCL_get_implementation", - "com_sun_star_comp_rendering_SpriteCanvas_VCL_get_implementation", + ("com_sun_star_comp_rendering_Canvas_VCL_get_implementation", "#ifndef ENABLE_WASM_STRIP_CANVAS"), + ("com_sun_star_comp_rendering_SpriteCanvas_VCL_get_implementation", "#ifndef ENABLE_WASM_STRIP_CANVAS"), # chart2/source/chartcore.component - "com_sun_star_chart2_ExponentialScaling_get_implementation", - "com_sun_star_chart2_LinearScaling_get_implementation", - "com_sun_star_chart2_LogarithmicScaling_get_implementation", - "com_sun_star_chart2_PowerScaling_get_implementation", - "com_sun_star_comp_chart_AreaChartType_get_implementation", - "com_sun_star_comp_chart_BarChartType_get_implementation", - "com_sun_star_comp_chart_BubbleChartType_get_implementation", - "com_sun_star_comp_chart_CachedDataSequence_get_implementation", - "com_sun_star_comp_chart_CandleStickChartType_get_implementation", - "com_sun_star_comp_chart_ChartTypeManager_get_implementation", - "com_sun_star_comp_chart_ColumnChartType_get_implementation", - "com_sun_star_comp_chart_DataSeries_get_implementation", - "com_sun_star_comp_chart_DataSource_get_implementation", - "com_sun_star_comp_chart_FilledNetChartType_get_implementation", - "com_sun_star_comp_chart_FormattedString_get_implementation", - "com_sun_star_comp_chart_InternalDataProvider_get_implementation", - "com_sun_star_comp_chart_LineChartType_get_implementation", - "com_sun_star_comp_chart_NetChartType_get_implementation", - "com_sun_star_comp_chart_PieChartType_get_implementation", - "com_sun_star_comp_chart_ScatterChartType_get_implementation", - "com_sun_star_comp_chart2_Axis_get_implementation", - "com_sun_star_comp_chart2_CartesianCoordinateSystem2d_get_implementation", - "com_sun_star_comp_chart2_CartesianCoordinateSystem3d_get_implementation", - "com_sun_star_comp_chart2_ChartController_get_implementation", - "com_sun_star_comp_chart2_ChartDocumentWrapper_get_implementation", - "com_sun_star_comp_chart2_ChartModel_get_implementation", - "com_sun_star_comp_chart2_ChartView_get_implementation", - "com_sun_star_comp_chart2_ConfigDefaultColorScheme_get_implementation", - "com_sun_star_comp_chart2_Diagram_get_implementation", - "com_sun_star_comp_chart2_ErrorBar_get_implementation", - "com_sun_star_comp_chart2_ExponentialRegressionCurve_get_implementation", - "com_sun_star_comp_chart2_GridProperties_get_implementation", - "com_sun_star_comp_chart2_LabeledDataSequence_get_implementation", - "com_sun_star_comp_chart2_Legend_get_implementation", - "com_sun_star_comp_chart2_LinearRegressionCurve_get_implementation", - "com_sun_star_comp_chart2_LogarithmicRegressionCurve_get_implementation", - "com_sun_star_comp_chart2_MeanValueRegressionCurve_get_implementation", - "com_sun_star_comp_chart2_MovingAverageRegressionCurve_get_implementation", - "com_sun_star_comp_chart2_PageBackground_get_implementation", - "com_sun_star_comp_chart2_PolarCoordinateSystem2d_get_implementation", - "com_sun_star_comp_chart2_PolarCoordinateSystem3d_get_implementation", - "com_sun_star_comp_chart2_PolynomialRegressionCurve_get_implementation", - "com_sun_star_comp_chart2_PotentialRegressionCurve_get_implementation", - "com_sun_star_comp_chart2_RegressionEquation_get_implementation", - "com_sun_star_comp_chart2_Title_get_implementation", - "com_sun_star_comp_chart2_XMLFilter_get_implementation", + ("com_sun_star_chart2_ExponentialScaling_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_chart2_LinearScaling_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_chart2_LogarithmicScaling_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_chart2_PowerScaling_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart_AreaChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart_BarChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart_BubbleChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart_CachedDataSequence_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart_CandleStickChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart_ChartTypeManager_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart_ColumnChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart_DataSeries_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart_DataSource_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart_FilledNetChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart_FormattedString_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart_InternalDataProvider_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart_LineChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart_NetChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart_PieChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart_ScatterChartType_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_Axis_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_CartesianCoordinateSystem2d_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_CartesianCoordinateSystem3d_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_ChartController_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_ChartDocumentWrapper_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_ChartModel_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_ChartView_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_ConfigDefaultColorScheme_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_Diagram_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_ErrorBar_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_ExponentialRegressionCurve_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_GridProperties_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_LabeledDataSequence_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_Legend_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_LinearRegressionCurve_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_LogarithmicRegressionCurve_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_MeanValueRegressionCurve_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_MovingAverageRegressionCurve_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_PageBackground_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_PolarCoordinateSystem2d_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_PolarCoordinateSystem3d_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_PolynomialRegressionCurve_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_PotentialRegressionCurve_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_RegressionEquation_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_Title_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_XMLFilter_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), # chart2/source/controller/chartcontroller.component - "com_sun_star_comp_chart2_ChartDocumentWrapper_get_implementation", - "com_sun_star_comp_chart2_ChartFrameLoader_get_implementation", - "com_sun_star_comp_chart2_WizardDialog_get_implementation", - "org_libreoffice_comp_chart2_sidebar_ChartPanelFactory", + ("com_sun_star_comp_chart2_ChartDocumentWrapper_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_ChartFrameLoader_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_chart2_WizardDialog_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("org_libreoffice_comp_chart2_sidebar_ChartPanelFactory", "#ifndef ENABLE_WASM_STRIP_CHART"), # comphelper/util/comphelp.component "com_sun_star_comp_MemoryStream", "com_sun_star_comp_task_OfficeRestartManager", @@ -110,17 +110,17 @@ core_constructor_list = [ "com_sun_star_comp_configuration_ReadWriteAccess_get_implementation", "com_sun_star_comp_configuration_Update_get_implementation", # cppcanvas/source/uno/mtfrenderer.component - "com_sun_star_comp_rendering_MtfRenderer_get_implementation", + ("com_sun_star_comp_rendering_MtfRenderer_get_implementation", "#ifndef ENABLE_WASM_STRIP_CANVAS"), # cui/util/cui.component "com_sun_star_cui_ColorPicker_get_implementation", # dbaccess/util/dba.component - "com_sun_star_comp_dba_DataAccessDescriptorFactory", - "com_sun_star_comp_dba_OCommandDefinition", - "com_sun_star_comp_dba_OComponentDefinition", - "com_sun_star_comp_dba_ODatabaseContext_get_implementation", - "com_sun_star_comp_dba_ODatabaseDocument", - "com_sun_star_comp_dba_ODatabaseSource", - "com_sun_star_comp_dba_ORowSet_get_implementation", + ("com_sun_star_comp_dba_DataAccessDescriptorFactory", "#ifndef ENABLE_WASM_STRIP_DBACCESS"), + ("com_sun_star_comp_dba_OCommandDefinition", "#ifndef ENABLE_WASM_STRIP_DBACCESS"), + ("com_sun_star_comp_dba_OComponentDefinition", "#ifndef ENABLE_WASM_STRIP_DBACCESS"), + ("com_sun_star_comp_dba_ODatabaseContext_get_implementation", "#ifndef ENABLE_WASM_STRIP_DBACCESS"), + ("com_sun_star_comp_dba_ODatabaseDocument", "#ifndef ENABLE_WASM_STRIP_DBACCESS"), + ("com_sun_star_comp_dba_ODatabaseSource", "#ifndef ENABLE_WASM_STRIP_DBACCESS"), + ("com_sun_star_comp_dba_ORowSet_get_implementation", "#ifndef ENABLE_WASM_STRIP_DBACCESS"), # drawinglayer/drawinglayer.component "drawinglayer_XPrimitive2DRenderer", # embeddedobj/util/embobj.component @@ -187,7 +187,7 @@ core_constructor_list = [ ("com_sun_star_form_ORadioButtonModel_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"), ("com_sun_star_form_XForms_get_implementation", "#if HAVE_FEATURE_DBCONNECTIVITY"), # framework/util/fwk.component - "com_sun_star_comp_framework_AutoRecovery_get_implementation", + ("com_sun_star_comp_framework_AutoRecovery_get_implementation","#ifndef ENABLE_WASM_STRIP_RECOVERYUI"), "com_sun_star_comp_framework_Desktop_get_implementation", "com_sun_star_comp_framework_DocumentAcceleratorConfiguration_get_implementation", "com_sun_star_comp_framework_Frame_get_implementation", @@ -297,10 +297,10 @@ core_constructor_list = [ # linguistic/source/spellcheck/MacOSXSpellMacOSXSpell.component ("lingucomponent_MacSpellChecker_get_implementation", "#ifdef IOS"), # lingucomponent/source/thesaurus/libnth/lnth.component - "lingucomponent_Thesaurus_get_implementation", - "lingucomponent_SpellChecker_get_implementation", - "lingucomponent_LangGuess_get_implementation", - "lingucomponent_Hyphenator_get_implementation", + ("lingucomponent_Thesaurus_get_implementation", "#ifndef ENABLE_WASM_STRIP_HUNSPELL"), + ("lingucomponent_SpellChecker_get_implementation", "#ifndef ENABLE_WASM_STRIP_HUNSPELL"), + ("lingucomponent_LangGuess_get_implementation", "#ifndef ENABLE_WASM_STRIP_HUNSPELL"), + ("lingucomponent_Hyphenator_get_implementation", "#ifndef ENABLE_WASM_STRIP_HUNSPELL"), # package/source/xstor/xstor.component "package_OStorageFactory_get_implementation", # package/util/package2.component @@ -438,35 +438,35 @@ core_constructor_list = [ "dtrans_CMimeContentTypeFactory_get_implementation", "vcl_SystemClipboard_get_implementation", # xmloff/source/transform/xof.component - "xmloff_XMLCalcContentImportOOO_get_implementation", - "xmloff_XMLCalcImportOOO_get_implementation", - "xmloff_XMLCalcMetaImportOOO_get_implementation", - "xmloff_XMLCalcSettingsImportOOO_get_implementation", - "xmloff_XMLCalcStylesImportOOO_get_implementation", - "xmloff_XMLChartContentImportOOO_get_implementation", - "xmloff_XMLChartImportOOO_get_implementation", - "xmloff_XMLChartStylesImportOOO_get_implementation", - "xmloff_XMLDrawContentImportOOO_get_implementation", - "xmloff_XMLDrawImportOOO_get_implementation", - "xmloff_XMLDrawMetaImportOOO_get_implementation", - "xmloff_XMLDrawSettingsImportOOO_get_implementation", - "xmloff_XMLDrawStylesImportOOO_get_implementation", - "xmloff_XMLImpressContentImportOOO_get_implementation", - "xmloff_XMLImpressImportOOO_get_implementation", - "xmloff_XMLImpressMetaImportOOO_get_implementation", - "xmloff_XMLImpressSettingsImportOOO_get_implementation", - "xmloff_XMLImpressStylesImportOOO_get_implementation", - "xmloff_XMLMathMetaImportOOO_get_implementation", - "xmloff_XMLMathSettingsImportOOO_get_implementation", - "xmloff_OOo2OasisTransformer_get_implementation", - "xmloff_Oasis2OOoTransformer_get_implementation", - "xmloff_XMLAutoTextEventImportOOO_get_implementation", - "xmloff_XMLWriterContentImportOOO_get_implementation", - "xmloff_XMLWriterImportOOO_get_implementation", - "xmloff_XMLWriterMetaImportOOO_get_implementation", - "xmloff_XMLWriterSettingsImportOOO_get_implementation", - "xmloff_XMLWriterStylesImportOOO_get_implementation", - "xmloff_XMLMetaImportOOO_get_implementation", + ("xmloff_XMLCalcContentImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLCalcImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLCalcMetaImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLCalcSettingsImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLCalcStylesImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLChartContentImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLChartImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLChartStylesImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLDrawContentImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLDrawImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLDrawMetaImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLDrawSettingsImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLDrawStylesImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLImpressContentImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLImpressImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLImpressMetaImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLImpressSettingsImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLImpressStylesImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLMathMetaImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLMathSettingsImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_OOo2OasisTransformer_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_Oasis2OOoTransformer_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLAutoTextEventImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLWriterContentImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLWriterImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLWriterMetaImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLWriterSettingsImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLWriterStylesImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("xmloff_XMLMetaImportOOO_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), # xmloff/util/xo.component "XMLMetaExportComponent_get_implementation", "XMLMetaExportOOo_get_implementation", @@ -497,17 +497,17 @@ core_constructor_list = [ "com_sun_star_comp_Xmloff_AnimationsImport", "com_sun_star_comp_DrawingLayer_XMLExporter_get_implementation", "com_sun_star_comp_Impress_XMLClipboardExporter_get_implementation", - "com_sun_star_comp_Chart_XMLOasisImporter_get_implementation", - "com_sun_star_comp_Chart_XMLOasisMetaImporter_get_implementation", - "com_sun_star_comp_Chart_XMLOasisMetaExporter_get_implementation", - "com_sun_star_comp_Chart_XMLOasisStylesExporter_get_implementation", - "com_sun_star_comp_Chart_XMLOasisContentExporter_get_implementation", - "com_sun_star_comp_Chart_XMLExporter_get_implementation", - "com_sun_star_comp_Chart_XMLStylesExporter_get_implementation", - "com_sun_star_comp_Chart_XMLContentExporter_get_implementation", - "com_sun_star_comp_Chart_XMLOasisStylesImporter_get_implementation", - "com_sun_star_comp_Chart_XMLOasisContentImporter_get_implementation", - "com_sun_star_comp_Chart_XMLOasisExporter_get_implementation", + ("com_sun_star_comp_Chart_XMLOasisImporter_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_Chart_XMLOasisMetaImporter_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_Chart_XMLOasisMetaExporter_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_Chart_XMLOasisStylesExporter_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_Chart_XMLOasisContentExporter_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_Chart_XMLExporter_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_Chart_XMLStylesExporter_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_Chart_XMLContentExporter_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_Chart_XMLOasisStylesImporter_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_Chart_XMLOasisContentImporter_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), + ("com_sun_star_comp_Chart_XMLOasisExporter_get_implementation", "#ifndef ENABLE_WASM_STRIP_CHART"), "com_sun_star_comp_Writer_XMLOasisAutotextEventsExporter_get_implementation", "com_sun_star_comp_Writer_XMLAutotextEventsExporter_get_implementation", "com_sun_star_comp_Writer_XMLOasisAutotextEventsImporter_get_implementation", @@ -657,14 +657,15 @@ draw_constructor_list = [ "com_sun_star_animations_SequenceTimeContainer_get_implementation", "com_sun_star_animations_TransitionFilter_get_implementation", # desktop/source/deployment/deployment.component + ("desktop/source/deployment/deployment.component", "#ifndef ENABLE_WASM_STRIP_CLUCENE"), "com_sun_star_comp_deployment_ExtensionManager_get_implementation", "com_sun_star_comp_deployment_PackageInformationProvider_get_implementation", "com_sun_star_comp_deployment_PackageManagerFactory_get_implementation", "com_sun_star_comp_deployment_ProgressLog_get_implementation", - "com_sun_star_comp_deployment_component_PackageRegistryBackend_get_implementation", + ("com_sun_star_comp_deployment_component_PackageRegistryBackend_get_implementation", "#ifndef ENABLE_WASM_STRIP_CLUCENE"), "com_sun_star_comp_deployment_configuration_PackageRegistryBackend_get_implementation", "com_sun_star_comp_deployment_executable_PackageRegistryBackend_get_implementation", - "com_sun_star_comp_deployment_help_PackageRegistryBackend_get_implementation", + ("com_sun_star_comp_deployment_help_PackageRegistryBackend_get_implementation", "#ifndef ENABLE_WASM_STRIP_CLUCENE"), "com_sun_star_comp_deployment_script_PackageRegistryBackend_get_implementation", "com_sun_star_comp_deployment_sfwk_PackageRegistryBackend_get_implementation", # embedded/source/msole/emboleobj.windows.component @@ -713,6 +714,9 @@ writer_factory_list = [ ] writer_constructor_list = [ +# basic/util/sb.component + ("com_sun_star_comp_sfx2_DialogLibraryContainer_get_implementation", "#if HAVE_FEATURE_SCRIPTING"), + ("com_sun_star_comp_sfx2_ScriptLibraryContainer_get_implementation", "#if HAVE_FEATURE_SCRIPTING"), # filter/source/textfilterdetect/textfd.component "com_sun_star_comp_filters_PlainTextFilterDetect_get_implementation", # sw/util/sw.component @@ -732,26 +736,25 @@ writer_constructor_list = [ "com_sun_star_comp_Writer_RtfFilter_get_implementation", "com_sun_star_comp_Writer_WriterFilter_get_implementation", # writerperfect/source/writer/wpftwriter.component - "com_sun_star_comp_Writer_EPUBExportFilter_get_implementation", + ("com_sun_star_comp_Writer_EPUBExportFilter_get_implementation", "#ifndef ENABLE_WASM_STRIP_EPUB"), ] desktop_factory_list = [ ] desktop_constructor_list = [ - "com_sun_star_comp_bridge_BridgeFactory_get_implementation", "com_sun_star_comp_bridge_BridgeFactory_get_implementation", "com_sun_star_comp_configuration_ConfigurationProvider_get_implementation", "com_sun_star_comp_configuration_ConfigurationRegistry_get_implementation", "com_sun_star_comp_configuration_DefaultProvider_get_implementation", "com_sun_star_comp_configuration_ReadOnlyAccess_get_implementation", "com_sun_star_comp_configuration_ReadWriteAccess_get_implementation", - "com_sun_star_comp_deployment_component_PackageRegistryBackend_get_implementation", + ("com_sun_star_comp_deployment_component_PackageRegistryBackend_get_implementation", "#ifndef ENABLE_WASM_STRIP_CLUCENE"), "com_sun_star_comp_deployment_configuration_PackageRegistryBackend_get_implementation", "com_sun_star_comp_deployment_executable_PackageRegistryBackend_get_implementation", "com_sun_star_comp_deployment_ExtensionManager_get_implementation", "com_sun_star_comp_deployment_ExtensionManager_get_implementation", - "com_sun_star_comp_deployment_help_PackageRegistryBackend_get_implementation", + ("com_sun_star_comp_deployment_help_PackageRegistryBackend_get_implementation","#ifndef ENABLE_WASM_STRIP_CLUCENE"), "com_sun_star_comp_deployment_PackageManagerFactory_get_implementation", "com_sun_star_comp_deployment_PackageManagerFactory_get_implementation", "com_sun_star_comp_deployment_ProgressLog_get_implementation", @@ -805,7 +808,7 @@ desktop_constructor_list = [ "com_sun_star_comp_graphic_GraphicProvider_get_implementation", "com_sun_star_comp_office_FrameLoader_get_implementation", "com_sun_star_comp_sfx2_AppDispatchProvider_get_implementation", - "com_sun_star_comp_sfx2_BackingComp_get_implementation", + ("com_sun_star_comp_sfx2_BackingComp_get_implementation", "#ifndef ENABLE_WASM_STRIP_RECENT"), "com_sun_star_comp_sfx2_GlobalEventBroadcaster_get_implementation", "com_sun_star_comp_sfx2_InsertSymbolToolBoxControl_get_implementation", "com_sun_star_comp_sfx2_InsertSymbolToolBoxControl_get_implementation", @@ -819,7 +822,7 @@ desktop_constructor_list = [ "com_sun_star_comp_svx_Impl_FindbarDispatcher_get_implementation", "com_sun_star_comp_svx_LineSpacingToolBoxControl_get_implementation", "com_sun_star_comp_svx_NumberingToolBoxControl_get_implementation", - "com_sun_star_comp_svx_RecoveryUI_get_implementation", + ("com_sun_star_comp_svx_RecoveryUI_get_implementation", "#ifndef ENABLE_WASM_STRIP_RECOVERYUI"), "com_sun_star_comp_svx_StyleToolBoxControl_get_implementation", "com_sun_star_comp_svx_TableToolBoxControl_get_implementation", "com_sun_star_comp_svx_TableToolBoxControl_get_implementation", @@ -877,10 +880,10 @@ desktop_constructor_list = [ "framework_ToolbarsMenuController_get_implementation", "i18npool_Collator_Unicode_get_implementation", "IndexedPropertyValuesContainer_get_implementation", - "lingucomponent_Hyphenator_get_implementation", - "lingucomponent_LangGuess_get_implementation", - "lingucomponent_SpellChecker_get_implementation", - "lingucomponent_Thesaurus_get_implementation", + ("lingucomponent_Hyphenator_get_implementation", "#ifndef ENABLE_WASM_STRIP_HUNSPELL"), + ("lingucomponent_LangGuess_get_implementation", "#ifndef ENABLE_WASM_STRIP_HUNSPELL"), + ("lingucomponent_SpellChecker_get_implementation", "#ifndef ENABLE_WASM_STRIP_HUNSPELL"), + ("lingucomponent_Thesaurus_get_implementation", "#ifndef ENABLE_WASM_STRIP_HUNSPELL"), "linguistic_DicList_get_implementation", "linguistic_GrammarCheckingIterator_get_implementation", "linguistic_LinguProps_get_implementation", @@ -1047,6 +1050,10 @@ print ("""/* #include #include +#ifdef ENABLE_WASM_STRIP_LOCALES +#define WITH_LOCALE_ALL 0 +#endif + """) if not options.pure_c: print ("""extern "C" {""") diff --git a/solenv/gbuild/extensions/pre_MergedLibsList.mk b/solenv/gbuild/extensions/pre_MergedLibsList.mk index 12fd14edf522..579f0e3a8a67 100644 --- a/solenv/gbuild/extensions/pre_MergedLibsList.mk +++ b/solenv/gbuild/extensions/pre_MergedLibsList.mk @@ -43,7 +43,9 @@ MERGE_LIBRARY_LIST := \ fwk \ $(if $(filter WNT,$(OS)),gdipluscanvas) \ guesslang \ - $(call gb_Helper_optional,DESKTOP,helplinker) \ + $(call gb_Helper_optional,DESKTOP, \ + $(if $(ENABLE_WASM_STRIP_CLUCENE),, \ + helplinker)) \ hyphen \ i18nsearch \ i18npool \ @@ -70,7 +72,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 598c125b7df8..ad357329055a 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -24,6 +24,10 @@ $(eval $(call gb_Library_set_componentfiles,svx, \ svx/util/svx \ )) +ifneq ($(ENABLE_WASM_STRIP_RECOVERYUI),TRUE) +$(eval $(call gb_Library_set_componentfile,svx,svx/util/svx.extended)) +endif + $(eval $(call gb_Library_set_include,svx,\ -I$(SRCDIR)/svx/inc \ -I$(SRCDIR)/svx/source/inc \ @@ -82,10 +86,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,15 +110,20 @@ $(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 \ + svx/source/dialog/AccessibilityCheckDialog \ +)) +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 \ svx/source/customshapes/EnhancedCustomShapeFontWork \ svx/source/customshapes/EnhancedCustomShapeHandle \ - svx/source/dialog/AccessibilityCheckDialog \ svx/source/dialog/_bmpmask \ svx/source/dialog/charmap \ svx/source/dialog/searchcharmap \ @@ -126,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 \ @@ -246,7 +261,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/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index a31c1fff1b68..aa9bb0d941b9 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 + #include #include #include @@ -728,6 +730,7 @@ void SvxShowCharSet::SelectIndex(int nNewIndex, bool bFocus) if( nSelectedIndex >= 0 ) { getSelectedChar() = mxFontCharMap->GetCharFromIndex( nSelectedIndex ); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( m_xAccessible.is() ) { svx::SvxShowCharSetItem* pItem = ImplGetItem(nSelectedIndex); @@ -747,6 +750,7 @@ void SvxShowCharSet::SelectIndex(int nNewIndex, bool bFocus) aNewAny <<= AccessibleStateType::SELECTED; pItem->m_xItem->fireEvent( AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny ); } +#endif } aHighHdl.Call( this ); } @@ -781,6 +785,7 @@ IMPL_LINK_NOARG(SvxShowCharSet, VscrollHdl, weld::ScrolledWindow&, void) } else if( nSelectedIndex > LastInView() ) { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( m_xAccessible.is() ) { css::uno::Any aOldAny, aNewAny; @@ -791,6 +796,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) ); } @@ -799,18 +805,22 @@ IMPL_LINK_NOARG(SvxShowCharSet, VscrollHdl, weld::ScrolledWindow&, void) SvxShowCharSet::~SvxShowCharSet() { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (m_xAccessible.is()) { m_aItems.clear(); m_xAccessible->clearCharSetControl(); m_xAccessible.clear(); } +#endif } css::uno::Reference< XAccessible > SvxShowCharSet::CreateAccessible() { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY OSL_ENSURE(!m_xAccessible.is(),"Accessible already created!"); m_xAccessible = new svx::SvxShowCharSetAcc(this); +#endif return m_xAccessible; } @@ -819,7 +829,9 @@ svx::SvxShowCharSetItem* SvxShowCharSet::ImplGetItem( int _nPos ) ItemsMap::iterator aFind = m_aItems.find(_nPos); if ( aFind == m_aItems.end() ) { +#ifndef 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(*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 043ce60afbd5..aa3fbd03fc4e 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 + #include #include #include @@ -89,7 +91,9 @@ void SvxRectCtl::SetControlSettings(RectPoint eRpt, sal_uInt16 nBorder) SvxRectCtl::~SvxRectCtl() { pBitmap.reset(); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY pAccContext.clear(); +#endif } void SvxRectCtl::Resize() @@ -415,11 +419,13 @@ void SvxRectCtl::GetFocus() { Invalidate(); +#ifndef 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(); +#ifndef 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() { +#ifndef 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() { +#ifndef 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()); +#ifndef 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 ); } +#ifndef 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)); +#ifndef 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 75e1a066ec63..08d2bbf5dc9d 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 + #include #include @@ -235,8 +237,10 @@ FrameSelectorImpl::FrameSelectorImpl( FrameSelector& rFrameSel ) : mbBLTR( false ), mbFullRepaint( true ), mbAutoSelect( true ), - mbHCMode( false ), - maChildVec( 8 ) + mbHCMode( false ) +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY + ,maChildVec( 8 ) +#endif { maAllBorders.resize( FRAMEBORDERTYPE_COUNT, nullptr ); maAllBorders[ GetIndexFromFrameBorderType( FrameBorderType::Left ) ] = &maLeft; @@ -268,11 +272,12 @@ FrameSelectorImpl::FrameSelectorImpl( FrameSelector& rFrameSel ) : } FrameSelectorImpl::~FrameSelectorImpl() - { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY for( auto& rpChild : maChildVec ) if( rpChild.is() ) rpChild->Invalidate(); +#endif } // initialization @@ -753,17 +758,24 @@ void FrameSelectorImpl::SetBorderState( FrameBorder& rBorder, FrameBorderState e Any aNew; Any& rMod = eState == FrameBorderState::Show ? aNew : aOld; rMod <<= AccessibleStateType::CHECKED; + +#ifndef 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 ); + +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (xRet.is()) xRet->NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOld, aNew ); +#endif + DoInvalidate( true ); } @@ -837,8 +849,10 @@ void FrameSelector::SetDrawingArea(weld::DrawingArea* pDrawingArea) FrameSelector::~FrameSelector() { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( mxAccess.is() ) mxAccess->Invalidate(); +#endif } void FrameSelector::Initialize( FrameSelFlags nFlags ) @@ -971,6 +985,7 @@ bool FrameSelector::IsBorderSelected( FrameBorderType eBorder ) const void FrameSelector::SelectBorder( FrameBorderType eBorder ) { mxImpl->SelectBorder( mxImpl->GetBorderAccess( eBorder ), true/*bSelect*/ ); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY // MT: bFireFox as API parameter is ugly... // if (bFocus) { @@ -982,6 +997,7 @@ void FrameSelector::SelectBorder( FrameBorderType eBorder ) xRet->NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); } } +#endif } bool FrameSelector::IsAnyBorderSelected() const @@ -1025,8 +1041,10 @@ SvxBorderLineStyle FrameSelector::getCurrentStyleLineStyle() const // accessibility Reference< XAccessible > FrameSelector::CreateAccessible() { +#ifndef 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 f23afd447cf7..a7df05b1cb92 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 + #include #include #include @@ -74,11 +76,14 @@ GraphCtrl::~GraphCtrl() { aUpdateIdle.Stop(); +#ifndef 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); +#ifndef 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() { +#ifndef 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..d4bf709d878f 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 + #include #include #include @@ -394,7 +396,9 @@ svx::SvxShowCharSetItem* SvxSearchCharSet::ImplGetItem( int _nPos ) ItemsMap::iterator aFind = m_aItems.find(_nPos); if ( aFind == m_aItems.end() ) { +#ifndef 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(*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 e89cfe4e71c9..822e843abe80 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 + #include #include #include @@ -850,18 +852,22 @@ public: css::uno::Reference WeldEditView::CreateAccessible() { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (!m_xAccessible.is()) m_xAccessible.set(new WeldEditAccessible(this)); +#endif return m_xAccessible; } WeldEditView::~WeldEditView() { +#ifndef 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; } @@ -1557,14 +1563,18 @@ void WeldEditView::SetDrawingArea(weld::DrawingArea* pDrawingArea) pDrawingArea->set_cursor(PointerStyle::Text); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY InitAccessible(); +#endif } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY void WeldEditView::InitAccessible() { if (m_xAccessible.is()) m_xAccessible->Init(GetEditEngine(), GetEditView()); } +#endif int WeldEditView::GetSurroundingText(OUString& rSurrounding) { @@ -1594,6 +1604,7 @@ void WeldEditView::GetFocus() weld::CustomWidgetController::GetFocus(); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (m_xAccessible.is()) { // Note: will implicitly send the AccessibleStateType::FOCUSED event @@ -1601,6 +1612,7 @@ void WeldEditView::GetFocus() if (pHelper) pHelper->SetFocus(); } +#endif } void WeldEditView::LoseFocus() @@ -1608,6 +1620,7 @@ void WeldEditView::LoseFocus() weld::CustomWidgetController::LoseFocus(); Invalidate(); // redraw without cursor +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (m_xAccessible.is()) { // Note: will implicitly send the AccessibleStateType::FOCUSED event @@ -1615,6 +1628,7 @@ void WeldEditView::LoseFocus() if (pHelper) pHelper->SetFocus(false); } +#endif } css::uno::Reference WeldEditView::GetDropTarget() diff --git a/svx/util/svx.component b/svx/util/svx.component index 97f68c4734c8..e608958b32b0 100644 --- a/svx/util/svx.component +++ b/svx/util/svx.component @@ -28,10 +28,6 @@ - - - diff --git a/svx/util/svx.extended.component b/svx/util/svx.extended.component new file mode 100644 index 000000000000..fe07d346be18 --- /dev/null +++ b/svx/util/svx.extended.component @@ -0,0 +1,26 @@ + + + + + + + + diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk index 0a8654a04c3d..561169c47ed1 100644 --- a/sw/Library_sw.mk +++ b/sw/Library_sw.mk @@ -96,9 +96,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 \ @@ -127,6 +126,13 @@ $(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/attr/BorderCacheOwner \ sw/source/core/attr/calbck \ sw/source/core/attr/cellatr \ @@ -623,7 +629,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 6f5516d69c1f..8379f87c0783 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 + #include #include @@ -1558,7 +1560,9 @@ class SwNotifyAccAboutInvalidTextSelections ~SwNotifyAccAboutInvalidTextSelections() COVERITY_NOEXCEPT_FALSE { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY mrCursorSh.InvalidateAccessibleParaTextSelection(); +#endif } }; @@ -1744,8 +1748,10 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) m_pVisibleCursor->Show(); // show again } m_eMvState = CursorMoveState::NONE; // state for cursor travelling - GetModelPositionForViewPoint +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (Imp()->IsAccessible()) Imp()->InvalidateAccessibleCursorPosition( pTableFrame ); +#endif return; } } @@ -2016,8 +2022,10 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) m_eMvState = CursorMoveState::NONE; // state for cursor travelling - GetModelPositionForViewPoint +#ifndef 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 26647f2355cf..8d2f420d3751 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 + #include #include #include @@ -1115,6 +1117,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. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if ( pNew->IsTextFrame() ) { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); @@ -1126,6 +1129,7 @@ void SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx) dynamic_cast(pNew->FindPrevCnt()) ); } } +#endif pNew = pSct; } @@ -1141,6 +1145,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. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if ( pNew->IsTextFrame() ) { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); @@ -1152,6 +1157,7 @@ void SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx) dynamic_cast(pNew->FindPrevCnt()) ); } } +#endif if ( bInitNewSect ) static_cast(pNew)->Init(); } diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index d11f09ecf69a..8c2435858311 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 + #include #include #include @@ -2426,6 +2428,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. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && @@ -2436,6 +2439,7 @@ void SwTableNode::MakeOwnFrames(SwNodeIndex* pIdxBehind) dynamic_cast(pNew->FindPrevCnt()) ); } } +#endif pNew->RegistFlys(); } } @@ -2461,6 +2465,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. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && @@ -2471,6 +2476,7 @@ void SwTableNode::DelFrames(SwRootFrame const*const pLayout) dynamic_cast(pFrame->FindPrevCnt()) ); } } +#endif pFrame->Cut(); SwFrame::DestroyFrame(pFrame); bAgain = true; diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 809ecd349c81..e1c866aecabf 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 + #include #include #include @@ -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. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if ( pNew->IsTextFrame() ) { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); @@ -1396,6 +1399,7 @@ void SwContentNode::MakeFramesForAdjacentContentNode(SwContentNode& rNode) dynamic_cast(pNew->FindPrevCnt()) ); } } +#endif } } @@ -1480,6 +1484,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. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) @@ -1488,6 +1493,7 @@ void SwContentNode::DelFrames(SwRootFrame const*const pLayout) dynamic_cast(pFrame->FindNextCnt( true )), dynamic_cast(pFrame->FindPrevCnt()) ); } +#endif } if( pFrame->IsFollow() ) diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index dfa884e80db5..85d537be0a58 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 + #include #include #include @@ -371,6 +373,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, nNewPos ); pDrawPage->RecalcObjOrdNums(); // adjustments for accessibility API +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if ( auto pTmpFlyFrame = dynamic_cast( pAnchoredObj ) ) { m_rImp.DisposeAccessibleFrame( pTmpFlyFrame ); @@ -381,6 +384,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, m_rImp.DisposeAccessibleObj(pAnchoredObj->GetDrawObj(), true); m_rImp.AddAccessibleObj( pAnchoredObj->GetDrawObj() ); } +#endif } aAnchoredObjs.pop_back(); } @@ -404,6 +408,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, nTmpNewPos ); pDrawPage->RecalcObjOrdNums(); // adjustments for accessibility API +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if ( auto pTmpFlyFrame = dynamic_cast( pAnchoredObj ) ) { m_rImp.DisposeAccessibleFrame( pTmpFlyFrame ); @@ -414,6 +419,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, m_rImp.DisposeAccessibleObj(pAnchoredObj->GetDrawObj(), true); m_rImp.AddAccessibleObj( pAnchoredObj->GetDrawObj() ); } +#endif } aAnchoredObjs.pop_back(); } @@ -581,8 +587,10 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos, if ( auto pFlyFrame = dynamic_cast< SwFlyFrame *>( pMovedAnchoredObj ) ) { // adjustments for accessibility API +#ifndef 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; @@ -609,6 +617,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos, // collect 'child' object aMovedChildObjs.push_back( pTmpObj ); // adjustments for accessibility API +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if ( auto pFlyDrawObj = dynamic_cast( pTmpObj ) ) { const SwFlyFrame *pTmpFlyFrame = pFlyDrawObj->GetFlyFrame(); @@ -620,6 +629,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos, m_rImp.DisposeAccessibleObj(pTmpObj, true); m_rImp.AddAccessibleObj( pTmpObj ); } +#endif } else { @@ -633,12 +643,14 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos, } while ( ( bMovedForward && i < ( nObjCount - aMovedChildObjs.size() ) ) || ( !bMovedForward && i > ( nNewPos + aMovedChildObjs.size() ) ) ); } +#ifndef 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 8110b5120c74..9d492ecbccba 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 + #include #include #include @@ -123,11 +125,13 @@ SwPosNotify::~SwPosNotify() COVERITY_NOEXCEPT_FALSE } } // tdf#101464 notify SwAccessibleMap about new drawing object position +#ifndef 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 bf01c3b1dc7a..986c812454df 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 + #include #include #include @@ -261,6 +263,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. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( IsAccessibleFrame() && GetFormat() && (IsFlyInContentFrame() || !GetAnchorFrame()) ) { SwRootFrame *pRootFrame = getRootFrame(); @@ -275,6 +278,7 @@ void SwFlyFrame::DestroyImpl() } } } +#endif if( GetFormat() && !GetFormat()->GetDoc()->IsInDtor() ) { @@ -484,6 +488,7 @@ void SwFlyFrame::ChainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) } // invalidate accessible relation set (accessibility wrapper) +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pSh = pMaster->getRootFrame()->GetCurrShell(); if( pSh ) { @@ -491,6 +496,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 ) @@ -530,6 +536,7 @@ void SwFlyFrame::UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) pFollow->GetFormat()->GetDoc(), ++nIndex ); // invalidate accessible relation set (accessibility wrapper) +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pSh = pMaster->getRootFrame()->GetCurrShell(); if( pSh ) { @@ -537,6 +544,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 ) @@ -792,12 +800,14 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, const SvxProtectItem *pP = static_cast(pNew); GetVirtDrawObj()->SetMoveProtect( pP->IsPosProtected() ); GetVirtDrawObj()->SetResizeProtect( pP->IsSizeProtected() ); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( pSh ) { SwRootFrame* pLayout = getRootFrame(); if( pLayout && pLayout->IsAnyShellAccessible() ) pSh->Imp()->InvalidateAccessibleEditableState( true, this ); } +#endif } break; case RES_COL: @@ -975,15 +985,17 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, rIDDMA.GetHeavenId() : rIDDMA.GetHellId(); GetVirtDrawObj()->SetLayer( nId ); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( pSh ) { SwRootFrame* pLayout = getRootFrame(); if( pLayout && pLayout->IsAnyShellAccessible() ) - { - pSh->Imp()->DisposeAccessibleFrame( this ); - pSh->Imp()->AddAccessibleFrame( this ); - } + { + pSh->Imp()->DisposeAccessibleFrame( this ); + pSh->Imp()->AddAccessibleFrame( this ); + } } +#endif // #i28701# - perform reorder of object lists // at anchor frame and at page frame. rInvFlags |= SwFlyFrameInvFlags::UpdateObjInSortedList; @@ -2203,6 +2215,7 @@ void SwFrame::RemoveFly( SwFlyFrame *pToRemove ) pPage->RemoveFlyFromPage( pToRemove ); } // #i73201# +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY else { if ( pToRemove->IsAccessibleFrame() && @@ -2220,6 +2233,7 @@ void SwFrame::RemoveFly( SwFlyFrame *pToRemove ) } } } +#endif m_pDrawObjs->Remove(*pToRemove); if (!m_pDrawObjs->size()) @@ -2301,6 +2315,7 @@ void SwFrame::AppendDrawObj( SwAnchoredObject& _rNewObj ) } // Notify accessible layout. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pSh = getRootFrame()->GetCurrShell(); if( pSh ) { @@ -2310,6 +2325,7 @@ void SwFrame::AppendDrawObj( SwAnchoredObject& _rNewObj ) pSh->Imp()->AddAccessibleObj( _rNewObj.GetDrawObj() ); } } +#endif assert(!m_pDrawObjs || m_pDrawObjs->is_sorted()); } @@ -2317,6 +2333,7 @@ void SwFrame::AppendDrawObj( SwAnchoredObject& _rNewObj ) void SwFrame::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj ) { // Notify accessible layout. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pSh = getRootFrame()->GetCurrShell(); if( pSh ) { @@ -2324,6 +2341,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 ea50b06ab364..6c73afe06d6f 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 + #include #include #include @@ -847,6 +849,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. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( GetUpper() && static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) @@ -854,6 +857,7 @@ void SwPageFrame::AppendFlyToPage( SwFlyFrame *pNew ) static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() ->AddAccessibleFrame( pNew ); } +#endif } // #i28701# - correction: consider also drawing objects @@ -920,6 +924,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. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( GetUpper() && static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) @@ -927,6 +932,7 @@ void SwPageFrame::RemoveFlyFromPage( SwFlyFrame *pToRemove ) static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() ->DisposeAccessibleFrame( pToRemove, true ); } +#endif // #i28701# - use new method pToRemove->SetPageFrame( nullptr ); @@ -956,6 +962,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. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( GetUpper() && static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) @@ -963,6 +970,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 ) @@ -992,6 +1000,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. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( GetUpper() && static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) @@ -999,6 +1008,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 51e76b63daaa..3a3d4ccef161 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 + #include #include #include @@ -240,6 +242,7 @@ SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE if ( bAbsP || bPrtP || bChgWidth || bChgHeight || bPrtWidth || bPrtHeight || bChgFlyBasePos ) { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( mpFrame->IsAccessibleFrame() ) { SwRootFrame *pRootFrame = mpFrame->getRootFrame(); @@ -249,6 +252,7 @@ SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( mpFrame, maFrame ); } } +#endif // Notification of anchored objects if ( mpFrame->GetDrawObjs() ) @@ -368,6 +372,7 @@ SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE } } } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY else if( mpFrame->IsTextFrame() && mbValidSize != mpFrame->isFrameAreaSizeValid() ) { SwRootFrame *pRootFrame = mpFrame->getRootFrame(); @@ -377,6 +382,7 @@ SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE pRootFrame->GetCurrShell()->Imp()->InvalidateAccessibleFrameContent( mpFrame ); } } +#endif // #i9046# Automatic frame width SwFlyFrame* pFly = nullptr; @@ -1564,6 +1570,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. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if ( pFrame->IsTextFrame() ) { SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); @@ -1585,6 +1592,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 ); @@ -1651,6 +1659,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. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); // no notification, if is in construction @@ -1664,6 +1673,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, dynamic_cast(pFrame->FindPrevCnt()) ); } } +#endif if ( bObjsDirect && !pTable->empty() ) static_cast(pFrame)->RegistFlys(); // OD 12.08.2003 #i17969# - consider horizontal/vertical layout @@ -1763,6 +1773,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. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); // no notification, if is in construction @@ -1776,6 +1787,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, dynamic_cast(pFrame->FindPrevCnt()) ); } } +#endif pFrame->CheckDirChange(); // OD 12.08.2003 #i17969# - consider horizontal/vertical layout diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 0ab451c111a0..bf2eba734ca7 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include @@ -2342,8 +2343,10 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : m_pImp->GetShell()->EnableSmooth( true ); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( m_pImp->IsAccessible() ) m_pImp->FireAccessibleEvents(); +#endif SAL_INFO("sw.idle", "SwLayIdle() return"); diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index d699d59ecb80..fb2392d5c081 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include #include @@ -2063,23 +2065,25 @@ static void lcl_MoveAllLowerObjs( SwFrame* pFrame, const Point& rOffset ) static void lcl_MoveAllLowers( SwFrame* pFrame, const Point& rOffset ) { - const SwRect aFrame( pFrame->getFrameArea() ); - // first move the current frame // RotateFlyFrame3: moved to transform_translate instead of // direct modification to allow the SwFrame evtl. needed own reactions pFrame->transform_translate(rOffset); // Don't forget accessibility: +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( pFrame->IsAccessibleFrame() ) { SwRootFrame *pRootFrame = pFrame->getRootFrame(); if( pRootFrame && pRootFrame->IsAnyShellAccessible() && pRootFrame->GetCurrShell() ) { + const SwRect aFrame( pFrame->getFrameArea() ); + pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( pFrame, aFrame ); } } +#endif // the move any objects lcl_MoveAllLowerObjs( pFrame, rOffset ); diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 079e7de2b264..ea9972ab90b0 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include @@ -198,6 +200,7 @@ void SwSectionFrame::DelEmpty( bool bRemove ) // 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. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && @@ -208,6 +211,7 @@ void SwSectionFrame::DelEmpty( bool bRemove ) dynamic_cast(FindPrevCnt()) ); } } +#endif Cut_( bRemove ); } SwSectionFrame *pMaster = IsFollow() ? FindMaster() : nullptr; @@ -2705,11 +2709,13 @@ void SwSectionFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pN break; case RES_PROTECT: +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell *pSh = getRootFrame()->GetCurrShell(); if( pSh && pSh->GetLayout()->IsAnyShellAccessible() ) pSh->Imp()->InvalidateAccessibleEditableState( true, this ); } +#endif break; default: diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index b4ac7980e90a..3fc0d10b5d1b 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include #include @@ -329,6 +331,7 @@ void SwFrame::DestroyImpl() // accessible objects for fly and cell frames have been already disposed // by the destructors of the derived classes. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (IsAccessibleFrame() && !(IsFlyFrame() || IsCellFrame()) && (GetDep() || IsTextFrame())) // sw_redlinehide: text frame may not have Dep! { @@ -344,6 +347,7 @@ void SwFrame::DestroyImpl() } } } +#endif if (!m_pDrawObjs) return; diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index fe3016b0037a..14dbbe42491e 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include #include @@ -3190,8 +3192,6 @@ SwTwips SwTabFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) if ( GetUpper() ) { - SwRect aOldFrame( getFrameArea() ); - //The upper only grows as far as needed. nReal provides the distance //which is already available. SwTwips nReal = aRectFnSet.GetHeight(GetUpper()->getFramePrintArea()); @@ -3220,12 +3220,15 @@ SwTwips SwTabFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) aRectFnSet.AddBottom( aFrm, nDist ); } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SwRootFrame *pRootFrame = getRootFrame(); if( pRootFrame && pRootFrame->IsAnyShellAccessible() && pRootFrame->GetCurrShell() ) { + SwRect aOldFrame( getFrameArea() ); pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( this, aOldFrame ); } +#endif } } @@ -4504,7 +4507,6 @@ void SwRowFrame::AdjustCells( const SwTwips nHeight, const bool bHeight ) SwFrame *pFrame = Lower(); if ( bHeight ) { - SwRootFrame *pRootFrame = getRootFrame(); SwRectFnSet aRectFnSet(this); SwRect aOldFrame; @@ -4581,8 +4583,11 @@ void SwRowFrame::AdjustCells( const SwTwips nHeight, const bool bHeight ) if ( pNotify ) { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY + SwRootFrame *pRootFrame = getRootFrame(); if( pRootFrame && pRootFrame->IsAnyShellAccessible() && pRootFrame->GetCurrShell() ) pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( pNotify, aOldFrame ); +#endif pNotify->InvalidatePrt_(); } @@ -4853,12 +4858,14 @@ void SwCellFrame::DestroyImpl() { // At this stage the lower frames aren't destroyed already, // therefore we have to do a recursive dispose. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SwRootFrame *pRootFrame = getRootFrame(); if( pRootFrame && pRootFrame->IsAnyShellAccessible() && pRootFrame->GetCurrShell() ) { pRootFrame->GetCurrShell()->Imp()->DisposeAccessibleFrame( this, true ); } +#endif pMod->Remove( this ); if( !pMod->HasWriterListeners() ) @@ -5449,12 +5456,14 @@ void SwCellFrame::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) InvalidatePrt(); } } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if(pProtectItem) { SwViewShell* pSh = getRootFrame()->GetCurrShell(); if(pSh && pSh->GetLayout()->IsAnyShellAccessible()) pSh->Imp()->InvalidateAccessibleEditableState(true, this); } +#endif if(pFrameDirItem) { SetDerivedVert(false); @@ -5596,6 +5605,7 @@ void SwCellFrame::dumpAsXmlAttributes(xmlTextWriterPtr pWriter) const void SwCellFrame::Cut() { // notification for accessibility +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwRootFrame *pRootFrame = getRootFrame(); if( pRootFrame && pRootFrame->IsAnyShellAccessible() ) @@ -5607,6 +5617,7 @@ void SwCellFrame::Cut() } } } +#endif SwLayoutFrame::Cut(); } diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 90f80ba4be31..c60c0c347bcc 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include #include @@ -2771,6 +2773,7 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) } } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( bMoveAccFrame && IsAccessibleFrame() ) { SwRootFrame *pRootFrame = getRootFrame(); @@ -2780,6 +2783,11 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( this, aOldFrame ); } } +#else + (void)bMoveAccFrame; + (void)aOldFrame; +#endif + return nReal; } @@ -2912,6 +2920,7 @@ SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo ) AdjustNeighbourhood( nReal - nShrink ); } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( bMoveAccFrame && IsAccessibleFrame() ) { SwRootFrame *pRootFrame = getRootFrame(); @@ -2921,6 +2930,11 @@ SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo ) pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( this, aOldFrame ); } } +#else + (void)aOldFrame; + (void)bMoveAccFrame; +#endif + if ( !bTst && (IsCellFrame() || IsColumnFrame() ? nReal : nRealDist) ) { SwPageFrame *pPage = FindPageFrame(); diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index 12a4492bbec7..1592a5633935 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include @@ -666,6 +668,7 @@ SwContentFrame *SwTextFrame::JoinFrame() // Relation CONTENT_FLOWS_FROM for current next paragraph will change // and relation CONTENT_FLOWS_TO for current previous paragraph, which // is , will change. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pFoll->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && @@ -676,6 +679,8 @@ SwContentFrame *SwTextFrame::JoinFrame() this ); } } +#endif + pFoll->Cut(); SetFollow(pNxt); SwFrame::DestroyFrame(pFoll); @@ -700,6 +705,7 @@ void SwTextFrame::SplitFrame(TextFrameIndex const nTextPos) // Relation CONTENT_FLOWS_FROM for current next paragraph will change // and relation CONTENT_FLOWS_TO for current previous paragraph, which // is , will change. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && @@ -710,6 +716,7 @@ void SwTextFrame::SplitFrame(TextFrameIndex const nTextPos) this ); } } +#endif // If footnotes end up in pNew bz our actions, we need // to re-register them diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index ce0d6cc99c2f..8d00ce8e45d9 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include #include @@ -1950,6 +1952,7 @@ void UpdateMergedParaForMove(sw::MergedPara & rMerged, * Related: fdo#56031 filter out attribute changes that don't matter for * humans/a11y to stop flooding the destination mortal with useless noise */ +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY static bool isA11yRelevantAttribute(sal_uInt16 nWhich) { return nWhich != RES_CHRATR_RSID; @@ -1963,6 +1966,7 @@ static bool hasA11yRelevantAttribute( const std::vector& rWhichFmtAt return false; } +#endif // ENABLE_WASM_STRIP_ACCESSIBILITY // Note: for now this overrides SwClient::SwClientNotify; the intermediary // classes still override SwClient::Modify, which should continue to work @@ -2249,6 +2253,7 @@ void SwTextFrame::SwClientNotify(SwModify const& rModify, SfxHint const& rHint) } } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( isA11yRelevantAttribute( pNewUpdate->getWhichAttr() ) && hasA11yRelevantAttribute( pNewUpdate->getFmtAttrs() ) ) { @@ -2258,6 +2263,7 @@ void SwTextFrame::SwClientNotify(SwModify const& rModify, SfxHint const& rHint) pViewSh->InvalidateAccessibleParaAttrs( *this ); } } +#endif } break; case RES_OBJECTDYING: @@ -2555,6 +2561,7 @@ void SwTextFrame::SwClientNotify(SwModify const& rModify, SfxHint const& rHint) SwContentFrame::SwClientNotify(rModify, sw::LegacyModifyHint(pOld, pNew)); } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (isA11yRelevantAttribute(nWhich)) { SwViewShell* pViewSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr; @@ -2563,6 +2570,7 @@ void SwTextFrame::SwClientNotify(SwModify const& rModify, SfxHint const& rHint) pViewSh->InvalidateAccessibleParaAttrs( *this ); } } +#endif } break; diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 19fcadedbe4e..8fad2f39ea0e 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include #include @@ -1387,9 +1389,11 @@ SwRect SwTextFrame::AutoSpell_(SwTextNode & rNode, sal_Int32 nActPos) aRect = lcl_CalculateRepaintRect(*this, rNode, nChgStart, nChgEnd); // fdo#71558 notify misspelled word to accessibility +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pViewSh = getRootFrame() ? getRootFrame()->GetCurrShell() : nullptr; if( pViewSh ) pViewSh->InvalidateAccessibleParaAttrs( *this ); +#endif } pNode->GetWrong()->SetInvalid( nInvStart, nInvEnd ); diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index 4a19062f4db6..bd8dafbf17f2 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include @@ -1127,6 +1129,7 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const tools: // OD 17.11.2003 #i22014# - no update of accessible preview, if a new // print preview layout is created during paint. +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if ( !mbNewLayoutDuringPaint ) { // update at accessibility interface @@ -1136,6 +1139,7 @@ bool SwPagePreviewLayout::Paint(vcl::RenderContext& rRenderContext, const tools: mrLayoutRootFrame.GetPageByPageNum( mnSelectedPageNum ), maWinSize ); } +#endif pOutputDev->SetMapMode( aSavedMapMode ); mrParentViewShell.maVisArea.Clear(); diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx index 3cadcfd3556a..35dda1b12921 100644 --- a/sw/source/core/view/viewimp.cxx +++ b/sw/source/core/view/viewimp.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include #include @@ -97,7 +99,9 @@ SwViewShellImp::SwViewShellImp( SwViewShell *pParent ) : SwViewShellImp::~SwViewShellImp() { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY m_pAccessibleMap.reset(); +#endif m_pPagePreviewLayout.reset(); @@ -283,6 +287,7 @@ void SwViewShellImp::InitPagePreviewLayout() m_pPagePreviewLayout.reset( new SwPagePreviewLayout( *m_pShell, *(m_pShell->GetLayout()) ) ); } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY void SwViewShellImp::UpdateAccessible() { // We require a layout and an XModel to be accessible. @@ -454,5 +459,6 @@ void SwViewShellImp::FireAccessibleEvents() if( IsAccessible() ) GetAccessibleMap().FireEvents(); } +#endif // ENABLE_WASM_STRIP_ACCESSIBILITY /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx index 2c4d195ba3eb..8d5c33c37056 100644 --- a/sw/source/core/view/viewpg.cxx +++ b/sw/source/core/view/viewpg.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include #include @@ -37,7 +39,11 @@ SwPagePreviewLayout* SwViewShell::PagePreviewLayout() void SwViewShell::ShowPreviewSelection( sal_uInt16 nSelPage ) { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY Imp()->InvalidateAccessiblePreviewSelection( nSelPage ); +#else + (void)nSelPage; +#endif } // adjust view options for page preview diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index a28f3dc2df52..9ea7527e5cf2 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include #include @@ -247,10 +249,12 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) UISizeNotify(); // tdf#101464 print preview may generate events if another view shell // performs layout... +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (IsPreview() && Imp()->IsAccessible()) { Imp()->FireAccessibleEvents(); } +#endif return; } @@ -451,8 +455,10 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) UISizeNotify(); ++mnStartAction; +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( Imp()->IsAccessible() ) Imp()->FireAccessibleEvents(); +#endif } void SwViewShell::ImplStartAction() @@ -1233,8 +1239,10 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) if ( !bScrolled && pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) pPostItMgr->CorrectPositions(); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( Imp()->IsAccessible() ) Imp()->UpdateAccessible(); +#endif } bool SwViewShell::SmoothScroll( tools::Long lXDiff, tools::Long lYDiff, const tools::Rectangle *pRect ) @@ -2385,8 +2393,10 @@ void SwViewShell::SetReadonlyOption(bool bSet) } else if ( GetWin() ) GetWin()->Invalidate(); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if( Imp()->IsAccessible() ) Imp()->InvalidateAccessibleEditableState( false ); +#endif } void SwViewShell::SetPDFExportOption(bool bSet) @@ -2439,6 +2449,7 @@ bool SwViewShell::IsNewLayout() const return GetLayout()->IsNewLayout(); } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY uno::Reference< css::accessibility::XAccessible > SwViewShell::CreateAccessible() { uno::Reference< css::accessibility::XAccessible > xAcc; @@ -2542,6 +2553,7 @@ void SwViewShell::ApplyAccessibilityOptions(SvtAccessibilityOptions const & rAcc mpOpt->SetSelectionInReadonly(rAccessibilityOptions.IsSelectionInReadonly()); } } +#endif // ENABLE_WASM_STRIP_ACCESSIBILITY ShellResource* SwViewShell::GetShellRes() { diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 0590fea71d35..75ca82c4662f 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include "docxexport.hxx" #include "docxexportfilter.hxx" #include "docxattributeoutput.hxx" @@ -385,6 +387,10 @@ OString DocxExport::OutputChart( uno::Reference< frame::XModel > const & xModel, m_rFilter.openFragmentStreamWithSerializer( aFileName, "application/vnd.openxmlformats-officedocument.drawingml.chart+xml" ); +#ifndef ENABLE_WASM_STRIP_CHART + // WASM_CHART change + // TODO: With Chart extracted this cannot really happen since + // no Chart could've been added at all oox::drawingml::ChartExport aChartExport(XML_w, pChartFS, xModel, &m_rFilter, oox::drawingml::DOCUMENT_DOCX); css::uno::Reference xModifiable(xModel, css::uno::UNO_QUERY); const bool bOldModified = xModifiable && xModifiable->isModified(); @@ -393,6 +399,9 @@ OString DocxExport::OutputChart( uno::Reference< frame::XModel > const & xModel, // tdf#134973: the model could get modified: e.g., calling XChartDocument::getSubTitle(), // which creates the object if absent, and sets the modified state. xModifiable->setModified(bOldModified); +#else + (void)xModel; +#endif return OUStringToOString( sId, RTL_TEXTENCODING_UTF8 ); } diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 3074d96f7bab..080a5c3fb418 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include @@ -944,13 +945,10 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, Con { m_bAuthorInitialised = false; } - else if ( pBrdCst == m_pColorConfig.get() || pBrdCst == m_pAccessibilityOptions.get() ) + else if ( pBrdCst == m_pColorConfig.get() ) { - bool bAccessibility = false; if( pBrdCst == m_pColorConfig.get() ) SwViewOption::ApplyColorConfigValues(*m_pColorConfig); - else - bAccessibility = true; //invalidate all edit windows SfxViewShell* pViewShell = SfxViewShell::GetFirst(); @@ -962,19 +960,38 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, Con dynamic_cast< const SwPagePreview *>( pViewShell ) != nullptr || dynamic_cast< const SwSrcView *>( pViewShell ) != nullptr) { - if(bAccessibility) - { - if(auto pSwView = dynamic_cast( pViewShell )) - pSwView->ApplyAccessibilityOptions(*m_pAccessibilityOptions); - else if(auto pPagePreview = dynamic_cast( pViewShell )) - pPagePreview->ApplyAccessibilityOptions(*m_pAccessibilityOptions); - } pViewShell->GetWindow()->Invalidate(); } } pViewShell = SfxViewShell::GetNext( *pViewShell ); } } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY + else if ( pBrdCst == m_pAccessibilityOptions.get() ) + { + //set Accessibility options + SfxViewShell* pViewShell = SfxViewShell::GetFirst(); + while(pViewShell) + { + if(pViewShell->GetWindow()) + { + auto pSwView = dynamic_cast( pViewShell ); + auto pPagePreview = dynamic_cast( pViewShell ); + + if(pSwView) + pSwView->ApplyAccessibilityOptions(*m_pAccessibilityOptions); + else if(pPagePreview) + pPagePreview->ApplyAccessibilityOptions(*m_pAccessibilityOptions); + + if(pSwView || pPagePreview || dynamic_cast< const SwSrcView *>( pViewShell ) != nullptr) + { + pViewShell->GetWindow()->Invalidate(); + } + } + pViewShell = SfxViewShell::GetNext( *pViewShell ); + } + } +#endif else if( pBrdCst == m_pCTLOptions.get() ) { const SfxObjectShell* pObjSh = SfxObjectShell::GetFirst(); diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index 654ff05a0650..492c151f58e5 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include @@ -1529,9 +1531,13 @@ void SwDocShell::MakeByExample( const OUString &rName, SfxStyleFamily nFamily, sfx::AccessibilityIssueCollection SwDocShell::runAccessibilityCheck() { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY sw::AccessibilityCheck aCheck(m_xDoc.get()); aCheck.check(); return aCheck.getIssueCollection(); +#else + return sfx::AccessibilityIssueCollection(); +#endif } std::set SwDocShell::GetDocColors() diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index e354a62204a8..aa8479240d6f 100644 --- a/sw/source/uibase/docvw/AnnotationWin.cxx +++ b/sw/source/uibase/docvw/AnnotationWin.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include @@ -121,9 +123,11 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin, mpShadow->setVisible(false); } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY mrMgr.ConnectSidebarWinToFrame( *(mrSidebarItem.maLayoutInfo.mpAnchorFrame), mrSidebarItem.GetFormatField(), *this ); +#endif if (SupportsDoubleBuffering()) // When double-buffering, allow parents to paint on our area. That's @@ -141,8 +145,10 @@ void SwAnnotationWin::dispose() if (IsDisposed()) return; +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY mrMgr.DisconnectSidebarWinFromFrame( *(mrSidebarItem.maLayoutInfo.mpAnchorFrame), *this ); +#endif Disable(); diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index b2604377e2e0..8f3e2e982bc4 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include @@ -1367,15 +1369,18 @@ bool SwAnnotationWin::IsScrollbarVisible() const void SwAnnotationWin::ChangeSidebarItem( SwSidebarItem const & rSidebarItem ) { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY const bool bAnchorChanged = mpAnchorFrame != rSidebarItem.maLayoutInfo.mpAnchorFrame; if ( bAnchorChanged ) { mrMgr.DisconnectSidebarWinFromFrame( *mpAnchorFrame, *this ); } +#endif mrSidebarItem = rSidebarItem; mpAnchorFrame = mrSidebarItem.maLayoutInfo.mpAnchorFrame; +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (mxSidebarWinAccessible) mxSidebarWinAccessible->ChangeSidebarItem( mrSidebarItem ); @@ -1385,10 +1390,12 @@ void SwAnnotationWin::ChangeSidebarItem( SwSidebarItem const & rSidebarItem ) mrSidebarItem.GetFormatField(), *this ); } +#endif } css::uno::Reference< css::accessibility::XAccessible > SwAnnotationWin::CreateAccessible() { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY // This is rather dodgy code. Normally in CreateAccessible, if we want a custom // object, we return a custom object, but we do no override the default toolkit // window peer. @@ -1396,6 +1403,7 @@ css::uno::Reference< css::accessibility::XAccessible > SwAnnotationWin::CreateAc mxSidebarWinAccessible = new SidebarWinAccessible( *this, mrView.GetWrtShell(), mrSidebarItem ); +#endif return mxSidebarWinAccessible; } diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index d8b79c6e9d7e..1c8187460ada 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include @@ -2400,6 +2402,7 @@ void SwPostItMgr::ToggleInsModeOnActiveSidebarWin() } } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY void SwPostItMgr::ConnectSidebarWinToFrame( const SwFrame& rFrame, const SwFormatField& rFormatField, SwAnnotationWin& rSidebarWin ) @@ -2430,6 +2433,7 @@ void SwPostItMgr::DisconnectSidebarWinFromFrame( const SwFrame& rFrame, } } } +#endif // ENABLE_WASM_STRIP_ACCESSIBILITY bool SwPostItMgr::HasFrameConnectedSidebarWins( const SwFrame& rFrame ) { diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index 342f52086fc8..dcca9c390b4a 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include "SidebarTxtControl.hxx" #include @@ -120,7 +122,9 @@ void SidebarTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea) pDrawingArea->set_cursor(PointerStyle::Text); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY InitAccessible(); +#endif } void SidebarTextControl::SetCursorLogicPosition(const Point& rPosition, bool bPoint, bool bClearMark) diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 446d2faa5405..b8cab944d285 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include #include @@ -5286,14 +5288,18 @@ void SwEditWin::GetFocus() { m_rView.GotFocus(); Window::GetFocus(); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY m_rView.GetWrtShell().InvalidateAccessibleFocus(); +#endif } } void SwEditWin::LoseFocus() { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY if (m_rView.GetWrtShellPtr()) m_rView.GetWrtShell().InvalidateAccessibleFocus(); +#endif Window::LoseFocus(); if( m_pQuickHlpData && m_pQuickHlpData->m_bIsDisplayed ) m_pQuickHlpData->Stop( m_rView.GetWrtShell() ); @@ -5985,6 +5991,7 @@ void SwEditWin::SetChainMode( bool bOn ) uno::Reference< css::accessibility::XAccessible > SwEditWin::CreateAccessible() { +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY SolarMutexGuard aGuard; // this should have happened already!!! SwWrtShell *pSh = m_rView.GetWrtShellPtr(); OSL_ENSURE( pSh, "no writer shell, no accessible object" ); @@ -5994,6 +6001,9 @@ uno::Reference< css::accessibility::XAccessible > SwEditWin::CreateAccessible() xAcc = pSh->CreateAccessible(); return xAcc; +#else + return nullptr; +#endif } void QuickHelpData::Move( QuickHelpData& rCpy ) diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 760f32a59e53..0f22c6924ad4 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -18,6 +18,7 @@ */ #include +#include #include @@ -2744,6 +2745,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) } } break; +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY case SID_ACCESSIBILITY_CHECK: { sw::AccessibilityCheck aCheck(rSh.GetDoc()); @@ -2752,6 +2754,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) aDialog.run(); } break; +#endif default:OSL_FAIL("wrong Dispatcher (basesh.cxx)"); } if(!bDone) diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 9ca718e016f6..716ad499455b 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include #include @@ -1119,7 +1121,9 @@ void SwPagePreview::Init() aOpt.SetHideWhitespaceMode( false ); GetViewShell()->ApplyViewOptions( aOpt ); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY GetViewShell()->ApplyAccessibilityOptions(SW_MOD()->GetAccessibilityOptions()); +#endif // adjust view shell option to the same as for print SwPrintData const aPrintOptions = *SW_MOD()->GetPrtOptions(false); @@ -1811,7 +1815,7 @@ uno::Reference< css::accessibility::XAccessible > SwPagePreviewWin::CreateAccessible() { SolarMutexGuard aGuard; // this should have happened already!!! - +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY OSL_ENSURE( GetViewShell() != nullptr, "We need a view shell" ); css::uno::Reference< css::accessibility::XAccessible > xAcc = GetAccessible( false ); if (xAcc.is()) @@ -1823,6 +1827,7 @@ uno::Reference< css::accessibility::XAccessible > css::uno::Reference< css::accessibility::XAccessible > xAccPreview = mpViewShell->CreateAccessiblePreview(); SetAccessible(xAccPreview); } +#endif return GetAccessible( false ); } diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 5612191cc77a..1b5972cd1281 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include @@ -966,7 +967,9 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) m_pWrtShell->SetUIOptions( aUsrPref ); m_pWrtShell->SetReadOnlyAvailable( aUsrPref.IsCursorInProtectedArea() ); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY m_pWrtShell->ApplyAccessibilityOptions(SW_MOD()->GetAccessibilityOptions()); +#endif if( m_pWrtShell->GetDoc()->getIDocumentState().IsUpdateExpField() ) { diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index 01bed0a3f35b..4e260ec3e33c 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include @@ -115,11 +116,14 @@ view::XSelectionSupplier* SwView::GetUNOObject() void SwView::ApplyAccessibilityOptions(SvtAccessibilityOptions const & rAccessibilityOptions) { +#ifdef ENABLE_WASM_STRIP_ACCESSIBILITY + (void)rAccessibilityOptions; +#else m_pWrtShell->ApplyAccessibilityOptions(rAccessibilityOptions); //to enable the right state of the selection cursor in readonly documents if(GetDocShell()->IsReadOnly()) m_pWrtShell->ShowCursor(); - +#endif } void SwView::SetMailMergeConfigItem(std::shared_ptr const & rConfigItem) diff --git a/toolkit/source/helper/accessibilityclient.cxx b/toolkit/source/helper/accessibilityclient.cxx index 9d795ac620e4..21b530ebb2c8 100644 --- a/toolkit/source/helper/accessibilityclient.cxx +++ b/toolkit/source/helper/accessibilityclient.cxx @@ -18,6 +18,7 @@ */ #include +#include #include @@ -41,7 +42,9 @@ namespace toolkit oslModule s_hAccessibleImplementationModule = nullptr; #endif #if HAVE_FEATURE_DESKTOP +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY GetStandardAccComponentFactory s_pAccessibleFactoryFunc = nullptr; +#endif #endif ::rtl::Reference< IAccessibleFactory > s_pFactory; } @@ -151,6 +154,7 @@ namespace toolkit { } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY #if HAVE_FEATURE_DESKTOP #ifndef DISABLE_DYNLOADING extern "C" { static void thisModule() {} } @@ -158,6 +162,7 @@ namespace toolkit extern "C" void *getStandardAccessibleFactory(); #endif #endif // HAVE_FEATURE_DESKTOP +#endif // ENABLE_WASM_STRIP_ACCESSIBILITY void AccessibilityClient::ensureInitialized() { @@ -166,6 +171,7 @@ namespace toolkit ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY #if HAVE_FEATURE_DESKTOP // load the library implementing the factory if (!s_pFactory) @@ -198,6 +204,7 @@ namespace toolkit } } #endif // HAVE_FEATURE_DESKTOP +#endif // ENABLE_WASM_STRIP_ACCESSIBILITY if (!s_pFactory) // the attempt to load the lib, or to create the factory, failed diff --git a/unotools/Library_utl.mk b/unotools/Library_utl.mk index 66c08480db69..4097a71c6370 100644 --- a/unotools/Library_utl.mk +++ b/unotools/Library_utl.mk @@ -51,11 +51,14 @@ $(eval $(call gb_Library_use_libraries,utl,\ ucbhelper \ )) -# add all source files that shall be compiled with exceptions enabled -# the name is relative to $(SRCROOT) and must not contain an extension $(eval $(call gb_Library_add_exception_objects,utl,\ unotools/source/accessibility/accessiblerelationsethelper \ unotools/source/accessibility/accessiblestatesethelper \ +)) + +# add all source files that shall be compiled with exceptions enabled +# the name is relative to $(SRCROOT) and must not contain an extension +$(eval $(call gb_Library_add_exception_objects,utl,\ unotools/source/config/bootstrap \ unotools/source/config/cmdoptions \ unotools/source/config/compatibility \ diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index f09136c11b92..ca00813c5af5 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -129,7 +129,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\ vcl/source/window/dockwin \ vcl/source/window/event \ vcl/source/window/floatwin \ - vcl/source/window/introwin \ + $(if $(ENABLE_WASM_STRIP_SPLASH),,vcl/source/window/introwin) \ vcl/source/window/keycod \ vcl/source/window/keyevent \ vcl/source/window/layout \ diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index c9c94f88671f..c8f01c947217 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -19,10 +19,15 @@ $(eval $(call gb_Module_Module,vcl)) +ifneq ($(ENABLE_WASM_STRIP_PINGUSER),TRUE) +$(eval $(call gb_Module_add_targets,vcl,\ + Package_tipoftheday \ +)) +endif + $(eval $(call gb_Module_add_targets,vcl,\ Library_vcl \ Package_theme_definitions \ - Package_tipoftheday \ Package_toolbarmode \ UIConfig_vcl \ $(if $(filter WNT,$(OS)), \ diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index c756c79ae60a..20f1c0b8a7d8 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -2203,7 +2203,9 @@ void SvpSalGraphics::drawMask( const SalTwoRect& rTR, } sal_Int32 nStride; unsigned char *mask_data = aSurface.getBits(nStride); +#ifndef ENABLE_WASM_STRIP_PREMULTIPLY vcl::bitmap::lookup_table const & unpremultiply_table = vcl::bitmap::get_unpremultiply_table(); +#endif for (tools::Long y = rTR.mnSrcY ; y < rTR.mnSrcY + rTR.mnSrcHeight; ++y) { unsigned char *row = mask_data + (nStride*y); @@ -2211,9 +2213,15 @@ void SvpSalGraphics::drawMask( const SalTwoRect& rTR, for (tools::Long x = rTR.mnSrcX; x < rTR.mnSrcX + rTR.mnSrcWidth; ++x) { sal_uInt8 a = data[SVP_CAIRO_ALPHA]; +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + sal_uInt8 b = vcl::bitmap::unpremultiply(a, data[SVP_CAIRO_BLUE]); + sal_uInt8 g = vcl::bitmap::unpremultiply(a, data[SVP_CAIRO_GREEN]); + sal_uInt8 r = vcl::bitmap::unpremultiply(a, data[SVP_CAIRO_RED]); +#else sal_uInt8 b = unpremultiply_table[a][data[SVP_CAIRO_BLUE]]; sal_uInt8 g = unpremultiply_table[a][data[SVP_CAIRO_GREEN]]; sal_uInt8 r = unpremultiply_table[a][data[SVP_CAIRO_RED]]; +#endif if (r == 0 && g == 0 && b == 0) { data[0] = nMaskColor.GetBlue(); @@ -2316,12 +2324,20 @@ Color SvpSalGraphics::getPixel( tools::Long nX, tools::Long nY ) cairo_destroy(cr); cairo_surface_flush(target); +#ifndef ENABLE_WASM_STRIP_PREMULTIPLY vcl::bitmap::lookup_table const & unpremultiply_table = vcl::bitmap::get_unpremultiply_table(); +#endif unsigned char *data = cairo_image_surface_get_data(target); sal_uInt8 a = data[SVP_CAIRO_ALPHA]; +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + sal_uInt8 b = vcl::bitmap::unpremultiply(a, data[SVP_CAIRO_BLUE]); + sal_uInt8 g = vcl::bitmap::unpremultiply(a, data[SVP_CAIRO_GREEN]); + sal_uInt8 r = vcl::bitmap::unpremultiply(a, data[SVP_CAIRO_RED]); +#else sal_uInt8 b = unpremultiply_table[a][data[SVP_CAIRO_BLUE]]; sal_uInt8 g = unpremultiply_table[a][data[SVP_CAIRO_GREEN]]; sal_uInt8 r = unpremultiply_table[a][data[SVP_CAIRO_RED]]; +#endif Color aColor(ColorAlpha, a, r, g, b); cairo_surface_destroy(target); @@ -2596,9 +2612,11 @@ void SvpSalGraphics::releaseCairoContext(cairo_t* cr, bool bXorModeAllowed, cons if (nUnscaledExtentsBottom > target_surface_height) nUnscaledExtentsBottom = target_surface_height; +#ifndef ENABLE_WASM_STRIP_PREMULTIPLY vcl::bitmap::lookup_table const & unpremultiply_table = vcl::bitmap::get_unpremultiply_table(); vcl::bitmap::lookup_table const & premultiply_table = vcl::bitmap::get_premultiply_table(); +#endif for (sal_Int32 y = nUnscaledExtentsTop; y < nUnscaledExtentsBottom; ++y) { unsigned char *true_row = target_surface_data + (nStride*y); @@ -2609,6 +2627,17 @@ void SvpSalGraphics::releaseCairoContext(cairo_t* cr, bool bXorModeAllowed, cons { sal_uInt8 a = true_data[SVP_CAIRO_ALPHA]; sal_uInt8 xor_a = xor_data[SVP_CAIRO_ALPHA]; +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + sal_uInt8 b = vcl::bitmap::unpremultiply(a, true_data[SVP_CAIRO_BLUE]) ^ + vcl::bitmap::unpremultiply(xor_a, xor_data[SVP_CAIRO_BLUE]); + sal_uInt8 g = vcl::bitmap::unpremultiply(a, true_data[SVP_CAIRO_GREEN]) ^ + vcl::bitmap::unpremultiply(xor_a, xor_data[SVP_CAIRO_GREEN]); + sal_uInt8 r = vcl::bitmap::unpremultiply(a, true_data[SVP_CAIRO_RED]) ^ + vcl::bitmap::unpremultiply(xor_a, xor_data[SVP_CAIRO_RED]); + true_data[SVP_CAIRO_BLUE] = vcl::bitmap::premultiply(a, b); + true_data[SVP_CAIRO_GREEN] = vcl::bitmap::premultiply(a, g); + true_data[SVP_CAIRO_RED] = vcl::bitmap::premultiply(a, r); +#else sal_uInt8 b = unpremultiply_table[a][true_data[SVP_CAIRO_BLUE]] ^ unpremultiply_table[xor_a][xor_data[SVP_CAIRO_BLUE]]; sal_uInt8 g = unpremultiply_table[a][true_data[SVP_CAIRO_GREEN]] ^ @@ -2618,6 +2647,7 @@ void SvpSalGraphics::releaseCairoContext(cairo_t* cr, bool bXorModeAllowed, cons true_data[SVP_CAIRO_BLUE] = premultiply_table[a][b]; true_data[SVP_CAIRO_GREEN] = premultiply_table[a][g]; true_data[SVP_CAIRO_RED] = premultiply_table[a][r]; +#endif true_data+=4; xor_data+=4; } diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx index 32204a4a2bb1..9e31384aea03 100644 --- a/vcl/source/bitmap/BitmapTools.cxx +++ b/vcl/source/bitmap/BitmapTools.cxx @@ -289,7 +289,9 @@ BitmapEx* CreateFromCairoSurface(Size aSize, cairo_surface_t * pSurface) cairo_surface_flush(pPixels); unsigned char *pSrc = cairo_image_surface_get_data( pPixels ); unsigned int nStride = cairo_image_surface_get_stride( pPixels ); +#ifndef ENABLE_WASM_STRIP_PREMULTIPLY vcl::bitmap::lookup_table const & unpremultiply_table = vcl::bitmap::get_unpremultiply_table(); +#endif for( tools::Long y = 0; y < aSize.Height(); y++ ) { sal_uInt32 *pPix = reinterpret_cast(pSrc + nStride * y); @@ -309,9 +311,15 @@ BitmapEx* CreateFromCairoSurface(Size aSize, cairo_surface_t * pSurface) if( nAlpha != 0 && nAlpha != 255 ) { // Cairo uses pre-multiplied alpha - we do not => re-multiply +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + nR = vcl::bitmap::unpremultiply(nAlpha, nR); + nG = vcl::bitmap::unpremultiply(nAlpha, nG); + nB = vcl::bitmap::unpremultiply(nAlpha, nB); +#else nR = unpremultiply_table[nAlpha][nR]; nG = unpremultiply_table[nAlpha][nG]; nB = unpremultiply_table[nAlpha][nB]; +#endif } pRGBWrite->SetPixel( y, x, BitmapColor( nR, nG, nB ) ); pMaskWrite->SetPixelIndex( y, x, 255 - nAlpha ); @@ -682,7 +690,9 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un ::Color aColor; unsigned int nAlpha = 255; +#ifndef ENABLE_WASM_STRIP_PREMULTIPLY vcl::bitmap::lookup_table const & premultiply_table = vcl::bitmap::get_premultiply_table(); +#endif for( nY = 0; nY < nHeight; nY++ ) { ::Scanline pReadScan; @@ -711,16 +721,28 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un aColor = pBitmapReadAcc->GetPaletteColor(*pReadScan++); #ifdef OSL_BIGENDIAN +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, aColor.GetRed()); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, aColor.GetGreen()); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, aColor.GetBlue()); +#else data[ nOff++ ] = premultiply_table[nAlpha][aColor.GetRed()]; data[ nOff++ ] = premultiply_table[nAlpha][aColor.GetGreen()]; data[ nOff++ ] = premultiply_table[nAlpha][aColor.GetBlue()]; +#endif +#else +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, aColor.GetBlue()); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, aColor.GetGreen()); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, aColor.GetRed()); #else data[ nOff++ ] = premultiply_table[nAlpha][aColor.GetBlue()]; data[ nOff++ ] = premultiply_table[nAlpha][aColor.GetGreen()]; data[ nOff++ ] = premultiply_table[nAlpha][aColor.GetRed()]; +#endif nOff++; #endif - } + } break; case ScanlineFormat::N24BitTcBgr: pReadScan = pBitmapReadAcc->GetScanline( nY ); @@ -735,18 +757,30 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un nAlpha = data[ nOff ]; else nAlpha = data[ nOff ] = 255; +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + data[ nOff + 3 ] = vcl::bitmap::premultiply(nAlpha, *pReadScan++); + data[ nOff + 2 ] = vcl::bitmap::premultiply(nAlpha, *pReadScan++); + data[ nOff + 1 ] = vcl::bitmap::premultiply(nAlpha, *pReadScan++); +#else data[ nOff + 3 ] = premultiply_table[nAlpha][*pReadScan++]; data[ nOff + 2 ] = premultiply_table[nAlpha][*pReadScan++]; data[ nOff + 1 ] = premultiply_table[nAlpha][*pReadScan++]; +#endif nOff += 4; #else if( pAlphaReadAcc ) nAlpha = data[ nOff + 3 ]; else nAlpha = data[ nOff + 3 ] = 255; +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, *pReadScan++); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, *pReadScan++); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, *pReadScan++); +#else data[ nOff++ ] = premultiply_table[nAlpha][*pReadScan++]; data[ nOff++ ] = premultiply_table[nAlpha][*pReadScan++]; data[ nOff++ ] = premultiply_table[nAlpha][*pReadScan++]; +#endif nOff++; #endif } @@ -764,17 +798,29 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un nAlpha = data[ nOff++ ]; else nAlpha = data[ nOff++ ] = 255; +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, *pReadScan++); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, *pReadScan++); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, *pReadScan++); +#else data[ nOff++ ] = premultiply_table[nAlpha][*pReadScan++]; data[ nOff++ ] = premultiply_table[nAlpha][*pReadScan++]; data[ nOff++ ] = premultiply_table[nAlpha][*pReadScan++]; +#endif #else if( pAlphaReadAcc ) nAlpha = data[ nOff + 3 ]; else nAlpha = data[ nOff + 3 ] = 255; +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, pReadScan[ 2 ]); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, pReadScan[ 1 ]); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, pReadScan[ 0 ]); +#else data[ nOff++ ] = premultiply_table[nAlpha][pReadScan[ 2 ]]; data[ nOff++ ] = premultiply_table[nAlpha][pReadScan[ 1 ]]; data[ nOff++ ] = premultiply_table[nAlpha][pReadScan[ 0 ]]; +#endif pReadScan += 3; nOff++; #endif @@ -793,18 +839,30 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un nAlpha = data[ nOff++ ]; else nAlpha = data[ nOff++ ] = 255; +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, pReadScan[ 2 ]); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, pReadScan[ 1 ]); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, pReadScan[ 0 ]); +#else data[ nOff++ ] = premultiply_table[nAlpha][pReadScan[ 2 ]]; data[ nOff++ ] = premultiply_table[nAlpha][pReadScan[ 1 ]]; data[ nOff++ ] = premultiply_table[nAlpha][pReadScan[ 0 ]]; +#endif pReadScan += 4; #else if( pAlphaReadAcc ) nAlpha = data[ nOff + 3 ]; else nAlpha = data[ nOff + 3 ] = 255; +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, *pReadScan++); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, *pReadScan++); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, *pReadScan++); +#else data[ nOff++ ] = premultiply_table[nAlpha][*pReadScan++]; data[ nOff++ ] = premultiply_table[nAlpha][*pReadScan++]; data[ nOff++ ] = premultiply_table[nAlpha][*pReadScan++]; +#endif pReadScan++; nOff++; #endif @@ -823,18 +881,30 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un nAlpha = data[ nOff ++ ]; else nAlpha = data[ nOff ++ ] = 255; +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, *pReadScan++); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, *pReadScan++); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, *pReadScan++); +#else data[ nOff++ ] = premultiply_table[nAlpha][*pReadScan++]; data[ nOff++ ] = premultiply_table[nAlpha][*pReadScan++]; data[ nOff++ ] = premultiply_table[nAlpha][*pReadScan++]; +#endif pReadScan++; #else if( pAlphaReadAcc ) nAlpha = data[ nOff + 3 ]; else nAlpha = data[ nOff + 3 ] = 255; +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, pReadScan[ 2 ]); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, pReadScan[ 1 ]); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, pReadScan[ 0 ]); +#else data[ nOff++ ] = premultiply_table[nAlpha][pReadScan[ 2 ]]; data[ nOff++ ] = premultiply_table[nAlpha][pReadScan[ 1 ]]; data[ nOff++ ] = premultiply_table[nAlpha][pReadScan[ 0 ]]; +#endif pReadScan += 4; nOff++; #endif @@ -858,17 +928,29 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un nAlpha = data[ nOff++ ]; else nAlpha = data[ nOff++ ] = 255; +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, aColor.GetRed()); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, aColor.GetGreen()); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, aColor.GetBlue()); +#else data[ nOff++ ] = premultiply_table[nAlpha][aColor.GetRed()]; data[ nOff++ ] = premultiply_table[nAlpha][aColor.GetGreen()]; data[ nOff++ ] = premultiply_table[nAlpha][aColor.GetBlue()]; +#endif #else if( pAlphaReadAcc ) nAlpha = data[ nOff + 3 ]; else nAlpha = data[ nOff + 3 ] = 255; +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, aColor.GetBlue()); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, aColor.GetGreen()); + data[ nOff++ ] = vcl::bitmap::premultiply(nAlpha, aColor.GetRed()); +#else data[ nOff++ ] = premultiply_table[nAlpha][aColor.GetBlue()]; data[ nOff++ ] = premultiply_table[nAlpha][aColor.GetGreen()]; data[ nOff++ ] = premultiply_table[nAlpha][aColor.GetRed()]; +#endif nOff ++; #endif } @@ -1032,6 +1114,17 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un return bRet; } +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + sal_uInt8 unpremultiply(sal_uInt8 c, sal_uInt8 a) + { + return (a == 0) ? 0 : (c * 255 + a / 2) / a; + } + + sal_uInt8 premultiply(sal_uInt8 c, sal_uInt8 a) + { + return (c * a + 127) / 255; + } +#else sal_uInt8 unpremultiply(sal_uInt8 c, sal_uInt8 a) { return get_unpremultiply_table()[a][c]; @@ -1089,6 +1182,7 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un std::make_integer_sequence{}); return premultiply_table; } +#endif bool convertBitmap32To24Plus8(BitmapEx const & rInput, BitmapEx & rResult) { diff --git a/vcl/source/filter/png/PngImageReader.cxx b/vcl/source/filter/png/PngImageReader.cxx index 6631c238629e..f1c501dfca4a 100644 --- a/vcl/source/filter/png/PngImageReader.cxx +++ b/vcl/source/filter/png/PngImageReader.cxx @@ -287,7 +287,9 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, png_read_row(pPng, pScanline, nullptr); } } +#ifndef ENABLE_WASM_STRIP_PREMULTIPLY const vcl::bitmap::lookup_table& premultiply = vcl::bitmap::get_premultiply_table(); +#endif if (eFormat == ScanlineFormat::N32BitTcAbgr || eFormat == ScanlineFormat::N32BitTcArgb) { // alpha first and premultiply for (png_uint_32 y = 0; y < height; y++) @@ -296,9 +298,15 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, for (size_t i = 0; i < aRowSizeBytes; i += 4) { const sal_uInt8 alpha = pScanline[i + 3]; +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + pScanline[i + 3] = vcl::bitmap::premultiply(alpha, pScanline[i + 2]); + pScanline[i + 2] = vcl::bitmap::premultiply(alpha, pScanline[i + 1]); + pScanline[i + 1] = vcl::bitmap::premultiply(alpha, pScanline[i]); +#else pScanline[i + 3] = premultiply[alpha][pScanline[i + 2]]; pScanline[i + 2] = premultiply[alpha][pScanline[i + 1]]; pScanline[i + 1] = premultiply[alpha][pScanline[i]]; +#endif pScanline[i] = alpha; } } @@ -311,9 +319,15 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, for (size_t i = 0; i < aRowSizeBytes; i += 4) { const sal_uInt8 alpha = pScanline[i + 3]; +#ifdef ENABLE_WASM_STRIP_PREMULTIPLY + pScanline[i] = vcl::bitmap::premultiply(alpha, pScanline[i]); + pScanline[i + 1] = vcl::bitmap::premultiply(alpha, pScanline[i + 1]); + pScanline[i + 2] = vcl::bitmap::premultiply(alpha, pScanline[i + 2]); +#else pScanline[i] = premultiply[alpha][pScanline[i]]; pScanline[i + 1] = premultiply[alpha][pScanline[i + 1]]; pScanline[i + 2] = premultiply[alpha][pScanline[i + 2]]; +#endif } } } diff --git a/vcl/source/helper/svtaccessiblefactory.cxx b/vcl/source/helper/svtaccessiblefactory.cxx index d999dd1eba3f..ec07912fd177 100644 --- a/vcl/source/helper/svtaccessiblefactory.cxx +++ b/vcl/source/helper/svtaccessiblefactory.cxx @@ -18,6 +18,7 @@ */ #include +#include #include #include @@ -41,7 +42,9 @@ namespace vcl oslModule s_hAccessibleImplementationModule = nullptr; #endif #if HAVE_FEATURE_DESKTOP +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY GetSvtAccessibilityComponentFactory s_pAccessibleFactoryFunc = nullptr; +#endif #endif ::rtl::Reference< IAccessibleFactory > s_pFactory; @@ -206,6 +209,7 @@ namespace vcl { } +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY #if HAVE_FEATURE_DESKTOP #ifndef DISABLE_DYNLOADING extern "C" { static void thisModule() {} } @@ -213,6 +217,7 @@ namespace vcl extern "C" void* getSvtAccessibilityComponentFactory(); #endif #endif // HAVE_FEATURE_DESKTOP +#endif // ENABLE_WASM_STRIP_ACCESSIBILITY void AccessibleFactoryAccess::ensureInitialized() { @@ -221,6 +226,7 @@ namespace vcl ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); +#ifndef ENABLE_WASM_STRIP_ACCESSIBILITY #if HAVE_FEATURE_DESKTOP // load the library implementing the factory if (!s_pFactory) @@ -252,6 +258,7 @@ namespace vcl } } #endif // HAVE_FEATURE_DESKTOP +#endif // ENABLE_WASM_STRIP_ACCESSIBILITY if (!s_pFactory) // the attempt to load the lib, or to create the factory, failed diff --git a/writerperfect/Library_wpftwriter.mk b/writerperfect/Library_wpftwriter.mk index 8993cca31490..516e96770c3c 100644 --- a/writerperfect/Library_wpftwriter.mk +++ b/writerperfect/Library_wpftwriter.mk @@ -26,6 +26,10 @@ $(eval $(call gb_Library_set_include,wpftwriter,\ $(eval $(call gb_Library_set_componentfile,wpftwriter,writerperfect/source/writer/wpftwriter)) +ifneq ($(ENABLE_WASM_STRIP_EPUB),TRUE) +$(eval $(call gb_Library_set_componentfile,wpftwriter,writerperfect/source/writer/wpftwriter.extended)) +endif + $(eval $(call gb_Library_use_sdk_api,wpftwriter)) $(eval $(call gb_Library_use_common_precompiled_header,wpftwriter)) @@ -50,11 +54,16 @@ $(eval $(call gb_Library_use_libraries,wpftwriter,\ xo \ )) +ifneq ($(ENABLE_WASM_STRIP_EPUB),TRUE) +$(eval $(call gb_Library_use_externals,wpftwriter,\ + epubgen \ +)) +endif + $(eval $(call gb_Library_use_externals,wpftwriter,\ abw \ boost_headers \ ebook \ - epubgen \ etonyek \ icu_headers \ icui18n \ @@ -71,13 +80,18 @@ $(eval $(call gb_Library_use_externals,wpftwriter,\ zlib \ )) +ifneq ($(ENABLE_WASM_STRIP_EPUB),TRUE) $(eval $(call gb_Library_add_exception_objects,wpftwriter,\ - writerperfect/source/writer/AbiWordImportFilter \ - writerperfect/source/writer/EBookImportFilter \ writerperfect/source/writer/EPUBExportDialog \ writerperfect/source/writer/EPUBExportFilter \ writerperfect/source/writer/EPUBExportUIComponent \ writerperfect/source/writer/EPUBPackage \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,wpftwriter,\ + writerperfect/source/writer/AbiWordImportFilter \ + writerperfect/source/writer/EBookImportFilter \ writerperfect/source/writer/MSWorksImportFilter \ writerperfect/source/writer/MWAWImportFilter \ writerperfect/source/writer/PagesImportFilter \ diff --git a/writerperfect/source/writer/wpftwriter.component b/writerperfect/source/writer/wpftwriter.component index 8ab436634052..ace6b687363c 100644 --- a/writerperfect/source/writer/wpftwriter.component +++ b/writerperfect/source/writer/wpftwriter.component @@ -53,12 +53,4 @@ - - - - - - diff --git a/writerperfect/source/writer/wpftwriter.extended.component b/writerperfect/source/writer/wpftwriter.extended.component new file mode 100644 index 000000000000..fa7ef541dc51 --- /dev/null +++ b/writerperfect/source/writer/wpftwriter.extended.component @@ -0,0 +1,29 @@ + + + + + + + + + + diff --git a/xmloff/Library_xo.mk b/xmloff/Library_xo.mk index b33455b3c464..f6b53023d42a 100644 --- a/xmloff/Library_xo.mk +++ b/xmloff/Library_xo.mk @@ -21,6 +21,11 @@ $(eval $(call gb_Library_Library,xo)) $(eval $(call gb_Library_set_componentfile,xo,xmloff/util/xo)) +# WASM_CHART change +ifneq ($(ENABLE_WASM_STRIP_CHART),TRUE) +$(eval $(call gb_Library_set_componentfile,xo,xmloff/util/xo.extended)) +endif + $(eval $(call gb_Library_set_precompiled_header,xo,xmloff/inc/pch/precompiled_xo)) $(eval $(call gb_Library_set_include,xo,\ @@ -56,6 +61,8 @@ $(eval $(call gb_Library_use_libraries,xo,\ vcl \ )) +# WASM_CHART change +ifneq ($(ENABLE_WASM_STRIP_CHART),TRUE) $(eval $(call gb_Library_add_exception_objects,xo,\ xmloff/source/chart/ColorPropertySet \ xmloff/source/chart/PropertyMaps \ @@ -87,6 +94,10 @@ $(eval $(call gb_Library_add_exception_objects,xo,\ xmloff/source/chart/XMLTextOrientationHdl \ xmloff/source/chart/contexts \ xmloff/source/chart/transporttypes \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,xo,\ xmloff/source/core/DocumentSettingsContext \ xmloff/source/core/DomBuilderContext \ xmloff/source/core/DomExport \ diff --git a/xmloff/Library_xof.mk b/xmloff/Library_xof.mk index 350f2cf0910a..7e1a4dd562c7 100644 --- a/xmloff/Library_xof.mk +++ b/xmloff/Library_xof.mk @@ -21,6 +21,11 @@ $(eval $(call gb_Library_Library,xof)) $(eval $(call gb_Library_set_componentfile,xof,xmloff/source/transform/xof)) +# WASM_CHART change +ifneq ($(ENABLE_WASM_STRIP_CHART),TRUE) +$(eval $(call gb_Library_set_componentfile,xof,xmloff/source/transform/xof.extended)) +endif + $(eval $(call gb_Library_set_include,xof,\ -I$(SRCDIR)/xmloff/inc \ $$(INCLUDE) \ @@ -47,11 +52,19 @@ $(eval $(call gb_Library_use_libraries,xof,\ xo \ )) +# WASM_CHART change +ifneq ($(ENABLE_WASM_STRIP_CHART),TRUE) $(eval $(call gb_Library_add_exception_objects,xof,\ xmloff/source/transform/ChartOASISTContext \ xmloff/source/transform/ChartOOoTContext \ xmloff/source/transform/ChartPlotAreaOASISTContext \ xmloff/source/transform/ChartPlotAreaOOoTContext \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,xof,\ + xmloff/source/transform/OOo2Oasis \ + xmloff/source/transform/Oasis2OOo \ xmloff/source/transform/ControlOASISTContext \ xmloff/source/transform/ControlOOoTContext \ xmloff/source/transform/CreateElemTContext \ @@ -71,8 +84,6 @@ $(eval $(call gb_Library_add_exception_objects,xof,\ xmloff/source/transform/MetaTContext \ xmloff/source/transform/MutableAttrList \ xmloff/source/transform/NotesTContext \ - xmloff/source/transform/OOo2Oasis \ - xmloff/source/transform/Oasis2OOo \ xmloff/source/transform/PersAttrListTContext \ xmloff/source/transform/PersMixedContentTContext \ xmloff/source/transform/ProcAddAttrTContext \ diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index d355e4a0ff28..11ef839d574f 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include #include @@ -1739,7 +1741,14 @@ XMLPageExport* SvXMLExport::CreatePageExport() SchXMLExportHelper* SvXMLExport::CreateChartExport() { +// WASM_CHART change +// TODO: With Chart extracted this cannot really happen since +// no Chart could've been added at all +#ifndef ENABLE_WASM_STRIP_CHART return new SchXMLExportHelper(*this, *GetAutoStylePool()); +#else + return nullptr; +#endif } XMLFontAutoStylePool* SvXMLExport::CreateFontAutoStylePool() diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index d3973c87e16c..f4d88bb41c0d 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include @@ -1081,7 +1083,16 @@ XMLShapeImportHelper* SvXMLImport::CreateShapeImport() SchXMLImportHelper* SvXMLImport::CreateChartImport() { +// WASM_CHART change +// TODO: Instead of importing the ChartModel 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 +#ifndef ENABLE_WASM_STRIP_CHART return new SchXMLImportHelper(); +#else + return nullptr; +#endif } ::xmloff::OFormLayerXMLImport* SvXMLImport::CreateFormImport() diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index e68bf388325f..692743f1453d 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include #include @@ -1165,7 +1167,14 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x OUString sCLSID; if(xPropSet->getPropertyValue("CLSID") >>= sCLSID) { +#ifndef ENABLE_WASM_STRIP_CHART + // WASM_CHART change + // TODO: With Chart extracted this cannot really happen since + // no Chart could've been added at all if (sCLSID == mrExport.GetChartExport()->getChartCLSID() || +#else + if( +#endif sCLSID == SvGlobalName( SO3_RPTCH_CLASSID ).GetHexName() ) { eShapeType = XmlShapeTypeDrawChartShape; diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index a1fdad1cc41c..b38b616d983d 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include @@ -2450,7 +2452,13 @@ void SdXMLChartShapeContext::startFastElement (sal_Int32 nElement, uno::Reference< frame::XModel > xChartModel; if( aAny >>= xChartModel ) { +#ifndef ENABLE_WASM_STRIP_CHART + // WASM_CHART change + // TODO: Maybe use SdXMLGraphicObjectShapeContext completely instead + // or try to create as mbIsPlaceholder object adding a Chart visuailzation + // that should be available somehow mxChartContext.set( GetImport().GetChartImport()->CreateChartContext( GetImport(), xChartModel ) ); +#endif } } } diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index 9453e1963729..2f8f7c2ed7ec 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include @@ -423,10 +425,12 @@ SvXMLStyleContext *SvXMLStylesContext::CreateStyleStyleChildContext( case XmlStyleFamily::TEXT_RUBY: pStyle = new XMLPropStyleContext( GetImport(), *this, nFamily ); break; +#ifndef ENABLE_WASM_STRIP_CHART + // WASM_CHART change case XmlStyleFamily::SCH_CHART_ID: pStyle = new XMLChartStyleContext( GetImport(), *this, nFamily ); break; - +#endif case XmlStyleFamily::SD_GRAPHICS_ID: case XmlStyleFamily::SD_PRESENTATION_ID: case XmlStyleFamily::SD_POOL_ID: @@ -562,6 +566,8 @@ rtl::Reference < SvXMLImportPropertyMapper > SvXMLStylesContext::GetImportProper } xMapper = mxShapeImpPropMapper; break; +#ifndef ENABLE_WASM_STRIP_CHART + // WASM_CHART change case XmlStyleFamily::SCH_CHART_ID: if( ! mxChartImpPropMapper.is() ) { @@ -570,6 +576,7 @@ rtl::Reference < SvXMLImportPropertyMapper > SvXMLStylesContext::GetImportProper } xMapper = mxChartImpPropMapper; break; +#endif case XmlStyleFamily::PAGE_MASTER: if( ! mxPageImpPropMapper.is() ) { diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index 5495864bf120..579b151ac85d 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include #include #include @@ -1552,14 +1554,16 @@ XMLTransformerContext *OOo2OasisTransformer::CreateUserDefinedContext( return new XMLControlOOoTransformerContext( *this, rQName ); case XML_ETACTION_FORM_PROPERTY: return new XMLFormPropOOoTransformerContext( *this, rQName ); +#ifndef ENABLE_WASM_STRIP_CHART case XML_ETACTION_CHART: return new XMLChartOOoTransformerContext( *this, rQName ); + case XML_ETACTION_CHART_PLOT_AREA: + return new XMLChartPlotAreaOOoTContext( *this, rQName ); +#endif case XML_ETACTION_TRACKED_CHANGES: return new XMLTrackedChangesOOoTContext_Impl( *this, rQName, rAction.GetQNamePrefixFromParam1(), rAction.GetQNameTokenFromParam1() ); - case XML_ETACTION_CHART_PLOT_AREA: - return new XMLChartPlotAreaOOoTContext( *this, rQName ); case XML_ETACTION_TABLE: return new XMLTableOOoTransformerContext_Impl( *this, rQName ); default: diff --git a/xmloff/source/transform/xof.component b/xmloff/source/transform/xof.component index b7c5d3f5ebcb..2179d38662ab 100644 --- a/xmloff/source/transform/xof.component +++ b/xmloff/source/transform/xof.component @@ -39,18 +39,6 @@ constructor="xmloff_XMLCalcStylesImportOOO_get_implementation"> - - - - - - - - - @@ -99,14 +87,6 @@ constructor="xmloff_XMLMathSettingsImportOOO_get_implementation"> - - - - - - diff --git a/xmloff/source/transform/xof.extended.component b/xmloff/source/transform/xof.extended.component new file mode 100644 index 000000000000..2d52372ff09e --- /dev/null +++ b/xmloff/source/transform/xof.extended.component @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component index db63a5cd0519..64381044efdd 100644 --- a/xmloff/util/xo.component +++ b/xmloff/util/xo.component @@ -19,50 +19,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xmloff/util/xo.extended.component b/xmloff/util/xo.extended.component new file mode 100644 index 000000000000..41fce7c6ec2d --- /dev/null +++ b/xmloff/util/xo.extended.component @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit