filter/qa/cppunit/filters-pict-test.cxx | 4 ++-- vcl/qa/cppunit/svm/svmtest.cxx | 4 ++-- vcl/source/gdi/mtfxmldump.cxx | 11 ++++++++--- 3 files changed, 12 insertions(+), 7 deletions(-)
New commits: commit bd2eed385f5827e3b7f3510d4f83be03d548d418 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Jul 15 15:38:17 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Jul 16 08:09:56 2019 +0200 write out empty state explicitly in writeRectangle this is purely an internal XML format, so we can change it Change-Id: I9e2a4350c6c3f51031742e94823ea052dd73c8df Reviewed-on: https://gerrit.libreoffice.org/75639 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/filter/qa/cppunit/filters-pict-test.cxx b/filter/qa/cppunit/filters-pict-test.cxx index 67a04c52e159..a7824e4e929c 100644 --- a/filter/qa/cppunit/filters-pict-test.cxx +++ b/filter/qa/cppunit/filters-pict-test.cxx @@ -92,8 +92,8 @@ void PictFilterTest::testDontClipTooMuch() assertXPath(pDoc, "/metafile/clipregion[5]", "top", "0"); assertXPath(pDoc, "/metafile/clipregion[5]", "left", "0"); - assertXPath(pDoc, "/metafile/clipregion[5]", "bottom", "-32767"); - assertXPath(pDoc, "/metafile/clipregion[5]", "right", "-32767"); + assertXPath(pDoc, "/metafile/clipregion[5]", "bottom", "empty"); + assertXPath(pDoc, "/metafile/clipregion[5]", "right", "empty"); } CPPUNIT_TEST_SUITE_REGISTRATION(PictFilterTest); diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx index d2f096f4452e..00541e7f2b8f 100644 --- a/vcl/qa/cppunit/svm/svmtest.cxx +++ b/vcl/qa/cppunit/svm/svmtest.cxx @@ -1250,8 +1250,8 @@ void SvmTest::checkWallpaper(const GDIMetaFile& rMetaFile) { {"left", "0"}, {"top", "0"}, - {"right", "-32767"}, - {"bottom", "-32767"}, + {"right", "empty"}, + {"bottom", "empty"}, }); assertXPathAttrs(pDoc, "/metafile/wallpaper[1]/wallpaper", diff --git a/vcl/source/gdi/mtfxmldump.cxx b/vcl/source/gdi/mtfxmldump.cxx index c679b08e86e6..00ea60334b33 100644 --- a/vcl/source/gdi/mtfxmldump.cxx +++ b/vcl/source/gdi/mtfxmldump.cxx @@ -459,9 +459,14 @@ void writeRectangle(tools::XmlWriter& rWriter, tools::Rectangle const& rRectangl { rWriter.attribute("left", rRectangle.Left()); rWriter.attribute("top", rRectangle.Top()); - // FIXME what should we write for empty? - rWriter.attribute("right", rRectangle.IsWidthEmpty() ? -32767 : rRectangle.Right()); - rWriter.attribute("bottom", rRectangle.IsHeightEmpty() ? -32767 : rRectangle.Bottom()); + if (rRectangle.IsWidthEmpty()) + rWriter.attribute("right", OString("empty")); + else + rWriter.attribute("right", rRectangle.Right()); + if (rRectangle.IsHeightEmpty()) + rWriter.attribute("bottom", OString("empty")); + else + rWriter.attribute("bottom", rRectangle.Bottom()); } void writeLineInfo(tools::XmlWriter& rWriter, LineInfo const& rLineInfo) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits