diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 33c846cd5d92..ca42d4a5d9f1 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 000000000000..1c0782e981e6 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 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