https://bugs.documentfoundation.org/show_bug.cgi?id=168709

--- Comment #6 from Takenori Yasuda <[email protected]> ---
I observed the behavior. It seems to convert units in the following steps:
1. Round the input value to the smallest unit of the target unit (0.01 cm, 1
pt, etc.).
   - e.g., 2.5 cm → 3 cm
2. Convert the unit with that value.
   - e.g., 3 cm → 1700.7... twip → 1701 twip → 85.05 pt
3. Round the result to the smallest unit.
   - e.g., 85.05 pt → 85 pt
Note:
The rounding method in step 3 is unclear from this observation. If it were
rounding, 25 mm would become 71 pt, but it actually becomes 70 pt.

Tested cases:
- 25.4 mm -> 70 pt (expected result: 72 pt)
- 25 mm -> 70 pt (expected result: 70.8... pt -> 71 pt)
- 2.5 cm -> 85 pt (expected result: 70.8... pt -> 71 pt)
- 0.555 in -> 72 pt (expected result: 39.9... pt -> 40 pt)
- 0.555 in -> 1.42 cm (expected result: 1.409... cm -> 1.41 cm)
- 0.5 in -> 72 pt (expected result: 36 pt)
- 0.4 in -> 0 pt (expected result: 28.8 pt -> 29 pt)
Note:
The expected results here assume that the rounding method in step 3 is rounding
to the nearest whole number.

Tested with:
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 11c3d7bb03ab1daa8f14fff076987f65b7e36700
CPU threads: 8; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster;
VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded Jumbo

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to