oox/source/drawingml/shape.cxx | 6 ++++++ sw/qa/extras/ooxmlexport/data/fdo78658.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 9 +++++++++ 3 files changed, 15 insertions(+)
New commits: commit df973e6e950591c0c36f2bbbb761e43ec23b9964 Author: Dinesh Patil <dinesh.pa...@synerzip.com> Date: Fri May 16 16:05:47 2014 +0530 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 diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 33c846c..ca42d4a 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -962,6 +962,12 @@ Reference< XShape > Shape::createAndInsert( } } + else if( mbLockedCanvas ) + { + //If we have aServiceName as "com.sun.star.drawing.GroupShape" and lockedCanvas + putPropertyToGrabBag( "LockedCanvas", Any( true ) ); + } + // These can have a custom geometry, so position should be set here, // after creation but before custom shape handling, using the position // we got from the caller. diff --git a/sw/qa/extras/ooxmlexport/data/fdo78658.docx b/sw/qa/extras/ooxmlexport/data/fdo78658.docx new file mode 100644 index 0000000..1c0782e Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo78658.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 90021c5..f69396f 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits