Bug 127207 - Dashes, dots and spaces are too large in Writer
Summary: Dashes, dots and spaces are too large in Writer
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Shapes-Line
  Show dependency treegraph
 
Reported: 2019-08-28 21:57 UTC by Regina Henschel
Modified: 2023-08-16 09:08 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Line with style "Line with Fine Dots" (10.13 KB, application/vnd.oasis.opendocument.text)
2019-08-28 21:57 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2019-08-28 21:57:00 UTC
Created attachment 153722 [details]
Line with style "Line with Fine Dots"

Open attached document and notice how long the dash is. It should be 20,07mm. The line style is the "Line with Fine Dots" from our standard.sod. That file has the definition:
<draw:stroke-dash draw:name="Line with Fine Dots" draw:style="rect" draw:dots1="1" draw:dots1-length="0.7902inch" draw:dots2="10" draw:distance="0.0598inch"/>

0.7902inch = 0.7902 * 25.4mm = 20.07108mm

The same line in Draw/Impress has the correct dash lang.

[This bug is the reason, why roundtrip with DOCX gives different dash lengths.]
Comment 1 Dieter 2019-09-03 09:31:31 UTC
I opened document

1. Click in line: Width in sidebar shows 2,83cm; width in line dialog shows 0.21 inch
2. Click in other shape and back to line: Width in sidebar shows 7,2 cm; width  in line dialog shows 0.21 inch

=> NEW
Comment 2 Dieter 2021-08-14 05:00:29 UTC
Regina, please have a look at tis bug, I couldn't reproduce the problem I've described in comment 1 anymore and I also couldn't find the definition from comment 0 (I had a look into styles.xml and content.xml). I also creted a new line and couldn't see any problem.

Version: 7.2.0.3 (x64) / LibreOffice Community
Build ID: 2a7ea282da28d665a7dc086360567b4aea27bf08
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 3 Regina Henschel 2021-08-14 12:03:43 UTC
Dashing styles are in sub-document styles.xml.
Unpack document.
Open file styles.xml
Find element <office:styles>
Therein find element <draw:stroke-dash>. It should be before the <style:default-style> sub-elements.
Using the attached document, you will find the attributes draw:name="Line_20_with_20_Fine_20_Dots" and draw:dots1="1" and draw:dots2="10". That's OK. But draw:dots1-length="20.07mm" and draw:distance="1.52mm". That is wrong. Open the document in Writer and see, that the measured length of the dash is 35.42mm.

Open the document and select the line.
Go to Format > Text Box and Shape > Line...
Go to tab "Line Styles" in that dialog.
The line style "Line with Fine Dots" should be selected.
Notice, that the Dash length is shown in the dialog as 35.40mm and the spacing (=distance) is 2.68mm.

The problem is, that Writer converts 35.40mm to Twips.
With 1 Twip = 127/72 mm, Writer gets 20.07 Twip.
The error is, that LO writes the value 20.07 with unit "mm" to file.

Same error is when opening a document.
Comment 4 Regina Henschel 2021-08-14 15:07:48 UTC
1 Twip = 127/72 mm ==> 1 Twip = 127/72 * 1/100 mm. Writer calculates 2007 Twip. Writer writes the 2007 Twip as if they were 2007*1/100 mm.
Comment 5 QA Administrators 2023-08-15 03:15:06 UTC Comment hidden (obsolete)
Comment 6 Regina Henschel 2023-08-15 08:14:15 UTC
The values written to file are still different from the values in the loaded document.
Tested with Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b3053b63c65372627c5fb4df6b4ddcd5e12e16f7
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL threaded
Comment 7 QA Administrators 2023-08-16 03:05:53 UTC Comment hidden (obsolete)
Comment 8 Regina Henschel 2023-08-16 09:08:44 UTC
The values written to file are still different from the values in the loaded document.
Tested with Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b3053b63c65372627c5fb4df6b4ddcd5e12e16f7
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL threaded

Why does the bot not detect comment 6 made yesterday?