[Libreoffice-commits] core.git: include/svl

Stephan Bergmann sbergman at redhat.com
Fri Feb 23 19:54:53 UTC 2018


 include/svl/stylesheetuser.hxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 2e63d4554069b33654729a9247c0b32950803163
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Feb 23 14:21:45 2018 +0100

    StyleSheetUser use in dynamic_cast should better be SAL_DLLPUBLIC_RTTI
    
    ...so that the dynamic_cast is guaranteed to work on macOS (where RTTI
    equivalence is determined by address, not by strcmp).  The relevant dynamic_cast
    is in SdStyleSheet::IsUsed in sd/source/core/stlsheet.cxx, and at least during a
    `make check` it appears to only be fed SdStyleSheet instances derived from
    StyleSheetUser (and SdStyleSheet is also defiined in Library_sd, so the
    dynamic_cast happens to work fine also on macOS in that case).  But better be
    conservative and mark StyleSheetUser as SAL_DLLPUBLIC_RTTI after all.
    
    Change-Id: I760f58357b7fe3b4826ea496934e03da3499419e
    Reviewed-on: https://gerrit.libreoffice.org/50246
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/include/svl/stylesheetuser.hxx b/include/svl/stylesheetuser.hxx
index 0f0be440b93e..86975f6b25f6 100644
--- a/include/svl/stylesheetuser.hxx
+++ b/include/svl/stylesheetuser.hxx
@@ -10,6 +10,10 @@
 #ifndef INCLUDED_SVL_STYLESHEETUSER_HXX
 #define INCLUDED_SVL_STYLESHEETUSER_HXX
 
+#include <sal/config.h>
+
+#include <sal/types.h>
+
 namespace svl
 {
 
@@ -19,7 +23,7 @@ namespace svl
   a SfxStyleSheet (and listen on it). It can be queried by the stylesheet
   to determine if it is really used.
   */
-class StyleSheetUser
+class SAL_DLLPUBLIC_RTTI StyleSheetUser
 {
 public:
     /** Test whether this object is used.


More information about the Libreoffice-commits mailing list