Bug 39754 - Non-breaking spaces not honored / losing data in Text Marks FORMATTING
Summary: Non-breaking spaces not honored / losing data in Text Marks FORMATTING
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
3.3.3 release
Hardware: All All
: medium major
Assignee: Not Assigned
Depends on:
Blocks: Formatting-Mark Fields-Cross-Reference
  Show dependency treegraph
Reported: 2011-08-02 03:07 UTC by HansPL
Modified: 2023-08-17 16:25 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:

A simple test case. (9.01 KB, application/vnd.oasis.opendocument.text)
2011-08-02 03:07 UTC, HansPL

Note You need to log in before you can comment on or make changes to this bug.
Description HansPL 2011-08-02 03:07:02 UTC
Created attachment 49818 [details]
A simple test case. 

This is another inheritance from OOo,  https://openoffice.org/bugzilla/show_bug.cgi?id=94878 ,  ignored for years...  

Example:  Some text including breaking spaces / characters and a protected
space like "10 - 30_ms"  (here, the _ denotes the protected space intended to keep together the number and the unit) is marked and set as a text mark via Menu Insert Text Mark .  

When this text mark is later cited as 'reference text' at the end of a line,  a
soft line break may wrap between the "30" and the "ms",  although the protected
space is intended to keep together the number and the unit. 

Much worse:  if this text mark is pushed further to the right so that now the
"30" is wrapped to the next line,  the protected space and the following "ms"
disappear completely!  They reappear again when the mark is further pushed to
the right.  

In the reference text,  insert spaces in the second line:  On my system,  the
4th space causes a erraneous wrap of the protected space.  The 9th space cases a
wrap of the "30" and the "_ms" disappears,  also in the paper printout (thus
causing an error in a technical text of mine!).  The 10th space lets the "_ms" reappear.  Maybe this disappearing depends on the exact rendering of the font,  but this is reproducible with different fonts in different versions since at least OOo 2.4.1,  in Win XP and Linux.
Comment 1 Jeffrey 2011-08-02 07:06:07 UTC
Reproduced on LibreOffice 3.4  340m1(Build:103) for OpenSuse Linux.

Thanks for the clear steps and sample document. Nothing wrong with the protected space in the first line, but the second line creates problems exactly as you mentioned.
Comment 2 Björn Michaelsen 2011-12-23 12:28:56 UTC Comment hidden (obsolete)
Comment 3 Florian Reisinger 2012-08-14 14:04:12 UTC Comment hidden (obsolete)
Comment 4 Florian Reisinger 2012-08-14 14:05:04 UTC Comment hidden (obsolete)
Comment 5 Florian Reisinger 2012-08-14 14:09:31 UTC Comment hidden (obsolete)
Comment 6 Florian Reisinger 2012-08-14 14:11:31 UTC Comment hidden (obsolete)
Comment 7 sasha.libreoffice 2012-09-29 08:47:32 UTC
reproduced using attachment in 3.6.1 on Fedora 64 bit
Comment 8 HansPL 2013-10-07 12:18:25 UTC
Still defunct in LO !
Comment 9 HansPL 2014-09-16 07:21:55 UTC
Three years now and no response…? 

I'd like to raise Importance to Major, since this bug effectively and stealthily can alter the displayed contents of a document! 

Comment 10 QA Administrators 2015-10-14 19:57:38 UTC Comment hidden (obsolete)
Comment 11 Buovjaga 2016-01-29 16:50:55 UTC

Win 7 Pro 64-bit Version:
Build ID: 259c1ed201f4277d74dfd600fed8c837cbf56abc
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-01-27_00:45:12
Locale: fi-FI (fi_FI)
Comment 12 HansPL 2016-05-17 11:44:08 UTC Comment hidden (no-value)
Comment 13 QA Administrators 2017-05-22 13:40:22 UTC Comment hidden (obsolete)
Comment 14 Thomas Lendo 2018-10-19 19:32:53 UTC
Still reproducible.

Build ID: 04d6fdacf0daef4f9c3036929904f0332582524d
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: de-DE (de_DE.UTF-8); Calc: threaded
Comment 15 QA Administrators 2021-04-07 03:52:48 UTC Comment hidden (obsolete)
Comment 16 Chris Tapp 2023-08-17 16:25:34 UTC
Still there, except the protected space and the following "ms" no longer
disappears completely.

Version: (X86_64) / LibreOffice Community
Build ID: ca8fe7424262805f223b9a2334bc7181abbcbf5e
CPU threads: 12; OS: Mac OS X 13.5; UI render: default; VCL: osx
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded