summaryrefslogtreecommitdiff
path: root/cui/source/options
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 /cui/source/options
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 'cui/source/options')
-rw-r--r--cui/source/options/optchart.cxx8
-rw-r--r--cui/source/options/optdict.cxx32
-rw-r--r--cui/source/options/optinet2.cxx10
-rw-r--r--cui/source/options/optjava.cxx30
-rw-r--r--cui/source/options/optlingu.cxx36
5 files changed, 58 insertions, 58 deletions
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() );
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index 2079d2081947..63b7723b151d 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -131,10 +131,10 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl)
if (xDicList.is())
aDics = xDicList->getDictionaries();
const Reference< XDictionary > *pDic = aDics.getConstArray();
- sal_Int32 nCount = (sal_uInt16) aDics.getLength();
+ sal_Int32 nCount = aDics.getLength();
sal_Bool bFound = sal_False;
- sal_uInt16 i;
+ sal_Int32 i;
for (i = 0; !bFound && i < nCount; ++i )
if ( sDict.equalsIgnoreAsciiCase( pDic[i]->getName()) )
bFound = sal_True;
@@ -300,7 +300,7 @@ SvxEditDictionaryDialog::SvxEditDictionaryDialog(
if ( nCount > 0 )
{
pAllDictsLB->SelectEntry( aLookUpEntry );
- sal_uInt16 nPos = pAllDictsLB->GetSelectEntryPos();
+ sal_Int32 nPos = pAllDictsLB->GetSelectEntryPos();
if ( nPos == LISTBOX_ENTRY_NOTFOUND )
{
@@ -375,13 +375,13 @@ void SvxEditDictionaryDialog::SetLanguage_Impl( util::Language nLanguage )
pLangLB->SelectLanguage( nLanguage );
}
-sal_uInt16 SvxEditDictionaryDialog::GetLBInsertPos(const OUString &rDicWord)
+sal_uLong SvxEditDictionaryDialog::GetLBInsertPos(const OUString &rDicWord)
{
- sal_uInt16 nPos = USHRT_MAX;
+ sal_uLong nPos = TREELIST_ENTRY_NOTFOUND;
IntlWrapper aIntlWrapper( Application::GetSettings().GetLanguageTag() );
const CollatorWrapper* pCollator = aIntlWrapper.getCollator();
- sal_uInt16 j;
+ sal_uLong j;
for( j = 0; j < pWordsLB->GetEntryCount(); j++ )
{
SvTreeListEntry* pEntry = pWordsLB->GetEntry(j);
@@ -400,7 +400,7 @@ sal_uInt16 SvxEditDictionaryDialog::GetLBInsertPos(const OUString &rDicWord)
void SvxEditDictionaryDialog::RemoveDictEntry(SvTreeListEntry* pEntry)
{
- sal_uInt16 nLBPos = pAllDictsLB->GetSelectEntryPos();
+ sal_Int32 nLBPos = pAllDictsLB->GetSelectEntryPos();
if ( pEntry != NULL && nLBPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -418,7 +418,7 @@ void SvxEditDictionaryDialog::RemoveDictEntry(SvTreeListEntry* pEntry)
IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectBookHdl_Impl)
{
- sal_uInt16 nPos = pAllDictsLB->GetSelectEntryPos();
+ sal_Int32 nPos = pAllDictsLB->GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -443,8 +443,8 @@ IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectBookHdl_Impl)
IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectLangHdl_Impl)
{
- sal_uInt16 nDicPos = pAllDictsLB->GetSelectEntryPos();
- sal_uInt16 nLang = pLangLB->GetSelectLanguage();
+ sal_Int32 nDicPos = pAllDictsLB->GetSelectEntryPos();
+ sal_Int32 nLang = pLangLB->GetSelectLanguage();
Reference< XDictionary > xDic( aDics.getConstArray()[ nDicPos ], UNO_QUERY );
sal_Int16 nOldLang = LanguageTag( xDic->getLocale() ).getLanguageType();
@@ -528,13 +528,13 @@ void SvxEditDictionaryDialog::ShowWords_Impl( sal_uInt16 nId )
for (sal_Int32 i = 0; i < nCount; i++)
{
aStr = pEntry[i]->getDictionaryWord();
- sal_uInt16 nPos = GetLBInsertPos( aStr );
+ sal_uLong nPos = GetLBInsertPos( aStr );
if(pEntry[i]->isNegative())
{
aStr += "\t";
aStr += pEntry[i]->getReplacementText();
}
- pWordsLB->InsertEntry(aStr, 0, sal_False, nPos == USHRT_MAX ? LIST_APPEND : nPos);
+ pWordsLB->InsertEntry(aStr, 0, sal_False, nPos == TREELIST_ENTRY_NOTFOUND ? TREELIST_APPEND : nPos);
}
if (pWordsLB->GetEntryCount())
@@ -598,7 +598,7 @@ IMPL_LINK(SvxEditDictionaryDialog, NewDelHdl, PushButton*, pBtn)
OUString aReplaceStr(pReplaceED->GetText());
sal_Int16 nAddRes = DIC_ERR_UNKNOWN;
- sal_uInt16 nPos = pAllDictsLB->GetSelectEntryPos();
+ sal_Int32 nPos = pAllDictsLB->GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND && !aNewWord.isEmpty())
{
DBG_ASSERT(nPos < aDics.getLength(), "invalid dictionary index");
@@ -632,7 +632,7 @@ IMPL_LINK(SvxEditDictionaryDialog, NewDelHdl, PushButton*, pBtn)
// insert new entry in list-box etc...
pWordsLB->SetUpdateMode(sal_False);
- sal_uInt16 _nPos = USHRT_MAX;
+ sal_uLong _nPos = TREELIST_ENTRY_NOTFOUND;
if(pReplaceFT->IsVisible())
{
@@ -650,7 +650,7 @@ IMPL_LINK(SvxEditDictionaryDialog, NewDelHdl, PushButton*, pBtn)
{
_nPos = GetLBInsertPos( aNewWord );
SvTreeListEntry* pInsEntry = pWordsLB->InsertEntry(sEntry, 0, sal_False,
- _nPos == USHRT_MAX ? LIST_APPEND : (sal_uInt32)_nPos);
+ _nPos == TREELIST_ENTRY_NOTFOUND ? TREELIST_APPEND : _nPos);
pNewEntry = pInsEntry;
}
@@ -693,7 +693,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt)
sal_Bool bTmpSelEntry=sal_False;
CDE_RESULT eCmpRes = CDE_DIFFERENT;
- for(sal_uInt16 i = 0; i < pWordsLB->GetEntryCount(); i++)
+ for(sal_uLong i = 0; i < pWordsLB->GetEntryCount(); i++)
{
SvTreeListEntry* pEntry = pWordsLB->GetEntry( i );
OUString aTestStr( pWordsLB->GetEntryText(pEntry, 0) );
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index ebe2cfc487dc..d802fb5dbd35 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -231,7 +231,7 @@ void SvxProxyTabPage::ReadConfigData_Impl()
if( xNameAccess->getByName(aProxyModePN) >>= nIntValue )
{
- m_pProxyModeLB->SelectEntryPos( (sal_uInt16) nIntValue );
+ m_pProxyModeLB->SelectEntryPos( nIntValue );
}
if( xNameAccess->getByName(aHttpProxyPN) >>= aStringValue )
@@ -400,7 +400,7 @@ sal_Bool SvxProxyTabPage::FillItemSet(SfxItemSet& )
try {
Reference< beans::XPropertySet > xPropertySet(m_xConfigurationUpdateAccess, UNO_QUERY_THROW );
- sal_uInt16 nSelPos = m_pProxyModeLB->GetSelectEntryPos();
+ sal_Int32 nSelPos = m_pProxyModeLB->GetSelectEntryPos();
if(m_pProxyModeLB->GetSavedValue() != nSelPos)
{
if( nSelPos == 1 )
@@ -509,7 +509,7 @@ void SvxProxyTabPage::EnableControls_Impl(sal_Bool bEnable)
IMPL_LINK( SvxProxyTabPage, ProxyHdl_Impl, ListBox *, pBox )
{
- sal_uInt16 nPos = pBox->GetSelectEntryPos();
+ sal_Int32 nPos = pBox->GetSelectEntryPos();
// Restore original system values
if( nPos == 1 )
@@ -537,8 +537,8 @@ IMPL_LINK( SvxProxyTabPage, LoseFocusHdl_Impl, Edit *, pEdit )
//#98647#----------------------------------------------
void SvxScriptExecListBox::RequestHelp( const HelpEvent& rHEvt )
{ // try to show tips just like as on toolbars
- sal_uInt16 nPos=LISTBOX_ENTRY_NOTFOUND;
- sal_uInt16 nTop = GetTopEntry();
+ sal_Int32 nPos=LISTBOX_ENTRY_NOTFOUND;
+ sal_Int32 nTop = GetTopEntry();
sal_uInt16 nCount = GetDisplayLineCount(); // Attention: Not GetLineCount()
Point aPt = ScreenToOutputPixel( rHEvt.GetMousePosPixel() );
Rectangle aItemRect;
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 4fa9192bae4e..b804422077a1 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -829,7 +829,7 @@ IMPL_LINK_NOARG(SvxJavaParameterDlg, AssignHdl_Impl)
OUString sParam = comphelper::string::strip(m_pParameterEdit->GetText(), ' ');
if (!sParam.isEmpty())
{
- sal_uInt16 nPos = m_pAssignedList->GetEntryPos( sParam );
+ sal_Int32 nPos = m_pAssignedList->GetEntryPos( sParam );
if ( LISTBOX_ENTRY_NOTFOUND == nPos )
nPos = m_pAssignedList->InsertEntry( sParam );
m_pAssignedList->SelectEntryPos( nPos );
@@ -853,7 +853,7 @@ IMPL_LINK_NOARG(SvxJavaParameterDlg, SelectHdl_Impl)
IMPL_LINK_NOARG(SvxJavaParameterDlg, DblClickHdl_Impl)
{
- sal_uInt16 nPos = m_pAssignedList->GetSelectEntryPos();
+ sal_Int32 nPos = m_pAssignedList->GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
m_pParameterEdit->SetText( m_pAssignedList->GetEntry( nPos ) );
return 0;
@@ -863,11 +863,11 @@ IMPL_LINK_NOARG(SvxJavaParameterDlg, DblClickHdl_Impl)
IMPL_LINK_NOARG(SvxJavaParameterDlg, RemoveHdl_Impl)
{
- sal_uInt16 nPos = m_pAssignedList->GetSelectEntryPos();
+ sal_Int32 nPos = m_pAssignedList->GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
m_pAssignedList->RemoveEntry( nPos );
- sal_uInt16 nCount = m_pAssignedList->GetEntryCount();
+ sal_Int32 nCount = m_pAssignedList->GetEntryCount();
if ( nCount )
{
if ( nPos >= nCount )
@@ -893,10 +893,10 @@ short SvxJavaParameterDlg::Execute()
Sequence< OUString > SvxJavaParameterDlg::GetParameters() const
{
- sal_uInt16 nCount = m_pAssignedList->GetEntryCount();
+ sal_Int32 nCount = m_pAssignedList->GetEntryCount();
Sequence< OUString > aParamList( nCount );
OUString* pArray = aParamList.getArray();
- for ( sal_uInt16 i = 0; i < nCount; ++i )
+ for ( sal_Int32 i = 0; i < nCount; ++i )
pArray[i] = OUString( m_pAssignedList->GetEntry(i) );
return aParamList;
}
@@ -940,7 +940,7 @@ SvxJavaClassPathDlg::SvxJavaClassPathDlg(Window* pParent)
SvxJavaClassPathDlg::~SvxJavaClassPathDlg()
{
- sal_uInt16 i, nCount = m_pPathList->GetEntryCount();
+ sal_Int32 i, nCount = m_pPathList->GetEntryCount();
for ( i = 0; i < nCount; ++i )
delete static_cast< OUString* >( m_pPathList->GetEntryData(i) );
}
@@ -968,7 +968,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl)
OUString sFile = aURL.getFSysPath( INetURLObject::FSYS_DETECT );
if ( !IsPathDuplicate( sURL ) )
{
- sal_uInt16 nPos = m_pPathList->InsertEntry( sFile, SvFileInformationManager::GetImage( aURL, false ) );
+ sal_Int32 nPos = m_pPathList->InsertEntry( sFile, SvFileInformationManager::GetImage( aURL, false ) );
m_pPathList->SelectEntryPos( nPos );
}
else
@@ -1005,7 +1005,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddPathHdl_Impl)
OUString sNewFolder = aURL.getFSysPath( INetURLObject::FSYS_DETECT );
if ( !IsPathDuplicate( sFolderURL ) )
{
- sal_uInt16 nPos = m_pPathList->InsertEntry( sNewFolder, SvFileInformationManager::GetImage( aURL, false ) );
+ sal_Int32 nPos = m_pPathList->InsertEntry( sNewFolder, SvFileInformationManager::GetImage( aURL, false ) );
m_pPathList->SelectEntryPos( nPos );
}
else
@@ -1023,11 +1023,11 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddPathHdl_Impl)
IMPL_LINK_NOARG(SvxJavaClassPathDlg, RemoveHdl_Impl)
{
- sal_uInt16 nPos = m_pPathList->GetSelectEntryPos();
+ sal_Int32 nPos = m_pPathList->GetSelectEntryPos();
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
m_pPathList->RemoveEntry( nPos );
- sal_uInt16 nCount = m_pPathList->GetEntryCount();
+ sal_Int32 nCount = m_pPathList->GetEntryCount();
if ( nCount )
{
if ( nPos >= nCount )
@@ -1054,8 +1054,8 @@ bool SvxJavaClassPathDlg::IsPathDuplicate( const OUString& _rPath )
{
bool bRet = false;
INetURLObject aFileObj( _rPath );
- sal_uInt16 nCount = m_pPathList->GetEntryCount();
- for ( sal_uInt16 i = 0; i < nCount; ++i )
+ sal_Int32 nCount = m_pPathList->GetEntryCount();
+ for ( sal_Int32 i = 0; i < nCount; ++i )
{
INetURLObject aOtherObj( m_pPathList->GetEntry(i), INetURLObject::FSYS_DETECT );
if ( aOtherObj == aFileObj )
@@ -1073,8 +1073,8 @@ bool SvxJavaClassPathDlg::IsPathDuplicate( const OUString& _rPath )
OUString SvxJavaClassPathDlg::GetClassPath() const
{
OUString sPath;
- sal_uInt16 nCount = m_pPathList->GetEntryCount();
- for ( sal_uInt16 i = 0; i < nCount; ++i )
+ sal_Int32 nCount = m_pPathList->GetEntryCount();
+ for ( sal_Int32 i = 0; i < nCount; ++i )
{
if ( !sPath.isEmpty() )
sPath += OUString(CLASSPATH_DELIMITER);
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 5aefdcab5309..e9af92199590 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1272,7 +1272,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet )
DicUserData aData( (sal_uLong)pEntry->GetUserData() );
if (aData.GetEntryId() < nDics)
{
- sal_Bool bChecked = m_pLinguDicsCLB->IsChecked( (sal_uInt16) i );
+ sal_Bool bChecked = m_pLinguDicsCLB->IsChecked( i );
uno::Reference< XDictionary > xDic( aDics.getConstArray()[ i ] );
if (xDic.is())
{
@@ -1298,7 +1298,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet )
nEntries = m_pLinguOptionsCLB->GetEntryCount();
- for (sal_uInt16 j = 0; j < nEntries; ++j)
+ for (sal_uLong j = 0; j < nEntries; ++j)
{
SvTreeListEntry *pEntry = m_pLinguOptionsCLB->GetEntry( j );
@@ -1322,8 +1322,8 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet )
aLngCfg.SetProperty( aPropName, aAny );
}
- SvTreeListEntry *pPreBreakEntry = m_pLinguOptionsCLB->GetEntry( (sal_uInt16) EID_NUM_PRE_BREAK );
- SvTreeListEntry *pPostBreakEntry = m_pLinguOptionsCLB->GetEntry( (sal_uInt16) EID_NUM_POST_BREAK );
+ SvTreeListEntry *pPreBreakEntry = m_pLinguOptionsCLB->GetEntry( (sal_uLong) EID_NUM_PRE_BREAK );
+ SvTreeListEntry *pPostBreakEntry = m_pLinguOptionsCLB->GetEntry( (sal_uLong) EID_NUM_POST_BREAK );
DBG_ASSERT( pPreBreakEntry, "NULL Pointer" );
DBG_ASSERT( pPostBreakEntry, "NULL Pointer" );
if (pPreBreakEntry && pPostBreakEntry)
@@ -1341,7 +1341,7 @@ sal_Bool SvxLinguTabPage::FillItemSet( SfxItemSet& rCoreSet )
// automatic spell checking
- bool bNewAutoCheck = m_pLinguOptionsCLB->IsChecked( (sal_uInt16) EID_SPELL_AUTO );
+ bool bNewAutoCheck = m_pLinguOptionsCLB->IsChecked( (sal_uLong) EID_SPELL_AUTO );
const SfxPoolItem* pOld = GetOldItem( rCoreSet, SID_AUTOSPELL_CHECK );
if ( !pOld || ( (SfxBoolItem*)pOld )->GetValue() != bNewAutoCheck )
{
@@ -1383,7 +1383,7 @@ void SvxLinguTabPage::AddDicBoxEntry(
OUString aTxt( ::GetDicInfoStr( rxDic->getName(),
LanguageTag( rxDic->getLocale() ).getLanguageType(),
DictionaryType_NEGATIVE == rxDic->getDictionaryType() ) );
- m_pLinguDicsCLB->InsertEntry( aTxt, (sal_uInt16)LISTBOX_APPEND ); // append at end
+ m_pLinguDicsCLB->InsertEntry( aTxt, TREELIST_APPEND ); // append at end
SvTreeListEntry* pEntry = m_pLinguDicsCLB->GetEntry( m_pLinguDicsCLB->GetEntryCount() - 1 );
DBG_ASSERT( pEntry, "failed to add entry" );
if (pEntry)
@@ -1426,10 +1426,10 @@ void SvxLinguTabPage::UpdateModulesBox_Impl()
m_pLinguModulesCLB->Clear();
- for (sal_uInt16 i = 0; i < nDispSrvcCount; ++i)
+ for (sal_uLong i = 0; i < nDispSrvcCount; ++i)
{
const ServiceInfo_Impl &rInfo = rAllDispSrvcArr[i];
- m_pLinguModulesCLB->InsertEntry( rInfo.sDisplayName, (sal_uInt16)LISTBOX_APPEND );
+ m_pLinguModulesCLB->InsertEntry( rInfo.sDisplayName, TREELIST_APPEND );
SvTreeListEntry* pEntry = m_pLinguModulesCLB->GetEntry(i);
pEntry->SetUserData( (void *) &rInfo );
m_pLinguModulesCLB->CheckEntryPos( i, rInfo.bConfigured );
@@ -1592,8 +1592,8 @@ IMPL_LINK( SvxLinguTabPage, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox )
if (pBox == m_pLinguModulesCLB)
{
DBG_ASSERT( pLinguData, "NULL pointer, LinguData missing" );
- sal_uInt16 nPos = m_pLinguModulesCLB->GetSelectEntryPos();
- if (nPos != LISTBOX_ENTRY_NOTFOUND && pLinguData)
+ sal_uLong nPos = m_pLinguModulesCLB->GetSelectEntryPos();
+ if (nPos != TREELIST_ENTRY_NOTFOUND && pLinguData)
{
pLinguData->Reconfigure( m_pLinguModulesCLB->GetText( nPos ),
m_pLinguModulesCLB->IsChecked( nPos ) );
@@ -1601,8 +1601,8 @@ IMPL_LINK( SvxLinguTabPage, BoxCheckButtonHdl_Impl, SvTreeListBox *, pBox )
}
else if (pBox == m_pLinguDicsCLB)
{
- sal_uInt16 nPos = m_pLinguDicsCLB->GetSelectEntryPos();
- if (nPos != LISTBOX_ENTRY_NOTFOUND)
+ sal_uLong nPos = m_pLinguDicsCLB->GetSelectEntryPos();
+ if (nPos != TREELIST_ENTRY_NOTFOUND)
{
const uno::Reference< XDictionary > &rDic = aDics.getConstArray()[ nPos ];
if (SvxGetIgnoreAllList() == rDic)
@@ -1755,7 +1755,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn )
DicUserData aDicData( (sal_uLong) pDicEntry->GetUserData() );
if (aDicData.GetEntryId() == nDicPos )
{
- m_pLinguDicsCLB->RemoveEntry( (sal_uInt16) i );
+ m_pLinguDicsCLB->RemoveEntry( i );
break;
}
}
@@ -1986,7 +1986,7 @@ IMPL_LINK( SvxEditModulesDlg, SelectHdl_Impl, SvxCheckListBox *, pBox )
ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData();
if(!pData->IsParent() && pData->GetType() != TYPE_HYPH)
{
- sal_uInt16 nCurPos = pBox->GetSelectEntryPos();
+ sal_uLong nCurPos = pBox->GetSelectEntryPos();
if(nCurPos < pBox->GetEntryCount() - 1)
{
bDisableDown = ((ModuleUserData_Impl*)pBox->
@@ -2057,7 +2057,7 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox )
sal_Int32 nStart = 0, nLocalIndex = 0;
Sequence< OUString > aChange;
bool bChanged = false;
- for(sal_uInt16 i = 0; i < m_pModulesCLB->GetEntryCount(); i++)
+ for(sal_uLong i = 0; i < m_pModulesCLB->GetEntryCount(); i++)
{
SvTreeListEntry *pEntry = m_pModulesCLB->GetEntry(i);
ModuleUserData_Impl* pData = (ModuleUserData_Impl*)pEntry->GetUserData();
@@ -2298,9 +2298,9 @@ IMPL_LINK( SvxEditModulesDlg, LangSelectHdl_Impl, ListBox *, pBox )
IMPL_LINK( SvxEditModulesDlg, UpDownHdl_Impl, PushButton *, pBtn )
{
sal_Bool bUp = m_pPrioUpPB == pBtn;
- sal_uInt16 nCurPos = m_pModulesCLB->GetSelectEntryPos();
+ sal_uLong nCurPos = m_pModulesCLB->GetSelectEntryPos();
SvTreeListEntry* pEntry;
- if (nCurPos != LISTBOX_ENTRY_NOTFOUND &&
+ if (nCurPos != TREELIST_ENTRY_NOTFOUND &&
0 != (pEntry = m_pModulesCLB->GetEntry(nCurPos)))
{
m_pModulesCLB->SetUpdateMode(sal_False);
@@ -2314,7 +2314,7 @@ IMPL_LINK( SvxEditModulesDlg, UpDownHdl_Impl, PushButton *, pBtn )
pModel->Remove(pEntry);
- sal_uInt16 nDestPos = bUp ? nCurPos - 1 : nCurPos + 1;
+ sal_uLong nDestPos = bUp ? nCurPos - 1 : nCurPos + 1;
pModel->Insert(pToInsert, nDestPos);
m_pModulesCLB->CheckEntryPos(nDestPos, bIsChecked );
m_pModulesCLB->SelectEntryPos(nDestPos );