Bug 69861 - Page wrapping and pagination problem
Summary: Page wrapping and pagination problem
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.1.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2013-09-26 21:10 UTC by Michael Bauer
Modified: 2019-11-11 14:51 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample odt exhibiting the problem (343.35 KB, application/vnd.oasis.opendocument.text)
2013-09-26 21:10 UTC, Michael Bauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Bauer 2013-09-26 21:10:53 UTC
Created attachment 86696 [details]
Sample odt exhibiting the problem

I'm helping a (potential) new localizer with this issue, neither of us have much experience in filing non-l10n bugs so apologies if we miss out something. Larry's problem description follows:

I've attached a sample file to be used for tracking down the formatting problem I've hit when opening some existing .ODT  files in LO 4.1.1.2.  The file is 43 pages long. It functions normally in AOO 4.0
 
When I open the file in LO, the status line initially indicates it's 60+ pages long.  After about one minute it changes to 43 pages and displays correctly.  However, if I attempt to add any text in the first part of the document, some text further along in the document page-wraps unnecessarily, and the status line updates, reflecting the fact that the document now takes up more pages.
 
The problem seems to have to do with some of the text boxes and frames with graphics in them, which are attached to paragraphs so they will always stay with the associated text when editing makes the document either longer or shorter.

How to reproduce:

1- Go to p.3 of the document and insert 6 or 7 blank lines in between one of the paragraphs, until the text box near the bottom of the page wraps to the following page.  You'll see it superimposes over the graphics frame on p.4 (which is not in itself a problem, as they can be repositioned manually).  However, the graphics frame gets squashed down and the drawing disappears.  Simultaneously, the document gets longer due to the aforementioned, unnecessary page wraps.

2- Now go back to p.3 and delete the inserted blank lines.  The text and text box wrap back onto p.3 where they originally were, BUT the graphics frame remains deformed and the drawing is still gone, even if you manually resize the frame to make it big enough to accommodate the drawing.

ALSO, the unnecessary page wraps further along in the document remain, and can only be corrected manually as follows:  The only way I find to get the text to wrap properly again is to select and "cut" the first box or frame on the page following the incorrect wrap.  As soon as that box or frame is cut out, the text wraps properly.  Then the box or frame can be "pasted" back in place and does not again force the unnecessary wrap.  One can work through the rest of the document in that way, cutting and pasting the offending frames.  But that is very cumbersome and should not be necessary!
 
NOTE:  If I open the document in AOO and go through the same procedure the text & text box wrap from p.3 to p.4 and the text box may overlap the graphics frame but it does not distort it nor does the drawing disappear.  Also, there is no unnecessary page wrap further on; the status line continues to indicate the document is 43 pages long.  AND if I go back to p.3 and delete the inserted lines, the text and text box wrap back onto that page and the document is the same as it was when first opened.
Comment 1 retired 2013-09-27 07:56:57 UTC
Hi Michael, thanks for the report.

For me on OS X 10.8.5 and LO 4.1.2.2 this opens fine with 43 pages.

Same with Version: 4.2.0.0.alpha0+
Build ID: f4d3954fc6106b3ae0ee16ab0fcde15d8cb945e3

Which OS are you on? Could you try the latest LO release pre-release: http://www.libreoffice.org/download/pre-releases/
Comment 2 Michael Bauer 2013-09-28 16:05:21 UTC
He says he's on XP SP3.

I'm on Win 7 and I don't get the pagination issue but I CAN replicate the layout problem when graphics get pushed onto another page.
Comment 3 Regina Henschel 2013-12-07 17:32:36 UTC
When opening in LO 4.1, I notice, that in Tools > Options > Writer > Compatibility the first option, "use printer metrics" is checked, but it is not checked in the original file. Please uncheck it and recalculate pagination. Has it the correct number of pages then?
Comment 4 Regina Henschel 2013-12-09 21:41:30 UTC
Please look, whether the option "Load user-specific settings with the document" is checked in Tools > Options > Load/Save > General. Otherwise default values are used.
Comment 5 Michael Bauer 2013-12-18 13:44:34 UTC
Larry reports:

when I open the document the box for "Compatibility" is NOT CHECKED.
  Just out of curiosity I checked the box.  That did indeed CAUSE the SAME TYPE OF PROBLEM, even WITHOUT my making any changes to the document itself.  So she could have been onto something, but my bug is apparently different.

I then downloaded the currently offered version of LO (4.1.3.2) and re-tested the files I'd had trouble with.  Same issues (the above, plus the loss of color assigned in paragraph styles in OOo files saved in RTF format - the other bug you reported for me), so I guess I'll keep waiting before committing to LO.
Comment 6 QA Administrators 2014-07-08 17:28:57 UTC Comment hidden (obsolete)
Comment 7 Michael Bauer 2014-07-15 11:47:38 UTC
I've asked Larry (the guy who's having the problem), he responds:

Regarding the bug I reported -- yes, the box "Load user-specific settings with the document" IS checked.

In re-checking, it now appears that both LibreOffice and AOO in their most recent versions, are having problems with those existing files. When they first open one of them it comes up fine.  But as soon as I ask for a print preview, they re-paginate and for some reason less fits on a page so the document comes out longer (and graphics tied to paragraphs may not fit on the same page, leaving blank areas.

I'm wondering if this is somehow related to a problem I've observed previously with AOO but not submitted as a bug report:  When I copy paragraph styles from an existing document to a new one for consistency, most often some attribute is changed.  For instance, the font specified in all the copied styles comes up italicized or bold; or the spacing is changed.  I've not been able to figure out why, so have just manually adjusted them back to what they originally were.
Comment 8 Buovjaga 2014-11-26 09:02:06 UTC
There is something funny in the pagination. It opens up saying it's 43 pages. When scrolled to the bottom, the last page is 41 and the page count updates accordingly. Scrolled back up and then down again, now it's 40. Repeated rescrolling doesn't affect it.

Regarding steps 1 & 2, there is no drawing on page 4, but page 3 and 5. Inserting & deleting those 6 blank lines does not do anything bad.

Setting to UNCONFIRMED.

Win 7 64-bit Version: 4.5.0.0.alpha0+
Build ID: b144f0ac8695dd62a2053b4e88212d0b109c9a41
TinderBox: Win-x86@51-TDF, Branch:MASTER, Time: 2014-11-25_00:14:54
Comment 9 ribotb 2015-07-20 11:13:21 UTC
Hi,

On Win7/x86 with LO 4.4.5.1 :

With  the option "use printer metrics" in Tools > Options > Writer > Compatibility checked  :
- number of pages in status bar : 43
- after about 30 sec it changes to 38 pages
- pages numbering : 1 to 43, then 1 to 38

If I check the option "Load user-specific settings with the document" in Tools > Options > Load/Save > General : 
- number of pages in status bar : 43
- after about 30 sec it changes to 40 pages
- pages numbering : 1 to 40

"Funny" isn't it?

Bernard
Comment 10 Gordo 2015-07-26 20:30:24 UTC
The document requires Aboriginal Sans and Serif family fonts, so I installed them.  There are 43 pages when the document is first opened.  After a few seconds this jumps to 49.  I can get 50 pages by scrolling immediately after opening.

Something that I noticed is that there is direct formatting applied to some paragraphs of tab stops that exceed the page width.  In some instances there are captions in the frames that have tab stops that exceed the width of the frame.  There are some frames that are anchored to paragraphs that have tab stops that exceed the page margin.  It probably does not mean anything because there are no tabs used in the document.

If I select all and clear direct formatting and save and reload then there are 49 pages.  After a few seconds this drops down to 40.  Unfortunately, there is another bug to do with clear direct formatting:  after doing it the pages styles change to Default after save and reload.

After changing the pages back to the original style and saving and reloading there are 40 pages but this jumps to 43.  Scrolling after loading gets 41 and then it jumps to 45.

So I guess the tab stops have nothing to do with it.

There are four frames that are anchored to the previous page because of text flow.  The page styles alternate.  There are also frames anchored to lists.

Windows Vista 64
Version: 4.4.4.3
Build ID: 2c39ebcf046445232b798108aa8a7e7d89552ea8

Version: 5.1.0.0.alpha1+
Build ID: 8cfdd81b70ef37927b40497ffd10034f28335034
TinderBox: Win-x86@39, Branch:master, Time: 2015-07-24_02:47:18
Comment 11 Gordo 2015-07-27 14:42:32 UTC
"Text Body" paragraph style has widow control on.  I turned it off and saved and reloaded and there are 49 pages steady, rock solid.  Some of the frames are anchored to these paragraphs so it must be something to do with frame wrapping and widow control getting in a kerfuffle.

Windows Vista 64
Version: 4.4.4.3
Build ID: 2c39ebcf046445232b798108aa8a7e7d89552ea8
Comment 12 Jean-Baptiste Faure 2016-01-23 20:58:05 UTC
LibreOffice 5.1.1.0.0+ opens the file, it find 43 pages and this number does not change.

Best regards. JBF
Comment 13 Buovjaga 2016-01-24 16:20:56 UTC
(In reply to Jean-Baptiste Faure from comment #12)
> LibreOffice 5.1.1.0.0+ opens the file, it find 43 pages and this number does
> not change.
> 
> Best regards. JBF

I installed the Aboriginal fonts from http://www.languagegeek.com/font/fontdownload.html

After opening, the page number is briefly 43. Then it changes to 49. Scrolling to the bottom does not change the number.

Win 7 Pro 64-bit Version: 5.2.0.0.alpha0+
Build ID: 6b65a0e83c4798f117be61af91dbaebdc85e94b7
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-01-21_03:41:08
Locale: fi-FI (fi_FI)
Comment 14 tommy27 2016-12-21 17:27:40 UTC
tested with LibO 5.2.3.3 on Win7x64
Aboriginal Sans font is installed.

the document loads and is composed of 38 pages.
scrolling down and up doesn't change the page number.

I tried adding 6-7 blank lines at page 3 as in the original description but I don't see any issue.
Comment 15 tommy27 2016-12-21 18:59:53 UTC
sorry... my previous post was not completely accurate.

just retested with LibO 5.2.3.3 and 5.4.0.0.alpha0+
Build ID: 9cfb2f2f03b5ec086487fd483298466db0b09010
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-12-20_23:58:02
Locale: it-IT (it_IT); Calc: group

both versions shows a transient "1 of 43" page count when you load the file, then the page count becames inconstant sometimes it is shown as "1 of 36" or "1 or 37" or even "1 of 38"

I confirm scrolling up & down has no effect on the page number.

I retested insertion of blank lines in page 3, specifically after the second line ending with "... Dioat cadug."

this time adding 4 blank lines made the page count jump to 41, this doesn't revert to the original value after deleting those blank lines.

so finally, I can tell that this bug is NEW
Comment 16 QA Administrators 2017-12-22 03:35:47 UTC Comment hidden (obsolete)
Comment 17 Timur 2019-11-11 14:51:27 UTC
Works fine with LO 6.4+, probably a duplicate of some resolved repagination or frame issue.