diff options
author | Dinesh Patil <dinesh.patil@synerzip.com> | 2014-06-12 11:34:32 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-06-20 09:44:33 +0200 |
commit | 7ea1bbe712cef48a97faffdf03b45f2812a93e62 (patch) | |
tree | e35282f22e5b22ef30e0a8cf4e19a8f13b3c5fc1 /sw/qa | |
parent | 67f64c266cd5a0368eff0be727228bc6a9c67cb2 (diff) |
fdo#79591 Values for docPr name and shape ID attributes were set invalid
Values set for docPr name and shape ID attributes in RT file were not valid
as per UTF-8 encoding format and hence was showing RT document as corrupt with
error message "invalid character".
Calling add() function with current parameters is causing issue and
setting invalid values so modified the second parameter which will
set valid values to the specified parameters.
Reviewed on:
https://gerrit.libreoffice.org/9746
Change-Id: I3b48e53adbe5ed844235e596bb98eb396133845a
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/fdo79591.docx | bin | 0 -> 25140 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx | 15 |
2 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo79591.docx b/sw/qa/extras/ooxmlexport/data/fdo79591.docx Binary files differnew file mode 100644 index 000000000000..32a61debd4b1 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/fdo79591.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx index 25a6cf7f8222..20ee7c38ebec 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx @@ -1811,6 +1811,21 @@ DECLARE_OOXMLEXPORT_TEST(testTextboxRoundedCorners, "textbox-rounded-corners.doc CPPUNIT_ASSERT_EQUAL(OUString("a"), xCell->getString()); } +DECLARE_OOXMLEXPORT_TEST(testfdo79591, "fdo79591.docx") +{ + /* Values set for docPr name and shape ID attributes + * in RT file were not valid as per UTF-8 encoding format + * and hence was showing RT document as corrupt with error + * message "invalid character" + */ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + if (!pXmlDoc) + return; + + assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp:docPr", "name", ""); + assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:shape", "ID", ""); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); |