[Libreoffice-commits] core.git: compilerplugins/clang pyuno/source reportdesign/source sc/source sdext/source sd/source vcl/unx vcl/workben xmlhelp/source
Noel Grandin
noel at peralex.com
Tue Jun 2 03:10:27 PDT 2015
compilerplugins/clang/loopvartoosmall.cxx | 2 +-
pyuno/source/module/pyuno_runtime.cxx | 2 +-
reportdesign/source/ui/misc/FunctionHelper.cxx | 2 +-
sc/source/ui/dbgui/pvfundlg.cxx | 2 +-
sc/source/ui/optdlg/opredlin.cxx | 2 +-
sc/source/ui/optdlg/tpusrlst.cxx | 2 +-
sc/source/ui/optdlg/tpview.cxx | 2 +-
sd/source/ui/dlg/PhotoAlbumDialog.cxx | 2 +-
sdext/source/pdfimport/tree/style.cxx | 4 ++--
sdext/source/pdfimport/tree/style.hxx | 4 ++--
vcl/unx/generic/app/saldisp.cxx | 6 +++---
vcl/unx/generic/app/wmadaptor.cxx | 8 ++++----
vcl/unx/generic/dtrans/X11_selection.cxx | 2 +-
vcl/unx/generic/dtrans/bmp.cxx | 2 +-
vcl/unx/generic/window/salframe.cxx | 4 ++--
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 4 ++--
vcl/unx/gtk/window/gtksalmenu.cxx | 4 ++--
vcl/workben/vcldemo.cxx | 4 ++--
xmlhelp/source/treeview/tvread.cxx | 10 +++++-----
19 files changed, 34 insertions(+), 34 deletions(-)
New commits:
commit 6ef9f7e2025a2334034e9c8f7b3422220add4742
Author: Noel Grandin <noel at peralex.com>
Date: Fri May 29 14:12:20 2015 +0200
loplugin:loopvartoosmall
Change-Id: Ib4def3435eab4625645c5afe3b151f9f430564ac
diff --git a/compilerplugins/clang/loopvartoosmall.cxx b/compilerplugins/clang/loopvartoosmall.cxx
index adcc2c5..78fc47e 100644
--- a/compilerplugins/clang/loopvartoosmall.cxx
+++ b/compilerplugins/clang/loopvartoosmall.cxx
@@ -116,4 +116,4 @@ loplugin::Plugin::Registration< LoopVarTooSmall > X("loopvartoosmall", false);
}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index 96bc9ae..4d31de1 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -723,7 +723,7 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con
else if (PyTuple_Check (o))
{
Sequence<Any> s (PyTuple_Size (o));
- for (int i = 0; i < PyTuple_Size (o); i++)
+ for (Py_ssize_t i = 0; i < PyTuple_Size (o); i++)
{
s[i] = pyObject2Any (PyTuple_GetItem (o, i), mode );
}
diff --git a/reportdesign/source/ui/misc/FunctionHelper.cxx b/reportdesign/source/ui/misc/FunctionHelper.cxx
index ca7b5a2..2ce316a 100644
--- a/reportdesign/source/ui/misc/FunctionHelper.cxx
+++ b/reportdesign/source/ui/misc/FunctionHelper.cxx
@@ -191,7 +191,7 @@ OUString FunctionDescription::getFormula(const ::std::vector< OUString >& _aArgu
void FunctionDescription::fillVisibleArgumentMapping(::std::vector<sal_uInt16>& _rArguments) const
{
const sal_Int32 nCount = m_aParameter.getLength();
- for(sal_uInt16 i = 0;i < nCount; ++i)
+ for(sal_Int32 i = 0;i < nCount; ++i)
{
_rArguments.push_back(i);
}
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index 292a07e..d728f83 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -652,7 +652,7 @@ void ScDPSubtotalOptDlg::FillLabelData( ScDPLabelData& rLabelData ) const
rLabelData.maMembers = maLabelData.maMembers;
sal_uLong nVisCount = m_pLbHide->GetEntryCount();
- for( sal_uInt16 nPos = 0; nPos < nVisCount; ++nPos )
+ for( sal_uLong nPos = 0; nPos < nVisCount; ++nPos )
rLabelData.maMembers[nPos].mbVisible = !m_pLbHide->IsChecked(nPos);
// *** HIERARCHY ***
diff --git a/sc/source/ui/optdlg/opredlin.cxx b/sc/source/ui/optdlg/opredlin.cxx
index 360836e..e2bea02 100644
--- a/sc/source/ui/optdlg/opredlin.cxx
+++ b/sc/source/ui/optdlg/opredlin.cxx
@@ -144,7 +144,7 @@ void ScRedlineOptionsTabPage::Reset( const SfxItemSet* /* rSet */ )
m_pRemoveColorLB->SetUpdateMode( false);
XColorListRef xColorLst = XColorList::GetStdColorList();
- for( sal_uInt16 i = 0; i < xColorLst->Count(); ++i )
+ for( long i = 0; i < xColorLst->Count(); ++i )
{
XColorEntry* pEntry = xColorLst->GetColor( i );
Color aColor = pEntry->GetColor();
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 0815c13..d1fab49 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -284,7 +284,7 @@ void ScTpUserLists::UpdateEntries( size_t nList )
std::size_t nSubCount = pList->GetSubCount();
OUString aEntryListStr;
- for ( sal_uInt16 i=0; i<nSubCount; i++ )
+ for ( size_t i=0; i<nSubCount; i++ )
{
if ( i!=0 )
aEntryListStr += OUString(CR);
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index c1d5334..f1a475f 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -404,7 +404,7 @@ ScTpLayoutOptions::ScTpLayoutOptions( vcl::Window* pParent,
m_pAlignCB->SetClickHdl(LINK(this, ScTpLayoutOptions, AlignHdl));
- for ( sal_uInt16 i = 0; i < aUnitArr.Count(); ++i )
+ for ( sal_uInt32 i = 0; i < aUnitArr.Count(); ++i )
{
OUString sMetric = aUnitArr.GetStringByPos( i );
FieldUnit eFUnit = (FieldUnit)aUnitArr.GetValue( i );
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index d5dcd09..85bf2ff 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -122,7 +122,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, CreateHdl)
if ( nOpt == ONE_IMAGE )
{
OUString sUrl;
- for( sal_Int16 i = 0; i < pImagesLst->GetEntryCount(); ++i )
+ for( sal_Int32 i = 0; i < pImagesLst->GetEntryCount(); ++i )
{
OUString const * pData = static_cast<OUString const *>(pImagesLst->GetEntryData(i));
sUrl = *pData;
diff --git a/sdext/source/pdfimport/tree/style.cxx b/sdext/source/pdfimport/tree/style.cxx
index 4df1942..fe0e31a 100644
--- a/sdext/source/pdfimport/tree/style.cxx
+++ b/sdext/source/pdfimport/tree/style.cxx
@@ -44,7 +44,7 @@ sal_Int32 StyleContainer::impl_getStyleId( const Style& rStyle, bool bSubStyle )
aSearchStyle.Properties = rStyle.Properties;
aSearchStyle.Contents = rStyle.Contents;
aSearchStyle.ContainedElement = rStyle.ContainedElement;
- for( unsigned int n = 0; n < rStyle.SubStyles.size(); ++n )
+ for( size_t n = 0; n < rStyle.SubStyles.size(); ++n )
aSearchStyle.SubStyles.push_back( impl_getStyleId( *rStyle.SubStyles[n], true ) );
std::unordered_map< HashedStyle, sal_Int32, StyleHash >::iterator it =
@@ -195,7 +195,7 @@ void StyleContainer::impl_emitStyle( sal_Int32 nStyleId,
aProps[ "draw:name" ] = aProps[ "style:name" ];
rContext.rEmitter.beginTag( rStyle.Name.getStr(), aProps );
- for( unsigned int n = 0; n < rStyle.SubStyles.size(); ++n )
+ for( size_t n = 0; n < rStyle.SubStyles.size(); ++n )
impl_emitStyle( rStyle.SubStyles[n], rContext, rContainedElemVisitor );
if( !rStyle.Contents.isEmpty() )
rContext.rEmitter.write( rStyle.Contents );
diff --git a/sdext/source/pdfimport/tree/style.hxx b/sdext/source/pdfimport/tree/style.hxx
index 8d1ce8a..2b2e0a1 100644
--- a/sdext/source/pdfimport/tree/style.hxx
+++ b/sdext/source/pdfimport/tree/style.hxx
@@ -87,7 +87,7 @@ namespace pdfi
}
nRet = size_t(Contents.hashCode());
nRet ^= size_t(ContainedElement);
- for( unsigned int n = 0; n < SubStyles.size(); ++n )
+ for( size_t n = 0; n < SubStyles.size(); ++n )
nRet ^= size_t(SubStyles[n]);
return nRet;
}
@@ -101,7 +101,7 @@ namespace pdfi
SubStyles.size() != rRight.SubStyles.size()
)
return false;
- for( unsigned int n = 0; n < SubStyles.size(); ++n )
+ for( size_t n = 0; n < SubStyles.size(); ++n )
{
if( SubStyles[n] != rRight.SubStyles[n] )
return false;
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 0810641..d95e30b 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -315,7 +315,7 @@ void SalDisplay::doDestruct()
delete mpInputMethod, mpInputMethod = NULL;
delete mpKbdExtension, mpKbdExtension = NULL;
- for( unsigned int i = 0; i < m_aScreens.size(); i++ )
+ for( size_t i = 0; i < m_aScreens.size(); i++ )
{
ScreenData& rData = m_aScreens[i];
if( rData.m_bInit )
@@ -1939,7 +1939,7 @@ bool SalX11Display::Dispatch( XEvent *pEvent )
case PropertyNotify:
if( pEvent->xproperty.atom == getWMAdaptor()->getAtom( WMAdaptor::VCL_SYSTEM_SETTINGS ) )
{
- for( unsigned int i = 0; i < m_aScreens.size(); i++ )
+ for( size_t i = 0; i < m_aScreens.size(); i++ )
{
if( pEvent->xproperty.window == m_aScreens[i].m_aRefWindow )
{
@@ -2685,7 +2685,7 @@ static sal_uInt16 sal_Lookup( const std::vector<SalColor>& rPalette,
sal_uInt16 nPixel = 0;
int nBest = ColorDiff( rPalette[0], r, g, b );
- for( sal_uInt16 i = 1; i < nUsed; i++ )
+ for( Pixel i = 1; i < nUsed; i++ )
{
int n = ColorDiff( rPalette[i], r, g, b );
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index 31d7969..43432cf 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -391,7 +391,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "supported protocols:\n" );
#endif
- for( unsigned int i = 0; i < nItems; i++ )
+ for( unsigned long i = 0; i < nItems; i++ )
{
// #i80971# protect against invalid atoms
if( pAtomNames[i] == NULL )
@@ -649,7 +649,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "supported protocols:\n" );
#endif
- for( unsigned int i = 0; i < nItems; i++ )
+ for( unsigned long i = 0; i < nItems; i++ )
{
// #i80971# protect against invalid atoms
if( pAtomNames[i] == NULL )
@@ -1476,7 +1476,7 @@ void WMAdaptor::maximizeFrame( X11SalFrame* pFrame, bool bHorizontal, bool bVert
{
Point aMed( aTL.X() + rGeom.nWidth/2, aTL.Y() + rGeom.nHeight/2 );
const std::vector< Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens();
- for( unsigned int i = 0; i < rScreens.size(); i++ )
+ for( size_t i = 0; i < rScreens.size(); i++ )
if( rScreens[i].IsInside( aMed ) )
{
aTL += rScreens[i].TopLeft();
@@ -2076,7 +2076,7 @@ void NetWMAdaptor::showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const
&root_x, &root_y, &lx, &ly, &mask );
const std::vector< Rectangle >& rScreens = m_pSalDisplay->GetXineramaScreens();
Point aMousePoint( root_x, root_y );
- for( unsigned int i = 0; i < rScreens.size(); i++ )
+ for( size_t i = 0; i < rScreens.size(); i++ )
{
if( rScreens[i].IsInside( aMousePoint ) )
{
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index 427bd54..720b8c6 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -1674,7 +1674,7 @@ bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest
bool bResetAtoms = false;
Atom* pAtoms = reinterpret_cast<Atom*>(pData);
aGuard.clear();
- for( unsigned int i = 0; i < nItems; i += 2 )
+ for( unsigned long i = 0; i < nItems; i += 2 )
{
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, " %s => %s: ",
diff --git a/vcl/unx/generic/dtrans/bmp.cxx b/vcl/unx/generic/dtrans/bmp.cxx
index b4dcc04..b84681e 100644
--- a/vcl/unx/generic/dtrans/bmp.cxx
+++ b/vcl/unx/generic/dtrans/bmp.cxx
@@ -449,7 +449,7 @@ void PixmapHolder::setBitmapDataPalette( const sal_uInt8* pData, XImage* pImage
sal_uInt32 nHeight = readLE32( pData+8 );
sal_uInt16 nDepth = readLE16( pData+14 );
- for( sal_uInt16 i = 0 ; i < nColors; i++ )
+ for( sal_uInt32 i = 0 ; i < nColors; i++ )
{
if( m_aInfo.c_class != TrueColor )
{
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 3ad0f9a..1591ffe 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -508,7 +508,7 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP
&aRoot, &aChild,
&root_x, &root_y, &lx, &ly, &mask );
const std::vector< Rectangle >& rScreens = GetDisplay()->GetXineramaScreens();
- for( unsigned int i = 0; i < rScreens.size(); i++ )
+ for( size_t i = 0; i < rScreens.size(); i++ )
if( rScreens[i].IsInside( Point( root_x, root_y ) ) )
{
x = rScreens[i].Left();
@@ -1466,7 +1466,7 @@ void X11SalFrame::Center( )
&x, &y,
&mask );
const std::vector< Rectangle >& rScreens = GetDisplay()->GetXineramaScreens();
- for( unsigned int i = 0; i < rScreens.size(); i++ )
+ for( size_t i = 0; i < rScreens.size(); i++ )
if( rScreens[i].IsInside( Point( root_x, root_y ) ) )
{
nScreenX = rScreens[i].Left();
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 39b44cd..a34c143 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -567,7 +567,7 @@ void GtkData::initNWF()
*********************************************************/
void GtkData::deInitNWF()
{
- for( unsigned int i = 0; i < gWidgetData.size(); i++ )
+ for( size_t i = 0; i < gWidgetData.size(); i++ )
{
// free up global widgets
// gtk_widget_destroy will in turn destroy the child hierarchy
@@ -871,7 +871,7 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart,
if( GtkSalGraphics::bThemeChanged )
{
// invalidate caches
- for( unsigned int i = 0; i < gWidgetData.size(); i++ )
+ for( size_t i = 0; i < gWidgetData.size(); i++ )
if( gWidgetData[i].gNWPixmapCacheList )
gWidgetData[i].gNWPixmapCacheList->ThemeChanged();
GtkSalGraphics::bThemeChanged = false;
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx
index 4cd6622..6ecfeaa 100644
--- a/vcl/unx/gtk/window/gtksalmenu.cxx
+++ b/vcl/unx/gtk/window/gtksalmenu.cxx
@@ -708,7 +708,7 @@ GtkSalMenu* GtkSalMenu::GetMenuForItemCommand( gchar* aCommand, gboolean bGetSub
{
SolarMutexGuard aGuard;
GtkSalMenu* pMenu = NULL;
- for ( sal_uInt16 nPos = 0; nPos < maItems.size(); nPos++ )
+ for ( size_t nPos = 0; nPos < maItems.size(); nPos++ )
{
GtkSalMenuItem *pSalItem = maItems[ nPos ];
@@ -754,7 +754,7 @@ void GtkSalMenu::DispatchCommand( gint itemId, const gchar *aCommand )
void GtkSalMenu::ActivateAllSubmenus(MenuBar* pMenuBar)
{
pMenuBar->HandleMenuActivateEvent(mpVCLMenu);
- for ( sal_uInt16 nPos = 0; nPos < maItems.size(); nPos++ )
+ for ( size_t nPos = 0; nPos < maItems.size(); nPos++ )
{
GtkSalMenuItem *pSalItem = maItems[ nPos ];
if ( pSalItem->mpSubMenu != NULL )
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 7bc6270..5d8a6c4 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -288,9 +288,9 @@ public:
rDev.SetLineColor(Color(COL_BLACK));
rDev.DrawRect(r);
- for(int i=0; i<r.GetHeight(); i+=15)
+ for(long i=0; i<r.GetHeight(); i+=15)
rDev.DrawLine(Point(r.Left(), r.Top()+i), Point(r.Right(), r.Bottom()-i));
- for(int i=0; i<r.GetWidth(); i+=15)
+ for(long i=0; i<r.GetWidth(); i+=15)
rDev.DrawLine(Point(r.Left()+i, r.Bottom()), Point(r.Right()-i, r.Top()));
// Should draw a white-line across the middle
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index 5518470..1954335 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -56,7 +56,7 @@ namespace treeview {
~TVDom()
{
- for( unsigned i = 0; i < children.size(); ++i )
+ for( size_t i = 0; i < children.size(); ++i )
delete children[i];
}
@@ -399,7 +399,7 @@ extern "C" void data_handler( void *userData,
TVChildTarget::TVChildTarget( const ConfigData& configData,TVDom* tvDom )
{
Elements.resize( tvDom->children.size() );
- for( unsigned i = 0; i < Elements.size(); ++i )
+ for( size_t i = 0; i < Elements.size(); ++i )
Elements[i] = new TVRead( configData,tvDom->children[i] );
}
@@ -445,7 +445,7 @@ TVChildTarget::TVChildTarget( const Reference< XComponentContext >& xContext )
// now TVDom holds the relevant information
Elements.resize( tvDom.children.size() );
- for( unsigned i = 0; i < Elements.size(); ++i )
+ for( size_t i = 0; i < Elements.size(); ++i )
Elements[i] = new TVRead( configData,tvDom.children[i] );
}
@@ -470,7 +470,7 @@ void TVChildTarget::Check(TVDom* tvDom)
{
TVDom* p = tvDom->children[tvDom->children.size()-1];
- for(unsigned k=0; k<p->children.size(); ++k)
+ for(size_t k=0; k<p->children.size(); ++k)
if (!SearchAndInsert(p->children[k], tvDom->children[i])) tvDom->children[i]->newChild(p->children[k]);
tvDom->children.pop_back();
@@ -547,7 +547,7 @@ TVChildTarget::getElementNames( )
throw( RuntimeException, std::exception )
{
Sequence< OUString > seq( Elements.size() );
- for( unsigned i = 0; i < Elements.size(); ++i )
+ for( size_t i = 0; i < Elements.size(); ++i )
seq[i] = OUString::number( 1+i );
return seq;
More information about the Libreoffice-commits
mailing list