summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-07 19:57:02 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-03-07 19:57:02 +0100
commit5b805de10a1b05647b616e726f0a8b88ff30ae77 (patch)
treef002e284ad4c0a0231cdfef504b59b5c29cec1f5 /sc/source
parentf583e8a8dccc1fb02dc7549ff364f9a8530a4f6b (diff)
loplugin:loopvartoosmall
Change-Id: I81b56ad2a32ef61a514d5e6e9f45c3f956126040
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/documen8.cxx2
-rw-r--r--sc/source/core/tool/dbdata.cxx7
-rw-r--r--sc/source/filter/qpro/qproform.cxx6
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx2
-rw-r--r--sc/source/filter/xml/xmlstyle.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuconcustomshape.cxx3
-rw-r--r--sc/source/ui/miscdlgs/mvtabdlg.cxx2
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx2
-rw-r--r--sc/source/ui/undo/undotab.cxx8
9 files changed, 15 insertions, 19 deletions
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index 59c611e62b5c..2472f4a76ee2 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -1068,7 +1068,7 @@ void ScDocument::DeleteAreaLinksOnTab( SCTAB nTab )
return;
const ::sfx2::SvBaseLinks& rLinks = pMgr->GetLinks();
- sal_uInt16 nPos = 0;
+ sfx2::SvBaseLinks::size_type nPos = 0;
while ( nPos < rLinks.size() )
{
const ::sfx2::SvBaseLink* pBase = rLinks[nPos].get();
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 2b7b05a2f73d..ebfa42084d79 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -343,14 +343,13 @@ void ScDBData::SetArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW
void ScDBData::MoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
{
- sal_uInt16 i;
long nDifX = ((long) nCol1) - ((long) nStartCol);
long nDifY = ((long) nRow1) - ((long) nStartRow);
long nSortDif = bByRow ? nDifX : nDifY;
long nSortEnd = bByRow ? static_cast<long>(nCol2) : static_cast<long>(nRow2);
- for (i=0; i<mpSortParam->GetSortKeyCount(); i++)
+ for (sal_uInt16 i=0; i<mpSortParam->GetSortKeyCount(); i++)
{
mpSortParam->maKeyState[i].nField += nSortDif;
if (mpSortParam->maKeyState[i].nField > nSortEnd)
@@ -361,7 +360,7 @@ void ScDBData::MoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW n
}
SCSIZE nCount = mpQueryParam->GetEntryCount();
- for (i = 0; i < nCount; ++i)
+ for (SCSIZE i = 0; i < nCount; ++i)
{
ScQueryEntry& rEntry = mpQueryParam->GetEntry(i);
rEntry.nField += nDifX;
@@ -371,7 +370,7 @@ void ScDBData::MoveTo(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW n
rEntry.bDoQuery = false;
}
}
- for (i=0; i<MAXSUBTOTAL; i++)
+ for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++)
{
mpSubTotal->nField[i] = sal::static_int_cast<SCCOL>( mpSubTotal->nField[i] + nDifX );
if (mpSubTotal->nField[i] > nCol2)
diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx
index 380d63f43b94..4ec3f386a338 100644
--- a/sc/source/filter/qpro/qproform.cxx
+++ b/sc/source/filter/qpro/qproform.cxx
@@ -174,7 +174,7 @@ do { \
ConvErr QProToSc::Convert( const ScTokenArray*& pArray )
{
- sal_uInt8 nFmla[ nBufSize ], i, nArg;
+ sal_uInt8 nFmla[ nBufSize ], nArg;
sal_uInt8 nArgArray[ nBufSize ] = {0};
sal_Int8 nCol, nPage;
sal_uInt16 nInt, nIntCount = 0, nStringCount = 0, nFloatCount = 0, nDLLCount = 0, nArgCount = 0;
@@ -197,7 +197,7 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray )
if( nRef < nBufSize )
{
- for( i=0; i < nRef; i++)
+ for( sal_uInt16 i=0; i < nRef; i++)
{
maIn.ReadUChar( nFmla[i] );
@@ -239,7 +239,7 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray )
else
return ConvErr::Count;
- i = 0;
+ sal_uInt16 i = 0;
nIntCount = 0;
nFloatCount = 0;
nDLLCount = 0;
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 34208af4b299..54b7ace010f4 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -3123,7 +3123,7 @@ sal_Int32 ScXMLImport::GetRangeType(const OUString& sRangeType)
{
sal_Int32 nRangeType(0);
OUStringBuffer sBuffer;
- sal_Int16 i = 0;
+ sal_Int32 i = 0;
while (i <= sRangeType.getLength())
{
if ((i == sRangeType.getLength()) || (sRangeType[i] == ' '))
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index 1777058a5e6b..de8158ba9f1a 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -1012,7 +1012,7 @@ bool XmlScPropHdl_CellProtection::importXML(
}
else
{
- sal_Int16 i(0);
+ sal_Int32 i(0);
while (i < rStrImpValue.getLength() && rStrImpValue[i] != ' ')
++i;
OUString sFirst(rStrImpValue.copy(0, i));
diff --git a/sc/source/ui/drawfunc/fuconcustomshape.cxx b/sc/source/ui/drawfunc/fuconcustomshape.cxx
index f49bc8b75242..eb484b99cc23 100644
--- a/sc/source/ui/drawfunc/fuconcustomshape.cxx
+++ b/sc/source/ui/drawfunc/fuconcustomshape.cxx
@@ -190,8 +190,7 @@ void FuConstCustomShape::SetAttributes( SdrObject* pObj )
std::vector< OUString > aObjList;
if ( GalleryExplorer::FillObjListTitle( GALLERY_THEME_POWERPOINT, aObjList ) )
{
- sal_uInt16 i;
- for ( i = 0; i < aObjList.size(); i++ )
+ for ( std::vector<OUString>::size_type i = 0; i < aObjList.size(); i++ )
{
if ( aObjList[ i ].equalsIgnoreAsciiCase( aCustomShape ) )
{
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index fc0240a7e8f0..2a64d8738528 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -163,7 +163,7 @@ void ScMoveTableDlg::CheckNewTabName()
bool bMoveInCurrentDoc = pBtnMove->IsChecked() && pLbDoc->GetSelectEntryPos() == mnCurrentDocPos;
bool bFound = false;
const sal_Int32 nLast = pLbTable->GetEntryCount();
- for ( sal_uInt16 i=0; i<nLast && !bFound; ++i )
+ for ( sal_Int32 i=0; i<nLast && !bFound; ++i )
{
if ( aNewName.equals(pLbTable->GetEntry(i)) )
{
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index b0561f271280..1bc76f6b9b58 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -602,7 +602,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_ModifyHdl, Edit&, rEd, void )
if ( (nEntryCount > nFirstCustomPos) && !aStrEd.isEmpty() )
{
bool bFound = false;
- sal_uInt16 i;
+ sal_Int32 i;
for ( i=nFirstCustomPos; i<nEntryCount && !bFound; i++ )
{
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 0e5416638173..49129b128b9b 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -295,15 +295,13 @@ static SCTAB lcl_GetVisibleTabBefore( ScDocument& rDoc, SCTAB nTab )
void ScUndoDeleteTab::Undo()
{
BeginUndo();
- unsigned int i=0;
ScDocument& rDoc = pDocShell->GetDocument();
bool bLink = false;
OUString aName;
- for(i=0; i<theTabs.size(); ++i)
+ for(SCTAB nTab: theTabs)
{
- SCTAB nTab = theTabs[i];
pRefUndoDoc->GetName( nTab, aName );
bDrawIsInUndo = true;
@@ -355,9 +353,9 @@ void ScUndoDeleteTab::Undo()
if ( pChangeTrack )
pChangeTrack->Undo( nStartChangeAction, nEndChangeAction );
- for(i=0; i<theTabs.size(); ++i)
+ for(SCTAB nTab: theTabs)
{
- pDocShell->Broadcast( ScTablesHint( SC_TAB_INSERTED, theTabs[i]) );
+ pDocShell->Broadcast( ScTablesHint( SC_TAB_INSERTED, nTab) );
}
SfxApplication* pSfxApp = SfxGetpApp(); // Navigator
pSfxApp->Broadcast( SfxHint( SfxHintId::ScTablesChanged ) );