From 1df41142451685d33b1821a839061c63f23e44fd Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 29 May 2015 13:34:26 +0200 Subject: loplugin:loopvartoosmall Change-Id: I809e408c994222cfa95ba8f56e4db7bd96be7080 --- starmath/source/ElementsDockingWindow.cxx | 6 +++--- starmath/source/dialog.cxx | 2 +- starmath/source/mathtype.cxx | 4 ++-- starmath/source/ooxmlexport.cxx | 2 +- starmath/source/parse.cxx | 2 +- starmath/source/rtfexport.cxx | 2 +- starmath/source/utility.cxx | 6 +++--- 7 files changed, 12 insertions(+), 12 deletions(-) (limited to 'starmath/source') diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index 87680d2ca974..a74de6975705 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -287,7 +287,7 @@ void SmElementsControl::Paint(vcl::RenderContext& rRenderContext, const Rectangl else boxX = nControlWidth / perLine; - for (sal_uInt16 i = 0; i < maElementList.size() ; i++) + for (size_t i = 0; i < maElementList.size() ; i++) { SmElement* element = maElementList[i].get(); if (element->isSeparator()) @@ -390,7 +390,7 @@ void SmElementsControl::MouseMove( const MouseEvent& rMouseEvent ) OUString tooltip; if (Rectangle(Point(0, 0), GetOutputSizePixel()).IsInside(rMouseEvent.GetPosPixel())) { - for (sal_uInt16 i = 0; i < maElementList.size() ; i++) + for (size_t i = 0; i < maElementList.size() ; i++) { SmElement* element = maElementList[i].get(); Rectangle rect(element->mBoxLocation, element->mBoxSize); @@ -419,7 +419,7 @@ void SmElementsControl::MouseButtonDown(const MouseEvent& rMouseEvent) if (rMouseEvent.IsLeft() && Rectangle(Point(0, 0), GetOutputSizePixel()).IsInside(rMouseEvent.GetPosPixel())) { - for (sal_uInt16 i = 0; i < maElementList.size() ; i++) + for (size_t i = 0; i < maElementList.size() ; i++) { SmElement* element = maElementList[i].get(); Rectangle rect(element->mBoxLocation, element->mBoxSize); diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 5754b8377bf2..dad3302b7a34 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1148,7 +1148,7 @@ void SmShowSymbolSetWindow::Paint(vcl::RenderContext& rRenderContext, const Rect size_t nSymbols = aSymbolSet.size(); Color aTxtColor(rRenderContext.GetTextColor()); - for (sal_uInt16 i = v; i < nSymbols ; i++) + for (size_t i = v; i < nSymbols ; i++) { SmSym aSymbol(*aSymbolSet[i]); vcl::Font aFont(aSymbol.GetFace()); diff --git a/starmath/source/mathtype.cxx b/starmath/source/mathtype.cxx index 09eb7e1a23d3..b3dccf7d42a8 100644 --- a/starmath/source/mathtype.cxx +++ b/starmath/source/mathtype.cxx @@ -2078,12 +2078,12 @@ void MathType::HandleSmMatrix(SmMatrixNode *pMatrix,int nLevel) int nBytes=(pMatrix->GetNumRows()+1)*2/8; if (((pMatrix->GetNumRows()+1)*2)%8) nBytes++; - for (sal_uInt16 j = 0; j < nBytes; j++) + for (int j = 0; j < nBytes; j++) pS->WriteUChar( 0x00 ); //row_parts nBytes=(pMatrix->GetNumCols()+1)*2/8; if (((pMatrix->GetNumCols()+1)*2)%8) nBytes++; - for (sal_uInt16 k = 0; k < nBytes; k++) + for (int k = 0; k < nBytes; k++) pS->WriteUChar( 0x00 ); //col_parts sal_uInt16 nSize = pMatrix->GetNumSubNodes(); for (sal_uInt16 i = 0; i < nSize; i++) diff --git a/starmath/source/ooxmlexport.cxx b/starmath/source/ooxmlexport.cxx index 9cccd7431a21..0573e6478798 100644 --- a/starmath/source/ooxmlexport.cxx +++ b/starmath/source/ooxmlexport.cxx @@ -496,7 +496,7 @@ void SmOoxmlExport::HandleBrace( const SmBraceNode* pNode, int nLevel ) FSNS( XML_m, XML_val ), mathSymbolToString( pNode->ClosingBrace()).getStr(), FSEND ); m_pSerializer->endElementNS( XML_m, XML_dPr ); - for( unsigned int i = 0; i < subnodes.size(); ++i ) + for( size_t i = 0; i < subnodes.size(); ++i ) { m_pSerializer->startElementNS( XML_m, XML_e, FSEND ); HandleNode( subnodes[ i ], nLevel + 1 ); diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index d70ca9dacb4f..04843d091c19 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -1235,7 +1235,7 @@ void SmParser::SubSup(sal_uLong nActiveGroup) SmNodeArray aSubNodes; aSubNodes.resize(1 + SUBSUP_NUM_ENTRIES); aSubNodes[0] = popOrZero(m_aNodeStack); - for (sal_uInt16 i = 1; i < aSubNodes.size(); i++) + for (size_t i = 1; i < aSubNodes.size(); i++) aSubNodes[i] = NULL; // process all sub-/supscripts diff --git a/starmath/source/rtfexport.cxx b/starmath/source/rtfexport.cxx index 5c38a4eead8f..bb08685b4d65 100644 --- a/starmath/source/rtfexport.cxx +++ b/starmath/source/rtfexport.cxx @@ -433,7 +433,7 @@ void SmRtfExport::HandleBrace(const SmBraceNode* pNode, int nLevel) m_pBuffer->append(mathSymbolToString(pNode->ClosingBrace(), m_nEncoding)); m_pBuffer->append("}"); // mendChr m_pBuffer->append("}"); // mdPr - for (unsigned int i = 0; i < subnodes.size(); ++i) + for (size_t i = 0; i < subnodes.size(); ++i) { m_pBuffer->append("{" LO_STRING_SVTOOLS_RTF_ME " "); HandleNode(subnodes[ i ], nLevel + 1); diff --git a/starmath/source/utility.cxx b/starmath/source/utility.cxx index 00485da3dfb0..8814636f0968 100644 --- a/starmath/source/utility.cxx +++ b/starmath/source/utility.cxx @@ -60,7 +60,7 @@ SmFontPickList& SmFontPickList::operator = (const SmFontPickList& rList) { Clear(); nMaxItems = rList.nMaxItems; - for (sal_uInt16 nPos = 0; nPos < rList.aFontVec.size(); nPos++) + for (size_t nPos = 0; nPos < rList.aFontVec.size(); nPos++) aFontVec.push_back( rList.aFontVec[nPos] ); return *this; @@ -116,7 +116,7 @@ void SmFontPickList::Insert(const vcl::Font &rFont) void SmFontPickList::Update(const vcl::Font &rFont, const vcl::Font &rNewFont) { - for (sal_uInt16 nPos = 0; nPos < aFontVec.size(); nPos++) + for (size_t nPos = 0; nPos < aFontVec.size(); nPos++) if (CompareItem( aFontVec[nPos], rFont )) { aFontVec[nPos] = rNewFont; @@ -126,7 +126,7 @@ void SmFontPickList::Update(const vcl::Font &rFont, const vcl::Font &rNewFont) void SmFontPickList::Remove(const vcl::Font &rFont) { - for (sal_uInt16 nPos = 0; nPos < aFontVec.size(); nPos++) + for (size_t nPos = 0; nPos < aFontVec.size(); nPos++) if (CompareItem( aFontVec[nPos], rFont)) { aFontVec.erase( aFontVec.begin() + nPos ); -- cgit