summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx5
-rw-r--r--vcl/source/filter/itiff/itiff.cxx7
2 files changed, 9 insertions, 3 deletions
diff --git a/vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx
index d4fdeea43524..72f12ca565f5 100644
--- a/vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx
+++ b/vcl/qa/cppunit/graphicfilter/filters-tiff-test.cxx
@@ -113,7 +113,6 @@ void TiffFilterTest::testTdf115863()
CPPUNIT_ASSERT_EQUAL(tools::Long(618), aSize.Height());
}
-//TODO-check if this is still correct, looks ok, but what was it testing exactly
void TiffFilterTest::testTdf138818()
{
OUString aURL = getUrl() + "tdf138818.tif";
@@ -126,9 +125,9 @@ void TiffFilterTest::testTdf138818()
CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, bResult);
// Without the fix in place, this test would have failed with
- // - Expected: 45953
+ // - Expected: 46428
// - Actual : 45951
- CPPUNIT_ASSERT_EQUAL(sal_uInt32(45953), aGraphic.GetGfxLink().GetDataSize());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt32(46428), aGraphic.GetGfxLink().GetDataSize());
}
void TiffFilterTest::testTdf74331()
diff --git a/vcl/source/filter/itiff/itiff.cxx b/vcl/source/filter/itiff/itiff.cxx
index 672ef92d902a..1a7e48d1a3e9 100644
--- a/vcl/source/filter/itiff/itiff.cxx
+++ b/vcl/source/filter/itiff/itiff.cxx
@@ -113,6 +113,8 @@ bool ImportTiffGraphicImport(SvStream& rTIFF, Graphic& rGraphic)
if (!tif)
return false;
+ const auto nOrigPos = rTIFF.Tell();
+
Animation aAnimation;
do
@@ -246,9 +248,14 @@ bool ImportTiffGraphicImport(SvStream& rTIFF, Graphic& rGraphic)
rGraphic = aAnimation.GetBitmapEx();
else
rGraphic = aAnimation;
+
+ // seek to end of TIFF if succeeded
+ rTIFF.Seek(STREAM_SEEK_TO_END);
+
return true;
}
+ rTIFF.Seek(nOrigPos);
return false;
}