sw: fix ~SwIndexReg asserts on ODF export of ooo83072-1.odt
commit3c367de9893b1e2d352585a42cbbd25052bb7376
authorMichael Stahl <Michael.Stahl@cib.de>
Fri, 9 Aug 2019 16:43:36 +0000 (9 18:43 +0200)
committerCaolán McNamara <caolanm@redhat.com>
Sat, 10 Aug 2019 10:38:08 +0000 (10 12:38 +0200)
tree02045c4f68150560374b5e90a37d11fc0cf4de9b
parentba61c3174bc24bc03e3f72fbc8d102b3312b5ff6
sw: fix ~SwIndexReg asserts on ODF export of ooo83072-1.odt

It is now possible that the stupid redline-moving code deletes the first
node in the document, and there are 2 SwPaM that point to it,
Writer::m_pCurrentPam and local pPam in SwWriter::Write().

So i thought it should be quite trivial to just use SwUnoCursors in
these cases, but it required a bit more keyboard bashing than expected.

(regression from beec1594587d0bf1ea2268f9a435c948b5580278,
 which i didn't really intend to push and am not sure if it's really
 a good idea but whatever...)

Change-Id: Ia5c18d67af8760664517a4b7ee62ef3e4a417686
Reviewed-on: https://gerrit.libreoffice.org/77225
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
17 files changed:
sw/inc/shellio.hxx
sw/source/filter/ascii/wrtasc.cxx
sw/source/filter/basflt/shellio.cxx
sw/source/filter/html/htmlflywriter.cxx
sw/source/filter/html/htmlftn.cxx
sw/source/filter/html/htmltabw.cxx
sw/source/filter/html/wrthtml.cxx
sw/source/filter/html/wrthtml.hxx
sw/source/filter/writer/writer.cxx
sw/source/filter/ww8/docxexport.cxx
sw/source/filter/ww8/docxexport.hxx
sw/source/filter/ww8/docxexportfilter.cxx
sw/source/filter/ww8/rtfexport.cxx
sw/source/filter/ww8/rtfexport.hxx
sw/source/filter/ww8/rtfexportfilter.cxx
sw/source/filter/ww8/wrtww8.cxx
sw/source/filter/ww8/wrtww8.hxx