From 9a1de2cfdf2ac4d43d465556390025b427ddb688 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 9 Aug 2023 14:39:58 +0200 Subject: [PATCH] use sal_uInt64 when dealing with stream position Change-Id: I0752d158c648f6ebfa17c9273bab2176e1ca6c83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155518 Tested-by: Jenkins Reviewed-by: Noel Grandin --- unotools/source/streaming/streamwrap.cxx | 4 ++-- unotools/source/ucbhelper/tempfile.cxx | 2 +- unotools/source/ucbhelper/xtempfile.cxx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/unotools/source/streaming/streamwrap.cxx b/unotools/source/streaming/streamwrap.cxx index 2f8a86981194..beb909f36bee 100644 --- a/unotools/source/streaming/streamwrap.cxx +++ b/unotools/source/streaming/streamwrap.cxx @@ -185,7 +185,7 @@ sal_Int64 SAL_CALL OSeekableInputStreamWrapper::getPosition( ) std::scoped_lock aGuard( m_aMutex ); checkConnected(); - sal_uInt32 nPos = m_pSvStream->Tell(); + sal_uInt64 nPos = m_pSvStream->Tell(); checkError(); return static_cast(nPos); } @@ -264,7 +264,7 @@ void SAL_CALL OSeekableOutputStreamWrapper::seek( sal_Int64 _nLocation ) sal_Int64 SAL_CALL OSeekableOutputStreamWrapper::getPosition( ) { - sal_uInt32 nPos = rStream.Tell(); + sal_uInt64 nPos = rStream.Tell(); checkError(); return static_cast(nPos); } diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx index 4c6749226d77..992ff8814d7f 100644 --- a/unotools/source/ucbhelper/tempfile.cxx +++ b/unotools/source/ucbhelper/tempfile.cxx @@ -760,7 +760,7 @@ sal_Int64 SAL_CALL TempFileFastService::getPosition() std::unique_lock aGuard( maMutex ); checkConnected(); - sal_uInt32 nPos = mpStream->Tell(); + sal_uInt64 nPos = mpStream->Tell(); checkError(); return static_cast(nPos); } diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx index 8c1da6c98504..5e0cf5cbdb22 100644 --- a/unotools/source/ucbhelper/xtempfile.cxx +++ b/unotools/source/ucbhelper/xtempfile.cxx @@ -271,7 +271,7 @@ sal_Int64 SAL_CALL OTempFileService::getPosition( ) std::unique_lock aGuard( maMutex ); checkConnected(); - sal_uInt32 nPos = mpStream->Tell(); + sal_uInt64 nPos = mpStream->Tell(); checkError(); return static_cast(nPos); }