diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-07-08 17:32:49 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-07-11 19:04:35 +0200 |
commit | d952a53e65e1ec7a7be3b99fd8895b8e199569c2 (patch) | |
tree | 3358d48ff331c6cab3e30569105ec086623688f6 /configure.ac | |
parent | d81c4bd0862a00be0d509571c35d30c935d0356e (diff) |
tdf#149649 sw_fieldmarkhide: delete any fieldmarks overlapping cells
The DOCX bugdoc has a field that starts in the first cell of a table, but
ends outside the table.
[ 28] 0x3690e10 TableNode ,
[ 29] 0x78d6f80 StartNode ,
[ 30] 0x6cfb408 TextNode "\a FORMTEXT \003Data File",
[ 31] 0x6bf9620 EndNode ,
[ 631] 0x779c768 TextNode "",
[ 632] 0x69bd5f8 TextNode "\b",
[ 633] 0x656f150 EndNode },
This triggers an assert in layout:
soffice.bin: sw/source/core/layout/frmtool.cxx:1971: void InsertCnt_(SwLayoutFrame*, SwDoc*, SwNodeOffset, bool, SwNodeOffset, SwFrame*, sw::FrameMode): Assertion `!pLayout->HasMergedParas() || pNd->GetRedlineMergeFlag() != SwNode::Merge::Hidden' failed.
This bad documnet model is created from writerfilter in a call to
SwXText::convertToTable(), so add some preventive code there.
The end of the field is erroneously also at the end of the body instead
of a few paragraphs below the 1st table, because in PopFieldContext() the
xTextAppend->createTextCursorByRange(pContext->GetStartRange()) throws,
due to the bad document model.
It turns out that Word can actually load this document, but the
behaviour is rather funny and would be difficult to replicate...
Change-Id: I20b9293db8888511bc0066c775d54fc59fcaa349
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136906
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 436ae10ec546391ce21875c69b0ec4bb3a06fa1f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136921
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'configure.ac')
0 files changed, 0 insertions, 0 deletions