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 --- cui/source/options/optchart.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cui/source/options/optchart.cxx') diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx index 3348c38f7a27..5fac95aeaf9e 100644 --- a/cui/source/options/optchart.cxx +++ b/cui/source/options/optchart.cxx @@ -135,7 +135,7 @@ void SvxDefaultColorOptPage::FillColorBox() for( long i = 0; i < nCount; i++ ) { pColorEntry = pColorList->GetColor( i ); - m_pValSetColorBox->InsertItem( (sal_uInt16) i + 1, pColorEntry->GetColor(), pColorEntry->GetName() ); + m_pValSetColorBox->InsertItem( i + 1, pColorEntry->GetColor(), pColorEntry->GetName() ); } } @@ -208,7 +208,7 @@ IMPL_LINK_NOARG(SvxDefaultColorOptPage, AddChartColor) IMPL_LINK( SvxDefaultColorOptPage, RemoveChartColor, PushButton*, pButton ) { - size_t nIndex = m_pLbChartColors->GetSelectEntryPos(); + sal_Int32 nIndex = m_pLbChartColors->GetSelectEntryPos(); if (m_pLbChartColors->GetSelectEntryCount() == 0) return 0L; @@ -248,14 +248,14 @@ IMPL_LINK( SvxDefaultColorOptPage, ListClickedHdl, ColorLB*, _pColorList ) if( nIndex == -1 ) // not found m_pValSetColorBox->SetNoSelection(); else - m_pValSetColorBox->SelectItem( (sal_uInt16)nIndex + 1 ); // ValueSet is 1-based + m_pValSetColorBox->SelectItem( nIndex + 1 ); // ValueSet is 1-based return 0L; } IMPL_LINK_NOARG(SvxDefaultColorOptPage, BoxClickedHdl) { - sal_uInt16 nIdx = m_pLbChartColors->GetSelectEntryPos(); + sal_Int32 nIdx = m_pLbChartColors->GetSelectEntryPos(); if( nIdx != LISTBOX_ENTRY_NOTFOUND ) { const XColorEntry aEntry( m_pValSetColorBox->GetItemColor( m_pValSetColorBox->GetSelectItemId() ), m_pLbChartColors->GetSelectEntry() ); -- cgit v1.2.1