summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx2
-rw-r--r--sc/source/ui/dbgui/consdlg.cxx13
-rw-r--r--sc/source/ui/dbgui/csvtablebox.cxx4
-rw-r--r--sc/source/ui/dbgui/dapidata.cxx4
-rw-r--r--sc/source/ui/dbgui/dapitype.cxx2
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx38
-rw-r--r--sc/source/ui/dbgui/foptmgr.cxx13
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx14
-rw-r--r--sc/source/ui/dbgui/tpsort.cxx14
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx14
-rw-r--r--sc/source/ui/dbgui/validate.cxx4
-rw-r--r--sc/source/ui/inc/consdlg.hxx4
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx11
-rw-r--r--sc/source/ui/miscdlgs/linkarea.cxx4
-rw-r--r--sc/source/ui/miscdlgs/mvtabdlg.cxx10
-rw-r--r--sc/source/ui/miscdlgs/solveroptions.cxx2
-rw-r--r--sc/source/ui/optdlg/tpview.cxx2
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx34
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx9
-rw-r--r--sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx2
-rw-r--r--sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx2
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx5
-rw-r--r--sc/source/ui/view/tabvwshf.cxx4
24 files changed, 104 insertions, 109 deletions
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index 6157ba37a12a..3d9d0b9428c1 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -513,7 +513,7 @@ void StyleSelect( ListBox& rLbStyle, ScDocument* pDoc, SvxFontPrevWindow& rWdPre
OUString aName = pStyle->GetName();
if ( rLbStyle.GetEntryPos(aName) == LISTBOX_ENTRY_NOTFOUND ) // all lists contain the same entries
{
- for( sal_uInt16 i = 1, n = rLbStyle.GetEntryCount(); i <= n && !bFound; ++i)
+ for( sal_Int32 i = 1, n = rLbStyle.GetEntryCount(); i <= n && !bFound; ++i)
{
OUString aStyleName = ScGlobal::pCharClass->uppercase(OUString(rLbStyle.GetEntry(i)));
if( i == n )
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index c2cafd34d345..1977ee8d3425 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -365,7 +365,7 @@ IMPL_LINK( ScConsolidateDlg, GetFocusHdl, Control*, pCtr )
IMPL_LINK_NOARG_TYPED(ScConsolidateDlg, OkHdl, Button*, void)
{
- sal_uInt16 nDataAreaCount = pLbConsAreas->GetEntryCount();
+ const sal_Int32 nDataAreaCount = pLbConsAreas->GetEntryCount();
if ( nDataAreaCount > 0 )
{
@@ -379,9 +379,8 @@ IMPL_LINK_NOARG_TYPED(ScConsolidateDlg, OkHdl, Button*, void)
ScConsolidateParam theOutParam( theConsData );
ScArea** ppDataAreas = new ScArea*[nDataAreaCount];
ScArea* pArea;
- sal_uInt16 i=0;
- for ( i=0; i<nDataAreaCount; i++ )
+ for ( sal_Int32 i=0; i<nDataAreaCount; ++i )
{
pArea = new ScArea;
ScRangeUtil::MakeArea( pLbConsAreas->GetEntry( i ),
@@ -398,7 +397,7 @@ IMPL_LINK_NOARG_TYPED(ScConsolidateDlg, OkHdl, Button*, void)
theOutParam.bReferenceData = pBtnRefs->IsChecked();
theOutParam.SetAreas( ppDataAreas, nDataAreaCount );
- for ( i=0; i<nDataAreaCount; i++ )
+ for ( sal_Int32 i=0; i<nDataAreaCount; ++i )
delete ppDataAreas[i];
delete [] ppDataAreas;
@@ -497,7 +496,7 @@ IMPL_LINK( ScConsolidateDlg, SelectHdl, ListBox*, pLb )
else if ( (pLb == pLbDataArea) || (pLb == pLbDestArea) )
{
Edit* pEd = (pLb == pLbDataArea) ? pEdDataArea : pEdDestArea;
- sal_uInt16 nSelPos = pLb->GetSelectEntryPos();
+ const sal_Int32 nSelPos = pLb->GetSelectEntryPos();
if ( pRangeUtil
&& (nSelPos > 0)
@@ -550,7 +549,7 @@ IMPL_LINK( ScConsolidateDlg, ModifyHdl, formula::RefEdit*, pEd )
// Resource of the ListBox and these two conversion methods are also in
// tpsubt and everywhere, where StarCalc functions are selectable.
-ScSubTotalFunc ScConsolidateDlg::LbPosToFunc( sal_uInt16 nPos )
+ScSubTotalFunc ScConsolidateDlg::LbPosToFunc( sal_Int32 nPos )
{
switch ( nPos )
{
@@ -570,7 +569,7 @@ ScSubTotalFunc ScConsolidateDlg::LbPosToFunc( sal_uInt16 nPos )
}
}
-sal_uInt16 ScConsolidateDlg::FuncToLbPos( ScSubTotalFunc eFunc )
+sal_Int32 ScConsolidateDlg::FuncToLbPos( ScSubTotalFunc eFunc )
{
switch ( eFunc )
{
diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx
index 7120f84a2222..27d027d57a14 100644
--- a/sc/source/ui/dbgui/csvtablebox.cxx
+++ b/sc/source/ui/dbgui/csvtablebox.cxx
@@ -221,9 +221,9 @@ void ScCsvTableBox::SetUniStrings(
void ScCsvTableBox::InitTypes( const ListBox& rListBox )
{
- sal_uInt16 nTypeCount = rListBox.GetEntryCount();
+ const sal_Int32 nTypeCount = rListBox.GetEntryCount();
StringVec aTypeNames( nTypeCount );
- for( sal_uInt16 nIndex = 0; nIndex < nTypeCount; ++nIndex )
+ for( sal_Int32 nIndex = 0; nIndex < nTypeCount; ++nIndex )
aTypeNames[ nIndex ] = rListBox.GetEntry( nIndex );
maGrid->SetTypeNames( aTypeNames );
}
diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx
index dd39bf05d290..93bcce13684c 100644
--- a/sc/source/ui/dbgui/dapidata.cxx
+++ b/sc/source/ui/dbgui/dapidata.cxx
@@ -97,7 +97,7 @@ void ScDataPilotDatabaseDlg::dispose()
void ScDataPilotDatabaseDlg::GetValues( ScImportSourceDesc& rDesc )
{
- sal_uInt16 nSelect = m_pLbType->GetSelectEntryPos();
+ const sal_Int32 nSelect = m_pLbType->GetSelectEntryPos();
rDesc.aDBName = m_pLbDatabase->GetSelectEntry();
rDesc.aObject = m_pCbObject->GetText();
@@ -128,7 +128,7 @@ void ScDataPilotDatabaseDlg::FillObjects()
if (aDatabaseName.isEmpty())
return;
- sal_uInt16 nSelect = m_pLbType->GetSelectEntryPos();
+ const sal_Int32 nSelect = m_pLbType->GetSelectEntryPos();
if ( nSelect > DP_TYPELIST_QUERY )
return; // only tables and queries
diff --git a/sc/source/ui/dbgui/dapitype.cxx b/sc/source/ui/dbgui/dapitype.cxx
index b920e3a0a9a0..3621607736e5 100644
--- a/sc/source/ui/dbgui/dapitype.cxx
+++ b/sc/source/ui/dbgui/dapitype.cxx
@@ -83,7 +83,7 @@ bool ScDataPilotSourceTypeDlg::IsNamedRange() const
OUString ScDataPilotSourceTypeDlg::GetSelectedNamedRange() const
{
- sal_uInt16 nPos = m_pLbNamedRange->GetSelectEntryPos();
+ const sal_Int32 nPos = m_pLbNamedRange->GetSelectEntryPos();
return m_pLbNamedRange->GetEntry(nPos);
}
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index e1dc6a56e9a5..2771e0acc7eb 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -504,14 +504,13 @@ void ScFilterDlg::UpdateValueList( size_t nList )
if (pDoc && nList > 0 && nList <= QUERY_ENTRY_COUNT)
{
ComboBox* pValList = maValueEdArr[nList-1];
- sal_uInt16 nFieldSelPos = maFieldLbArr[nList-1]->GetSelectEntryPos();
- sal_uInt16 nListPos = 0;
+ const sal_Int32 nFieldSelPos = maFieldLbArr[nList-1]->GetSelectEntryPos();
+ sal_Int32 nListPos = 0;
OUString aCurValue = pValList->GetText();
pValList->Clear();
- pValList->InsertEntry( aStrNotEmpty, 0 );
- pValList->InsertEntry( aStrEmpty, 1 );
- nListPos = 2;
+ pValList->InsertEntry( aStrNotEmpty, nListPos++ );
+ pValList->InsertEntry( aStrEmpty, nListPos++ );
if ( nFieldSelPos )
{
@@ -580,8 +579,7 @@ void ScFilterDlg::UpdateValueList( size_t nList )
std::vector<ScTypedStrData>::const_iterator it = pList->maList.begin(), itEnd = pList->maList.end();
for (; it != itEnd; ++it)
{
- pValList->InsertEntry(it->GetString(), nListPos);
- nListPos++;
+ pValList->InsertEntry(it->GetString(), nListPos++);
}
}
pValList->SetText( aCurValue );
@@ -780,7 +778,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
pLbCond1->Enable();
pEdVal1->Enable();
- sal_uInt16 nConnect1 = pLbConnect1->GetSelectEntryPos();
+ const sal_Int32 nConnect1 = pLbConnect1->GetSelectEntryPos();
size_t nQE = nOffset;
theQueryData.GetEntry(nQE).eConnect =(ScQueryConnect)nConnect1;
if (maRefreshExceptQuery.size() < nQE + 1)
@@ -794,7 +792,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
pLbCond2->Enable();
pEdVal2->Enable();
- sal_uInt16 nConnect2 = pLbConnect2->GetSelectEntryPos();
+ const sal_Int32 nConnect2 = pLbConnect2->GetSelectEntryPos();
size_t nQE = 1+nOffset;
theQueryData.GetEntry(nQE).eConnect =(ScQueryConnect)nConnect2;
if (maRefreshExceptQuery.size() < nQE + 1)
@@ -807,7 +805,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
pLbCond3->Enable();
pEdVal3->Enable();
- sal_uInt16 nConnect3 = pLbConnect3->GetSelectEntryPos();
+ const sal_Int32 nConnect3 = pLbConnect3->GetSelectEntryPos();
size_t nQE = 2 + nOffset;
theQueryData.GetEntry(nQE).eConnect = (ScQueryConnect)nConnect3;
if (maRefreshExceptQuery.size() < nQE + 1)
@@ -821,7 +819,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
pLbCond4->Enable();
pEdVal4->Enable();
- sal_uInt16 nConnect4 = pLbConnect4->GetSelectEntryPos();
+ const sal_Int32 nConnect4 = pLbConnect4->GetSelectEntryPos();
size_t nQE = 3 + nOffset;
theQueryData.GetEntry(nQE).eConnect = (ScQueryConnect)nConnect4;
if (maRefreshExceptQuery.size() < nQE + 1)
@@ -877,7 +875,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
pLbConnect2->Enable();
}
theQueryData.GetEntry(nOffset).bDoQuery = true;
- sal_uInt16 nField = pLb->GetSelectEntryPos();
+ const sal_Int32 nField = pLb->GetSelectEntryPos();
theQueryData.GetEntry(nOffset).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ;
}
}
@@ -923,7 +921,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
{
pLbConnect3->Enable();
}
- sal_uInt16 nField = pLb->GetSelectEntryPos();
+ const sal_Int32 nField = pLb->GetSelectEntryPos();
sal_uInt16 nQ=1+nOffset;
theQueryData.GetEntry(nQ).bDoQuery = true;
theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ;
@@ -964,7 +962,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
pLbConnect4->Enable();
}
- sal_uInt16 nField = pLb->GetSelectEntryPos();
+ const sal_Int32 nField = pLb->GetSelectEntryPos();
sal_uInt16 nQ=2+nOffset;
theQueryData.GetEntry(nQ).bDoQuery = true;
theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ;
@@ -991,7 +989,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb )
else
{
UpdateValueList( 4 );
- sal_uInt16 nField = pLb->GetSelectEntryPos();
+ const sal_Int32 nField = pLb->GetSelectEntryPos();
sal_uInt16 nQ=3+nOffset;
theQueryData.GetEntry(nQ).bDoQuery = true;
theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast<SCCOL>(nField) - 1 ;
@@ -1031,10 +1029,10 @@ IMPL_LINK_TYPED( ScFilterDlg, CheckBoxHdl, Button*, pBox, void )
if ( pBox == pBtnHeader ) // Field list and value list
{
- sal_uInt16 nCurSel1 = pLbField1->GetSelectEntryPos();
- sal_uInt16 nCurSel2 = pLbField2->GetSelectEntryPos();
- sal_uInt16 nCurSel3 = pLbField3->GetSelectEntryPos();
- sal_uInt16 nCurSel4 = pLbField4->GetSelectEntryPos();
+ const sal_Int32 nCurSel1 = pLbField1->GetSelectEntryPos();
+ const sal_Int32 nCurSel2 = pLbField2->GetSelectEntryPos();
+ const sal_Int32 nCurSel3 = pLbField3->GetSelectEntryPos();
+ const sal_Int32 nCurSel4 = pLbField4->GetSelectEntryPos();
FillFieldLists();
pLbField1->SelectEntryPos( nCurSel1 );
pLbField2->SelectEntryPos( nCurSel2 );
@@ -1131,7 +1129,7 @@ IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd )
rItem.meType = bNumber ? ScQueryEntry::ByValue : ScQueryEntry::ByString;
}
- sal_uInt16 nField = pLbField->GetSelectEntryPos();
+ const sal_Int32 nField = pLbField->GetSelectEntryPos();
rEntry.nField = nField ? (theQueryData.nCol1 +
static_cast<SCCOL>(nField) - 1) : static_cast<SCCOL>(0);
diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx
index d50c7a9232c2..b4a49fadcb99 100644
--- a/sc/source/ui/dbgui/foptmgr.cxx
+++ b/sc/source/ui/dbgui/foptmgr.cxx
@@ -68,10 +68,9 @@ ScFilterOptionsMgr::ScFilterOptionsMgr(
ScFilterOptionsMgr::~ScFilterOptionsMgr()
{
- sal_uInt16 nEntries = pLbCopyArea->GetEntryCount();
- sal_uInt16 i;
+ const sal_Int32 nEntries = pLbCopyArea->GetEntryCount();
- for ( i=2; i<nEntries; i++ )
+ for ( sal_Int32 i=2; i<nEntries; i++ )
delete static_cast<OUString*>(pLbCopyArea->GetEntryData( i ));
}
@@ -115,7 +114,7 @@ void ScFilterOptionsMgr::Init()
ScRange aRange;
while ( aIter.Next( aName, aRange ) )
{
- sal_uInt16 nInsert = pLbCopyArea->InsertEntry( aName );
+ const sal_Int32 nInsert = pLbCopyArea->InsertEntry( aName );
OUString aRefStr(aRange.aStart.Format(SCA_ABS_3D, pDoc, eConv));
pLbCopyArea->SetEntryData( nInsert, new OUString( aRefStr ) );
@@ -215,7 +214,7 @@ IMPL_LINK( ScFilterOptionsMgr, LbAreaSelHdl, ListBox*, pLb )
if ( pLb == pLbCopyArea )
{
OUString aString;
- sal_uInt16 nSelPos = pLbCopyArea->GetSelectEntryPos();
+ const sal_Int32 nSelPos = pLbCopyArea->GetSelectEntryPos();
if ( nSelPos > 0 )
aString = *static_cast<OUString*>(pLbCopyArea->GetEntryData( nSelPos ));
@@ -236,8 +235,8 @@ IMPL_LINK( ScFilterOptionsMgr, EdAreaModifyHdl, Edit*, pEd )
if ( SCA_VALID == (nResult & SCA_VALID) )
{
bool bFound = false;
- sal_uInt16 i = 0;
- sal_uInt16 nCount = pLbCopyArea->GetEntryCount();
+ sal_Int32 i = 0;
+ const sal_Int32 nCount = pLbCopyArea->GetEntryCount();
for ( i=2; i<nCount && !bFound; i++ )
{
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index f2ed203c05e7..87de436830eb 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -367,7 +367,7 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem()
for ( SCSIZE i=0; i<3; i++ )
{
- sal_uInt16 nField = aFieldLbArr[i]->GetSelectEntryPos();
+ const sal_Int32 nField = aFieldLbArr[i]->GetSelectEntryPos();
ScQueryOp eOp = (ScQueryOp)aCondLbArr[i]->GetSelectEntryPos();
bool bDoThis = (aFieldLbArr[i]->GetSelectEntryPos() != 0);
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index 237ab594606d..bbc88e021aa3 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -103,10 +103,9 @@ ScSpecialFilterDlg::~ScSpecialFilterDlg()
void ScSpecialFilterDlg::dispose()
{
- sal_uInt16 nEntries = pLbFilterArea->GetEntryCount();
- sal_uInt16 i;
+ const sal_Int32 nEntries = pLbFilterArea->GetEntryCount();
- for ( i=1; i<nEntries; i++ )
+ for ( sal_Int32 i=1; i<nEntries; ++i )
delete static_cast<OUString*>(pLbFilterArea->GetEntryData( i ));
delete pOptionsMgr;
@@ -164,13 +163,12 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet )
if (!pRangeNames->empty())
{
ScRangeName::const_iterator itr = pRangeNames->begin(), itrEnd = pRangeNames->end();
- sal_uInt16 nInsert = 0;
for (; itr != itrEnd; ++itr)
{
if (!itr->second->HasType(RT_CRITERIA))
continue;
- nInsert = pLbFilterArea->InsertEntry(itr->second->GetName());
+ const sal_Int32 nInsert = pLbFilterArea->InsertEntry(itr->second->GetName());
OUString aSymbol;
itr->second->GetSymbol(aSymbol);
pLbFilterArea->SetEntryData(nInsert, new OUString(aSymbol));
@@ -432,7 +430,7 @@ IMPL_LINK( ScSpecialFilterDlg, FilterAreaSelHdl, ListBox*, pLb )
if ( pLb == pLbFilterArea )
{
OUString aString;
- sal_uInt16 nSelPos = pLbFilterArea->GetSelectEntryPos();
+ const sal_Int32 nSelPos = pLbFilterArea->GetSelectEntryPos();
if ( nSelPos > 0 )
aString = *static_cast<OUString*>(pLbFilterArea->GetEntryData( nSelPos ));
@@ -455,8 +453,8 @@ IMPL_LINK( ScSpecialFilterDlg, FilterAreaModHdl, formula::RefEdit*, pEd )
if ( SCA_VALID == (nResult & SCA_VALID) )
{
bool bFound = false;
- sal_uInt16 i = 0;
- sal_uInt16 nCount = pLbFilterArea->GetEntryCount();
+ sal_Int32 i = 0;
+ const sal_Int32 nCount = pLbFilterArea->GetEntryCount();
for ( i=1; i<nCount && !bFound; i++ )
{
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 176651486f3d..b5ef0b344c33 100644
--- a/sc/source/ui/dbgui/tpsort.cxx
+++ b/sc/source/ui/dbgui/tpsort.cxx
@@ -530,9 +530,9 @@ ScTabPageSortOptions::~ScTabPageSortOptions()
void ScTabPageSortOptions::dispose()
{
- sal_uInt16 nEntries = m_pLbOutPos->GetEntryCount();
+ const sal_Int32 nEntries = m_pLbOutPos->GetEntryCount();
- for ( sal_uInt16 i=1; i<nEntries; i++ )
+ for ( sal_Int32 i=1; i<nEntries; ++i )
delete static_cast<OUString*>(m_pLbOutPos->GetEntryData( i ));
delete pColRes;
@@ -594,7 +594,7 @@ void ScTabPageSortOptions::Init()
ScRange aRange;
while ( aIter.Next( aName, aRange ) )
{
- sal_uInt16 nInsert = m_pLbOutPos->InsertEntry( aName );
+ const sal_Int32 nInsert = m_pLbOutPos->InsertEntry( aName );
OUString aRefStr(aRange.aStart.Format(SCA_ABS_3D, pDoc, eConv));
m_pLbOutPos->SetEntryData( nInsert, new OUString( aRefStr ) );
@@ -746,7 +746,7 @@ bool ScTabPageSortOptions::FillItemSet( SfxItemSet* rArgSet )
{
uno::Sequence<OUString> aAlgos = pColWrap->listCollatorAlgorithms(
aNewSortData.aCollatorLocale );
- sal_uInt16 nSel = m_pLbAlgorithm->GetSelectEntryPos();
+ const sal_Int32 nSel = m_pLbAlgorithm->GetSelectEntryPos();
if ( nSel < aAlgos.getLength() )
sAlg = aAlgos[nSel];
}
@@ -881,7 +881,7 @@ IMPL_LINK( ScTabPageSortOptions, SelOutPosHdl, ListBox *, pLb )
if (pLb == m_pLbOutPos)
{
OUString aString;
- sal_uInt16 nSelPos = m_pLbOutPos->GetSelectEntryPos();
+ const sal_Int32 nSelPos = m_pLbOutPos->GetSelectEntryPos();
if ( nSelPos > 0 )
aString = *static_cast<OUString*>(m_pLbOutPos->GetEntryData( nSelPos ));
@@ -913,8 +913,8 @@ void ScTabPageSortOptions::EdOutPosModHdl( Edit* pEd )
if ( SCA_VALID == (nResult & SCA_VALID) )
{
bool bFound = false;
- sal_uInt16 i = 0;
- sal_uInt16 nCount = m_pLbOutPos->GetEntryCount();
+ sal_Int32 i = 0;
+ const sal_Int32 nCount = m_pLbOutPos->GetEntryCount();
for ( i=2; i<nCount && !bFound; i++ )
{
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index da4afa5c006e..04c1de102261 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -199,9 +199,9 @@ bool ScTpSubTotalGroup::DoFillItemSet( sal_uInt16 nGroupNo,
std::unique_ptr<ScSubTotalFunc[]> pFunctions;
std::unique_ptr<SCCOL[]> pSubTotals;
- sal_uInt16 nGroup = mpLbGroup->GetSelectEntryPos();
- sal_uInt16 nEntryCount = (sal_uInt16)mpLbColumns->GetEntryCount();
- sal_uInt16 nCheckCount = mpLbColumns->GetCheckedEntryCount();
+ const sal_Int32 nGroup = mpLbGroup->GetSelectEntryPos();
+ const sal_Int32 nEntryCount = mpLbColumns->GetEntryCount();
+ const sal_Int32 nCheckCount = mpLbColumns->GetCheckedEntryCount();
theSubTotalData.nCol1 = rSubTotalData.nCol1;
theSubTotalData.nRow1 = rSubTotalData.nRow1;
@@ -219,7 +219,7 @@ bool ScTpSubTotalGroup::DoFillItemSet( sal_uInt16 nGroupNo,
pSubTotals.reset(new SCCOL [nCheckCount]);
pFunctions.reset(new ScSubTotalFunc [nCheckCount]);
- for ( sal_uInt16 i=0, nCheck=0; i<nEntryCount; i++ )
+ for ( sal_Int32 i=0, nCheck=0; i<nEntryCount; i++ )
{
if ( mpLbColumns->IsChecked( i ) )
{
@@ -351,8 +351,8 @@ IMPL_LINK( ScTpSubTotalGroup, SelectHdl, void *, pLb )
if ( (mpLbColumns->GetEntryCount() > 0)
&& (mpLbColumns->GetSelectionCount() > 0) )
{
- sal_uInt16 nFunction = mpLbFunctions->GetSelectEntryPos();
- sal_uInt16 nColumn = mpLbColumns->GetSelectEntryPos();
+ const sal_Int32 nFunction = mpLbFunctions->GetSelectEntryPos();
+ const sal_Int32 nColumn = mpLbColumns->GetSelectEntryPos();
sal_uInt16* pFunction = static_cast<sal_uInt16*>(mpLbColumns->GetEntryData( nColumn ));
OSL_ENSURE( pFunction, "EntryData not found!" );
@@ -365,7 +365,7 @@ IMPL_LINK( ScTpSubTotalGroup, SelectHdl, void *, pLb )
}
else if ( pLb == mpLbFunctions )
{
- *pFunction = nFunction;
+ *pFunction = static_cast<sal_uInt16>(nFunction);
mpLbColumns->CheckEntryPos( nColumn );
}
}
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 196223bbca1d..2262955ce46e 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -578,7 +578,7 @@ void ScTPValidationValue::RemoveRefDlg()
IMPL_LINK_NOARG(ScTPValidationValue, EditSetFocusHdl)
{
- sal_uInt16 nPos=m_pLbAllow->GetSelectEntryPos();
+ const sal_Int32 nPos = m_pLbAllow->GetSelectEntryPos();
if ( nPos == SC_VALIDDLG_ALLOW_RANGE )
{
@@ -603,7 +603,7 @@ IMPL_LINK( ScTPValidationValue, KillFocusHdl, vcl::Window *, pWnd )
IMPL_LINK_NOARG(ScTPValidationValue, SelectHdl)
{
- sal_uInt16 nLbPos = m_pLbAllow->GetSelectEntryPos();
+ const sal_Int32 nLbPos = m_pLbAllow->GetSelectEntryPos();
bool bEnable = (nLbPos != SC_VALIDDLG_ALLOW_ANY);
bool bRange = (nLbPos == SC_VALIDDLG_ALLOW_RANGE);
bool bList = (nLbPos == SC_VALIDDLG_ALLOW_LIST);
diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx
index ec532f370422..2bdf95278847 100644
--- a/sc/source/ui/inc/consdlg.hxx
+++ b/sc/source/ui/inc/consdlg.hxx
@@ -97,8 +97,8 @@ private:
DECL_LINK( ModifyHdl, formula::RefEdit* );
DECL_LINK( SelectHdl, ListBox* );
- static ScSubTotalFunc LbPosToFunc( sal_uInt16 nPos );
- static sal_uInt16 FuncToLbPos( ScSubTotalFunc eFunc );
+ static ScSubTotalFunc LbPosToFunc( sal_Int32 nPos );
+ static sal_Int32 FuncToLbPos( ScSubTotalFunc eFunc );
};
#endif // INCLUDED_SC_SOURCE_UI_INC_CONSDLG_HXX
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index fa24392796b8..54faeabe0fab 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -354,7 +354,6 @@ void ScColRowNameRangesDlg::UpdateNames()
pEdAssign->SetText( EMPTY_OUSTRING );
size_t nCount, j;
- sal_uInt16 nPos; //@008 inserted auxiliary variable q
SCCOL nCol1;
SCROW nRow1; //Extension for range names
@@ -371,7 +370,7 @@ void ScColRowNameRangesDlg::UpdateNames()
aString = strDelim;
aString += ScGlobal::GetRscString( STR_COLUMN );
aString += strDelim;
- nPos = pLbRange->InsertEntry( aString );
+ sal_Int32 nPos = pLbRange->InsertEntry( aString );
pLbRange->SetEntryData( nPos, reinterpret_cast<void*>(nEntryDataDelim) );
if ( (nCount = xColNameRanges->size()) > 0 )
{
@@ -580,7 +579,7 @@ IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, AddBtnHdl, Button*, void)
IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, RemoveBtnHdl, Button*, void)
{
OUString aRangeStr = pLbRange->GetSelectEntry();
- sal_uInt16 nSelectPos = pLbRange->GetSelectEntryPos();
+ sal_Int32 nSelectPos = pLbRange->GetSelectEntryPos();
bool bColName =
(reinterpret_cast<sal_uLong>(pLbRange->GetEntryData( nSelectPos )) == nEntryDataCol);
NameRangeMap::const_iterator itr = aRangeMap.find(aRangeStr);
@@ -611,7 +610,7 @@ IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, RemoveBtnHdl, Button*, void)
delete pPair;
UpdateNames();
- sal_uInt16 nCnt = pLbRange->GetEntryCount();
+ const sal_Int32 nCnt = pLbRange->GetEntryCount();
if ( nSelectPos >= nCnt )
{
if ( nCnt )
@@ -640,8 +639,8 @@ IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, RemoveBtnHdl, Button*, void)
// handler called when a row in the listbox is selected, updates form input fields
IMPL_LINK_NOARG(ScColRowNameRangesDlg, Range1SelectHdl)
{
- sal_uInt16 nSelectPos = pLbRange->GetSelectEntryPos();
- sal_uInt16 nCnt = pLbRange->GetEntryCount();
+ sal_Int32 nSelectPos = pLbRange->GetSelectEntryPos();
+ const sal_Int32 nCnt = pLbRange->GetEntryCount();
sal_uInt16 nMoves = 0;
while ( nSelectPos < nCnt
&& reinterpret_cast<sal_uLong>(pLbRange->GetEntryData( nSelectPos )) == nEntryDataDelim )
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx
index 246cac6e3a0c..d5f5b01fee4d 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -331,8 +331,8 @@ OUString ScLinkedAreaDlg::GetOptions()
OUString ScLinkedAreaDlg::GetSource()
{
OUStringBuffer aBuf;
- sal_uInt16 nCount = m_pLbRanges->GetSelectEntryCount();
- for (sal_uInt16 i=0; i<nCount; i++)
+ const sal_Int32 nCount = m_pLbRanges->GetSelectEntryCount();
+ for (sal_Int32 i=0; i<nCount; ++i)
{
if (i > 0)
aBuf.append(';');
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 6c9f4a925d5d..5f25f2ec121c 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -162,7 +162,7 @@ void ScMoveTableDlg::CheckNewTabName()
bool bMoveInCurrentDoc = (pBtnMove->IsChecked() && IsCurrentDocSelected());
bool bFound = false;
- sal_uInt16 nLast = pLbTable->GetEntryCount() - 1;
+ const sal_Int32 nLast = pLbTable->GetEntryCount() - 1;
for ( sal_uInt16 i=0; i<=nLast && !bFound; ++i )
{
if ( aNewName.equals(pLbTable->GetEntry(i)) )
@@ -263,10 +263,10 @@ IMPL_LINK_TYPED( ScMoveTableDlg, CheckBtnHdl, RadioButton&, rBtn, void )
IMPL_LINK_NOARG_TYPED(ScMoveTableDlg, OkHdl, Button*, void)
{
- sal_uInt16 nDocSel = pLbDoc->GetSelectEntryPos();
- sal_uInt16 nDocLast = pLbDoc->GetEntryCount()-1;
- sal_uInt16 nTabSel = pLbTable->GetSelectEntryPos();
- sal_uInt16 nTabLast = pLbTable->GetEntryCount()-1;
+ const sal_Int32 nDocSel = pLbDoc->GetSelectEntryPos();
+ const sal_Int32 nDocLast = pLbDoc->GetEntryCount()-1;
+ const sal_Int32 nTabSel = pLbTable->GetSelectEntryPos();
+ const sal_Int32 nTabLast = pLbTable->GetEntryCount()-1;
nDocument = (nDocSel != nDocLast) ? nDocSel : SC_DOC_NEW;
nTable = (nTabSel != nTabLast) ? static_cast<SCTAB>(nTabSel) : SC_TAB_APPEND;
diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx
index c6ed2a3a5d2d..e01a7a9fef0c 100644
--- a/sc/source/ui/miscdlgs/solveroptions.cxx
+++ b/sc/source/ui/miscdlgs/solveroptions.cxx
@@ -363,7 +363,7 @@ IMPL_LINK_NOARG_TYPED(ScSolverOptionsDialog, SettingsDoubleClickHdl, SvTreeListB
IMPL_LINK_NOARG(ScSolverOptionsDialog, EngineSelectHdl)
{
- sal_uInt16 nSelectPos = m_pLbEngine->GetSelectEntryPos();
+ const sal_Int32 nSelectPos = m_pLbEngine->GetSelectEntryPos();
if ( nSelectPos < maImplNames.getLength() )
{
OUString aNewEngine( maImplNames[nSelectPos] );
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index 8c69bb17d017..4511ce716664 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -246,7 +246,7 @@ SfxTabPage::sfxpg ScTpContentOptions::DeactivatePage( SfxItemSet* pSetP )
IMPL_LINK( ScTpContentOptions, SelLbObjHdl, ListBox*, pLb )
{
- sal_uInt16 nSelPos = pLb->GetSelectEntryPos();
+ const sal_Int32 nSelPos = pLb->GetSelectEntryPos();
ScVObjMode eMode = ScVObjMode(nSelPos);
ScVObjType eType = VOBJ_TYPE_OLE;
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index c2095e176a75..3b20cd717f20 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -40,14 +40,18 @@
// STATIC DATA ---------------------------------------------------------------
// List box positions for print range (PR)
-const sal_uInt16 SC_AREASDLG_PR_ENTIRE = 1;
-const sal_uInt16 SC_AREASDLG_PR_USER = 2;
-const sal_uInt16 SC_AREASDLG_PR_SELECT = 3;
+enum {
+ SC_AREASDLG_PR_ENTIRE = 1,
+ SC_AREASDLG_PR_USER = 2,
+ SC_AREASDLG_PR_SELECT = 3
+};
// List box positions for repeat ranges (RR)
-const sal_uInt16 SC_AREASDLG_RR_NONE = 0;
-const sal_uInt16 SC_AREASDLG_RR_USER = 1;
-const sal_uInt16 SC_AREASDLG_RR_OFFSET = 2;
+enum {
+ SC_AREASDLG_RR_NONE = 0,
+ SC_AREASDLG_RR_USER = 1,
+ SC_AREASDLG_RR_OFFSET = 2
+};
#define HDL(hdl) LINK( this, ScPrintAreasDlg, hdl )
#define ERRORBOX(nId) ScopedVclPtrInstance<MessageDialog>::Create(this, ScGlobal::GetRscString(nId))->Execute()
@@ -146,8 +150,8 @@ void ScPrintAreasDlg::dispose()
for (sal_uInt16 i = 0; i < SAL_N_ELEMENTS(aLb); ++i)
{
- sal_uInt16 nCount = aLb[i]->GetEntryCount();
- for ( sal_uInt16 j=0; j<nCount; j++ )
+ const sal_Int32 nCount = aLb[i]->GetEntryCount();
+ for ( sal_Int32 j=0; j<nCount; j++ )
delete static_cast<OUString*>(aLb[i]->GetEntryData(j));
}
pLbPrintArea.clear();
@@ -539,13 +543,13 @@ IMPL_LINK( ScPrintAreasDlg, Impl_GetFocusHdl, Control*, pCtr )
IMPL_LINK( ScPrintAreasDlg, Impl_SelectHdl, ListBox*, pLb )
{
- sal_uInt16 nSelPos = pLb->GetSelectEntryPos();
+ const sal_Int32 nSelPos = pLb->GetSelectEntryPos();
Edit* pEd = NULL;
// list box positions of specific entries, default to "repeat row/column" list boxes
- sal_uInt16 nAllSheetPos = SC_AREASDLG_RR_NONE;
- sal_uInt16 nUserDefPos = SC_AREASDLG_RR_USER;
- sal_uInt16 nFirstCustomPos = SC_AREASDLG_RR_OFFSET;
+ sal_Int32 nAllSheetPos = SC_AREASDLG_RR_NONE;
+ sal_Int32 nUserDefPos = SC_AREASDLG_RR_USER;
+ sal_Int32 nFirstCustomPos = SC_AREASDLG_RR_OFFSET;
// find edit field for list box, and list box positions
if( pLb == pLbPrintArea )
@@ -578,8 +582,8 @@ IMPL_LINK( ScPrintAreasDlg, Impl_ModifyHdl, formula::RefEdit*, pEd )
ListBox* pLb = NULL;
// list box positions of specific entries, default to "repeat row/column" list boxes
- sal_uInt16 nUserDefPos = SC_AREASDLG_RR_USER;
- sal_uInt16 nFirstCustomPos = SC_AREASDLG_RR_OFFSET;
+ sal_Int32 nUserDefPos = SC_AREASDLG_RR_USER;
+ sal_Int32 nFirstCustomPos = SC_AREASDLG_RR_OFFSET;
if( pEd == pEdPrintArea )
{
@@ -595,7 +599,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_ModifyHdl, formula::RefEdit*, pEd )
return 0;
// set list box selection according to edit field
- sal_uInt16 nEntryCount = pLb->GetEntryCount();
+ const sal_Int32 nEntryCount = pLb->GetEntryCount();
OUString aStrEd( pEd->GetText() );
OUString aEdUpper = aStrEd.toAsciiUpperCase();
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index 38dd1ce3835e..ccd9167799ad 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -304,7 +304,7 @@ void ScHFEditPage::InitPreDefinedList()
void ScHFEditPage::InsertToDefinedList()
{
- sal_uInt16 nCount = m_pLbDefined->GetEntryCount();
+ const sal_Int32 nCount = m_pLbDefined->GetEntryCount();
if(nCount == eEntryCount)
{
m_pLbDefined->InsertEntry( m_pFtCustomized->GetText() );
@@ -314,7 +314,7 @@ void ScHFEditPage::InsertToDefinedList()
void ScHFEditPage::RemoveFromDefinedList()
{
- sal_uInt16 nCount = m_pLbDefined->GetEntryCount();
+ const sal_Int32 nCount = m_pLbDefined->GetEntryCount();
if(nCount > eEntryCount )
m_pLbDefined->RemoveEntry( nCount-1);
}
@@ -341,9 +341,8 @@ void ScHFEditPage::SetSelectDefinedList()
bool bFound = false;
- sal_uInt16 i;
- sal_uInt16 nCount = m_pLbDefined->GetEntryCount();
- for(i = 0; i < nCount && !bFound; i++)
+ const sal_Int32 nCount = m_pLbDefined->GetEntryCount();
+ for(sal_Int32 i = 0; i < nCount && !bFound; ++i)
{
switch(static_cast<ScHFEntryId>(i))
{
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index 25ad6a570091..00b87c7b68b1 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -108,7 +108,7 @@ void NumberFormatPropertyPanel::Initialize()
IMPL_LINK( NumberFormatPropertyPanel, NumFormatSelectHdl, ListBox*, pBox )
{
- sal_uInt16 nVal = pBox->GetSelectEntryPos();
+ const sal_Int32 nVal = pBox->GetSelectEntryPos();
if( nVal != mnCategorySelected )
{
SfxUInt16Item aItem( SID_NUMBER_TYPE_FORMAT, nVal );
diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
index 7a024e078fc0..0a9545936606 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx
@@ -78,7 +78,7 @@ private:
::sfx2::sidebar::ControllerItem maNumFormatControl;
::sfx2::sidebar::ControllerItem maFormatControl;
- sal_uInt16 mnCategorySelected;
+ sal_Int32 mnCategorySelected;
css::uno::Reference<css::frame::XFrame> mxFrame;
::sfx2::sidebar::EnumContext maContext;
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 0e265f90630c..436f569414ed 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -819,9 +819,8 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if( pDlg->Execute() == RET_OK )
{
- sal_uInt16 nSelCount = pDlg->GetSelectEntryCount();
- sal_uInt16 nSelIx;
- for( nSelIx = 0; nSelIx < nSelCount; ++nSelIx )
+ const sal_Int32 nSelCount = pDlg->GetSelectEntryCount();
+ for( sal_Int32 nSelIx = 0; nSelIx < nSelCount; ++nSelIx )
aIndexList.insert( aIndexList.begin()+nSelIx, pDlg->GetSelectEntryPos( nSelIx ) );
pDlg.reset();
rReq.AppendItem( SfxIntegerListItem( SID_SELECT_TABLES, aIndexList ) );
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index a2ca5bb669d6..337531d58077 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -149,8 +149,8 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if ( pDlg->Execute() == RET_OK )
{
- sal_uInt16 nCount = pDlg->GetSelectEntryCount();
- for (sal_uInt16 nPos=0; nPos<nCount; nPos++)
+ const sal_Int32 nCount = pDlg->GetSelectEntryCount();
+ for (sal_Int32 nPos=0; nPos<nCount; ++nPos)
{
aName = pDlg->GetSelectEntry(nPos);
rReq.AppendItem( SfxStringItem( FID_TABLE_SHOW, aName ) );