Issue 56998 - Display a space character before unit symbols
Summary: Display a space character before unit symbols
Alias: None
Product: General
Classification: Code
Component: ui (show other issues)
Version: OOo 2.0
Hardware: All All
: P3 Trivial with 2 votes (vote)
Target Milestone: 4.1.0
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Blocks: 124304
  Show dependency tree
Reported: 2005-10-30 22:09 UTC by john_johnson
Modified: 2017-05-20 10:35 UTC (History)
5 users (show)

See Also:
Latest Confirmation in: 4.0.0
Developer Difficulty: Easy

Screenshot (38.78 KB, image/png)
2013-05-08 04:19 UTC, Rainer Bielefeld
no flags Details
Patch to add separator space in MetricField (497 bytes, patch)
2013-11-30 10:05 UTC, hanya
no flags Details | Diff
Patch to add separator space in tooltips of character spacing of sidebar (1.76 KB, patch)
2013-12-01 14:56 UTC, hanya
no flags Details | Diff
Patch for Style - Organizer - Contains descriptions (11.50 KB, patch)
2013-12-03 13:34 UTC, hanya
no flags Details | Diff
Patch for default value of dimension line drawing (1.16 KB, patch)
2013-12-03 15:36 UTC, hanya
no flags Details | Diff
Patch for color replacer (827 bytes, patch)
2013-12-16 16:35 UTC, hanya
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description john_johnson 2005-10-30 22:09:00 UTC
Units are shown without a space separator. For example:

Please can you use a space character as a separator. Thus:
12.51 mm
1.25 cm
2.95 pi
35.5 pt

It is a minor point but it makes the numeric part stand out from the unit
symbol. A space character separator is mentioned in the 'expressions' section of
ISO 31-0, according to:

Comment 1 michael.ruess 2005-10-31 08:05:49 UTC
Reassigned to MMP.
Comment 2 matthias.mueller-prove 2006-01-19 11:44:02 UTC
I support this RFE.
Comment 3 john_johnson 2009-01-26 12:13:02 UTC
Still an issue in OpenOffice 3.0
Comment 4 bettina.haberer 2010-05-21 14:44:48 UTC
To grep the issues easier via "requirements" I put the issues currently lying on
my owner to the owner "requirements". 
Comment 5 hartsambatchvolv 2010-11-10 16:49:09 UTC
Created attachment 73296
Comment 6 Rainer Bielefeld 2013-05-08 04:19:26 UTC
Created attachment 80651 [details]

Still not fixed in 4.0 for most units. There are some exceptions where the required blank already does exist, for example rotation angle (see screenshot), grid snap range, may be some few more
Comment 7 Rainer Bielefeld 2013-05-08 04:23:42 UTC
I also see that with WIN7 and in LibO on Ubuntu (Virtualbox), so I think the problem is not limited to WIN XP.
Comment 8 Rainer Bielefeld 2013-05-08 04:40:17 UTC
SoftMaker FreeOffice uses units correctly with leading blank.

Same mistake as in AOO in Symphony and LibreOffice.
Comment 9 hanya 2013-11-30 10:05:24 UTC
Created attachment 82004 [details]
Patch to add separator space in MetricField

MetricField is used to show such value and unit set and it inherits MetricFormatter 
class to convert units and to join the value and its unit.
MetricFormatter::CreateFieldText method concatenate the value and the unit so 
it can insert the space separator between them.
- degree has own space ahead and it is FUNIT_CUSTOM, so the patch do not touch it.
- percent character is not an unit so it does not need the separator.
Comment 10 hanya 2013-12-01 14:56:12 UTC
Created attachment 82017 [details]
Patch to add separator space in tooltips of character spacing of sidebar

In the tooltips of character spacing popup of Text deck, no spacing between 
values and their unit.
And also part of this fix would be adapted to localized them.
Comment 11 2013-12-02 12:49:38 UTC
The content of attachment 73296 has been deleted for the following reason:

deleting spam attachment
Comment 12 hanya 2013-12-03 13:34:17 UTC
Created attachment 82035 [details]
Patch for Style - Organizer - Contains descriptions

Style representation contains value and unit pairs in Style dialog - Organizer tab - Contains section.
To check changes by the patch (file, function changed, the location that the value can be seen): 

- editeng/source/items/frmitems.cxx
-- SvxSizeItem::GetPresentation
--- Calc - Page Style - Report - Width and Height of Header and Footer.
-- SvxLRSpaceItem::GetPresentation
--- Writer - Paragraph Style - Quotations - Indent left and other indents.
-- SvxULSpaceItem::GetPresentation
--- Writer - Page Style - From top and From bottom.
-- SvxShadowItem::GetPresentation
--- Writer - Frame Style - Shadow (set its shadow)
-- SvxBoxItem::GetPresentation
--- Writer - Frame Style - Spacing top (set different boarder to each side).

- editeng/source/items/textitem.cxx
-- SvxFontHeightItem::GetPresentation
--- Writer - Paragraph Style - Text body - Western text (change font height).
-- SvxFontWidthItem::GetPresentation
--- (How can I change the width of the font?)
-- SvxKerningItem::GetPresentation
--- Writer - Paragraph Style - Text body - Kerning (change Position - Spacing)

- editeng/source/items/paraitem.cxx
-- SvxTabStopItem::GetPresentation
--- Writer - Paragraph Style - (first item) (change Tabs - Position value).

- sw/source/ui/utlui/attrdesc.cxx
-- SwFmtFrmSize::GetPresentation
--- Writer - Page Style - Width and Fixed height.
-- SwFmtVertOrient::GetPresentation
--- Writer - Frame Style - Y Coordinate (change Type - Position - Vertical to From top and input separation).
-- SwFmtHoriOrient::GetPresentation
--- Writer - Frame Style - X Coordinate (change Type - Position - Horizontal to From left and input separation).

- sw/source/ui/utlui/uiitems.cxx
-- SwPageFtnInfoItem::GetPresentation
--- Writer - Paget Style - Footnote - Max. footnote area (Footnote - Footnote area - Maximum footnote height should be choosen).

- sc/soursce/core/data/docpool.cxx
-- ScDocumentPool::GetPresentation
--- Calc - Page Style - Indent left and Indent right in Header and Footer.

- svx/source/items/algitem.cxx
-- SvxMarginItem::GetPresentation
--- Calc - Cell Style - Left margin and other margins (Borders - Spacing to contents).

- svx/source/xoutdev/xattr.cxx
-- XLineWidthItem::GetPresentation
--- Draw - Graphics Style - Object with arrow - second value (Line width).
-- XLineStartWidthItem::GetPresentation
--- Draw - Graphics Style - Object with arrow - the value next to Arrow (Line - Arrow styles - Start width).
-- XLineEndWidthItem::GetPresentation
--- Draw - Graphics Style - Object with arrow - the value next to start value of the arrow (Line - Arrow styles - End width).

- svx/source/svdraw/svdattr.cxx
-- SdrMetricItem::GetPresentation
--- Draw - Graphics Style - Dimension Line - Dimension lines (Dimensioning - Line values).
Comment 13 hanya 2013-12-03 15:36:25 UTC
Created attachment 82036 [details]
Patch for default value of dimension line drawing

Draw a dimension line on the draw page of Draw document. 
The attached patch adds space separator between the value and the unit 
for the default value of the dimension line.
Comment 14 hanya 2013-12-16 16:35:49 UTC
Created attachment 82114 [details]
Patch for color replacer

Tools - Color Replacer dialog contains four metric fields for Tolerances 
and they shows space separator between value and "%" character.
Percent value do not have any unit, so % character should not be separated with space character.
Comment 15 Armin Le Grand 2014-01-17 16:05:43 UTC
@hanya: Will you add these for 4.10? I think it makes perfect sense.
Comment 16 SVN Robot 2014-01-18 08:14:48 UTC
"hanya" committed SVN revision 1559327 into trunk:
#i56998# add a space separater between value and unit and remove separator be...
Comment 17 hanya 2014-01-18 08:20:11 UTC
Applied on trunk.
The change contains the attached patch in Comment 9, 10, 12-14 and the following: 

(- file name and the way to verify the change)
- chart2/source/controller/dialogs/tp_SeriesToAxis.src
Create chart on spreadsheet - select series in the chart edit mode - choose Format Data Series from the context menu - Options tab - Spacing and Overlap fields

- sd/source/ui/animations/SlideTransitionPane.src
Impress - Sidebar - Slide Transition - Advance slide - Automatically after field
- sd/source/ui/animations/CustomAnimationDialog.src
Insert Text drawing with "abc" on presentation - Custom Animation pane - Add - Appear effect from Entrance tab - OK - Push Effect Options button - Timing tab - Delay, Text Animation tab - Automatically after

- cui/source/tabpages/tabline.src
Draw - Select line - Format - Line... - Line Styles tab - check Fit to line width box

- cui/source/dialogs/colorpicker.src
Menu Tools - Options - OpenOffice - Colors - choose a color - push Edit button - HSB and CMYK fields
- cui/source/dialogs/colorpicker.cxx
HSB - Hue field
- cui/source/dialogs/grfflt.src
Insert some picture on Draw/Impress - select it - Filter (Picture toolbar) - Solarization/Aging/

- svx/source/engine3d/float3d.src
Insert rectangle on presentation - select it - Convert in the context menu - To 3D - select it - 3D Effects in the context menu - Rounded edges/Scaled depth in Geometry category and Intensity field in Material category
Comment 18 SVN Robot 2014-01-18 08:55:45 UTC
"hanya" committed SVN revision 1559330 into trunk:
#i56998# add space separator between value and unit in fixed line around the ...
Comment 19 hanya 2014-01-18 09:01:28 UTC
The change in Comment 18 is: 
paper size indicated around the preview on Print dialog shown by 
File - Print entry in the main menu.
Comment 20 SVN Robot 2014-01-18 10:10:24 UTC
"hanya" committed SVN revision 1559337 into trunk:
#i56998# percent value should not takes space separator before the character
Comment 21 hanya 2014-01-18 16:02:32 UTC
I removed space between value and percent (%). But from reading the 
publication from NIST that referencing ISO 31-0, it should be kept.
I will fix about it soon.

There is type FUNIT_PERCENT defined for MetricField Unit but it is used only in 
PDF export dialog. About 80 controls use Unit = FUNIT_CUSTOM with CustomUnitText = "%", 
if they use FUNHIT_PERCENT, each control do not need own CustomUnitText.
Comment 22 SVN Robot 2014-01-19 11:50:39 UTC
"hanya" committed SVN revision 1559489 into trunk:
#i56998# space separater required before parcent character in metric field
Comment 23 SVN Robot 2014-01-19 12:02:25 UTC
"hanya" committed SVN revision 1559492 into trunk:
#i56998 add space before percent in zoom strings
Comment 24 SVN Robot 2014-01-19 13:51:16 UTC
"hanya" committed SVN revision 1559496 into trunk:
#i56998# use FUNIT_PERCENT instead of FUNIT_CUSTOM with parcent CustomUnitTex...
Comment 25 SVN Robot 2014-01-19 14:21:02 UTC
"hanya" committed SVN revision 1559499 into trunk:
#i56998# use FUNIT_PERCENT on fields that allow relative value
Comment 26 SVN Robot 2014-01-19 15:10:12 UTC
"hanya" committed SVN revision 1559501 into trunk:
#i56998# add space separator between zoom value and percent on zoom statusbar...
Comment 27 SVN Robot 2014-01-19 15:15:38 UTC
"hanya" committed SVN revision 1559505 into trunk:
#i56998# add space separater before percent for Combine single line paragraph...
Comment 28 SVN Robot 2014-01-20 09:55:09 UTC
"hanya" committed SVN revision 1559661 into trunk:
#i56998# add space before percent character in text and quick help
Comment 29 hanya 2014-01-20 10:26:59 UTC
Fixed against parts that I could find except for the following: 
- degree/degree(s). There are three kind of way to show degree value in the UI.
  "degree", "degree(s)" and degree symbol (Unicode 0xb0). Inconsistent indication 
  among the UI controls. With degree symbol, no space separator between the value 
  and degree symbol. 
- sec: the standard should use "s" as unit of seconds.
  ms is used to reparesents mili second, so this is variation.
- Pixel/Pixels: ISO 80000-13 has part for Informaation science and technology, 
  it might define about pixel.
- help files contains some wrong representation about the separator between 
  a value and its unit.

I'm considering to make each issues for the above problems remained.

As note, current ISO standard about unit is ISO 80000 and its general principles is ISO 80000-1.
Comment 30 Armin Le Grand 2014-01-20 20:25:13 UTC
hanya, thanks a lot!
Comment 31 Oliver-Rainer Wittmann 2014-02-10 09:01:30 UTC
@hanya: Is this issue solved for AOO 4.1?
Comment 32 hanya 2014-02-10 09:09:10 UTC
Fixed, thanks.
As described in Comment 29, they would be separated issues from this.
Comment 33 Oliver-Rainer Wittmann 2014-02-10 12:00:11 UTC
Thx for the update
Comment 34 hanya 2014-02-11 11:56:21 UTC
Preview Zoom control still has percent value without space separator on Writer's preview window.
Comment 35 hanya 2014-02-11 12:07:59 UTC
Fixed on trunk.
Comment 36 SVN Robot 2014-02-11 12:08:26 UTC
"hanya" committed SVN revision 1567072 into trunk:
#i56998# add space separator on the preview zoom control of the preview toolbar