summaryrefslogtreecommitdiff
path: root/xmlhelp/source/treeview/tvread.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-09-26 15:28:20 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-09-27 09:22:31 +0200
commitd630f69d90f15bc652a62648b05ea515de78d16a (patch)
tree8283f5dfcb86bc9c907f561c66724c12c03bd80a /xmlhelp/source/treeview/tvread.cxx
parentb38a9a3e59df0b6c014b907bbe2b42e4ce7ed255 (diff)
Related: tdf#124601 DOC import: improve fLayoutInCell handling
There were 3 problems here: First, SwWW8ImplReader::IsObjectLayoutInTableCell() should not use m_nProduct to determine the Word version. It depends on an undocumented field of the [MS-DOC] format and the bugdoc shows how it interprets a Word 2007-produced document as a Word 97 one. Instead, parse the cswNew field of the file header, which is a more or less documented way to find out if this file was produced by >=2000 or 97. See e.g. <https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-doc/841b5f72-487e-4fe7-8657-ec90d5af8750> where the Dop structure maps cswNew values to Word versions. Second, parse the fLayoutInCell correctly: it's part of a bitfield, with two variables: a bool and an other one which decides if the bool should be read at all. The bugdoc's case was evaluated as false, so do the proper parsing in that case and leave the existing logic as-is for now. Third, there doesn't seem to be a reason to exclude the wrap-through case for the fLayoutInCell -> follows-text-flow mapping. The bugdoc shows that Word interprects fLayoutInCell the same way for wrap-though objects, too. Change-Id: Iaddd5e522e0380b731899f32a17c14ce4442ac35 Reviewed-on: https://gerrit.libreoffice.org/79629 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'xmlhelp/source/treeview/tvread.cxx')
0 files changed, 0 insertions, 0 deletions