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 normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-Tables
  Show dependency treegraph
 
Reported: 2016-03-03 22:03 UTC by synthview
Modified: 2022-11-26 03:42 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:


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
This is a duplicate of bug 91083. It was reported here that this is a problem in 5.1, and indeed that fix went only to 5.2; I'll look at backporting the fix to 5.1.

*** This bug has been marked as a duplicate of bug 91083 ***
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
Dear synthview,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug