Bug 39974 - FORMATTING: LO Writer on Linux garbles document layout with forms for particular document originally created by old OOo due to UnxForceExtLeading
Summary: FORMATTING: LO Writer on Linux garbles document layout with forms for particu...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2011-08-10 04:45 UTC by HansPL
Modified: 2015-04-15 15:29 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Sample document with forms (26.53 KB, application/vnd.oasis.opendocument.text)
2011-08-10 04:45 UTC, HansPL
Screenshot of same document correctly rendered in OOo 3.3.0 (95.23 KB, image/png)
2011-08-10 04:46 UTC, HansPL
original attachment, with "UnxForceZeroExtLeading" setting inverted (26.54 KB, application/vnd.oasis.opendocument.text)
2015-04-15 14:24 UTC, Michael Stahl (allotropia)

Note You need to log in before you can comment on or make changes to this bug.
Description HansPL 2011-08-10 04:45:13 UTC
Created attachment 50092 [details]
Sample document with forms 

The attached admittedly ugly sample document using forms was created with an older OOo version and works with OOo 3.3.0 (see attached screenshot).  

When opened with LO 3.3.3,  the layout is garbled:  a large text box from the second page is pushed into the first page and covers many other (but not all)  elements there.  

Might be related to https://bugs.freedesktop.org/show_bug.cgi?id=33624 and https://bugs.freedesktop.org/show_bug.cgi?id=35948 .
Comment 1 HansPL 2011-08-10 04:46:22 UTC
Created attachment 50093 [details]
Screenshot of same document correctly rendered in OOo 3.3.0
Comment 2 Björn Michaelsen 2011-12-23 12:24:30 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 3 sasha.libreoffice 2012-01-30 06:34:25 UTC
reproduced in LibO 3.6.0 master on Fedora 64 bit
Comment 4 A (Andy) 2013-05-02 20:01:46 UTC
not reproducible with LO (Win7 Home, 64bit)

Does this issue still persist for you with the latest release of LO?
Comment 5 sasha.libreoffice 2013-05-03 06:36:54 UTC
Bug reproduced in 4.0.2 on Fedora (RFR) 64 bit
Comment 6 A (Andy) 2013-05-03 21:02:54 UTC
This is maybe a Linux issue only.
Can anybody else with Windows confirm this?
Comment 7 HansPL 2013-06-07 08:57:55 UTC
Reproduced with LO on Linux Mint Debian Ed. amd64.  
Heck,  LO just even crashed and took X with it!  

NOT reproduced with LO on Win 7 Pro x64 — fine there.  

Therefore,  seems to be a Linux only issue!
Comment 8 HansPL 2013-10-07 11:20:57 UTC
Still defunct with LO on Linux Mint Debian Ed. !
Comment 9 QA Administrators 2015-04-01 14:42:24 UTC
** Please read this message in its entirety before responding **

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 on a currently supported version of LibreOffice (4.4.1 or later)

   *If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior
   *If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System

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)


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: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for your help!

-- The LibreOffice QA Team This NEW Message was generated on: 2015-04-01
Comment 10 Michael Stahl (allotropia) 2015-04-15 11:59:54 UTC
this is very odd: tested on Fedora 21 x86_64:

LO 4.3.6 apparently displays the document properly

all newer (4.4, master) and older LO versions mangle it

also all OOo versions: 3.4beta 3.3 3.2.1 3.0.1 mangle it

AOO 4.1.0 mangles it

the only difference between versions is that some of them
show an array of checkboxes while others don't

=> setting version to Inherited from OOo
Comment 11 Michael Stahl (allotropia) 2015-04-15 14:24:59 UTC
Created attachment 114808 [details]
original attachment, with "UnxForceZeroExtLeading" setting inverted
Comment 12 Michael Stahl (allotropia) 2015-04-15 14:35:38 UTC
figured it out, the different layout on Windows and Linux
is solely due to the "UnxForceZeroExtLeading" compatibility
flag in the settings.xml of the document:

  <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">true</config:config-item>

this causes a different "external leading" to be used for
particular fonts, and this particular document happens
to have its layout completely mangled then.

apparently the document was created by OOo older than 2.2,
that's why it has the compatibility flag so it is formatted
exactly as OOo < 2.2 would format it; see OOo issue 60945.

presumably the handling of the compatibility flag is broken
in LO 4.3 and was fixed for 4.4.

so somewhat surprisingly, this turns out to be not a bug but a feature.
Comment 13 Michael Stahl (allotropia) 2015-04-15 14:58:21 UTC
there is apparently no UI for this flag in Tools->Options
but the following BASIC macro can turn it off (need to save and
re-load the document after running the macro to get the new layout).

Sub Main

settings = ThisComponent.createInstance("com.sun.star.document.Settings")

settings.UnxForceZeroExtLeading = false

End Sub
Comment 14 HansPL 2015-04-15 15:29:57 UTC
Well… that's one really obscure setting I never heard about… thank you for digging it out, Michael!  
The macro workaround is OK for me since it's just about one-time fixing some old forms.  Nevertheless, shouldn't such a flag be available in Compatibility Options?

Thanks again, Hans