Bug 98396 - table properties > disabling table split: emulation not working in .doc and .docx format
Summary: table properties > disabling table split: emulation not working in .doc and ....
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-Limitations DOCX-Tables
  Show dependency treegraph
 
Reported: 2016-03-03 22:03 UTC by synthview
Modified: 2023-05-17 15:55 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Test ODT with table that extends beyond a single page (8.76 KB, application/vnd.oasis.opendocument.text)
2016-03-06 07:36 UTC, Robinson Tryon (qubit)
Details
save this odt as .doc to see the "keep table" is lost (21.94 KB, application/vnd.oasis.opendocument.text)
2016-03-06 17:33 UTC, synthview
Details
docx file with a table split over pages. (58.70 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-05-17 00:11 UTC, Tim Chambers
Details
Another affected file (6.22 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-08-04 12:33 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the document after saving in LO 5.1.4 (135.67 KB, image/png)
2016-08-04 12:34 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the document after reopening in LO 5.1.4 (148.34 KB, image/png)
2016-08-04 12:34 UTC, Gabor Kelemen (allotropia)
Details
tdf98396_emulateNoSplitTable.odt: simple example as a unit test. (13.03 KB, application/vnd.oasis.opendocument.text)
2020-05-05 13:22 UTC, Justin L
Details
tdf98396_proof_of_concept.patch: export table-nosplit to rows for DOC/DOCX/RTF (4.41 KB, patch)
2020-05-05 13:33 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description synthview 2016-03-03 22:03:42 UTC
Disabling “Allow Table to split across pages and columns” works, but the parameter isn’t saved. Each time I reopen my file this option is enabled again :(
Comment 1 Robinson Tryon (qubit) 2016-03-06 07:36:35 UTC
Created attachment 123333 [details]
Test ODT with table that extends beyond a single page
Comment 2 Robinson Tryon (qubit) 2016-03-06 07:42:37 UTC
TESTING on Ubuntu 14.04 64bit +
LO 5.2.0.0.alpha0+ (2016-02-24_23:58:47)

(In reply to synthview from comment #0)
> Disabling “Allow Table to split across pages and columns” works, but the
> parameter isn’t saved. Each time I reopen my file this option is enabled
> again :(

Hi,
To make repro faster for us in the future, please attach an example doc and provide a quick list of repro steps that we can walk through like a recipe. Thanks!

Here's my best guess
1) Open attachment 123333 [details]
2) Check to see that the “Allow Table to split across pages and columns” option is set:
Tools -> Options -> LibreOffice Writer -> Table -> New Table Defaults -> Do not split
3) Change the status of this option (e.g. if it's on, turn it off, and vice-versa)
4) Save the file and re-open

RESULT: Seems to work fine for me, so perhaps there's more detail needed to repro the bug?

Status -> NEEDINFO
Comment 3 synthview 2016-03-06 17:25:01 UTC
Saving as odt keeps the option. But not when saving as .doc
Comment 4 synthview 2016-03-06 17:33:10 UTC
Created attachment 123350 [details]
save this odt as .doc to see the "keep table" is lost

Here attached a test case. As you save as .doc, colse and reopen the file, the Keep table toghether option is gone.
Comment 5 Tim Chambers 2016-05-17 00:11:04 UTC
Created attachment 125107 [details]
docx file with a table split over pages.

Disabling the "Allow table to split across pages and columns" option is not retained if the file is saved and reopened
Comment 6 Gabor Kelemen (allotropia) 2016-08-04 12:33:49 UTC
Created attachment 126570 [details]
Another affected file

I created this file with LO 5.1.4. Unset the "Allow table to split across pages and column" option on Table format -> Text Flow dialog, saved, and after opening the option is set again.
Comment 7 Gabor Kelemen (allotropia) 2016-08-04 12:34:32 UTC
Created attachment 126571 [details]
Screenshot of the document after saving in LO 5.1.4
Comment 8 Gabor Kelemen (allotropia) 2016-08-04 12:34:53 UTC
Created attachment 126572 [details]
Screenshot of the document after reopening in LO 5.1.4
Comment 9 Miklos Vajna 2016-08-04 21:57:14 UTC Comment hidden (obsolete)
Comment 10 Justin L 2016-08-05 18:26:35 UTC
The two patches needed for this fix haven't been proven in the real world, so don't backport to the stable branch.
Comment 11 Justin L 2020-05-04 18:30:48 UTC Comment hidden (obsolete)
Comment 12 Justin L 2020-05-05 13:19:25 UTC
wrtww8nds.cxx
// #i76520# Emulate non-splitting tables
 // bKeep: set keep at first paragraphs in all lines
 // bDontSplit : set keep at first paragraphs in all lines except from last line
 // but only for non-complex tables

This is actually NOT considered a complex table, so emulation IS occuring.
The keep-with-next table property emulation seems to be working for DOC/DOCX in both Word 2003 and LO.

DontSplit emulation is not working in either LO or Word 2003. I expect that this emulation needs to be combined with a "do not split this row" property which is not being exported.


(In reply to Justin L from comment #11)
> For some reason, export is not marking all the rows/paragraphs
> as keep with next.

Since this is a two row table attempting to DontSplit, only the first row's paragraph should be marked as "keep-with-next". And it is.

The problem with this little trick is that (Word 2003 at least) refuses to split a row even if it is larger than a page. So this emulation might have disastrous results on certain documents if implemented.
Comment 13 Justin L 2020-05-05 13:22:04 UTC
Created attachment 160377 [details]
tdf98396_emulateNoSplitTable.odt: simple example as a unit test.
Comment 14 Justin L 2020-05-05 13:33:27 UTC
Created attachment 160379 [details]
tdf98396_proof_of_concept.patch: export table-nosplit to rows for DOC/DOCX/RTF

This patch works for DOC and DOCX.
It also works for RTF with the caveat that LO does not read keep-with-next properties in RTF apparently. It works for Word 2003.

But as I noted earlier, forcing a row not to split can have bad consequences IN MSWORD, so probably it is better not to emulate that in order to avoid a bad side-effect, because it is extremely hard to tell at export time whether a row is larger than a page or not.
Comment 15 Justin L 2020-07-25 12:40:39 UTC
(In reply to Justin L from comment #10)
> The two patches needed for this fix haven't been proven in the real world,
> so don't backport to the stable branch.

So, at least one of those patches has been reverted in 7.0-ish, so I guess that is why I re-opened this bug report.
Comment 16 QA Administrators 2022-11-26 03:42:17 UTC Comment hidden (spam)