sc/inc/cellsuno.hxx           |    3 ++-
 sc/inc/docuno.hxx             |    4 +++-
 sw/source/core/undo/undel.cxx |    4 ++--
 3 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit a59ad469fcaa7f5122e1b51848b3a26222ea515a
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Fri Jan 3 17:19:49 2020 +0100
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Fri Mar 28 08:04:25 2025 +0100

    UBSan now needs RTTI of some Library_sc types in Library_scfilt
    
    ...after 4992d61600536fe14b97b718dbb11f00e936c6a9 "tdf#129228 speedup 
opening of
    xlsx file with lots of comments" added
    
    >         ScTableSheetObj* pAnnosSupp = 
static_cast<ScTableSheetObj*>(getSheet().get());
    >         rtl::Reference<ScAnnotationsObj> xAnnos = 
static_cast<ScAnnotationsObj*>(pAnnosSupp->getAnnotations().get());
    
    to Comment::finalizeImport in sc/source/filter/oox/commentsbuffer.cxx.  (See
    <https://ci.libreoffice.org/job/lo_ubsan/1493/>).
    
    Change-Id: Ia8a99297151abfe4f052fbf46504795db1ba87b7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86192
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    (cherry picked from commit 2dcd8b7d9faa0c7e144f71f43053e5abbea06108)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183382
    Tested-by: allotropia jenkins <jenk...@allotropia.de>
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index 96d7000cef67..0fd9bbf991cf 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -25,6 +25,7 @@
 
 #include <formula/grammar.hxx>
 #include <rtl/ref.hxx>
+#include <sal/types.h>
 #include <tools/link.hxx>
 #include <svl/lstner.hxx>
 #include <svl/listener.hxx>
@@ -763,7 +764,7 @@ public:
     virtual sal_Int16 SAL_CALL resetActionLocks() override;
 };
 
-class ScTableSheetObj : public ScCellRangeObj,
+class SAL_DLLPUBLIC_RTTI ScTableSheetObj : public ScCellRangeObj,
                         public css::sheet::XSpreadsheet,
                         public css::container::XNamed,
                         public css::sheet::XSheetPageBreak,
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index bb8174132577..bd83b235c567 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -21,6 +21,8 @@
 #define INCLUDED_SC_INC_DOCUNO_HXX
 
 #include "address.hxx"
+
+#include <sal/types.h>
 #include <sfx2/sfxbasemodel.hxx>
 #include <svl/lstner.hxx>
 #include <svx/fmdmod.hxx>
@@ -654,7 +656,7 @@ public:
     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() 
override;
 };
 
-class ScAnnotationsObj final : public cppu::WeakImplHelper<
+class SAL_DLLPUBLIC_RTTI ScAnnotationsObj final : public cppu::WeakImplHelper<
                                 css::sheet::XSheetAnnotations,
                                 css::container::XEnumerationAccess,
                                 css::lang::XServiceInfo>,
commit 5d7192d570701cc04a3a92ee4d7418d56e3a29b5
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Thu Sep 3 20:13:50 2020 +0200
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Fri Mar 28 08:04:12 2025 +0100

    Drop unnecessary, wrong downcast
    
    ...during UITest_writer_tests
    UITEST_TEST_NAME=trackedChanges.trackedchanges.test_tdf135018, see
    <https://ci.libreoffice.org/job/lo_ubsan/1747/>:
    
    [...]
    > /sw/source/core/undo/undel.cxx:829:19: runtime error: downcast of address 
0x61300019f180 which does not point to an object of type 'SwFlyFrameFormat'
    > 0x61300019f180: note: object is of type 'SwDrawFrameFormat'
    >  62 03 00 10  50 14 62 26 8e 2b 00 00  c0 01 5d 00 20 61 00 00  40 3a 23 
00 20 61 00 00  c0 73 54 00
    >               ^~~~~~~~~~~~~~~~~~~~~~~
    >               vptr for 'SwDrawFrameFormat'
    >     #0 0x2b8e1ef42aaa in lcl_ReAnchorAtContentFlyFrames(SwFrameFormats 
const&, SwPosition&, unsigned long) /sw/source/core/undo/undel.cxx:829:19
    >     #1 0x2b8e1ef38d83 in SwUndoDelete::UndoImpl(sw::UndoRedoContext&) 
/sw/source/core/undo/undel.cxx:913:21
    >     #2 0x2b8e1ef66b01 in SwUndo::UndoWithContext(SfxUndoContext&) 
/sw/source/core/undo/undobj.cxx:235:5
    >     #3 0x2b8d9da12092 in 
SfxListUndoAction::UndoWithContext(SfxUndoContext&) 
/svl/source/undo/undo.cxx:1321:37
    >     #4 0x2b8d9da12092 in 
SfxListUndoAction::UndoWithContext(SfxUndoContext&) 
/svl/source/undo/undo.cxx:1321:37
    >     #5 0x2b8d9d9f95cd in SfxUndoManager::ImplUndo(SfxUndoContext*) 
/svl/source/undo/undo.cxx:698:22
    >     #6 0x2b8d9d9fa566 in SfxUndoManager::UndoWithContext(SfxUndoContext&) 
/svl/source/undo/undo.cxx:666:12
    >     #7 0x2b8e1ee6275b in 
sw::UndoManager::impl_DoUndoRedo(sw::UndoManager::UndoOrRedoType) 
/sw/source/core/undo/docundo.cxx:607:32
    >     #8 0x2b8e1ee639bb in sw::UndoManager::Undo() 
/sw/source/core/undo/docundo.cxx:640:16
    >     #9 0x2b8e1ce8891a in SwEditShell::Undo(unsigned short) 
/sw/source/core/edit/edundo.cxx:131:57
    >     #10 0x2b8e228bf8a8 in SwWrtShell::Do(SwWrtShell::DoType, unsigned 
short) /sw/source/uibase/wrtsh/wrtundo.cxx:44:26
    >     #11 0x2b8e21a7b828 in SwBaseShell::ExecUndo(SfxRequest&) 
/sw/source/uibase/shells/basesh.cxx:557:27
    >     #12 0x2b8e21a799cf in SfxStubSwBaseShellExecUndo(SfxShell*, 
SfxRequest&) /workdir/SdiTarget/sw/sdi/swslots.hxx:2193:1
    >     #13 0x2b8d97b4d845 in SfxShell::CallExec(void (*)(SfxShell*, 
SfxRequest&), SfxRequest&) /include/sfx2/shell.hxx:197:35
    >     #14 0x2b8d97ae4c54 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot 
const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:252:16
    [...]
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102015
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    (cherry picked from commit 29560c4bdfcb94daab898277ed73baabcd0e639a)
    Conflicts:
            sw/source/core/undo/undel.cxx
    
    Change-Id: Ie6c6fff1a68e4c37ffadd242fca8346f5311ff89
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183381
    Tested-by: allotropia jenkins <jenk...@allotropia.de>
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index dc24ce96e2fd..66ca6a7a1180 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -851,12 +851,12 @@ static void lcl_ReAnchorAtContentFlyFrames( const 
SwFrameFormats& rSpzArr, SwPos
 {
     if( !rSpzArr.empty() )
     {
-        SwFlyFrameFormat* pFormat;
+        SwFrameFormat* pFormat;
         const SwFormatAnchor* pAnchor;
         const SwPosition* pAPos;
         for( size_t n = 0; n < rSpzArr.size(); ++n )
         {
-            pFormat = static_cast<SwFlyFrameFormat*>(rSpzArr[n]);
+            pFormat = rSpzArr[n];
             pAnchor = &pFormat->GetAnchor();
             if (pAnchor->GetAnchorId() == RndStdIds::FLY_AT_PARA)
             {

Reply via email to