sw/qa/extras/ooxmlexport/data/fdo79817.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 9 +++++++++ sw/source/filter/ww8/docxattributeoutput.cxx | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-)
New commits: commit 88f84eb1b0eebbb7e0a072f1e7001a9207ebbe9e Author: Rohit Deshmukh <rohit.deshm...@synerzip.com> Date: Mon Jun 9 15:41:57 2014 +0530 fdo#79817:Fix for corruption having databinding have duplicates attributes File contains SDT content, in which after export databinding have duplicate attribute. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/9693 Change-Id: Ibe828964c054bdd5a63b5c0c903bc7441d953d72 diff --git a/sw/qa/extras/ooxmlexport/data/fdo79817.docx b/sw/qa/extras/ooxmlexport/data/fdo79817.docx new file mode 100644 index 0000000..4194c43 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo79817.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 30f7480..5310ce2 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -3563,6 +3563,15 @@ DECLARE_OOXMLEXPORT_TEST(testfdo79822, "fdo79822.docx") return; } +DECLARE_OOXMLEXPORT_TEST(testfdo79817,"fdo79817.docx") +{ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + if (!pXmlDoc) + return; + assertXPath ( pXmlDoc, "/w:document/w:body/w:p[3]/w:sdt/w:sdtPr/w:dataBinding", "storeItemID","{9222E47B-A68B-4AEB-9855-21C912B9D3D2}"); + assertXPath ( pXmlDoc, "/w:document/w:body/w:p[3]/w:sdt/w:sdtPr/w:dataBinding", "xpath","/ns0:properties[1]/documentManagement[1]/ns2:Responsible_x0020_Officer_x0020_Title[1]"); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 7e7c4a0..ff6986e 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -7518,7 +7518,7 @@ void DocxAttributeOutput::CharGrabBag( const SfxGrabBagItem& rItem ) rtl::OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() ); } } - else if (aPropertyValue.Name == "ooxml:CT_SdtPr_dataBinding") + else if (aPropertyValue.Name == "ooxml:CT_SdtPr_dataBinding" && m_pRunSdtPrDataBindingAttrs == NULL) { uno::Sequence<beans::PropertyValue> aGrabBag; aPropertyValue.Value >>= aGrabBag; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits