[Libreoffice-bugs] [Bug 108064] [FILESAVE DOCX] Border Line Style property of the data series not preserved when saved as DOCX

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Jul 26 06:41:16 UTC 2018


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

--- Comment #6 from Adam Kovacs <christo161 at gmail.com> ---
Hello!
I've noticed that if you make the docx file with MS Word, inside the unzipped
docx folder in the chart1.xml file there are a tag something like: <a:prstDash
val="dash"/> or <a:prstDash val="sysDot"/> or <a:prstDash val="lgDashDotDot"/>.
The value of val="something" certainly depends on the custom line style you
chose (for example sysdot is also like normal dashes, and lgDashDotDot contains
more than one dashes and dots).
When you save the docx file with LibreOffice Writer, this a:prstdash tag will
be removed and there will be an <a:custDash/> tag instead of it/them (without
val="something").
If you save the file with LibreOffice Writer (...then it loses the custom line
style of course...) and manually edit the chart1.xml file, and delete the
<a:custDash/> tag, and instert an appropriate tag (for example a <a:prstDash
val="dash"/>) instead of it, rezip the contents of the folder and rename it to
docx, the custom line style will work again, and it will have the same look (I
havent tried all of the custom styles, just a few one).

(You can check out and edit the xml files with xml copy or open xml sdk. Open
xml sdk can also compare two xml files).

I guess the responsible code for this, is in the WriteOutLine function in the
https://opengrok.libreoffice.org/xref/core/oox/source/export/drawingml.cxx#573
file, starting at the line 700, with this: if( bDashSet && aStyleLineStyle !=
drawing::LineStyle_DASH ). Currently I have no idea how to solve it. I tried to
rename XML_custdash macros to XML_prstDash, but thats not working. I also tried
to delete the else block and the if header, and the result was losing the
custom dash property, but the line style wont be continous, instead of it it
will be dashed with long dashes and long spacing. Can somebody help? :)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180726/3688330a/attachment.html>


More information about the Libreoffice-bugs mailing list