diff options
author | Johannes Hauf <hauf.johannes@gmail.com> | 2015-12-31 10:58:37 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-01-07 14:13:49 +0000 |
commit | bccd83ea5434f945c22d0c45dbc2c3d13efdffee (patch) | |
tree | 22bb90c43394cf3ee281e6c97972d2e207b057b1 /basic | |
parent | 59ae2d11d5884ffdf77dec95d8cd2566943fd789 (diff) |
Some cleanup for sal_uIntPtr usage
Change-Id: Ia9779e6477d8848588f3543d09ea6b4477f594a2
Reviewed-on: https://gerrit.libreoffice.org/21022
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/basmgr/basicmanagerrepository.cxx | 2 | ||||
-rw-r--r-- | basic/source/classes/image.cxx | 28 | ||||
-rw-r--r-- | basic/source/classes/sb.cxx | 6 | ||||
-rw-r--r-- | basic/source/inc/iosys.hxx | 8 |
4 files changed, 22 insertions, 22 deletions
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index de559e99c94b..fd2dc803debc 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -599,7 +599,7 @@ namespace basic void BasicManagerRepository::resetApplicationBasicManager() { - return ImplRepository::Instance().setApplicationBasicManager( nullptr ); + ImplRepository::Instance().setApplicationBasicManager( nullptr ); } diff --git a/basic/source/classes/image.cxx b/basic/source/classes/image.cxx index a487e62ea9e8..d79c21c21306 100644 --- a/basic/source/classes/image.cxx +++ b/basic/source/classes/image.cxx @@ -83,17 +83,17 @@ bool SbiGood( SvStream& r ) } // Open Record -sal_uIntPtr SbiOpenRecord( SvStream& r, sal_uInt16 nSignature, sal_uInt16 nElem ) +sal_uInt64 SbiOpenRecord( SvStream& r, sal_uInt16 nSignature, sal_uInt16 nElem ) { - sal_Size nPos = r.Tell(); + sal_uInt64 nPos = r.Tell(); r.WriteUInt16( nSignature ).WriteInt32( 0 ).WriteUInt16( nElem ); return nPos; } // Close Record -void SbiCloseRecord( SvStream& r, sal_Size nOff ) +void SbiCloseRecord( SvStream& r, sal_uInt64 nOff ) { - sal_Size nPos = r.Tell(); + sal_uInt64 nPos = r.Tell(); r.Seek( nOff + 2 ); r.WriteInt32(nPos - nOff - 8 ); r.Seek( nPos ); @@ -114,7 +114,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion ) Clear(); // Read Master-Record r.ReadUInt16( nSign ).ReadUInt32( nLen ).ReadUInt16( nCount ); - sal_Size nLast = r.Tell() + nLen; + sal_uInt64 nLast = r.Tell() + nLen; sal_uInt32 nCharSet; // System charset sal_uInt32 lDimBase; sal_uInt16 nReserved1; @@ -135,7 +135,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion ) bool bLegacy = ( nVersion < B_EXT_IMG_VERSION ); - sal_Size nNext; + sal_uInt64 nNext; while( ( nNext = r.Tell() ) < nLast ) { @@ -160,7 +160,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion ) { //assuming an empty string with just the lead 32bit/16bit len indicator const size_t nMinStringSize = (eCharSet == RTL_TEXTENCODING_UNICODE) ? 4 : 2; - const size_t nMaxStrings = r.remainingSize() / nMinStringSize; + const sal_uInt64 nMaxStrings = r.remainingSize() / nMinStringSize; if (nCount > nMaxStrings) { SAL_WARN("basic", "Parsing error: " << nMaxStrings << @@ -207,8 +207,8 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion ) { if( bBadVer ) break; //assuming an empty string with just the lead 32bit len indicator - const size_t nMinStringSize = 4; - const size_t nMaxStrings = r.remainingSize() / nMinStringSize; + const sal_uInt64 nMinStringSize = 4; + const sal_uInt64 nMaxStrings = r.remainingSize() / nMinStringSize; if (nCount > nMaxStrings) { SAL_WARN("basic", "Parsing error: " << nMaxStrings << @@ -244,8 +244,8 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion ) { //assuming an empty string with just the lead 32bit/16bit len indicator const size_t nMinStringSize = (eCharSet == RTL_TEXTENCODING_UNICODE) ? 4 : 2; - const size_t nMinRecordSize = nMinStringSize + sizeof(sal_Int16); - const size_t nMaxRecords = r.remainingSize() / nMinRecordSize; + const sal_uInt64 nMinRecordSize = nMinStringSize + sizeof(sal_Int16); + const sal_uInt64 nMaxRecords = r.remainingSize() / nMinRecordSize; if (nCount > nMaxRecords) { SAL_WARN("basic", "Parsing error: " << nMaxRecords << @@ -261,7 +261,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion ) sal_uInt16 nTypeMembers; r.ReadUInt16(nTypeMembers); - const size_t nMaxTypeMembers = r.remainingSize() / 8; + const sal_uInt64 nMaxTypeMembers = r.remainingSize() / 8; if (nTypeMembers > nMaxTypeMembers) { SAL_WARN("basic", "Parsing error: " << nMaxTypeMembers << @@ -375,8 +375,8 @@ bool SbiImage::Save( SvStream& r, sal_uInt32 nVer ) return true; } // First of all the header - sal_uIntPtr nStart = SbiOpenRecord( r, B_MODULE, 1 ); - sal_uIntPtr nPos; + sal_uInt64 nStart = SbiOpenRecord( r, B_MODULE, 1 ); + sal_uInt64 nPos; eCharSet = GetSOStoreTextEncoding( eCharSet ); if ( bLegacy ) diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 6b2a78db441e..cd713e431e3c 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -1679,7 +1679,7 @@ bool StarBASIC::CError( SbError code, const OUString& rMsg, // Implementation of the code for the string transport to SFX-Error if( !rMsg.isEmpty() ) { - code = (sal_uIntPtr)*new StringErrorInfo( code, rMsg ); + code = (SbError)*new StringErrorInfo( code, rMsg ); } SetErrorData( code, l, c1, c2 ); GetSbData()->bCompiler = true; @@ -1723,11 +1723,11 @@ bool StarBASIC::RTError( SbError code, const OUString& rMsg, sal_Int32 l, sal_In { OUString aTmp = "\'" + OUString::number(SbxErrObject::getUnoErrObject()->getNumber()) + "\'\n" + OUString(!GetSbData()->aErrMsg.isEmpty() ? GetSbData()->aErrMsg : rMsg); - code = (sal_uIntPtr)*new StringErrorInfo( code, aTmp ); + code = (SbError)*new StringErrorInfo( code, aTmp ); } else { - code = (sal_uIntPtr)*new StringErrorInfo( code, rMsg ); + code = (SbError)*new StringErrorInfo( code, rMsg ); } } diff --git a/basic/source/inc/iosys.hxx b/basic/source/inc/iosys.hxx index a7e7398f5fe4..1b9964b89671 100644 --- a/basic/source/inc/iosys.hxx +++ b/basic/source/inc/iosys.hxx @@ -48,9 +48,9 @@ namespace o3tl class SbiStream { SvStream* pStrm; - sal_uIntPtr nExpandOnWriteTo; // during writing access expand the stream to this size + sal_uInt64 nExpandOnWriteTo; // during writing access expand the stream to this size OString aLine; - sal_uIntPtr nLine; + sal_uInt64 nLine; short nLen; // buffer length SbiStreamFlags nMode; short nChan; @@ -73,8 +73,8 @@ public: bool IsAppend() const { return bool(nMode & SbiStreamFlags::Append); } short GetBlockLen() const { return nLen; } SbiStreamFlags GetMode() const { return nMode; } - sal_uIntPtr GetLine() const { return nLine; } - void SetExpandOnWriteTo( sal_uIntPtr n ) { nExpandOnWriteTo = n; } + sal_uInt64 GetLine() const { return nLine; } + void SetExpandOnWriteTo( sal_uInt64 n ) { nExpandOnWriteTo = n; } void ExpandFile(); SvStream* GetStrm() { return pStrm; } }; |