Bug 144639 - PARAGRAPH: Impossible to set a precise paragraph indent
Summary: PARAGRAPH: Impossible to set a precise paragraph indent
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Measurement-Units Paragraph-Indent
  Show dependency treegraph
 
Reported: 2021-09-21 11:22 UTC by phv
Modified: 2023-12-29 10:38 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
File: Different indents showing the inconsistency of the rendering (11.23 KB, application/vnd.oasis.opendocument.text)
2021-09-21 11:22 UTC, phv
Details
Screenshot of the issue (245.55 KB, image/jpeg)
2021-09-21 11:23 UTC, phv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description phv 2021-09-21 11:22:06 UTC
Created attachment 175166 [details]
File: Different indents showing the inconsistency of the rendering

Two consecutive paragraphs with the same border (arrangement, line and padding): both have the same indent but the borders don't merge as specified if one is using first line indent.

The issue appears only with certain indentation values, which suggests a rounding error when the rendering is performed.

Steps to Reproduce:
    1) Create two different paragraph styles: both must have the same 'Borders' values, 'Merge with next paragraph' should also be checked.

    2) Enter 'Before text' indent of +1.13 cm for the first paragraph.

    3) Enter 'Before text' indent of +1.62 cm and 'First Line' indent of −0.49 cm for the second paragraph.

Actual Results: The first paragraph border is not merge with the second paragraph border.

Expected Results: The first paragraph border should be merged with the second paragraph border.

Reproducible: Always

Additional Information: It occurs depending on the values entered; repeating the steps given above, the border will merge with 'Before text' indent of +1.63 cm and 'First Line' indent of −0.50 cm for the second paragraph. Two consecutive paragraphs should always have their borders merged if they display the same indent and border properties regardless of the first line indent.
Comment 1 phv 2021-09-21 11:23:24 UTC
Created attachment 175167 [details]
Screenshot of the issue
Comment 2 Dieter 2021-10-07 07:19:44 UTC
I confirm the described behaviour, but I think there is a different underlying problem: If you change measurement unit to millimetre (Tools => Options => LibreOffice Writer => General), you will see that it is unpossible to set left indent to 11,3 mm (always changes to 11,31 mm) or to 16,2 mm (always changes to 16,19). So intend never has same value and therefor borders don't merge.

So I changed bug summary a bit and hope you agree, phv.
Comment 3 phv 2021-12-17 18:23:29 UTC
The cause seems to be the conversion of measurements - whether inch, millimeter, point - into what I assume to be twip unit. Rounding performed after the calculation changes the measurements. Therefore, the result of the operation is not equal to what is displayed on the screen. To summarize:

A (mm) + B (mm) = C (mm)

but after conversion and rounding:

A (twip) + B (twip) ≠ C (twip)

I don't know what to think about it considering that the use of twip measurement unit is not even proposed for LibreOffice documents. The enhancement proposed in bug #138109 could be the solution to this issue.
Comment 4 QA Administrators 2023-12-18 03:12:12 UTC Comment hidden (obsolete)
Comment 5 Dieter 2023-12-29 10:38:38 UTC
Still present in

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 40617d867346956588ac023511f31210107217f4
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded

Steps:
1. To make bug more visible make sure, that measurement unit is mm (Tools -> Options -> LibreOffice Writer -> General)
2. Place cursor within a paragraph -> Format -> Paragraph -> Indents & Spacing -> Before text 11,3 mm
4. OK -> Format

Actual result
Value changes to 11,31 mm

Expected result
Value still 11,3 mm