summaryrefslogtreecommitdiff
path: root/dbaccess/source
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source')
-rw-r--r--dbaccess/source/ui/dlg/dbfindex.cxx8
-rw-r--r--dbaccess/source/ui/dlg/generalpage.cxx20
-rw-r--r--dbaccess/source/ui/dlg/queryfilter.cxx12
-rw-r--r--dbaccess/source/ui/inc/WColumnSelect.hxx2
-rw-r--r--dbaccess/source/ui/inc/queryfilter.hxx2
-rw-r--r--dbaccess/source/ui/misc/WColumnSelect.cxx30
-rw-r--r--dbaccess/source/ui/misc/WTypeSelect.cxx22
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.cxx10
8 files changed, 52 insertions, 54 deletions
diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx
index 6bea91f71364..f86314a3155b 100644
--- a/dbaccess/source/ui/dlg/dbfindex.cxx
+++ b/dbaccess/source/ui/dlg/dbfindex.cxx
@@ -223,10 +223,10 @@ IMPL_LINK_NOARG_TYPED( ODbaseIndexDialog, RemoveClickHdl, Button*, void )
IMPL_LINK_NOARG_TYPED( ODbaseIndexDialog, AddAllClickHdl, Button*, void )
{
- sal_uInt16 nCnt = m_pLB_FreeIndexes->GetEntryCount();
+ const sal_Int32 nCnt = m_pLB_FreeIndexes->GetEntryCount();
OUString aTableName = m_pCB_Tables->GetText();
- for( sal_uInt16 nPos = 0; nPos < nCnt; ++nPos )
+ for( sal_Int32 nPos = 0; nPos < nCnt; ++nPos )
InsertTableIndex( aTableName, RemoveFreeIndex( m_pLB_FreeIndexes->GetEntry(0), true ) );
checkButtons();
@@ -234,10 +234,10 @@ IMPL_LINK_NOARG_TYPED( ODbaseIndexDialog, AddAllClickHdl, Button*, void )
IMPL_LINK_NOARG_TYPED( ODbaseIndexDialog, RemoveAllClickHdl, Button*, void )
{
- sal_uInt16 nCnt = m_pLB_TableIndexes->GetEntryCount();
+ const sal_Int32 nCnt = m_pLB_TableIndexes->GetEntryCount();
OUString aTableName = m_pCB_Tables->GetText();
- for( sal_uInt16 nPos = 0; nPos < nCnt; ++nPos )
+ for( sal_Int32 nPos = 0; nPos < nCnt; ++nPos )
InsertFreeIndex( RemoveTableIndex( aTableName, m_pLB_TableIndexes->GetEntry(0), true ) );
checkButtons();
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 08bc95202364..3ed48c8933eb 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -364,8 +364,8 @@ namespace dbaui
void OGeneralPage::insertDatasourceTypeEntryData(const OUString& _sType, const OUString& sDisplayName)
{
// insert a (temporary) entry
- sal_uInt16 nPos = m_pDatasourceType->InsertEntry(sDisplayName);
- if ( nPos >= m_aURLPrefixes.size() )
+ const sal_Int32 nPos = m_pDatasourceType->InsertEntry(sDisplayName);
+ if ( static_cast<size_t>(nPos) >= m_aURLPrefixes.size() )
m_aURLPrefixes.resize(nPos+1);
m_aURLPrefixes[nPos] = _sType;
}
@@ -373,8 +373,8 @@ namespace dbaui
void OGeneralPageWizard::insertEmbeddedDBTypeEntryData(const OUString& _sType, const OUString& sDisplayName)
{
// insert a (temporary) entry
- sal_uInt16 nPos = m_pEmbeddedDBType->InsertEntry(sDisplayName);
- if ( nPos >= m_aEmbeddedURLPrefixes.size() )
+ const sal_Int32 nPos = m_pEmbeddedDBType->InsertEntry(sDisplayName);
+ if ( static_cast<size_t>(nPos) >= m_aEmbeddedURLPrefixes.size() )
m_aEmbeddedURLPrefixes.resize(nPos+1);
m_aEmbeddedURLPrefixes[nPos] = _sType;
}
@@ -409,8 +409,8 @@ namespace dbaui
IMPL_LINK( OGeneralPageWizard, OnEmbeddedDBTypeSelected, ListBox*, _pBox )
{
// get the type from the entry data
- sal_uInt16 nSelected = _pBox->GetSelectEntryPos();
- if (nSelected >= m_aEmbeddedURLPrefixes.size() )
+ const sal_Int32 nSelected = _pBox->GetSelectEntryPos();
+ if (static_cast<size_t>(nSelected) >= m_aEmbeddedURLPrefixes.size() )
{
SAL_WARN("dbaccess.ui.OGeneralPage", "Got out-of-range value '" << nSelected << "' from the DatasourceType selection ListBox's GetSelectEntryPos(): no corresponding URL prefix");
return 0L;
@@ -429,8 +429,8 @@ namespace dbaui
IMPL_LINK( OGeneralPage, OnDatasourceTypeSelected, ListBox*, _pBox )
{
// get the type from the entry data
- sal_uInt16 nSelected = _pBox->GetSelectEntryPos();
- if (nSelected >= m_aURLPrefixes.size() )
+ const sal_Int32 nSelected = _pBox->GetSelectEntryPos();
+ if (static_cast<size_t>(nSelected) >= m_aURLPrefixes.size() )
{
SAL_WARN("dbaccess.ui.OGeneralPage", "Got out-of-range value '" << nSelected << "' from the DatasourceType selection ListBox's GetSelectEntryPos(): no corresponding URL prefix");
return 0L;
@@ -477,7 +477,7 @@ namespace dbaui
{
bool bChangedSomething = false;
- sal_uInt16 nEntry = m_pDatasourceType->GetSelectEntryPos();
+ const sal_Int32 nEntry = m_pDatasourceType->GetSelectEntryPos();
OUString sURLPrefix = m_aURLPrefixes[ nEntry ];
if ( m_pDatasourceType->IsValueChangedFromSaved() )
@@ -670,7 +670,7 @@ namespace dbaui
if ( bCommitTypeSelection )
{
- sal_uInt16 nEntry = m_pDatasourceType->GetSelectEntryPos();
+ const sal_Int32 nEntry = m_pDatasourceType->GetSelectEntryPos();
OUString sURLPrefix = m_aURLPrefixes[nEntry];
if ( m_pDatasourceType->IsValueChangedFromSaved()
diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx
index eebe5c15a38d..373b6d0fb568 100644
--- a/dbaccess/source/ui/dlg/queryfilter.cxx
+++ b/dbaccess/source/ui/dlg/queryfilter.cxx
@@ -97,8 +97,8 @@ DlgFilterCrit::DlgFilterCrit(vcl::Window * pParent,
m_pLB_WHERECOMP1->set_width_request(aSize.Width());
m_pLB_WHERECOMP2->set_width_request(aSize.Width());
m_pLB_WHERECOMP3->set_width_request(aSize.Width());
- sal_uInt16 nEntryCount = m_pLB_WHERECOMP1->GetEntryCount();
- for (sal_uInt16 i = 0; i < nEntryCount; ++i)
+ const sal_Int32 nEntryCount = m_pLB_WHERECOMP1->GetEntryCount();
+ for (sal_Int32 i = 0; i < nEntryCount; ++i)
{
if (i > 0)
m_aSTR_COMPARE_OPERATORS += ";";
@@ -265,9 +265,9 @@ sal_Int32 DlgFilterCrit::GetOSQLPredicateType( const OUString& _rSelectedPredica
return nPredicateType;
}
-sal_uInt16 DlgFilterCrit::GetSelectionPos(sal_Int32 eType,const ListBox& rListBox)
+sal_Int32 DlgFilterCrit::GetSelectionPos(sal_Int32 eType,const ListBox& rListBox)
{
- sal_uInt16 nPos;
+ sal_Int32 nPos;
switch(eType)
{
case SQLFilterOperator::EQUAL:
@@ -570,9 +570,9 @@ void DlgFilterCrit::SetLine( sal_uInt16 nIdx,const PropertyValue& _rItem,bool _b
void DlgFilterCrit::SelectField( ListBox& rBox, const OUString& rField )
{
- sal_uInt16 nCnt = rBox.GetEntryCount();
+ const sal_Int32 nCnt = rBox.GetEntryCount();
- for( sal_uInt16 i=0 ; i<nCnt ; i++ )
+ for( sal_Int32 i=0 ; i<nCnt ; i++ )
{
if(rBox.GetEntry(i) == rField)
{
diff --git a/dbaccess/source/ui/inc/WColumnSelect.hxx b/dbaccess/source/ui/inc/WColumnSelect.hxx
index a653d9e31950..edf527f2f5b1 100644
--- a/dbaccess/source/ui/inc/WColumnSelect.hxx
+++ b/dbaccess/source/ui/inc/WColumnSelect.hxx
@@ -67,7 +67,7 @@ namespace dbaui
void enableButtons();
- sal_uInt16 adjustColumnPosition(ListBox* _pLeft,
+ sal_Int32 adjustColumnPosition(ListBox* _pLeft,
const OUString& _sColumnName,
ODatabaseExport::TColumnVector::size_type nCurrentPos,
const ::comphelper::UStringMixEqual& _aCase);
diff --git a/dbaccess/source/ui/inc/queryfilter.hxx b/dbaccess/source/ui/inc/queryfilter.hxx
index dcc7b792b027..32fb47c0ed38 100644
--- a/dbaccess/source/ui/inc/queryfilter.hxx
+++ b/dbaccess/source/ui/inc/queryfilter.hxx
@@ -97,7 +97,7 @@ namespace dbaui
void SetLine( sal_uInt16 nIdx,const css::beans::PropertyValue& _rItem,bool _bOr );
void EnableLines();
sal_Int32 GetOSQLPredicateType( const OUString& _rSelectedPredicate ) const;
- static sal_uInt16 GetSelectionPos(sal_Int32 eType,const ListBox& rListBox);
+ static sal_Int32 GetSelectionPos(sal_Int32 eType,const ListBox& rListBox);
bool getCondition(const ListBox& _rField,const ListBox& _rComp,const Edit& _rValue,css::beans::PropertyValue& _rFilter) const;
void fillLines(const css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > >& _aValues);
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index b0b618882845..7167141f2513 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -128,7 +128,7 @@ void OWizColumnSelect::Reset()
for(;aIter != aEnd;++aIter)
{
- sal_uInt16 nPos = m_pOrgColumnNames->InsertEntry((*aIter)->first);
+ const sal_Int32 nPos = m_pOrgColumnNames->InsertEntry((*aIter)->first);
m_pOrgColumnNames->SetEntryData(nPos,(*aIter)->second);
}
@@ -152,7 +152,7 @@ void OWizColumnSelect::ActivatePage( )
ODatabaseExport::TColumnVector::const_iterator aEnd = rDestColumns.end();
for(;aIter != aEnd;++aIter)
{
- sal_uInt16 nPos = m_pNewColumnNames->InsertEntry((*aIter)->first);
+ const sal_Int32 nPos = m_pNewColumnNames->InsertEntry((*aIter)->first);
m_pNewColumnNames->SetEntryData(nPos,new OFieldDescription(*((*aIter)->second)));
m_pOrgColumnNames->RemoveEntry((*aIter)->first);
}
@@ -228,16 +228,16 @@ IMPL_LINK_TYPED( OWizColumnSelect, ButtonClickHdl, Button *, pButton, void )
for(sal_Int32 i=0; i < pLeft->GetSelectEntryCount(); ++i)
moveColumn(pRight,pLeft,aRightColumns,pLeft->GetSelectEntry(i),sExtraChars,nMaxNameLen,aCase);
- for(sal_uInt16 j=pLeft->GetSelectEntryCount(); j ; --j)
+ for(sal_Int32 j=pLeft->GetSelectEntryCount(); j ; --j)
pLeft->RemoveEntry(pLeft->GetSelectEntry(j-1));
}
else
{
- sal_uInt16 nEntries = pLeft->GetEntryCount();
- for(sal_uInt16 i=0; i < nEntries; ++i)
+ const sal_Int32 nEntries = pLeft->GetEntryCount();
+ for(sal_Int32 i=0; i < nEntries; ++i)
moveColumn(pRight,pLeft,aRightColumns,pLeft->GetEntry(i),sExtraChars,nMaxNameLen,aCase);
- for(sal_uInt16 j=pLeft->GetEntryCount(); j ; --j)
- pLeft->RemoveEntry(j-1);
+ for(sal_Int32 j=pLeft->GetEntryCount(); j ; )
+ pLeft->RemoveEntry(--j);
}
enableButtons();
@@ -271,8 +271,8 @@ IMPL_LINK( OWizColumnSelect, ListDoubleClickHdl, ListBox *, pListBox )
for(sal_Int32 i=0; i < pLeft->GetSelectEntryCount(); ++i)
moveColumn(pRight,pLeft,aRightColumns,pLeft->GetSelectEntry(i),sExtraChars,nMaxNameLen,aCase);
- for(sal_uInt16 j=pLeft->GetSelectEntryCount(); j ; --j)
- pLeft->RemoveEntry(pLeft->GetSelectEntry(j-1));
+ for(sal_Int32 j=pLeft->GetSelectEntryCount(); j ; )
+ pLeft->RemoveEntry(pLeft->GetSelectEntry(--j));
enableButtons();
return 0;
@@ -287,9 +287,9 @@ void OWizColumnSelect::clearListBox(ListBox& _rListBox)
void OWizColumnSelect::fillColumns(ListBox* pRight,::std::vector< OUString> &_rRightColumns)
{
- sal_uInt16 nCount = pRight->GetEntryCount();
+ const sal_Int32 nCount = pRight->GetEntryCount();
_rRightColumns.reserve(nCount);
- for(sal_uInt16 i=0; i < nCount;++i)
+ for(sal_Int32 i=0; i < nCount; ++i)
_rRightColumns.push_back(pRight->GetEntry(i));
}
@@ -365,21 +365,21 @@ void OWizColumnSelect::moveColumn( ListBox* _pRight,
// not enough. We need to take into account what fields have
// been removed earlier and adjust accordingly. Based on the
// algorithm employed in moveColumn().
-sal_uInt16 OWizColumnSelect::adjustColumnPosition( ListBox* _pLeft,
+sal_Int32 OWizColumnSelect::adjustColumnPosition( ListBox* _pLeft,
const OUString& _sColumnName,
ODatabaseExport::TColumnVector::size_type nCurrentPos,
const ::comphelper::UStringMixEqual& _aCase)
{
- sal_uInt16 nAdjustedPos = 0;
+ sal_Int32 nAdjustedPos = 0;
// if returning all entries to their original position,
// then there is no need to adjust the positions.
if (m_pColumns_LH->HasFocus())
return nAdjustedPos;
- sal_uInt16 nCount = _pLeft->GetEntryCount();
+ const sal_Int32 nCount = _pLeft->GetEntryCount();
OUString sColumnString;
- for(sal_uInt16 i=0; i < nCount; ++i)
+ for(sal_Int32 i=0; i < nCount; ++i)
{
sColumnString = _pLeft->GetEntry(i);
if(_sColumnName != sColumnString)
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index f6d06c99711a..99ba3559970d 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -97,7 +97,7 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
OFieldDescription* pCurFieldDescr = getCurrentFieldDescData();
- sal_uInt16 nPos = pListBox->GetEntryPos( OUString( pCurFieldDescr->GetName() ) );
+ const sal_Int32 nPos = pListBox->GetEntryPos( OUString( pCurFieldDescr->GetName() ) );
pCurFieldDescr = static_cast< OFieldDescription* >( pListBox->GetEntryData( nPos ) );
OSL_ENSURE( pCurFieldDescr, "OWizTypeSelectControl::CellModified: Columnname/type not found in the listbox!" );
if ( !pCurFieldDescr )
@@ -121,8 +121,8 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
if ( getMetaData().is() && !getMetaData()->supportsMixedCaseQuotedIdentifiers() )
{
bCase = false;
- sal_uInt16 nCount = pListBox->GetEntryCount();
- for (sal_uInt16 i=0 ; !bDoubleName && i < nCount ; ++i)
+ const sal_Int32 nCount = pListBox->GetEntryCount();
+ for (sal_Int32 i=0 ; !bDoubleName && i < nCount ; ++i)
{
OUString sEntry(pListBox->GetEntry(i));
bDoubleName = sNewName.equalsIgnoreAsciiCase(sEntry);
@@ -308,11 +308,9 @@ void OWizTypeSelect::Reset()
ODatabaseExport::TColumnVector::const_iterator aEnd = rDestColumns.end();
for(;aIter != aEnd;++aIter)
{
- sal_uInt16 nPos;
- if((*aIter)->second->IsPrimaryKey())
- nPos = m_pColumnNames->InsertEntry((*aIter)->first, m_imgPKey );
- else
- nPos = m_pColumnNames->InsertEntry((*aIter)->first);
+ const sal_Int32 nPos = (*aIter)->second->IsPrimaryKey()
+ ? m_pColumnNames->InsertEntry((*aIter)->first, m_imgPKey )
+ : m_pColumnNames->InsertEntry((*aIter)->first);
m_pColumnNames->SetEntryData(nPos,(*aIter)->second);
}
m_bFirstTime = false;
@@ -373,8 +371,8 @@ void OWizTypeSelectList::dispose()
bool OWizTypeSelectList::IsPrimaryKeyAllowed() const
{
- sal_uInt16 nCount = GetSelectEntryCount();
- sal_uInt16 j;
+ const sal_Int32 nCount = GetSelectEntryCount();
+ sal_Int32 j;
for( j = 0; m_bPKey && j < nCount; ++j )
{
@@ -432,8 +430,8 @@ bool OWizTypeSelectList::PreNotify( NotifyEvent& rEvt )
{
case SID_TABLEDESIGN_TABED_PRIMARYKEY:
{
- sal_uInt16 nCount = GetEntryCount();
- for(sal_uInt16 j = 0 ; j < nCount ; ++j)
+ const sal_Int32 nCount = GetEntryCount();
+ for(sal_Int32 j = 0 ; j < nCount ; ++j)
{
OFieldDescription* pFieldDescr = static_cast<OFieldDescription*>(GetEntryData(j));
if( pFieldDescr )
diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx
index 6d4d2ad386bd..e0a903888cb6 100644
--- a/dbaccess/source/ui/querydesign/querydlg.cxx
+++ b/dbaccess/source/ui/querydesign/querydlg.cxx
@@ -122,8 +122,8 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent,
}
else
{
- const sal_uInt16 nCount = m_pLB_JoinType->GetEntryCount();
- for (sal_uInt16 i = 0; i < nCount; ++i)
+ const sal_Int32 nCount = m_pLB_JoinType->GetEntryCount();
+ for (sal_Int32 i = 0; i < nCount; ++i)
{
const sal_IntPtr nJoinTyp = reinterpret_cast<sal_IntPtr>(m_pLB_JoinType->GetEntryData(i));
if ( !bSupportFullJoin && nJoinTyp == ID_FULL_JOIN )
@@ -167,7 +167,7 @@ IMPL_LINK( DlgQryJoin, LBChangeHdl, ListBox*, /*pListBox*/ )
OUString sSecondWinName = m_pConnData->getReferencedTable()->GetWinName();
const EJoinType eOldJoinType = eJoinType;
sal_uInt16 nResId = 0;
- const sal_uInt16 nPos = m_pLB_JoinType->GetSelectEntryPos();
+ const sal_Int32 nPos = m_pLB_JoinType->GetSelectEntryPos();
const sal_IntPtr nJoinType = reinterpret_cast<sal_IntPtr>(m_pLB_JoinType->GetEntryData(nPos));
bool bAddHint = true;
switch ( nJoinType )
@@ -322,8 +322,8 @@ void DlgQryJoin::setJoinType(EJoinType _eNewJoinType)
break;
}
- const sal_uInt16 nCount = m_pLB_JoinType->GetEntryCount();
- for (sal_uInt16 i = 0; i < nCount; ++i)
+ const sal_Int32 nCount = m_pLB_JoinType->GetEntryCount();
+ for (sal_Int32 i = 0; i < nCount; ++i)
{
if ( nJoinType == reinterpret_cast<sal_IntPtr>(m_pLB_JoinType->GetEntryData(i)) )
{