[Libreoffice-commits] core.git: config_host.mk.in configure.ac external/libabw external/libcdr external/libebook external/libepubgen external/libetonyek external/libfreehand external/libmspub external/libmwaw external/libodfgen external/libpagemaker external/libqxp external/librevenge external/libstaroffice external/libvisio external/libwps external/libzmf include/oox include/svx include/toolkit include/xmloff sc/inc sc/source sd/inc sd/source solenv/gbuild sw/inc sw/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Fri May 3 11:47:38 UTC 2019


 config_host.mk.in                                        |    1 
 configure.ac                                             |   35 ++++++++++-----
 external/libabw/UnpackedTarball_libabw.mk                |    4 -
 external/libcdr/UnpackedTarball_libcdr.mk                |    4 -
 external/libebook/UnpackedTarball_libebook.mk            |    4 -
 external/libepubgen/UnpackedTarball_libepubgen.mk        |    4 -
 external/libetonyek/UnpackedTarball_libetonyek.mk        |    4 -
 external/libfreehand/UnpackedTarball_libfreehand.mk      |    4 -
 external/libmspub/UnpackedTarball_libmspub.mk            |    4 -
 external/libmwaw/UnpackedTarball_libmwaw.mk              |    4 -
 external/libodfgen/UnpackedTarball_libodfgen.mk          |    4 -
 external/libpagemaker/UnpackedTarball_libpagemaker.mk    |    4 -
 external/libqxp/UnpackedTarball_libqxp.mk                |    4 -
 external/librevenge/UnpackedTarball_librevenge.mk        |    4 -
 external/libstaroffice/UnpackedTarball_libstaroffice.mk  |    4 -
 external/libvisio/UnpackedTarball_libvisio.mk            |    4 -
 external/libwps/UnpackedTarball_libwps.mk                |    4 -
 external/libzmf/UnpackedTarball_libzmf.mk                |    4 -
 include/oox/vml/vmlshape.hxx                             |    2 
 include/svx/AccessibleControlShape.hxx                   |    2 
 include/svx/EnhancedCustomShapeFunctionParser.hxx        |    2 
 include/svx/gridctrl.hxx                                 |    2 
 include/toolkit/awt/vclxwindows.hxx                      |    8 +--
 include/xmloff/NamedBoolPropertyHdl.hxx                  |    2 
 include/xmloff/controlpropertyhdl.hxx                    |    6 +-
 sc/inc/chgtrack.hxx                                      |   10 ++--
 sc/inc/dapiuno.hxx                                       |    2 
 sc/inc/dbdata.hxx                                        |    2 
 sc/inc/queryparam.hxx                                    |    4 -
 sc/inc/scmod.hxx                                         |    2 
 sc/inc/stlsheet.hxx                                      |    2 
 sc/inc/userdat.hxx                                       |    2 
 sc/source/ui/inc/dbfunc.hxx                              |    2 
 sc/source/ui/inc/gridwin.hxx                             |    2 
 sc/source/ui/inc/preview.hxx                             |    2 
 sc/source/ui/inc/transobj.hxx                            |    2 
 sd/inc/CustomAnimationEffect.hxx                         |    2 
 sd/inc/sdmod.hxx                                         |    2 
 sd/inc/stlpool.hxx                                       |    2 
 sd/source/ui/inc/DrawViewShell.hxx                       |    2 
 sd/source/ui/inc/GraphicViewShell.hxx                    |    2 
 sd/source/ui/inc/LayerTabBar.hxx                         |    2 
 sd/source/ui/inc/SlideSorterViewShell.hxx                |    2 
 sd/source/ui/inc/ViewShell.hxx                           |    2 
 sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx |    2 
 solenv/gbuild/platform/com_GCC_defs.mk                   |    7 +--
 solenv/gbuild/platform/unxgcc.mk                         |    4 -
 sw/inc/AnnotationWin.hxx                                 |    2 
 sw/inc/PostItMgr.hxx                                     |    2 
 sw/inc/authfld.hxx                                       |    2 
 sw/inc/dcontact.hxx                                      |    2 
 sw/inc/docufld.hxx                                       |   22 ++++-----
 sw/inc/expfld.hxx                                        |    4 -
 sw/inc/flddat.hxx                                        |    2 
 sw/inc/flddropdown.hxx                                   |    2 
 sw/inc/fmtautofmt.hxx                                    |    2 
 sw/inc/fmtflcnt.hxx                                      |    2 
 sw/inc/fmtrfmrk.hxx                                      |    2 
 sw/inc/grfatr.hxx                                        |    2 
 sw/inc/modcfg.hxx                                        |   10 ++--
 sw/inc/node.hxx                                          |    2 
 sw/inc/reffld.hxx                                        |    2 
 sw/inc/swatrset.hxx                                      |    2 
 sw/inc/txtfld.hxx                                        |    2 
 sw/inc/txttxmrk.hxx                                      |    2 
 sw/inc/unocrsr.hxx                                       |    2 
 sw/source/core/inc/DocumentRedlineManager.hxx            |    2 
 sw/source/core/inc/UndoManager.hxx                       |    2 
 sw/source/core/inc/ftnboss.hxx                           |    2 
 sw/source/core/inc/pagefrm.hxx                           |    2 
 sw/source/core/inc/rootfrm.hxx                           |    2 
 sw/source/uibase/inc/chldwrap.hxx                        |    2 
 sw/source/uibase/inc/pview.hxx                           |    2 
 73 files changed, 123 insertions(+), 144 deletions(-)

New commits:
commit 9a7aa3326d087c79879e435179e359dd76aa5e0a
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Apr 16 16:11:39 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri May 3 13:46:25 2019 +0200

    The -fvisibility-ms-compat hack is no longer needed for UBSan on Linux...
    
    ...with latest Clang trunk towards Clang 9.  All the no-longer necessary hacks
    are made conditional on new NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY, which is
    still set for UBSan builds with older Clang on Linux (but which should
    eventually be purged).
    
    Various classes needed additional SAL_DLLPUBLIC_RTTI annotations, as building
    with UBSan instrumentation can generate references to RTTI symbols from
    additional places like outside a dynamic library that used to hide those symbols
    by default (but used to not hide them for old UBSan builds thanks to the
    -fvisibility-ms-compat hack).
    
    The odr-violation suppressions in solenv/sanitizers/asan-suppressions (which is
    not referenced from anywhere in the code base, but meant to be included in an
    ASan/UBSan build's ASAN_OPTIONS env var) are also no longer needed when
    NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY is false.
    
    Change-Id: I24ec3e388b0cbab50dbe2bf008d9569bff7bf25a
    Reviewed-on: https://gerrit.libreoffice.org/70829
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/config_host.mk.in b/config_host.mk.in
index eccc3ef1924f..66cca894d96c 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -410,6 +410,7 @@ export MWAW_LIBS=$(gb_SPACE)@MWAW_LIBS@
 export MYTHES_CFLAGS=$(gb_SPACE)@MYTHES_CFLAGS@
 export MYTHES_LIBS=$(gb_SPACE)@MYTHES_LIBS@
 export NASM=@NASM@
+export NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY=@NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY@
 export NEON_CFLAGS=$(gb_SPACE)@NEON_CFLAGS@
 export NEON_LIBS=$(gb_SPACE)@NEON_LIBS@
 export NEON_VERSION=@NEON_VERSION@
diff --git a/configure.ac b/configure.ac
index 9d010de28280..36e0c359dedf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3864,6 +3864,28 @@ else
 fi
 AC_SUBST(ENABLE_DEBUG)
 
+AC_MSG_CHECKING([whether special RTTI visibility flags are needed for Clang Linux UBSan])
+NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY=
+dnl Clang 9 is known fixed since
+dnl <https://github.com/llvm/llvm-project/commit/5745eccef54ddd3caca278d1d292a88b2281528b> "Adapt
+dnl -fsanitize=function to SANITIZER_NON_UNIQUE_TYPEINFO":
+if test "$COM_IS_CLANG" = TRUE && test "$CLANGVER" -lt 90000 && test "$_os" = Linux; then
+    for i in $CC; do
+        case $i in
+        -fsanitize=*)
+            NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY=TRUE
+            break
+            ;;
+        esac
+    done
+fi
+if test "$NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY" = TRUE; then
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST([NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY])
+
 dnl ===================================================================
 dnl Select the linker to use (gold/lld/ld.bfd).
 dnl This is done only after compiler checks (need to know if Clang is
@@ -3889,17 +3911,8 @@ printf ("hello world\n");
         AC_MSG_RESULT( yes )
         use_ld_ok=yes
         dnl For obscure reasons, unxgcc.mk uses the --dynamic-list-cpp-typeinfo linker option
-        dnl if sanitizers are used, and lld doesn't support this option.
-        use_ld_has_sanitizers=
-        for i in $CC; do
-            case $i in
-            -fsanitize=*)
-                use_ld_has_sanitizers=yes
-                break
-                ;;
-            esac
-        done
-        if test -n "$use_ld_has_sanitizers"; then
+        dnl if NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY, and lld doesn't support this option.
+        if test -n "$NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY"; then
             AC_MSG_CHECKING([for --dynamic-list-cpp-typeinfo linker support (-fuse-ld=$use_ld)])
             use_ld_ldflags_save_2="$LDFLAGS"
             LDFLAGS="$LDFLAGS -Wl,--dynamic-list-cpp-typeinfo"
diff --git a/external/libabw/UnpackedTarball_libabw.mk b/external/libabw/UnpackedTarball_libabw.mk
index 27195d3a0ab3..212abfbc4674 100644
--- a/external/libabw/UnpackedTarball_libabw.mk
+++ b/external/libabw/UnpackedTarball_libabw.mk
@@ -19,12 +19,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,libabw, \
     external/libabw/libabw-msvc.patch.1 \
 ))
 
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,libabw, \
     external/libabw/ubsan-visibility.patch \
 ))
 endif
-endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libcdr/UnpackedTarball_libcdr.mk b/external/libcdr/UnpackedTarball_libcdr.mk
index 23874f7d01b5..7433d2bb4e67 100644
--- a/external/libcdr/UnpackedTarball_libcdr.mk
+++ b/external/libcdr/UnpackedTarball_libcdr.mk
@@ -19,12 +19,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,libcdr, \
     external/libcdr/libcdr-visibility-win.patch \
 ))
 
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,libcdr, \
     external/libcdr/ubsan-visibility.patch \
 ))
 endif
-endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libebook/UnpackedTarball_libebook.mk b/external/libebook/UnpackedTarball_libebook.mk
index af2ddea28ae1..17b1a892dc3e 100644
--- a/external/libebook/UnpackedTarball_libebook.mk
+++ b/external/libebook/UnpackedTarball_libebook.mk
@@ -15,12 +15,10 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libebook,0))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libebook))
 
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,libebook, \
     external/libebook/ubsan-visibility.patch \
 ))
 endif
-endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libepubgen/UnpackedTarball_libepubgen.mk b/external/libepubgen/UnpackedTarball_libepubgen.mk
index 7553e825284f..051cc29021cc 100644
--- a/external/libepubgen/UnpackedTarball_libepubgen.mk
+++ b/external/libepubgen/UnpackedTarball_libepubgen.mk
@@ -10,11 +10,9 @@
 epubgen_patches :=
 epubgen_patches += tdf-120491.patch
 
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 epubgen_patches += ubsan-visibility.patch
 endif
-endif
 
 $(eval $(call gb_UnpackedTarball_UnpackedTarball,libepubgen))
 
diff --git a/external/libetonyek/UnpackedTarball_libetonyek.mk b/external/libetonyek/UnpackedTarball_libetonyek.mk
index 81685831fb60..01aac83c812a 100644
--- a/external/libetonyek/UnpackedTarball_libetonyek.mk
+++ b/external/libetonyek/UnpackedTarball_libetonyek.mk
@@ -32,12 +32,10 @@ endif
 endif
 endif
 
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,libetonyek, \
     external/libetonyek/ubsan-visibility.patch \
 ))
 endif
-endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libfreehand/UnpackedTarball_libfreehand.mk b/external/libfreehand/UnpackedTarball_libfreehand.mk
index 3d4a3d522687..0853d0420129 100644
--- a/external/libfreehand/UnpackedTarball_libfreehand.mk
+++ b/external/libfreehand/UnpackedTarball_libfreehand.mk
@@ -15,12 +15,10 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libfreehand,0))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libfreehand))
 
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,libfreehand, \
     external/libfreehand/ubsan-visibility.patch \
 ))
 endif
-endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libmspub/UnpackedTarball_libmspub.mk b/external/libmspub/UnpackedTarball_libmspub.mk
index 5e5bedb27d83..f337d402d47f 100644
--- a/external/libmspub/UnpackedTarball_libmspub.mk
+++ b/external/libmspub/UnpackedTarball_libmspub.mk
@@ -25,12 +25,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,libmspub, \
 ))
 endif
 
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,libmspub, \
     external/libmspub/ubsan-visibility.patch \
 ))
 endif
-endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libmwaw/UnpackedTarball_libmwaw.mk b/external/libmwaw/UnpackedTarball_libmwaw.mk
index cd1551a1fe97..62357c008071 100644
--- a/external/libmwaw/UnpackedTarball_libmwaw.mk
+++ b/external/libmwaw/UnpackedTarball_libmwaw.mk
@@ -15,13 +15,11 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libmwaw,0))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libmwaw))
 
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,libmwaw, \
     external/libmwaw/ubsan-visibility.patch \
 ))
 endif
-endif
 
 ifneq ($(OS),MACOSX)
 ifneq ($(OS),WNT)
diff --git a/external/libodfgen/UnpackedTarball_libodfgen.mk b/external/libodfgen/UnpackedTarball_libodfgen.mk
index 10eb24fd77a7..80ccbf73bfd5 100644
--- a/external/libodfgen/UnpackedTarball_libodfgen.mk
+++ b/external/libodfgen/UnpackedTarball_libodfgen.mk
@@ -15,13 +15,11 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libodfgen,0))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libodfgen))
 
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,libodfgen, \
     external/libodfgen/ubsan-visibility.patch \
 ))
 endif
-endif
 
 ifeq ($(SYSTEM_REVENGE),)
 $(eval $(call gb_UnpackedTarball_add_patches,libodfgen, \
diff --git a/external/libpagemaker/UnpackedTarball_libpagemaker.mk b/external/libpagemaker/UnpackedTarball_libpagemaker.mk
index 2de27d5abbfd..a090d334c3fe 100644
--- a/external/libpagemaker/UnpackedTarball_libpagemaker.mk
+++ b/external/libpagemaker/UnpackedTarball_libpagemaker.mk
@@ -15,12 +15,10 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libpagemaker,0))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libpagemaker))
 
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,libpagemaker, \
     external/libpagemaker/ubsan-visibility.patch \
 ))
 endif
-endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libqxp/UnpackedTarball_libqxp.mk b/external/libqxp/UnpackedTarball_libqxp.mk
index 8519e983d957..c0d89263a4d2 100644
--- a/external/libqxp/UnpackedTarball_libqxp.mk
+++ b/external/libqxp/UnpackedTarball_libqxp.mk
@@ -15,13 +15,11 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libqxp,0))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libqxp))
 
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,libqxp, \
     external/libqxp/ubsan-visibility.patch \
 ))
 endif
-endif
 
 $(eval $(call gb_UnpackedTarball_add_patches,libqxp, \
 	external/libqxp/android-workaround.patch.1 \
diff --git a/external/librevenge/UnpackedTarball_librevenge.mk b/external/librevenge/UnpackedTarball_librevenge.mk
index 678da6454586..7e4c48f59619 100644
--- a/external/librevenge/UnpackedTarball_librevenge.mk
+++ b/external/librevenge/UnpackedTarball_librevenge.mk
@@ -19,13 +19,11 @@ $(eval $(call gb_UnpackedTarball_add_patches,librevenge, \
     external/librevenge/rpath.patch \
 ))
 
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,librevenge, \
     external/librevenge/ubsan-visibility.patch \
 ))
 endif
-endif
 
 ifneq ($(OS),MACOSX)
 ifneq ($(OS),WNT)
diff --git a/external/libstaroffice/UnpackedTarball_libstaroffice.mk b/external/libstaroffice/UnpackedTarball_libstaroffice.mk
index fdf668d196dc..98b8e14cdaec 100644
--- a/external/libstaroffice/UnpackedTarball_libstaroffice.mk
+++ b/external/libstaroffice/UnpackedTarball_libstaroffice.mk
@@ -15,13 +15,11 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libstaroffice,0))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libstaroffice))
 
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,libstaroffice, \
     external/libstaroffice/ubsan-visibility.patch \
 ))
 endif
-endif
 
 ifneq ($(OS),MACOSX)
 ifneq ($(OS),WNT)
diff --git a/external/libvisio/UnpackedTarball_libvisio.mk b/external/libvisio/UnpackedTarball_libvisio.mk
index 1ab8b392c4e8..0ff189261f42 100644
--- a/external/libvisio/UnpackedTarball_libvisio.mk
+++ b/external/libvisio/UnpackedTarball_libvisio.mk
@@ -20,12 +20,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,libvisio, \
     external/libvisio/0001-fix-debug-build.patch.1 \
 ))
 
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,libvisio, \
     external/libvisio/ubsan-visibility.patch \
 ))
 endif
-endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libwps/UnpackedTarball_libwps.mk b/external/libwps/UnpackedTarball_libwps.mk
index d712f25406bd..b148db2f93d2 100644
--- a/external/libwps/UnpackedTarball_libwps.mk
+++ b/external/libwps/UnpackedTarball_libwps.mk
@@ -27,12 +27,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,libwps,\
 endif
 endif
 
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,libwps, \
     external/libwps/ubsan-visibility.patch.0 \
 ))
 endif
-endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libzmf/UnpackedTarball_libzmf.mk b/external/libzmf/UnpackedTarball_libzmf.mk
index 3aafc660e9d5..5d5e7066572d 100644
--- a/external/libzmf/UnpackedTarball_libzmf.mk
+++ b/external/libzmf/UnpackedTarball_libzmf.mk
@@ -15,13 +15,11 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libzmf,0))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libzmf))
 
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,libzmf, \
     external/libzmf/ubsan-visibility.patch \
 ))
 endif
-endif
 
 $(eval $(call gb_UnpackedTarball_add_patches,libzmf, \
     external/libzmf/android-workaround.patch.1 \
diff --git a/include/oox/vml/vmlshape.hxx b/include/oox/vml/vmlshape.hxx
index 2bab907e884f..cb60a13c6356 100644
--- a/include/oox/vml/vmlshape.hxx
+++ b/include/oox/vml/vmlshape.hxx
@@ -122,7 +122,7 @@ struct OOX_DLLPUBLIC ShapeTypeModel
 
 /** A shape template contains all formatting properties of shapes and can serve
     as templates for several shapes in a drawing. */
-class ShapeType
+class SAL_DLLPUBLIC_RTTI ShapeType
 {
 public:
     explicit            ShapeType( Drawing& rDrawing );
diff --git a/include/svx/AccessibleControlShape.hxx b/include/svx/AccessibleControlShape.hxx
index 5b0e49941741..8c8115d9d748 100644
--- a/include/svx/AccessibleControlShape.hxx
+++ b/include/svx/AccessibleControlShape.hxx
@@ -66,7 +66,7 @@ namespace accessibility {
                                 >   AccessibleControlShape_Base;
 /** @descr
 */
-class AccessibleControlShape final
+class SAL_DLLPUBLIC_RTTI AccessibleControlShape final
         :public AccessibleShape
         ,public AccessibleControlShape_Base
 {
diff --git a/include/svx/EnhancedCustomShapeFunctionParser.hxx b/include/svx/EnhancedCustomShapeFunctionParser.hxx
index 30873c5eb644..ff53f38c6bff 100644
--- a/include/svx/EnhancedCustomShapeFunctionParser.hxx
+++ b/include/svx/EnhancedCustomShapeFunctionParser.hxx
@@ -134,7 +134,7 @@ inline std::basic_ostream<charT, traits> & operator <<(
 
 SVX_DLLPUBLIC void FillEquationParameter( const css::drawing::EnhancedCustomShapeParameter&, const sal_Int32, EnhancedCustomShapeEquation& );
 
-class ExpressionNode
+class SAL_DLLPUBLIC_RTTI ExpressionNode
 {
 public:
     virtual ~ExpressionNode();
diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx
index fecb365b34ec..60f39a39198c 100644
--- a/include/svx/gridctrl.hxx
+++ b/include/svx/gridctrl.hxx
@@ -63,7 +63,7 @@ enum class GridRowStatus
 // DbGridRow, description of rows
 
 
-class DbGridRow : public SvRefBase
+class SAL_DLLPUBLIC_RTTI DbGridRow : public SvRefBase
 {
     css::uno::Any  m_aBookmark;        // Bookmark of the row, can be set
     ::std::vector< std::unique_ptr<::svxform::DataColumn> >
diff --git a/include/toolkit/awt/vclxwindows.hxx b/include/toolkit/awt/vclxwindows.hxx
index 025238ecedbe..202d5974c8f9 100644
--- a/include/toolkit/awt/vclxwindows.hxx
+++ b/include/toolkit/awt/vclxwindows.hxx
@@ -175,7 +175,7 @@ protected:
 
 //  class VCLXCheckBox
 
-class VCLXCheckBox :    public css::awt::XCheckBox,
+class SAL_DLLPUBLIC_RTTI VCLXCheckBox :    public css::awt::XCheckBox,
                         public css::awt::XButton,
                         public VCLXGraphicControl
 {
@@ -233,7 +233,7 @@ public:
 
 //  class VCLXRadioButton
 
-class VCLXRadioButton : public css::awt::XRadioButton,
+class SAL_DLLPUBLIC_RTTI VCLXRadioButton : public css::awt::XRadioButton,
                         public css::awt::XButton,
                         public VCLXGraphicControl
 {
@@ -562,7 +562,7 @@ public:
 
 //  class VCLXScrollBar
 
-class VCLXScrollBar :   public css::awt::XScrollBar,
+class SAL_DLLPUBLIC_RTTI VCLXScrollBar :   public css::awt::XScrollBar,
                         public VCLXWindow
 {
 private:
@@ -874,7 +874,7 @@ public:
 
 //  class VCLXFormattedSpinField
 
-class VCLXFormattedSpinField : public VCLXSpinField
+class SAL_DLLPUBLIC_RTTI VCLXFormattedSpinField : public VCLXSpinField
 {
 private:
     FormatterBase*  mpFormatter;
diff --git a/include/xmloff/NamedBoolPropertyHdl.hxx b/include/xmloff/NamedBoolPropertyHdl.hxx
index d5fe6eb83927..1a5609c4042e 100644
--- a/include/xmloff/NamedBoolPropertyHdl.hxx
+++ b/include/xmloff/NamedBoolPropertyHdl.hxx
@@ -26,7 +26,7 @@
 /**
     PropertyHandler for a named xml bool type:
 */
-class XMLNamedBoolPropertyHdl : public XMLPropertyHandler
+class SAL_DLLPUBLIC_RTTI XMLNamedBoolPropertyHdl : public XMLPropertyHandler
 {
 private:
     const OUString maTrueStr;
diff --git a/include/xmloff/controlpropertyhdl.hxx b/include/xmloff/controlpropertyhdl.hxx
index 141111816dad..51f95986af0d 100644
--- a/include/xmloff/controlpropertyhdl.hxx
+++ b/include/xmloff/controlpropertyhdl.hxx
@@ -36,7 +36,7 @@ namespace xmloff
 
     //= ORotationAngleHandler
 
-    class ORotationAngleHandler : public XMLPropertyHandler
+    class SAL_DLLPUBLIC_RTTI ORotationAngleHandler : public XMLPropertyHandler
     {
     public:
         ORotationAngleHandler();
@@ -48,7 +48,7 @@ namespace xmloff
 
     //= OFontWidthHandler
 
-    class OFontWidthHandler : public XMLPropertyHandler
+    class SAL_DLLPUBLIC_RTTI OFontWidthHandler : public XMLPropertyHandler
     {
     public:
         OFontWidthHandler();
@@ -60,7 +60,7 @@ namespace xmloff
 
     //= OControlBorderHandlerBase
 
-    class OControlBorderHandler : public XMLPropertyHandler
+    class SAL_DLLPUBLIC_RTTI OControlBorderHandler : public XMLPropertyHandler
     {
     public:
         enum BorderFacet
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index 65f049ad163f..fa18d418dfc6 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -174,7 +174,7 @@ public:
 // this is only for the XML Export in the hxx
 class ScChangeActionContent;
 
-class ScChangeAction
+class SAL_DLLPUBLIC_RTTI ScChangeAction
 {
     friend class ScChangeTrack;
     friend class ScChangeActionIns;
@@ -363,7 +363,7 @@ public:
 };
 
 //  ScChangeActionIns
-class ScChangeActionIns : public ScChangeAction
+class SAL_DLLPUBLIC_RTTI ScChangeActionIns : public ScChangeAction
 {
     friend class ScChangeTrack;
 
@@ -398,7 +398,7 @@ public:
 };
 
 //  ScChangeActionDel
-class ScChangeActionMove;
+class SAL_DLLPUBLIC_RTTI ScChangeActionMove;
 
 class ScChangeActionDelMoveEntry : public ScChangeActionLinkEntry
 {
@@ -597,7 +597,7 @@ enum ScChangeActionContentCellType
     SC_CACCT_MATREF
 };
 
-class ScChangeActionContent : public ScChangeAction
+class SAL_DLLPUBLIC_RTTI ScChangeActionContent : public ScChangeAction
 {
     friend class ScChangeTrack;
 
@@ -817,7 +817,7 @@ enum ScChangeTrackMergeState
 // and are decremented, to keep values in a table separated from "normal" actions.
 #define SC_CHGTRACK_GENERATED_START (sal_uInt32(0xfffffff0))
 
-class ScChangeTrack : public utl::ConfigurationListener
+class SAL_DLLPUBLIC_RTTI ScChangeTrack : public utl::ConfigurationListener
 {
     friend void ScChangeAction::RejectRestoreContents( ScChangeTrack*, SCCOL, SCROW );
     friend bool ScChangeActionDel::Reject( ScDocument* pDoc );
diff --git a/sc/inc/dapiuno.hxx b/sc/inc/dapiuno.hxx
index 872745086d98..ad6f9b275502 100644
--- a/sc/inc/dapiuno.hxx
+++ b/sc/inc/dapiuno.hxx
@@ -128,7 +128,7 @@ public:
 };
 
 //  ScDataPilotDescriptorBase is never instantiated directly
-class ScDataPilotDescriptorBase : public css::sheet::XDataPilotDescriptor,
+class SAL_DLLPUBLIC_RTTI ScDataPilotDescriptorBase : public css::sheet::XDataPilotDescriptor,
                                   public css::beans::XPropertySet,
                                   public css::sheet::XDataPilotDataLayoutFieldSupplier,
                                   public css::lang::XServiceInfo,
diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx
index 9a260b4e8390..7fd60a530b66 100644
--- a/sc/inc/dbdata.hxx
+++ b/sc/inc/dbdata.hxx
@@ -58,7 +58,7 @@ protected:
     ScRangeList maDirtyTableColumnNames;
 };
 
-class ScDBData : public SvtListener, public ScRefreshTimer
+class SAL_DLLPUBLIC_RTTI ScDBData : public SvtListener, public ScRefreshTimer
 {
 private:
     std::unique_ptr<ScSortParam> mpSortParam;
diff --git a/sc/inc/queryparam.hxx b/sc/inc/queryparam.hxx
index 594b21d56057..b06496547d7e 100644
--- a/sc/inc/queryparam.hxx
+++ b/sc/inc/queryparam.hxx
@@ -39,7 +39,7 @@ class SharedStringPool;
 
 }
 
-struct ScQueryParamBase
+struct SAL_DLLPUBLIC_RTTI ScQueryParamBase
 {
     utl::SearchParam::SearchType eSearchType;
     bool            bHasHeader;
@@ -99,7 +99,7 @@ inline std::basic_ostream<charT, traits> & operator <<(std::basic_ostream<charT,
     return stream;
 }
 
-struct ScQueryParamTable
+struct SAL_DLLPUBLIC_RTTI ScQueryParamTable
 {
     SCCOL           nCol1;
     SCROW           nRow1;
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index 2c517eedf770..7d0d7e0a3675 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -77,7 +77,7 @@ class ScMarkData;
 struct ScDragData;
 class SfxDialogController;
 
-class ScModule: public SfxModule, public SfxListener, public utl::ConfigurationListener
+class SAL_DLLPUBLIC_RTTI ScModule: public SfxModule, public SfxListener, public utl::ConfigurationListener
 {
     Timer               m_aIdleTimer;
     Idle                m_aSpellIdle;
diff --git a/sc/inc/stlsheet.hxx b/sc/inc/stlsheet.hxx
index bd5aa843d8b4..69bc83be6365 100644
--- a/sc/inc/stlsheet.hxx
+++ b/sc/inc/stlsheet.hxx
@@ -26,7 +26,7 @@
 
 class ScStyleSheetPool;
 
-class ScStyleSheet final : public SfxStyleSheet
+class SAL_DLLPUBLIC_RTTI ScStyleSheet final : public SfxStyleSheet
 {
 friend class ScStyleSheetPool;
 
diff --git a/sc/inc/userdat.hxx b/sc/inc/userdat.hxx
index 56874721f0f1..17a81261b3cd 100644
--- a/sc/inc/userdat.hxx
+++ b/sc/inc/userdat.hxx
@@ -82,7 +82,7 @@ public:
     const ImageMap& GetImageMap() const             { return aImageMap; }
 };
 
-class ScMacroInfo : public SdrObjUserData
+class SAL_DLLPUBLIC_RTTI ScMacroInfo : public SdrObjUserData
 {
 public:
                     ScMacroInfo();
diff --git a/sc/source/ui/inc/dbfunc.hxx b/sc/source/ui/inc/dbfunc.hxx
index 7e807d9a5ad0..e4db4d500cb0 100644
--- a/sc/source/ui/inc/dbfunc.hxx
+++ b/sc/source/ui/inc/dbfunc.hxx
@@ -35,7 +35,7 @@ class ScDPSaveData;
 struct ScDPNumGroupInfo;
 struct ScSubTotalParam;
 
-class ScDBFunc : public ScViewFunc
+class SAL_DLLPUBLIC_RTTI ScDBFunc : public ScViewFunc
 {
 private:
     void GetSelectedMemberList(ScDPUniqueStringSet& rEntries, long& rDimension);
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index ca2a4ce8308d..cdbd9b83f7a0 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -82,7 +82,7 @@ struct SpellCallbackInfo;
 // predefines
 namespace sdr { namespace overlay { class OverlayObjectList; }}
 
-class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSourceHelper
+class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSourceHelper
 {
     // ScFilterListBox is always used for selection list
     friend class ScFilterListBox;
diff --git a/sc/source/ui/inc/preview.hxx b/sc/source/ui/inc/preview.hxx
index f3595722398c..69133b9e9c1b 100644
--- a/sc/source/ui/inc/preview.hxx
+++ b/sc/source/ui/inc/preview.hxx
@@ -29,7 +29,7 @@ class ScDocShell;
 class ScPreviewShell;
 class FmFormView;
 
-class ScPreview : public vcl::Window
+class SAL_DLLPUBLIC_RTTI ScPreview : public vcl::Window
 {
 private:
     ScMarkData::MarkedTabsType maSelectedTabs;
diff --git a/sc/source/ui/inc/transobj.hxx b/sc/source/ui/inc/transobj.hxx
index 211fa8fc7ef2..5b7f405fb55e 100644
--- a/sc/source/ui/inc/transobj.hxx
+++ b/sc/source/ui/inc/transobj.hxx
@@ -36,7 +36,7 @@ namespace com { namespace sun { namespace star {
     }
 }}}
 
-class ScTransferObj : public TransferableHelper
+class SAL_DLLPUBLIC_RTTI ScTransferObj : public TransferableHelper
 {
 private:
     ScDocumentUniquePtr             m_pDoc;
diff --git a/sd/inc/CustomAnimationEffect.hxx b/sd/inc/CustomAnimationEffect.hxx
index d27a4c13efcb..f60e350ba3cf 100644
--- a/sd/inc/CustomAnimationEffect.hxx
+++ b/sd/inc/CustomAnimationEffect.hxx
@@ -365,7 +365,7 @@ private:
 typedef std::shared_ptr< InteractiveSequence > InteractiveSequencePtr;
 typedef std::vector< InteractiveSequencePtr > InteractiveSequenceVector;
 
-class MainSequence : public EffectSequenceHelper, public ISequenceListener
+class SAL_DLLPUBLIC_RTTI MainSequence : public EffectSequenceHelper, public ISequenceListener
 {
     friend class UndoAnimation;
     friend class MainSequenceRebuildGuard;
diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index 65d9cdedf4e7..8fedd75ae242 100644
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -69,7 +69,7 @@ typedef std::map< sal_uInt32, css::uno::Sequence< css::uno::Type> > SdTypesCache
 
 */
 
-class SdModule final : public SfxModule, public SfxListener
+class SAL_DLLPUBLIC_RTTI SdModule final : public SfxModule, public SfxListener
 {
 public:
                             SFX_DECL_INTERFACE(SD_IF_SDAPP)
diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx
index f4cf930d26e3..d1fd4505fc80 100644
--- a/sd/inc/stlpool.hxx
+++ b/sd/inc/stlpool.hxx
@@ -45,7 +45,7 @@ typedef ::cppu::ImplInheritanceHelper< SfxStyleSheetPool,
                                         css::container::XNameAccess,
                                         css::lang::XComponent > SdStyleSheetPoolBase;
 
-class SdStyleSheetPool final : public SdStyleSheetPoolBase, public SfxListener
+class SAL_DLLPUBLIC_RTTI SdStyleSheetPool final : public SdStyleSheetPoolBase, public SfxListener
 {
     friend class SdDrawDocument;
 public:
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index df5590cfebd3..713cac92c2fc 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -65,7 +65,7 @@ class ViewOverlayManager;
     overview over several slides or a textual
     overview over the text in an Impress document (OutlineViewShell).
 */
-class DrawViewShell
+class SAL_DLLPUBLIC_RTTI DrawViewShell
     : public ViewShell,
       public SfxListener,
       public utl::ConfigurationListener
diff --git a/sd/source/ui/inc/GraphicViewShell.hxx b/sd/source/ui/inc/GraphicViewShell.hxx
index aea154e7059f..fd79bda658d7 100644
--- a/sd/source/ui/inc/GraphicViewShell.hxx
+++ b/sd/source/ui/inc/GraphicViewShell.hxx
@@ -35,7 +35,7 @@ namespace sd {
     ViewShell that turns off some of the features for GraphicViewShell
     instances.</p>
 */
-class GraphicViewShell final
+class SAL_DLLPUBLIC_RTTI GraphicViewShell final
     : public DrawViewShell
 {
 public:
diff --git a/sd/source/ui/inc/LayerTabBar.hxx b/sd/source/ui/inc/LayerTabBar.hxx
index 3654f47026ce..2e0bee3aabef 100644
--- a/sd/source/ui/inc/LayerTabBar.hxx
+++ b/sd/source/ui/inc/LayerTabBar.hxx
@@ -31,7 +31,7 @@ namespace sd {
  */
 class DrawViewShell;
 
-class LayerTabBar final
+class SAL_DLLPUBLIC_RTTI LayerTabBar final
     : public TabBar,
       public DropTargetHelper
 {
diff --git a/sd/source/ui/inc/SlideSorterViewShell.hxx b/sd/source/ui/inc/SlideSorterViewShell.hxx
index 196134a32974..43f94f4d60cd 100644
--- a/sd/source/ui/inc/SlideSorterViewShell.hxx
+++ b/sd/source/ui/inc/SlideSorterViewShell.hxx
@@ -35,7 +35,7 @@ namespace sd { namespace slidesorter {
 
 class SlideSorter;
 
-class SlideSorterViewShell
+class SAL_DLLPUBLIC_RTTI SlideSorterViewShell
     : public ViewShell
 {
     friend class controller::SlotManager;
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 8b7707504173..dea7dfbfea4c 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -86,7 +86,7 @@ static const DrawModeFlags OUTPUT_DRAWMODE_CONTRAST
 
     <p>This class replaces the former ViewShell class.</p>
 */
-class ViewShell
+class SAL_DLLPUBLIC_RTTI ViewShell
     : public SfxShell
 {
 public:
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
index a77de34d9f18..b79af210bfe5 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
@@ -52,7 +52,7 @@ namespace sd { namespace slidesorter { namespace controller {
 
 class SlideSorterController;
 
-class Clipboard
+class SAL_DLLPUBLIC_RTTI Clipboard
     : public ViewClipboard
 {
 public:
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 28bb7138d0d7..3946662d8f67 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -121,11 +121,10 @@ endif
 
 # If CC or CXX already include -fvisibility=hidden, don't duplicate it
 ifeq (,$(filter -fvisibility=hidden,$(CC)))
-gb_VISIBILITY_FLAGS := -fvisibility=hidden
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 gb_VISIBILITY_FLAGS := -fvisibility-ms-compat
-endif
+else
+gb_VISIBILITY_FLAGS := -fvisibility=hidden
 endif
 endif
 gb_VISIBILITY_FLAGS_CXX := -fvisibility-inlines-hidden
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 0cd205891d2e..1d6b38cdf8ce 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -84,12 +84,10 @@ endif
 
 ifneq ($(HAVE_LD_BSYMBOLIC_FUNCTIONS),)
 gb_LinkTarget_LDFLAGS += -Wl,-Bsymbolic-functions
-ifeq ($(COM_IS_CLANG),TRUE)
-ifneq ($(filter -fsanitize=%,$(CC)),)
+ifeq ($(NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY),TRUE)
 gb_LinkTarget_LDFLAGS += -Wl,--dynamic-list-cpp-typeinfo
 endif
 endif
-endif
 
 gb_LINKEROPTFLAGS := -Wl,-O1
 gb_LINKERSTRIPDEBUGFLAGS := -Wl,-S
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
index 5295c93f641e..e4c509641851 100644
--- a/sw/inc/AnnotationWin.hxx
+++ b/sw/inc/AnnotationWin.hxx
@@ -56,7 +56,7 @@ namespace sw { namespace sidebarwindows {
 
 namespace sw { namespace annotation {
 
-class SwAnnotationWin : public vcl::Window
+class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window
 {
     public:
         SwAnnotationWin( SwEditWin& rEditWin,
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx
index b6f8242864f0..d34ae3f34b72 100644
--- a/sw/inc/PostItMgr.hxx
+++ b/sw/inc/PostItMgr.hxx
@@ -124,7 +124,7 @@ class SwNoteProps: public utl::ConfigItem
     virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;
 };
 
-class SwPostItMgr: public SfxListener
+class SAL_DLLPUBLIC_RTTI SwPostItMgr: public SfxListener
 {
     private:
         SwView*                         mpView;
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index ea92f4289d9b..9a9ba06c13c1 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -145,7 +145,7 @@ public:
     one of the instances with the same m_nHandle is actually in the document,
     they're all cloned via CopyField()...
  */
-class SwAuthorityField : public SwField
+class SAL_DLLPUBLIC_RTTI SwAuthorityField : public SwField
 {
     rtl::Reference<SwAuthEntry>  m_xAuthEntry;
     mutable sal_IntPtr  m_nTempSequencePos;
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index d19befc69a96..175b98de3231 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -302,7 +302,7 @@ bool CheckControlLayer( const SdrObject *pObj );
 
 typedef std::unique_ptr< SwDrawVirtObj, SdrObjectFreeOp > SwDrawVirtObjPtr;
 
-class SwDrawContact final : public SwContact
+class SAL_DLLPUBLIC_RTTI SwDrawContact final : public SwContact
 {
     private:
         /** anchored drawing object instance for the
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index d6ff1692e5bf..bdd7fd68756f 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -123,7 +123,7 @@ enum SwJumpEditFormat
     JE_FMT_OLE
 };
 
-class SwPageNumberFieldType : public SwFieldType
+class SAL_DLLPUBLIC_RTTI SwPageNumberFieldType : public SwFieldType
 {
     SvxNumType      m_nNumberingType;
     bool            m_bVirtual;
@@ -196,7 +196,7 @@ public:
     virtual bool        PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
 };
 
-class SwFileNameFieldType : public SwFieldType
+class SAL_DLLPUBLIC_RTTI SwFileNameFieldType : public SwFieldType
 {
     SwDoc *m_pDoc;
 public:
@@ -222,7 +222,7 @@ public:
     virtual bool        PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
 };
 
-class SwTemplNameFieldType : public SwFieldType
+class SAL_DLLPUBLIC_RTTI SwTemplNameFieldType : public SwFieldType
 {
     SwDoc *m_pDoc;
 public:
@@ -244,7 +244,7 @@ public:
 };
 
 // Document statistics
-class SwDocStatFieldType : public SwFieldType
+class SAL_DLLPUBLIC_RTTI SwDocStatFieldType : public SwFieldType
 {
     SwDoc*          m_pDoc;
     SvxNumType      m_nNumberingType;
@@ -276,7 +276,7 @@ public:
     virtual bool        PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
 };
 
-class SwHiddenTextFieldType : public SwFieldType
+class SAL_DLLPUBLIC_RTTI SwHiddenTextFieldType : public SwFieldType
 {
     bool m_bHidden;
 public:
@@ -375,7 +375,7 @@ public:
     virtual bool        PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
 };
 
-class SwMacroFieldType : public SwFieldType
+class SAL_DLLPUBLIC_RTTI SwMacroFieldType : public SwFieldType
 {
     SwDoc* const m_pDoc;
 
@@ -423,7 +423,7 @@ public:
     static bool isScriptURL( const OUString& str );
 };
 
-class SwPostItFieldType : public SwFieldType
+class SAL_DLLPUBLIC_RTTI SwPostItFieldType : public SwFieldType
 {
 private:
     SwDoc* const mpDoc;
@@ -496,7 +496,7 @@ public:
     virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
-class SwDocInfoFieldType : public SwValueFieldType
+class SAL_DLLPUBLIC_RTTI SwDocInfoFieldType : public SwValueFieldType
 {
 public:
     SwDocInfoFieldType(SwDoc* pDc);
@@ -573,7 +573,7 @@ protected:
 };
 
 // Relative page numbering.
-class SwRefPageSetField : public SwField
+class SAL_DLLPUBLIC_RTTI SwRefPageSetField : public SwField
 {
     short   m_nOffset;
     bool    m_bOn;
@@ -680,7 +680,7 @@ public:
     virtual std::unique_ptr<SwFieldType> Copy() const override;
 };
 
-class SwScriptField : public SwField
+class SAL_DLLPUBLIC_RTTI SwScriptField : public SwField
 {
     OUString m_sType;  ///< Type of Code (Java/VBScript/...)
     OUString m_sCode;  /**< Code as text.
@@ -711,7 +711,7 @@ public:
 };
 
 // Combined Character Fieldtype
-class SwCombinedCharFieldType : public SwFieldType
+class SAL_DLLPUBLIC_RTTI SwCombinedCharFieldType : public SwFieldType
 {
 public:
     SwCombinedCharFieldType();
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index 23d00b3d9fbb..dcd1354619b3 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -67,7 +67,7 @@ public:
     void Clear() { maData.clear(); }
 };
 
-class SwGetExpFieldType : public SwValueFieldType
+class SAL_DLLPUBLIC_RTTI SwGetExpFieldType : public SwValueFieldType
 {
 public:
     SwGetExpFieldType(SwDoc* pDoc);
@@ -268,7 +268,7 @@ inline bool SwSetExpField::GetInputFlag() const
 inline bool SwSetExpField::IsSequenceField() const
     { return 0 != (nsSwGetSetExpType::GSE_SEQ & static_cast<SwSetExpFieldType*>(GetTyp())->GetType()); }
 
-class SwInputFieldType : public SwFieldType
+class SAL_DLLPUBLIC_RTTI SwInputFieldType : public SwFieldType
 {
     SwDoc* const mpDoc;
 public:
diff --git a/sw/inc/flddat.hxx b/sw/inc/flddat.hxx
index 38ea963196b9..bdc7c93a2c10 100644
--- a/sw/inc/flddat.hxx
+++ b/sw/inc/flddat.hxx
@@ -32,7 +32,7 @@ enum SwDateSubFormat
     DATE_VAR
 };
 
-class SwDateTimeFieldType : public SwValueFieldType
+class SAL_DLLPUBLIC_RTTI SwDateTimeFieldType : public SwValueFieldType
 {
 public:
         SwDateTimeFieldType(SwDoc* pDoc);
diff --git a/sw/inc/flddropdown.hxx b/sw/inc/flddropdown.hxx
index cc29a2e84c7f..2fbf8d0b6bb2 100644
--- a/sw/inc/flddropdown.hxx
+++ b/sw/inc/flddropdown.hxx
@@ -28,7 +28,7 @@
 /**
     Field type for dropdown boxes.
 */
-class SwDropDownFieldType : public SwFieldType
+class SAL_DLLPUBLIC_RTTI SwDropDownFieldType : public SwFieldType
 {
 public:
     /**
diff --git a/sw/inc/fmtautofmt.hxx b/sw/inc/fmtautofmt.hxx
index 76527f90ddfe..0863ca5e7c1b 100644
--- a/sw/inc/fmtautofmt.hxx
+++ b/sw/inc/fmtautofmt.hxx
@@ -22,7 +22,7 @@
 #include <svl/poolitem.hxx>
 #include <memory>
 
-class SwFormatAutoFormat: public SfxPoolItem
+class SAL_DLLPUBLIC_RTTI SwFormatAutoFormat: public SfxPoolItem
 {
     std::shared_ptr<SfxItemSet> mpHandle;
 
diff --git a/sw/inc/fmtflcnt.hxx b/sw/inc/fmtflcnt.hxx
index 18ba66c2fb48..ffe143e434f6 100644
--- a/sw/inc/fmtflcnt.hxx
+++ b/sw/inc/fmtflcnt.hxx
@@ -29,7 +29,7 @@ class SwTextFlyCnt;
  *
  * A pool item that is attached to the placeholder character of an as-character frame. (TextFrame, etc.)
  */
-class SwFormatFlyCnt : public SfxPoolItem
+class SAL_DLLPUBLIC_RTTI SwFormatFlyCnt : public SfxPoolItem
 {
     friend class SwTextFlyCnt;
     SwTextFlyCnt* m_pTextAttr;
diff --git a/sw/inc/fmtrfmrk.hxx b/sw/inc/fmtrfmrk.hxx
index b235961baf5b..0b10bfeb8ed6 100644
--- a/sw/inc/fmtrfmrk.hxx
+++ b/sw/inc/fmtrfmrk.hxx
@@ -33,7 +33,7 @@ class SwTextRefMark;
 
 // ATT_REFMARK
 
-class SwFormatRefMark
+class SAL_DLLPUBLIC_RTTI SwFormatRefMark
     : public SfxPoolItem
     , public SwModify
     , public sw::BroadcasterMixin
diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx
index 6cdd70b9a768..87db52a36ab9 100644
--- a/sw/inc/grfatr.hxx
+++ b/sw/inc/grfatr.hxx
@@ -77,7 +77,7 @@ public:
     virtual SfxPoolItem*        Clone( SfxItemPool *pPool = nullptr ) const override;
 };
 
-class SwRotationGrf : public SfxUInt16Item
+class SAL_DLLPUBLIC_RTTI SwRotationGrf : public SfxUInt16Item
 {
 private:
     Size const aUnrotatedSize;
diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx
index 795d1f382fdc..e7854ef8fb9f 100644
--- a/sw/inc/modcfg.hxx
+++ b/sw/inc/modcfg.hxx
@@ -57,7 +57,7 @@ public:
     void Insert(InsCaptionOpt* pObj);
 };
 
-class SwRevisionConfig : public utl::ConfigItem
+class SAL_DLLPUBLIC_RTTI SwRevisionConfig : public utl::ConfigItem
 {
     friend class SwModuleOptions;
 
@@ -90,7 +90,7 @@ enum class SwCompareMode
     ByChar
 };
 
-class SwCompareConfig : public utl::ConfigItem
+class SAL_DLLPUBLIC_RTTI SwCompareConfig : public utl::ConfigItem
 {
     friend class SwModuleOptions;
 
@@ -114,7 +114,7 @@ public:
     using ConfigItem::SetModified;
 };
 
-class SwInsertConfig : public utl::ConfigItem
+class SAL_DLLPUBLIC_RTTI SwInsertConfig : public utl::ConfigItem
 {
     friend class SwModuleOptions;
 
@@ -142,7 +142,7 @@ public:
     using ConfigItem::SetModified;
 };
 
-class SwTableConfig : public utl::ConfigItem
+class SAL_DLLPUBLIC_RTTI SwTableConfig : public utl::ConfigItem
 {
     friend class SwModuleOptions;
 
@@ -170,7 +170,7 @@ public:
     using ConfigItem::SetModified;
 };
 
-class SwMiscConfig : public utl::ConfigItem
+class SAL_DLLPUBLIC_RTTI SwMiscConfig : public utl::ConfigItem
 {
     friend class SwModuleOptions;
 
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index 1b53254083de..d1e0f36fcae7 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -520,7 +520,7 @@ private:
     SwTableNode & operator= ( const SwTableNode & rNode ) = delete;
 };
 
-class SwSectionNode
+class SAL_DLLPUBLIC_RTTI SwSectionNode
     : public SwStartNode
 {
     friend class SwNodes;
diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
index 4adf0becfc31..f2c61877b180 100644
--- a/sw/inc/reffld.hxx
+++ b/sw/inc/reffld.hxx
@@ -60,7 +60,7 @@ enum REFERENCEMARK
 
 /// Get reference.
 
-class SwGetRefFieldType : public SwFieldType
+class SAL_DLLPUBLIC_RTTI SwGetRefFieldType : public SwFieldType
 {
     SwDoc* m_pDoc;
 protected:
diff --git a/sw/inc/swatrset.hxx b/sw/inc/swatrset.hxx
index d446dcddcc51..48cc2d6f0e20 100644
--- a/sw/inc/swatrset.hxx
+++ b/sw/inc/swatrset.hxx
@@ -132,7 +132,7 @@ namespace vcl {
     typedef OutputDevice RenderContext;
 };
 
-class SwAttrPool : public SfxItemPool
+class SAL_DLLPUBLIC_RTTI SwAttrPool : public SfxItemPool
 {
 private:
     // helpers to add/rmove DrawingLayer ItemPool, used in constructor
diff --git a/sw/inc/txtfld.hxx b/sw/inc/txtfld.hxx
index 38ca9caa6251..0db27ba5818a 100644
--- a/sw/inc/txtfld.hxx
+++ b/sw/inc/txtfld.hxx
@@ -28,7 +28,7 @@
 class SwPaM;
 class SwTextNode;
 
-class SwTextField : public virtual SwTextAttr
+class SAL_DLLPUBLIC_RTTI SwTextField : public virtual SwTextAttr
 {
     mutable OUString m_aExpand; // only used to determine, if field content is changing in <ExpandTextField()>
     SwTextNode * m_pTextNode;
diff --git a/sw/inc/txttxmrk.hxx b/sw/inc/txttxmrk.hxx
index 2329c1c5012e..a0c26987b707 100644
--- a/sw/inc/txttxmrk.hxx
+++ b/sw/inc/txttxmrk.hxx
@@ -25,7 +25,7 @@ class SwTextNode;
 class SwDoc;
 
 // Attribute for indices/tables of contents.
-class SwTextTOXMark : public SwTextAttrEnd
+class SAL_DLLPUBLIC_RTTI SwTextTOXMark : public SwTextAttrEnd
 {
     SwTextNode * m_pTextNode;
     sal_Int32 * m_pEnd;   // 0 if SwTOXMark without AlternativeText
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx
index bcc0a5f27ae8..9a10a891c032 100644
--- a/sw/inc/unocrsr.hxx
+++ b/sw/inc/unocrsr.hxx
@@ -32,7 +32,7 @@ namespace sw
     };
 }
 
-class SwUnoCursor : public virtual SwCursor
+class SAL_DLLPUBLIC_RTTI SwUnoCursor : public virtual SwCursor
 {
 private:
     bool m_bRemainInSection : 1;
diff --git a/sw/source/core/inc/DocumentRedlineManager.hxx b/sw/source/core/inc/DocumentRedlineManager.hxx
index 8412e9a57c04..f962d4fb6a70 100644
--- a/sw/source/core/inc/DocumentRedlineManager.hxx
+++ b/sw/source/core/inc/DocumentRedlineManager.hxx
@@ -28,7 +28,7 @@ class SwDoc;
 namespace sw
 {
 
-class DocumentRedlineManager : public IDocumentRedlineAccess
+class SAL_DLLPUBLIC_RTTI DocumentRedlineManager : public IDocumentRedlineAccess
 {
 public:
     DocumentRedlineManager( SwDoc& i_rSwdoc );
diff --git a/sw/source/core/inc/UndoManager.hxx b/sw/source/core/inc/UndoManager.hxx
index 3f7d9b34f631..fda9c734a7e6 100644
--- a/sw/source/core/inc/UndoManager.hxx
+++ b/sw/source/core/inc/UndoManager.hxx
@@ -33,7 +33,7 @@ class SwView;
 
 namespace sw {
 
-class UndoManager
+class SAL_DLLPUBLIC_RTTI UndoManager
     : public IDocumentUndoRedo
     , public SdrUndoManager
 {
diff --git a/sw/source/core/inc/ftnboss.hxx b/sw/source/core/inc/ftnboss.hxx
index ba363e53a2f7..6e1f5c24fd67 100644
--- a/sw/source/core/inc/ftnboss.hxx
+++ b/sw/source/core/inc/ftnboss.hxx
@@ -45,7 +45,7 @@ enum class SwNeighbourAdjust {
 
 typedef std::vector<SwFootnoteFrame*> SwFootnoteFrames;
 
-class SwFootnoteBossFrame: public SwLayoutFrame
+class SAL_DLLPUBLIC_RTTI SwFootnoteBossFrame: public SwLayoutFrame
 {
     // for private footnote operations
     friend class SwFrame;
diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx
index 887c2ba07c7f..39fdce0d7cc6 100644
--- a/sw/source/core/inc/pagefrm.hxx
+++ b/sw/source/core/inc/pagefrm.hxx
@@ -37,7 +37,7 @@ class SwAnchoredObject;
 
 /// A page of the document layout. Upper frame is expected to be an SwRootFrame
 /// instance. At least an SwBodyFrame lower is expected.
-class SwPageFrame: public SwFootnoteBossFrame
+class SAL_DLLPUBLIC_RTTI SwPageFrame: public SwFootnoteBossFrame
 {
     friend class SwFrame;
 
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index d9893e6e31f9..91244888ce86 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -77,7 +77,7 @@ using SwDestroyList = std::set<SwSectionFrame*>;
 
 /// The root element of a Writer document layout. Lower frames are expected to
 /// be SwPageFrame instances.
-class SwRootFrame: public SwLayoutFrame
+class SAL_DLLPUBLIC_RTTI SwRootFrame: public SwLayoutFrame
 {
     // Needs to disable the Superfluous temporarily
     friend void AdjustSizeChgNotify( SwRootFrame *pRoot );
diff --git a/sw/source/uibase/inc/chldwrap.hxx b/sw/source/uibase/inc/chldwrap.hxx
index 0ff0823950b8..b6f5b41ab3b1 100644
--- a/sw/source/uibase/inc/chldwrap.hxx
+++ b/sw/source/uibase/inc/chldwrap.hxx
@@ -24,7 +24,7 @@
 
 class SwDocShell;
 
-class SwChildWinWrapper : public SfxChildWindow
+class SAL_DLLPUBLIC_RTTI SwChildWinWrapper : public SfxChildWindow
 {
     Timer       m_aUpdateTimer;
     SwDocShell* m_pDocSh;
diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx
index cb4b6f5a788e..53b8decd504e 100644
--- a/sw/source/uibase/inc/pview.hxx
+++ b/sw/source/uibase/inc/pview.hxx
@@ -43,7 +43,7 @@ class SvtAccessibilityOptions;
 class SwPagePreviewLayout;
 
 // Delete member <mnVirtPage> and its accessor
-class SwPagePreviewWin : public vcl::Window
+class SAL_DLLPUBLIC_RTTI SwPagePreviewWin : public vcl::Window
 {
     SwViewShell* mpViewShell;
     sal_uInt16 mnSttPage;


More information about the Libreoffice-commits mailing list