fdo#74605 negative value for wp:extents value causing corruption
Description: After roundtrip <wp:extent cx="-22327235" cy="149225" /> The cx value is negative so that the roundtrip file gives error while opening. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/7898 Change-Id: I563f292ac5aaaeb0726159db1f4852a7e237f7ea
This commit is contained in:
committed by
Miklos Vajna
parent
e7aab255c1
commit
0ff99adddc
BIN
sw/qa/extras/ooxmlexport/data/fdo74605.docx
Normal file
BIN
sw/qa/extras/ooxmlexport/data/fdo74605.docx
Normal file
Binary file not shown.
@@ -3190,6 +3190,14 @@ DECLARE_OOXMLEXPORT_TEST(testOuterShdw,"testOuterShdw.docx")
|
|||||||
assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[3]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:effectLst[1]/a:outerShdw[1]", "dist", "57811035");
|
assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[3]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:effectLst[1]/a:outerShdw[1]", "dist", "57811035");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DECLARE_OOXMLEXPORT_TEST(testExtentValue, "fdo74605.docx")
|
||||||
|
{
|
||||||
|
xmlDocPtr pXmlDoc = parseExport();
|
||||||
|
if (!pXmlDoc)
|
||||||
|
return;
|
||||||
|
assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/wp:extent","cx","0");
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CPPUNIT_PLUGIN_IMPLEMENT();
|
CPPUNIT_PLUGIN_IMPLEMENT();
|
||||||
|
@@ -348,8 +348,8 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS
|
|||||||
OString aWidth(OString::number(TwipsToEMU(rSize.Width())));
|
OString aWidth(OString::number(TwipsToEMU(rSize.Width())));
|
||||||
OString aHeight(OString::number(TwipsToEMU(rSize.Height())));
|
OString aHeight(OString::number(TwipsToEMU(rSize.Height())));
|
||||||
m_pImpl->m_pSerializer->singleElementNS(XML_wp, XML_extent,
|
m_pImpl->m_pSerializer->singleElementNS(XML_wp, XML_extent,
|
||||||
XML_cx, aWidth.getStr(),
|
XML_cx, (rSize.Width() > 0 ? aWidth.getStr() : "0"),
|
||||||
XML_cy, aHeight.getStr(),
|
XML_cy, (rSize.Height() > 0 ? aHeight.getStr() : "0"),
|
||||||
FSEND);
|
FSEND);
|
||||||
|
|
||||||
// effectExtent, extent including the effect (shadow only for now)
|
// effectExtent, extent including the effect (shadow only for now)
|
||||||
|
Reference in New Issue
Block a user