summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-07 19:47:34 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-03-07 19:47:34 +0100
commit5753ac2e281f80e7745c5b6346f1d36b7f90c880 (patch)
tree45b3a719e5ee747d1b77f42ff572fcd900eee140 /dbaccess
parent8455409cf81ba540558c2eb22a29fd12bea8bcff (diff)
loplugin:loopvartoosmall
Change-Id: Id82051b633050165077deb9a6a88d82707d53e75
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx7
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx4
-rw-r--r--dbaccess/source/ui/browser/exsrcbrw.cxx5
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx4
4 files changed, 9 insertions, 11 deletions
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 49515b84cd46..9f4f17e34b6a 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1124,7 +1124,7 @@ bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pConditi
if (SQL_ISRULE(pCondition->getChild(0), column_ref))
{
nPos = 0;
- sal_uInt32 i=1;
+ size_t i=1;
aItem.Handle = getPredicateType(pCondition->getChild(i));
@@ -1202,14 +1202,13 @@ bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pConditi
OSQLParseNode *pRhs = pCondition->getChild(2);
// Field names
- sal_uInt16 i;
- for (i=0;i< pLhs->count();i++)
+ for (size_t i=0;i< pLhs->count();i++)
pLhs->getChild(i)->parseNodeToPredicateStr( aName, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) );
// Criterion
aItem.Handle = getPredicateType(pCondition->getChild(1));
aValue = pCondition->getChild(1)->getTokenValue();
- for(i=0;i< pRhs->count();i++)
+ for(size_t i=0;i< pRhs->count();i++)
pRhs->getChild(i)->parseNodeToPredicateStr(aValue, m_xConnection, xFormatter, m_aLocale, static_cast<sal_Char>( m_sDecimalSep.toChar() ) );
aItem.Name = aName;
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index e854c2435d5c..1c26dc89d13d 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -2368,7 +2368,7 @@ IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation&, rIn
// and move to the field
Reference< css::container::XIndexAccess > aColumnControls(getBrowserView()->getGridControl()->getPeer(), UNO_QUERY);
- sal_uInt16 nViewPos;
+ sal_Int32 nViewPos;
for ( nViewPos = 0; nViewPos < aColumnControls->getCount(); ++nViewPos )
{
@@ -2383,7 +2383,7 @@ IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation&, rIn
}
Reference< css::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY);
- xGrid->setCurrentColumnPosition(nViewPos);
+ xGrid->setCurrentColumnPosition(nViewPos); //TODO: sal_Int32 -> sal_Int16!
}
IMPL_LINK(SbaXDataBrowserController, OnCanceledNotFound, FmFoundRecordInformation&, rInfo, void)
diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx
index 9b0b5590dec6..19832f26930a 100644
--- a/dbaccess/source/ui/browser/exsrcbrw.cxx
+++ b/dbaccess/source/ui/browser/exsrcbrw.cxx
@@ -138,8 +138,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const css::util::URL& aURL, con
OUString sControlType;
sal_Int32 nControlPos = -1;
Sequence< css::beans::PropertyValue> aControlProps;
- sal_uInt16 i;
- for ( i = 0; i < aArgs.getLength(); ++i, ++pArguments )
+ for ( sal_Int32 i = 0; i < aArgs.getLength(); ++i, ++pArguments )
{
if ( pArguments->Name == "ColumnType" )
{
@@ -183,7 +182,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const css::util::URL& aURL, con
if (xNewColProperties.is())
{
const css::beans::PropertyValue* pControlProps = aControlProps.getConstArray();
- for (i=0; i<aControlProps.getLength(); ++i, ++pControlProps)
+ for (sal_Int32 i=0; i<aControlProps.getLength(); ++i, ++pControlProps)
{
try
{
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index f601556d45ab..fadd63dcd72e 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -2114,7 +2114,7 @@ namespace
Reference< XConnection> xConnection = rController.getConnection();
OUString aColumnName,aTableRange;
- for (sal_uInt32 i = 0; i < pParseTree->count() && eOk == eErrorCode ; ++i)
+ for (size_t i = 0; i < pParseTree->count() && eOk == eErrorCode ; ++i)
{
::connectivity::OSQLParseNode * pColumnRef = pParseTree->getChild(i);
@@ -2361,7 +2361,7 @@ namespace
OQueryController& rController = static_cast<OQueryController&>(_pView->getController());
::connectivity::OSQLParseNode* pGroupBy = pSelectRoot->getChild(3)->getChild(2)->getChild(2);
- for( sal_uInt32 i=0 ; i < pGroupBy->count() && eOk == eErrorCode; ++i )
+ for( size_t i=0 ; i < pGroupBy->count() && eOk == eErrorCode; ++i )
{
OTableFieldDescRef aDragInfo = new OTableFieldDesc();
::connectivity::OSQLParseNode* pParamRef = nullptr;