summaryrefslogtreecommitdiff
path: root/emfio
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-31 16:38:54 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-01 20:10:47 +0100
commitc4bac94488774c0d8b114075ee47307c96d017c2 (patch)
tree9c73bbd1530f5db58cca3d017eaba426085171bf /emfio
parent4fcdc190afe710c2530ea40e30609570519a5ff2 (diff)
de-sal_uLong emfio
Change-Id: If1fea844350446547c9f50d0316aedd50a3f4c25 Reviewed-on: https://gerrit.libreoffice.org/44161 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'emfio')
-rw-r--r--emfio/source/reader/wmfreader.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index cecd93a82ac0..2cb5eeb3f6de 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -1332,7 +1332,6 @@ namespace emfio
void WmfReader::ReadWMF()
{
sal_uInt16 nFunction;
- sal_uLong nPos;
mnSkipActions = 0;
mnCurrentAction = 0;
@@ -1352,7 +1351,7 @@ namespace emfio
if ( ReadHeader( ) )
{
- nPos = mpInputStream->Tell();
+ auto nPos = mpInputStream->Tell();
if( mnEndPos - mnStartPos )
{
@@ -1452,10 +1451,8 @@ namespace emfio
aBound.Bottom() = RECT_MIN;
bool bBoundsDetermined = false;
- sal_uInt32 nPos = pStm->Tell();
- sal_uInt32 nEnd = pStm->Seek( STREAM_SEEK_TO_END );
-
- pStm->Seek( nPos );
+ auto nPos = pStm->Tell();
+ auto nEnd = nPos + pStm->remainingSize();
Point aWinOrg(0,0);
boost::optional<Size> aWinExt;
@@ -1463,7 +1460,7 @@ namespace emfio
Point aViewportOrg(0,0);
boost::optional<Size> aViewportExt;
- if( nEnd - nPos )
+ if (nEnd - nPos)
{
sal_Int16 nMapMode = MM_ANISOTROPIC;
sal_uInt16 nFunction;
@@ -1763,12 +1760,12 @@ namespace emfio
break;
}
- const sal_uInt32 nAvailableBytes = nEnd - nPos;
- const sal_uInt32 nMaxPossibleRecordSize = nAvailableBytes/2;
+ const auto nAvailableBytes = nEnd - nPos;
+ const auto nMaxPossibleRecordSize = nAvailableBytes/2;
if (nRSize <= nMaxPossibleRecordSize)
{
nPos += nRSize * 2;
- pStm->Seek( nPos );
+ pStm->Seek(nPos);
}
else
{