summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-03-07 19:53:20 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-03-07 19:53:20 +0100
commitf33f9bb8d3c4e61320efd954c1b96ab88a661640 (patch)
tree79fa5a75857295fb8b9c77114268a82839e365f3 /filter
parent265a19ca74bd62d4b3eecfc4b7dbb4c9cc50e014 (diff)
loplugin:loopvartoosmall
Change-Id: I72cdd1d386db62feff9a42651fc7f0954e76afdf
Diffstat (limited to 'filter')
-rw-r--r--filter/source/flash/swfexporter.cxx3
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx6
-rw-r--r--filter/source/graphicfilter/etiff/etiff.cxx7
-rw-r--r--filter/source/graphicfilter/idxf/dxf2mtf.cxx6
-rw-r--r--filter/source/graphicfilter/ipbm/ipbm.cxx4
-rw-r--r--filter/source/msfilter/escherex.cxx6
-rw-r--r--filter/source/msfilter/msdffimp.cxx5
-rw-r--r--filter/source/msfilter/svdfppt.cxx4
8 files changed, 16 insertions, 25 deletions
diff --git a/filter/source/flash/swfexporter.cxx b/filter/source/flash/swfexporter.cxx
index d2af184d5713..b0110010b561 100644
--- a/filter/source/flash/swfexporter.cxx
+++ b/filter/source/flash/swfexporter.cxx
@@ -166,14 +166,13 @@ bool FlashExporter::exportAll( const Reference< XComponent >& xDoc, Reference< X
// #i56084# nPageCount is 1 when exporting selection
const sal_Int32 nPageCount = mbExportSelection ? 1 : xDrawPages->getCount();
- sal_uInt16 nPage;
if ( xStatusIndicator.is() )
{
xStatusIndicator->start("Macromedia Flash (SWF)", nPageCount);
}
- for( nPage = 0; nPage < nPageCount; nPage++)
+ for( sal_Int32 nPage = 0; nPage < nPageCount; nPage++)
{
// #i56084# keep PageNumber? We could determine the PageNumber of the single to-be-exported page
// when exporting the selection, but this is only used for swf internal, so no need to do so (AFAIK)
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 0f78c47ce31e..707c50e1cd79 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -500,13 +500,13 @@ void PSWriter::ImplWriteProlog( const Graphic* pPreview )
nLines++;
nLines *= aSizeBitmap.Height();
ImplWriteLong( nLines );
- sal_Int32 nX, nY, nCount2, nCount = 4;
+ sal_Int32 nCount2, nCount = 4;
const BitmapColor aBlack( pAcc->GetBestMatchingColor( Color( COL_BLACK ) ) );
- for ( nY = 0; nY < aSizeBitmap.Height(); nY++ )
+ for ( long nY = 0; nY < aSizeBitmap.Height(); nY++ )
{
nCount2 = 0;
char nVal = 0;
- for ( nX = 0; nX < aSizeBitmap.Width(); nX++ )
+ for ( long nX = 0; nX < aSizeBitmap.Width(); nX++ )
{
if ( !nCount2 )
{
diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx
index d5251b75e8ee..43b6730c5b3b 100644
--- a/filter/source/graphicfilter/etiff/etiff.cxx
+++ b/filter/source/graphicfilter/etiff/etiff.cxx
@@ -314,23 +314,22 @@ bool TIFFWriter::ImplWriteHeader( bool bMultiPage )
void TIFFWriter::ImplWritePalette()
{
- sal_uInt16 i;
sal_uLong nCurrentPos = m_rOStm.Tell();
m_rOStm.Seek( mnPalPos + 8 ); // the palette tag entry needs the offset
m_rOStm.WriteUInt32( nCurrentPos - mnStreamOfs ); // to the palette colors
m_rOStm.Seek( nCurrentPos );
- for ( i = 0; i < mnColors; i++ )
+ for ( sal_uInt32 i = 0; i < mnColors; i++ )
{
const BitmapColor& rColor = mpAcc->GetPaletteColor( i );
m_rOStm.WriteUInt16( rColor.GetRed() << 8 );
}
- for ( i = 0; i < mnColors; i++ )
+ for ( sal_uInt32 i = 0; i < mnColors; i++ )
{
const BitmapColor& rColor = mpAcc->GetPaletteColor( i );
m_rOStm.WriteUInt16( rColor.GetGreen() << 8 );
}
- for ( i = 0; i < mnColors; i++ )
+ for ( sal_uInt32 i = 0; i < mnColors; i++ )
{
const BitmapColor& rColor = mpAcc->GetPaletteColor( i );
m_rOStm.WriteUInt16( rColor.GetBlue() << 8 );
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
index 64ce94ce6068..b867bca6e372 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
@@ -74,9 +74,8 @@ DXFLineInfo DXF2GDIMetaFile::LTypeToDXFLineInfo(OString const& rLineType)
aDXFLineInfo.eStyle = LineStyle::Solid;
}
else {
- sal_Int32 i;
aDXFLineInfo.eStyle = LineStyle::Dash;
- for (i=0; i < (pLT->nDashCount); i++) {
+ for (long i=0; i < (pLT->nDashCount); i++) {
const double x = pLT->fDash[i] * pDXF->getGlobalLineTypeScale();
if ( x >= 0.0 ) {
if ( aDXFLineInfo.nDotCount == 0 ) {
@@ -584,8 +583,7 @@ void DXF2GDIMetaFile::DrawHatchEntity(const DXFHatchEntity & rE, const DXFTransf
}
else
{
- sal_uInt32 i;
- for ( i = 0; i < rPathData.aEdges.size(); i++ )
+ for ( std::deque<DXFEdgeType*>::size_type i = 0; i < rPathData.aEdges.size(); i++ )
{
const DXFEdgeType* pEdge = rPathData.aEdges[ i ];
switch( pEdge->nEdgeType )
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx
index aeb974c5b6b4..855a25309ca1 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -66,8 +66,6 @@ PBMReader::PBMReader(SvStream & rPBM)
bool PBMReader::ReadPBM(Graphic & rGraphic )
{
- sal_uInt16 i;
-
if ( mrPBM.GetError() )
return false;
@@ -116,7 +114,7 @@ bool PBMReader::ReadPBM(Graphic & rGraphic )
mnCol = 256;
mpAcc->SetPaletteEntryCount( 256 );
- for ( i = 0; i < mnCol; i++ )
+ for ( sal_uLong i = 0; i < mnCol; i++ )
{
sal_uLong nCount = 255 * i / mnCol;
mpAcc->SetPaletteColor( i, BitmapColor( (sal_uInt8)nCount, (sal_uInt8)nCount, (sal_uInt8)nCount ) );
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 575cb6e18ff8..b32f965ef8b0 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -3504,7 +3504,7 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
sal_uInt16 nElements = (sal_uInt16)aHandlesPropSeq.getLength();
if ( nElements )
{
- sal_uInt16 k, j, nElementSize = 36;
+ sal_uInt16 k, nElementSize = 36;
sal_uInt32 nStreamSize = nElementSize * nElements + 6;
SvMemoryStream aOut( nStreamSize );
aOut.WriteUInt16( nElements )
@@ -3524,10 +3524,8 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT
sal_Int32 nYRangeMax = 0x7fffffff;
const uno::Sequence< beans::PropertyValue >& rPropSeq = aHandlesPropSeq[ k ];
- for ( j = 0; j < rPropSeq.getLength(); j++ )
+ for ( const beans::PropertyValue& rPropVal: rPropSeq )
{
- const beans::PropertyValue& rPropVal = rPropSeq[ j ];
-
const OUString sPosition ( "Position" );
const OUString sMirroredX ( "MirroredX" );
const OUString sMirroredY ( "MirroredY" );
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 15b04491f77a..502888e46f51 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -1112,10 +1112,9 @@ void ApplyRectangularGradientAsBitmap( const SvxMSDffManager& rManager, SvStream
BitmapWriteAccess* pAcc = aBitmap.AcquireWriteAccess();
if ( pAcc )
{
- sal_Int32 nX, nY;
- for ( nY = 0; nY < aBitmapSizePixel.Height(); nY++ )
+ for ( long nY = 0; nY < aBitmapSizePixel.Height(); nY++ )
{
- for ( nX = 0; nX < aBitmapSizePixel.Width(); nX++ )
+ for ( long nX = 0; nX < aBitmapSizePixel.Width(); nX++ )
{
double fX = static_cast< double >( nX ) / aBitmapSizePixel.Width();
double fY = static_cast< double >( nY ) / aBitmapSizePixel.Height();
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index cb2fceb430a7..5cb4cafad44d 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -2028,7 +2028,7 @@ void SdrPowerPointImport::SeekOle( SfxObjectShell* pShell, sal_uInt32 nFilterOpt
{
SvStorageInfoList aList;
xSource->FillInfoList( &aList );
- sal_uInt32 i;
+ SvStorageInfoList::size_type i;
bool bCopied = true;
for ( i = 0; i < aList.size(); i++ ) // copy all entries
@@ -6686,7 +6686,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
if ( aTextSpecInfoAtomInterpreter.Read( rIn, aTextSpecInfoHd, PPT_PST_TextSpecInfoAtom,
&(rSdrPowerPointImport.pPPTStyleSheet->maTxSI) ) )
{
- sal_uInt32 nI = 0;
+ PPTCharPropSetList::size_type nI = 0;
for (PPTTextSpecInfo* pSpecInfo : aTextSpecInfoAtomInterpreter.aList)
{
sal_uInt32 nCharIdx = pSpecInfo->nCharIdx;