Bug Hunting Session
Bug 84084 - FILEOPEN: DOC containing multi-page table with paragraph text setting "Keep with next paragraph" is pushed to next page
Summary: FILEOPEN: DOC containing multi-page table with paragraph text setting "Keep w...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-19 08:39 UTC by Ivan
Modified: 2015-04-20 10:30 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
wrong file (260.00 KB, application/msword)
2014-09-19 08:39 UTC, Ivan
Details
norm (36.94 KB, image/jpeg)
2014-09-19 08:40 UTC, Ivan
Details
ODT basic direct formatting example (19.26 KB, application/vnd.oasis.opendocument.text)
2014-09-28 14:45 UTC, Owen Genat (retired)
Details
ODT basic paragraph style example (21.68 KB, application/vnd.oasis.opendocument.text)
2014-09-28 14:46 UTC, Owen Genat (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan 2014-09-19 08:39:36 UTC
Created attachment 106539 [details]
wrong file

hi2all

The gap between the text and the table

In an attachment (norm.jpg) correctly being displayed file.
The picture shows as the file looks in MS 2007.
Comment 1 Ivan 2014-09-19 08:40:10 UTC
Created attachment 106540 [details]
norm
Comment 2 Owen Genat (retired) 2014-09-28 14:42:26 UTC
Opening the DOC under GNU/Linux using:

- v3.3.4.1 OOO330m19 Build: 401
- v3.4.6.2 OOO340m1 Build: 602
- v3.5.7.2 Build ID: 3215f89-f603614-ab984f2-7348103-1225a5b
- v3.6.7.2 Build ID: e183d5b
- v4.0.6.2 Build ID: 2e2573268451a50806fcd60ae2d9fe01dd0ce24
- v4.1.6.2 Build ID: 40ff705089295be5be0aae9b15123f687c05b0a
- v4.2.6.3 Build ID: 3fd416d4c6db7d3204c17ce57a1d70f6e531ee21
- v4.3.2.2 Build ID: edfb5295ba211bd31ad47d0bad0118690f76407d
- v4.4.0.0.alpha0+ Build ID: df73f4115cfe4d07e4159adf087571687eb173ec TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-09-25_23:06:16

All versions render the document in the same manner i.e., with the table commencing on page two. This appears to be an artefact of having the "Keep with next paragraph" setting selected for the paragraph text (either via direct formatting or the paragraph style) and then saving to DOC. 

An ODT is rendered with the table immediately following the leading text (table setting overriding paragraph setting) cf. bug 34957, which describes the same setting, for the table. In DOC the table is pushed to the next page (paragraph text setting overriding table setting). This behaviour (for both ODT/DOC) is consistent across all the versions indicated. Requires a developer to determine whether current DOC handling method is in-keeping with the DOC specification.

Workaround: Remove "Keep with next paragraph" setting from the paragraph text in the table.

Summary amended for clarity. Version set to 3.3.4. Platform set to All/All.
Comment 3 Owen Genat (retired) 2014-09-28 14:43:57 UTC
Status set to NEW, due to MSO2007 rendering (comment 1).
Comment 4 Owen Genat (retired) 2014-09-28 14:45:32 UTC
Created attachment 107007 [details]
ODT basic direct formatting example

Save the attached as DOC to replicate the problem.
Comment 5 Owen Genat (retired) 2014-09-28 14:46:10 UTC
Created attachment 107008 [details]
ODT basic paragraph style example

Save the attached as DOC to replicate the problem.
Comment 6 Justin L 2015-04-18 12:19:06 UTC
The complex problem document from the OP as pictured in Comment #1 has been visibly fixed in the Dev version of 5.0 by this commit:

>Caolán McNamara <caolanm@redhat.com> 2015-04-07 20:09:05 (GMT)
>commit b7fff04ad728369a09a5e1a5cfbe494cf388317b
>Resolves: tdf#90504 0x7 chars in .doc are not always cell/row ends 

However, the addtional tests from Owen Genat are still showing the problem.  After saving as a .doc file, and re-opening, the table still begins on page 2.
Comment 7 Justin L 2015-04-20 10:30:08 UTC
MS Word 2003 and 2013 open the .doc and .docx files exported by LibreOffice IN THE SAME WAY that LibreOffice is opening them.  I tested with the documents in comment #4 and comment #5, using LO 5.0 dev to export to .doc and .docx. In all cases (LO or MSWord with .doc or .docx), the table starts on page 2.  So with the example problem documents provided so far, the issue seems to be fixed.

Marking as "works for me".  The issue of a table that is larger than one page being laid out wrong (similar to what is described in this bug, which also affects .ODT) is documented in bug 34957.