diff options
author | Rohit Deshmukh <rohit.deshmukh@synerzip.com> | 2014-06-09 15:41:57 +0530 |
---|---|---|
committer | Jacobo Aragunde Pérez <jaragunde@igalia.com> | 2014-06-11 10:25:45 +0000 |
commit | 73d1c167c029594eb0be8eb24c065de39b9f69ab (patch) | |
tree | ef3897e2ac57347ff741e09c4542cbc3821c3a9f /sw | |
parent | f817dac57c748dd156cd9bacf8368dd561de88d4 (diff) |
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
(cherry picked from commit 88f84eb1b0eebbb7e0a072f1e7001a9207ebbe9e)
Reviewed-on: https://gerrit.libreoffice.org/9729
Reviewed-by: Jacobo Aragunde Pérez <jaragunde@igalia.com>
Tested-by: Jacobo Aragunde Pérez <jaragunde@igalia.com>
Diffstat (limited to 'sw')
-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 668caa33c4cf..9a1948568dbb 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -3489,6 +3489,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 3eba470c7fe7..5cfda6e80873 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -7423,7 +7423,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; |