summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Budea <aron.budea@collabora.com>2018-02-24 04:13:51 +0100
committerAron Budea <aron.budea@collabora.com>2018-02-24 07:02:24 +0100
commit40c33132cfa6582dfccf17e787f10dd4dbd0819d (patch)
tree1e4c4cc03c5ed74e994440f495e8601828ca6c3d
parent93117a98e870804ad0ac0152e87355edd1dd5889 (diff)
tdf#115863: fix TIFF import
Regression from 651e1f6cda04468394c65c2fd88d915902ac0306 Change-Id: Id1604fb8eb11ea4e39846591e3912b40a7e7cc96 Reviewed-on: https://gerrit.libreoffice.org/50269 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Aron Budea <aron.budea@collabora.com>
-rw-r--r--filter/source/graphicfilter/itiff/itiff.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 2849fb776876..e19d6b2d5f9c 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -1394,7 +1394,7 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
bStatus = nPlanes != 0;
}
- sal_uInt32 nDiv = GetRowsPerStrip() + 1;
+ sal_uInt32 nDiv = GetRowsPerStrip();
if ( bStatus )
{
@@ -1405,7 +1405,7 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
{
if ( ( nFillOrder == 2 ) && ( nCompression != 5 ) ) // in the LZW mode bits are already being inverted
bByteSwap = true;
- nStripsPerPlane = ( nImageLength - 1 ) / nDiv;
+ nStripsPerPlane = ( nImageLength - 1 ) / nDiv + 1;
}
if ( bStatus )