From 68ec95b3f80408ae50897b043eed69a07d084df9 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Sat, 1 Mar 2014 03:13:28 +0100 Subject: 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 Tested-by: Eike Rathke --- sd/source/ui/dlg/custsdlg.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'sd/source/ui/dlg/custsdlg.cxx') 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; -- cgit v1.2.3 10'>10space:mode:
-rw-r--r--Documentation/00-INDEX8
-rw-r--r--Documentation/ABI/stable/sysfs-class-udc16
-rw-r--r--Documentation/ABI/stable/sysfs-driver-aspeed-vuart15
-rw-r--r--Documentation/ABI/stable/sysfs-hypervisor-xen119
-rw-r--r--D