Bug 123903 - FILESAVE DOCX dashed and dotted line styles not saved in DOCX (see comment 5)
Summary: FILESAVE DOCX dashed and dotted line styles not saved in DOCX (see comment 5)
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.4.0
Keywords: filter:docx
Depends on:
Blocks: Shapes-Line
  Show dependency treegraph
 
Reported: 2019-03-06 15:29 UTC by sdc.blanco
Modified: 2020-04-18 11:13 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2019-03-06 15:29:07 UTC
1. Open new document
2. Draw three lines
3. Change style on two lines (e.g., "fine dashed" and "ultrafine dotted".)
4. Save as .docx
5. Close document and reopen.

Observed behavior:  line styles for all three lines are "continuous"
Expected behavior:  line styles are maintained as they were set.

(have not tried systematically all the different styles)

Version: 6.1.5.2 (x64)
Build ID: 90f8dcf33c87b3705e78202e3df5142b201bd805
CPU threads: 4; OS: Windows 10.0; UI render: default;
Comment 1 Dieter 2019-03-06 20:50:38 UTC
I couldn't reproduce it with

Version: 6.3.0.0.alpha0+ (x64)
Build ID: f42554a1886ebe49170c25096dc3281b2c7bb1f4
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-02-08_22:37:30
Locale: en-US (de_DE); UI-Language: en-US
Calc: threaded

But what happens is the following

1. I changed the style of two lines to "fine dashed"
2. After reopening the docx-file, the style looks very similar but the style in the sidebar properties changed to "none"
Comment 2 alicetaylor 2019-03-07 06:35:36 UTC Comment hidden (spam)
Comment 3 mulla.tasanim 2019-03-20 05:25:17 UTC
Thank you for reporting the bug. 

I changed the style of two lines to fine dashed and ultra fine dotted.
after opening .docx file-1.style looks similar 
2.for continuous line-Line style in the properties showing continuous only
3.for other two lines(fine dashed and ultra fine dotted)-Line style in the properties showing none

I can not reproduce the bug in

Version: 6.2.1.2 (x64)
Build ID: 7bcb35dc3024a62dea0caee87020152d1ee96e71
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: CL


Version: 6.3.0.0.alpha0+ (x64)
Build ID: 91cdf22b88a4f7bec243c8fb187627e766d3294c
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-03-08_00:38:10
Locale: en-US (en_US); UI-Language: en-US
Calc: CL
Comment 4 Buovjaga 2019-04-08 19:16:46 UTC
sdc.blanco: please test with 6.2.x.
Set to NEEDINFO.
Change back to UNCONFIRMED, if the problem persists. Change to RESOLVED WORKSFORME, if the problem went away.
Comment 5 sdc.blanco 2019-05-23 20:25:10 UTC
Version: 6.2.4.2 (x64)
Build ID: 2412653d852ce75f65fbfa83fb7e7b669a126d64
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 

Problems remain.

0. Document
1.  Make three lines
      a. continuous
      b. 2 dots 3 dashes
      c. 2 dots 1 dash
2. Save as .docx and close
3. Open saved .docx file

Observed:   a. continuous is ok
            b. property presented as continuous (and the line appears as such)
            c. property presented as none (and the line does not match any of the properties in appearance).

Expected:  to keep the same properties as originally set.

(NB.  this time I chose line properties where the differences should be obvious, but I got similar effects with the ultrafine dashed and ultrafine dotted becoming property "none" and not matching any of the line properties in appearance.)
Comment 6 Buovjaga 2019-05-24 09:37:14 UTC
I can repro, all the way back to 4.3.0. 3.5.0 does not save the lines.
I wonder, if DOCX format is supposed to support the styles, though?
Comment 7 Regina Henschel 2019-08-30 18:04:17 UTC
This has two problems:

1. How our own styles are exported to .docx (and other OOXML).
2. How our UI treats dash styles, which are not included in the file "standard.sod".

for 1.
MS Office can only handle dash styles, which have relative values for the length of a dash or space, e.g. 300% of line width. But some of our dash styles have fixed values, e.g. dash length 0.051cm. Those have no equivalent in MS Office.

MS Office has a preset of dash styles or can use custom dash styles. Our dash styles have no corresponding preset style. We currently map some of our dash styles to a roughly fitting MS Office preset style. I am currently examine a solution to write our styles as custom dash styles. That looks really better, but has the problem, that MS Office has no UI for manipulating custom styles. Even not all preset styles are available in the UI of MS Office.

Besides that, there is bug 127207. The error is that the dashes are too long in Writer for dash definitions with relative values and because docx can only handle relative values, the roundtrip will fail for dash definitions with fixed values. And "2 Dots 3 Dashes" is such a kind.

And there is the bug, that for styles which are not mapped to a preset style, currently a hairline (width=0) is always exported as solid line. I have not found a bugreport for that. But that problem is already fixed in my work.

for 2.
The line style dialog can only handle one palette at a time and you need to load a palette each time you work on the document. After restart always the "standard.sod" is present.

If a shape has a style applied, the style definition is in the document. But the line style dialog shows an empty field, if this style is not included in the current palette. The sidebar shows even "None" is that case. That happens currently, if you open a document, that was originally created in MS Office and therefore uses a MS Office preset style.

You should decide, for which problem, you want this bug report, and write a new bugreport for the other problem.
Comment 8 Regina Henschel 2019-09-01 17:11:50 UTC
I have written the report bug 127266 for the problem "Observed c".
For "Observed b" I have written bug 127267.

I'm currently working on a better import/export with MS Office formats and will use this bug report as reference.
Comment 9 Regina Henschel 2019-09-01 17:47:21 UTC
First version of my patch is at https://gerrit.libreoffice.org/78372.
Comment 10 Commit Notification 2019-09-05 10:38:38 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/57c9bdab377a00649299d1a4c9ed2f9e5e03b84e%5E%21

tdf#127166, tdf#123903 improve import/export of line styles

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Regina Henschel 2019-09-07 20:14:34 UTC
Fix is available in Version: 6.4.0.0.alpha0+ (x64)
Build ID: 61b757f31f25cda6d595f64226181c7a82ce8d7f
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@62-TDF, Branch:master, Time: 2019-09-07_17:48:35
Locale: en-US (en_US); UI-Language: en-US
Calc: CL
Comment 12 richrun 2019-10-31 06:30:35 UTC Comment hidden (spam)
Comment 13 charlly 2019-12-16 05:21:56 UTC Comment hidden (spam)
Comment 14 nacy 2020-04-18 10:25:03 UTC Comment hidden (spam)