summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorPallavi Jadhav <pallavi.jadhav@synerzip.com>2014-01-21 19:49:45 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-01-29 10:24:51 +0100
commit0fc0acb52529a3cc8e2ff2c17e074cf6ac8ba1a7 (patch)
tree5a96baec995a5a1d19d751dc4cd7ee80a88345b7 /sw
parent5ac84cb1658de7ebf3f1b52408bd0c56906dd510 (diff)
Fix for :DOCX-Preservation of Line style Dash type of "Shape with text inside"
Issue : File containing Shape with text inside it having Line style as Dash type is not getting preserved after RT. Implementation : 1] Added XML element <a:prstDash> with attribute val="dash". 2] Written Export Unit test case. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/7572 Change-Id: I27ca9f8786426a224b32dbd2aeabc40be244c9db
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/LineStyle_DashType.docxbin0 -> 15661 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx11
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
3 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/LineStyle_DashType.docx b/sw/qa/extras/ooxmlexport/data/LineStyle_DashType.docx
new file mode 100644
index 000000000000..9256c3ec7a4e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/LineStyle_DashType.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 771c2c5ac8a2..746422e368e4 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2687,6 +2687,17 @@ DECLARE_OOXMLEXPORT_TEST(testAlignForShape,"Shape.docx")
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp:positionH/wp:align","1");
}
+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".
+ */
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:ln/a:prstDash", "val", "dash");
+}
+
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 7c15a2244712..caf2635800e6 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -5810,6 +5810,8 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
XML_val, sColor,
FSEND);
m_pSerializer->endElementNS(XML_a, XML_solidFill);
+ if( LineStyle_DASH == pTop->GetBorderLineStyle() ) // Line Style is Dash type
+ m_pSerializer->singleElementNS(XML_a, XML_prstDash, XML_val, "dash", FSEND);
m_pSerializer->endElementNS(XML_a, XML_ln);
}
}