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/tpoption.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/tpoption.cxx')
-rw-r--r-- | sd/source/ui/dlg/tpoption.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx index afd3547087a3..43809ecc6f9d 100644 --- a/sd/source/ui/dlg/tpoption.cxx +++ b/sd/source/ui/dlg/tpoption.cxx @@ -254,7 +254,7 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs ) { OUString sMetric = aMetricArr.GetStringByPos( i ); sal_IntPtr nFieldUnit = aMetricArr.GetValue( i ); - sal_uInt16 nPos = m_pLbMetric->InsertEntry( sMetric ); + sal_Int32 nPos = m_pLbMetric->InsertEntry( sMetric ); m_pLbMetric->SetEntryData( nPos, (void*)nFieldUnit ); } m_pLbMetric->SetSelectHdl( LINK( this, SdTpOptionsMisc, SelectMetricHdl_Impl ) ); @@ -401,7 +401,7 @@ sal_Bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs ) } // metric - const sal_uInt16 nMPos = m_pLbMetric->GetSelectEntryPos(); + const sal_Int32 nMPos = m_pLbMetric->GetSelectEntryPos(); if ( nMPos != m_pLbMetric->GetSavedValue() ) { sal_uInt16 nFieldUnit = (sal_uInt16)(sal_IntPtr)m_pLbMetric->GetEntryData( nMPos ); @@ -470,7 +470,7 @@ void SdTpOptionsMisc::Reset( const SfxItemSet& rAttrs ) const SfxUInt16Item& rItem = (SfxUInt16Item&)rAttrs.Get( nWhich ); long nFieldUnit = (long)rItem.GetValue(); - for ( sal_uInt16 i = 0; i < m_pLbMetric->GetEntryCount(); ++i ) + for ( sal_Int32 i = 0; i < m_pLbMetric->GetEntryCount(); ++i ) { if ( (sal_IntPtr)m_pLbMetric->GetEntryData( i ) == nFieldUnit ) { @@ -523,7 +523,7 @@ SfxTabPage* SdTpOptionsMisc::Create( Window* pWindow, IMPL_LINK_NOARG(SdTpOptionsMisc, SelectMetricHdl_Impl) { - sal_uInt16 nPos = m_pLbMetric->GetSelectEntryPos(); + sal_Int32 nPos = m_pLbMetric->GetSelectEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { |