diff options
Diffstat (limited to 'svx/source/dialog/txencbox.cxx')
-rw-r--r-- | svx/source/dialog/txencbox.cxx | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx index 751184e929c7..132ca585a87f 100644 --- a/svx/source/dialog/txencbox.cxx +++ b/svx/source/dialog/txencbox.cxx @@ -57,12 +57,12 @@ SvxTextEncodingBox::~SvxTextEncodingBox() //------------------------------------------------------------------------ -USHORT SvxTextEncodingBox::EncodingToPos_Impl( rtl_TextEncoding nEnc ) const +sal_uInt16 SvxTextEncodingBox::EncodingToPos_Impl( rtl_TextEncoding nEnc ) const { - USHORT nCount = GetEntryCount(); - for ( USHORT i=0; i<nCount; i++ ) + sal_uInt16 nCount = GetEntryCount(); + for ( sal_uInt16 i=0; i<nCount; i++ ) { - if ( nEnc == rtl_TextEncoding( (ULONG)GetEntryData(i) ) ) + if ( nEnc == rtl_TextEncoding( (sal_uIntPtr)GetEntryData(i) ) ) return i; } return LISTBOX_ENTRY_NOTFOUND; @@ -79,12 +79,12 @@ void SvxTextEncodingBox::FillFromTextEncodingTable( sal_uInt32 nCount = m_pEncTable->Count(); for ( sal_uInt32 j=0; j<nCount; j++ ) { - BOOL bInsert = TRUE; + sal_Bool bInsert = sal_True; rtl_TextEncoding nEnc = rtl_TextEncoding( m_pEncTable->GetValue( j ) ); if ( nExcludeInfoFlags ) { if ( !rtl_getTextEncodingInfo( nEnc, &aInfo ) ) - bInsert = FALSE; + bInsert = sal_False; else { if ( (aInfo.Flags & nExcludeInfoFlags) == 0 ) @@ -92,10 +92,10 @@ void SvxTextEncodingBox::FillFromTextEncodingTable( if ( (nExcludeInfoFlags & RTL_TEXTENCODING_INFO_UNICODE) && ((nEnc == RTL_TEXTENCODING_UCS2) || nEnc == RTL_TEXTENCODING_UCS4) ) - bInsert = FALSE; // InfoFlags don't work for Unicode :-( + bInsert = sal_False; // InfoFlags don't work for Unicode :-( } else if ( (aInfo.Flags & nButIncludeInfoFlags) == 0 ) - bInsert = FALSE; + bInsert = sal_False; } } if ( bInsert ) @@ -108,7 +108,7 @@ void SvxTextEncodingBox::FillFromTextEncodingTable( case RTL_TEXTENCODING_GB_2312 : case RTL_TEXTENCODING_GBK : case RTL_TEXTENCODING_MS_936 : - bInsert = FALSE; + bInsert = sal_False; break; } } @@ -129,14 +129,14 @@ void SvxTextEncodingBox::FillFromDbTextEncodingMap( svxform::ODataAccessCharsetHelper aCSH; ::std::vector< rtl_TextEncoding > aEncs; sal_Int32 nCount = aCSH.getSupportedTextEncodings( aEncs ); - for ( USHORT j=0; j<nCount; j++ ) + for ( sal_uInt16 j=0; j<nCount; j++ ) { - BOOL bInsert = TRUE; + sal_Bool bInsert = sal_True; rtl_TextEncoding nEnc = rtl_TextEncoding( aEncs[j] ); if ( nExcludeInfoFlags ) { if ( !rtl_getTextEncodingInfo( nEnc, &aInfo ) ) - bInsert = FALSE; + bInsert = sal_False; else { if ( (aInfo.Flags & nExcludeInfoFlags) == 0 ) @@ -144,10 +144,10 @@ void SvxTextEncodingBox::FillFromDbTextEncodingMap( if ( (nExcludeInfoFlags & RTL_TEXTENCODING_INFO_UNICODE) && ((nEnc == RTL_TEXTENCODING_UCS2) || nEnc == RTL_TEXTENCODING_UCS4) ) - bInsert = FALSE; // InfoFlags don't work for Unicode :-( + bInsert = sal_False; // InfoFlags don't work for Unicode :-( } else if ( (aInfo.Flags & nButIncludeInfoFlags) == 0 ) - bInsert = FALSE; + bInsert = sal_False; } } if ( bInsert ) @@ -160,7 +160,7 @@ void SvxTextEncodingBox::FillFromDbTextEncodingMap( case RTL_TEXTENCODING_GB_2312 : case RTL_TEXTENCODING_GBK : case RTL_TEXTENCODING_MS_936 : - bInsert = FALSE; + bInsert = sal_False; break; } } @@ -185,15 +185,15 @@ void SvxTextEncodingBox::FillWithMimeAndSelectBest() //------------------------------------------------------------------------ void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc, - const String& rEntry, USHORT nPos ) + const String& rEntry, sal_uInt16 nPos ) { - USHORT nAt = InsertEntry( rEntry, nPos ); - SetEntryData( nAt, (void*)(ULONG)nEnc ); + sal_uInt16 nAt = InsertEntry( rEntry, nPos ); + SetEntryData( nAt, (void*)(sal_uIntPtr)nEnc ); } //------------------------------------------------------------------------ -void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc, USHORT nPos ) +void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc, sal_uInt16 nPos ) { const String& rEntry = m_pEncTable->GetTextString( nEnc ); if ( rEntry.Len() ) @@ -212,7 +212,7 @@ void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc, USHORT void SvxTextEncodingBox::RemoveTextEncoding( const rtl_TextEncoding nEnc ) { - USHORT nAt = EncodingToPos_Impl( nEnc ); + sal_uInt16 nAt = EncodingToPos_Impl( nEnc ); if ( nAt != LISTBOX_ENTRY_NOTFOUND ) RemoveEntry( nAt ); @@ -222,19 +222,19 @@ void SvxTextEncodingBox::RemoveTextEncoding( const rtl_TextEncoding nEnc ) rtl_TextEncoding SvxTextEncodingBox::GetSelectTextEncoding() const { - USHORT nPos = GetSelectEntryPos(); + sal_uInt16 nPos = GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) - return rtl_TextEncoding( (ULONG)GetEntryData(nPos) ); + return rtl_TextEncoding( (sal_uIntPtr)GetEntryData(nPos) ); else return RTL_TEXTENCODING_DONTKNOW; } //------------------------------------------------------------------------ -void SvxTextEncodingBox::SelectTextEncoding( const rtl_TextEncoding nEnc, BOOL bSelect ) +void SvxTextEncodingBox::SelectTextEncoding( const rtl_TextEncoding nEnc, sal_Bool bSelect ) { - USHORT nAt = EncodingToPos_Impl( nEnc ); + sal_uInt16 nAt = EncodingToPos_Impl( nEnc ); if ( nAt != LISTBOX_ENTRY_NOTFOUND ) SelectEntryPos( nAt, bSelect ); @@ -242,13 +242,13 @@ void SvxTextEncodingBox::SelectTextEncoding( const rtl_TextEncoding nEnc, BOOL b //------------------------------------------------------------------------ -BOOL SvxTextEncodingBox::IsTextEncodingSelected( const rtl_TextEncoding nEnc ) const +sal_Bool SvxTextEncodingBox::IsTextEncodingSelected( const rtl_TextEncoding nEnc ) const { - USHORT nAt = EncodingToPos_Impl( nEnc ); + sal_uInt16 nAt = EncodingToPos_Impl( nEnc ); if ( nAt != LISTBOX_ENTRY_NOTFOUND ) return IsEntryPosSelected( nAt ); else - return FALSE; + return sal_False; } |