Kaydet (Commit) 8e762058 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#9858 Bad-cast

use a SwUnoCursor for the LastAnchorPos around here

Change-Id: I9b2b18e88aa0816e3386d7b95b4fd386d13af77f
Reviewed-on: https://gerrit.libreoffice.org/58927
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 3f9f000b
......@@ -71,6 +71,7 @@
#include <frmatr.hxx>
#include <itabenum.hxx>
#include <unocrsr.hxx>
#include <iostream>
#include <memory>
......@@ -198,8 +199,12 @@ sal_uInt16 SwWW8ImplReader::End_Footnote()
sChar += OUStringLiteral1(pText->GetText()[--nPos]);
m_pPaM->SetMark();
--m_pPaM->GetMark()->nContent;
std::shared_ptr<SwUnoCursor> xLastAnchorCursor(m_pLastAnchorPos ? m_rDoc.CreateUnoCursor(*m_pLastAnchorPos) : nullptr);
m_pLastAnchorPos.reset();
m_rDoc.getIDocumentContentOperations().DeleteRange( *m_pPaM );
m_pPaM->DeleteMark();
if (xLastAnchorCursor)
m_pLastAnchorPos.reset(new SwPosition(*xLastAnchorCursor->GetPoint()));
SwFormatFootnote aFootnote(rDesc.meType == MAN_EDN);
pFN = pText->InsertItem(aFootnote, nPos, nPos);
}
......
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