summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zforlist.cxx3
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx6
2 files changed, 6 insertions, 3 deletions
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index ae0a1635f5a5..1a3438008369 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -3527,6 +3527,9 @@ const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry( bool & bFoundBank,
LanguageType eExtLang;
if ( nExtLen )
{
+ // rExtension should be a 16-bit hex value max FFFF which may contain a
+ // leading "-" separator (that is not a minus sign, but toInt32 can be
+ // used to parse it, with post-processing as necessary):
sal_Int32 nExtLang = rExtension.toInt32( 16 );
if ( !nExtLang )
{
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 8cf17ee186a8..3e9c3b0b9275 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -118,7 +118,7 @@ static vector< OUString > getInfoFromInd( OUString aInd )
aNum += OUString::valueOf( (sal_Unicode) pLine[i] );
}
- newItem += OUString::valueOf( (sal_Unicode) aNum.toInt32( 16 ) );
+ newItem += OUString::valueOf( (sal_Unicode) aNum.toUInt32( 16 ) );
pLine += 3;
}
@@ -482,7 +482,7 @@ vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLine, co
unsigned char code[RTL_DIGEST_LENGTH_MD5];
for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ )
- code[ ind ] = (char)(aMasterPasswd.copy( ind*2, 2 ).toInt32(16));
+ code[ ind ] = (char)(aMasterPasswd.copy( ind*2, 2 ).toUInt32(16));
rtlCipherError result = rtl_cipher_init (
aDecoder, rtl_Cipher_DirectionDecode,
@@ -536,7 +536,7 @@ OUString PasswordContainer::EncodePasswords( vector< OUString > lines, const OUS
unsigned char code[RTL_DIGEST_LENGTH_MD5];
for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ )
- code[ ind ] = (char)(aMasterPasswd.copy( ind*2, 2 ).toInt32(16));
+ code[ ind ] = (char)(aMasterPasswd.copy( ind*2, 2 ).toUInt32(16));
rtlCipherError result = rtl_cipher_init (
aEncoder, rtl_Cipher_DirectionEncode,