diff options
author | Rohit Deshmukh <rohit.deshmukh@synerzip.com> | 2014-06-09 15:41:57 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-06-11 10:29:49 +0200 |
commit | 88f84eb1b0eebbb7e0a072f1e7001a9207ebbe9e (patch) | |
tree | 960bdd3b09fe150937bdf3b0aa36e2fed049636a | |
parent | fdo#79540 : DOCX: Lo exports Drawing inside Drawing (diff) | |
download | core-88f84eb1b0eebbb7e0a072f1e7001a9207ebbe9e.tar.gz core-88f84eb1b0eebbb7e0a072f1e7001a9207ebbe9e.zip |
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
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/fdo79817.docx | bin | 0 -> 24385 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 9 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79817.docx b/sw/qa/extras/ooxmlexport/data/fdo79817.docx Binary files differnew file mode 100644 index 000000000000..4194c43a9a91 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/fdo79817.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 30f748033d48..5310ce21d11f 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 7e7c4a01fca9..ff6986e1b38b 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; |