summaryrefslogtreecommitdiff
path: root/svx/source/dialog/txencbox.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-03-01 03:13:28 +0100
committerEike Rathke <erack@redhat.com>2014-03-05 07:31:19 -0600
commit68ec95b3f80408ae50897b043eed69a07d084df9 (patch)
tree5d32076e843fae44f28e3c8d9dbbacf7648fecbc /svx/source/dialog/txencbox.cxx
parentc3403ac888c2e62edaf8befe7982f5f8cc95c16f (diff)
made ListBox handle more than 64k elements, fdo#61520 related
ListBox and related now handle up to sal_Int32 elements correctly. sal_Int32 instead of sal_Size or size_t because of UNO and a11y API. Also disentangled some of the mess of SvTreeList and other containers regarding sal_uInt16, sal_uLong, long, size_t, ... type mixtures. Change-Id: Idb6e0ae689dc5bc2cf980721972b57b0261e688a Reviewed-on: https://gerrit.libreoffice.org/8460 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'svx/source/dialog/txencbox.cxx')
-rw-r--r--svx/source/dialog/txencbox.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx
index 5e292c5c1bb1..a0796d38f614 100644
--- a/svx/source/dialog/txencbox.cxx
+++ b/svx/source/dialog/txencbox.cxx
@@ -67,10 +67,10 @@ SvxTextEncodingBox::~SvxTextEncodingBox()
-sal_uInt16 SvxTextEncodingBox::EncodingToPos_Impl( rtl_TextEncoding nEnc ) const
+sal_Int32 SvxTextEncodingBox::EncodingToPos_Impl( rtl_TextEncoding nEnc ) const
{
- sal_uInt16 nCount = GetEntryCount();
- for ( sal_uInt16 i=0; i<nCount; i++ )
+ sal_Int32 nCount = GetEntryCount();
+ for ( sal_Int32 i=0; i<nCount; i++ )
{
if ( nEnc == rtl_TextEncoding( (sal_uIntPtr)GetEntryData(i) ) )
return i;
@@ -144,7 +144,7 @@ void SvxTextEncodingBox::FillFromDbTextEncodingMap(
svxform::ODataAccessCharsetHelper aCSH;
::std::vector< rtl_TextEncoding > aEncs;
sal_Int32 nCount = aCSH.getSupportedTextEncodings( aEncs );
- for ( sal_uInt16 j=0; j<nCount; j++ )
+ for ( sal_Int32 j=0; j<nCount; j++ )
{
sal_Bool bInsert = sal_True;
rtl_TextEncoding nEnc = rtl_TextEncoding( aEncs[j] );
@@ -201,15 +201,15 @@ void SvxTextEncodingBox::FillWithMimeAndSelectBest()
void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc,
- const OUString& rEntry, sal_uInt16 nPos )
+ const OUString& rEntry, sal_Int32 nPos )
{
- sal_uInt16 nAt = InsertEntry( rEntry, nPos );
+ sal_Int32 nAt = InsertEntry( rEntry, nPos );
SetEntryData( nAt, (void*)(sal_uIntPtr)nEnc );
}
-void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc, sal_uInt16 nPos )
+void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc, sal_Int32 nPos )
{
const OUString& rEntry = m_pEncTable->GetTextString( nEnc );
if ( !rEntry.isEmpty() )
@@ -222,7 +222,7 @@ void SvxTextEncodingBox::InsertTextEncoding( const rtl_TextEncoding nEnc, sal_uI
rtl_TextEncoding SvxTextEncodingBox::GetSelectTextEncoding() const
{
- sal_uInt16 nPos = GetSelectEntryPos();
+ sal_Int32 nPos = GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return rtl_TextEncoding( (sal_uIntPtr)GetEntryData(nPos) );
@@ -234,7 +234,7 @@ rtl_TextEncoding SvxTextEncodingBox::GetSelectTextEncoding() const
void SvxTextEncodingBox::SelectTextEncoding( const rtl_TextEncoding nEnc, sal_Bool bSelect )
{
- sal_uInt16 nAt = EncodingToPos_Impl( nEnc );
+ sal_Int32 nAt = EncodingToPos_Impl( nEnc );
if ( nAt != LISTBOX_ENTRY_NOTFOUND )
SelectEntryPos( nAt, bSelect );