Bug 88908 - .doc: text indented with spaces and checkboxes are not aligned
Summary: .doc: text indented with spaces and checkboxes are not aligned
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Jonathan Clark
URL:
Whiteboard: filter:ww8 target:25.8.0
Keywords:
Depends on:
Blocks: CJK DOC
  Show dependency treegraph
 
Reported: 2015-01-29 16:34 UTC by Török Edwin
Modified: 2025-03-27 19:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
http://rosenc.ro/wp-content/uploads/2015/01/chestionar-administratori-ESCO.doc (189.00 KB, application/msword)
2015-01-29 16:34 UTC, Török Edwin
Details
PDF how it is supposed to look like (608.71 KB, application/pdf)
2015-01-29 16:35 UTC, Török Edwin
Details
spaceWidth2003.docx: docx simplified version - easy to see/change compat settings. (16.72 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-06-16 08:41 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Török Edwin 2015-01-29 16:34:51 UTC
Created attachment 112920 [details]
http://rosenc.ro/wp-content/uploads/2015/01/chestionar-administratori-ESCO.doc

When opening the attached .doc file in LibreOffice the text and checkboxes are not aligned (they overlap), look at point 3 "Reparații curente", and "Termoizolații".
Apparently the text was indented using spaces (not very reliable). I tried installing the font used with ttf-mscorefonts-installer, but the alignment is still wrong.

See attached PDF on how it is supposed to look like.
Comment 1 Török Edwin 2015-01-29 16:35:17 UTC
Created attachment 112921 [details]
PDF how it is supposed to look like
Comment 2 Török Edwin 2015-01-29 16:36:23 UTC
Reproduced with:
Version: 4.4.0.3 Build ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7 Locale: en_US (.deb from documentfoundation.org)
Version: 4.3.3.2 Build ID: 430m0(Build:2) (.deb from Debian jessie)
Comment 3 V Stuart Foote 2015-01-29 20:34:44 UTC
Rather trivial to change Tab spacings and replace multiple spaces with TABs. But, OK this poorly structured document does have problems.
Comment 4 QA Administrators 2016-02-21 08:36:58 UTC Comment hidden (spam)
Comment 5 QA Administrators 2019-05-14 02:57:27 UTC Comment hidden (obsolete, spam)
Comment 6 Justin L 2020-06-16 08:36:36 UTC
This seems very strange to me. In Word, the "space" character is MUCH wider than it is in LO. How can that be?
Comment 7 Justin L 2020-06-16 08:41:41 UTC
Created attachment 162033 [details]
spaceWidth2003.docx: docx simplified version - easy to see/change compat settings.

The spacing width seems to be related to the compatibility setting <w:balanceSingleByteDoubleByteWidth/>
By toggling the compatibility option "Balance SBCS characters and DBCS characters", the width of the space changes significantly.
Comment 8 QA Administrators 2022-06-17 03:33:38 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2024-06-17 03:15:51 UTC Comment hidden (obsolete)
Comment 10 Török Edwin 2024-06-18 21:34:58 UTC
Issue still present on (renders differently from the PDF):

Version: 24.2.4.2 (X86_64)
Build ID: 420(Build:2)
CPU threads: 32; OS: Linux 6.9; UI render: default; VCL: kf5 (cairo+wayland)
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 11 Jonathan Clark 2025-03-13 04:15:38 UTC
(In reply to Justin L from comment #6)
> This seems very strange to me. In Word, the "space" character is MUCH wider
> than it is in LO. How can that be?

Related to balanceSingleByteDoubleByteWidth: For the purposes of CJK layout, Microsoft Word has a feature which forces a normal space character to 1/2 the width of a CJK fullwidth space. That feature is toggled by this compatibility flag, and seems to have been the default behavior at some point. I haven't looked into the specifics beyond this.

Since this is related to CJK document layout and is necessary to render certain CJK Word documents, I'm making this bug block the CJK metabug.
Comment 12 Commit Notification 2025-03-27 19:19:03 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6818bc55ff248c59f12b2e090139eff30fe949dd

tdf#88908 sw: Add BalanceSpacesAndIdeographicSpaces compat option

It will be available in 25.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.