sw/inc/unoframe.hxx | 5 +++-- sw/inc/unotext.hxx | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-)
New commits: commit d022e237f1eb56bfdb65f842b5f0c5ec31334f94 Author: Stephan Bergmann <[email protected]> AuthorDate: Thu Jul 21 14:43:58 2022 +0200 Commit: Stephan Bergmann <[email protected]> CommitDate: Thu Jul 21 16:16:04 2022 +0200 More RTTI needed by UBSan now Presumably after 7a076dd9a6d11aef547f657f525ec0c27a50db58 "use more concrete UNO classes in writer", CppunitTest_chart2_export started to fail with > [_RUN_____] Chart2ExportTest::testStockChart [...] > warn:sal.osl:3513253:3513253:sal/osl/unx/module.cxx:152: dlopen(instdir/program/libmswordlo.so, 257): instdir/program/libmswordlo.so: undefined symbol: _ZTI12SwXTextFrame [...] > unknown:0:Chart2ExportTest::testStockChart An uncaught exception of type com.sun.star.io.IOException - SfxBaseModel::impl_store <file:///tmp/Chart2ExportTest__testStockChart_4uwve4.tmp> failed: 0xc10(Error Area:Io Class:Write Code:16) at sfx2/source/doc/sfxbasemodel.cxx:3205 at sfx2/source/doc/sfxbasemodel.cxx:1783 etc. (And marking only SwXTextFrame as SAL_DLLPUBLIC_RTTI would then cause > sw/source/core/unocore/unoframe.cxx:1271:18: error: dynamic_cast from 'com::sun::star::uno::XInterface' with default type visibility to 'SwXTextFrame' with default type visibility [loplugin:dyncastvisibility] > xFrame = dynamic_cast<NameLookupIsHard*>(pFrameFormat->GetXObject().get().get()); // cached? > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/XInterface.hdl:15:40: note: base class 'com::sun::star::uno::XInterface' with default type visibility defined here [loplugin:dyncastvisibility] > class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI XInterface > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ > sw/inc/unotext.hxx:44:7: note: intermediary class 'SwXText' with hidden type visibility defined here [loplugin:dyncastvisibility] > class SwXText > ~~~~~~^~~~~~~ > sw/inc/unoframe.hxx:47:7: note: intermediary class 'SwXFrame' with hidden type visibility defined here [loplugin:dyncastvisibility] > class SwXFrame : public cppu::WeakImplHelper > ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > sw/inc/unoframe.hxx:174:26: note: derived class 'SwXTextFrame' with default type visibility defined here [loplugin:dyncastvisibility] > class SAL_DLLPUBLIC_RTTI SwXTextFrame final : public SwXTextFrameBaseClass, > ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ in turn.) Change-Id: I5535853885a471d846458d3c6baf538ef047546b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137300 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx index de6f63887f02..6f89a6bc5a80 100644 --- a/sw/inc/unoframe.hxx +++ b/sw/inc/unoframe.hxx @@ -29,6 +29,7 @@ #include <com/sun/star/document/XEventsSupplier.hpp> #include <cppuhelper/implbase.hxx> +#include <sal/types.h> #include <svl/listener.hxx> #include "flyenum.hxx" @@ -44,7 +45,7 @@ class SfxItemPropertySet; namespace com::sun::star::frame { class XModel; } class BaseFrameProperties_Impl; -class SwXFrame : public cppu::WeakImplHelper +class SAL_DLLPUBLIC_RTTI SwXFrame : public cppu::WeakImplHelper < css::lang::XServiceInfo, css::lang::XUnoTunnel, @@ -171,7 +172,7 @@ typedef cppu::ImplInheritanceHelper > SwXTextFrameBaseClass; -class SwXTextFrame final : public SwXTextFrameBaseClass, +class SAL_DLLPUBLIC_RTTI SwXTextFrame final : public SwXTextFrameBaseClass, public SwXText { friend class SwXFrame; // just for CreateXFrame diff --git a/sw/inc/unotext.hxx b/sw/inc/unotext.hxx index 14d61a5486dc..8bc221b7fa63 100644 --- a/sw/inc/unotext.hxx +++ b/sw/inc/unotext.hxx @@ -27,6 +27,7 @@ #include <com/sun/star/text/XRelativeTextContentInsert.hpp> #include <com/sun/star/text/XRelativeTextContentRemove.hpp> #include <com/sun/star/text/XTextAppendAndConvert.hpp> +#include <sal/types.h> #include "unobaseclass.hxx" @@ -41,7 +42,7 @@ class SwDoc; class SwStartNode; class SwPaM; -class SwXText +class SAL_DLLPUBLIC_RTTI SwXText : public css::lang::XTypeProvider , public css::lang::XUnoTunnel , public css::beans::XPropertySet
