summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorAdam Kovacs <christo161@gmail.com>2018-10-05 08:24:08 -0400
committerLászló Németh <nemeth@numbertext.org>2018-10-08 16:34:31 +0200
commit47c3b0390e5ad5a894488c47f014cdd7ecba7d2e (patch)
tree92c2fd8018347ad9ed657f7b32868ad0c4f12d64 /sw
parentf3ce30ec75a4d7116b9cd4d7b21d9aaa0e237eeb (diff)
tdf#108064 OOXML export: convert LO preset dashes to equivalent MSO presets
Change-Id: I967dfdc6a49cf04d98ea9fa9b57bf4669126a585 Reviewed-on: https://gerrit.libreoffice.org/61417 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rwxr-xr-xsw/qa/extras/ooxmlexport/data/lo_preset_dashes.odtbin0 -> 11876 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport11.cxx15
2 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/lo_preset_dashes.odt b/sw/qa/extras/ooxmlexport/data/lo_preset_dashes.odt
new file mode 100755
index 000000000000..b9b8a79d46da
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/lo_preset_dashes.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 812ff0c09f45..dd9a6c8ceb12 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -783,6 +783,21 @@ DECLARE_OOXMLEXPORT_TEST(testTdf64264, "tdf64264.docx")
parseDump("/root/page[2]/body/tab/row[2]/cell[1]/txt/text()"));
}
+DECLARE_OOXMLEXPORT_TEST(testLOPresetDashesConvert, "lo_preset_dashes.odt")
+{
+ // File asserting while saving in LO.
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ 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");
+ 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[3]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash", "val", "sysDot");
+ 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", "dot");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[8]/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[9]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash", "val", "sysDashDotDot");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[10]/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash", "val", "sysDash");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */