Apache OpenOffice (AOO) Bugzilla – Issue 105447
Word processing layout is inconsistent
Last modified: 2017-05-20 11:17:47 UTC
I've worked for several years on this book. The problem is that the number of pages changes without me doing anything. Rather than attaching my ODT to this, I'm linking to it here. http://keithcu.com/BookOO/SoftwareWars.odt OO Writer has worked very well other than this bug. Please let me know if you have any questions. Thanks very much for looking into this.
As per the comments from OD at the bottom of http://www.openoffice.org/issues/show_bug.cgi?id=105447 I have created this new bug to track the issue I have found. Furthermore, I'll just add that I'm sure it is an OO bug, and the problem is not caused by the fact that I created impossible / conflicting formatting.
Oops, I'm sorry. OD's comments are at the bottom of: http://www.openoffice.org/issues/show_bug.cgi?id=71028
I did not meant that You have created an impossible or conflicting layout with certain formatting properties. But, the one or the other valid combination of formatting properties stresses the layout algorithm more and causes layout loops or inconsistent layouts. Sometimes it is possible to find other similar formatting properties which achieve the same layout, but does not cause the layout algorithm to loop or to produce inconsistent layouts. These formatting properties can then be used as a temporary workaround until the defect is fixed.
Cannot reproduce the variable page number. Please describe exactly what happens and what you do.
I reproduced the change of page numbers under Windows using DEV300m59 when scrolling through the document. After opening the document it shows 299 pages. Then page count went up to 317. I also see several empty pages. These seems to be caused by an incorrect handling of paragraphs at which a graphic is anchored and which have property "Do not split paragraph" set.
I unset property "Do not split paragraph" at the offending paragraphs and the layout becomes stable at a page count of 304. If the paragraph is splitted afterwards, You can use the widows and orphans properties to achieve the same as property "Do not split paragraph". This can be used as a workaround until the layout algorithm is fixed.
OD, I knew you weren't suggesting that my document had screwed up formatting. I just wanted to put that information into the bug report for anyone else who might read it. Glad to know you can repro the problem. (ES: opening the document and then doing a repagination often causes the number of pages to change. It isn't so easy to repro because sometimes it does things right, sometimes it does things wrong.) Thanks for your hint. I did some investigation because and noticed that the caption style has a "do not split paragraph" set. I can turn that property off. But I do think there must be a bug that is causing multiple empty pages to be created because there should be plenty of space even given that constraint. The paragraphs with that property set are just a few lines long and so it is not creating a difficult situation. I format the pictures to have enough space even with the constraints I create, and so there is no at all reason for multiple empty pages.
OD, I unset that property on the caption style, and things seem to work better now. I will consider enabling widow/orphan control. That is a perfectly fine workaround for me. But I did waste many hours on this bug nudging the formatting to make the empty pages go away, so I do think this bug should be looked into. Thanks.
I've done some more testing, and even when I turned off "do not split paragraph" property on the caption style I still see multiple empty pages. Search for "smirking face" and see if you can't get multiple empty pages above the picture.
@OD: do you see this as bug, feature, invalid/wontfix ?
This is a defect - I will take of it.
Yes, I think it is a defect as well and I'm glad you will look into it. I also just wanted to clarify that after more research I think there are 2 defects in here. Thanks.
keithcu, You are right. The set "Do not split paragraph" property should not trouble the layout algorithm. But, the investigation shows that it somehow triggers the incorrect layout. May be this property only increases the probability that the layout algorithm works not correct. Deeper investigation is needed to find the "real" root cause. Regarding Your observation: Thanks for it. I could reproduce. I opened the document and adjusted the paragraph style "Caption" - unset "Do not split paragraph". Then I performed a page formatting - Tools - Update - Page formatting. --> empty pages before graphic with caption "... smirking face ...". Thus, the deeper investigation - debugging the layout algorithm in detail - is needed to find the root cause.
OD, Thanks for the status update. Let me know if I can be of any help. Microsoft has a small team of people working full-time on the layout code of Word, and I think you guys need it too. The layout code is the core! (I used to work there.) If any of you has power, ask for more resources. OpenOffice is great, but flooded in bugs.
Reset assigne to the default "issues@openoffice.apache.org".