sw/qa/extras/ooxmlexport/data/fdo74605.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 8 ++++++++ sw/source/filter/ww8/docxsdrexport.cxx | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-)
New commits: commit 0ff99adddc104ca09a97c2fd3d25e58787afb32d Author: PriyankaGaikwad <priyanka.gaik...@synerzip.com> Date: Thu Feb 6 16:40:17 2014 +0530 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 diff --git a/sw/qa/extras/ooxmlexport/data/fdo74605.docx b/sw/qa/extras/ooxmlexport/data/fdo74605.docx new file mode 100644 index 0000000..85231f1 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo74605.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index ccbdc63..722c455 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -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"); } +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 CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 0f3138b..cefb62f 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -348,8 +348,8 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rS OString aWidth(OString::number(TwipsToEMU(rSize.Width()))); OString aHeight(OString::number(TwipsToEMU(rSize.Height()))); m_pImpl->m_pSerializer->singleElementNS(XML_wp, XML_extent, - XML_cx, aWidth.getStr(), - XML_cy, aHeight.getStr(), + XML_cx, (rSize.Width() > 0 ? aWidth.getStr() : "0"), + XML_cy, (rSize.Height() > 0 ? aHeight.getStr() : "0"), FSEND); // effectExtent, extent including the effect (shadow only for now) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits