Issue 50121 - Protected spaces not honored in calculated/mail merge fields
Summary: Protected spaces not honored in calculated/mail merge fields
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: formatting (show other issues)
Version: 680m106
Hardware: All All
: P4 Trivial with 5 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: oooqa
: 65569 72790 102174 (view as issue list)
Depends on:
Blocks:
 
Reported: 2005-05-31 13:21 UTC by g_brunthaler
Modified: 2017-05-20 11:25 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Look at the formatted currency value - it is split at the protected space (5.48 KB, application/vnd.sun.xml.writer)
2005-05-31 13:25 UTC, g_brunthaler
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description g_brunthaler 2005-05-31 13:21:04 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.
Comment 1 g_brunthaler 2005-05-31 13:25:20 UTC
Created attachment 26749 [details]
Look at the formatted currency value - it is split at the protected space
Comment 2 michael.ruess 2005-05-31 13:28:38 UTC
Reassigned to ES.
Comment 3 g_brunthaler 2005-06-08 05:11:15 UTC
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).
Comment 4 lohmaier 2005-06-08 18:05:49 UTC
confirming with 1.9m107 on linux.
Comment 5 eric.savary 2005-06-14 14:34:44 UTC
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...
Comment 6 g_brunthaler 2005-06-14 18:41:08 UTC
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!
Comment 7 g_brunthaler 2005-06-14 19:00:22 UTC
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.
Comment 8 eric.savary 2006-05-19 10:09:51 UTC
*** Issue 65569 has been marked as a duplicate of this issue. ***
Comment 9 eric.savary 2006-12-20 13:09:33 UTC
*** Issue 72790 has been marked as a duplicate of this issue. ***
Comment 10 eric.savary 2009-05-23 23:02:57 UTC
*** Issue 102174 has been marked as a duplicate of this issue. ***
Comment 11 Chris Tapp 2013-02-01 09:42:10 UTC
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.
Comment 12 Marcus 2017-05-20 11:24:29 UTC
Reset assigne to the default "issues@openoffice.apache.org".
Comment 13 Marcus 2017-05-20 11:25:43 UTC
Reset assigne to the default "issues@openoffice.apache.org".