Issue 127002

Summary: Paragraph Spacing variable auto-replaces my numbers after the floating points sometimes
Product: Writer Reporter: Julia Balashova <julia>
Component: editingAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P5 (lowest) CC: anies2014, cpangalos2012
Version: 4.1.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows 8, 8.1   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description Julia Balashova 2016-06-17 15:53:59 UTC
Trying to set some exact value for e.g. mm, I see ho the system auto-replaces numbers after the floating points. E.g. I try to set 99.51 mm, it changes it to 99.52 mm

1. Set measurement units to mm
("Tools" => "Options" and then "OpenOffice.org Writer" => "General" => "Settings")
2. Set focus on some txt Paragraph in the document
3. Open Properties slider 
4. Set ‘Above paragraph spacing’ variable for this paragraph to 99.51 mm

Actual result:
System is always changing it to 99.52 mm.
The same way it changes e.g. 99.67 to 99.68 etc
Comment 1 anies2014 2016-10-14 02:51:04 UTC
Configuration:
  OS: Windows 10 Pro Version 10.0.14393 Build 1493
  RAM: 16gb
  CPU: AMD FX8350
  GPU: AMD Radeon 390
  Display: 3x 1080p, Horizontal
  Keyboard: US, QWERTY

Software Versions Tested:
  - Version 4.1.2: AOO412m3(Build:9782)  -  Rev. 1709696
  2015-10-21 09:53:29 (Mi, 21 Okt 2015)

  - Version 4.2.0: AOO420m1(Build:9800)  -  Rev. 1761251
  Rev.1761251

Steps:
1) “Tools” -> “Options” -> “Office Writer” -> “General” -> “Settings” -> “Measurement unit” = “Millimeter”
2) “Properties (side panel)” -> “Above Paragraph Spacing” -> select entire input box contents
NOTE) The following steps 'a' through 'l' are all taken directly after step #2. Steps not marked 'CORRECT' produced unexpected or erroneos output.

  a) Input: “0.03” -> wait -> number changes to “0.04 mm”
  b) Input: “0.13” -> wait -> number changes to “0.12 mm”

  c) Input: “99.67” -> wait -> number changes to “99.68 mm”
  d) Input: “98.67” -> wait -> number CORRECTLY changes to “98.67 mm”
  e) Input: “100.67” -> wait -> number CORRECTLY changes to the max “100.01 mm”

  f) Input: “1.67” -> wait -> number changes to “1.68 mm”
  g) Input: “2.67” -> wait -> number changes to “2.66 mm”
  h) Input: “3.67” -> wait -> number CORRECTLY changes to “3.67 mm”

  i) Quickly input: “100” -> wait -> number changes to “99.99 mm”
  j) Input: “9” three times slowly -> number CORRECTLY changes to the max “100.01 mm”
  k) Input: “2” two times slowly -> number changes to the max “12.98 mm”
  l) Input: “5” two times slowly -> number changes to the max “45.98 mm”

Besides the "Above Paragraph Spacing" input field, I also tested the following related fields:
- "Below Paragraph Spacing"
- "Before Text Indent"
- "After Text Indent"
- "First Line Indent"
The related fields showed the same failures, adjusted for their max values.

Testing with measurements in Inches and centimeters (step #1) did not produce the unexpected values listed above for Millimeters.

Multi-character numbers entered at a speed of ~9600KPH (keystrokes per hour) or less produce unexpected results. Inputs starting with '2' or '5' demonstrates the issue (ex. Step #k and #l). 
Example with input "22" at a speed lower than ~9600KPH:
  1) Input "2", the number changes to "1.99 mm"
  2) Input second "2", the number changes to "12.99 mm"
  3) Finally, the number then changes to "12.98 mm"
NOTE: Various sources state the average KPH is between 5,000KPH and 10,000KPH. 
- http://unstats.un.org/unsd/demographic/sources/census/wphc/docs/CensusDataCaptureMethodology.pdf
- http://www.learn2type.com/typingtest/tenkeyspeed.cfm

Failure effects similar features of the following and possibly related bug: https://bz.apache.org/ooo/show_bug.cgi?id=127001
Comment 2 Chris 2016-10-28 22:08:45 UTC
This is a known issue and is regarded as an enhancement request rather than a defect.

Confirmed In:
https://bz.apache.org/ooo/show_bug.cgi?id=56997


Same issue with table width:
https://bz.apache.org/ooo/show_bug.cgi?id=126693

Related conversion issue when switching from cm to mm-https://bz.apache.org/ooo/show_bug.cgi?id=127001

This issue occurs with the majority (but not all) millimeter based settings
Below is a list of setting in which I've verified this behavior by providing an input of 5mm which changed to 4.99mm:

Paragraph:
Indent: (Before text, After text, and First line)
Spacing (Above and Below paragraph)
Line Spacing (Fixed, Leading, and At Least)
Tab Position
Drop Caps (Space to text)
Page Style:
Page Margins (Left, Right, Top, Bottom)
Header (left margin, right margin, spacing, and height)
Footer(left margin, right margin, spacing, and height)
Options->General:
Tab stops
Options->Grid:
Resolution(Horizontal, Vertical)
Options->Table:
Keyboard Handling (Move cells Row/Column, Insert cell Row/Column)
Table Format
Width
Spacing (left, right, above, below)

I haven't seen any relation between the input speed or timing and the changing of values, though there is some lag in updates when using the properties slider. A simpler way of testing may be by using the paragraph dialog box:
1.Ensure measurement units is set to millimeters as explained by Julia
2.Click in a text field
3.Right click and Select Paragraph
4. In Indents and Spacing, replace any of the fields ending in mm with 5 mm and click okay.
5.Verify the value has changed to 4.99mm