[Libreoffice-commits] core.git: Branch 'feature/wasm' - 83 commits - accessibility/Library_acc.mk accessibility/source autogen.sh avmedia/source basctl/source basic/source bridges/Module_bridges.mk chart2/qa chart2/source codemaker/source comphelper/qa comphelper/source compilerplugins/clang config_host/config_oauth2.h.in config_host.mk.in configure.ac connectivity/Configuration_mork.mk connectivity/CppunitTest_connectivity_mork.mk connectivity/Executable_mork_helper.mk connectivity/inc connectivity/IwyuFilter_connectivity.yaml connectivity/Library_mork.mk connectivity/Library_mozbootstrap.mk connectivity/Module_connectivity.mk connectivity/qa connectivity/registry connectivity/source cppu/source cpputools/source cui/source cui/uiconfig dbaccess/qa dbaccess/source desktop/inc desktop/qa desktop/source drawinglayer/source editeng/source editeng/uiconfig extensions/source external/boost external/cairo external/fontconfig external/icu external/libcmis external/liblangtag external/libxml2 external/op enssl extras/source filter/source forms/source fpicker/source framework/inc framework/source helpcompiler/source helpcontent2 i18nlangtag/source i18npool/source icon-themes/elementary icon-themes/elementary_svg idlc/inc idlc/source idl/inc idl/source include/codemaker include/comphelper include/connectivity include/helpcompiler include/i18nlangtag include/oox include/osl include/rtl include/sal include/sax include/sfx2 include/svl include/svtools include/svx include/test include/tools include/unotools include/vcl include/xmloff jvmfwk/inc jvmfwk/plugins jvmfwk/source l10ntools/source lingucomponent/source linguistic/source officecfg/registry oox/qa oox/source opencl/source package/source postprocess/CustomTarget_registry.mk postprocess/qa postprocess/Rdb_services.mk pyuno/source README.wasm registry/source reportdesign/source Repository.mk sal/cppunittester sal/osl sal/qa sax/source sc/inc sc/qa scripting/Module_scripting.mk scripting/source sc/source sdext/source sd/qa sd/source sf x2/sdi sfx2/source sfx2/uiconfig shell/source solenv/clang-format solenv/gbuild starmath/qa starmath/source svl/Library_svl.mk svl/source svtools/qa svtools/source svx/Module_svx.mk svx/source sw/inc sw/qa sw/source sw/uiconfig test/source testtools/source toolkit/source tools/source ucbhelper/source ucb/source unodevtools/source unoidl/Executable_unoidl-read.mk unoidl/source unotest/source unotools/source unoxml/source vcl/Executable_ui-previewer.mk vcl/headless vcl/inc vcl/Library_vcl.mk vcl/Library_vclplug_qt5.mk vcl/Module_vcl.mk vcl/osx vcl/qa vcl/qt5 vcl/skia vcl/source vcl/unx vcl/wasm vcl/win vcl/workben writerfilter/source writerperfect/qa writerperfect/source xmloff/source xmlsecurity/inc xmlsecurity/source xmlsecurity/workben

Tue, 15 Dec 2020 17:57:53 -0800

Rebased ref, commits from common ancestor:
commit 35c3a3919b569255afa89220361d779a6eded167
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Wed Dec 16 02:08:15 2020 +0100
Commit:     Jan-Marek Glogowski <glo...@fbihome.de>
CommitDate: Wed Dec 16 02:52:52 2020 +0100

    Next catchall
    
    This is the "fail to link vcl/Executable_ui-previewer" commit. I
    was hoping to link this executable this evening, but there are
    some remaining mysteries to solve.
    
    I'm missing bridge functions, pcre2 (seems to be from boost regex,
    somehow?), the constructor lists from native-code.py and generally
    still broken dependencies.
    
    What does work is the linking of the Qt5 WASM library, after I
    re-build it inside my chroot, as my Debian has glibc 2.28, while
    my Ubuntu 18.04 chroot has 2.27, so all the native tooling
    wouldn't work. But no new build failures, so just some time.
    
    One main problem is the static linking of executables. For so,
    you have rpath and dependencies, which will get all the correct
    dependencies, but this exists for static archives. I still had
    to fix many externals with -pthread, so growing that list took
    a while anyway, but eventually this should and could be done
    by gbuild. Question is, how hard is it to implement.
    
    I don't know if sal/osl/unx/system.hxx is correct at all, but
    at least it compiles.
    
    I tried to update the REAME with all new infos I find.
    
    Change-Id: I64ecd4f923296eb4aeb42ff4b114c87b58503962

diff --git a/README.wasm b/README.wasm
index be6cc4ff0ecf..401ad6a345ef 100644
--- a/README.wasm
+++ b/README.wasm
@@ -26,36 +26,42 @@ Currently autogen.sh is patched to use emconfigure. That 
basically sets various
 especially EMMAKEN_JUST_CONFIGURE, which will create the correct output file 
names, checked by
 configure (a.out).
 
+QT5DIR=/dir/of/git_qt5/qtbase
+
 --host=wasm64-local-emscripten
+--disable-ccache
+--disable-coinmp
 --disable-cups
+--disable-dbus
 --disable-dconf
+--disable-dynamic-loading
+--disable-extension-integration
+--disable-extensions
+--disable-extension-update
+--disable-firebird-sdbc
 --disable-gio
---disable-dbus
---disable-sdremote-bluetooth
 --disable-gstreamer-1-0
---disable-odk
---disable-postgresql-sdbc
---disable-firebird-sdbc
+--disable-gtk3
+--disable-lpsolve
 --disable-mariadb-sdbc
 --disable-nss
+--disable-odk
+--disable-online-update
+--disable-opencl
+--disable-pdfimport
+--disable-postgresql-sdbc
 --disable-python
 --disable-randr
---disable-pdfimport
 --disable-report-builder
---disable-lpsolve
---disable-coinmp
+--disable-scripting
+--disable-sdremote-bluetooth
+--enable-qt5
 --without-fonts
+--without-helppack-integration
 --without-java
 --without-junit
---without-helppack-integration
 --without-system-dicts
 --with-theme=no
---disable-cairo-canvas
---disable-scripting
---disable-dynamic-loading
---disable-ccache
---disable-gtk3
---enable-qt5
 
 Will also be encoded in configure.ac at some point, some already is.
 
@@ -87,10 +93,19 @@ Use: emrun --serve_after_close to run Qt WASM demos
 
 More info on Qt WASM emscripten pthreads: 
https://wiki.qt.io/Qt_for_WebAssembly#Multithreading_Support
 
+WASM needs -pthread at compile, not just link time for atomics support. 
Alternativel< you can provide
+-s USE_PTHREADS=1, but both don't seem to work relyable, so best provide both.
+https://github.com/emscripten-core/emscripten/issues/10370
+
+The output file must have the prefix .o, otherwise the WASM files will get a
+node.js shebang (!) and ranlib won't be able to index the library (link 
errors).
+
 Qt with threads has further memory limit. From Qt configure:
 Project MESSAGE: Setting PTHREAD_POOL_SIZE to 4
 Project MESSAGE: Setting TOTAL_MEMORY to 1GB
 
+You can actually allocate 4GB: 
https://bugzilla.mozilla.org/show_bug.cgi?id=1392234
+
 LO uses a nested event loop to run dialogs in general, but that won't work, 
because you can't drive
 the browser event loop. like VCL does with the system event loop in the 
various VCL backends.
 Changing this will need some major work (basically dropping 
Application::Execute).
diff --git a/Repository.mk b/Repository.mk
index 5311a5d1b84b..c3872fa9369d 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -470,6 +470,7 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
        $(if $(filter iOS MACOSX,$(OS)), \
                MacOSXSpell \
        ) \
+       $(if $(filter $(OS),EMSCRIPTEN),vclplug_qt5) \
 ))
 
 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,postgresqlsdbc, 
\
@@ -916,7 +917,7 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
                $(if $(ENABLE_SCRIPTING_BEANSHELL),scripting_ScriptsBeanShell) \
                $(if 
$(ENABLE_SCRIPTING_JAVASCRIPT),scripting_ScriptsJavaScript) \
        ) \
-       $(if $(DISABLE_SCRIPTING),,scripting_scriptbindinglib) \
+       $(if $(filter SCRIPTING,$(BUILD_TYPE)),scripting_scriptbindinglib) \
        $(if $(filter $(OS),MACOSX),sysui_osxicons) \
        wizards_basicshare \
        wizards_basicsrvaccess2base \
diff --git a/accessibility/Library_acc.mk b/accessibility/Library_acc.mk
index caf3d612330b..6e4c90eba50d 100644
--- a/accessibility/Library_acc.mk
+++ b/accessibility/Library_acc.mk
@@ -63,10 +63,6 @@ $(eval $(call gb_Library_add_exception_objects,acc,\
     accessibility/source/extended/accessibleiconchoicectrlentry \
     accessibility/source/extended/accessiblelistbox \
     accessibility/source/extended/accessiblelistboxentry \
-    accessibility/source/extended/accessibletabbar \
-    accessibility/source/extended/accessibletabbarbase \
-    accessibility/source/extended/accessibletabbarpage \
-    accessibility/source/extended/accessibletabbarpagelist \
     accessibility/source/extended/accessibletablistbox \
     accessibility/source/extended/accessibletablistboxtable \
     accessibility/source/extended/textwindowaccessibility \
@@ -110,4 +106,13 @@ $(eval $(call gb_Library_add_exception_objects,acc,\
     accessibility/source/standard/vclxaccessibletoolboxitem \
 ))
 
+ifneq ($(filter SCRIPTING,$(BUILD_TYPE)),)
+$(eval $(call gb_Library_add_exception_objects,acc,\
+    accessibility/source/extended/accessibletabbar \
+    accessibility/source/extended/accessibletabbarbase \
+    accessibility/source/extended/accessibletabbarpage \
+    accessibility/source/extended/accessibletabbarpagelist \
+))
+endif
+
 # vim:set noet sw=4 ts=4:
diff --git a/accessibility/source/helper/acc_factory.cxx 
b/accessibility/source/helper/acc_factory.cxx
index a4648485c2dc..f1249d47f99c 100644
--- a/accessibility/source/helper/acc_factory.cxx
+++ b/accessibility/source/helper/acc_factory.cxx
@@ -378,7 +378,11 @@ Reference< XAccessible > 
AccessibleFactory::createAccessibleIconChoiceCtrl(
 
 Reference< XAccessible > AccessibleFactory::createAccessibleTabBar( TabBar& 
_rTabBar ) const
 {
+#if HAVE_FEATURE_SCRIPTING
     return new AccessibleTabBar( &_rTabBar );
+#else
+    return nullptr;
+#endif
 }
 
 Reference< XAccessibleContext > 
AccessibleFactory::createAccessibleTextWindowContext(
diff --git a/configure.ac b/configure.ac
index a5440143f41f..b93b55c06c4a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -807,6 +807,8 @@ dnl Sequential to keep the logic very simple
 dnl These values may be checked and reset later.
 dnl ===================================================================
 #defaults unless the os test overrides this:
+test_cmis=yes
+test_curl=yes
 test_randr=yes
 test_xrender=yes
 test_cups=yes
@@ -960,6 +962,7 @@ darwin*|macos*) # macOS
 ;;
 
 ios*) # iOS
+    test_cmis=no
     test_randr=no
     test_xrender=no
     test_freetype=no
@@ -1114,12 +1117,13 @@ emscripten*)
     enable_lpsolve=no
     enable_report_builder=no
     with_theme="breeze"
+    test_cmis=no
     test_cups=no
+    test_curl=no
     test_dbus=no
     test_fontconfig=no
     test_freetype=no
     test_gtk=no
-    test_kde4=no
     test_randr=no
     test_xrender=no
     enable_postgresql_sdbc=no
@@ -5203,7 +5207,7 @@ if test "$cross_compiling" = "yes"; then
     (
     unset COM USING_X11 OS CPUNAME
     unset CC CXX SYSBASE CFLAGS
-    unset AR NM OBJDUMP PKG_CONFIG RANLIB READELF STRIP
+    unset AR LD NM OBJDUMP PKG_CONFIG RANLIB READELF STRIP
     unset CPPUNIT_CFLAGS CPPUNIT_LIBS
     unset LIBXML_CFLAGS LIBXML_LIBS LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC
     unset PKG_CONFIG_LIBDIR PKG_CONFIG_PATH
@@ -5492,6 +5496,11 @@ if test "$USING_X11" != TRUE; then
     enable_cairo_canvas=no
 fi
 
+if test "$OS" = "EMSCRIPTEN"; then
+    enable_cairo_canvas=yes
+    test_qt5=yes
+fi
+
 if test "$OS" = "HAIKU"; then
     enable_cairo_canvas=yes
     test_kf5=yes
@@ -7072,7 +7081,7 @@ dnl 
===================================================================
 dnl Check for system libcmis
 dnl ===================================================================
 # libcmis requires curl and we can't build curl for iOS
-if test $_os != iOS; then
+if test "$test_cmis" = "yes"; then
     libo_CHECK_SYSTEM_MODULE([libcmis],[LIBCMIS],[libcmis-0.5 >= 0.5.2])
     ENABLE_LIBCMIS=TRUE
 else
@@ -9980,7 +9989,7 @@ if test "$with_system_curl" = "auto"; then
     with_system_curl="$with_system_libs"
 fi
 
-if test "$with_system_curl" = "yes"; then
+if test "$test_curl" = "yes" -a "$with_system_curl" = "yes"; then
     AC_MSG_RESULT([external])
     SYSTEM_CURL=TRUE
 
@@ -10012,6 +10021,8 @@ if test "$with_system_curl" = "yes"; then
     fi
 
     ENABLE_CURL=TRUE
+elif test "$test_curl" = "no"; then
+    AC_MSG_RESULT([none])
 else
     AC_MSG_RESULT([internal])
     SYSTEM_CURL=
@@ -12413,7 +12424,11 @@ then
     fi
 
     qt5_test_include="QtWidgets/qapplication.h"
-    qt5_test_library="libQt5Widgets.so"
+    if test "$_os" = "Emscripten"; then
+        qt5_test_library="libQt5Widgets.a"
+    else
+        qt5_test_library="libQt5Widgets.so"
+    fi
 
     dnl Check for qmake5
     AC_PATH_PROGS( QMAKE5, [qmake-qt5 qmake], no, [$QT5DIR/bin:$PATH])
diff --git a/cui/source/dialogs/AdditionsDialog.cxx 
b/cui/source/dialogs/AdditionsDialog.cxx
index 832a7314b440..56fc111beef4 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -53,6 +53,9 @@
 #include <orcus/config.hpp>
 #include <orcus/pstring.hpp>
 
+#ifdef PAGE_SIZE
+#undef PAGE_SIZE
+#endif
 #define PAGE_SIZE 30
 
 using namespace css;
diff --git a/external/boost/UnpackedTarball_boost.mk 
b/external/boost/UnpackedTarball_boost.mk
index 046f7e6da1b2..adae48e37b3f 100644
--- a/external/boost/UnpackedTarball_boost.mk
+++ b/external/boost/UnpackedTarball_boost.mk
@@ -49,6 +49,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,boost,3))
 
 $(eval $(call gb_UnpackedTarball_add_patches,boost,\
        $(foreach patch,$(boost_patches),external/boost/$(patch)) \
+    external/boost/boost-emscripten-noshm.patch.0 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/boost/boost-emscripten-noshm.patch.0 
b/external/boost/boost-emscripten-noshm.patch.0
new file mode 100644
index 000000000000..f9d27b0b6e11
--- /dev/null
+++ b/external/boost/boost-emscripten-noshm.patch.0
@@ -0,0 +1,11 @@
+--- boost/interprocess/detail/workaround.hpp.orig      2020-12-15 
06:31:51.037665526 +0100
++++ boost/interprocess/detail/workaround.hpp   2020-12-15 06:32:39.741281893 
+0100
+@@ -31,7 +31,7 @@
+    //////////////////////////////////////////////////////
+    //Check for XSI shared memory objects. They are available in nearly all 
UNIX platforms
+    //////////////////////////////////////////////////////
+-   #if !defined(__QNXNTO__) && !defined(__ANDROID__) && !defined(__HAIKU__) 
&& !(__VXWORKS__)
++   #if !defined(__QNXNTO__) && !defined(__ANDROID__) && !defined(__HAIKU__) 
&& !(__VXWORKS__) && !defined(__EMSCRIPTEN__)
+       #define BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS
+    #endif
+ 
diff --git a/external/cairo/ExternalProject_cairo.mk 
b/external/cairo/ExternalProject_cairo.mk
index 41e7621c789f..c8d4ac05d858 100644
--- a/external/cairo/ExternalProject_cairo.mk
+++ b/external/cairo/ExternalProject_cairo.mk
@@ -67,11 +67,12 @@ $(call gb_ExternalProject_get_state_target,cairo,build) :
        ./configure \
                $(if $(debug),STRIP=" ") \
                $(if $(filter ANDROID iOS,$(OS)),CFLAGS="$(if $(debug),-g) 
$(ZLIB_CFLAGS) $(gb_VISIBILITY_FLAGS)") \
-               $(if $(filter-out ANDROID iOS,$(OS)),CFLAGS="$(if $(debug),-g) 
$(ZLIB_CFLAGS)" ) \
+               $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS=" $(ZLIB_CFLAGS) 
-pthread") \
+               $(if $(filter-out EMSCRIPTEN ANDROID iOS,$(OS)),CFLAGS="$(if 
$(debug),-g) $(ZLIB_CFLAGS)" ) \
                $(if $(filter ANDROID iOS,$(OS)),PKG_CONFIG=./dummy_pkg_config) 
\
                LIBS="$(ZLIB_LIBS)" \
                $(if $(filter -fsanitize=%,$(LDFLAGS)),LDFLAGS="$(LDFLAGS) 
-fuse-ld=bfd") \
-               pixman_CFLAGS="-I$(call 
gb_UnpackedTarball_get_dir,pixman)/pixman" \
+               pixman_CFLAGS="-I$(call 
gb_UnpackedTarball_get_dir,pixman)/pixman -pthread" \
                pixman_LIBS="-L$(call 
gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \
                        $(if $(filter LINUX,$(OS)),-Wl$(COMMA)-z$(COMMA)origin \
                                        
-Wl$(COMMA)-rpath$(COMMA)\\\$$\$$ORIGIN) \
@@ -84,7 +85,7 @@ $(call gb_ExternalProject_get_state_target,cairo,build) :
                $(if $(SYSTEM_FONTCONFIG),,FONTCONFIG_CFLAGS="-I$(call 
gb_UnpackedTarball_get_dir,fontconfig)") \
                $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
                $(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,$(if 
$(filter ANDROID,$(OS)),--disable-shared,--disable-static)) \
-               $(if $(filter ANDROID iOS,$(OS)),--disable-xlib 
--disable-xcb,$(if $(filter TRUE,$(DISABLE_GUI)),--disable-xlib 
--disable-xcb,--enable-xlib --enable-xcb)) \
+               $(if $(filter EMSCRIPTEN ANDROID iOS,$(OS)),--disable-xlib 
--disable-xcb,$(if $(filter TRUE,$(DISABLE_GUI)),--disable-xlib 
--disable-xcb,--enable-xlib --enable-xcb)) \
                $(if $(filter iOS,$(OS)),--enable-quartz --enable-quartz-font) \
                --disable-valgrind \
                $(if $(filter iOS,$(OS)),--disable-ft,--enable-ft --enable-fc) \
diff --git a/external/cairo/ExternalProject_pixman.mk 
b/external/cairo/ExternalProject_pixman.mk
index fec943762df8..00b61170ff77 100644
--- a/external/cairo/ExternalProject_pixman.mk
+++ b/external/cairo/ExternalProject_pixman.mk
@@ -39,6 +39,7 @@ $(call gb_ExternalProject_get_state_target,pixman,build) :
                $(if $(filter ANDROID,$(OS)),--disable-arm-simd 
--disable-arm-neon --disable-arm-iwmmxt) \
                $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM) \
                $(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no)) \
+               $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-pthread") \
                && $(MAKE) \
        )
        $(call gb_Trace_EndRange,pixman,EXTERNAL)
diff --git a/external/fontconfig/ExternalProject_fontconfig.mk 
b/external/fontconfig/ExternalProject_fontconfig.mk
index b82c7657395b..14190675427a 100644
--- a/external/fontconfig/ExternalProject_fontconfig.mk
+++ b/external/fontconfig/ExternalProject_fontconfig.mk
@@ -21,7 +21,7 @@ $(eval $(call gb_ExternalProject_register_targets,fontconfig,\
 $(call gb_ExternalProject_get_state_target,fontconfig,build) :
        $(call gb_Trace_StartRange,fontconfig,EXTERNAL)
        $(call gb_ExternalProject_run,build,\
-               CFLAGS="$(if $(debug),-g) $(gb_VISIBILITY_FLAGS)" $(if $(filter 
ANDROID,$(OS)),LIBS="-lm") \
+               CFLAGS="$(if $(debug),-g) $(gb_VISIBILITY_FLAGS) $(if $(filter 
EMSCRIPTEN,$(OS)),-pthread)" $(if $(filter ANDROID,$(OS)),LIBS="-lm") \
                ./configure \
                        --disable-shared \
                        --disable-silent-rules \
@@ -29,6 +29,7 @@ $(call gb_ExternalProject_get_state_target,fontconfig,build) :
                        --with-expat-includes=$(call 
gb_UnpackedTarball_get_dir,expat)/lib \
                        --with-expat-lib=$(gb_StaticLibrary_WORKDIR) \
                        --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
+                       $(if $(filter EMSCRIPTEN,$(OS)),ac_cv_func_fstatfs=no 
ac_cv_func_fstatvfs=no) \
                && $(MAKE) -C src \
        )
        $(call gb_Trace_EndRange,fontconfig,EXTERNAL)
diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index 015d286b1414..0c8a7047ec01 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -73,7 +73,7 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
                ./configure \
                        --disable-layout --disable-samples \
                        $(if $(filter FUZZERS,$(BUILD_TYPE)),--disable-release) 
\
-                       $(if $(filter ENSCRIPTEN 
ANDROID,$(OS)),--disable-strict ac_cv_c_bigendian=no) \
+                       $(if $(filter EMSCRIPTEN 
ANDROID,$(OS)),--disable-strict ac_cv_c_bigendian=no) \
                        $(if $(filter SOLARIS AIX,$(OS)),--disable-64bit-libs) \
                        $(if $(filter TRUE,$(DISABLE_DYNLOADING)),\
                                --with-data-packaging=static --enable-static 
--disable-shared --disable-dyload,\
@@ -81,6 +81,7 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
                        $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) 
--host=$(HOST_PLATFORM)\
                                
--with-cross-build=$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source \
                                --disable-tools --disable-extras) \
+                       AR="$(AR)" RANLIB="$(RANLIB)" \
                && $(MAKE) $(if $(CROSS_COMPILING),DATASUBDIR=data) $(if 
$(verbose),VERBOSE=1) \
                $(if $(filter MACOSX,$(OS)), \
                        && $(PERL) 
$(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl \
diff --git a/external/icu/icu4c-emscripten-cross.patch.1 
b/external/icu/icu4c-emscripten-cross.patch.1
index 5935a0169f53..2462a1fb93fe 100644
--- a/external/icu/icu4c-emscripten-cross.patch.1
+++ b/external/icu/icu4c-emscripten-cross.patch.1
@@ -10,7 +10,7 @@
                ]
 --- /dev/null
 +++ icu/source/config/mh-emscripten    2015-10-06 12:01:00.497972406 +0200
-@@ -0,0 +1,89 @@
+@@ -0,0 +1,85 @@
 +## Emscripten-specific setup
 +## Copyright (c) 1999-2013, International Business Machines Corporation and
 +## others. All Rights Reserved.
@@ -52,18 +52,15 @@
 +## Shared object suffix
 +SO = so
 +## Non-shared intermediate object suffix
-+STATIC_O = ao
++STATIC_O = o
 +
 +## Compilation rules
++# WASM needs -pthread for atomics support
 +%.$(STATIC_O): $(srcdir)/%.c
-+      $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(STATICCPPFLAGS) 
$(STATICCFLAGS)) -o $@ $<)
-+%.o: $(srcdir)/%.c
-+      $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(DYNAMICCPPFLAGS) 
$(DYNAMICCFLAGS)) -o $@ $<)
++      $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(STATICCPPFLAGS) 
$(STATICCFLAGS)) -pthread -o $@ $<)
 +
 +%.$(STATIC_O): $(srcdir)/%.cpp
-+      $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(STATICCPPFLAGS) 
$(STATICCXXFLAGS)) -o $@ $<)
-+%.o: $(srcdir)/%.cpp
-+      $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(DYNAMICCPPFLAGS) 
$(DYNAMICCXXFLAGS)) -o $@ $<)
++      $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(STATICCPPFLAGS) 
$(STATICCXXFLAGS)) -pthread -o $@ $<)
 +
 +
 +## Dependency rules
diff --git a/external/liblangtag/ExternalProject_liblangtag.mk 
b/external/liblangtag/ExternalProject_liblangtag.mk
index 51dc4f4b0c68..b45615e86ff0 100644
--- a/external/liblangtag/ExternalProject_liblangtag.mk
+++ b/external/liblangtag/ExternalProject_liblangtag.mk
@@ -29,7 +29,7 @@ $(call gb_ExternalProject_get_state_target,liblangtag,build):
                        --enable-shared --disable-static) \
                $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
                $(if $(filter 
TRUE,$(HAVE_GCC_BUILTIN_ATOMIC)),"lt_cv_has_atomic=yes","lt_cv_has_atomic=no") \
-               CFLAGS='$(CFLAGS) \
+               CFLAGS='$(CFLAGS) -pthread \
                                $(if $(ENABLE_OPTIMIZED), \
                                        
$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
                                $(if $(call 
gb_Module__symbols_enabled,liblangtag),$(gb_DEBUGINFO_FLAGS))' \
diff --git a/include/sal/alloca.h b/include/sal/alloca.h
index bb4c3e0e0c05..05fe1b715f33 100644
--- a/include/sal/alloca.h
+++ b/include/sal/alloca.h
@@ -21,7 +21,7 @@
 #define INCLUDED_SAL_ALLOCA_H
 
 #if defined(__sun) || defined(LINUX) || defined(AIX) || defined(ANDROID) || 
defined(HAIKU)         \
-    || defined(MACOSX) || defined(IOS)
+    || defined(MACOSX) || defined(IOS) || defined(EMSCRIPTEN)
 
 #ifndef INCLUDED_ALLOCA_H
 #include <alloca.h>
diff --git a/sal/osl/unx/system.hxx b/sal/osl/unx/system.hxx
index a8b0e10cd163..fb0e0aa47282 100644
--- a/sal/osl/unx/system.hxx
+++ b/sal/osl/unx/system.hxx
@@ -269,13 +269,32 @@ int macxp_resolveAlias(char *path, int buflen);
 #   define  NO_PTHREAD_RTL
 #endif
 
+#ifdef EMSCRIPTEN
+#   ifndef ETIME
+#       define  ETIME ETIMEDOUT
+#   endif
+#   include <pthread.h>
+#   include <sys/file.h>
+#   include <sys/ioctl.h>
+#   include <sys/uio.h>
+#   include <sys/un.h>
+#   include <netinet/tcp.h>
+#   include <dlfcn.h>
+#   include <endian.h>
+#   include <sys/time.h>
+#   define  IORESOURCE_TRANSFER_BSD
+#   define  IOCHANNEL_TRANSFER_BSD_RENO
+#   define  pthread_testcancel()
+#   define  NO_PTHREAD_PRIORITY
+#endif
+
 #if !defined(_WIN32)  && \
     !defined(LINUX)   && !defined(NETBSD) && !defined(FREEBSD) && \
     !defined(AIX)     && \
     !defined(__sun) && !defined(MACOSX) && \
     !defined(OPENBSD) && !defined(DRAGONFLY) && \
     !defined(IOS) && !defined(ANDROID) && \
-    !defined(HAIKU)
+    !defined(HAIKU) && !defined(EMSCRIPTEN)
 #   error "Target platform not specified!"
 #endif
 
diff --git a/scripting/Module_scripting.mk b/scripting/Module_scripting.mk
index 1d603d585a11..1d974e8e7c26 100644
--- a/scripting/Module_scripting.mk
+++ b/scripting/Module_scripting.mk
@@ -31,7 +31,7 @@ $(eval $(call gb_Module_add_targets,scripting,\
                $(if $(ENABLE_SCRIPTING_BEANSHELL),Package_ScriptsBeanShell) \
                $(if $(ENABLE_SCRIPTING_JAVASCRIPT),Package_ScriptsJavaScript) \
        ) \
-       $(if $(DISABLE_SCRIPTING),,Package_scriptbindinglib) \
+       Package_scriptbindinglib \
        $(if $(DISABLE_PYTHON),,\
                Package_scriptproviderforpython \
                Package_ScriptsPython \
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 7495a32626aa..a1d2813edaf9 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -13,6 +13,12 @@ else
 gb_UnoApiHeadersTarget_select_variant = $(2)
 endif
 
+gb_LinkTarget_LDFLAGS += -s TOTAL_MEMORY=1GB
+
 include $(GBUILDDIR)/platform/unxgcc.mk
 
+gb_CFLAGS += -pthread -s TOTAL_MEMORY=1GB -s USE_PTHREADS=1 -s 
PTHREAD_POOL_SIZE=4
+gb_CXXFLAGS += -pthread -s TOTAL_MEMORY=1GB -s USE_PTHREADS=1 -s 
PTHREAD_POOL_SIZE=4
+gb_CXX_LINKFLAGS += -pthread -s TOTAL_MEMORY=1GB -s USE_PTHREADS=1 -s 
PTHREAD_POOL_SIZE=4
+
 # vim: set noet sw=4 ts=4
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_emcc.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_emcc.mk
deleted file mode 100644
index 7495a32626aa..000000000000
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_emcc.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-ifeq ($(DISABLE_DYNLOADING),TRUE)
-gb_UnoApiHeadersTarget_select_variant = $(if $(filter 
udkapi,$(1)),comprehensive,$(2))
-else
-gb_UnoApiHeadersTarget_select_variant = $(2)
-endif
-
-include $(GBUILDDIR)/platform/unxgcc.mk
-
-# vim: set noet sw=4 ts=4
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk 
b/solenv/gbuild/platform/com_GCC_defs.mk
index 5f4a06445225..d5b23ae31875 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -140,7 +140,7 @@ endif
 gb_VISIBILITY_FLAGS_CXX := -fvisibility-inlines-hidden
 gb_CXXFLAGS_COMMON += $(gb_VISIBILITY_FLAGS_CXX)
 
-gb_LinkTarget_LDFLAGS += -fstack-protector-strong
+gb_LinkTarget_LDFLAGS += $(if $(filter 
EMSCRIPTEN,$(OS)),-fno-stack-protector,-fstack-protector-strong)
 
 ifneq ($(gb_ENABLE_PCH),)
 ifeq ($(COM_IS_CLANG),TRUE)
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 7ef9d0b4015e..bde5c0fe0a76 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -135,7 +135,7 @@ $(call gb_Helper_abbreviate_dirs,\
                    $(T_LIBS) \
                    $(if 
$(CXXOBJECTS)$(GENCXXOBJECTS)$(EXTRAOBJECTLISTS)$(filter-out 
XTRUE,X$(ENABLE_RUNTIME_OPTIMIZATIONS)),$(T_STDLIBS_CXX)) \
                    -Wl$(COMMA)--end-group \
-                   , \
+               , \
                    -Wl$(COMMA)--start-group \
                    $(foreach lib,$(LINKED_STATIC_LIBS),$(call 
gb_StaticLibrary_get_target,$(lib))) \
                    $(T_LIBS) \
diff --git a/svx/Module_svx.mk b/svx/Module_svx.mk
index 599f842d480e..6f6b03adf771 100644
--- a/svx/Module_svx.mk
+++ b/svx/Module_svx.mk
@@ -47,7 +47,7 @@ $(eval $(call gb_Module_add_screenshot_targets,svx,\
 
 ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
 $(eval $(call gb_Module_add_targets,svx,\
-    Executable_gengal \
+    $(if $(filter-out EMSCRIPTEN,$(OS)),Executable_gengal) \
     $(if $(filter-out MACOSX WNT,$(OS)), \
                Package_gengal) \
 ))
diff --git a/unoidl/Executable_unoidl-read.mk b/unoidl/Executable_unoidl-read.mk
index b134c30b1a72..037097df1ba6 100644
--- a/unoidl/Executable_unoidl-read.mk
+++ b/unoidl/Executable_unoidl-read.mk
@@ -21,4 +21,8 @@ $(eval $(call gb_Executable_use_libraries,unoidl-read, \
     sal \
 ))
 
+ifeq ($(DISABLE_DYNLOADING),TRUE)
+$(eval $(call gb_Executable_use_external,unoidl-read,dtoa))
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/vcl/Executable_ui-previewer.mk b/vcl/Executable_ui-previewer.mk
index bee97cbac14b..acee26cd15d3 100644
--- a/vcl/Executable_ui-previewer.mk
+++ b/vcl/Executable_ui-previewer.mk
@@ -9,7 +9,35 @@
 
 $(eval $(call gb_Executable_Executable,ui-previewer))
 
-$(eval $(call gb_Executable_use_external,ui-previewer,boost_headers))
+$(eval $(call gb_Executable_use_externals,ui-previewer,\
+    boost_headers \
+    $(if $(filter TRUE,$(DISABLE_DYNLOADING)),\
+        dtoa \
+        icuuc \
+        icui18n \
+        icudata \
+        libpng \
+        libjpeg \
+        harfbuzz \
+        libxml2 \
+        graphite \
+        liblangtag \
+        qt5 \
+        cairo \
+        fontconfig \
+        lcms2 \
+        freetype \
+        openssl \
+        expat \
+        orcus-parser \
+        orcus \
+        qrcodegen \
+        boost_filesystem \
+        boost_iostreams \
+        boost_system \
+        mdds_headers \
+    ) \
+))
 
 $(eval $(call gb_Executable_use_api,ui-previewer,\
     offapi \
@@ -17,17 +45,54 @@ $(eval $(call gb_Executable_use_api,ui-previewer,\
 ))
 
 $(eval $(call gb_Executable_use_static_libraries,ui-previewer,\
+    $(if $(filter TRUE,$(DISABLE_DYNLOADING)),boost_locale) \
     vclmain \
 ))
 
 $(eval $(call gb_Executable_use_libraries,ui-previewer,\
-       comphelper \
-       cppu \
-       cppuhelper \
-       sal \
+    comphelper \
+    cppu \
+    cppuhelper \
+    sal \
     tl \
     ucbhelper \
     vcl \
+    $(if $(filter TRUE,$(DISABLE_DYNLOADING)), \
+        acc \
+        avmedia \
+        basegfx \
+        cui \
+        dbtools \
+        drawinglayer \
+        editeng \
+        emfio \
+        epoxy \
+        fwk \
+        gcc3_uno \
+        gie \
+        graphicfilter \
+        i18nlangtag \
+        i18nutil \
+        lng \
+        reg \
+        salhelper \
+        sax \
+        sfx \
+        sot \
+        store \
+        svl \
+        svt \
+        svx \
+        svxcore \
+        tk \
+        ucbhelper \
+        unoidl \
+        utl \
+        xmlreader \
+        xo \
+        xof \
+        $(if $(filter EMSCRIPTEN,$(OS)),vclplug_qt5) \
+    ) \
 ))
 
 $(eval $(call gb_Executable_add_exception_objects,ui-previewer,\
@@ -40,12 +105,12 @@ $(eval $(call gb_Executable_add_defs,ui-previewer,\
 
 ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
 $(eval $(call gb_Executable_add_libs,ui-previewer,\
-       -lm $(DLOPEN_LIBS) \
+    -lm $(DLOPEN_LIBS) \
     -lX11 \
 ))
 
 $(eval $(call gb_Executable_use_static_libraries,ui-previewer,\
-       glxtest \
+    glxtest \
 ))
 endif
 
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index ff8c4182af2f..69bba379be42 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -569,6 +569,24 @@ $(eval $(call gb_Library_use_externals,vcl,\
 ))
 endif
 
+ifeq ($(OS),EMSCRIPTEN)
+$(eval $(call gb_Library_add_exception_objects,vcl,\
+    vcl/unx/generic/printer/jobdata \
+    vcl/unx/generic/printer/ppdparser \
+    vcl/null/printerinfomanager \
+    vcl/wasm/salplug \
+    $(vcl_headless_code) \
+    $(vcl_headless_freetype_code) \
+))
+
+$(eval $(call gb_Library_use_externals,vcl,\
+    cairo \
+    expat \
+    fontconfig \
+    freetype \
+))
+endif
+
 ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
 $(eval $(call gb_Library_add_libs,vcl,\
     -lm $(DLOPEN_LIBS) \
diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk
index 25cbfe9f60ba..3aad76800ad6 100644
--- a/vcl/Library_vclplug_qt5.mk
+++ b/vcl/Library_vclplug_qt5.mk
@@ -80,8 +80,6 @@ $(eval $(call gb_Library_add_libs,vclplug_qt5,\
 endif
 
 $(eval $(call gb_Library_add_exception_objects,vclplug_qt5,\
-    vcl/qt5/Qt5AccessibleEventListener \
-    vcl/qt5/Qt5AccessibleWidget \
     vcl/qt5/Qt5Bitmap \
     vcl/qt5/Qt5Clipboard \
     vcl/qt5/Qt5Data \
@@ -110,8 +108,15 @@ $(eval $(call 
gb_Library_add_exception_objects,vclplug_qt5,\
     vcl/qt5/Qt5Transferable \
     vcl/qt5/Qt5VirtualDevice \
     vcl/qt5/Qt5Widget \
+))
+
+ifneq ($(OS),EMSCRIPTEN)
+$(eval $(call gb_Library_add_exception_objects,vclplug_qt5,\
+    vcl/qt5/Qt5AccessibleEventListener \
+    vcl/qt5/Qt5AccessibleWidget \
     vcl/qt5/Qt5XAccessible \
 ))
+endif
 
 ifeq ($(OS),LINUX)
 $(eval $(call gb_Library_add_libs,vclplug_qt5,\
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 8bfc67c1e2ef..2a910a9ced3f 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -78,12 +78,6 @@ $(eval $(call gb_Module_add_targets,vcl,\
     Library_vclplug_kf5 \
 ))
 endif
-ifneq ($(ENABLE_QT5),)
-$(eval $(call gb_Module_add_targets,vcl,\
-    CustomTarget_qt5_moc \
-    Library_vclplug_qt5 \
-))
-endif
 ifneq ($(ENABLE_GTK3_KDE5),)
 $(eval $(call gb_Module_add_targets,vcl,\
     CustomTarget_gtk3_kde5_moc \
@@ -122,6 +116,13 @@ $(eval $(call gb_Module_add_targets,vcl,\
 endif
 endif
 
+ifneq ($(ENABLE_QT5),)
+$(eval $(call gb_Module_add_targets,vcl,\
+    CustomTarget_qt5_moc \
+    Library_vclplug_qt5 \
+))
+endif
+
 ifneq ($(ENABLE_FUZZERS),)
 $(eval $(call gb_Module_add_targets,vcl,\
     CustomTarget_nativecore \
diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx
index 97eff04fe77a..2f6bfb4b5fcd 100644
--- a/vcl/qt5/Qt5Instance.cxx
+++ b/vcl/qt5/Qt5Instance.cxx
@@ -562,7 +562,7 @@ void* Qt5Instance::CreateGStreamerSink(const 
SystemChildWindow* pWindow)
 
     return pVideosink;
 #else
-    (void*)pWindow;
+    Q_UNUSED(pWindow);
     return nullptr;
 #endif
 }
diff --git a/vcl/qt5/Qt5MainWindow.cxx b/vcl/qt5/Qt5MainWindow.cxx
index 45d726ba22be..89879864a9bc 100644
--- a/vcl/qt5/Qt5MainWindow.cxx
+++ b/vcl/qt5/Qt5MainWindow.cxx
@@ -19,7 +19,9 @@ Qt5MainWindow::Qt5MainWindow(Qt5Frame& rFrame, 
Qt::WindowFlags f)
     : QMainWindow(nullptr, f)
     , m_rFrame(rFrame)
 {
+#ifndef EMSCRIPTEN
     QAccessible::installFactory(Qt5AccessibleWidget::customFactory);
+#endif
 }
 
 void Qt5MainWindow::closeEvent(QCloseEvent* pEvent)
diff --git a/vcl/wasm/salplug.cxx b/vcl/wasm/salplug.cxx
new file mode 100644
index 000000000000..b5ba480dd104
--- /dev/null
+++ b/vcl/wasm/salplug.cxx
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "saldatabasic.hxx"
+#include "printerinfomanager.hxx"
+
+extern "C" SalInstance* create_SalInstance();
+
+void SalAbort(const OUString& /* rErrorText */, bool /* bDumpCore */)
+{
+    //    NSLog(@"SalAbort: %s", OUStringToOString(rErrorText, 
osl_getThreadTextEncoding()).getStr() );
+}
+
+const OUString& SalGetDesktopEnvironment()
+{
+    static OUString aEnv("wasm");
+    return aEnv;
+}
+
+SalInstance* CreateSalInstance() { return create_SalInstance(); }
+
+void DestroySalInstance(SalInstance* pInst)
+{
+    pInst->ReleaseYieldMutexAll();
+    delete pInst;
+}
+
+SalData::SalData()
+    : m_pInstance(nullptr)
+    , m_pPIManager(nullptr)
+{
+}
+
+SalData::~SalData() COVERITY_NOEXCEPT_FALSE { 
psp::PrinterInfoManager::release(); }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 3cdac4dab2312616018c9d687e1fb32f34c1147e
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Fri Dec 11 17:27:59 2020 +0100
Commit:     Jan-Marek Glogowski <glo...@fbihome.de>
CommitDate: Tue Dec 15 03:59:47 2020 +0100

    WASM catchall commit
    
    The current state is incompatible with upstream, especially the
    emconfigure change.
    
    Please also read README.wasm
    
    Change-Id: I668b4128491c467b94ea1c13ee695b08dce32968

diff --git a/README.wasm b/README.wasm
new file mode 100644
index 000000000000..be6cc4ff0ecf
--- /dev/null
+++ b/README.wasm
@@ -0,0 +1,144 @@
+= Setup for the LO WASM build (with Qt) =
+
+We're using Qt 5.15 with the officially supported emscripten v1.39.8.
+But there are several potential problems with threads and exceptions, so this 
will likely
+change later zo a newer emscripten.
+
+Qt WASM is not yet used with LO, just if you're wondering!
+
+== Setup emscripten ==
+
+https://emscripten.org/docs/getting_started/index.html
+
+git clone https://github.com/emscripten-core/emsdk.git
+./emsdk install 1.39.8
+./emsdk activate --embedded 1.39.8
+
+Example bashrc scriptlet:
+
+EMSDK_ENV=$HOME/Development/libreoffice/git_emsdk/emsdk_env.sh
+[ -f "$EMSDK_ENV" ] && \. "$EMSDK_ENV" 1>/dev/null 2>&1
+
+
+== Setup LO ==
+
+Currently autogen.sh is patched to use emconfigure. That basically sets 
various environment vars,
+especially EMMAKEN_JUST_CONFIGURE, which will create the correct output file 
names, checked by
+configure (a.out).
+
+--host=wasm64-local-emscripten
+--disable-cups
+--disable-dconf
+--disable-gio
+--disable-dbus
+--disable-sdremote-bluetooth
+--disable-gstreamer-1-0
+--disable-odk
+--disable-postgresql-sdbc
+--disable-firebird-sdbc
+--disable-mariadb-sdbc
+--disable-nss
+--disable-python
+--disable-randr
+--disable-pdfimport
+--disable-report-builder
+--disable-lpsolve
+--disable-coinmp
+--without-fonts
+--without-java
+--without-junit
+--without-helppack-integration
+--without-system-dicts
+--with-theme=no
+--disable-cairo-canvas
+--disable-scripting
+--disable-dynamic-loading
+--disable-ccache
+--disable-gtk3
+--enable-qt5
+
+Will also be encoded in configure.ac at some point, some already is.
+
+
+== Setup Qt ==
+
+https://doc.qt.io/qt-5/wasm.html
+
+I originally build the Qt 5.15 branch, but probably better to build a tag like 
v5.15.2.
+
+./configure -xplatform wasm-emscripten -feature-thread -compile-examples 
-prefix $PWD/qtbase
+make -j<CORES> module-qtbase module-qtdeclarative
+
+Building with examples will break with some of them, but at that point Qt 
already works.
+
+If you get a configure failure for Qt:
+
+Checking for target architecture... Project ERROR: target architecture 
detection binary not found.
+
+Edit qtbase/config.tests/arch/write_info.pri
+-     ext = .wasm
++     ext = .js.wasm
+
+Current Qt fails to start the demo webserver: 
https://bugreports.qt.io/browse/QTCREATORBUG-24072
+Use: emrun --serve_after_close to run Qt WASM demos
+
+
+= Mixed information, links, problems, TODO =
+
+More info on Qt WASM emscripten pthreads: 
https://wiki.qt.io/Qt_for_WebAssembly#Multithreading_Support
+
+Qt with threads has further memory limit. From Qt configure:
+Project MESSAGE: Setting PTHREAD_POOL_SIZE to 4
+Project MESSAGE: Setting TOTAL_MEMORY to 1GB
+
+LO uses a nested event loop to run dialogs in general, but that won't work, 
because you can't drive
+the browser event loop. like VCL does with the system event loop in the 
various VCL backends.
+Changing this will need some major work (basically dropping 
Application::Execute).
+
+But with the know problems with exceptions and threads, this might change:
+- https://github.com/emscripten-core/emscripten/pull/11518
+- https://github.com/emscripten-core/emscripten/issues/11503
+- https://github.com/emscripten-core/emscripten/issues/11233
+- https://github.com/emscripten-core/emscripten/issues/12035
+
+We're also using emconfigure at the moment. Originally I patched emscripten, 
because it
+woulden't create the correct a.out file for C++ configure tests. Later I found 
that
+the emconfigure sets EMMAKEN_JUST_CONFIGURE to work around the problem.
+
+But it sets many more environment variables with "em<tool>" variants. This can 
all be moved
+into LO configure later.
+
+ICU bug: https://github.com/emscripten-core/emscripten/issues/10129
+Alternative, probably: 
https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Intl
+
+There is a wasm64, but that still uses 32bit pointers!
+
+Old outdated docs: https://wiki.documentfoundation.org/Development/Emscripten
+Reverted patch: 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=0e21f6619c72f1e17a7b0a52b6317810973d8a3e
+
+Generally https://emscripten.org/docs/porting:
+- 
https://emscripten.org/docs/porting/guidelines/api_limitations.html#api-limitations
+- 
https://emscripten.org/docs/porting/files/file_systems_overview.html#file-system-overview
+- https://emscripten.org/docs/porting/pthreads.html
+- https://emscripten.org/docs/porting/emscripten-runtime-environment.html
+
+This will be interesting: 
https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-an-event-loop
+
+This didn't help much yet: https://github.com/emscripten-ports
+
+https://www.qt.io/qt-examples-for-webassembly
+http://qtandeverything.blogspot.com/2017/06/qt-for-web-assembly.html
+http://qtandeverything.blogspot.com/2020/
+https://emscripten.org/docs/api_reference/Filesystem-API.html
+https://discuss.python.org/t/add-a-webassembly-wasm-runtime/3957/12
+http://git.savannah.gnu.org/cgit/config.git
+https://webassembly.org/specs/
+https://developer.chrome.com/docs/native-client/
+https://emscripten.org/docs/getting_started/downloads.html
+https://github.com/openpgpjs/openpgpjs/blob/master/README.md#getting-started
+https://developer.mozilla.org/en-US/docs/WebAssembly/Using_the_JavaScript_API
+https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-intro.md
+https://www.ip6.li/de/security/x.509_kochbuch/openssl-fuer-webassembly-compilieren
+https://emscripten.org/docs/introducing_emscripten/about_emscripten.html#about-emscripten-porting-code
+https://emscripten.org/docs/compiling/Building-Projects.html
+
diff --git a/autogen.sh b/autogen.sh
index 1779de77e6f3..54cc7e6262c8 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -313,7 +313,7 @@ if (defined $ENV{NOCONFIGURE}) {
         $ENV{"PROGRAMFILESX86"} = $ENV{"ProgramFiles(x86)"};
     }
 
-    system ("./configure", @args) && die "Error running configure";
+    system ("emconfigure", "./configure", @args) && die "Error running 
configure";
 }
 
 # Local Variables:
diff --git a/bridges/Module_bridges.mk b/bridges/Module_bridges.mk
index 3016bf2c404f..126e43b1cd31 100644
--- a/bridges/Module_bridges.mk
+++ b/bridges/Module_bridges.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_Module_add_targets,bridges,\
        ) \
 ))
 
+ifneq ($(OS), EMSCRIPTEN)
 ifeq (,$(filter build,$(gb_Module_SKIPTARGETS)))
 ifeq ($(strip $(bridges_SELECTED_BRIDGE)),)
 $(call gb_Output_error,no bridge selected for build: bailing out)
@@ -29,5 +30,6 @@ else ifneq ($(words $(bridges_SELECTED_BRIDGE)),1)
 $(call gb_Output_error,multiple bridges selected for build: 
$(bridges_SELECTED_BRIDGE))
 endif
 endif
+endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/config_host.mk.in b/config_host.mk.in
index add0c176ebc6..791f88f964b2 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -328,6 +328,7 @@ export KF5_LIBS=$(gb_SPACE)@KF5_LIBS@
 export KRB5_LIBS=@KRB5_LIBS@
 export LCMS2_CFLAGS=$(gb_SPACE)@LCMS2_CFLAGS@
 export LCMS2_LIBS=$(gb_SPACE)@LCMS2_LIBS@
+export LD=@LD@
 export LD_GC_SECTIONS=@LD_GC_SECTIONS@
 export LD_PLUGIN=@LD_PLUGIN@
 @x_LDFLAGS@ export LDFLAGS=@LDFLAGS@
@@ -640,6 +641,7 @@ export USE_XINERAMA=@USE_XINERAMA@
 export UPDATE_CONFIG=@UPDATE_CONFIG@
 export UUIDGEN=@UUIDGEN@
 export VALGRIND_CFLAGS=$(gb_SPACE)@VALGRIND_CFLAGS@
+export VCL_PLUGIN_INFO=@VCL_PLUGIN_INFO@
 export VCVER=@VCVER@
 export DEVENV=@DEVENV@
 export VISIO_CFLAGS=$(gb_SPACE)@VISIO_CFLAGS@
diff --git a/configure.ac b/configure.ac
index 4d801817c36e..a5440143f41f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1108,6 +1108,27 @@ haiku*)
     _os=Haiku
     ;;
 
+emscripten*)
+    build_gstreamer_1_0=no
+    enable_coinmp=yes
+    enable_lpsolve=no
+    enable_report_builder=no
+    with_theme="breeze"
+    test_cups=no
+    test_dbus=no
+    test_fontconfig=no
+    test_freetype=no
+    test_gtk=no
+    test_kde4=no
+    test_randr=no
+    test_xrender=no
+    enable_postgresql_sdbc=no
+    enable_firebird_sdbc=no
+    enable_mariadb_sdbc=no
+    with_system_zlib=no
+    _os=Emscripten
+    ;;
+
 *)
     AC_MSG_ERROR([$host_os operating system is not suitable to build 
LibreOffice for!])
     ;;
@@ -1806,6 +1827,13 @@ libo_FUZZ_ARG_ENABLE(cipher-openssl-backend,
         [Enable using OpenSSL as the actual implementation of the rtl/cipher.h 
functionality.
          Requires --enable-openssl.]))
 
+AC_ARG_ENABLE(nss,
+    AS_HELP_STRING([--disable-nss],
+        [Disable using NSS. If disabled,
+         components will either use GNUTLS or openssl. Work in progress,
+         use only if you are hacking on it.]),
+,enable_nss=yes)
+
 AC_ARG_ENABLE(library-bin-tar,
     AS_HELP_STRING([--enable-library-bin-tar],
         [Enable the building and reused of tarball of binary build for some 
'external' libraries.
@@ -4084,6 +4112,8 @@ if test "$COM_IS_CLANG" = TRUE; then
         [my_apple_clang=yes],[my_apple_clang=])
     if test "$my_apple_clang" = yes; then
         AC_MSG_RESULT([assumed yes (Apple Clang)])
+    elif test "$_os" = Emscripten; then
+        AC_MSG_RESULT([assumed yes (Emscripten Clang)])
     else
         if test "$_os" = WINNT; then
             dnl In which case, assume clang-cl:
@@ -5032,6 +5062,25 @@ solaris*)
     SOLARINC="$SOLARINC -I/usr/local/include"
     ;;
 
+emscripten*)
+    COM=GCC
+    USING_X11=
+    OS=EMSCRIPTEN
+    RTL_OS=Emscripten
+    P_SEP=:
+
+    case "$host_cpu" in
+    wasm32|wasm64)
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    CPUNAME=INTEL
+    RTL_ARCH=x86
+    PLATFORMID=linux_x86
+    ;;
+
 *)
     AC_MSG_ERROR([$host_os operating system is not suitable to build 
LibreOffice for!])
     ;;
@@ -5156,7 +5205,8 @@ if test "$cross_compiling" = "yes"; then
     unset CC CXX SYSBASE CFLAGS
     unset AR NM OBJDUMP PKG_CONFIG RANLIB READELF STRIP
     unset CPPUNIT_CFLAGS CPPUNIT_LIBS
-    unset LIBXML_CFLAGS LIBXML_LIBS LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC 
PKG_CONFIG_LIBDIR
+    unset LIBXML_CFLAGS LIBXML_LIBS LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC
+    unset PKG_CONFIG_LIBDIR PKG_CONFIG_PATH
     if test -n "$CC_FOR_BUILD"; then
         export CC="$CC_FOR_BUILD"
         CC_BASE=`first_arg_basename "$CC"`
@@ -5201,6 +5251,7 @@ if test "$cross_compiling" = "yes"; then
         --disable-gstreamer-1-0 \
         --disable-gtk3 \
         --disable-mariadb-sdbc \
+        --disable-nss \
         --disable-online-update \
         --disable-opencl \
         --disable-pdfimport \
@@ -5221,7 +5272,9 @@ if test "$cross_compiling" = "yes"; then
     PERMITTED_BUILD_TARGETS="
         AVMEDIA
         BOOST
+        CAIRO
         CLUCENE
+        CURL
         DBCONNECTIVITY
         DESKTOP
         DYNLOADING
@@ -6027,6 +6080,7 @@ if test "$_os" != "WINNT"; then
 fi
 AC_SUBST(AR)
 AC_SUBST(DLLTOOL)
+AC_SUBST(LD)
 AC_SUBST(NM)
 AC_SUBST(OBJDUMP)
 AC_SUBST(PKG_CONFIG)
@@ -9111,6 +9165,9 @@ if test "$with_system_libxml" = "auto"; then
     WINNT|iOS|Android)
         with_system_libxml="$with_system_libs"
         ;;
+    Emscripten)
+        with_system_libxml=no
+        ;;
     *)
         if test "$enable_fuzzers" != "yes"; then
             with_system_libxml=yes
@@ -10097,7 +10154,7 @@ AC_SUBST(SYSTEM_OPENLDAP)
 dnl ===================================================================
 dnl Check for system NSS
 dnl ===================================================================
-if test "$enable_fuzzers" != "yes"; then
+if test "$enable_fuzzers" != "yes" -a "$enable_nss" = "yes"; then
     libo_CHECK_SYSTEM_MODULE([nss],[NSS],[nss >= 3.9.3 nspr >= 4.8])
     AC_DEFINE(HAVE_FEATURE_NSS)
     ENABLE_NSS="TRUE"
@@ -11262,6 +11319,8 @@ if test -z "$build_vcl_plugins"; then
     build_vcl_plugins="none"
 fi
 AC_MSG_NOTICE([VCLplugs to be built: $build_vcl_plugins])
+VCL_PLUGIN_INFO=$R
+AC_SUBST([VCL_PLUGIN_INFO])
 
 dnl ===================================================================
 dnl check for dbus support
diff --git a/external/icu/ExternalProject_icu.mk 
b/external/icu/ExternalProject_icu.mk
index 3ded08562211..015d286b1414 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -73,8 +73,7 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
                ./configure \
                        --disable-layout --disable-samples \
                        $(if $(filter FUZZERS,$(BUILD_TYPE)),--disable-release) 
\
-                       $(if $(filter iOS ANDROID,$(OS)),--disable-dyload) \
-                       $(if $(filter ANDROID,$(OS)),--disable-strict 
ac_cv_c_bigendian=no) \
+                       $(if $(filter ENSCRIPTEN 
ANDROID,$(OS)),--disable-strict ac_cv_c_bigendian=no) \
                        $(if $(filter SOLARIS AIX,$(OS)),--disable-64bit-libs) \
                        $(if $(filter TRUE,$(DISABLE_DYNLOADING)),\
                                --with-data-packaging=static --enable-static 
--disable-shared --disable-dyload,\
diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 435382fa7988..a59d6e8b97d7 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -41,6 +41,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
        external/icu/icu4c-windows-cygwin-cross.patch.1 \
        external/icu/icu4c-$(if $(filter ANDROID,$(OS)),android,rpath).patch.1 \
        $(if $(filter-out 
ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.patch.1) \
+       external/icu/icu4c-emscripten-cross.patch.1 \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/icu4c-emscripten-cross.patch.1 
b/external/icu/icu4c-emscripten-cross.patch.1
new file mode 100644
index 000000000000..5935a0169f53
--- /dev/null
+++ b/external/icu/icu4c-emscripten-cross.patch.1
@@ -0,0 +1,102 @@
+--- icu/source/acinclude.m4.orig       2020-04-22 22:04:20.000000000 +0200
++++ icu/source/acinclude.m4    2020-11-04 06:10:29.993070072 +0100
+@@ -84,6 +84,7 @@
+ *-dec-osf*) icu_cv_host_frag=mh-alpha-osf ;;
+ *-*-nto*)     icu_cv_host_frag=mh-qnx ;;
+ *-ncr-*)      icu_cv_host_frag=mh-mpras ;;
++wasm*-*-emscripten*)  icu_cv_host_frag=mh-emscripten ;;
+ *)            icu_cv_host_frag=mh-unknown ;;
+ esac
+               ]
+--- /dev/null
++++ icu/source/config/mh-emscripten    2015-10-06 12:01:00.497972406 +0200
+@@ -0,0 +1,89 @@
++## Emscripten-specific setup
++## Copyright (c) 1999-2013, International Business Machines Corporation and
++## others. All Rights Reserved.
++## Commands to generate dependency files
++GEN_DEPS.c=  $(CC) -E -MM $(DEFS) $(CPPFLAGS)
++GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) $(CXXFLAGS)
++ 
++## Flags for position independent code
++SHAREDLIBCFLAGS = -fPIC
++SHAREDLIBCXXFLAGS = -fPIC
++SHAREDLIBCPPFLAGS = -DPIC
++
++## Additional flags when building libraries and with threads
++THREADSCPPFLAGS = -D_REENTRANT
++LIBCPPFLAGS =
++
++## Compiler switch to embed a runtime search path
++LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN
++LD_RPATH_PRE = -Wl,-rpath,
++
++## Force RPATH=$ORIGIN to locate own dependencies w/o need for 
LD_LIBRARY_PATH:
++ENABLE_RPATH=YES
++RPATHLDFLAGS=${LD_RPATH_PRE}'$$ORIGIN'
++
++## These are the library specific LDFLAGS
++#LDFLAGSICUDT=-nodefaultlibs -nostdlib
++# Debian change: linking icudata as data only causes too many problems.
++LDFLAGSICUDT=
++
++## Compiler switch to embed a library name
++# The initial tab in the next line is to prevent icu-config from reading it.
++      LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
++#SH# # We can't depend on MIDDLE_SO_TARGET being set.
++#SH# LD_SONAME=
++
++## Shared library options
++LD_SOOPTIONS= -Wl,-Bsymbolic-functions
++
++## Shared object suffix
++SO = so
++## Non-shared intermediate object suffix
++STATIC_O = ao
++
++## Compilation rules
++%.$(STATIC_O): $(srcdir)/%.c
++      $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(STATICCPPFLAGS) 
$(STATICCFLAGS)) -o $@ $<)
++%.o: $(srcdir)/%.c
++      $(call SILENT_COMPILE,$(strip $(COMPILE.c) $(DYNAMICCPPFLAGS) 
$(DYNAMICCFLAGS)) -o $@ $<)
++
++%.$(STATIC_O): $(srcdir)/%.cpp
++      $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(STATICCPPFLAGS) 
$(STATICCXXFLAGS)) -o $@ $<)
++%.o: $(srcdir)/%.cpp
++      $(call SILENT_COMPILE,$(strip $(COMPILE.cc) $(DYNAMICCPPFLAGS) 
$(DYNAMICCXXFLAGS)) -o $@ $<)
++
++
++## Dependency rules
++%.d: $(srcdir)/%.c
++      $(call ICU_MSG,(deps)) $<
++      @$(SHELL) -ec '$(GEN_DEPS.c) $< \
++              | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
++              [ -s $@ ] || rm -f $@'
++
++%.d: $(srcdir)/%.cpp
++      $(call ICU_MSG,(deps)) $<
++      @$(SHELL) -ec '$(GEN_DEPS.cc) $< \
++              | sed '\''s%\($*\)\.o[ :]*%\1.o $@ : %g'\'' > $@; \
++              [ -s $@ ] || rm -f $@'
++
++## Versioned libraries rules
++
++%.$(SO).$(SO_TARGET_VERSION_MAJOR): %.$(SO).$(SO_TARGET_VERSION)
++      $(RM) $@ && ln -s ${<F} $@
++%.$(SO): %.$(SO).$(SO_TARGET_VERSION_MAJOR)
++      $(RM) $@ && ln -s ${*F}.$(SO).$(SO_TARGET_VERSION) $@
++
++##  Bind internal references
++
++# LDflags that pkgdata will use
++BIR_LDFLAGS= -Wl,-Bsymbolic
++
++# Dependencies [i.e. map files] for the final library
++BIR_DEPS=
++
++## Remove shared library 's'
++STATIC_PREFIX_WHEN_USED =
++STATIC_PREFIX =
++
++## without assembly
++PKGDATA_OPTS = -O $(top_builddir)/data/icupkg.inc -w
diff --git a/external/libxml2/ExternalProject_libxml2.mk 
b/external/libxml2/ExternalProject_libxml2.mk
index 778befade47f..5f19036983ac 100644
--- a/external/libxml2/ExternalProject_libxml2.mk
+++ b/external/libxml2/ExternalProject_libxml2.mk
@@ -13,6 +13,10 @@ $(eval $(call gb_ExternalProject_register_targets,libxml2,\
        build \
 ))
 
+ifeq ($(OS),EMSCRIPTEN)
+$(call gb_ExternalProject_use_external_project,libxml2,icu)
+endif
+
 ifeq ($(OS),WNT)
 $(call gb_ExternalProject_use_external_project,libxml2,icu)
 
diff --git a/external/openssl/ExternalProject_openssl.mk 
b/external/openssl/ExternalProject_openssl.mk
index d0790e5e5b7b..0bb2ac7fef77 100644
--- a/external/openssl/ExternalProject_openssl.mk
+++ b/external/openssl/ExternalProject_openssl.mk
@@ -49,6 +49,8 @@ OPENSSL_PLATFORM := \
           $(if $(filter MACOSX,$(OS)),\
             $(if $(filter X86_64,$(CPUNAME)),darwin64-x86_64-cc)\
             $(if $(filter AARCH64,$(CPUNAME)),darwin64-arm64-cc)\
+         ,\
+           $(if $(filter EMSCRIPTEN,$(OS)),no-engine no-dso no-dgram no-sock 
no-srtp no-stdio no-err no-ocsp no-psk no-stdio no-ts no-asm) \
           )\
         )\
       )\
diff --git a/include/osl/endian.h b/include/osl/endian.h
index 766178a7eefc..4eb43c9011be 100644
--- a/include/osl/endian.h
+++ b/include/osl/endian.h
@@ -70,6 +70,8 @@ extern "C" {
 #   elif defined _BIG_ENDIAN
 #       define OSL_BIGENDIAN
 #   endif
+#elif defined EMSCRIPTEN
+#   define OSL_LITENDIAN
 #else
 #   error "Target platform not specified !"
 #endif
diff --git a/include/sal/config.h b/include/sal/config.h
index f8504b3c1129..01fef82dd89a 100644
--- a/include/sal/config.h
+++ b/include/sal/config.h
@@ -79,6 +79,17 @@
 #define SAL_CONFIGFILE(name) name "rc"
 #endif
 
+#ifdef EMSCRIPTEN
+#define SAL_UNX
+#define SAL_DLLEXTENSION ".bc"
+#define SAL_EXEEXTENSION ""
+#define SAL_DLLPREFIX "lib"
+#define SAL_PATHSEPARATOR ':'
+#define SAL_PATHDELIMITER '/'
+#define SAL_NEWLINE_STRING "\n"
+#define SAL_CONFIGFILE( name ) name "rc"
+#endif
+
 /* The following spell is for Solaris and its descendants.
  * See the "Solaris" section of
  * <http://sourceforge.net/p/predef/wiki/OperatingSystems/>, and
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
new file mode 100644
index 000000000000..7495a32626aa
--- /dev/null
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -0,0 +1,18 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+ifeq ($(DISABLE_DYNLOADING),TRUE)
+gb_UnoApiHeadersTarget_select_variant = $(if $(filter 
udkapi,$(1)),comprehensive,$(2))
+else
+gb_UnoApiHeadersTarget_select_variant = $(2)
+endif
+
+include $(GBUILDDIR)/platform/unxgcc.mk
+
+# vim: set noet sw=4 ts=4
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_emcc.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_emcc.mk
new file mode 100644
index 000000000000..7495a32626aa
--- /dev/null
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_emcc.mk
@@ -0,0 +1,18 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# 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/.
+#
+
+ifeq ($(DISABLE_DYNLOADING),TRUE)
+gb_UnoApiHeadersTarget_select_variant = $(if $(filter 
udkapi,$(1)),comprehensive,$(2))
+else
+gb_UnoApiHeadersTarget_select_variant = $(2)
+endif
+
+include $(GBUILDDIR)/platform/unxgcc.mk
+
+# vim: set noet sw=4 ts=4
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk 
b/solenv/gbuild/platform/com_GCC_defs.mk
index 047f121106de..5f4a06445225 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -49,6 +49,7 @@ gb_COMPILERDEFS := \
        -DBOOST_ERROR_CODE_HEADER_ONLY \
        -DBOOST_SYSTEM_NO_DEPRECATED \
        -DCPPU_ENV=$(gb_CPPU_ENV) \
+       $(if $(filter EMSCRIPTEN,$(OS)),-U_FORTIFY_SOURCE) \
 
 gb_CFLAGS_COMMON := \
        -Wall \
@@ -63,7 +64,7 @@ gb_CFLAGS_COMMON := \
        -fmessage-length=0 \
        -fno-common \
        -pipe \
-       -fstack-protector-strong \
+       $(if $(filter 
EMSCRIPTEN,$(OS)),-fno-stack-protector,-fstack-protector-strong) \
        $(if $(gb_COLOR),-fdiagnostics-color=always) \
 
 gb_CXXFLAGS_COMMON := \
@@ -80,7 +81,7 @@ gb_CXXFLAGS_COMMON := \
        -fmessage-length=0 \
        -fno-common \
        -pipe \
-       -fstack-protector-strong \
+       $(if $(filter 
EMSCRIPTEN,$(OS)),-fno-stack-protector,-fstack-protector-strong) \
        $(if $(gb_COLOR),-fdiagnostics-color=always) \
 
 ifeq ($(HAVE_WDEPRECATED_COPY_DTOR),TRUE)
diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk
index 291e2557638c..ea1ac49001bd 100644
--- a/svl/Library_svl.mk
+++ b/svl/Library_svl.mk
@@ -105,6 +105,7 @@ $(eval $(call gb_Library_use_system_win32_libs,svl,\
 ))
 else
 ifneq (,$(filter DESKTOP,$(BUILD_TYPE))$(filter ANDROID iOS,$(OS)))
+ifneq (,$(ENABLE_NSS))
 $(eval $(call gb_Library_add_defs,svl,\
     -DSVL_CRYPTO_NSS \
 ))
@@ -112,6 +113,7 @@ $(eval $(call gb_Library_use_externals,svl,\
     nss3 \
     plc4 \
 ))
+endif # !ENABLE_NSS
 endif # BUILD_TYPE=DESKTOP
 endif
 
commit d9ccee2231a8d8984302e1b2f578bf73b4d60c35
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Mon Dec 14 13:30:52 2020 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Dec 15 00:37:37 2020 +0100

    tdf#122045: sw: Add UItest
    
    Change-Id: Ic49462e6d5a78d75947518744bde72b3d2cef86e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107688
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/qa/uitest/writer_tests5/tdf122045.py 
b/sw/qa/uitest/writer_tests5/tdf122045.py
new file mode 100644
index 000000000000..80d11384ac8f
--- /dev/null
+++ b/sw/qa/uitest/writer_tests5/tdf122045.py
@@ -0,0 +1,43 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import select_pos
+
+class tdf122045(UITestCase):
+
+    def test_tdf122045(self):
+
+        self.ui_test.create_doc_in_start_center("writer")
+        xWriterDoc = self.xUITest.getTopFocusWindow()
+        document = self.ui_test.get_component()
+
+        self.ui_test.execute_dialog_through_command(".uno:PageDialog")
+        xDialog = self.xUITest.getTopFocusWindow()
+
+        xTabs = xDialog.getChild("tabcontrol")
+        select_pos(xTabs, "2")
+
+        btncolor = xDialog.getChild("btncolor")
+        btncolor.executeAction("CLICK", tuple())
+
+        xApplyBtn = xDialog.getChild("apply")
+        xApplyBtn.executeAction("CLICK", tuple())
+
+        self.assertTrue(document.isModified())
+        self.assertEqual("0x729fcf", 
hex(document.StyleFamilies.PageStyles.Standard.BackColor))
+
+        xCancelBtn = xDialog.getChild("cancel")
+        self.ui_test.close_dialog_through_button(xCancelBtn)
+
+        self.assertTrue(document.isModified())
+        self.assertEqual("0x729fcf", 
hex(document.StyleFamilies.PageStyles.Standard.BackColor))
+
+        self.ui_test.close_doc()
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
commit 14372e301f0198067e4965ac1a234d9f9d21e3b2
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon Dec 14 22:32:28 2020 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Mon Dec 14 23:19:32 2020 +0100

    Silence warning C4189: local variable is initialized but not referenced
    
    Change-Id: Ie36d7c4dfee5115b5909ed58a0b16b367e05866d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107734
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/vcl/win/app/saltimer.cxx b/vcl/win/app/saltimer.cxx
index 571988df4d23..1ccab54e96c8 100644
--- a/vcl/win/app/saltimer.cxx
+++ b/vcl/win/app/saltimer.cxx
@@ -62,8 +62,10 @@ void WinSalTimer::ImplStop()
 
 void WinSalTimer::ImplStart( sal_uInt64 nMS )
 {
+#if !defined NDEBUG
     SalData* pSalData = GetSalData();
     assert( !pSalData->mpInstance || pSalData->mnAppThreadId == 
GetCurrentThreadId() );
+#endif
 
     // DueTime parameter is a DWORD, which is always an unsigned 32bit
     if (nMS > SAL_MAX_UINT32)
commit c8f61430b5760c7baabebff9c3159092975d4a88
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon Dec 14 22:30:13 2020 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Mon Dec 14 23:08:42 2020 +0100

    Reuse pInst
    
    Change-Id: I91e5a469344ab951225e61237b462ed58ed796be
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107733
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/vcl/win/app/saltimer.cxx b/vcl/win/app/saltimer.cxx
index 5a4760ad5e11..571988df4d23 100644
--- a/vcl/win/app/saltimer.cxx
+++ b/vcl/win/app/saltimer.cxx
@@ -45,7 +45,7 @@ void WinSalTimer::ImplStop()
     if ( m_bSetTimerRunning )
     {
         m_bSetTimerRunning = false;
-        KillTimer( GetSalData()->mpInstance->mhComWnd, m_aWmTimerId );
+        KillTimer( pInst->mhComWnd, m_aWmTimerId );
     }
     m_bDirectTimeout = false;
 
commit 97a809a74c60a38c46280b98bd2ec1c365643391
Author:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
AuthorDate: Mon Dec 14 21:41:05 2020 +0100
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Mon Dec 14 22:05:30 2020 +0100

    onedrive integration: updating metadata needs to be http PATCH
    
    avoids general i/o error message when adding newly created documents via
    the "Save remote" menu option.
    
    support for PATCH was added with 9cfcf83f53e0ae897b30705f790c6ebe0b86932e
    but only applied in onedrive-document.cxx OneDriveDocument::setContentStream
    which has it's own update of properties instead of reusing the method
    from onedrive-object.cxx
    
    Change-Id: I50f8801ac3186953f60198f877cedf3729307b89

diff --git a/external/libcmis/libcmis_onedrive.patch 
b/external/libcmis/libcmis_onedrive.patch
index 80634b16888d..60d7e7b3be69 100644
--- a/external/libcmis/libcmis_onedrive.patch
+++ b/external/libcmis/libcmis_onedrive.patch
@@ -256,7 +256,7 @@ index a9ae694..c1980c8 100644
      vector< string > headers;
      string res;
 diff --git a/src/libcmis/onedrive-object.cxx b/src/libcmis/onedrive-object.cxx
-index 976a97b..b6106a3 100644
+index 976a97b..8deb591 100644
 --- a/src/libcmis/onedrive-object.cxx
 +++ b/src/libcmis/onedrive-object.cxx
 @@ -65,7 +65,7 @@ void OneDriveObject::initializeFromJson ( Json json, string 
/*id*/, string /*nam
@@ -291,6 +291,15 @@ index 976a97b..b6106a3 100644
  }
  
  string OneDriveObject::getUploadUrl( )
+@@ -152,7 +157,7 @@ libcmis::ObjectPtr OneDriveObject::updateProperties(
+     {   
+         vector< string > headers;
+         headers.push_back( "Content-Type: application/json" );
+-        response = getSession( )->httpPutRequest( getUrl( ), is, headers );
++        response = getSession( )->httpPatchRequest( getUrl( ), is, headers );
+     }
+     catch ( const CurlException& e )
+     {   
 diff --git a/src/libcmis/onedrive-repository.cxx 
b/src/libcmis/onedrive-repository.cxx
 index 3eaac9c..b01f5c2 100644
 --- a/src/libcmis/onedrive-repository.cxx
commit acf4c5bc649624823d84e01d57a9af78ff3084ae
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Dec 14 20:57:38 2020 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Dec 14 22:01:20 2020 +0100

    ofz#28630 Fuzzing build failure
    
    Step #4: vcl/workben/commonfuzzer.hxx:70:28: error: no matching function 
for call to 'OUStringToOString'
    Step #4:             aBuffer.append(OUStringToOString(sExecDir + 
getExecutableName(), osl_getThreadTextEncoding())).append(".fonts");
    Step #4:                            ^~~~~~~~~~~~~~~~~
    Step #4: include/rtl/ustring.hxx:3587:16: note: candidate function not 
viable: no known conversion from 'typename 
std::enable_if_t<ToStringHelper<OUString>::allowOUStringConcat && 
ToStringHelper<OUString>::allowOUStringConcat, OUStringConcat<OUString, 
OUString>>' (aka 'rtl::OUStringConcat<rtl::OUString, rtl::OUString>') to 
'std::u16string_view' (aka 'basic_string_view<char16_t>') for 1st argument
    Step #4: inline OString OUStringToOString( std::u16string_view rUnicode,
    
    dunno what the preferred concatenation scheme is these days
    
    Change-Id: I7390d5b4a23a76d7cfbc75c90ea75df4ee39457f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107731
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/workben/commonfuzzer.hxx b/vcl/workben/commonfuzzer.hxx
index 57843998d97a..aa544e394549 100644
--- a/vcl/workben/commonfuzzer.hxx
+++ b/vcl/workben/commonfuzzer.hxx
@@ -67,7 +67,8 @@ namespace
             osl::FileBase::getSystemPathFromFileURL(execdir, sExecDir);
 
             OStringBuffer aBuffer("<?xml 
version=\"1.0\"?>\n<fontconfig><dir>");
-            aBuffer.append(OUStringToOString(sExecDir + getExecutableName(), 
osl_getThreadTextEncoding())).append(".fonts");
+            aBuffer.append(OUStringToOString(sExecDir, 
osl_getThreadTextEncoding()))
+                   .append(OUStringToOString(getExecutableName(), 
osl_getThreadTextEncoding())).append(".fonts");
             
aBuffer.append("</dir><cachedir>/tmp/cache/fontconfig</cachedir></fontconfig>");
             OString aConf = aBuffer.makeStringAndClear();
             sal_uInt64 aBytesWritten;
commit 2ab2c26b7e2ee43efa9475a2b394259744d7c3c5
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Dec 14 19:39:04 2020 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Dec 14 21:48:18 2020 +0100

    add missing 'use_underline'
    
    Change-Id: Ie6d549b20461d7bb80fd78deb393320e5ba57c0a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107725
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/editeng/uiconfig/ui/spellmenu.ui b/editeng/uiconfig/ui/spellmenu.ui
index d13d54ff04fb..6b6e2cb05b78 100644
--- a/editeng/uiconfig/ui/spellmenu.ui
+++ b/editeng/uiconfig/ui/spellmenu.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.38.1 -->
 <interface domain="editeng">
   <requires lib="gtk+" version="3.20"/>
   <object class="GtkMenu" id="menu">
@@ -10,6 +10,7 @@
         <property name="visible">True</property>
         <property name="can_focus">False</property>
         <property name="label" translatable="yes" 
context="spellmenu|ignore">I_gnore All</property>
+        <property name="use_underline">True</property>
       </object>
     </child>
     <child>
@@ -19,7 +20,7 @@
         <property name="label" translatable="yes" 
context="spellmenu|insert">_Add to Dictionary</property>
         <property name="use_underline">True</property>
         <child type="submenu">
-          <object class="GtkMenu">
+          <object class="GtkMenu" id="insertmenu">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
           </object>
@@ -55,7 +56,7 @@
         <property name="label" translatable="yes" 
context="spellmenu|autocorrect">AutoCorrect _To</property>
         <property name="use_underline">True</property>
         <child type="submenu">
-          <object class="GtkMenu">
+          <object class="GtkMenu" id="automenu">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
           </object>
commit 7f4114d22eb590c34fe868ae62a0e68d0f57917a
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon Dec 14 20:04:24 2020 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Mon Dec 14 21:21:01 2020 +0100

    warning C4189: 'pInst': local variable is initialized but not referenced
    
    Change-Id: I8180087a9e9c3a6d6368d6d94d77ca18d303c1bc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107724
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx
index 4893fdb53e61..cff09ed68650 100644
--- a/svl/source/svdde/ddesvr.cxx
+++ b/svl/source/svdde/ddesvr.cxx
@@ -347,8 +347,6 @@ DdeService* DdeInternal::FindService( HSZ hService )
 DdeTopic* DdeInternal::FindTopic( DdeService& rService, HSZ hTopic )
 {
     std::vector<DdeTopic*> &rTopics = rService.aTopics;
-    DdeInstData* pInst = ImpGetInstData();
-    assert(pInst);
 
     auto iter = std::find_if(rTopics.begin(), rTopics.end(),
         [&hTopic](const DdeTopic* pTopic) { return *pTopic->pName == hTopic; 
});
commit 96507c765d4306c6cf6f627a5de97c9e1bdc2b3f
Author:     Andrea Gelmini <andrea.gelm...@gelma.net>
AuthorDate: Mon Dec 14 11:21:30 2020 +0100
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Mon Dec 14 21:18:15 2020 +0100

    Fix typo in code
    
    Change-Id: Ia1263267e8bfd4ca92a3da199fbc29a386f69c31
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107681
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>

diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx 
b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index fc6a12a5979b..5e84a27e13fb 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
@@ -277,7 +277,7 @@ ODatabaseMetaDataResultSet::ORows 
OEvoabDatabaseMetaData::getColumnRows( const O
     aRow[11] = new ORowSetValueDecorator(s_nNULLABLE);
     // REMARKS
     aRow[12] = ODatabaseMetaDataResultSet::getEmptyValue();
-    // COULUMN_DEF, not used
+    // COLUMN_DEF, not used
     aRow[13] = ODatabaseMetaDataResultSet::getEmptyValue();
     // SQL_DATA_TYPE, not used
     aRow[14] = ODatabaseMetaDataResultSet::getEmptyValue();
diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx
index 04a9213dc2a9..d356cefb64b5 100644
--- a/include/svx/unoshprp.hxx
+++ b/include/svx/unoshprp.hxx
@@ -140,7 +140,7 @@
 #define OWN_ATTR_TABLETEMPLATE_FIRSTCOLUMN      (OWN_ATTR_VALUE_START+51)
 #define OWN_ATTR_TABLETEMPLATE_LASTCOLUMN       (OWN_ATTR_VALUE_START+52)
 #define OWN_ATTR_TABLETEMPLATE_BANDINGROWS      (OWN_ATTR_VALUE_START+53)
-#define OWN_ATTR_TABLETEMPLATE_BANDINGCOULUMNS  (OWN_ATTR_VALUE_START+54)
+#define OWN_ATTR_TABLETEMPLATE_BANDINGCOLUMNS   (OWN_ATTR_VALUE_START+54)
 #define OWN_ATTR_TABLEBORDER                    (OWN_ATTR_VALUE_START+55)
 
 #define OWN_ATTR_OLE_VISAREA                    (OWN_ATTR_VALUE_START+63)
diff --git a/svx/source/unodraw/tableshape.cxx 
b/svx/source/unodraw/tableshape.cxx
index ce25d445f781..8a2fc64aac4e 100644
--- a/svx/source/unodraw/tableshape.cxx
+++ b/svx/source/unodraw/tableshape.cxx
@@ -69,7 +69,7 @@ bool SvxTableShape::setPropertyValueImpl(
     case OWN_ATTR_TABLETEMPLATE_FIRSTCOLUMN:
     case OWN_ATTR_TABLETEMPLATE_LASTCOLUMN:
     case OWN_ATTR_TABLETEMPLATE_BANDINGROWS:
-    case OWN_ATTR_TABLETEMPLATE_BANDINGCOULUMNS:
+    case OWN_ATTR_TABLETEMPLATE_BANDINGCOLUMNS:
     {
         if( HasSdrObject() )
         {
@@ -82,7 +82,7 @@ bool SvxTableShape::setPropertyValueImpl(
             case OWN_ATTR_TABLETEMPLATE_FIRSTCOLUMN:        rValue >>= 
aSettings.mbUseFirstColumn; break;
             case OWN_ATTR_TABLETEMPLATE_LASTCOLUMN:         rValue >>= 
aSettings.mbUseLastColumn; break;
             case OWN_ATTR_TABLETEMPLATE_BANDINGROWS:        rValue >>= 
aSettings.mbUseRowBanding; break;
-            case OWN_ATTR_TABLETEMPLATE_BANDINGCOULUMNS:    rValue >>= 
aSettings.mbUseColumnBanding; break;
+            case OWN_ATTR_TABLETEMPLATE_BANDINGCOLUMNS:    rValue >>= 
aSettings.mbUseColumnBanding; break;
             }
 
             static_cast< sdr::table::SdrTableObj* >( GetSdrObject() 
)->setTableStyleSettings(aSettings);
@@ -134,7 +134,7 @@ bool SvxTableShape::getPropertyValueImpl(
     case OWN_ATTR_TABLETEMPLATE_FIRSTCOLUMN:
     case OWN_ATTR_TABLETEMPLATE_LASTCOLUMN:
     case OWN_ATTR_TABLETEMPLATE_BANDINGROWS:
-    case OWN_ATTR_TABLETEMPLATE_BANDINGCOULUMNS:
+    case OWN_ATTR_TABLETEMPLATE_BANDINGCOLUMNS:
     {
         if( HasSdrObject() )
         {
@@ -147,7 +147,7 @@ bool SvxTableShape::getPropertyValueImpl(
             case OWN_ATTR_TABLETEMPLATE_FIRSTCOLUMN:        rValue <<= 
aSettings.mbUseFirstColumn; break;
             case OWN_ATTR_TABLETEMPLATE_LASTCOLUMN:         rValue <<= 
aSettings.mbUseLastColumn; break;
             case OWN_ATTR_TABLETEMPLATE_BANDINGROWS:        rValue <<= 
aSettings.mbUseRowBanding; break;
-            case OWN_ATTR_TABLETEMPLATE_BANDINGCOULUMNS:    rValue <<= 
aSettings.mbUseColumnBanding; break;
+            case OWN_ATTR_TABLETEMPLATE_BANDINGCOLUMNS:    rValue <<= 
aSettings.mbUseColumnBanding; break;
             }
         }
 
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index f51cfa2cee73..0531cff10bb9 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -760,7 +760,7 @@ static SfxItemPropertyMapEntry const * 
ImplGetSvxTableShapePropertyMap()
         { u"UseFirstColumnStyle",          OWN_ATTR_TABLETEMPLATE_FIRSTCOLUMN, 
cppu::UnoType<bool>::get(),0, 0},
         { u"UseLastColumnStyle",           OWN_ATTR_TABLETEMPLATE_LASTCOLUMN, 
cppu::UnoType<bool>::get(),0, 0},
         { u"UseBandingRowStyle",           OWN_ATTR_TABLETEMPLATE_BANDINGROWS, 
cppu::UnoType<bool>::get(),0, 0},
-        { u"UseBandingColumnStyle",        
OWN_ATTR_TABLETEMPLATE_BANDINGCOULUMNS, cppu::UnoType<bool>::get(),0, 0},
+        { u"UseBandingColumnStyle",        
OWN_ATTR_TABLETEMPLATE_BANDINGCOLUMNS, cppu::UnoType<bool>::get(),0, 0},
         { u"ReplacementGraphic",           OWN_ATTR_REPLACEMENT_GRAPHIC, 
cppu::UnoType<css::graphic::XGraphic>::get(), 
css::beans::PropertyAttribute::READONLY, 0},
         { u"", 0, css::uno::Type(), 0, 0 }
     };
commit 0651fa8352116a58463c036c196b6caede5c9616
Author:     Noel <noelgran...@gmail.com>
AuthorDate: Mon Dec 14 14:42:19 2020 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Dec 14 21:14:54 2020 +0100

    remove Seek(nCurr) in SvStream::remainingSize()
    
    which slows down some operations,
    and is unnecessary, since TellEnd()
    already resets the file pointer.
    
    Change-Id: I71a0d7f45074039b890997a730afa1cd1c160886
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107689
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 8448f5144af9..a7021d2b22aa 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -1442,7 +1442,6 @@ sal_uInt64 SvStream::remainingSize()
     sal_uInt64 const nCurr = Tell();
     sal_uInt64 const nEnd = TellEnd();
     sal_uInt64 nMaxAvailable = nEnd > nCurr ? (nEnd-nCurr) : 0;
-    Seek(nCurr);
     return nMaxAvailable;
 }
 
commit 05ab01898df94390073de819f489ac261d24eaea
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon Dec 14 19:57:54 2020 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Mon Dec 14 21:10:24 2020 +0100

    Add -wd4505 also back to gb_CXXFLAGS
    
    ...which was accidentally missing from 
aca847cf1283e242c2d1106309ad4bb73d8f37a6
    "-wd4505 is still needed"
    
    Change-Id: If0d3523f05d47da5dfe6dae45dedcdf075033daf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107723
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/solenv/gbuild/platform/com_MSC_defs.mk 
b/solenv/gbuild/platform/com_MSC_defs.mk
index 2c92585235c9..cdcbc1fb0c48 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -142,6 +142,7 @@ gb_CXXFLAGS := \
        -wd4251 \
        -wd4267 \
        -wd4275 \
+       -wd4505 \
        -wd4611 \
        -wd4706 \
 
commit c971773afe0852ccdee0267cfad953359c0039be
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Dec 14 11:21:56 2020 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Dec 14 20:15:24 2020 +0100

    tdf#122045 using 'Apply' doesn't keep document modified on later 'Cancel'
    
    Change-Id: I7c6232747785a0c5827fe7344e1dc20758419956
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107683
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index f61a05d4dc10..dd5609af368c 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -554,6 +554,12 @@ public:
         ApplyHdl(nullptr);
     }
     VclPtr<SfxAbstractApplyTabDialog> m_pDlg;
+    // true if the document was initially modified before ApplyStyle was 
created
+    // or if ApplyStyle:::apply was called
+    bool DocIsModified() const
+    {
+        return m_bModified;
+    }
 private:
     SwDocShell &m_rDocSh;
     bool m_bNew;
@@ -632,6 +638,7 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl, LinkParamNone*, void)
     if( !m_bModified )
     {
         pDoc->GetIDocumentUndoRedo().SetUndoNoResetModified();
+        m_bModified = true;
     }
 
     pWrtShell->EndAllAction();
@@ -906,7 +913,7 @@ void SwDocShell::Edit(
                                     && pStyle->IsUsed()
                                     && !pStyle->IsUserDefined();
 
-        pDlg->StartExecuteAsync([bIsDefaultPage, bModified, bNew, nFamily, 
nSlot, nNewStyleUndoId, pApplyStyleHelper, pRequest, xTmp, this](sal_Int32 
nResult){
+        pDlg->StartExecuteAsync([bIsDefaultPage, bNew, nFamily, nSlot, 
nNewStyleUndoId, pApplyStyleHelper, pRequest, xTmp, this](sal_Int32 nResult){
             if (RET_OK == nResult)
                 pApplyStyleHelper->apply();
 
@@ -963,6 +970,8 @@ void SwDocShell::Edit(
                 m_pWrtShell->EndUndo(nNewStyleUndoId, &aRewriter);
             }
 
+            bool bDocModified = pApplyStyleHelper->DocIsModified();
+
             if (RET_OK != nResult)
             {
                 if (bNew)
@@ -971,7 +980,7 @@ void SwDocShell::Edit(
                     m_xDoc->GetIDocumentUndoRedo().ClearRedo();
                 }
 
-                if (!bModified)
+                if (!bDocModified)
                     m_xDoc->getIDocumentState().ResetModified();
             }
 
@@ -987,7 +996,7 @@ void SwDocShell::Edit(
             if (pRequest)
                 pRequest->Done();
 
-            if (bIsDefaultPage && bModified)
+            if (bIsDefaultPage && bDocModified)
             {
                 uno::Reference< style::XStyleFamiliesSupplier > 
xStyleFamSupp(GetModel(), uno::UNO_QUERY);
 
commit 6a279e2d98d3aa2d11cc7b8c09158186795e7fcd
Author:     DuP-491 <leolovelu...@gmail.com>
AuthorDate: Sun Dec 13 20:58:01 2020 +0530
Commit:     Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
CommitDate: Mon Dec 14 18:25:41 2020 +0100

    tdf#124176 Use #pragma once in connectivity
    
    Change-Id: Ib817bcd477db276a9554b1b3bdc87cf91c2a6658
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107668
    Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
    Tested-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>

diff --git a/connectivity/source/cpool/ZConnectionPool.hxx 
b/connectivity/source/cpool/ZConnectionPool.hxx
index b05c7d1ff275..e83d22849c0e 100644
--- a/connectivity/source/cpool/ZConnectionPool.hxx
+++ b/connectivity/source/cpool/ZConnectionPool.hxx
@@ -16,9 +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 .
  */
-#ifndef INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZCONNECTIONPOOL_HXX
-#define INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZCONNECTIONPOOL_HXX
-
+#pragma once
 #include <sal/config.h>
 
 #include <map>
@@ -144,7 +142,5 @@ namespace connectivity
         void invalidatePooledConnections();
     };
 }
-#endif // INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZCONNECTIONPOOL_HXX
-
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/cpool/ZConnectionWrapper.hxx 
b/connectivity/source/cpool/ZConnectionWrapper.hxx
index b74fb244662c..e4b945fa9cfe 100644
--- a/connectivity/source/cpool/ZConnectionWrapper.hxx
+++ b/connectivity/source/cpool/ZConnectionWrapper.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZCONNECTIONWRAPPER_HXX
-#define INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZCONNECTIONWRAPPER_HXX
+#pragma once
 
 #include <cppuhelper/compbase.hxx>
 #include <cppuhelper/basemutex.hxx>
@@ -74,6 +73,5 @@ namespace connectivity
         virtual void SAL_CALL close(  ) override;
     };
 }
-#endif // INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZCONNECTIONWRAPPER_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/cpool/ZDriverWrapper.hxx 
b/connectivity/source/cpool/ZDriverWrapper.hxx
index 854542c31c76..b08cfc3ad9b4 100644
--- a/connectivity/source/cpool/ZDriverWrapper.hxx
+++ b/connectivity/source/cpool/ZDriverWrapper.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZDRIVERWRAPPER_HXX
-#define INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZDRIVERWRAPPER_HXX
+#pragma once
 
 #include <com/sun/star/sdbc/XDriver.hpp>
 #include <cppuhelper/implbase.hxx>
@@ -71,8 +70,4 @@ namespace connectivity
 
 }   // namespace connectivity
 
-
-#endif // INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZDRIVERWRAPPER_HXX
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/cpool/ZPoolCollection.hxx 
b/connectivity/source/cpool/ZPoolCollection.hxx
index dc54e2f6b171..3da18ab86ab2 100644
--- a/connectivity/source/cpool/ZPoolCollection.hxx
+++ b/connectivity/source/cpool/ZPoolCollection.hxx
@@ -16,8 +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 .
  */
-#ifndef INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZPOOLCOLLECTION_HXX
-#define INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZPOOLCOLLECTION_HXX
+#pragma once
 
 #include <sal/config.h>
 
@@ -130,6 +129,5 @@ namespace connectivity
         virtual void SAL_CALL notifyTermination( const css::lang::EventObject& 
Event ) override;
     };
 }
-#endif // INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZPOOLCOLLECTION_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/cpool/ZPooledConnection.hxx 
b/connectivity/source/cpool/ZPooledConnection.hxx
index 5f529f0c3c33..79450ea081d3 100644
--- a/connectivity/source/cpool/ZPooledConnection.hxx
+++ b/connectivity/source/cpool/ZPooledConnection.hxx
@@ -16,9 +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 .
  */
-#ifndef INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZPOOLEDCONNECTION_HXX
-#define INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZPOOLEDCONNECTION_HXX
-
+#pragma once
 #include <cppuhelper/compbase.hxx>
 #include <cppuhelper/basemutex.hxx>
 #include <com/sun/star/sdbc/XPooledConnection.hpp>
@@ -56,6 +54,5 @@ namespace connectivity
     };
 
 }
-#endif // INCLUDED_CONNECTIVITY_SOURCE_CPOOL_ZPOOLEDCONNECTION_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 1b69f0c2731ec66e76073ab0f2936b7112bf1e77
Author:     Noel <noelgran...@gmail.com>
AuthorDate: Mon Dec 14 15:05:37 2020 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Dec 14 17:46:15 2020 +0100

    use more direct parsing on FastAttributeList
    
    instead of first allocating an OUString
    
    Change-Id: I796b1b2d47eb3cb9bebb00ae1bbd465010ebf494
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107691
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/reportdesign/source/filter/xml/xmlCell.cxx 
b/reportdesign/source/filter/xml/xmlCell.cxx
index 27155525ba69..adfac9d59cc6 100644
--- a/reportdesign/source/filter/xml/xmlCell.cxx
+++ b/reportdesign/source/filter/xml/xmlCell.cxx
@@ -62,18 +62,16 @@ OXMLCell::OXMLCell( ORptFilter& rImport
 
     for (auto &aIter : sax_fastparser::castToFastAttributeList( _xAttrList ))
     {
-        OUString sValue = aIter.toString();
-
         switch( aIter.getToken() )
         {
             case XML_ELEMENT(TABLE, XML_STYLE_NAME):
-                m_sStyleName = sValue;
+                m_sStyleName = aIter.toString();
                 break;
             case XML_ELEMENT(TABLE, XML_NUMBER_COLUMNS_SPANNED):
-                m_pContainer->setColumnSpanned(sValue.toInt32());
+                m_pContainer->setColumnSpanned(aIter.toInt32());
                 break;
             case XML_ELEMENT(TABLE, XML_NUMBER_ROWS_SPANNED):
-                m_pContainer->setRowSpanned(sValue.toInt32());
+                m_pContainer->setRowSpanned(aIter.toInt32());
                 break;
             default:
                 XMLOFF_WARN_UNKNOWN("reportdesign", aIter);
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx 
b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index 2accb0987344..d8292c5feecd 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -666,9 +666,8 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL 
ScXMLChangeTextPContext
         sal_Int32 nRepeat(0);
         for( auto& aIter : sax_fastparser::castToFastAttributeList(mxAttrList) 
)
         {
-            const OUString sValue = aIter.toString();
             if (aIter.getToken() == XML_ELEMENT(TEXT, XML_C))
-                nRepeat = sValue.toInt32();
+                nRepeat = aIter.toInt32();
             else
                 XMLOFF_WARN_UNKNOWN("sc", aIter);
         }
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 77f7ee7f9128..be694b483d00 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -356,15 +356,14 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
     m_sSaveParaDefault = 
GetImport().GetTextImport()->GetCellParaStyleDefault();
     for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
     {
-        const OUString sValue = aIter.toString();
         switch( aIter.getToken() )
         {
         case XML_ELEMENT(TABLE, XML_STYLE_NAME):
-            m_aStyleName = sValue;
-            GetImport().GetTextImport()->SetCellParaStyleDefault(sValue);
+            m_aStyleName = aIter.toString();
+            GetImport().GetTextImport()->SetCellParaStyleDefault(m_aStyleName);
             break;
         case XML_ELEMENT(TABLE, XML_NUMBER_COLUMNS_SPANNED):
-            m_nColSpan = static_cast<sal_uInt32>(std::max<sal_Int32>(1, 
sValue.toInt32()));
+            m_nColSpan = static_cast<sal_uInt32>(std::max<sal_Int32>(1, 
aIter.toInt32()));
             if (m_nColSpan > 256)
             {
                 SAL_INFO("sw.xml", "ignoring huge table:number-columns-spanned 
" << m_nColSpan);
@@ -372,7 +371,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
             }
             break;
         case XML_ELEMENT(TABLE, XML_NUMBER_ROWS_SPANNED):
-            m_nRowSpan = static_cast<sal_uInt32>(std::max<sal_Int32>(1, 
sValue.toInt32()));
+            m_nRowSpan = static_cast<sal_uInt32>(std::max<sal_Int32>(1, 
aIter.toInt32()));
             if (m_nRowSpan > 8192 || (m_nRowSpan > 256 && 
utl::ConfigManager::IsFuzzing()))
             {
                 SAL_INFO("sw.xml", "ignoring huge table:number-rows-spanned " 
<< m_nRowSpan);
@@ -380,7 +379,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
             }
             break;
         case XML_ELEMENT(TABLE, XML_NUMBER_COLUMNS_REPEATED):
-            m_nColRepeat = static_cast<sal_uInt32>(std::max<sal_Int32>(1, 
sValue.toInt32()));
+            m_nColRepeat = static_cast<sal_uInt32>(std::max<sal_Int32>(1, 
aIter.toInt32()));
             if (m_nColRepeat > 256)
             {
                 SAL_INFO("sw.xml", "ignoring huge 
table:number-columns-repeated " << m_nColRepeat);
@@ -391,14 +390,14 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
             {
                 OUString sTmp;
                 const sal_uInt16 nPrefix2 = GetImport().GetNamespaceMap().
-                        GetKeyByAttrValueQName(sValue, &sTmp);
-                m_sFormula = XML_NAMESPACE_OOOW == nPrefix2 ? sTmp : sValue;
+                        GetKeyByAttrValueQName(aIter.toString(), &sTmp);
+                m_sFormula = XML_NAMESPACE_OOOW == nPrefix2 ? sTmp : 
aIter.toString();
             }
             break;
         case XML_ELEMENT(OFFICE, XML_VALUE):
             {
                 double fTmp;
-                if (::sax::Converter::convertDouble(fTmp, sValue))
+                if (::sax::Converter::convertDouble(fTmp, aIter.toString()))
                 {
                     m_fValue = fTmp;
                     m_bHasValue = true;
@@ -408,7 +407,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
         case XML_ELEMENT(OFFICE, XML_TIME_VALUE):
             {
                 double fTmp;
-                if (::sax::Converter::convertDuration(fTmp, sValue))
+                if (::sax::Converter::convertDuration(fTmp, aIter.toString()))
                 {
                     m_fValue = fTmp;
                     m_bHasValue = true;
@@ -419,7 +418,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
             {
                 double fTmp;
                 if (GetImport().GetMM100UnitConverter().convertDateTime(fTmp,
-                                                                      sValue))
+                                                                      
aIter.toString()))
                 {
                     m_fValue = fTmp;
                     m_bHasValue = true;
@@ -429,7 +428,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
         case XML_ELEMENT(OFFICE, XML_BOOLEAN_VALUE):
             {
                 bool bTmp(false);
-                if (::sax::Converter::convertBool(bTmp, sValue))
+                if (::sax::Converter::convertBool(bTmp, aIter.toString()))
                 {
                     m_fValue = (bTmp ? 1.0 : 0.0);
                     m_bHasValue = true;
@@ -440,7 +439,7 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
         case XML_ELEMENT(TABLE, XML_PROTECTED):
             {
                 bool bTmp(false);
-                if (::sax::Converter::convertBool(bTmp, sValue))
+                if (::sax::Converter::convertBool(bTmp, aIter.toString()))
                 {
                     m_bProtect = bTmp;
                 }
@@ -448,13 +447,13 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
             break;
         case XML_ELEMENT(OFFICE, XML_STRING_VALUE):
             {
-                m_StringValue = sValue;
+                m_StringValue = aIter.toString();
                 m_bHasStringValue = true;
             }
             break;
         case XML_ELEMENT(OFFICE, XML_VALUE_TYPE):
             {
-                if ("string" == sValue)
+                if ("string" == aIter.toString())
                 {
                     m_bValueTypeIsString = true;
                 }
@@ -635,15 +634,14 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl(
 
     for( auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ) )
     {
-        OUString sValue = aIter.toString();
         switch (aIter.getToken())
         {
             case XML_ELEMENT(TABLE, XML_STYLE_NAME):
-                aStyleName = sValue;
+                aStyleName = aIter.toString();
                 break;
             case XML_ELEMENT(TABLE, XML_NUMBER_COLUMNS_REPEATED):
             {
-                nColRep = static_cast<sal_uInt32>(std::max<sal_Int32>(1, 
sValue.toInt32()));
+                nColRep = static_cast<sal_uInt32>(std::max<sal_Int32>(1, 
aIter.toInt32()));
                 if (nColRep > 256)
                 {
                     SAL_INFO("sw.xml", "ignoring huge 
table:number-columns-repeated " << nColRep);
@@ -652,7 +650,7 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl(
                 break;
             }
             case XML_ELEMENT(TABLE, XML_DEFAULT_CELL_STYLE_NAME):
-                aDfltCellStyleName = sValue;
+                aDfltCellStyleName = aIter.toString();
                 break;
             case XML_ELEMENT(XML, XML_ID):
             {
@@ -775,15 +773,14 @@ SwXMLTableRowContext_Impl::SwXMLTableRowContext_Impl( 
SwXMLImport& rImport,
 
     for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
     {
-        const OUString sValue = aIter.toString();
         switch(aIter.getToken())
         {
             case XML_ELEMENT(TABLE, XML_STYLE_NAME):
-                aStyleName = sValue;
+                aStyleName = aIter.toString();
                 break;
             case XML_ELEMENT(STYLE,  XML_NUMBER_ROWS_REPEATED):
             {
-                nRowRepeat = static_cast<sal_uInt32>(std::max<sal_Int32>(1, 
sValue.toInt32()));
+                nRowRepeat = static_cast<sal_uInt32>(std::max<sal_Int32>(1, 
aIter.toInt32()));
                 if (nRowRepeat > 8192 || (nRowRepeat > 256 && 
utl::ConfigManager::IsFuzzing()))
                 {
                     SAL_INFO("sw.xml", "ignoring huge 
table:number-rows-repeated " << nRowRepeat);
@@ -792,13 +789,13 @@ SwXMLTableRowContext_Impl::SwXMLTableRowContext_Impl( 
SwXMLImport& rImport,
                 break;
             }
             case XML_ELEMENT(STYLE, XML_DEFAULT_CELL_STYLE_NAME):
-                aDfltCellStyleName = sValue;
+                aDfltCellStyleName = aIter.toString();
                 break;
             case XML_ELEMENT(XML, XML_ID):
-                sXmlId = sValue;
+                sXmlId = aIter.toString();
                 break;
             default:
-                SAL_WARN("sw", "unknown attribute " << 
SvXMLImport::getPrefixAndNameFromToken(aIter.getToken()) << "=" << sValue);
+                XMLOFF_WARN_UNKNOWN("sw", aIter);
         }
     }
     if( GetTable()->IsValid() )
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx 
b/xmloff/source/chart/SchXMLTableContext.cxx
index e00245a2e2c3..8b128461bf35 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -427,9 +427,8 @@ void SchXMLTableColumnContext::startFastElement (sal_Int32 
/*nElement*/,
         {
             case XML_ELEMENT(TABLE, XML_NUMBER_COLUMNS_REPEATED):
             {
-                OUString aValue = aIter.toString();
-                if( !aValue.isEmpty())
-                    nRepeated = aValue.toInt32();
+                if( !aIter.isEmpty())
+                    nRepeated = aIter.toInt32();
                 break;
             }
             case XML_ELEMENT(TABLE, XML_VISIBILITY):
diff --git a/xmloff/source/table/XMLTableImport.cxx 
b/xmloff/source/table/XMLTableImport.cxx
index 6d8b30f474ce..d6c2d549c3b5 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -619,21 +619,19 @@ XMLCellImportContext::XMLCellImportContext( SvXMLImport& 
rImport,
     // read attributes for the table-cell
     for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
     {
-        const OUString sValue = aIter.toString();
-
         switch (aIter.getToken())
         {
             case XML_ELEMENT(TABLE, XML_NUMBER_COLUMNS_REPEATED):
-                mnRepeated = sValue.toInt32();
+                mnRepeated = aIter.toInt32();
                 break;
             case XML_ELEMENT(TABLE, XML_NUMBER_COLUMNS_SPANNED):
-                mnColSpan = sValue.toInt32();
+                mnColSpan = aIter.toInt32();
                 break;
             case XML_ELEMENT(TABLE, XML_NUMBER_ROWS_SPANNED):
-                mnRowSpan = sValue.toInt32();
+                mnRowSpan = aIter.toInt32();
                 break;
             case XML_ELEMENT(TABLE, XML_STYLE_NAME):
-                sStyleName = sValue;
+                sStyleName = aIter.toString();
                 break;
             case XML_ELEMENT(XML, XML_ID):
 //FIXME: TODO
commit eed2f0fd3fb70bcf26539683c4347e418da66ff1
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon Dec 14 15:22:52 2020 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Mon Dec 14 17:29:20 2020 +0100

    macOS __arm64__ math.h does not define legacy finite
    
    
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/
    SDKs/MacOSX.sdk/usr/include/math.h only declares it in an
    
    > #if defined __i386__ || defined __x86_64__
    [...]
    > /* Legacy BSD API; use the C99 `isfinite( )` macro instead.               
    */
    > extern int finite(double)
    > __API_DEPRECATED("Use `isfinite((double)x)` instead.", macos(10.0, 10.9)) 
__API_UNAVAILABLE(ios, watchos, tvos);
    
    block, so CppunitTest_odk_checkapi (which deliberately builds in pre-C++11 
mode)
    failed with
    
    > In file included from ~/lo/core/odk/qa/checkapi/checkapi.cxx:29:
    > In file included from 
~/lo/core/workdir/CustomTarget/odk/allheaders/allheaders.hxx:351:
    > ~/lo/core/include/rtl/math.hxx:352:12: error: use of undeclared 
identifier 'finite'; did you mean 'isfinite'?
    >     return SAL_MATH_FINITE(d);
    >            ^
    
    So extend 19bce817279c7fd150af0422c224975e57ff9f41 "Try to use isfinite() 
for
    iOS" to all Apple non-Intel platforms.  (We no longer support macOS __i386__
    builds, but it probably does not hurt to nevertheless mention it here in the
    URE interface sal/mathconf.h include file.)
    
    Change-Id: I9b3a2ec1e48762dd178704185c64d1d3fe358001
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107714
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/include/sal/mathconf.h b/include/sal/mathconf.h
index 687f6e3da133..8e5831cde3b5 100644
--- a/include/sal/mathconf.h
+++ b/include/sal/mathconf.h
@@ -66,7 +66,7 @@ extern "C" {
                           || __cplusplus >= 201103L \
                           || defined(IOS) )
 #define SAL_MATH_FINITE(d) std::isfinite(d)
-#elif defined( IOS )
+#elif defined __APPLE__ && !(defined __i386__ || defined __x86_64__)
 #define SAL_MATH_FINITE(d) isfinite(d)
 #elif defined( WNT)
 #define SAL_MATH_FINITE(d) _finite(d)
commit aca847cf1283e242c2d1106309ad4bb73d8f37a6
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon Dec 14 16:12:24 2020 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Mon Dec 14 17:28:54 2020 +0100

    -wd4505 is still needed
    
    ...see e.g. <https://ci.libreoffice.org//job/lo_tb_master_win/29066>
    
    > 
C:/cygwin/home/tdf/lode/jenkins/workspace/lo_tb_master_win/unotools/source/config/bootstrap.cxx(269):
 error C2220: the following warning is treated as an error
    > 
C:/cygwin/home/tdf/lode/jenkins/workspace/lo_tb_master_win/unotools/source/config/bootstrap.cxx(269):
 warning C4505: 'utl::dbgCheckStatusOfURL': unreferenced local function has 
been removed
    
    where the OSL_ASSERT used in
    
    > OSL_ASSERT(aStatus != Bootstrap::PATH_VALID || 
dbgCheckStatusOfURL(sDerivedURL) == Bootstrap::PATH_VALID);
    
    is defined in terms of SAL_DETAIL_WARN_IF_FORMAT, which in turn is careful 
to
    make its contents visible to the compiler even under --disable-sal-log.  
That
    MSVC warning, about a function whose only reference is in code that the 
compiler
    can statically determine to be unreachable, is really unhelpful.
    
    This partially reverts 5c082fc1b59022252d90423afde174123976cdee "remove some
    MSVC -wd".
    
    Change-Id: Ie337989ee0ca6b7d7f29a50026fa249b0b266474
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107716
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/solenv/gbuild/platform/com_MSC_defs.mk 
b/solenv/gbuild/platform/com_MSC_defs.mk
index aee3fbb38c8b..2c92585235c9 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -93,6 +93,8 @@ gb_AFLAGS := $(AFLAGS)
 # C4275: non-DLL-interface classkey 'identifier' used as base for
 #   DLL-interface classkey 'identifier'
 
+# C4505: 'function' : unreferenced local function has been removed
+
 # C4611: interaction between 'function' and C++ object destruction is
 #   non-portable
 
@@ -110,6 +112,7 @@ gb_CFLAGS := \
        -nologo \
        -W4 \
        -wd4244 \
+       -wd4505 \
 
 gb_CXXFLAGS_DISABLE_WARNINGS = -w
 
commit c98f43fc0e17c576a64840bb61770094f8be12ce
Author:     Tor Lillqvist <t...@iki.fi>
AuthorDate: Mon Dec 14 16:51:17 2020 +0200
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Mon Dec 14 17:10:58 2020 +0100

    Bin a few unused forward declarations
    
    Change-Id: I1f0b8938f2174f9b8eee01714ea176fa4df38504
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107715
    Tested-by: Jenkins
    Reviewed-by: Tor Lillqvist <t...@collabora.com>

diff --git a/vcl/inc/textrender.hxx b/vcl/inc/textrender.hxx
index 40c253f1b889..eb0280535e33 100644

... etc. - the rest is truncated
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to