summaryrefslogtreecommitdiff
path: root/emfio/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-05-29 18:49:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-30 19:04:56 +0200
commit5f260ecaddbd2b93de18f5223a7a732bcff280d9 (patch)
tree0299591ba49a581741ca4f55577a0755172b4101 /emfio/source
parentbc6ce96f7994a25f3789a9035e877bba41e1cda3 (diff)
tdf#133448 tdf#133435 ignore broken rectangles so can we load dodgy EMF/WMF
regression from commit 059f07f9f33460c809a93e0fda1165f5c6f6d805 fixes for code creating reversed Rectangles Change-Id: Ia4d41ac6845afcae3da1c259d8fbf48aa7db3489 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95165 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'emfio/source')
-rw-r--r--emfio/source/reader/emfreader.cxx3
-rw-r--r--emfio/source/reader/wmfreader.cxx3
2 files changed, 2 insertions, 4 deletions
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx
index 252015bab2e6..5d2749d16356 100644
--- a/emfio/source/reader/emfreader.cxx
+++ b/emfio/source/reader/emfreader.cxx
@@ -2091,8 +2091,7 @@ namespace emfio
if (nLeft > nRight || nTop > nBottom)
{
SAL_WARN("emfio", "broken rectangle");
- mpInputStream->SetError( SVSTREAM_FILEFORMAT_ERROR );
- return tools::Rectangle();
+ return tools::Rectangle::Justify(Point(nLeft, nTop), Point(nRight, nBottom));
}
return tools::Rectangle(nLeft, nTop, nRight, nBottom);
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index 3f8af75bbd50..aa1c2be7a00e 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -168,8 +168,7 @@ namespace emfio
if (aTL.X() > aBR.X() || aTL.Y() > aBR.Y())
{
SAL_WARN("vcl.wmf", "broken rectangle");
- mpInputStream->SetError( SVSTREAM_FILEFORMAT_ERROR );
- return tools::Rectangle();
+ return tools::Rectangle::Justify(aTL, aBR);
}
return tools::Rectangle( aTL, aBR );
}