Kaydet (Commit) df973e6e authored tarafından Dinesh Patil's avatar Dinesh Patil Kaydeden (comit) Miklos Vajna

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
üst 423921b0
......@@ -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.
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment