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
This commit is contained in:
committed by
Miklos Vajna
parent
423921b085
commit
df973e6e95
@@ -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,
|
// These can have a custom geometry, so position should be set here,
|
||||||
// after creation but before custom shape handling, using the position
|
// after creation but before custom shape handling, using the position
|
||||||
// we got from the caller.
|
// we got from the caller.
|
||||||
|
BIN
sw/qa/extras/ooxmlexport/data/fdo78658.docx
Normal file
BIN
sw/qa/extras/ooxmlexport/data/fdo78658.docx
Normal file
Binary file not shown.
@@ -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");
|
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")
|
DECLARE_OOXMLEXPORT_TEST(testFileWithInvalidImageLink, "FileWithInvalidImageLink.docx")
|
||||||
{
|
{
|
||||||
/* In case if the original file has an image whose link is
|
/* In case if the original file has an image whose link is
|
||||||
|
Reference in New Issue
Block a user