Apache OpenOffice (AOO) Bugzilla – Issue 50121
Protected spaces not honored in calculated/mail merge fields
Last modified: 2017-05-20 11:25:43 UTC
When the contents of a user-defined or mail merge field are formatted for display or printing, protected spaces (0xa0) in the format definition are not honored as such and are handled like normal spaces instead. This is especially a problem in user-defined currency formats which incorporate a protected space between the currency symbol and the monetary value, because a soft line break may then occur between the symbol and the value - which should be avoided.
Created attachment 26749 [details] Look at the formatted currency value - it is split at the protected space
Reassigned to ES.
Depending on the screen resolution, it may be necessary to manually change the screen width of the document window in order to reproduce the effect in the attached document. In order to do this, grab the document window on the left side and resize it until the word wrap splits the line between the Euro symbol and the currency value. This behavior is incorrect because the split occurs at a protected (non-breaking) space (character code 0xA0).
confirming with 1.9m107 on linux.
ES->OS: not sure if it is possible to define a non-breaking space in the number format definition (???). I guess the reporter inserted the non breaking space over copy paste bu just inserted, in fact, a simple space...
gb->ES: Yes I copied it using the clipboard. But I verified that it is really a 0xa0 rather than just 0x20 by copying back the space from the format definition edit field to a text document. Then I examined the space character using a hex editor, and it *was* 0xa0!
BTW, there is a simpler, more direct way to prove it: Unzip the content.xml from the document "protected_space_not_honored.sxw". Convert to UTF-8-encoding into UTF-16 for easy verification using a hex editor. Go to offset 0x1673 of the UTF-16 encoding using a hex editor, and it will show you 0x00a0 and not 0x0020. The section containing this is wrapped within a <text:variable-set> tag-pair.
*** Issue 65569 has been marked as a duplicate of this issue. ***
*** Issue 72790 has been marked as a duplicate of this issue. ***
*** Issue 102174 has been marked as a duplicate of this issue. ***
Just wondering why this is set as P4? It is a right pain from a typesetting perspective. For example: 1) Some items have numbering of the form "Item 1", "Item 2", etc.; 2) Cross-references to these are used within body text; 3) These sometimes split at the end of a line: ... blah, blah, Item 2 says blah. The non-breaking space needs to be honoured as it is a real pain to enforce them manually when typesetting a large document (think 250 pages). A fix would be really appreciated.
Reset assigne to the default "issues@openoffice.apache.org".