summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorDinesh Patil <dinesh.patil@synerzip.com>2014-05-16 16:05:47 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-05-20 11:33:07 +0200
commitdf973e6e950591c0c36f2bbbb761e43ec23b9964 (patch)
treec92b83539d9c7b13d66250be79b6862fff6d25b2 /sw
parent423921b085de43f53e42f957889dd96378d2c3c4 (diff)
fdo#78658 Corruption: lockedCanvas tag is missing from RT file
While export, locked Canvas is missing and drawing is exported inside textbox. However a locked Canvas has to be exported inside a text-box and drawing should fall under locked Canvas for the RT file to work in MS Office 2010. Reviewed on: https://gerrit.libreoffice.org/9377 Change-Id: Iea2c411302b552db18527001cc4c6d0290085afe
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78658.docxbin0 -> 54504 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx9
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78658.docx b/sw/qa/extras/ooxmlexport/data/fdo78658.docx
new file mode 100644
index 000000000000..1c0782e981e6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78658.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 90021c55ba99..f69396fbad1b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -2984,6 +2984,15 @@ DECLARE_OOXMLEXPORT_TEST(testFdo76016, "fdo76016.docx")
assertXPath(pXmlDoc, "//a:graphic/a:graphicData/wps:wsp/wps:spPr/a:prstGeom/a:avLst/a:gd[2]", "name", "adj2");
}
+DECLARE_OOXMLEXPORT_TEST(testLockedCanvas, "fdo78658.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return;
+ // Checking for lockedCanvas tag
+ assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[2]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:txbx[1]/w:txbxContent[1]/w:p[1]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:inline[1]/a:graphic[1]/a:graphicData[1]/lc:lockedCanvas[1]", 1);
+}
+
DECLARE_OOXMLEXPORT_TEST(testFileWithInvalidImageLink, "FileWithInvalidImageLink.docx")
{
/* In case if the original file has an image whose link is