diff options
117 files changed, 1246 insertions, 131 deletions
diff --git a/Repository.mk b/Repository.mk index 4cf3aa6d3f48..5c164d73729d 100644 --- a/Repository.mk +++ b/Repository.mk @@ -17,13 +17,18 @@ # the License at http://www.apache.org/licenses/LICENSE-2.0 . # +ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE) +$(eval $(call gb_Helper_register_executables,NONE, \ + canvasdemo \ +)) +endif + $(eval $(call gb_Helper_register_executables,NONE, \ $(call gb_Helper_optional,HELPTOOLS, \ HelpIndexer \ HelpLinker \ ) \ bestreversemap \ - canvasdemo \ cfgex \ concat-deps \ cpp \ @@ -93,6 +98,12 @@ $(eval $(call gb_Helper_register_executables_for_install,SDK,sdk, \ $(if $(filter ODK,$(BUILD_TYPE)),uno-skeletonmaker) \ )) +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) +$(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \ + $(if $(filter-out ANDROID HAIKU iOS MACOSX WNT,$(OS)),oosplash) \ +)) +endif + $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \ $(if $(ENABLE_ONLINE_UPDATE_MAR),\ mar \ @@ -147,7 +158,6 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \ $(call gb_Helper_optional,FUZZERS,htmlfuzzer) \ $(call gb_Helper_optional,FUZZERS,sftfuzzer) \ $(call gb_Helper_optional,FUZZERS,dbffuzzer) \ - $(if $(filter-out ANDROID HAIKU iOS MACOSX WNT,$(OS)),oosplash) \ soffice_bin \ $(call gb_CondExeUnopkg, \ unopkg_bin \ @@ -324,6 +334,37 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ogltrans, \ OGLTrans \ )) +ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE) +$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ + canvastools \ + $(if $(ENABLE_CAIRO_CANVAS),cairocanvas) \ + canvasfactory \ + cppcanvas \ + $(if $(filter WNT,$(OS)),directx9canvas) \ + $(if $(ENABLE_OPENGL_CANVAS),oglcanvas) \ + $(if $(filter WNT,$(OS)),gdipluscanvas) \ + simplecanvas \ + vclcanvas \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_GUESSLANG),TRUE) +$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ + guesslang \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE) +$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ + hyphen \ + lnth \ + spell \ + $(if $(filter iOS MACOSX,$(OS)), \ + MacOSXSpell \ + ) \ +)) +endif + $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ avmedia \ $(call gb_Helper_optional,AVMEDIA, \ @@ -337,14 +378,10 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ ) \ basegfx \ bib \ - $(if $(ENABLE_CAIRO_CANVAS),cairocanvas) \ - canvasfactory \ - canvastools \ chartcore \ chartcontroller \ $(call gb_Helper_optional,OPENCL,clew) \ $(if $(filter $(OS),WNT),,cmdmail) \ - cppcanvas \ configmgr \ ctl \ dba \ @@ -356,8 +393,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ deploymentmisc \ $(if $(filter-out MACOSX WNT,$(OS)),desktopbe1) \ $(call gb_Helper_optional,SCRIPTING,dlgprov) \ - $(if $(filter WNT,$(OS)),directx9canvas) \ - $(if $(ENABLE_OPENGL_CANVAS),oglcanvas) \ drawinglayercore \ drawinglayer \ editeng \ @@ -374,19 +409,15 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ frm \ fsstorage \ fwk \ - $(if $(filter WNT,$(OS)),gdipluscanvas) \ - guesslang \ $(call gb_Helper_optionals_or,HELPTOOLS XMLHELP,helplinker) \ i18npool \ i18nsearch \ - hyphen \ $(if $(ENABLE_JAVA),jdbc) \ $(if $(ENABLE_LDAP),ldapbe2) \ $(if $(filter WNT,$(OS)),WinUserInfoBe) \ localebe1 \ log \ lng \ - lnth \ $(if $(filter $(OS),MACOSX),macbe1) \ $(if $(MERGELIBS),merged) \ migrationoo2 \ @@ -415,11 +446,9 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ sdd \ sdfilt \ sfx \ - simplecanvas \ slideshow \ sot \ - spell \ - $(if $(DISABLE_GUI),,spl) \ + $(if $(or $(DISABLE_GUI),$(ENABLE_WASM_STRIP_SPLASH)),,spl) \ storagefd \ $(call gb_Helper_optional,SCRIPTING,stringresource) \ svgio \ @@ -449,7 +478,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ vbahelper \ ) \ vcl \ - vclcanvas \ writerperfect \ xmlscript \ xmlfa \ @@ -470,9 +498,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ ) \ fps_aqua \ ) \ - $(if $(filter iOS MACOSX,$(OS)), \ - MacOSXSpell \ - ) \ )) $(eval $(call gb_Helper_register_plugins_for_install,OOOLIBS,ooo, \ @@ -606,6 +631,14 @@ $(eval $(call gb_Helper_register_plugins_for_install,PRIVATELIBS_URE,ure, \ $(call gb_CondLibSalTextenc,sal_textenc) \ )) +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) +$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \ + $(if $(filter WNT,$(OS)), \ + winaccessibility \ + ) \ +)) +endif + $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \ $(call gb_Helper_optional,AVMEDIA, \ $(if $(ENABLE_GSTREAMER_1_0),avmediagst) \ @@ -650,7 +683,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \ fps \ inprocserv \ UAccCOM \ - winaccessibility \ ) \ )) @@ -884,6 +916,18 @@ $(eval $(call gb_Helper_register_packages_for_install,sdk,\ ) \ )) +ifneq ($(ENABLE_WASM_STRIP_PINGUSER),TRUE) +$(eval $(call gb_Helper_register_packages_for_install,ooo,\ + tipoftheday_images \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE) +$(eval $(call gb_Helper_register_packages_for_install,ooo,\ + $(if $(ENABLE_OPENGL_CANVAS),canvas_opengl_shader) \ +)) +endif + $(eval $(call gb_Helper_register_packages_for_install,ooo,\ $(if $(SYSTEM_LIBEXTTEXTCAT),,libexttextcat_fingerprint) \ officecfg_misc \ @@ -968,13 +1012,11 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\ wizards_basicusr \ wizards_properties \ wizards_wizardshare \ - tipoftheday_images \ toolbarmode_images \ vcl_theme_definitions \ $(if $(filter WNT,$(OS)), \ vcl_opengl_denylist \ ) \ - $(if $(ENABLE_OPENGL_CANVAS),canvas_opengl_shader) \ $(if $(filter SKIA,$(BUILD_TYPE)), \ vcl_skia_denylist ) \ $(if $(DISABLE_PYTHON),,$(if $(filter-out AIX,$(OS)), \ @@ -1165,9 +1207,14 @@ $(eval $(call gb_Helper_register_mos,\ )) # UI configuration +ifneq ($(ENABLE_WASM_STRIP_DBACCESS),TRUE) $(eval $(call gb_Helper_register_uiconfigs,\ - cui \ $(call gb_Helper_optional,DBCONNECTIVITY,dbaccess) \ +)) +endif + +$(eval $(call gb_Helper_register_uiconfigs,\ + cui \ desktop \ editeng \ filter \ diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index e29847e4eff1..dc9276a40641 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -567,6 +567,7 @@ endef gb_ExternalProject__use_hunspell := else # !SYSTEM_HUNSPELL +ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE) define gb_LinkTarget__use_hunspell $(call gb_LinkTarget_add_defs,$(1),\ @@ -594,6 +595,7 @@ $(call gb_ExternalProject_use_external_project,$(1),hunspell) endef +endif # ENABLE_WASM_STRIP_HUNSPELL endif # SYSTEM_HUNSPELL @@ -1762,6 +1764,7 @@ endef gb_ExternalProject__use_epubgen := else # !SYSTEM_EPUBGEN +ifneq ($(ENABLE_WASM_STRIP_EPUB),TRUE) define gb_LinkTarget__use_epubgen $(call gb_LinkTarget_set_include,$(1),\ @@ -1779,6 +1782,7 @@ $(call gb_ExternalProject_use_external_project,$(1),libepubgen) endef +endif # ENABLE_WASM_STRIP_EPUB endif # SYSTEM_EPUBGEN ifneq ($(SYSTEM_REVENGE),) diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk index 041496c14ae4..49118cd6259d 100644 --- a/RepositoryModule_host.mk +++ b/RepositoryModule_host.mk @@ -20,31 +20,58 @@ $(eval $(call gb_Module_add_targets,libreoffice,\ )) endif +# WASM_CHART change +ifneq ($(ENABLE_WASM_STRIP_CHART),TRUE) +$(eval $(call gb_Module_add_moduledirs,libreoffice,\ + chart2 \ +)) +endif + +# WASM_CANVAS change +ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE) +$(eval $(call gb_Module_add_moduledirs,libreoffice,\ + canvas \ + cppcanvas \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_DBACCESS),TRUE) +$(eval $(call gb_Module_add_moduledirs,libreoffice,\ + dbaccess \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) $(eval $(call gb_Module_add_moduledirs,libreoffice,\ accessibility \ + winaccessibility \ +)) +endif + +$(eval $(call gb_Module_add_moduledirs,libreoffice,\ android \ + $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \ animations \ + ) \ apple_remote \ avmedia \ + $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \ basctl \ + ) \ basegfx \ basic \ bean \ binaryurp \ bridges \ - canvas \ - chart2 \ cli_ure \ codemaker \ comphelper \ configmgr \ connectivity \ - cppcanvas \ cppu \ cppuhelper \ cpputools \ cui \ - dbaccess \ desktop \ $(call gb_Helper_optional,DICTIONARIES,dictionaries) \ drawinglayer \ @@ -103,22 +130,30 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\ sal \ salhelper \ sax \ + $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \ sc \ scaddins \ sccomp \ + ) \ $(call gb_Helper_optional,DESKTOP,scp2) \ scripting \ + $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \ sd \ sdext \ + ) \ $(call gb_Helper_optional,DESKTOP,setup_native) \ sfx2 \ shell \ + $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \ slideshow \ + ) \ smoketest \ solenv \ soltools \ sot \ + $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \ starmath \ + ) \ $(if $(ENABLE_CUSTOMTARGET_COMPONENTS),static) \ stoc \ store \ @@ -149,7 +184,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\ uui \ vbahelper \ vcl \ - winaccessibility \ wizards \ writerfilter \ writerperfect \ diff --git a/basctl/Library_basctl.mk b/basctl/Library_basctl.mk index 32ebe55c2bb3..693ac39cc0e1 100644 --- a/basctl/Library_basctl.mk +++ b/basctl/Library_basctl.mk @@ -62,9 +62,14 @@ $(eval $(call gb_Library_use_libraries,basctl,\ xmlscript \ )) +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) $(eval $(call gb_Library_add_exception_objects,basctl,\ basctl/source/accessibility/accessibledialogcontrolshape \ basctl/source/accessibility/accessibledialogwindow \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,basctl,\ basctl/source/basicide/basdoc \ basctl/source/basicide/IDEComboBox \ basctl/source/basicide/basicrenderable \ diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk index f73d335eca69..b7c449cef582 100644 --- a/chart2/Library_chartcontroller.mk +++ b/chart2/Library_chartcontroller.mk @@ -52,6 +52,7 @@ $(eval $(call gb_Library_use_libraries,chartcontroller,\ $(eval $(call gb_Library_set_componentfile,chartcontroller,chart2/source/controller/chartcontroller,services)) +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) $(eval $(call gb_Library_add_exception_objects,chartcontroller,\ chart2/source/controller/accessibility/AccessibleBase \ chart2/source/controller/accessibility/AccessibleChartElement \ @@ -60,6 +61,10 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\ chart2/source/controller/accessibility/AccessibleTextHelper \ chart2/source/controller/accessibility/AccessibleViewForwarder \ chart2/source/controller/accessibility/ChartElementFactory \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,chartcontroller,\ chart2/source/controller/chartapiwrapper/AreaWrapper \ chart2/source/controller/chartapiwrapper/AxisWrapper \ chart2/source/controller/chartapiwrapper/Chart2ModelContact \ diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index adc7b3cb0dda..1f893e3e1fc5 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <ChartController.hxx> #include <ResId.hxx> diff --git a/config_host.mk.in b/config_host.mk.in index ee7d7cbce492..bec47fe80b15 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -211,7 +211,22 @@ export ENABLE_SKIA_DEBUG=@ENABLE_SKIA_DEBUG@ export ENABLE_SYMBOLS_FOR=@ENABLE_SYMBOLS_FOR@ export ENABLE_VALGRIND=@ENABLE_VALGRIND@ export ENABLE_WASM_EXCEPTIONS=@ENABLE_WASM_EXCEPTIONS@ -export ENABLE_WASM_STRIP=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_ACCESSIBILITY=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_CANVAS=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_CHART=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_DBACCESS=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_EPUB=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_EXTRA=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_GUESSLANG=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_HUNSPELL= +export ENABLE_WASM_STRIP_LOCALES=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_PINGUSER=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_PREMULTIPLY=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_RECENT=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_RECOVERYUI=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_SPLASH=@ENABLE_WASM_STRIP@ +export ENABLE_WASM_STRIP_SWEXPORTS=@ENABLE_WASM_STRIP@ export ENABLE_WERROR=@ENABLE_WERROR@ export ENABLE_Z7_DEBUG=@ENABLE_Z7_DEBUG@ export ENDIANNESS=@ENDIANNESS@ diff --git a/config_host/config_wasm_strip.h.in b/config_host/config_wasm_strip.h.in new file mode 100644 index 000000000000..3150a960995c --- /dev/null +++ b/config_host/config_wasm_strip.h.in @@ -0,0 +1,19 @@ +#ifndef CONFIG_FEATURE_WASM_STRIP_H +#define CONFIG_FEATURE_WASM_STRIP_H + +#define ENABLE_WASM_STRIP_ACCESSIBILITY 0 +#define ENABLE_WASM_STRIP_CANVAS 0 +#define ENABLE_WASM_STRIP_CHART 0 +#define ENABLE_WASM_STRIP_DBACCESS 0 +#define ENABLE_WASM_STRIP_EPUB 0 +#define ENABLE_WASM_STRIP_EXTRA 0 +#define ENABLE_WASM_STRIP_GUESSLANG 0 +#define ENABLE_WASM_STRIP_HUNSPELL 0 +#define ENABLE_WASM_STRIP_PINGUSER 0 +#define ENABLE_WASM_STRIP_PREMULTIPLY 0 +#define ENABLE_WASM_STRIP_RECENT 0 +#define ENABLE_WASM_STRIP_RECOVERYUI 0 +#define ENABLE_WASM_STRIP_SPLASH 0 +#define ENABLE_WASM_STRIP_SWEXPORTS 0 + +#endif diff --git a/configure.ac b/configure.ac index 7c168e154c4d..8aa4a58ed81e 100644 --- a/configure.ac +++ b/configure.ac @@ -3015,6 +3015,21 @@ if test "$enable_wasm_strip" = "yes"; then test "${with_fonts+set}" = set || with_fonts=yes test "${with_locales+set}" = set || with_locales=en + + AC_DEFINE(ENABLE_WASM_STRIP_ACCESSIBILITY) + AC_DEFINE(ENABLE_WASM_STRIP_CANVAS) + AC_DEFINE(ENABLE_WASM_STRIP_CHART) + AC_DEFINE(ENABLE_WASM_STRIP_DBACCESS) + AC_DEFINE(ENABLE_WASM_STRIP_EPUB) + AC_DEFINE(ENABLE_WASM_STRIP_EXTRA) + AC_DEFINE(ENABLE_WASM_STRIP_GUESSLANG) +# AC_DEFINE(ENABLE_WASM_STRIP_HUNSPELL) + AC_DEFINE(ENABLE_WASM_STRIP_PINGUSER) + AC_DEFINE(ENABLE_WASM_STRIP_PREMULTIPLY) + AC_DEFINE(ENABLE_WASM_STRIP_RECENT) + AC_DEFINE(ENABLE_WASM_STRIP_RECOVERYUI) + AC_DEFINE(ENABLE_WASM_STRIP_SPLASH) + AC_DEFINE(ENABLE_WASM_STRIP_SWEXPORTS) fi if test "$enable_wasm_exceptions" = yes; then @@ -14623,6 +14638,7 @@ AC_CONFIG_HEADERS([config_host/config_oauth2.h]) AC_CONFIG_HEADERS([config_host/config_poppler.h]) AC_CONFIG_HEADERS([config_host/config_python.h]) AC_CONFIG_HEADERS([config_host/config_writerperfect.h]) +AC_CONFIG_HEADERS([config_host/config_wasm_strip.h]) AC_CONFIG_HEADERS([solenv/lockfile/autoconf.h]) AC_OUTPUT diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index 295b8f2eed3f..8f8e73afe6cd 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -89,6 +89,18 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ )) endif +ifneq ($(ENABLE_WASM_STRIP_PINGUSER),TRUE) +$(eval $(call gb_Library_add_exception_objects,cui,\ + cui/source/dialogs/tipofthedaydlg \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE) +$(eval $(call gb_Library_add_exception_objects,cui,\ + cui/source/dialogs/hyphen \ +)) +endif + $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/customize/acccfg \ cui/source/customize/cfg \ @@ -122,9 +134,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\ cui/source/dialogs/hlmailtp \ cui/source/dialogs/hlmarkwn \ cui/source/dialogs/hltpbase \ - cui/source/dialogs/hyphen \ cui/source/dialogs/iconcdlg \ - cui/source/dialogs/tipofthedaydlg \ cui/source/dialogs/insdlg \ cui/source/dialogs/insrc \ cui/source/dialogs/linkdlg \ diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 25fda742ab60..eda70a1dd29c 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -15,6 +15,12 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ )) endif +ifneq ($(ENABLE_WASM_STRIP_PINGUSER),TRUE) +$(eval $(call gb_UIConfig_add_uifiles,cui,\ + cui/uiconfig/ui/tipofthedaydialog \ +)) +endif + $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/aboutdialog \ cui/uiconfig/ui/aboutconfigdialog\ @@ -99,7 +105,6 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/hyphenate \ cui/uiconfig/ui/iconchangedialog \ cui/uiconfig/ui/iconselectordialog \ - cui/uiconfig/ui/tipofthedaydialog \ cui/uiconfig/ui/insertfloatingframe \ cui/uiconfig/ui/insertoleobject \ cui/uiconfig/ui/insertrowcolumn \ diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 560548e8066b..7b0a1971d1fe 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -18,6 +18,7 @@ */ #include <config_extensions.h> +#include <config_wasm_strip.h> #include <align.hxx> #include "dlgfact.hxx" @@ -110,7 +111,6 @@ IMPL_ABSTDLG_CLASS(AbstractFmShowColsDialog) IMPL_ABSTDLG_CLASS(AbstractGalleryIdDialog) IMPL_ABSTDLG_CLASS(AbstractGraphicFilterDialog) IMPL_ABSTDLG_CLASS(AbstractHangulHanjaConversionDialog) -IMPL_ABSTDLG_CLASS(AbstractHyphenWordDialog) IMPL_ABSTDLG_CLASS(AbstractInsertObjectDialog) IMPL_ABSTDLG_CLASS(AbstractLinksDialog) IMPL_ABSTDLG_CLASS(AbstractPasswordToOpenModifyDialog) @@ -144,6 +144,15 @@ IMPL_ABSTDLG_CLASS_ASYNC(CuiAbstractTabController,SfxTabDialogController) IMPL_ABSTDLG_CLASS(CuiAbstractController) IMPL_ABSTDLG_CLASS(CuiAbstractSingleTabController) +short AbstractHyphenWordDialog_Impl::Execute() +{ +#if !ENABLE_WASM_STRIP_HUNSPELL + return m_xDlg->run(); +#else + return 0; +#endif +} + const SfxItemSet* AbstractSvxCharacterMapDialog_Impl::GetOutputItemSet() const { return m_xDlg->GetOutputItemSet(); @@ -896,7 +905,16 @@ VclPtr<AbstractHyphenWordDialog> AbstractDialogFactory_Impl::CreateHyphenWordDia css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen, SvxSpellWrapper* pWrapper) { +#if !ENABLE_WASM_STRIP_EXTRA return VclPtr<AbstractHyphenWordDialog_Impl>::Create(std::make_unique<SvxHyphenWordDialog>(rWord, nLang, pParent, xHyphen, pWrapper)); +#else + (void) pParent; + (void) rWord; + (void) nLang; + (void) xHyphen; + (void) pWrapper; + return nullptr; +#endif } VclPtr<AbstractFmShowColsDialog> AbstractDialogFactory_Impl::CreateFmShowColsDialog(weld::Window* pParent) @@ -1475,7 +1493,7 @@ VclPtr<AbstractAdditionsDialog> AbstractDialogFactory_Impl::CreateAdditionsDialo #else (void) pParent; (void) sAdditionsTag; - return VclPtr<AbstractAdditionsDialog>(nullptr); + return nullptr; #endif } @@ -1489,8 +1507,13 @@ AbstractDialogFactory_Impl::CreateAboutDialog(weld::Window* pParent) VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateTipOfTheDayDialog(weld::Window* pParent) { +#if !ENABLE_WASM_STRIP_PINGUSER return VclPtr<CuiAbstractControllerAsync_Impl>::Create( std::make_shared<TipOfTheDayDialog>(pParent)); +#else + (void) pParent; + return nullptr; +#endif } VclPtr<VclAbstractDialog> diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk index 191a2cba4c6f..d160bc6128dc 100644 --- a/desktop/Module_desktop.mk +++ b/desktop/Module_desktop.mk @@ -20,7 +20,7 @@ $(eval $(call gb_Module_add_targets,desktop,\ $(if $(ENABLE_BREAKPAD), \ Library_crashreport \ ) \ - $(if $(DISABLE_GUI),,Library_spl) \ + $(if $(or $(DISABLE_GUI),$(ENABLE_WASM_STRIP_SPLASH)),,Library_spl) \ Package_branding \ $(if $(CUSTOM_BRAND_DIR),Package_branding_custom) \ UIConfig_deployment \ @@ -103,7 +103,7 @@ $(eval $(call gb_Module_add_targets,desktop,\ )) endif -endif +endif # $(OS) ifneq (,$(filter Extension_test-active,$(MAKECMDGOALS))) $(eval $(call gb_Module_add_targets,desktop, \ diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 32d5b31278c1..b14c0d94299a 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -24,6 +24,7 @@ #include <config_java.h> #include <config_folders.h> #include <config_extensions.h> +#include <config_wasm_strip.h> #include <sal/config.h> @@ -99,7 +100,9 @@ #include <osl/process.h> #include <rtl/byteseq.hxx> #include <unotools/pathoptions.hxx> +#if !ENABLE_WASM_STRIP_PINGUSER #include <unotools/VersionConfig.hxx> +#endif #include <rtl/bootstrap.hxx> #include <vcl/test/GraphicsRenderTests.hxx> #include <vcl/glxtestprocess.hxx> @@ -339,10 +342,12 @@ namespace { void runGraphicsRenderTests() { +#if !ENABLE_WASM_STRIP_PINGUSER if (!utl::isProductVersionUpgraded(false)) { return; } +#endif GraphicsRenderTests TestObject; TestObject.run(); } @@ -967,6 +972,7 @@ struct RefClearGuard @param bEmergencySave differs between EMERGENCY_SAVE and RECOVERY */ +#if !ENABLE_WASM_STRIP_RECOVERYUI bool impl_callRecoveryUI(bool bEmergencySave , bool bExistsRecoveryData) { @@ -998,6 +1004,7 @@ bool impl_callRecoveryUI(bool bEmergencySave , aRet >>= bRet; return bRet; } +#endif bool impl_bringToFrontRecoveryUI() { @@ -1146,9 +1153,11 @@ void Desktop::Exception(ExceptionCategory nCategory) // Save all open documents so they will be reopened // the next time the application is started // returns true if at least one document could be saved... +#if !ENABLE_WASM_STRIP_RECOVERYUI bRestart = impl_callRecoveryUI( true , // force emergency save false); +#endif } FlushConfiguration(); @@ -1162,8 +1171,10 @@ void Desktop::Exception(ExceptionCategory nCategory) osl_removeSignalHandler( pSignalHandler ); restartOnMac(false); +#if !ENABLE_WASM_STRIP_SPLASH if ( m_rSplashScreen.is() ) m_rSplashScreen->reset(); +#endif _exit( EXITHELPER_CRASH_WITH_RESTART ); } @@ -1266,7 +1277,9 @@ int Desktop::Main() Translate::SetReadStringHook(ReplaceStringHookProc); // Startup screen +#if !ENABLE_WASM_STRIP_SPLASH OpenSplashScreen(); +#endif SetSplashScreenProgress(10); @@ -1702,8 +1715,10 @@ int Desktop::doShutdown() if ( bRR ) { restartOnMac(true); +#if !ENABLE_WASM_STRIP_SPLASH if ( m_rSplashScreen.is() ) m_rSplashScreen->reset(); +#endif return EXITHELPER_NORMAL_RESTART; } @@ -1999,8 +2014,9 @@ void Desktop::OpenClients() } else { - bool bCrashed = false; bool bExistsRecoveryData = false; +#if !ENABLE_WASM_STRIP_RECOVERYUI + bool bCrashed = false; bool bExistsSessionData = false; bool const bDisableRecovery = getenv("OOO_DISABLE_RECOVERY") != nullptr @@ -2026,6 +2042,7 @@ void Desktop::OpenClients() TOOLS_WARN_EXCEPTION( "desktop.app", "Error during recovery"); } } +#endif Reference< XSessionManagerListener2 > xSessionListener; try @@ -2384,6 +2401,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent ) } } +#if !ENABLE_WASM_STRIP_SPLASH void Desktop::OpenSplashScreen() { const CommandLineArgs &rCmdLine = GetCommandLineArgs(); @@ -2433,31 +2451,42 @@ void Desktop::OpenSplashScreen() m_rSplashScreen->start("SplashScreen", 100); } +#endif void Desktop::SetSplashScreenProgress(sal_Int32 iProgress) { +#if ENABLE_WASM_STRIP_SPLASH + (void) iProgress; +#else if(m_rSplashScreen.is()) { m_rSplashScreen->setValue(iProgress); } +#endif } void Desktop::SetSplashScreenText( const OUString& rText ) { +#if ENABLE_WASM_STRIP_SPLASH + (void) rText; +#else if( m_rSplashScreen.is() ) { m_rSplashScreen->setText( rText ); } +#endif } void Desktop::CloseSplashScreen() { +#if !ENABLE_WASM_STRIP_SPLASH if(m_rSplashScreen.is()) { SolarMutexGuard ensureSolarMutex; m_rSplashScreen->end(); m_rSplashScreen = nullptr; } +#endif } diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk index fc1d93332ae0..2430852d33bd 100644 --- a/drawinglayer/Library_drawinglayer.mk +++ b/drawinglayer/Library_drawinglayer.mk @@ -29,14 +29,19 @@ $(eval $(call gb_Library_use_externals,drawinglayer,\ libxml2 \ )) +ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE) $(eval $(call gb_Library_use_libraries,drawinglayer,\ - drawinglayercore \ - basegfx \ canvastools \ - comphelper \ cppcanvas \ +)) +endif + +$(eval $(call gb_Library_use_libraries,drawinglayer,\ + basegfx \ + comphelper \ cppu \ cppuhelper \ + drawinglayercore \ i18nlangtag \ sal \ salhelper \ diff --git a/editeng/Library_editeng.mk b/editeng/Library_editeng.mk index 1237954ad6e9..6602793e3e02 100644 --- a/editeng/Library_editeng.mk +++ b/editeng/Library_editeng.mk @@ -35,6 +35,7 @@ $(eval $(call gb_Library_add_defs,editeng,\ $(eval $(call gb_Library_use_sdk_api,editeng)) +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) $(eval $(call gb_Library_add_exception_objects,editeng,\ editeng/source/accessibility/AccessibleComponentBase \ editeng/source/accessibility/AccessibleContextBase \ @@ -45,6 +46,10 @@ $(eval $(call gb_Library_add_exception_objects,editeng,\ editeng/source/accessibility/AccessibleSelectionBase \ editeng/source/accessibility/AccessibleStaticTextBase \ editeng/source/accessibility/AccessibleStringWrap \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,editeng,\ editeng/source/editeng/editattr \ editeng/source/editeng/editdata \ editeng/source/editeng/editdbg \ diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx index 669546a8e5cb..134c7211f1a3 100644 --- a/editeng/source/misc/splwrap.cxx +++ b/editeng/source/misc/splwrap.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <rtl/ustring.hxx> #include <i18nlangtag/languagetag.hxx> #include <vcl/svapp.hxx> @@ -249,6 +251,9 @@ void SvxSpellWrapper::InsertHyphen( const sal_Int32 ) // Testing of the document areas in the order specified by the flags void SvxSpellWrapper::SpellDocument( ) { +#if ENABLE_WASM_STRIP_HUNSPELL + return; +#else if ( bOtherCntnt ) { bReverse = false; @@ -275,6 +280,7 @@ void SvxSpellWrapper::SpellDocument( ) xHyph, this )); pDlg->Execute(); } +#endif } diff --git a/extensions/Module_extensions.mk b/extensions/Module_extensions.mk index 327314fb4250..8b3a20127637 100644 --- a/extensions/Module_extensions.mk +++ b/extensions/Module_extensions.mk @@ -56,6 +56,7 @@ $(eval $(call gb_Module_add_targets,extensions,\ endif ifneq (,$(filter DESKTOP,$(BUILD_TYPE))) +ifeq (,$(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS)) $(eval $(call gb_Module_add_targets,extensions,\ Library_updatefeed \ )) @@ -71,6 +72,7 @@ $(eval $(call gb_Module_add_check_targets,extensions,\ CppunitTest_extensions_test_update \ )) endif +endif # !ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS endif ifeq ($(OS),WNT) diff --git a/external/hunspell/StaticLibrary_hunspell.mk b/external/hunspell/StaticLibrary_hunspell.mk index 02d534f69169..3a2eccafb0aa 100644 --- a/external/hunspell/StaticLibrary_hunspell.mk +++ b/external/hunspell/StaticLibrary_hunspell.mk @@ -20,6 +20,12 @@ $(eval $(call gb_StaticLibrary_add_defs,hunspell,\ -DOPENOFFICEORG \ )) +ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE) +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,hunspell,\ + UnpackedTarball/hunspell/src/hunspell/hunspell \ +)) +endif + $(eval $(call gb_StaticLibrary_add_generated_exception_objects,hunspell,\ UnpackedTarball/hunspell/src/hunspell/affentry \ UnpackedTarball/hunspell/src/hunspell/affixmgr \ @@ -30,7 +36,6 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,hunspell,\ UnpackedTarball/hunspell/src/hunspell/hunzip \ UnpackedTarball/hunspell/src/hunspell/filemgr \ UnpackedTarball/hunspell/src/hunspell/replist \ - UnpackedTarball/hunspell/src/hunspell/hunspell \ )) # vim: set noet sw=4 ts=4: diff --git a/external/hyphen/ExternalProject_hyphen.mk b/external/hyphen/ExternalProject_hyphen.mk index 63d167f7804b..1419c9b02890 100644 --- a/external/hyphen/ExternalProject_hyphen.mk +++ b/external/hyphen/ExternalProject_hyphen.mk @@ -9,7 +9,9 @@ $(eval $(call gb_ExternalProject_ExternalProject,hyphen)) +ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE) $(eval $(call gb_ExternalProject_use_external,hyphen,hunspell)) +endif $(eval $(call gb_ExternalProject_register_targets,hyphen,\ build \ diff --git a/external/mythes/ExternalProject_mythes.mk b/external/mythes/ExternalProject_mythes.mk index 298607f0aa73..6a1e9b14e882 100644 --- a/external/mythes/ExternalProject_mythes.mk +++ b/external/mythes/ExternalProject_mythes.mk @@ -9,7 +9,9 @@ $(eval $(call gb_ExternalProject_ExternalProject,mythes)) +ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE) $(eval $(call gb_ExternalProject_use_external,mythes,hunspell)) +endif $(eval $(call gb_ExternalProject_register_targets,mythes,\ build \ diff --git a/extras/Module_extras.mk b/extras/Module_extras.mk index cf7177c21180..516209c5df49 100644 --- a/extras/Module_extras.mk +++ b/extras/Module_extras.mk @@ -61,7 +61,7 @@ $(eval $(call gb_Module_add_l10n_targets,extras,\ ifneq ($(WITH_GALLERY_BUILD),) $(eval $(call gb_Module_add_targets,extras,\ Gallery_backgrounds \ - Gallery_sound \ + $(call gb_Helper_optional,AVMEDIA,Gallery_sound) \ )) endif diff --git a/framework/Library_fwk.mk b/framework/Library_fwk.mk index 07ffd62770b8..cb893808900e 100644 --- a/framework/Library_fwk.mk +++ b/framework/Library_fwk.mk @@ -61,6 +61,14 @@ $(eval $(call gb_Library_use_libraries,fwk,\ vcl \ )) +ifneq ($(ENABLE_WASM_STRIP_RECOVERYUI),TRUE) +$(eval $(call gb_Library_add_exception_objects,fwk,\ + framework/source/services/autorecovery \ +)) + +$(eval $(call gb_Library_add_componentimpl,fwk,autorecovery)) +endif + $(eval $(call gb_Library_add_exception_objects,fwk,\ framework/source/accelerators/acceleratorcache \ framework/source/accelerators/acceleratorconfiguration \ @@ -149,7 +157,6 @@ $(eval $(call gb_Library_add_exception_objects,fwk,\ framework/source/recording/dispatchrecorder \ framework/source/recording/dispatchrecordersupplier \ framework/source/services/ContextChangeEventMultiplexer \ - framework/source/services/autorecovery \ framework/source/services/desktop \ framework/source/services/dispatchhelper \ framework/source/services/frame \ diff --git a/framework/util/fwk.component b/framework/util/fwk.component index 2b9eb7807fee..b8fef412703d 100644 --- a/framework/util/fwk.component +++ b/framework/util/fwk.component @@ -32,6 +32,7 @@ single-instance="true"> <service name="com.sun.star.frame.AutoRecovery"/> <singleton name="com.sun.star.frame.theAutoRecovery"/> + <optional/> </implementation> <implementation name="com.sun.star.comp.framework.ControlMenuController" constructor="com_sun_star_comp_framework_ControlMenuController_get_implementation"> diff --git a/framework/util/fwk.component.autorecovery b/framework/util/fwk.component.autorecovery new file mode 100644 index 000000000000..9f178cd0e6d5 --- /dev/null +++ b/framework/util/fwk.component.autorecovery @@ -0,0 +1,7 @@ +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +com.sun.star.comp.framework.AutoRecovery diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx index a449be4d17fe..71f371a7eddc 100644 --- a/i18npool/source/breakiterator/breakiteratorImpl.cxx +++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx @@ -16,6 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ + #include <config_locales.h> #include <breakiteratorImpl.hxx> diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx index aebe6ad82424..36ccd707a62d 100644 --- a/include/vcl/BitmapTools.hxx +++ b/include/vcl/BitmapTools.hxx @@ -11,6 +11,8 @@ #define INCLUDED_VCL_BITMAP_TOOLS_HXX #include <config_cairo_canvas.h> +#include <config_wasm_strip.h> + #include <vcl/bitmapex.hxx> #include <vcl/ImageTree.hxx> #if ENABLE_CAIRO_CANVAS @@ -26,10 +28,12 @@ namespace com::sun::star::geometry { struct IntegerRectangle2D; } namespace vcl::bitmap { +#if !ENABLE_WASM_STRIP_PREMULTIPLY typedef std::array<std::array<sal_uInt8, 256>, 256> lookup_table; VCL_DLLPUBLIC lookup_table const & get_premultiply_table(); VCL_DLLPUBLIC lookup_table const & get_unpremultiply_table(); +#endif sal_uInt8 unpremultiply(sal_uInt8 c, sal_uInt8 a); sal_uInt8 premultiply(sal_uInt8 c, sal_uInt8 a); diff --git a/lingucomponent/Library_guesslang.mk b/lingucomponent/Library_guesslang.mk index c421f2154dc3..a700ed545bde 100644 --- a/lingucomponent/Library_guesslang.mk +++ b/lingucomponent/Library_guesslang.mk @@ -12,10 +12,15 @@ $(eval $(call gb_Library_Library,guesslang)) $(eval $(call gb_Library_set_componentfile,guesslang,lingucomponent/source/languageguessing/guesslang,services)) +ifneq ($(ENABLE_WASM_STRIP_GUESSLANG),TRUE) $(eval $(call gb_Library_use_externals,guesslang,\ - boost_headers \ libexttextcat \ )) +endif + +$(eval $(call gb_Library_use_externals,guesslang,\ + boost_headers \ +)) $(eval $(call gb_Library_use_sdk_api,guesslang)) diff --git a/lingucomponent/Module_lingucomponent.mk b/lingucomponent/Module_lingucomponent.mk index 2bde5d5391e5..9f19dcedbc67 100644 --- a/lingucomponent/Module_lingucomponent.mk +++ b/lingucomponent/Module_lingucomponent.mk @@ -10,13 +10,23 @@ $(eval $(call gb_Module_Module,lingucomponent)) +ifneq ($(ENABLE_WASM_STRIP_GUESSLANG),TRUE) $(eval $(call gb_Module_add_targets,lingucomponent,\ Library_guesslang \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE) +$(eval $(call gb_Module_add_targets,lingucomponent,\ Library_hyphen \ Library_lnth \ - $(if $(filter iOS MACOSX,$(OS)),Library_MacOSXSpell) \ Library_spell \ StaticLibrary_ulingu \ +)) +endif + +$(eval $(call gb_Module_add_targets,lingucomponent,\ + $(if $(filter iOS MACOSX,$(OS)),Library_MacOSXSpell) \ Library_numbertext \ )) diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk index f9a059b30147..979635a2f213 100644 --- a/oox/Library_oox.mk +++ b/oox/Library_oox.mk @@ -83,28 +83,10 @@ endif $(eval $(call gb_Library_set_componentfile,oox,oox/util/oox,services)) +# WASM_CHART change +ifeq (,$(ENABLE_WASM_STRIP_CHART)) $(eval $(call gb_Library_add_exception_objects,oox,\ - oox/source/core/binarycodec \ - oox/source/core/contexthandler2 \ - oox/source/core/contexthandler \ - oox/source/core/fastparser \ - oox/source/core/fasttokenhandler \ - oox/source/core/filterbase \ - oox/source/core/filterdetect \ - oox/source/core/fragmenthandler2 \ - oox/source/core/fragmenthandler \ - oox/source/core/recordparser \ - oox/source/core/relations \ - oox/source/core/relationshandler \ - oox/source/core/xmlfilterbase \ - oox/source/crypto/AgileEngine \ - oox/source/crypto/CryptTools \ - oox/source/crypto/DocumentEncryption \ - oox/source/crypto/DocumentDecryption \ - oox/source/crypto/Standard2007Engine \ - oox/source/crypto/StrongEncryptionDataSpace \ - oox/source/docprop/docprophandler \ - oox/source/docprop/ooxmldocpropimport \ + oox/source/export/chartexport \ oox/source/drawingml/chart/axiscontext \ oox/source/drawingml/chart/axisconverter \ oox/source/drawingml/chart/axismodel \ @@ -132,6 +114,31 @@ $(eval $(call gb_Library_add_exception_objects,oox,\ oox/source/drawingml/chart/typegroupcontext \ oox/source/drawingml/chart/typegroupconverter \ oox/source/drawingml/chart/typegroupmodel \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,oox,\ + oox/source/core/binarycodec \ + oox/source/core/contexthandler2 \ + oox/source/core/contexthandler \ + oox/source/core/fastparser \ + oox/source/core/fasttokenhandler \ + oox/source/core/filterbase \ + oox/source/core/filterdetect \ + oox/source/core/fragmenthandler2 \ + oox/source/core/fragmenthandler \ + oox/source/core/recordparser \ + oox/source/core/relations \ + oox/source/core/relationshandler \ + oox/source/core/xmlfilterbase \ + oox/source/crypto/AgileEngine \ + oox/source/crypto/CryptTools \ + oox/source/crypto/DocumentEncryption \ + oox/source/crypto/DocumentDecryption \ + oox/source/crypto/Standard2007Engine \ + oox/source/crypto/StrongEncryptionDataSpace \ + oox/source/docprop/docprophandler \ + oox/source/docprop/ooxmldocpropimport \ oox/source/drawingml/clrschemecontext \ oox/source/drawingml/clrscheme \ oox/source/drawingml/colorchoicecontext \ @@ -214,7 +221,6 @@ $(eval $(call gb_Library_add_exception_objects,oox,\ oox/source/dump/dumperbase \ oox/source/dump/oledumper \ oox/source/dump/pptxdumper \ - oox/source/export/chartexport \ oox/source/export/ColorPropertySet \ oox/source/export/drawingml \ oox/source/export/DMLPresetShapeExport \ diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index d0502558670e..6b0eb8c7102f 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <oox/drawingml/shape.hxx> #include <drawingml/customshapeproperties.hxx> #include <oox/drawingml/theme.hxx> @@ -1943,6 +1945,15 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >& Reference< chart2::XChartDocument > xChartDoc( xDocModel, UNO_QUERY_THROW ); // load the chart data from the XML fragment +#if ENABLE_WASM_STRIP_CHART + (void) rFilter; + (void) rxShapes; +#else + // WASM_CHART change + // TODO: Instead of using convertFromModel an alternative may be + // added to convert not to Chart/OLE SdrObejct, but to GraphicObject + // with the Chart visualization. There should be a preiew available + // in the imported chart data bool bMSO2007Doc = rFilter.isMSO2007Document(); chart::ChartSpaceModel aModel(bMSO2007Doc); rtl::Reference<chart::ChartSpaceFragment> pChartSpaceFragment = new chart::ChartSpaceFragment( @@ -1997,6 +2008,7 @@ void Shape::finalizeXShape( XmlFilterBase& rFilter, const Reference< XShapes >& // Restore the original theme. pPowerPointImport->getActualSlidePersist()->setTheme(pTheme); } +#endif } catch( Exception& ) { diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 1bc728854edd..54c6a58299e9 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -17,9 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sal/config.h> +#include <config_wasm_strip.h> +#include <sal/config.h> #include <sal/log.hxx> + #include <filter/msfilter/util.hxx> #include <o3tl/string_view.hxx> #include <oox/core/xmlfilterbase.hxx> @@ -2176,9 +2178,14 @@ ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape ) xPropSet->getPropertyValue("Model") >>= xChartDoc; assert(xChartDoc.is()); //export the chart +#if !ENABLE_WASM_STRIP_CHART + // WASM_CHART change + // TODO: With Chart extracted this cannot really happen since + // no Chart could've been added at all ChartExport aChartExport( mnXmlNamespace, GetFS(), xChartDoc, GetFB(), GetDocumentType() ); static sal_Int32 nChartCount = 0; aChartExport.WriteChartObj( xShape, GetNewShapeID( xShape ), ++nChartCount ); +#endif return *this; } diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx index 1f569d099876..8e35217ea590 100644 --- a/oox/source/ppt/pptimport.cxx +++ b/oox/source/ppt/pptimport.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <sal/config.h> #include <sal/log.hxx> @@ -60,8 +62,12 @@ XmlFilterBase* PowerPointImport::mpDebugFilterBase = nullptr; PowerPointImport::PowerPointImport( const Reference< XComponentContext >& rxContext ) : XmlFilterBase( rxContext ), +#if ENABLE_WASM_STRIP_CHART + // WASM_CHART change + mxChartConv( ) +#else mxChartConv( std::make_shared<::oox::drawingml::chart::ChartConverter>() ) - +#endif { #if OSL_DEBUG_LEVEL > 0 mpDebugFilterBase = this; diff --git a/oox/source/shape/ShapeFilterBase.cxx b/oox/source/shape/ShapeFilterBase.cxx index f5bb1af03955..38c310b47663 100644 --- a/oox/source/shape/ShapeFilterBase.cxx +++ b/oox/source/shape/ShapeFilterBase.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <oox/shape/ShapeFilterBase.hxx> #include <oox/drawingml/chart/chartconverter.hxx> #include <oox/drawingml/themefragmenthandler.hxx> @@ -34,7 +36,12 @@ using namespace ::com::sun::star; ShapeFilterBase::ShapeFilterBase( const uno::Reference< uno::XComponentContext >& rxContext ) : XmlFilterBase( rxContext ), +#if ENABLE_WASM_STRIP_CHART + // WASM_CHART change + mxChartConv( ) +#else mxChartConv( std::make_shared<::oox::drawingml::chart::ChartConverter>() ) +#endif { } diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index c9a2e8c5e4c4..6705a8c572cd 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -128,6 +128,23 @@ endif $(eval $(call gb_Library_set_componentfile,sd,sd/util/sd,services)) +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) +$(eval $(call gb_Library_add_exception_objects,sd,\ + sd/source/ui/accessibility/AccessibleDocumentViewBase \ + sd/source/ui/accessibility/AccessibleDrawDocumentView \ + sd/source/ui/accessibility/AccessibleOutlineEditSource \ + sd/source/ui/accessibility/AccessibleOutlineView \ + sd/source/ui/accessibility/AccessiblePageShape \ + sd/source/ui/accessibility/AccessiblePresentationGraphicShape \ + sd/source/ui/accessibility/AccessiblePresentationOLEShape \ + sd/source/ui/accessibility/AccessiblePresentationShape \ + sd/source/ui/accessibility/AccessibleSlideSorterObject \ + sd/source/ui/accessibility/AccessibleSlideSorterView \ + sd/source/ui/accessibility/AccessibleViewForwarder \ + sd/source/ui/accessibility/SdShapeTypes \ +)) +endif + $(eval $(call gb_Library_add_exception_objects,sd,\ sd/source/core/CustomAnimationCloner \ sd/source/core/CustomAnimationEffect \ @@ -171,18 +188,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\ sd/source/filter/xml/sdtransform \ sd/source/filter/xml/sdxmlwrp \ sd/source/helper/simplereferencecomponent \ - sd/source/ui/accessibility/AccessibleDocumentViewBase \ - sd/source/ui/accessibility/AccessibleDrawDocumentView \ - sd/source/ui/accessibility/AccessibleOutlineEditSource \ - sd/source/ui/accessibility/AccessibleOutlineView \ - sd/source/ui/accessibility/AccessiblePageShape \ - sd/source/ui/accessibility/AccessiblePresentationGraphicShape \ - sd/source/ui/accessibility/AccessiblePresentationOLEShape \ - sd/source/ui/accessibility/AccessiblePresentationShape \ - sd/source/ui/accessibility/AccessibleSlideSorterObject \ - sd/source/ui/accessibility/AccessibleSlideSorterView \ - sd/source/ui/accessibility/AccessibleViewForwarder \ - sd/source/ui/accessibility/SdShapeTypes \ sd/source/ui/animations/CustomAnimationDialog \ sd/source/ui/animations/CustomAnimationList \ sd/source/ui/animations/CustomAnimationPane \ diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk index 51a34d510771..d790d9fef901 100644 --- a/sfx2/Library_sfx.mk +++ b/sfx2/Library_sfx.mk @@ -23,6 +23,10 @@ $(eval $(call gb_Library_add_sdi_headers,sfx,sfx2/sdi/sfxslots)) $(eval $(call gb_Library_set_componentfile,sfx,sfx2/util/sfx,services)) +$(eval $(call gb_Library_add_componentimpls,sfx, \ + $(if $(ENABLE_WASM_STRIP_RECENT),,extended) \ +)) + $(eval $(call gb_Library_set_precompiled_header,sfx,sfx2/inc/pch/precompiled_sfx)) $(eval $(call gb_Library_use_custom_headers,sfx,\ @@ -81,6 +85,15 @@ $(eval $(call gb_Library_use_externals,sfx,\ orcus-parser\ )) +ifneq ($(ENABLE_WASM_STRIP_RECENT),TRUE) +$(eval $(call gb_Library_add_exception_objects,sfx,\ + sfx2/source/dialog/backingcomp \ + sfx2/source/dialog/backingwindow \ + sfx2/source/control/recentdocsview \ + sfx2/source/control/recentdocsviewitem \ +)) +endif + $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/accessibility/AccessibilityCheck \ sfx2/source/accessibility/AccessibilityIssue \ @@ -142,8 +155,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/control/msg \ sfx2/source/control/msgpool \ sfx2/source/control/objface \ - sfx2/source/control/recentdocsview \ - sfx2/source/control/recentdocsviewitem \ sfx2/source/control/request \ sfx2/source/control/sfxstatuslistener \ sfx2/source/control/shell \ @@ -170,8 +181,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/devtools/DocumentModelTreeHandler \ sfx2/source/devtools/ObjectInspectorTreeHandler \ sfx2/source/dialog/alienwarn \ - sfx2/source/dialog/backingcomp \ - sfx2/source/dialog/backingwindow \ sfx2/source/dialog/basedlgs \ sfx2/source/dialog/checkin \ sfx2/source/dialog/dialoghelper \ diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index b8c80823daf3..980d4cb057e9 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -18,6 +18,8 @@ */ #include <config_features.h> +#include <config_wasm_strip.h> + #include <com/sun/star/drawing/ModuleDispatcher.hpp> #include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/frame/DispatchResultEvent.hpp> @@ -504,6 +506,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) sfx2::openUriExternally(sURL, false, rReq.GetFrameWeld()); break; } +#if !ENABLE_WASM_STRIP_PINGUSER case SID_GETINVOLVED: { // Open get involved/join us page based on locales @@ -539,6 +542,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) sfx2::openUriExternally(sURL, false, rReq.GetFrameWeld()); break; } +#endif case SID_SHOW_LICENSE: { LicenseDialog aDialog(rReq.GetFrameWeld()); @@ -618,6 +622,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) break; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +#if !ENABLE_WASM_STRIP_PINGUSER case SID_TIPOFTHEDAY: { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); @@ -626,6 +631,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) bDone = true; break; } +#endif // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_ABOUT: diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 7050dee85964..0c9a742158d2 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -18,6 +18,8 @@ */ #include <config_feature_desktop.h> +#include <config_wasm_strip.h> + #include <osl/file.hxx> #include <sfx2/docfilt.hxx> #include <sfx2/infobar.hxx> @@ -47,7 +49,9 @@ #include <vcl/stdtext.hxx> #include <vcl/weld.hxx> #include <vcl/weldutils.hxx> +#if !ENABLE_WASM_STRIP_PINGUSER #include <unotools/VersionConfig.hxx> +#endif #include <svtools/miscopt.hxx> #include <tools/diagnose_ex.h> #include <com/sun/star/container/XIndexAccess.hpp> @@ -1396,6 +1400,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) rBind.Invalidate( SID_RELOAD ); rBind.Invalidate( SID_EDITDOC ); +#if !ENABLE_WASM_STRIP_PINGUSER bool bIsHeadlessOrUITest = SfxApplication::IsHeadlessOrUITest(); //uitest.uicheck fails when the dialog is open //what's new infobar @@ -1476,6 +1481,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) officecfg::Setup::Product::LastTimeDonateShown::set(nNow, batch); batch->commit(); } +#endif // read-only infobar if necessary const SfxViewShell *pVSh; @@ -1628,6 +1634,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) } } +#if !ENABLE_WASM_STRIP_PINGUSER IMPL_LINK_NOARG(SfxViewFrame, WhatsNewHandler, weld::Button&, void) { GetDispatcher()->Execute(SID_WHATSNEW); @@ -1642,6 +1649,7 @@ IMPL_LINK_NOARG(SfxViewFrame, DonationHandler, weld::Button&, void) { GetDispatcher()->Execute(SID_DONATION); } +#endif IMPL_LINK(SfxViewFrame, SwitchReadOnlyHandler, weld::Button&, rButton, void) { diff --git a/sfx2/util/sfx.component b/sfx2/util/sfx.component index a7c9930e0ec8..7970342db206 100644 --- a/sfx2/util/sfx.component +++ b/sfx2/util/sfx.component @@ -23,6 +23,7 @@ constructor="com_sun_star_comp_sfx2_BackingComp_get_implementation"> <service name="com.sun.star.frame.StartModule"/> <service name="com.sun.star.frame.ProtocolHandler"/> + <optional/> </implementation> <implementation name="SfxDocumentMetaData" constructor="SfxDocumentMetaData_get_implementation"> diff --git a/sfx2/util/sfx.component.extended b/sfx2/util/sfx.component.extended new file mode 100644 index 000000000000..2695e06a0d1a --- /dev/null +++ b/sfx2/util/sfx.component.extended @@ -0,0 +1,7 @@ +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +com.sun.star.comp.sfx2.BackingComp diff --git a/solenv/gbuild/extensions/pre_MergedLibsList.mk b/solenv/gbuild/extensions/pre_MergedLibsList.mk index 8bbba842e029..d5bf6f9c0862 100644 --- a/solenv/gbuild/extensions/pre_MergedLibsList.mk +++ b/solenv/gbuild/extensions/pre_MergedLibsList.mk @@ -70,7 +70,7 @@ MERGE_LIBRARY_LIST := \ sofficeapp \ sot \ spell \ - $(if $(DISABLE_GUI),,spl) \ + $(if $(or $(DISABLE_GUI),$(ENABLE_WASM_STRIP_SPLASH)),,spl) \ srtrs1 \ $(call gb_Helper_optional,SCRIPTING,stringresource) \ svgio \ diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index 22e266ff19c6..092a4613f374 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -21,7 +21,10 @@ $(eval $(call gb_Library_Library,svx)) $(eval $(call gb_Library_set_componentfile,svx,svx/util/svx,services)) -$(eval $(call gb_Helper_optional,BREAKPAD,$(call gb_Library_add_componentimpl,svx,crashreport))) +$(eval $(call gb_Library_add_componentimpls,svx, \ + $(call gb_Helper_optional,BREAKPAD,crashreport) \ + $(if $(ENABLE_WASM_STRIP_RECOVERYUI),,recoveryui) \ +)) $(eval $(call gb_Library_set_include,svx,\ -I$(SRCDIR)/svx/inc \ @@ -82,10 +85,17 @@ $(eval $(call gb_Library_use_externals,svx,\ icu_headers \ )) +ifneq ($(ENABLE_WASM_STRIP_RECOVERYUI),TRUE) +$(eval $(call gb_Library_add_exception_objects,svx,\ + svx/source/dialog/docrecovery \ + svx/source/unodraw/recoveryui \ +)) +endif + +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/accessibility/AccessibleControlShape \ svx/source/accessibility/AccessibleEmptyEditSource \ - svx/source/accessibility/AccessibleFrameSelector \ svx/source/accessibility/AccessibleGraphicShape \ svx/source/accessibility/AccessibleOLEShape \ svx/source/accessibility/AccessibleShape \ @@ -99,9 +109,14 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/accessibility/GraphCtlAccessibleContext \ svx/source/accessibility/ShapeTypeHandler \ svx/source/accessibility/SvxShapeTypes \ - svx/source/accessibility/charmapacc \ svx/source/accessibility/lookupcolorname \ - svx/source/accessibility/svxpixelctlaccessiblecontext \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,svx,\ + svx/source/accessibility/AccessibleFrameSelector \ + svx/source/accessibility/charmapacc \ + svx/source/accessibility/svxpixelctlaccessiblecontext \ svx/source/accessibility/svxrectctaccessiblecontext \ svx/source/customshapes/EnhancedCustomShape3d \ svx/source/customshapes/EnhancedCustomShapeEngine \ @@ -127,7 +142,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/dialog/dialcontrol \ svx/source/dialog/dlgctl3d \ svx/source/dialog/dlgctrl \ - svx/source/dialog/docrecovery \ svx/source/dialog/fntctrl \ svx/source/dialog/fontwork \ svx/source/dialog/frmdirlbox \ @@ -259,7 +273,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/tbxctrls/tbxdrctl \ svx/source/tbxctrls/verttexttbxctrl \ svx/source/uitest/uiobject \ - svx/source/unodraw/recoveryui \ svx/source/unodraw/unoctabl \ svx/source/unodraw/UnoNamespaceMap \ svx/source/unodraw/unopool \ diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk index fd6dcfd6f455..b386f72ef15c 100644 --- a/svx/Library_svxcore.mk +++ b/svx/Library_svxcore.mk @@ -21,6 +21,10 @@ $(eval $(call gb_Library_Library,svxcore)) $(eval $(call gb_Library_set_componentfile,svxcore,svx/util/svxcore,services)) +$(eval $(call gb_Library_add_componentimpls,svxcore, \ + $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),,draw) \ +)) + $(eval $(call gb_Library_add_sdi_headers,svxcore,svx/sdi/svxslots)) $(eval $(call gb_Library_use_custom_headers,svxcore,\ diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index fd72c77d52d6..3617e48a82c8 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <vcl/event.hxx> #include <vcl/fontcharmap.hxx> #include <vcl/svapp.hxx> @@ -732,6 +734,7 @@ void SvxShowCharSet::SelectIndex(int nNewIndex, bool bFocus) if( nSelectedIndex >= 0 ) { getSelectedChar() = mxFontCharMap->GetCharFromIndex( nSelectedIndex ); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( m_xAccessible.is() ) { svx::SvxShowCharSetItem* pItem = ImplGetItem(nSelectedIndex); @@ -751,6 +754,7 @@ void SvxShowCharSet::SelectIndex(int nNewIndex, bool bFocus) aNewAny <<= AccessibleStateType::SELECTED; pItem->m_xItem->fireEvent( AccessibleEventId::STATE_CHANGED, aOldAny, aNewAny ); } +#endif } aHighHdl.Call( this ); } @@ -785,6 +789,7 @@ IMPL_LINK_NOARG(SvxShowCharSet, VscrollHdl, weld::ScrolledWindow&, void) } else if( nSelectedIndex > LastInView() ) { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( m_xAccessible.is() ) { css::uno::Any aOldAny, aNewAny; @@ -795,6 +800,7 @@ IMPL_LINK_NOARG(SvxShowCharSet, VscrollHdl, weld::ScrolledWindow&, void) m_xAccessible ->fireEvent( AccessibleEventId::CHILD, aOldAny, aNewAny ); } } +#endif SelectIndex( (LastInView() - COLUMN_COUNT + 1) + (nSelectedIndex % COLUMN_COUNT) ); } @@ -803,18 +809,22 @@ IMPL_LINK_NOARG(SvxShowCharSet, VscrollHdl, weld::ScrolledWindow&, void) SvxShowCharSet::~SvxShowCharSet() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (m_xAccessible.is()) { m_aItems.clear(); m_xAccessible->clearCharSetControl(); m_xAccessible.clear(); } +#endif } css::uno::Reference< XAccessible > SvxShowCharSet::CreateAccessible() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY OSL_ENSURE(!m_xAccessible.is(),"Accessible already created!"); m_xAccessible = new svx::SvxShowCharSetAcc(this); +#endif return m_xAccessible; } @@ -823,7 +833,9 @@ svx::SvxShowCharSetItem* SvxShowCharSet::ImplGetItem( int _nPos ) ItemsMap::iterator aFind = m_aItems.find(_nPos); if ( aFind == m_aItems.end() ) { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY OSL_ENSURE(m_xAccessible.is(), "Who wants to create a child of my table without a parent?"); +#endif auto xItem = std::make_shared<svx::SvxShowCharSetItem>(*this, m_xAccessible.get(), sal::static_int_cast< sal_uInt16 >(_nPos)); aFind = m_aItems.emplace(_nPos, xItem).first; diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index f14cc1822a39..35737285a231 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <vcl/svapp.hxx> #include <vcl/settings.hxx> #include <vcl/virdev.hxx> @@ -89,7 +91,9 @@ void SvxRectCtl::SetControlSettings(RectPoint eRpt, sal_uInt16 nBorder) SvxRectCtl::~SvxRectCtl() { pBitmap.reset(); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY pAccContext.clear(); +#endif } void SvxRectCtl::Resize() @@ -415,11 +419,13 @@ void SvxRectCtl::GetFocus() { Invalidate(); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY // Send accessibility event. if (pAccContext.is()) { pAccContext->FireChildFocus(GetActualRP()); } +#endif } void SvxRectCtl::LoseFocus() @@ -499,9 +505,11 @@ void SvxRectCtl::SetActualRP( RectPoint eNewRP ) Invalidate(); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY // notify accessibility object about change if (pAccContext.is()) pAccContext->selectChild( eNewRP /* MT, bFireFocus */ ); +#endif } void SvxRectCtl::SetState( CTL_STATE nState ) @@ -552,7 +560,9 @@ tools::Rectangle SvxRectCtl::CalculateFocusRectangle( RectPoint eRectPoint ) con Reference< XAccessible > SvxRectCtl::CreateAccessible() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY pAccContext = new SvxRectCtlAccessibleContext(this); +#endif return pAccContext; } @@ -572,8 +582,10 @@ void SvxRectCtl::DoCompletelyDisable(bool bNew) css::uno::Reference< css::accessibility::XAccessible > SvxPixelCtl::CreateAccessible() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (!m_xAccess.is()) m_xAccess = new SvxPixelCtlAccessible(this); +#endif return m_xAccess; } @@ -673,10 +685,14 @@ bool SvxPixelCtl::MouseButtonDown( const MouseEvent& rMEvt ) tools::Long nIndex = ShowPosition(rMEvt.GetPosPixel()); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if(m_xAccess.is()) { m_xAccess->NotifyChild(nIndex,true, true); } +#else + (void)nIndex; +#endif return true; } @@ -816,6 +832,7 @@ bool SvxPixelCtl::KeyInput( const KeyEvent& rKEvt ) default: return CustomWidgetController::KeyInput( rKEvt ); } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if(m_xAccess.is()) { tools::Long nIndex = GetFocusPosIndex(); @@ -837,6 +854,9 @@ bool SvxPixelCtl::KeyInput( const KeyEvent& rKEvt ) break; } } +#else + (void)bFocusPosChanged; +#endif return true; } else @@ -850,10 +870,12 @@ void SvxPixelCtl::GetFocus() { Invalidate(implCalFocusRect(aFocusPosition)); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (m_xAccess.is()) { m_xAccess->NotifyChild(GetFocusPosIndex(),true,false); } +#endif } void SvxPixelCtl::LoseFocus() diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index 117bec6f6784..f7d470896cc5 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <sal/config.h> #include <o3tl/safeint.hxx> @@ -236,8 +238,10 @@ FrameSelectorImpl::FrameSelectorImpl( FrameSelector& rFrameSel ) : mbBLTR( false ), mbFullRepaint( true ), mbAutoSelect( true ), - mbHCMode( false ), - maChildVec( 8 ) + mbHCMode( false ) +#if !ENABLE_WASM_STRIP_ACCESSIBILITY + ,maChildVec( 8 ) +#endif { maAllBorders.resize( FRAMEBORDERTYPE_COUNT, nullptr ); maAllBorders[ GetIndexFromFrameBorderType( FrameBorderType::Left ) ] = &maLeft; @@ -269,11 +273,12 @@ FrameSelectorImpl::FrameSelectorImpl( FrameSelector& rFrameSel ) : } FrameSelectorImpl::~FrameSelectorImpl() - { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY for( auto& rpChild : maChildVec ) if( rpChild.is() ) rpChild->Invalidate(); +#endif } // initialization @@ -754,17 +759,24 @@ void FrameSelectorImpl::SetBorderState( FrameBorder& rBorder, FrameBorderState e Any aNew; Any& rMod = eState == FrameBorderState::Show ? aNew : aOld; rMod <<= AccessibleStateType::CHECKED; + +#if !ENABLE_WASM_STRIP_ACCESSIBILITY rtl::Reference< a11y::AccFrameSelectorChild > xRet; size_t nVecIdx = static_cast< size_t >( rBorder.GetType() ); if( GetBorder(rBorder.GetType()).IsEnabled() && (1 <= nVecIdx) && (nVecIdx <= maChildVec.size()) ) xRet = maChildVec[ --nVecIdx ].get(); +#endif if( eState == FrameBorderState::Show ) SetBorderCoreStyle( rBorder, &maCurrStyle ); else rBorder.SetState( eState ); + +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (xRet.is()) xRet->NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOld, aNew ); +#endif + DoInvalidate( true ); } @@ -838,8 +850,10 @@ void FrameSelector::SetDrawingArea(weld::DrawingArea* pDrawingArea) FrameSelector::~FrameSelector() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( mxAccess.is() ) mxAccess->Invalidate(); +#endif } void FrameSelector::Initialize( FrameSelFlags nFlags ) @@ -972,6 +986,7 @@ bool FrameSelector::IsBorderSelected( FrameBorderType eBorder ) const void FrameSelector::SelectBorder( FrameBorderType eBorder ) { mxImpl->SelectBorder( mxImpl->GetBorderAccess( eBorder ), true/*bSelect*/ ); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY // MT: bFireFox as API parameter is ugly... // if (bFocus) { @@ -983,6 +998,7 @@ void FrameSelector::SelectBorder( FrameBorderType eBorder ) xRet->NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue, aNewValue ); } } +#endif } bool FrameSelector::IsAnyBorderSelected() const @@ -1026,8 +1042,10 @@ SvxBorderLineStyle FrameSelector::getCurrentStyleLineStyle() const // accessibility Reference< XAccessible > FrameSelector::CreateAccessible() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( !mxAccess.is() ) mxAccess = new a11y::AccFrameSelector(*this); +#endif return mxAccess; } diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index ba44840a9b16..136eae27b52c 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <svl/itempool.hxx> #include <vcl/settings.hxx> #include <vcl/ptrstyle.hxx> @@ -74,11 +76,14 @@ GraphCtrl::~GraphCtrl() { aUpdateIdle.Stop(); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( mpAccContext.is() ) { mpAccContext->disposing(); mpAccContext.clear(); } +#endif + pView.reset(); pModel.reset(); pUserCall.reset(); @@ -142,9 +147,11 @@ void GraphCtrl::InitSdrModel() pView->SetBufferedOutputAllowed(true); pView->SetBufferedOverlayAllowed(true); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY // Tell the accessibility object about the changes. if (mpAccContext.is()) mpAccContext->setModelAndView (pModel.get(), pView.get()); +#endif } void GraphCtrl::SetGraphic( const Graphic& rGraphic, bool bNewModel ) @@ -829,12 +836,14 @@ Point GraphCtrl::GetPositionInDialog() const css::uno::Reference< css::accessibility::XAccessible > GraphCtrl::CreateAccessible() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if(mpAccContext == nullptr ) { // Disable accessibility if no model/view data available if (pView && pModel) mpAccContext = new SvxGraphCtrlAccessibleContext(*this); } +#endif return mpAccContext; } diff --git a/svx/source/dialog/searchcharmap.cxx b/svx/source/dialog/searchcharmap.cxx index 1cdb3cfc082a..201e018d5652 100644 --- a/svx/source/dialog/searchcharmap.cxx +++ b/svx/source/dialog/searchcharmap.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <vcl/event.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> @@ -394,7 +396,9 @@ svx::SvxShowCharSetItem* SvxSearchCharSet::ImplGetItem( int _nPos ) ItemsMap::iterator aFind = m_aItems.find(_nPos); if ( aFind == m_aItems.end() ) { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY OSL_ENSURE(m_xAccessible.is(), "Who wants to create a child of my table without a parent?"); +#endif auto xItem = std::make_shared<svx::SvxShowCharSetItem>(*this, m_xAccessible.get(), sal::static_int_cast< sal_uInt16 >(_nPos)); aFind = m_aItems.emplace(_nPos, xItem).first; diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx index 341a7cc58a67..d3f3c3f79c9e 100644 --- a/svx/source/dialog/weldeditview.cxx +++ b/svx/source/dialog/weldeditview.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <basegfx/matrix/b2dhommatrix.hxx> #include <com/sun/star/accessibility/AccessibleRole.hpp> #include <com/sun/star/accessibility/AccessibleStateType.hpp> @@ -846,18 +848,22 @@ public: css::uno::Reference<css::accessibility::XAccessible> WeldEditView::CreateAccessible() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (!m_xAccessible.is()) m_xAccessible.set(new WeldEditAccessible(this)); +#endif return m_xAccessible; } WeldEditView::~WeldEditView() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (m_xAccessible.is()) { m_xAccessible->ClearWin(); // make Accessible nonfunctional m_xAccessible.clear(); } +#endif } bool WeldViewForwarder::IsValid() const { return m_rEditAcc.GetEditView() != nullptr; } @@ -1566,14 +1572,18 @@ void WeldEditView::SetDrawingArea(weld::DrawingArea* pDrawingArea) pDrawingArea->set_cursor(PointerStyle::Text); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY InitAccessible(); +#endif } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY void WeldEditView::InitAccessible() { if (m_xAccessible.is()) m_xAccessible->Init(GetEditEngine(), GetEditView()); } +#endif int WeldEditView::GetSurroundingText(OUString& rSurrounding) { @@ -1603,6 +1613,7 @@ void WeldEditView::GetFocus() weld::CustomWidgetController::GetFocus(); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (m_xAccessible.is()) { // Note: will implicitly send the AccessibleStateType::FOCUSED event @@ -1610,6 +1621,7 @@ void WeldEditView::GetFocus() if (pHelper) pHelper->SetFocus(); } +#endif } void WeldEditView::LoseFocus() @@ -1617,6 +1629,7 @@ void WeldEditView::LoseFocus() weld::CustomWidgetController::LoseFocus(); Invalidate(); // redraw without cursor +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (m_xAccessible.is()) { // Note: will implicitly send the AccessibleStateType::FOCUSED event @@ -1624,6 +1637,7 @@ void WeldEditView::LoseFocus() if (pHelper) pHelper->SetFocus(false); } +#endif } bool WeldEditView::CanFocus() const { return true; } diff --git a/svx/util/svx.component b/svx/util/svx.component index db47c36fc1e7..c655da210995 100644 --- a/svx/util/svx.component +++ b/svx/util/svx.component @@ -31,6 +31,7 @@ <implementation name="com.sun.star.comp.svx.RecoveryUI" constructor="com_sun_star_comp_svx_RecoveryUI_get_implementation"> <service name="com.sun.star.dialog.RecoveryUI"/> + <optional/> </implementation> <implementation name="com.sun.star.comp.svx.CrashReportUI" constructor="com_sun_star_comp_svx_CrashReportUI_get_implementation"> diff --git a/svx/util/svx.component.recoveryui b/svx/util/svx.component.recoveryui new file mode 100644 index 000000000000..2a3f4b0aed89 --- /dev/null +++ b/svx/util/svx.component.recoveryui @@ -0,0 +1,7 @@ +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +com.sun.star.comp.svx.RecoveryUI diff --git a/svx/util/svxcore.component b/svx/util/svxcore.component index d8989b71f4e9..d3b0942f4a84 100644 --- a/svx/util/svxcore.component +++ b/svx/util/svxcore.component @@ -21,6 +21,7 @@ <implementation name="com.sun.star.comp.Draw.GraphicExporter" constructor="com_sun_star_comp_Draw_GraphicExporter_get_implementation"> <service name="com.sun.star.drawing.GraphicExportFilter"/> + <optional/> </implementation> <implementation name="com.sun.star.comp.svx.ExtrusionDepthController" constructor="com_sun_star_comp_svx_ExtrusionDepthController_get_implementation"> diff --git a/svx/util/svxcore.component.draw b/svx/util/svxcore.component.draw new file mode 100644 index 000000000000..5192ae34fd88 --- /dev/null +++ b/svx/util/svxcore.component.draw @@ -0,0 +1,7 @@ +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +com.sun.star.comp.Draw.GraphicExporter diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk index 46f601c65d3d..daa08fb9f3f7 100644 --- a/sw/Library_sw.mk +++ b/sw/Library_sw.mk @@ -94,11 +94,8 @@ $(eval $(call gb_Library_use_externals,sw,\ libxml2 \ )) +ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE) $(eval $(call gb_Library_add_exception_objects,sw,\ - sw/source/core/SwNumberTree/SwNodeNum \ - sw/source/core/SwNumberTree/SwNumberTree \ - sw/source/core/access/AccessibilityCheck \ - sw/source/core/access/AccessibilityIssue \ sw/source/core/access/acccell \ sw/source/core/access/acccontext \ sw/source/core/access/accdoc \ @@ -125,6 +122,15 @@ $(eval $(call gb_Library_add_exception_objects,sw,\ sw/source/core/access/acctextframe \ sw/source/core/access/parachangetrackinginfo \ sw/source/core/access/textmarkuphelper \ + sw/source/uibase/docvw/SidebarWinAcc \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,sw,\ + sw/source/core/SwNumberTree/SwNodeNum \ + sw/source/core/SwNumberTree/SwNumberTree \ + sw/source/core/access/AccessibilityCheck \ + sw/source/core/access/AccessibilityIssue \ sw/source/core/attr/BorderCacheOwner \ sw/source/core/attr/calbck \ sw/source/core/attr/cellatr \ @@ -626,7 +632,6 @@ $(eval $(call gb_Library_add_exception_objects,sw,\ sw/source/uibase/docvw/PostItMgr \ sw/source/uibase/docvw/ShadowOverlayObject \ sw/source/uibase/docvw/SidebarTxtControl \ - sw/source/uibase/docvw/SidebarWinAcc \ sw/source/uibase/docvw/HeaderFooterWin \ sw/source/uibase/docvw/OutlineContentVisibilityWin \ sw/source/uibase/docvw/edtdd \ diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index ae7b2c81133d..e4b1d55b1d9e 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <memory> #include <com/sun/star/text/XTextRange.hpp> @@ -1545,6 +1547,7 @@ static void lcl_CheckHiddenPara( SwPosition& rPos ) rPos = SwPosition( aTmp, SwIndex( pTextNd, 0 ) ); } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY namespace { // #i27301# - helper class that notifies the accessibility about invalid text @@ -1566,6 +1569,7 @@ class SwNotifyAccAboutInvalidTextSelections }; } +#endif void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) { @@ -1579,7 +1583,9 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) return; // if not then no update } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY SwNotifyAccAboutInvalidTextSelections aInvalidateTextSelections( *this ); +#endif if ( m_bIgnoreReadonly ) { @@ -1747,8 +1753,10 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) m_pVisibleCursor->Show(); // show again } m_eMvState = CursorMoveState::NONE; // state for cursor travelling - GetModelPositionForViewPoint +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (Imp()->IsAccessible()) Imp()->InvalidateAccessibleCursorPosition( pTableFrame ); +#endif return; } } @@ -2019,8 +2027,10 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) m_eMvState = CursorMoveState::NONE; // state for cursor travelling - GetModelPositionForViewPoint +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (Imp()->IsAccessible()) Imp()->InvalidateAccessibleCursorPosition( pFrame ); +#endif // switch from blinking cursor to read-only-text-selection cursor const sal_uInt64 nBlinkTime = GetOut()->GetSettings().GetStyleSettings(). diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 6c1afc01070e..1087f9eebfa4 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <libxml/xmlwriter.h> #include <hintids.hxx> @@ -1117,6 +1119,7 @@ void SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if ( pNew->IsTextFrame() ) { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); @@ -1130,6 +1133,7 @@ void SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx) pPrev ? pPrev->DynCastTextFrame() : nullptr ); } } +#endif pNew = pSct; } @@ -1145,6 +1149,7 @@ void SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if ( pNew->IsTextFrame() ) { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); @@ -1158,6 +1163,7 @@ void SwSectionNode::MakeFramesForAdjacentContentNode(const SwNodeIndex & rIdx) pPrev ? pPrev->DynCastTextFrame() : nullptr ); } } +#endif if ( bInitNewSect ) static_cast<SwSectionFrame*>(pNew)->Init(); } diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 1b0e09f9b0f2..302fbd007b8d 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <memory> #include <fesh.hxx> #include <hintids.hxx> @@ -2427,6 +2429,7 @@ void SwTableNode::MakeOwnFrames(SwNodeIndex* pIdxBehind) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && @@ -2439,6 +2442,7 @@ void SwTableNode::MakeOwnFrames(SwNodeIndex* pIdxBehind) pPrev ? pPrev->DynCastTextFrame() : nullptr ); } } +#endif pNew->RegistFlys(); } } @@ -2464,6 +2468,7 @@ void SwTableNode::DelFrames(SwRootFrame const*const pLayout) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for current next paragraph will change // and relation CONTENT_FLOWS_TO for current previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && @@ -2476,6 +2481,7 @@ void SwTableNode::DelFrames(SwRootFrame const*const pLayout) pPrev ? pPrev->DynCastTextFrame() : nullptr ); } } +#endif if (pFrame->GetUpper()) pFrame->Cut(); SwFrame::DestroyFrame(pFrame); diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index f0ee2aad5b6c..1995377f9a51 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <hintids.hxx> #include <editeng/protitem.hxx> #include <osl/diagnose.h> @@ -1385,6 +1387,7 @@ void SwContentNode::MakeFramesForAdjacentContentNode(SwContentNode& rNode) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if ( pNew->IsTextFrame() ) { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); @@ -1398,6 +1401,7 @@ void SwContentNode::MakeFramesForAdjacentContentNode(SwContentNode& rNode) pPrev ? pPrev->DynCastTextFrame() : nullptr ); } } +#endif } } @@ -1482,6 +1486,7 @@ void SwContentNode::DelFrames(SwRootFrame const*const pLayout) // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for current next paragraph will change // and relation CONTENT_FLOWS_TO for current previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && pViewShell->GetLayout()->IsAnyShellAccessible() ) @@ -1492,6 +1497,7 @@ void SwContentNode::DelFrames(SwRootFrame const*const pLayout) pNext ? pNext->DynCastTextFrame() : nullptr, pPrev ? pPrev->DynCastTextFrame() : nullptr ); } +#endif } if( pFrame->IsFollow() ) diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index 12b955d04ee5..b7e0aa638839 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <hintids.hxx> #include <svtools/optionsdrawinglayer.hxx> #include <svx/svdpage.hxx> @@ -379,6 +381,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, nNewPos ); pDrawPage->RecalcObjOrdNums(); // adjustments for accessibility API +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if ( auto pTmpFlyFrame = pAnchoredObj->DynCastFlyFrame() ) { m_rImp.DisposeAccessibleFrame( pTmpFlyFrame ); @@ -389,6 +392,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, m_rImp.DisposeAccessibleObj(pAnchoredObj->GetDrawObj(), true); m_rImp.AddAccessibleObj( pAnchoredObj->GetDrawObj() ); } +#endif } aAnchoredObjs.pop_back(); } @@ -412,6 +416,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, nTmpNewPos ); pDrawPage->RecalcObjOrdNums(); // adjustments for accessibility API +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if ( auto pTmpFlyFrame = pAnchoredObj->DynCastFlyFrame() ) { m_rImp.DisposeAccessibleFrame( pTmpFlyFrame ); @@ -422,6 +427,7 @@ void SwDrawView::MoveRepeatedObjs( const SwAnchoredObject& _rMovedAnchoredObj, m_rImp.DisposeAccessibleObj(pAnchoredObj->GetDrawObj(), true); m_rImp.AddAccessibleObj( pAnchoredObj->GetDrawObj() ); } +#endif } aAnchoredObjs.pop_back(); } @@ -589,8 +595,10 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos, if ( auto pFlyFrame = pMovedAnchoredObj->DynCastFlyFrame() ) { // adjustments for accessibility API +#if !ENABLE_WASM_STRIP_ACCESSIBILITY m_rImp.DisposeAccessibleFrame( pFlyFrame ); m_rImp.AddAccessibleFrame( pFlyFrame ); +#endif const sal_uInt32 nChildNewPos = bMovedForward ? nNewPos : nNewPos+1; size_t i = bMovedForward ? nOldPos : nObjCount-1; @@ -617,6 +625,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos, // collect 'child' object aMovedChildObjs.push_back( pTmpObj ); // adjustments for accessibility API +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if ( auto pFlyDrawObj = dynamic_cast<SwVirtFlyDrawObj *>( pTmpObj ) ) { const SwFlyFrame *pTmpFlyFrame = pFlyDrawObj->GetFlyFrame(); @@ -628,6 +637,7 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos, m_rImp.DisposeAccessibleObj(pTmpObj, true); m_rImp.AddAccessibleObj( pTmpObj ); } +#endif } else { @@ -641,12 +651,14 @@ void SwDrawView::ObjOrderChanged( SdrObject* pObj, size_t nOldPos, } while ( ( bMovedForward && i < ( nObjCount - aMovedChildObjs.size() ) ) || ( !bMovedForward && i > ( nNewPos + aMovedChildObjs.size() ) ) ); } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY else { // adjustments for accessibility API m_rImp.DisposeAccessibleObj(pObj, true); m_rImp.AddAccessibleObj( pObj ); } +#endif MoveRepeatedObjs( *pMovedAnchoredObj, aMovedChildObjs ); } diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx index 3e37961dffd6..996aa1f3a5bb 100644 --- a/sw/source/core/layout/anchoreddrawobject.cxx +++ b/sw/source/core/layout/anchoreddrawobject.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <dcontact.hxx> #include <rootfrm.hxx> #include <pagefrm.hxx> @@ -123,11 +125,13 @@ SwPosNotify::~SwPosNotify() COVERITY_NOEXCEPT_FALSE } } // tdf#101464 notify SwAccessibleMap about new drawing object position +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (mpOldPageFrame && mpOldPageFrame->getRootFrame()->IsAnyShellAccessible()) { mpOldPageFrame->getRootFrame()->GetCurrShell()->Imp()->MoveAccessible( nullptr, mpAnchoredDrawObj->GetDrawObj(), maOldObjRect); } +#endif } // --> #i32795# diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index b4b98f6e76cc..28cd55a2dbcc 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <svl/itemiter.hxx> #include <vcl/imap.hxx> #include <tools/helpers.hxx> @@ -262,6 +264,7 @@ void SwFlyFrame::DestroyImpl() // For frames bound as char or frames that don't have an anchor we have // to do that ourselves. For any other frame the call RemoveFly at the // anchor will do that. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( IsAccessibleFrame() && GetFormat() && (IsFlyInContentFrame() || !GetAnchorFrame()) ) { SwRootFrame *pRootFrame = getRootFrame(); @@ -276,6 +279,7 @@ void SwFlyFrame::DestroyImpl() } } } +#endif if( GetFormat() && !GetFormat()->GetDoc()->IsInDtor() ) { @@ -485,6 +489,7 @@ void SwFlyFrame::ChainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) } // invalidate accessible relation set (accessibility wrapper) +#if !ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pSh = pMaster->getRootFrame()->GetCurrShell(); if( pSh ) { @@ -492,6 +497,7 @@ void SwFlyFrame::ChainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) if( pLayout && pLayout->IsAnyShellAccessible() ) pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow ); } +#endif } void SwFlyFrame::UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) @@ -531,6 +537,7 @@ void SwFlyFrame::UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) pFollow->GetFormat()->GetDoc(), ++nIndex ); // invalidate accessible relation set (accessibility wrapper) +#if !ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pSh = pMaster->getRootFrame()->GetCurrShell(); if( pSh ) { @@ -538,6 +545,7 @@ void SwFlyFrame::UnchainFrames( SwFlyFrame *pMaster, SwFlyFrame *pFollow ) if( pLayout && pLayout->IsAnyShellAccessible() ) pSh->Imp()->InvalidateAccessibleRelationSet( pMaster, pFollow ); } +#endif } SwFlyFrame *SwFlyFrame::FindChainNeighbour( SwFrameFormat const &rChain, SwFrame *pAnch ) @@ -794,12 +802,14 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, const SvxProtectItem *pP = static_cast<const SvxProtectItem*>(pNew); GetVirtDrawObj()->SetMoveProtect( pP->IsPosProtected() ); GetVirtDrawObj()->SetResizeProtect( pP->IsSizeProtected() ); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( pSh ) { SwRootFrame* pLayout = getRootFrame(); if( pLayout && pLayout->IsAnyShellAccessible() ) pSh->Imp()->InvalidateAccessibleEditableState( true, this ); } +#endif } break; case RES_COL: @@ -977,6 +987,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, rIDDMA.GetHeavenId() : rIDDMA.GetHellId(); GetVirtDrawObj()->SetLayer( nId ); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( pSh ) { SwRootFrame* pLayout = getRootFrame(); @@ -986,6 +997,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, pSh->Imp()->AddAccessibleFrame( this ); } } +#endif // #i28701# - perform reorder of object lists // at anchor frame and at page frame. rInvFlags |= SwFlyFrameInvFlags::UpdateObjInSortedList; @@ -2204,6 +2216,7 @@ void SwFrame::RemoveFly( SwFlyFrame *pToRemove ) pPage->RemoveFlyFromPage( pToRemove ); } // #i73201# +#if !ENABLE_WASM_STRIP_ACCESSIBILITY else { if ( pToRemove->IsAccessibleFrame() && @@ -2221,6 +2234,7 @@ void SwFrame::RemoveFly( SwFlyFrame *pToRemove ) } } } +#endif m_pDrawObjs->Remove(*pToRemove); if (!m_pDrawObjs->size()) @@ -2302,6 +2316,7 @@ void SwFrame::AppendDrawObj( SwAnchoredObject& _rNewObj ) } // Notify accessible layout. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pSh = getRootFrame()->GetCurrShell(); if( pSh ) { @@ -2311,6 +2326,7 @@ void SwFrame::AppendDrawObj( SwAnchoredObject& _rNewObj ) pSh->Imp()->AddAccessibleObj( _rNewObj.GetDrawObj() ); } } +#endif assert(!m_pDrawObjs || m_pDrawObjs->is_sorted()); } @@ -2318,6 +2334,7 @@ void SwFrame::AppendDrawObj( SwAnchoredObject& _rNewObj ) void SwFrame::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj ) { // Notify accessible layout. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY SwViewShell* pSh = getRootFrame()->GetCurrShell(); if( pSh ) { @@ -2325,6 +2342,7 @@ void SwFrame::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj ) if (pLayout && pLayout->IsAnyShellAccessible()) pSh->Imp()->DisposeAccessibleObj(_rToRemoveObj.GetDrawObj(), false); } +#endif // deregister from page frame SwPageFrame* pPage = _rToRemoveObj.GetPageFrame(); diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index 44083e8a5001..cb490c366a9b 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <pagefrm.hxx> #include <rootfrm.hxx> #include <cntfrm.hxx> @@ -846,6 +848,7 @@ void SwPageFrame::AppendFlyToPage( SwFlyFrame *pNew ) // Notify accessible layout. That's required at this place for // frames only where the anchor is moved. Creation of new frames // is additionally handled by the SwFrameNotify class. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( GetUpper() && static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) @@ -853,6 +856,7 @@ void SwPageFrame::AppendFlyToPage( SwFlyFrame *pNew ) static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() ->AddAccessibleFrame( pNew ); } +#endif } // #i28701# - correction: consider also drawing objects @@ -919,6 +923,7 @@ void SwPageFrame::RemoveFlyFromPage( SwFlyFrame *pToRemove ) // Notify accessible layout. That's required at this place for // frames only where the anchor is moved. Creation of new frames // is additionally handled by the SwFrameNotify class. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( GetUpper() && static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) @@ -926,6 +931,7 @@ void SwPageFrame::RemoveFlyFromPage( SwFlyFrame *pToRemove ) static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() ->DisposeAccessibleFrame( pToRemove, true ); } +#endif // #i28701# - use new method <SetPageFrame(..)> pToRemove->SetPageFrame( nullptr ); @@ -955,6 +961,7 @@ void SwPageFrame::MoveFly( SwFlyFrame *pToMove, SwPageFrame *pDest ) // Notify accessible layout. That's required at this place for // frames only where the anchor is moved. Creation of new frames // is additionally handled by the SwFrameNotify class. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( GetUpper() && static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) @@ -962,6 +969,7 @@ void SwPageFrame::MoveFly( SwFlyFrame *pToMove, SwPageFrame *pDest ) static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() ->DisposeAccessibleFrame( pToMove, true ); } +#endif // The FlyColl might be gone already, because the page's dtor is being executed. if ( m_pSortedObjs ) @@ -991,6 +999,7 @@ void SwPageFrame::MoveFly( SwFlyFrame *pToMove, SwPageFrame *pDest ) // Notify accessible layout. That's required at this place for // frames only where the anchor is moved. Creation of new frames // is additionally handled by the SwFrameNotify class. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( GetUpper() && static_cast< SwRootFrame * >( GetUpper() )->IsAnyShellAccessible() && static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell() ) @@ -998,6 +1007,7 @@ void SwPageFrame::MoveFly( SwFlyFrame *pToMove, SwPageFrame *pDest ) static_cast< SwRootFrame * >( GetUpper() )->GetCurrShell()->Imp() ->AddAccessibleFrame( pToMove ); } +#endif // #i28701# - correction: move lowers of Writer fly frame if ( !pToMove->GetDrawObjs() ) diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index b2ac45b5ead9..ee50dcc7cd12 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_wasm_strip.h> + #include <svx/svdpage.hxx> #include <editeng/brushitem.hxx> #include <editeng/shaditem.hxx> @@ -264,6 +266,7 @@ void SwFrameNotify::ImplDestroy() if ( bAbsP || bPrtP || bChgWidth || bChgHeight || bPrtWidth || bPrtHeight || bChgFlyBasePos ) { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( mpFrame->IsAccessibleFrame() ) { SwRootFrame *pRootFrame = mpFrame->getRootFrame(); @@ -273,6 +276,7 @@ void SwFrameNotify::ImplDestroy() pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( mpFrame, maFrame ); } } +#endif // Notification of anchored objects if ( mpFrame->GetDrawObjs() ) @@ -392,6 +396,7 @@ void SwFrameNotify::ImplDestroy() } } } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY else if( mpFrame->IsTextFrame() && mbValidSize != mpFrame->isFrameAreaSizeValid() ) { SwRootFrame *pRootFrame = mpFrame->getRootFrame(); @@ -401,6 +406,7 @@ void SwFrameNotify::ImplDestroy() pRootFrame->GetCurrShell()->Imp()->InvalidateAccessibleFrameContent( mpFrame ); } } +#endif // #i9046# Automatic frame width SwFlyFrame* pFly = nullptr; @@ -1600,6 +1606,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if ( pFrame->IsTextFrame() ) { SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); @@ -1623,6 +1630,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, pFrame->InvalidateInfFlags(); } } +#endif // OD 12.08.2003 #i17969# - consider horizontal/vertical layout // for setting position at newly inserted frame lcl_SetPos( *pFrame, *pLay ); @@ -1696,6 +1704,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); // no notification, if <SwViewShell> is in construction @@ -1711,6 +1720,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, pPrev ? pPrev->DynCastTextFrame() : nullptr ); } } +#endif if ( bObjsDirect && !pTable->empty() ) static_cast<SwTabFrame*>(pFrame)->RegistFlys(); // OD 12.08.2003 #i17969# - consider horizontal/vertical layout @@ -1813,6 +1823,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, // CONTENT_FLOWS_FROM/_TO relation. // Relation CONTENT_FLOWS_FROM for next paragraph will change // and relation CONTENT_FLOWS_TO for previous paragraph will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pFrame->getRootFrame()->GetCurrShell() ); // no notification, if <SwViewShell> is in construction @@ -1828,6 +1839,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, pPrev ? pPrev->DynCastTextFrame() : nullptr ); } } +#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 047a7ecf7a12..a21a16f64afe 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -18,6 +18,7 @@ */ #include <config_feature_desktop.h> +#include <config_wasm_strip.h> #include <ctime> #include <rootfrm.hxx> @@ -2390,8 +2391,10 @@ SwLayIdle::SwLayIdle( SwRootFrame *pRt, SwViewShellImp *pI ) : m_pImp->GetShell()->EnableSmooth( true ); +#if !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 fe84f956a35c..e5e62d0b47bd 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 <config_wasm_strip.h> + #include <comphelper/lok.hxx> #include <ndole.hxx> #include <sal/log.hxx> @@ -2067,23 +2069,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: +#if !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 9b33ceeadd63..ce0c7a813f51 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 <config_wasm_strip.h> + #include <sal/config.h> #include <sal/log.hxx> @@ -202,6 +204,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. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && @@ -214,6 +217,7 @@ void SwSectionFrame::DelEmpty( bool bRemove ) pPrev ? pPrev->DynCastTextFrame() : nullptr ); } } +#endif Cut_( bRemove ); } SwSectionFrame *pMaster = IsFollow() ? FindMaster() : nullptr; @@ -2718,11 +2722,13 @@ void SwSectionFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pN break; case RES_PROTECT: +#if !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 486d67bb9e95..c7d11b3cabed 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 <config_wasm_strip.h> + #include <pagefrm.hxx> #include <rootfrm.hxx> #include <dcontact.hxx> @@ -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. +#if !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 95388db5c9ac..47a71e8bf42c 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 <config_wasm_strip.h> + #include <pagefrm.hxx> #include <rootfrm.hxx> #include <IDocumentFieldsAccess.hxx> @@ -3231,8 +3233,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()); @@ -3261,12 +3261,15 @@ SwTwips SwTabFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) aRectFnSet.AddBottom( aFrm, nDist ); } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY SwRootFrame *pRootFrame = getRootFrame(); if( pRootFrame && pRootFrame->IsAnyShellAccessible() && pRootFrame->GetCurrShell() ) { + SwRect aOldFrame( getFrameArea() ); pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( this, aOldFrame ); } +#endif } } @@ -4582,9 +4585,10 @@ void SwRowFrame::AdjustCells( const SwTwips nHeight, const bool bHeight ) SwFrame *pFrame = Lower(); if ( bHeight ) { - SwRootFrame *pRootFrame = getRootFrame(); SwRectFnSet aRectFnSet(this); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY SwRect aOldFrame; +#endif while ( pFrame ) { @@ -4651,7 +4655,9 @@ void SwRowFrame::AdjustCells( const SwTwips nHeight, const bool bHeight ) const tools::Long nDiff = nSumRowHeight - aRectFnSet.GetHeight(pToAdjust->getFrameArea()); if ( nDiff ) { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY aOldFrame = pToAdjust->getFrameArea(); +#endif SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*pToAdjust); aRectFnSet.AddBottom( aFrm, nDiff ); pNotify = pToAdjust; @@ -4659,8 +4665,11 @@ void SwRowFrame::AdjustCells( const SwTwips nHeight, const bool bHeight ) if ( pNotify ) { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY + SwRootFrame *pRootFrame = getRootFrame(); if( pRootFrame && pRootFrame->IsAnyShellAccessible() && pRootFrame->GetCurrShell() ) pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( pNotify, aOldFrame ); +#endif pNotify->InvalidatePrt_(); } @@ -4931,12 +4940,14 @@ void SwCellFrame::DestroyImpl() { // At this stage the lower frames aren't destroyed already, // therefore we have to do a recursive dispose. +#if !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() ) @@ -5551,12 +5562,14 @@ void SwCellFrame::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) InvalidatePrt(); } } +#if !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); @@ -5698,6 +5711,7 @@ void SwCellFrame::dumpAsXmlAttributes(xmlTextWriterPtr pWriter) const void SwCellFrame::Cut() { // notification for accessibility +#if !ENABLE_WASM_STRIP_ACCESSIBILITY { SwRootFrame *pRootFrame = getRootFrame(); if( pRootFrame && pRootFrame->IsAnyShellAccessible() ) @@ -5709,6 +5723,7 @@ void SwCellFrame::Cut() } } } +#endif SwLayoutFrame::Cut(); } diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index dea716d803d6..13c8bae2e618 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 <config_wasm_strip.h> + #include <hints.hxx> #include <osl/diagnose.h> #include <o3tl/safeint.hxx> @@ -2785,6 +2787,7 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) } } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( bMoveAccFrame && IsAccessibleFrame() ) { SwRootFrame *pRootFrame = getRootFrame(); @@ -2794,6 +2797,11 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo ) pRootFrame->GetCurrShell()->Imp()->MoveAccessibleFrame( this, aOldFrame ); } } +#else + (void)bMoveAccFrame; + (void)aOldFrame; +#endif + return nReal; } @@ -2929,6 +2937,7 @@ SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo ) AdjustNeighbourhood( nReal - nShrink ); } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( bMoveAccFrame && IsAccessibleFrame() ) { SwRootFrame *pRootFrame = getRootFrame(); @@ -2938,6 +2947,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 93b6e2b272d8..2ad1e648874b 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 <config_wasm_strip.h> + #include <sal/config.h> #include <sal/log.hxx> @@ -663,6 +665,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 <this>, will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pFoll->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && @@ -674,6 +677,8 @@ SwContentFrame *SwTextFrame::JoinFrame() this ); } } +#endif + pFoll->Cut(); SetFollow(pNxt); SwFrame::DestroyFrame(pFoll); @@ -698,6 +703,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 <this>, will change. +#if !ENABLE_WASM_STRIP_ACCESSIBILITY { SwViewShell* pViewShell( pNew->getRootFrame()->GetCurrShell() ); if ( pViewShell && pViewShell->GetLayout() && @@ -709,6 +715,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 eda5507c1ef7..b592f179226f 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 <config_wasm_strip.h> + #include <hintids.hxx> #include <hints.hxx> #include <svl/ctloptions.hxx> @@ -1949,6 +1951,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 */ +#if !ENABLE_WASM_STRIP_ACCESSIBILITY static bool isA11yRelevantAttribute(sal_uInt16 nWhich) { return nWhich != RES_CHRATR_RSID; @@ -1962,6 +1965,7 @@ static bool hasA11yRelevantAttribute( const std::vector<sal_uInt16>& 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) } } +#if !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)); } +#if !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 f4d43feb3cdc..f68518148749 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 <config_wasm_strip.h> + #include <hintids.hxx> #include <vcl/svapp.hxx> #include <svl/itemiter.hxx> @@ -1400,9 +1402,11 @@ SwRect SwTextFrame::AutoSpell_(SwTextNode & rNode, sal_Int32 nActPos) aRect = lcl_CalculateRepaintRect(*this, rNode, nChgStart, nChgEnd); // fdo#71558 notify misspelled word to accessibility +#if !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 1dac62197f13..5fc740ebfda9 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 <config_wasm_strip.h> + #include <pagepreviewlayout.hxx> #include <prevwpage.hxx> @@ -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. +#if !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 f1b2c2531897..d6bf3833e2fb 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 <config_wasm_strip.h> + #include <rootfrm.hxx> #include <pagefrm.hxx> #include <viewimp.hxx> @@ -97,7 +99,9 @@ SwViewShellImp::SwViewShellImp( SwViewShell *pParent ) : SwViewShellImp::~SwViewShellImp() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY m_pAccessibleMap.reset(); +#endif m_pPagePreviewLayout.reset(); @@ -320,6 +324,7 @@ void SwViewShellImp::InitPagePreviewLayout() m_pPagePreviewLayout.reset( new SwPagePreviewLayout( *m_pShell, *(m_pShell->GetLayout()) ) ); } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY void SwViewShellImp::UpdateAccessible() { // We require a layout and an XModel to be accessible. @@ -491,5 +496,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..4d2385483c92 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 <config_wasm_strip.h> + #include <tools/fract.hxx> #include <osl/diagnose.h> #include <viewsh.hxx> @@ -37,7 +39,11 @@ SwPagePreviewLayout* SwViewShell::PagePreviewLayout() void SwViewShell::ShowPreviewSelection( sal_uInt16 nSelPage ) { +#if !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 1c5981c08a56..bb412cc25098 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -18,6 +18,8 @@ */ #include <officecfg/Office/Common.hxx> +#include <config_wasm_strip.h> + #include <com/sun/star/accessibility/XAccessible.hpp> #include <sfx2/viewfrm.hxx> #include <sfx2/progress.hxx> @@ -251,10 +253,12 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) UISizeNotify(); // tdf#101464 print preview may generate events if another view shell // performs layout... +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (IsPreview() && Imp()->IsAccessible()) { Imp()->FireAccessibleEvents(); } +#endif return; } @@ -459,8 +463,10 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) UISizeNotify(); ++mnStartAction; +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( Imp()->IsAccessible() ) Imp()->FireAccessibleEvents(); +#endif } void SwViewShell::ImplStartAction() @@ -1334,8 +1340,10 @@ void SwViewShell::VisPortChgd( const SwRect &rRect) if ( !bScrolled && pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ) pPostItMgr->CorrectPositions(); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( Imp()->IsAccessible() ) Imp()->UpdateAccessible(); +#endif } bool SwViewShell::SmoothScroll( tools::Long lXDiff, tools::Long lYDiff, const tools::Rectangle *pRect ) @@ -2491,8 +2499,10 @@ void SwViewShell::SetReadonlyOption(bool bSet) } else if ( GetWin() ) GetWin()->Invalidate(); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if( Imp()->IsAccessible() ) Imp()->InvalidateAccessibleEditableState( false ); +#endif } void SwViewShell::SetPDFExportOption(bool bSet) @@ -2545,6 +2555,7 @@ bool SwViewShell::IsNewLayout() const return GetLayout()->IsNewLayout(); } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY uno::Reference< css::accessibility::XAccessible > SwViewShell::CreateAccessible() { uno::Reference< css::accessibility::XAccessible > xAcc; @@ -2648,6 +2659,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 5dcb89e89ea0..c5518afa822f 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 <config_wasm_strip.h> + #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" ); +#if !ENABLE_WASM_STRIP_CHART + // WASM_CHART change + // TODO: With Chart extracted this cannot really happen since + // no Chart could've been added at all oox::drawingml::ChartExport aChartExport(XML_w, pChartFS, xModel, &m_rFilter, oox::drawingml::DOCUMENT_DOCX); css::uno::Reference<css::util::XModifiable> 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 f5d537b8974a..8042ed313605 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -19,6 +19,7 @@ #include <config_features.h> #include <config_fuzzers.h> +#include <config_wasm_strip.h> #include <comphelper/propertysequence.hxx> #include <sfx2/dispatch.hxx> @@ -965,13 +966,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(); @@ -983,19 +981,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<SwView *>( pViewShell )) - pSwView->ApplyAccessibilityOptions(*m_pAccessibilityOptions); - else if(auto pPagePreview = dynamic_cast<SwPagePreview *>( pViewShell )) - pPagePreview->ApplyAccessibilityOptions(*m_pAccessibilityOptions); - } pViewShell->GetWindow()->Invalidate(); } } pViewShell = SfxViewShell::GetNext( *pViewShell ); } } +#if !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<SwView *>( pViewShell ); + auto pPagePreview = dynamic_cast<SwPagePreview *>( 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 44e42d6f58c3..857850f1a55d 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 <config_wasm_strip.h> + #include <memory> #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> @@ -1561,9 +1563,13 @@ void SwDocShell::MakeByExample( const OUString &rName, SfxStyleFamily nFamily, sfx::AccessibilityIssueCollection SwDocShell::runAccessibilityCheck() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY sw::AccessibilityCheck aCheck(m_xDoc.get()); aCheck.check(); return aCheck.getIssueCollection(); +#else + return sfx::AccessibilityIssueCollection(); +#endif } std::set<Color> SwDocShell::GetDocColors() diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index c41b7a2136a8..b7858a97350f 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 <config_wasm_strip.h> + #include <AnnotationWin.hxx> #include <PostItMgr.hxx> @@ -115,9 +117,11 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin, mpShadow->setVisible(false); } +#if !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 @@ -132,9 +136,10 @@ SwAnnotationWin::~SwAnnotationWin() void SwAnnotationWin::dispose() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY mrMgr.DisconnectSidebarWinFromFrame( *(mrSidebarItem.maLayoutInfo.mpAnchorFrame), *this ); - +#endif Disable(); mxSidebarTextControlWin.reset(); diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 6981b422ca0e..7872d02b38e7 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 <config_wasm_strip.h> + #include <sal/config.h> #include <cstddef> @@ -1406,15 +1408,18 @@ bool SwAnnotationWin::IsScrollbarVisible() const void SwAnnotationWin::ChangeSidebarItem( SwSidebarItem const & rSidebarItem ) { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY const bool bAnchorChanged = mpAnchorFrame != rSidebarItem.maLayoutInfo.mpAnchorFrame; if ( bAnchorChanged ) { mrMgr.DisconnectSidebarWinFromFrame( *mpAnchorFrame, *this ); } +#endif mrSidebarItem = rSidebarItem; mpAnchorFrame = mrSidebarItem.maLayoutInfo.mpAnchorFrame; +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (mxSidebarWinAccessible) mxSidebarWinAccessible->ChangeSidebarItem( mrSidebarItem ); @@ -1424,10 +1429,12 @@ void SwAnnotationWin::ChangeSidebarItem( SwSidebarItem const & rSidebarItem ) mrSidebarItem.GetFormatField(), *this ); } +#endif } css::uno::Reference< css::accessibility::XAccessible > SwAnnotationWin::CreateAccessible() { +#if !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. @@ -1435,6 +1442,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 bd8eb7c348f8..9c1963ea6108 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 <config_wasm_strip.h> + #include <boost/property_tree/json_parser.hpp> #include <PostItMgr.hxx> @@ -2406,6 +2408,7 @@ void SwPostItMgr::ToggleInsModeOnActiveSidebarWin() } } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY void SwPostItMgr::ConnectSidebarWinToFrame( const SwFrame& rFrame, const SwFormatField& rFormatField, SwAnnotationWin& rSidebarWin ) @@ -2436,6 +2439,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 3ffcdf76d6ee..fecaf6aafef3 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 <config_wasm_strip.h> + #include "SidebarTxtControl.hxx" #include <docsh.hxx> @@ -125,7 +127,9 @@ void SidebarTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea) pDrawingArea->set_cursor(PointerStyle::Text); +#if !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 91b4d970f5ad..859c35664fea 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 <config_wasm_strip.h> + #include <swtypes.hxx> #include <hintids.hxx> @@ -5311,14 +5313,18 @@ void SwEditWin::GetFocus() { m_rView.GotFocus(); Window::GetFocus(); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY m_rView.GetWrtShell().InvalidateAccessibleFocus(); +#endif } } void SwEditWin::LoseFocus() { +#if !ENABLE_WASM_STRIP_ACCESSIBILITY if (m_rView.GetWrtShellPtr()) m_rView.GetWrtShell().InvalidateAccessibleFocus(); +#endif Window::LoseFocus(); if( s_pQuickHlpData && s_pQuickHlpData->m_bIsDisplayed ) s_pQuickHlpData->Stop( m_rView.GetWrtShell() ); @@ -6013,6 +6019,7 @@ void SwEditWin::SetChainMode( bool bOn ) uno::Reference< css::accessibility::XAccessible > SwEditWin::CreateAccessible() { +#if !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" ); @@ -6022,6 +6029,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 194af1799ba9..3e13df5ec568 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -19,6 +19,7 @@ #include <config_features.h> #include <config_fuzzers.h> +#include <config_wasm_strip.h> #include <sal/config.h> diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 165c119e08bc..2ef6de717240 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 <config_wasm_strip.h> + #include <sfx2/objface.hxx> #include <vcl/help.hxx> #include <vcl/commandevent.hxx> @@ -1121,7 +1123,9 @@ void SwPagePreview::Init() aOpt.SetHideWhitespaceMode( false ); GetViewShell()->ApplyViewOptions( aOpt ); +#if !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); @@ -1815,7 +1819,7 @@ uno::Reference< css::accessibility::XAccessible > SwPagePreviewWin::CreateAccessible() { SolarMutexGuard aGuard; // this should have happened already!!! - +#if !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()) @@ -1827,6 +1831,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 7500f740369b..0aeb611d5ed4 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -22,6 +22,7 @@ #include <string_view> #include <config_features.h> +#include <config_wasm_strip.h> #include <stdlib.h> #include <hintids.hxx> @@ -973,7 +974,9 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) m_pWrtShell->SetUIOptions( aUsrPref ); m_pWrtShell->SetReadOnlyAvailable( aUsrPref.IsCursorInProtectedArea() ); +#if !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 b9d04202d607..a1cfb72330a5 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -18,6 +18,7 @@ */ #include <config_features.h> +#include <config_wasm_strip.h> #include <SwSpellDialogChildWindow.hxx> #include <svl/eitem.hxx> @@ -115,11 +116,14 @@ view::XSelectionSupplier* SwView::GetUNOObject() void SwView::ApplyAccessibilityOptions(SvtAccessibilityOptions const & rAccessibilityOptions) { +#if 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<SwMailMergeConfigItem> const & rConfigItem) diff --git a/toolkit/source/helper/accessibilityclient.cxx b/toolkit/source/helper/accessibilityclient.cxx index 7136dc5a3a8d..773bc9bfbd06 100644 --- a/toolkit/source/helper/accessibilityclient.cxx +++ b/toolkit/source/helper/accessibilityclient.cxx @@ -18,6 +18,7 @@ */ #include <config_feature_desktop.h> +#include <config_wasm_strip.h> #include <sal/config.h> @@ -41,8 +42,10 @@ namespace toolkit oslModule s_hAccessibleImplementationModule = nullptr; #endif #if HAVE_FEATURE_DESKTOP +#if !ENABLE_WASM_STRIP_ACCESSIBILITY GetStandardAccComponentFactory s_pAccessibleFactoryFunc = nullptr; #endif +#endif ::rtl::Reference< IAccessibleFactory > s_pFactory; } @@ -156,6 +159,7 @@ namespace toolkit { } +#if !ENABLE_WASM_STRIP_ACCESSIBILITY #if HAVE_FEATURE_DESKTOP #ifndef DISABLE_DYNLOADING extern "C" { static void thisModule() {} } @@ -163,6 +167,7 @@ namespace toolkit extern "C" void *getStandardAccessibleFactory(); #endif #endif // HAVE_FEATURE_DESKTOP +#endif // ENABLE_WASM_STRIP_ACCESSIBILITY void AccessibilityClient::ensureInitialized() { @@ -171,6 +176,7 @@ namespace toolkit ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); +#if !ENABLE_WASM_STRIP_ACCESSIBILITY #if HAVE_FEATURE_DESKTOP // load the library implementing the factory if (!s_pFactory) @@ -203,6 +209,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 15c7b5a0960f..d777adc2c499 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 4c3abf6f08e9..ebf87d7e8b70 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -145,7 +145,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 bde384f05086..efca0207b6b1 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/CairoCommon.cxx b/vcl/headless/CairoCommon.cxx index f8ab8ce71889..d77b35d55781 100644 --- a/vcl/headless/CairoCommon.cxx +++ b/vcl/headless/CairoCommon.cxx @@ -485,9 +485,11 @@ void CairoCommon::releaseCairoContext(cairo_t* cr, bool bXorModeAllowed, if (nUnscaledExtentsBottom > target_surface_height) nUnscaledExtentsBottom = target_surface_height; +#if !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); @@ -498,6 +500,17 @@ void CairoCommon::releaseCairoContext(cairo_t* cr, bool bXorModeAllowed, { sal_uInt8 a = true_data[SVP_CAIRO_ALPHA]; sal_uInt8 xor_a = xor_data[SVP_CAIRO_ALPHA]; +#if 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]] @@ -507,6 +520,7 @@ void CairoCommon::releaseCairoContext(cairo_t* cr, bool bXorModeAllowed, 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/headless/SvpGraphicsBackend.cxx b/vcl/headless/SvpGraphicsBackend.cxx index 86b804c47146..223b333e9bef 100644 --- a/vcl/headless/SvpGraphicsBackend.cxx +++ b/vcl/headless/SvpGraphicsBackend.cxx @@ -431,7 +431,9 @@ void SvpGraphicsBackend::drawMask(const SalTwoRect& rTR, const SalBitmap& rSalBi } sal_Int32 nStride; unsigned char* mask_data = aSurface.getBits(nStride); +#if !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); @@ -439,9 +441,15 @@ void SvpGraphicsBackend::drawMask(const SalTwoRect& rTR, const SalBitmap& rSalBi for (tools::Long x = rTR.mnSrcX; x < rTR.mnSrcX + rTR.mnSrcWidth; ++x) { sal_uInt8 a = data[SVP_CAIRO_ALPHA]; +#if 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(); @@ -554,12 +562,20 @@ Color SvpGraphicsBackend::getPixel(tools::Long nX, tools::Long nY) cairo_destroy(cr); cairo_surface_flush(target); +#if !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]; +#if 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); diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx index b22661c628d7..da9a88bf67c9 100644 --- a/vcl/source/bitmap/BitmapTools.cxx +++ b/vcl/source/bitmap/BitmapTools.cxx @@ -300,7 +300,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 ); +#if !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<sal_uInt32 *>(pSrc + nStride * y); @@ -320,9 +322,15 @@ BitmapEx* CreateFromCairoSurface(Size aSize, cairo_surface_t * pSurface) if( nAlpha != 0 && nAlpha != 255 ) { // Cairo uses pre-multiplied alpha - we do not => re-multiply +#if 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 ); @@ -693,7 +701,9 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un ::Color aColor; unsigned int nAlpha = 255; +#if !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; @@ -722,13 +732,25 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un aColor = pBitmapReadAcc->GetPaletteColor(*pReadScan++); #ifdef OSL_BIGENDIAN +#if 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 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 } @@ -746,18 +768,30 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un nAlpha = data[ nOff ]; else nAlpha = data[ nOff ] = 255; +#if 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; +#if 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 } @@ -775,17 +809,29 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un nAlpha = data[ nOff++ ]; else nAlpha = data[ nOff++ ] = 255; +#if 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; +#if 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 @@ -804,18 +850,30 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un nAlpha = data[ nOff++ ]; else nAlpha = data[ nOff++ ] = 255; +#if 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; +#if 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 @@ -834,18 +892,30 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un nAlpha = data[ nOff ++ ]; else nAlpha = data[ nOff ++ ] = 255; +#if 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; +#if 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 @@ -869,17 +939,29 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un nAlpha = data[ nOff++ ]; else nAlpha = data[ nOff++ ] = 255; +#if 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; +#if 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 } @@ -1043,6 +1125,17 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un return bRet; } +#if 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]; @@ -1100,6 +1193,7 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un std::make_integer_sequence<int, 256>{}); 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 13c19feaf1ad..70ae63240227 100644 --- a/vcl/source/filter/png/PngImageReader.cxx +++ b/vcl/source/filter/png/PngImageReader.cxx @@ -291,7 +291,9 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, png_read_row(pPng, pScanline, nullptr); } } +#if !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++) @@ -300,9 +302,15 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, for (size_t i = 0; i < aRowSizeBytes; i += 4) { const sal_uInt8 alpha = pScanline[i + 3]; +#if 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; } } @@ -315,9 +323,15 @@ bool reader(SvStream& rStream, BitmapEx& rBitmapEx, for (size_t i = 0; i < aRowSizeBytes; i += 4) { const sal_uInt8 alpha = pScanline[i + 3]; +#if 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 9e9404da7417..82845ec041d9 100644 --- a/vcl/source/helper/svtaccessiblefactory.cxx +++ b/vcl/source/helper/svtaccessiblefactory.cxx @@ -18,6 +18,7 @@ */ #include <config_feature_desktop.h> +#include <config_wasm_strip.h> #include <vcl/svtaccessiblefactory.hxx> #include <vcl/accessiblefactory.hxx> @@ -41,8 +42,10 @@ namespace vcl oslModule s_hAccessibleImplementationModule = nullptr; #endif #if HAVE_FEATURE_DESKTOP +#if !ENABLE_WASM_STRIP_ACCESSIBILITY GetSvtAccessibilityComponentFactory s_pAccessibleFactoryFunc = nullptr; #endif +#endif ::rtl::Reference< IAccessibleFactory > s_pFactory; @@ -206,6 +209,7 @@ namespace vcl { } +#if !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() ); +#if !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 582bfc5faa3a..840a86f06e22 100644 --- a/writerperfect/Library_wpftwriter.mk +++ b/writerperfect/Library_wpftwriter.mk @@ -26,6 +26,11 @@ $(eval $(call gb_Library_set_include,wpftwriter,\ $(eval $(call gb_Library_set_componentfile,wpftwriter,writerperfect/source/writer/wpftwriter,services)) +$(eval $(call gb_Library_add_componentimpls,wpftwriter, \ + $(if $(ENABLE_WASM_STRIP_EPUB),,extended) \ + $(if $(ENABLE_WASM_STRIP_SWEXPORTS),,extended2) \ +)) + $(eval $(call gb_Library_use_sdk_api,wpftwriter)) $(eval $(call gb_Library_use_common_precompiled_header,wpftwriter)) @@ -50,12 +55,17 @@ $(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 \ + $(if $(ENABLE_WASM_STRIP_SWEXPORTS),,etonyek) \ icu_headers \ icui18n \ icuuc \ @@ -71,18 +81,28 @@ $(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 + +ifneq ($(ENABLE_WASM_STRIP_SWEXPORTS),TRUE) +$(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 \ - writerperfect/source/writer/StarOfficeWriterImportFilter \ writerperfect/source/writer/WordPerfectImportFilter \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,wpftwriter,\ + writerperfect/source/writer/StarOfficeWriterImportFilter \ writerperfect/source/writer/exp/XMLBase64ImportContext \ writerperfect/source/writer/exp/XMLFootnoteImportContext \ writerperfect/source/writer/exp/XMLSectionContext \ diff --git a/writerperfect/Module_writerperfect.mk b/writerperfect/Module_writerperfect.mk index c24b0dd5bcc6..c09dc27b1bde 100644 --- a/writerperfect/Module_writerperfect.mk +++ b/writerperfect/Module_writerperfect.mk @@ -20,9 +20,11 @@ $(eval $(call gb_Module_Module,writerperfect)) $(eval $(call gb_Module_add_targets,writerperfect,\ + $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \ Library_wpftcalc \ Library_wpftdraw \ Library_wpftimpress \ + ) \ Library_wpftwriter \ Library_writerperfect \ UIConfig_writerperfect \ diff --git a/writerperfect/source/writer/wpftwriter.component b/writerperfect/source/writer/wpftwriter.component index 8ab436634052..176d48750c19 100644 --- a/writerperfect/source/writer/wpftwriter.component +++ b/writerperfect/source/writer/wpftwriter.component @@ -22,31 +22,37 @@ constructor="com_sun_star_comp_Writer_AbiWordImportFilter_get_implementation"> <service name="com.sun.star.document.ImportFilter"/> <service name="com.sun.star.document.ExtendedTypeDetection"/> + <optional/> </implementation> <implementation name="com.sun.star.comp.Writer.MSWorksImportFilter" constructor="com_sun_star_comp_Writer_MSWorksImportFilter_get_implementation"> <service name="com.sun.star.document.ImportFilter"/> <service name="com.sun.star.document.ExtendedTypeDetection"/> + <optional/> </implementation> <implementation name="com.sun.star.comp.Writer.MWAWImportFilter" constructor="com_sun_star_comp_Writer_MWAWImportFilter_get_implementation"> <service name="com.sun.star.document.ImportFilter"/> <service name="com.sun.star.document.ExtendedTypeDetection"/> + <optional/> </implementation> <implementation name="com.sun.star.comp.Writer.WordPerfectImportFilter" constructor="com_sun_star_comp_Writer_WordPerfectImportFilter_get_implementation"> <service name="com.sun.star.document.ExtendedTypeDetection"/> <service name="com.sun.star.document.ImportFilter"/> + <optional/> </implementation> <implementation name="org.libreoffice.comp.Writer.EBookImportFilter" constructor="org_libreoffice_comp_Writer_EBookImportFilter_get_implementation"> <service name="com.sun.star.document.ExtendedTypeDetection"/> <service name="com.sun.star.document.ImportFilter"/> + <optional/> </implementation> <implementation name="org.libreoffice.comp.Writer.PagesImportFilter" constructor="org_libreoffice_comp_Writer_PagesImportFilter_get_implementation"> <service name="com.sun.star.document.ExtendedTypeDetection"/> <service name="com.sun.star.document.ImportFilter"/> + <optional/> </implementation> <implementation name="org.libreoffice.comp.Writer.StarOfficeWriterImportFilter" constructor="org_libreoffice_comp_Writer_StarOfficeWriterImportFilter_get_implementation"> @@ -56,9 +62,11 @@ <implementation name="com.sun.star.comp.Writer.EPUBExportFilter" constructor="com_sun_star_comp_Writer_EPUBExportFilter_get_implementation"> <service name="com.sun.star.document.ExportFilter"/> + <optional/> </implementation> <implementation name="com.sun.star.comp.Writer.EPUBExportUIComponent" constructor="com_sun_star_comp_Writer_EPUBExportUIComponent_get_implementation"> <service name="com.sun.star.ui.dialogs.FilterOptionsDialog"/> + <optional/> </implementation> </component> diff --git a/writerperfect/source/writer/wpftwriter.component.extended b/writerperfect/source/writer/wpftwriter.component.extended new file mode 100644 index 000000000000..577d05e96d72 --- /dev/null +++ b/writerperfect/source/writer/wpftwriter.component.extended @@ -0,0 +1,8 @@ +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +com.sun.star.comp.Writer.EPUBExportFilter +com.sun.star.comp.Writer.EPUBExportUIComponent diff --git a/writerperfect/source/writer/wpftwriter.component.extended2 b/writerperfect/source/writer/wpftwriter.component.extended2 new file mode 100644 index 000000000000..91cd0e0463f0 --- /dev/null +++ b/writerperfect/source/writer/wpftwriter.component.extended2 @@ -0,0 +1,12 @@ +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +com.sun.star.comp.Writer.AbiWordImportFilter +com.sun.star.comp.Writer.MSWorksImportFilter +com.sun.star.comp.Writer.MWAWImportFilter +com.sun.star.comp.Writer.WordPerfectImportFilter +org.libreoffice.comp.Writer.EBookImportFilter +org.libreoffice.comp.Writer.PagesImportFilter diff --git a/xmloff/Library_xo.mk b/xmloff/Library_xo.mk index 0d3fed2d1541..5117f520d1ba 100644 --- a/xmloff/Library_xo.mk +++ b/xmloff/Library_xo.mk @@ -21,6 +21,15 @@ $(eval $(call gb_Library_Library,xo)) $(eval $(call gb_Library_set_componentfile,xo,xmloff/util/xo,services)) +$(eval $(call gb_Library_add_componentimpls,xo, \ + $(if $(ENABLE_WASM_STRIP_CHART),,chart) \ + draw \ + $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \ + impress \ + writer \ + ) \ +)) + $(eval $(call gb_Library_set_precompiled_header,xo,xmloff/inc/pch/precompiled_xo)) $(eval $(call gb_Library_set_include,xo,\ @@ -56,6 +65,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 +98,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 1c9525a5e9b7..7f5439481700 100644 --- a/xmloff/Library_xof.mk +++ b/xmloff/Library_xof.mk @@ -47,11 +47,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 \ +)) + +$(eval $(call gb_Library_add_componentimpl,xof,chart)) +endif + +$(eval $(call gb_Library_add_exception_objects,xof,\ xmloff/source/transform/ControlOASISTContext \ xmloff/source/transform/ControlOOoTContext \ xmloff/source/transform/CreateElemTContext \ diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index fc18a3de0370..e0110892a6f3 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 <config_wasm_strip.h> + #include <memory> #include <sal/config.h> #include <sal/log.hxx> @@ -1693,7 +1695,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 +#if !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 5b4d006211ba..d3ec1c31a3c4 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 <config_wasm_strip.h> + #include <memory> #include <optional> @@ -1073,7 +1075,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 +#if !ENABLE_WASM_STRIP_CHART return new SchXMLImportHelper(); +#else + return nullptr; +#endif } ::xmloff::OFormLayerXMLImport* SvXMLImport::CreateFormImport() @@ -1556,7 +1567,9 @@ void SvXMLImport::SetAutoStyles( SvXMLStylesContext *pAutoStyles ) mxAutoStyles = pAutoStyles; GetTextImport()->SetAutoStyles( pAutoStyles ); GetShapeImport()->SetAutoStylesContext( pAutoStyles ); +#if !ENABLE_WASM_STRIP_CHART GetChartImport()->SetAutoStylesContext( pAutoStyles ); +#endif GetFormImport()->setAutoStyleContext( pAutoStyles ); } diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index d47ea15b2758..f1c23d3ed0b2 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 <config_wasm_strip.h> + #include <basegfx/matrix/b2dhommatrix.hxx> #include <basegfx/matrix/b3dhommatrix.hxx> #include <basegfx/polygon/b2dpolypolygon.hxx> @@ -1193,7 +1195,14 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x OUString sCLSID; if(xPropSet->getPropertyValue("CLSID") >>= sCLSID) { +#if !ENABLE_WASM_STRIP_CHART + // WASM_CHART change + // TODO: With Chart extracted this cannot really happen since + // no Chart could've been added at all 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 a19a6c19d936..e4425c10f722 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 <config_wasm_strip.h> + #include <cassert> #include <sal/log.hxx> @@ -2470,7 +2472,13 @@ void SdXMLChartShapeContext::startFastElement (sal_Int32 nElement, uno::Reference< frame::XModel > xChartModel; if( aAny >>= xChartModel ) { +#if !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 00afedf82a39..d46365008f5e 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 <config_wasm_strip.h> + #include <sal/config.h> #include <com/sun/star/frame/XModel.hpp> @@ -426,10 +428,12 @@ SvXMLStyleContext *SvXMLStylesContext::CreateStyleStyleChildContext( case XmlStyleFamily::TEXT_RUBY: pStyle = new XMLPropStyleContext( GetImport(), *this, nFamily ); break; +#if !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: @@ -565,6 +569,8 @@ rtl::Reference < SvXMLImportPropertyMapper > SvXMLStylesContext::GetImportProper } xMapper = mxShapeImpPropMapper; break; +#if !ENABLE_WASM_STRIP_CHART + // WASM_CHART change case XmlStyleFamily::SCH_CHART_ID: if( ! mxChartImpPropMapper.is() ) { @@ -573,6 +579,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 2433d1ed8d54..e6b5cff99c0b 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 <config_wasm_strip.h> + #include <osl/diagnose.h> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/uno/XComponentContext.hpp> @@ -1552,14 +1554,16 @@ XMLTransformerContext *OOo2OasisTransformer::CreateUserDefinedContext( return new XMLControlOOoTransformerContext( *this, rQName ); case XML_ETACTION_FORM_PROPERTY: return new XMLFormPropOOoTransformerContext( *this, rQName ); +#if !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..5039731f5492 100644 --- a/xmloff/source/transform/xof.component +++ b/xmloff/source/transform/xof.component @@ -42,14 +42,17 @@ <implementation name="com.sun.star.comp.Chart.XMLContentImporter" constructor="xmloff_XMLChartContentImportOOO_get_implementation"> <service name="com.sun.star.comp.Chart.XMLContentImporter"/> + <optional/> </implementation> <implementation name="com.sun.star.comp.Chart.XMLImporter" constructor="xmloff_XMLChartImportOOO_get_implementation"> <service name="com.sun.star.comp.Chart.XMLImporter"/> + <optional/> </implementation> <implementation name="com.sun.star.comp.Chart.XMLStylesImporter" constructor="xmloff_XMLChartStylesImportOOO_get_implementation"> <service name="com.sun.star.comp.Chart.XMLStylesImporter"/> + <optional/> </implementation> <implementation name="com.sun.star.comp.Draw.XMLContentImporter" constructor="xmloff_XMLDrawContentImportOOO_get_implementation"> @@ -102,10 +105,12 @@ <implementation name="com.sun.star.comp.OOo2OasisTransformer" constructor="xmloff_OOo2OasisTransformer_get_implementation"> <service name="com.sun.star.comp.OOo2OasisTransformer"/> + <optional/> </implementation> <implementation name="com.sun.star.comp.Oasis2OOoTransformer" constructor="xmloff_Oasis2OOoTransformer_get_implementation"> <service name="com.sun.star.comp.Oasis2OOoTransformer"/> + <optional/> </implementation> <implementation name="com.sun.star.comp.Writer.XMLAutotextEventsImporter" constructor="xmloff_XMLAutoTextEventImportOOO_get_implementation"> diff --git a/xmloff/source/transform/xof.component.chart b/xmloff/source/transform/xof.component.chart new file mode 100644 index 000000000000..77713a8b7a90 --- /dev/null +++ b/xmloff/source/transform/xof.component.chart @@ -0,0 +1,11 @@ +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +com.sun.star.comp.Chart.XMLContentImporter +com.sun.star.comp.Chart.XMLImporter +com.sun.star.comp.Chart.XMLStylesImporter +com.sun.star.comp.Oasis2OOoTransformer +com.sun.star.comp.OOo2OasisTransformer diff --git a/xmloff/util/xo.component b/xmloff/util/xo.component index db63a5cd0519..7bd198ce17d3 100644 --- a/xmloff/util/xo.component +++ b/xmloff/util/xo.component @@ -22,142 +22,177 @@ <implementation name="SchXMLExport.Compact" constructor="com_sun_star_comp_Chart_XMLExporter_get_implementation"> <service name="com.sun.star.comp.Chart.XMLExporter"/> + <optional/> </implementation> <implementation name="SchXMLExport.Content" constructor="com_sun_star_comp_Chart_XMLContentExporter_get_implementation"> <service name="com.sun.star.comp.Chart.XMLContentExporter"/> + <optional/> </implementation> <implementation name="SchXMLExport.Oasis.Compact" constructor="com_sun_star_comp_Chart_XMLOasisExporter_get_implementation"> <service name="com.sun.star.comp.Chart.XMLOasisExporter"/> + <optional/> </implementation> <implementation name="SchXMLExport.Oasis.Content" constructor="com_sun_star_comp_Chart_XMLOasisContentExporter_get_implementation"> <service name="com.sun.star.comp.Chart.XMLOasisContentExporter"/> + <optional/> </implementation> <implementation name="SchXMLExport.Oasis.Meta" constructor="com_sun_star_comp_Chart_XMLOasisMetaExporter_get_implementation"> <service name="com.sun.star.comp.Chart.XMLOasisMetaExporter"/> + <optional/> </implementation> <implementation name="SchXMLExport.Oasis.Styles" constructor="com_sun_star_comp_Chart_XMLOasisStylesExporter_get_implementation"> <service name="com.sun.star.comp.Chart.XMLOasisStylesExporter"/> + <optional/> </implementation> <implementation name="SchXMLExport.Styles" constructor="com_sun_star_comp_Chart_XMLStylesExporter_get_implementation"> <service name="com.sun.star.comp.Chart.XMLStylesExporter"/> + <optional/> </implementation> <implementation name="SchXMLImport" constructor="com_sun_star_comp_Chart_XMLOasisImporter_get_implementation"> <service name="com.sun.star.comp.Chart.XMLOasisImporter"/> + <optional/> </implementation> <implementation name="SchXMLImport.Content" constructor="com_sun_star_comp_Chart_XMLOasisContentImporter_get_implementation"> <service name="com.sun.star.comp.Chart.XMLOasisContentImporter"/> + <optional/> </implementation> <implementation name="SchXMLImport.Meta" constructor="com_sun_star_comp_Chart_XMLOasisMetaImporter_get_implementation"> <service name="com.sun.star.comp.Chart.XMLOasisMetaImporter"/> + <optional/> </implementation> <implementation name="SchXMLImport.Styles" constructor="com_sun_star_comp_Chart_XMLOasisStylesImporter_get_implementation"> <service name="com.sun.star.comp.Chart.XMLOasisStylesImporter"/> + <optional/> </implementation> <implementation name="XMLDrawContentExportOasis" constructor="com_sun_star_comp_Draw_XMLOasisContentExporter_get_implementation"> <service name="com.sun.star.comp.Draw.XMLOasisContentExporter"/> + <optional/> </implementation> <implementation name="XMLDrawExportOOO" constructor="com_sun_star_comp_Draw_XMLExporter_get_implementation"> <service name="com.sun.star.comp.Draw.XMLExporter"/> + <optional/> </implementation> <implementation name="XMLDrawExportOasis" constructor="com_sun_star_comp_Draw_XMLOasisExporter_get_implementation"> <service name="com.sun.star.comp.Draw.XMLOasisExporter"/> + <optional/> </implementation> <implementation name="XMLDrawImportOasis" constructor="com_sun_star_comp_Draw_XMLOasisImporter_get_implementation"> <service name="com.sun.star.comp.Draw.XMLOasisImporter"/> + <optional/> </implementation> <implementation name="XMLDrawMetaExportOasis" constructor="com_sun_star_comp_Draw_XMLOasisMetaExporter_get_implementation"> <service name="com.sun.star.comp.Draw.XMLOasisMetaExporter"/> + <optional/> </implementation> <implementation name="XMLDrawSettingsExportOasis" constructor="com_sun_star_comp_Draw_XMLOasisSettingsExporter_get_implementation"> <service name="com.sun.star.comp.Draw.XMLOasisSettingsExporter"/> + <optional/> </implementation> <implementation name="XMLDrawStylesExportOasis" constructor="com_sun_star_comp_Draw_XMLOasisStylesExporter_get_implementation"> <service name="com.sun.star.comp.Draw.XMLOasisStylesExporter"/> + <optional/> </implementation> <implementation name="XMLDrawingLayerExport" constructor="com_sun_star_comp_DrawingLayer_XMLExporter_get_implementation"> <service name="com.sun.star.comp.DrawingLayer.XMLExporter"/> + <optional/> </implementation> <implementation name="XMLImpressClipboardExport" constructor="com_sun_star_comp_Impress_XMLClipboardExporter_get_implementation"> <service name="com.sun.star.comp.Impress.XMLClipboardExporter"/> + <optional/> </implementation> <implementation name="XMLImpressContentExportOasis" constructor="com_sun_star_comp_Impress_XMLOasisContentExporter_get_implementation"> <service name="com.sun.star.comp.Impress.XMLOasisContentExporter"/> + <optional/> </implementation> <implementation name="XMLDrawContentImportOasis" constructor="com_sun_star_comp_Draw_XMLOasisContentImporter_get_implementation"> <service name="com.sun.star.comp.Draw.XMLOasisContentImporter"/> + <optional/> </implementation> <implementation name="XMLImpressContentImportOasis" constructor="com_sun_star_comp_Impress_XMLOasisContentImporter_get_implementation"> <service name="com.sun.star.comp.Impress.XMLOasisContentImporter"/> + <optional/> </implementation> <implementation name="XMLImpressExportOOO" constructor="com_sun_star_comp_Impress_XMLExporter_get_implementation"> <service name="com.sun.star.comp.Impress.XMLExporter"/> + <optional/> </implementation> <implementation name="XMLImpressExportOasis" constructor="com_sun_star_comp_Impress_XMLOasisExporter_get_implementation"> <service name="com.sun.star.comp.Impress.XMLOasisExporter"/> + <optional/> </implementation> <implementation name="XMLImpressImportOasis" constructor="com_sun_star_comp_Impress_XMLOasisImporter_get_implementation"> <service name="com.sun.star.comp.Impress.XMLOasisImporter"/> + <optional/> </implementation> <implementation name="XMLImpressMetaExportOasis" constructor="com_sun_star_comp_Impress_XMLOasisMetaExporter_get_implementation"> <service name="com.sun.star.comp.Impress.XMLOasisMetaExporter"/> + <optional/> </implementation> <implementation name="XMLDrawMetaImportOasis" constructor="com_sun_star_comp_Draw_XMLOasisMetaImporter_get_implementation"> <service name="com.sun.star.comp.Draw.XMLOasisMetaImporter"/> + <optional/> </implementation> <implementation name="XMLImpressMetaImportOasis" constructor="com_sun_star_comp_Impress_XMLOasisMetaImporter_get_implementation"> <service name="com.sun.star.comp.Impress.XMLOasisMetaImporter"/> + <optional/> </implementation> <implementation name="XMLImpressSettingsExportOasis" constructor="com_sun_star_comp_Impress_XMLOasisSettingsExporter_get_implementation"> <service name="com.sun.star.comp.Impress.XMLOasisSettingsExporter"/> + <optional/> </implementation> <implementation name="XMLDrawSettingsImportOasis" constructor="com_sun_star_comp_Draw_XMLOasisSettingsImporter_get_implementation"> <service name="com.sun.star.comp.Draw.XMLOasisSettingsImporter"/> + <optional/> </implementation> <implementation name="XMLImpressSettingsImportOasis" constructor="com_sun_star_comp_Impress_XMLOasisSettingsImporter_get_implementation"> <service name="com.sun.star.comp.Impress.XMLOasisSettingsImporter"/> + <optional/> </implementation> <implementation name="XMLImpressStylesExportOasis" constructor="com_sun_star_comp_Impress_XMLOasisStylesExporter_get_implementation"> <service name="com.sun.star.comp.Impress.XMLOasisStylesExporter"/> + <optional/> </implementation> <implementation name="XMLImpressStylesImportOasis" constructor="com_sun_star_comp_Impress_XMLOasisStylesImporter_get_implementation"> <service name="com.sun.star.comp.Impress.XMLOasisStylesImporter"/> + <optional/> </implementation> <implementation name="XMLDrawStylesImportOasis" constructor="com_sun_star_comp_Draw_XMLOasisStylesImporter_get_implementation"> <service name="com.sun.star.comp.Draw.XMLOasisStylesImporter"/> + <optional/> </implementation> <implementation name="XMLMetaExportComponent" constructor="XMLMetaExportComponent_get_implementation"> @@ -178,6 +213,7 @@ <implementation name="com.sun.star.comp.Writer.XMLAutotextEventsExporter" constructor="com_sun_star_comp_Writer_XMLAutotextEventsExporter_get_implementation"> <service name="com.sun.star.comp.Writer.XMLAutotextEventsExporter"/> + <optional/> </implementation> <implementation name="com.sun.star.comp.Writer.XMLOasisAutotextEventsExporter" diff --git a/xmloff/util/xo.component.chart b/xmloff/util/xo.component.chart new file mode 100644 index 000000000000..d31357d02d2a --- /dev/null +++ b/xmloff/util/xo.component.chart @@ -0,0 +1,17 @@ +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +SchXMLExport.Compact +SchXMLExport.Content +SchXMLExport.Oasis.Compact +SchXMLExport.Oasis.Content +SchXMLExport.Oasis.Meta +SchXMLExport.Oasis.Styles +SchXMLExport.Styles +SchXMLImport +SchXMLImport.Content +SchXMLImport.Meta +SchXMLImport.Styles diff --git a/xmloff/util/xo.component.draw b/xmloff/util/xo.component.draw new file mode 100644 index 000000000000..f8bd3c3a9f4e --- /dev/null +++ b/xmloff/util/xo.component.draw @@ -0,0 +1,18 @@ +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +XMLDrawContentExportOasis +XMLDrawContentImportOasis +XMLDrawExportOasis +XMLDrawExportOOO +XMLDrawImportOasis +XMLDrawingLayerExport +XMLDrawMetaExportOasis +XMLDrawMetaImportOasis +XMLDrawSettingsExportOasis +XMLDrawSettingsImportOasis +XMLDrawStylesExportOasis +XMLDrawStylesImportOasis diff --git a/xmloff/util/xo.component.impress b/xmloff/util/xo.component.impress new file mode 100644 index 000000000000..09105b58b901 --- /dev/null +++ b/xmloff/util/xo.component.impress @@ -0,0 +1,18 @@ +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +XMLImpressClipboardExport +XMLImpressContentExportOasis +XMLImpressContentImportOasis +XMLImpressExportOasis +XMLImpressExportOOO +XMLImpressImportOasis +XMLImpressMetaExportOasis +XMLImpressMetaImportOasis +XMLImpressSettingsExportOasis +XMLImpressSettingsImportOasis +XMLImpressStylesExportOasis +XMLImpressStylesImportOasis diff --git a/xmloff/util/xo.component.writer b/xmloff/util/xo.component.writer new file mode 100644 index 000000000000..b9c5fcfed5ab --- /dev/null +++ b/xmloff/util/xo.component.writer @@ -0,0 +1,7 @@ +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +com.sun.star.comp.Writer.XMLAutotextEventsExporter |