sw/source/core/undo/undel.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 29560c4bdfcb94daab898277ed73baabcd0e639a
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Thu Sep 3 20:13:50 2020 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Thu Sep 3 21:12:45 2020 +0200

    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
    [...]
    
    Change-Id: Ie6c6fff1a68e4c37ffadd242fca8346f5311ff89
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102015
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 075a306506d8..37304f3fdba8 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -821,12 +821,12 @@ static void lcl_ReAnchorAtContentFlyFrames( const 
SwFrameFormats& rSpzArr, SwPos
     if( rSpzArr.empty() )
         return;
 
-    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)
         {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to