diff options
author | Eike Rathke <erack@redhat.com> | 2014-03-01 03:13:28 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-03-05 07:31:19 -0600 |
commit | 68ec95b3f80408ae50897b043eed69a07d084df9 (patch) | |
tree | 5d32076e843fae44f28e3c8d9dbbacf7648fecbc /sd/source/ui/dlg/custsdlg.cxx | |
parent | c3403ac888c2e62edaf8befe7982f5f8cc95c16f (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 'sd/source/ui/dlg/custsdlg.cxx')
-rw-r--r-- | sd/source/ui/dlg/custsdlg.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx index 8c7f54da43b2..1561111ab371 100644 --- a/sd/source/ui/dlg/custsdlg.cxx +++ b/sd/source/ui/dlg/custsdlg.cxx @@ -74,7 +74,7 @@ SdCustomShowDlg::SdCustomShowDlg( Window* pWindow, { m_pLbCustomShows->InsertEntry( pCustomShow->GetName() ); } - m_pLbCustomShows->SelectEntryPos( (sal_uInt16)nPosToSelect ); + m_pLbCustomShows->SelectEntryPos( (sal_Int32)nPosToSelect ); pCustomShowList->Seek( nPosToSelect ); } @@ -89,7 +89,7 @@ SdCustomShowDlg::~SdCustomShowDlg() void SdCustomShowDlg::CheckState() { - sal_uInt16 nPos = m_pLbCustomShows->GetSelectEntryPos(); + sal_Int32 nPos = m_pLbCustomShows->GetSelectEntryPos(); sal_Bool bEnable = nPos != LISTBOX_ENTRY_NOTFOUND; m_pBtnEdit->Enable( bEnable ); @@ -134,7 +134,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p ) // edit CustomShow else if( p == m_pBtnEdit ) { - sal_uInt16 nPos = m_pLbCustomShows->GetSelectEntryPos(); + sal_Int32 nPos = m_pLbCustomShows->GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { DBG_ASSERT( pCustomShowList, "pCustomShowList does not exist" ); @@ -159,7 +159,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p ) // delete CustomShow else if( p == m_pBtnRemove ) { - sal_uInt16 nPos = m_pLbCustomShows->GetSelectEntryPos(); + sal_Int32 nPos = m_pLbCustomShows->GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { delete (*pCustomShowList)[nPos]; @@ -172,7 +172,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p ) // copy CustomShow else if( p == m_pBtnCopy ) { - sal_uInt16 nPos = m_pLbCustomShows->GetSelectEntryPos(); + sal_Int32 nPos = m_pLbCustomShows->GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { SdCustomShow* pShow = new SdCustomShow( *(*pCustomShowList)[nPos] ); @@ -231,7 +231,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p ) } else if( p == m_pLbCustomShows ) { - sal_uInt16 nPos = m_pLbCustomShows->GetSelectEntryPos(); + sal_Int32 nPos = m_pLbCustomShows->GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) pCustomShowList->Seek( nPos ); @@ -358,15 +358,15 @@ IMPL_LINK( SdDefineCustomShowDlg, ClickButtonHdl, void *, p ) { if( p == m_pBtnAdd ) { - sal_uInt16 nCount = m_pLbPages->GetSelectEntryCount(); + sal_Int32 nCount = m_pLbPages->GetSelectEntryCount(); if( nCount > 0 ) { - sal_uLong nPosCP = LIST_APPEND; + sal_uLong nPosCP = TREELIST_APPEND; SvTreeListEntry* pEntry = m_pLbCustomPages->FirstSelected(); if( pEntry ) nPosCP = m_pLbCustomPages->GetModel()->GetAbsPos( pEntry ) + 1L; - for( sal_uInt16 i = 0; i < nCount; i++ ) + for( sal_Int32 i = 0; i < nCount; i++ ) { OUString aStr = m_pLbPages->GetSelectEntry( i ); pEntry = m_pLbCustomPages->InsertEntry( aStr, @@ -377,7 +377,7 @@ IMPL_LINK( SdDefineCustomShowDlg, ClickButtonHdl, void *, p ) GetSelectEntryPos( i ), PK_STANDARD ); pEntry->SetUserData( pPage ); - if( nPosCP != LIST_APPEND ) + if( nPosCP != TREELIST_APPEND ) nPosCP++; } bModified = sal_True; |