Bug 115001 - Recreating ToC in ODT with tables produces unwanted breaks in text flow (Comment 10)
Summary: Recreating ToC in ODT with tables produces unwanted breaks in text flow (Comm...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: TableofContents-Indexes Writer-Page-Break
  Show dependency treegraph
 
Reported: 2018-01-14 12:43 UTC by edwin.gersbach
Modified: 2021-01-28 07:28 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
ZIP container containing one document with lot of (reduced) pictures the doc refers to (1006.83 KB, application/x-zip-compressed)
2018-01-14 12:43 UTC, edwin.gersbach
Details
Schreen captures showing the problen (175.59 KB, application/x-zip-compressed)
2018-02-15 12:50 UTC, edwin.gersbach
Details
New document created from scratch (556.29 KB, application/x-zip-compressed)
2018-02-15 12:51 UTC, edwin.gersbach
Details
A much smaller reproducer (147.68 KB, application/vnd.oasis.opendocument.text)
2018-02-16 10:08 UTC, edwin.gersbach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description edwin.gersbach 2018-01-14 12:43:53 UTC
Created attachment 139089 [details]
ZIP container containing one document with lot of (reduced) pictures the doc refers to

This problem exists for several years already, but as the underlying project has been set aside for a long time, the was no priority. Now I would like to continue the work, but since the latest additions to the document  I can no longer create an error free document. Before a valid document could be made with some luck and several tries. The problen had been reported before in a forum, but due to the lack of a reproducer it was probably never officially reported.

Now I have been able to create a reproducer in a reasonable size.

Currently I use Version 5.3.7.2 on Windows 10 Version 1709 (Build 16299.192).
The System is a Acer Laptop with a I7-5500U CPU and 16GB Memory, 250GB SSD System disk.
The problem also occurred on a HP Laptop with an upgraded Windows 10 (from W7).

The document is a discography with several hundred items (Vinyl, CD, DVD, Book), a lot of tables, a TOC and an extensive Index. The problem is, that after recreating the TOC there are unwanted  page breaks in the document. These breaks occur in the middle of a page and the text flow continues one or more pages later, sometimes at the beginning of the page, sometimes at the same place where the break occurs.

Often it is enough to place the cursor at the end of the line before the unwanted break and hit the right arrow button, but sometimes a new paragraph has to be made by hitting the 'return' key followed by an undo operation. If the break occurs between two tables, a line has to be inserted in the table after the break, again followed by an undo operation.

However, the problem just moves a few pages further down. The whole document has to be checked and fixed, including the index pages. Then the document is o.k. but the TOC is now wrong. Refreshing it, the problem occurs again. In the current reproducer the problem usually begins on page 193.

I tried once to split the document into a global- and sub-documents, but the problem remains. Even worse, the breaks occur in the sub-documents – but only when opened in the global document – and can therefore not fixed as described above. Opening the sub-document by itself does not show the problem.

The list below shows the main chapters and the page numbers as they should be. 

Preface 9
Decca/Apollo recordings	14
Columbia and later recordings 18
Radio Shows 30
Interviews and similar recordings 33
Singles 34
EP's 43
LP's 73
Soundtrack and Sampler LP’s 143
CD's 151
Soundtrack and Sampler CD’s 259
MC's 342
Videos and DVD’s 347
Books 364
Alphabetical recording list 373
Componists, Authors and Arrangements 385
Alphabetical personnel list 392
Index 393
Last Index-page	434
Last page of document (empty) 435

In order to create a reproducer of a reasonable size, all pictures have been reduced to a width of 8 pixels.
Comment 1 Jean-Baptiste Faure 2018-01-20 17:53:01 UTC
Your document is an ODF document created by converting an old MS-Word document. You can see MS-Word numbering styles like WW8Num1. It uses several sections and the columns are defined in the sections instead of in the page style. I guess you could have more robust document if you did a true ODF document. Sections are probably useless and columns can be defined in the page style.

Best regards. JBF
Comment 2 edwin.gersbach 2018-01-22 19:54:40 UTC
Many thanks for your reply.

I didn't realize that there are still leftovers from MS-Word which is some 20 years ago. In between the document was even processed with OpenOffice.

Well then, I created a new document from scratch and start defining all the styles of the Pages, Paragraphs, Titles and the like.

What I would like to know is what I can copy/paste from the existing document without possibly taking unwanted MS-Word stuff with it.

Mainly

> recreating all the tables from scratch would would be extremely time consuming
  - can I copy them at least one by one?

> recreating the item list with all the cross references would be even worse
  - do I have to copy the plain text and reformat everything?

> also, what I did not manage so far is to create a 2 column page with a
  chapter title on the top spanning over both columns
  I keep trying to find a solution for this but would greatly appreciate a hint.

regards Edwin
Comment 3 Jean-Baptiste Faure 2018-01-29 08:43:29 UTC
(In reply to edwin.gersbach from comment #2)
> Many thanks for your reply.
> 
> I didn't realize that there are still leftovers from MS-Word which is some
> 20 years ago. In between the document was even processed with OpenOffice.
> 
> Well then, I created a new document from scratch and start defining all the
> styles of the Pages, Paragraphs, Titles and the like.
> 
> What I would like to know is what I can copy/paste from the existing
> document without possibly taking unwanted MS-Word stuff with it.

I do not know exactly. What I do in such situation is to delete each WW style.
You should ask for help on the users mailing-list or on AskLibo.

Best regards. JBF
Comment 4 Timur 2018-01-29 11:13:35 UTC
Please see if there's already a bug for what you report, like Bug 114773.
If not, attach a single minimal document with repro steps. 
Otherwise, this is Invalid issue. 
Nobody will read a description and guess what the issue is in 436 pages document.
Comment 5 edwin.gersbach 2018-01-29 16:44:09 UTC
To reproduce the problem:
- Extract the supplied ZIP file.
- open the document $MJD_20170127.odt
- recreate the TOC
- go to page 191 (scroll to the page or click a TOC entry)
- on one of the following pages - most probably 193 - you will notice a unwanted page break (one or two columns remain completly empty)
- place the cursor to the end of the last paragraph before the unwanted break
- hit <RETURN> and than click on the [undo] button
- the unwanted break has vanished
Comment 6 Dieter 2018-02-14 14:26:05 UTC
I tried to reproduce it with the described steps, but I can't see empty columns.
Comment 7 edwin.gersbach 2018-02-15 12:50:08 UTC
Created attachment 139924 [details]
Schreen captures showing the problen
Comment 8 edwin.gersbach 2018-02-15 12:51:19 UTC
Created attachment 139925 [details]
New document created from scratch
Comment 9 edwin.gersbach 2018-02-15 13:27:34 UTC
I have just uploaded two more files. The first zip contains screen captures of the problem:

MJ-1-Bad.JPG  Show the first occurrence of the problem (as it occurs on my system)
MJ-1-Good.JPG Shows the above after correcting the problem
MJ-2-Bad.JPG  Show a later occurrence of the problem
MJ-3-Good.JPG Shows the above after correcting the problem
MJ-3-Bad.JPG  Shows the problem as it occurs in the new document (see below)

For the first document I forgot to mention that when you see the first occurrence of the problem and fix it as explained in comment 5, the problem is not gone but only moved several pages down. You have to check the document up to the very end and fix each occurrence. But then the TOC does not reflect the changes and would have to be updated causing the problem to reappear.

The second zip contains a new version of the document which I created from scratch. Rather than using sections to create columns, pages styles are used. The problem now occurs much later in the document, in the chapter “Alphabetical recording list” which consists of several dozen small tables. MJ-3-Bad.JPG shows the problem. Interestingly, moving the mouse pointer one or more times over the page boundary fixes the problem at this point, but as mentioned above it occurs again a few pages further down. And again the TOC is wrong after correcting everything and would have to be refreshed.
Comment 10 edwin.gersbach 2018-02-16 10:08:13 UTC
Created attachment 139937 [details]
A much smaller reproducer

A new reproducer which consists of only 48 pages:

Open the document and you will probably see in the TOC that the last chapter shall start on page 49 altough the doc has only 48 pages. Update the TOC and the doc now hat 49 pages. Update the TOC again and the TOC will grow to 50 pages. It grows by one page for each update.

The empty pages are inserted in the chapter “Alphabetical recording list” starting at page 29 at different places. Scroll through the pages but keep the mouse pointer outside the page area (you may move the vertical scrollbar). Moving the mouse pointer around within the page area cases some document contents to move up so that the empty space appears further down.
Comment 11 edwin.gersbach 2018-02-16 10:17:21 UTC
I found this new reproducer when I tried to work around the problem by creating two separate documents. I thought that two smaller parts would be o.k. because the problem first occurred when the document reached a certain size. So I removed all the chapter with media, leaving only the comments and tables. Then I noticed that the problem is still there. It is more obvious and easier to reproduce (hopefully).
Comment 12 Dieter 2018-02-16 13:07:26 UTC
> Update the TOC and the doc now hat 49 pages. Update the TOC again and the TOC will grow to 50 pages. It grows by one page for each update.
> 

I can reproduce it with

Version: 5.4.4.2 (x64)
Build-ID: 2524958677847fb3bb44820e40380acbe820f960
CPU-Threads: 4; BS: Windows 6.19; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: group
Comment 13 QA Administrators 2019-02-17 03:44:20 UTC Comment hidden (obsolete)
Comment 14 Dieter 2019-02-17 09:53:47 UTC
Behaviour has changed a little

1. Open attachment from comment 10
2. Update TOC

Result:
Document adds one page with each update until it has 53 pages. Only chapter "Alphabetical recording list" grows up.

Tested with

Version: 6.1.5.2 (x64)
Build-ID: 90f8dcf33c87b3705e78202e3df5142b201bd805
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: group threaded

and

Version: 6.3.0.0.alpha0+ (x64)
Build ID: f42554a1886ebe49170c25096dc3281b2c7bb1f4
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-02-08_22:37:30
Locale: en-US (de_DE); UI-Language: en-US
Calc: threaded
Comment 15 edwin.gersbach 2019-02-18 11:05:35 UTC
I'm still on

Version: 6.0.7.3 (x64)
Build-ID: dc89aa7a9eabfd848af146d5086077aeed2ae4a5
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; 
Gebietsschema: de-CH (de_CH); Calc: group

and there it also grows up to 53 pages only.
I never tested whether the document would stop growing after a number of updates.
So I also did this with the first (large) reproducer. There the document grows like this:
439/349/442/445/448/447/447... Pages.
Comment 16 Timur 2019-02-18 12:45:42 UTC
Many tables do not reflow well. Some old maybe direct formatting. 
I'm afraid there's no simple solution here. See bug 35449 and bug 86909.
Comment 17 Dieter 2021-01-28 07:28:34 UTC
Couldn't reproduce with

Version: 7.0.4.2 (x64)
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

and steps from comment 14.
=> RESOLVED WORKSFORME

Edwin, feel free to change it back to NEW, if you still have a problem in actual version of LO.