Bug 107223 - Square page mode is used even disabled
Summary: Square page mode is used even disabled
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
3.3.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Text-Grid
  Show dependency treegraph
Reported: 2017-04-17 09:15 UTC by Mark Hung
Modified: 2022-11-10 07:06 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Problem document (18.39 KB, application/vnd.oasis.opendocument.text)
2017-04-17 09:15 UTC, Mark Hung
Second example. (12.53 KB, application/zip)
2017-04-17 11:53 UTC, Mark Hung

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hung 2017-04-17 09:15:35 UTC
Created attachment 132630 [details]
Problem document

1. Open the attached document, it is rendered with text grid in square page mode.
2. Open general option for Writer ( Tools / Options / LibreOffice Writer / General / Use square page ), square page mode is not checked.

Expected result: grid should be rectangle without line gaps instead of square since square page mode is not checked.
Comment 1 Xisco Faulí 2017-04-17 09:40:51 UTC
Confirmed in

Build ID: 7635e0c1c7f821a1081f8e3868f641ae74a172d6
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 2 Mark Hung 2017-04-17 11:53:51 UTC
Created attachment 132634 [details]
Second example.

Second example from a docx document.
- Go Text Grid tab in Page Style dialog, check "Display Grid", the text grid is rendered in square mode. But actually the document has turn off the squared mode.
Comment 3 QA Administrators 2018-04-18 02:34:29 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2020-04-18 03:35:15 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2022-04-19 03:26:12 UTC Comment hidden (obsolete)
Comment 6 Faisal 2022-07-03 15:09:52 UTC
Reproducible in :

Version: / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-GB (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 7 Kevin Suo 2022-10-15 15:23:28 UTC
This is still reproducible on 7.3 branch, and also in
Version: / LibreOffice Community
Build ID: ee37514eb64b2c431c2f51e7f70d933913217cd6
CPU threads: 8; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: zh-CN (zh_CN.UTF-8); UI: zh-CN
Calc: threaded
Comment 8 Kevin Suo 2022-10-15 15:24:54 UTC
The code in

may be a start point to trace the issue.
Comment 9 Kevin Suo 2022-11-10 07:06:56 UTC
I guess this document was created when an old LibreOffice version which had a bug in text grid, thus has set the height of the ruby lines (i.e. the thin line spaces above the square lines). This can be observed when you unzip the ODT file and look at the attributes for style "Mpm1" in file styles.xml, which has the following:

style:layout-grid-color="#c0c0c0" style:layout-grid-lines="40" style:layout-grid-base-height="0.423cm" style:layout-grid-ruby-height="0.212cm" style:layout-grid-mode="both" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:layout-grid-base-width="0.37cm" style:layout-grid-snap-to="false"

Manually turn square page mode off and on again for this document will resolve the problem, and I don't think you can reproduce such a document using the most recent LibreOffice.