Kaydet (Commit) f905d605 authored tarafından Michael Stahl's avatar Michael Stahl Kaydeden (comit) Stephan Bergmann

sw: fix UBSAN error in CppunitTest_sw_odfimport

/sw/source/core/layout/calcmove.cxx:1686:43: runtime error: downcast of address 0x2ae9ba4566c0 which does not point to an object of type 'const SwFootnoteFrame'
0x2ae9ba4566c0: note: object is of type 'SwSectionFrame'

Footnotes can contain sections of course, so use FindFootnoteFrame().

(regression from c83a443e)

Change-Id: I7824c81ba74ed3341f0ba5b14dac89d71f6318db
Reviewed-on: https://gerrit.libreoffice.org/39157Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst bcbdb64a
...@@ -1683,7 +1683,8 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) ...@@ -1683,7 +1683,8 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
aRectFnSet.Refresh(this); aRectFnSet.Refresh(this);
if (!bMovedFwd && bFootnote && GetIndPrev() != pPre) if (!bMovedFwd && bFootnote && GetIndPrev() != pPre)
{ // SwFlowFrame::CutTree() could have formatted and deleted pPre { // SwFlowFrame::CutTree() could have formatted and deleted pPre
auto const pPrevFootnoteFrame(static_cast<SwFootnoteFrame const*>(GetUpper())->GetMaster()); auto const pPrevFootnoteFrame(static_cast<SwFootnoteFrame const*>(
FindFootnoteFrame())->GetMaster());
bool bReset = true; bool bReset = true;
if (pPrevFootnoteFrame) if (pPrevFootnoteFrame)
{ // use GetIndNext() in case there are sections { // use GetIndNext() in case there are sections
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment