summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
diff options
context:
space:
mode:
authorAdam Kovacs <christo161@gmail.com>2018-08-16 09:32:17 -0400
committerAndras Timar <andras.timar@collabora.com>2018-09-12 09:43:30 +0200
commit39cc0cdaf7fb6c290a2c787b2e41437d4723ca8c (patch)
treeb0b03e9a0dcdf81f5a8ba4ba7f3371e78c723d07 /sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
parent515d3f22716b42b5afafc66a0ea3aa4e783e7833 (diff)
tdf108064 OOXML export: keep preset dashes in shape outlines
Extending commit d7551e32609d0e0de8ac419576ca42d65c5015be to all default MSO 2016 preset dashes: Saving an ooxml file with LibreOffice now preserves the prstDash tags with the values sysDot, sysDash, dash, dashDot, lgDash, lgDashDot, lgDashDotDot, instead of converting them to custDash tags. Note: the import of the preset dash outlines are still not relative to the line width, in spite of their original behaviour in MSO. Change-Id: I65eaf06952a968019495664067010c874fce1352 Reviewed-on: https://gerrit.libreoffice.org/59203 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> (cherry picked from commit f5f235051055d24c8aced602078c54261603efea)
Diffstat (limited to 'sw/qa/extras/ooxmlexport/ooxmlexport6.cxx')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport6.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index dbed9fc22384..9eda5e4ee205 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -823,13 +823,19 @@ DECLARE_OOXMLEXPORT_TEST(testAlignForShape,"Shape.docx")
DECLARE_OOXMLEXPORT_TEST(testLineStyle_DashType, "LineStyle_DashType.docx")
{
/* DOCX contatining Shape with LineStyle as Dash Type should get preserved inside
- * an XMl tag <a:prstDash> with value "dash".
+ * an XMl tag <a:prstDash> with value "dash", "sysDot", "lgDot", etc.
*/
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
if (!pXmlDoc)
return;
- assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash", "val", "dash");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[7]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash", "val", "lgDashDotDot");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[6]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash", "val", "lgDashDot");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[5]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash", "val", "lgDash");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[4]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash", "val", "dashDot");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[3]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash", "val", "dash");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[2]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash", "val", "sysDash");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash", "val", "sysDot");
}
DECLARE_OOXMLEXPORT_TEST(testGradientFillPreservation, "gradient-fill-preservation.docx")