diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-28 12:21:40 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-06 08:51:22 +0200 |
commit | 296329a926877d069f55364a177d734f385ce7ae (patch) | |
tree | d95dff15946339b5a2df8c7c29159b97137ee30e | |
parent | ebeff1814cbecfba9bbeaeba8067b58f71703a39 (diff) |
convert xub_StrLen to sal_Int32
convert for loops using xub_StrLen to use sal_Int32
Change-Id: I5f635ca078966fefe938dbc7e8dea7c8d0d0b554
48 files changed, 94 insertions, 98 deletions
diff --git a/connectivity/source/drivers/file/quotedstring.cxx b/connectivity/source/drivers/file/quotedstring.cxx index f69230dce008..5cbe815f9e76 100644 --- a/connectivity/source/drivers/file/quotedstring.cxx +++ b/connectivity/source/drivers/file/quotedstring.cxx @@ -142,7 +142,7 @@ namespace connectivity sBuff.append(cChar); } } - } // for( xub_StrLen i = nStartPos; i < nLen; ++i ) + } // for( sal_Int32 i = nStartPos; i < nLen; ++i ) return sBuff.makeStringAndClear(); } return OUString(); diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index bace952397dc..6e5f148fb6d6 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -140,7 +140,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) sal_Int32 nStartPosHeaderLine = 0; // use for efficient way to get the tokens sal_Int32 nStartPosFirstLine = 0; // use for efficient way to get the tokens sal_Int32 nStartPosFirstLine2 = 0; - for (xub_StrLen i = 0; i < nFieldCount; i++) + for( sal_Int32 i = 0; i < nFieldCount; i++ ) { if ( nRowCount == 0) { @@ -173,7 +173,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) } while(nRowCount < nMaxRowsToScan && bRead); - for (xub_StrLen i = 0; i < nFieldCount; i++) + for( sal_Int32 i = 0; i < nFieldCount; i++ ) { // check if the columname already exists OUString aAlias(aColumnNames[i]); @@ -242,7 +242,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine, xub_StrLen nDot = 0; xub_StrLen nDecimalDelCount = 0; xub_StrLen nSpaceCount = 0; - for (xub_StrLen j = 0; j < aField2.getLength(); j++) + for( sal_Int32 j = 0; j < aField2.getLength(); j++ ) { const sal_Unicode c = aField2[j]; if ( j == nSpaceCount && m_cFieldDelimiter != 32 && c == 32 ) @@ -275,7 +275,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine, { // Is the delimiter correct? const OUString aValue = aField2.getToken(0,cDecimalDelimiter); - for (sal_Int32 j = aValue.getLength() - 4; j >= 0; j -= 4) + for( sal_Int32 j = aValue.getLength() - 4; j >= 0; j -= 4) { const sal_Unicode c = aValue[j]; // just digits, decimal- and thousands-delimiter? diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx index ca461304a57b..ed436b6cf0dd 100644 --- a/cui/source/dialogs/hyphen.cxx +++ b/cui/source/dialogs/hyphen.cxx @@ -236,7 +236,7 @@ void SvxHyphenWordDialog::ContinueHyph_Impl( sal_uInt16 nInsPos ) DBG_ASSERT(nInsPos <= aTmp.getLength() - 2, "wrong hyphen position"); sal_Int16 nIdxPos = -1; - for (sal_uInt16 i = 0; i <= nInsPos; ++i) + for (sal_Int32 i = 0; i <= nInsPos; ++i) { if (HYPH_POS_CHAR == aTmp[ i ]) nIdxPos++; @@ -304,7 +304,7 @@ void SvxHyphenWordDialog::SelLeft() if (nOldPos > 0) { OUString aTxt( aEditWord ); - for ( xub_StrLen i = nOldPos - 1; i > 0; --i) + for( sal_Int32 i = nOldPos - 1; i > 0; --i ) { DBG_ASSERT(i <= aTxt.getLength(), "index out of range"); if (aTxt[ i ] == sal_Unicode( HYPH_POS_CHAR )) diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index e624cbbcef67..47a81a314872 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -717,7 +717,7 @@ IMPL_LINK( DlgFilterCrit, ListSelectHdl, ListBox *, pListBox ) } else if(eColumnSearch == ColumnSearch::CHAR) { - for(xub_StrLen i=6;i<10;i++) + for(sal_Int32 i=6; i<10; i++) pComp->InsertEntry(aSTR_COMPARE_OPERATORS.getToken(i, ';')); } else if(eColumnSearch == ColumnSearch::BASIC) diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index 1e4895f90748..c58e9cd5c8a6 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -107,7 +107,7 @@ ODatabaseImportExport::ODatabaseImportExport(const ::svx::ODataAccessDescriptor& if( nCount > SBA_FORMAT_SELECTION_COUNT && !rExchange.getToken(4, ';').isEmpty()) { m_pRowMarker = new sal_Int32[nCount-SBA_FORMAT_SELECTION_COUNT]; - for(xub_StrLen i=SBA_FORMAT_SELECTION_COUNT;i<nCount;++i) + for(sal_Int32 i=SBA_FORMAT_SELECTION_COUNT; i<nCount; ++i) m_pRowMarker[i-SBA_FORMAT_SELECTION_COUNT] = rExchange.getToken(i,char(11)).toInt32(); } osl_atomic_decrement( &m_refCount ); diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 1b45eac413b2..b4b9d5fc931c 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -202,7 +202,7 @@ void OSelectionBrowseBox::initialize() if ( lcl_SupportsCoreSQLGrammar(xConnection) ) { sal_Int32 nCount = comphelper::string::getTokenCount(m_aFunctionStrings, ';'); - for (xub_StrLen nIdx = 0; nIdx < nCount; nIdx++) + for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++ ) m_pFunctionCell->InsertEntry(m_aFunctionStrings.getToken(nIdx, ';')); } else // else only COUNT(*) and COUNT("table".*) @@ -2260,9 +2260,9 @@ sal_Bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId, OUSt break; default: { - xub_StrLen nCount = comphelper::string::getTokenCount(m_aFunctionStrings, ';'); - xub_StrLen i; - for ( i = 0; i < nCount-1; i++) // grouping is not counted + sal_Int32 nCount = comphelper::string::getTokenCount(m_aFunctionStrings, ';'); + sal_Int32 i; + for( i = 0; i < nCount-1; i++ ) // grouping is not counted { if(rFkt.equalsIgnoreAsciiCase(m_aFunctionStrings.getToken(i, ';'))) { @@ -2707,7 +2707,7 @@ void OSelectionBrowseBox::setFunctionCell(OTableFieldDescRef& _pEntry) xub_StrLen nCount = comphelper::string::getTokenCount(m_aFunctionStrings, ';'); if ( _pEntry->isNumeric() ) --nCount; - for (xub_StrLen nIdx = 1; nIdx < nCount; nIdx++) + for( sal_Int32 nIdx = 1; nIdx < nCount; nIdx++ ) m_pFunctionCell->InsertEntry(m_aFunctionStrings.getToken(nIdx, ';')); } diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index e595ddd3a4b9..7e98f51c1ca8 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -1592,7 +1592,7 @@ sal_Bool ImpEditEngine::IsInputSequenceCheckingRequired( sal_Unicode nChar, cons static bool lcl_HasStrongLTR ( const OUString& rTxt, xub_StrLen nStart, xub_StrLen nEnd ) { - for ( xub_StrLen nCharIdx = nStart; nCharIdx < nEnd; ++nCharIdx ) + for( sal_Int32 nCharIdx = nStart; nCharIdx < nEnd; ++nCharIdx ) { const UCharDirection nCharDir = u_charDirection ( rTxt[ nCharIdx ]); if ( nCharDir == U_LEFT_TO_RIGHT || diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index 4861d7324fae..40f0420a6746 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -425,7 +425,7 @@ Size SvxFont::QuickGetTextSize( const OutputDevice *pOut, const OUString &rTxt, if ( pDXArray ) { - for ( xub_StrLen i = 0; i < nLen; i++ ) + for ( sal_Int32 i = 0; i < nLen; i++ ) pDXArray[i] += ( (i+1) * long( nKern ) ); // The last one is a nKern too big: pDXArray[nLen-1] -= nKern; diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index a459c67a9010..3c4302f50e18 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1097,7 +1097,7 @@ bool SvxAutoCorrect::FnCorrectCapsLock( SvxAutoCorrDoc& rDoc, const OUString& rT aConverted += rCC.uppercase(OUString(rTxt[nSttPos])); aConverted += rCC.lowercase(OUString(rTxt[nSttPos+1])); - for (xub_StrLen i = nSttPos+2; i < nEndPos; ++i) + for( sal_Int32 i = nSttPos+2; i < nEndPos; ++i ) { if ( IsLowerLetter(rCC.getCharacterType(rTxt, i)) ) // A lowercase letter disqualifies the whole text. diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 2dab6fda6f1f..3a9534ef05d2 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -3309,7 +3309,7 @@ void ScCompiler::AutoCorrectParsedSymbol() bLastAlp = bNextNum = true; xub_StrLen nStrip = 0; xub_StrLen nCount = nRefs; - for ( xub_StrLen j=1; j<nCount; j++ ) + for ( sal_Int32 j=1; j<nCount; j++ ) { aTmp2 = aSymbol.getToken( 0, ':', nIndex ); sal_Int32 nLen2 = aTmp2.getLength(); diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 8a3bc407b40f..e7198c4e09b2 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -2136,9 +2136,9 @@ void ScInterpreter::ScBase() { const xub_StrLen nConstBuf = 128; sal_Unicode aBuf[nConstBuf]; - xub_StrLen nBuf = std::max( (xub_StrLen) fChars, (xub_StrLen) (nMinLen+1) ); + sal_Int32 nBuf = std::max<sal_Int32>( fChars, nMinLen + 1 ); sal_Unicode* pBuf = (nBuf <= nConstBuf ? aBuf : new sal_Unicode[nBuf]); - for ( xub_StrLen j = 0; j < nBuf; ++j ) + for ( sal_Int32 j = 0; j < nBuf; ++j ) { pBuf[j] = '0'; } diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index 65eb8a214626..3cee5e6e909f 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -1812,7 +1812,7 @@ XclExpWebQuery::XclExpWebQuery( OUString aAppendTable; sal_Int32 nStringIx = 0; bool bExitLoop = false; - for( xub_StrLen nToken = 0; (nToken < nTokenCnt) && !bExitLoop; ++nToken ) + for( sal_Int32 nToken = 0; (nToken < nTokenCnt) && !bExitLoop; ++nToken ) { OUString aToken( rSource.getToken( 0, ';', nStringIx ) ); mbEntireDoc = ScfTools::IsHTMLDocName( aToken ); diff --git a/sc/source/filter/excel/xeroot.cxx b/sc/source/filter/excel/xeroot.cxx index be02afc9b425..7e650c6a986e 100644 --- a/sc/source/filter/excel/xeroot.cxx +++ b/sc/source/filter/excel/xeroot.cxx @@ -320,7 +320,7 @@ uno::Sequence< beans::NamedValue > XclExpRoot::GenerateEncryptionData( const OUS sal_uInt16 pnPasswd[16]; memset( pnPasswd, 0, sizeof( pnPasswd ) ); - for (xub_StrLen nChar = 0; nChar < aPass.getLength(); ++nChar ) + for( sal_Int32 nChar = 0; nChar < aPass.getLength(); ++nChar ) pnPasswd[nChar] = aPass[nChar]; ::msfilter::MSCodec_Std97 aCodec; diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index 1e7d368e3ecf..39557bda18cd 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -347,8 +347,7 @@ void XclImpHyperlink::ConvertToValidTabName(OUString& rUrl) // Needs at least 4 characters. return; - sal_Unicode c = rUrl[0]; - if (c != '#') + if (rUrl[0] != '#') // the 1st character must be '#'. return; @@ -356,9 +355,9 @@ void XclImpHyperlink::ConvertToValidTabName(OUString& rUrl) bool bInQuote = false; bool bQuoteTabName = false; - for (xub_StrLen i = 1; i < n; ++i) + for( sal_Int32 i = 1; i < n; ++i ) { - c = rUrl[i]; + sal_Unicode c = rUrl[i]; if (c == '\'') { if (bInQuote && i+1 < n && rUrl[i+1] == sal_Unicode('\'')) @@ -937,7 +936,7 @@ void XclImpWebQuery::ReadWqtables( XclImpStream& rStrm ) xub_StrLen nTokenCnt = ScStringUtil::GetQuotedTokenCount( aTables, aQuotedPairs, ',' ); maTables = ""; sal_Int32 nStringIx = 0; - for( xub_StrLen nToken = 0; nToken < nTokenCnt; ++nToken ) + for( sal_Int32 nToken = 0; nToken < nTokenCnt; ++nToken ) { OUString aToken( ScStringUtil::GetQuotedToken( aTables, 0, aQuotedPairs, ',', nStringIx ) ); sal_Int32 nTabNum = CharClass::isAsciiNumeric( aToken ) ? aToken.toInt32() : 0; diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx index b6df6ebcfaf2..d101a9ddf02e 100644 --- a/sc/source/filter/excel/xihelper.cxx +++ b/sc/source/filter/excel/xihelper.cxx @@ -708,8 +708,8 @@ void XclImpUrlHelper::DecodeUrl( { if( *(pChar + 1) ) { - xub_StrLen nLen = *++pChar; - for( xub_StrLen nChar = 0; (nChar < nLen) && *(pChar + 1); ++nChar ) + sal_Int32 nLen = *++pChar; + for( sal_Int32 nChar = 0; (nChar < nLen) && *(pChar + 1); ++nChar ) lclAppendUrlChar( rUrl, *++pChar ); // rUrl.Append( ':' ); } diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx index a399702165f8..38858afb7381 100644 --- a/sc/source/filter/ftools/ftools.cxx +++ b/sc/source/filter/ftools/ftools.cxx @@ -158,7 +158,7 @@ OUString ScfTools::ConvertToScDefinedName(const OUString& rName ) sal_Int32 nLen = sName.getLength(); if( nLen && !ScCompiler::IsCharFlagAllConventions( sName, 0, SC_COMPILER_C_CHAR_NAME ) ) sName = sName.replaceAt( 0, 1, "_" ); - for( xub_StrLen nPos = 1; nPos < nLen; ++nPos ) + for( sal_Int32 nPos = 1; nPos < nLen; ++nPos ) if( !ScCompiler::IsCharFlagAllConventions( sName, nPos, SC_COMPILER_C_NAME ) ) sName = sName.replaceAt( nPos, 1, "_" ); return sName; diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index e9987ee20bff..c4dcb4b22c0f 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -2459,8 +2459,8 @@ void ScInputHandler::SetMode( ScInputMode eNewMode ) static bool lcl_IsNumber(const OUString& rString) { - xub_StrLen nLen = rString.getLength(); - for (xub_StrLen i=0; i<nLen; i++) + sal_Int32 nLen = rString.getLength(); + for (sal_Int32 i=0; i<nLen; i++) { sal_Unicode c = rString[i]; if ( c < '0' || c > '9' ) diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx index b58154e13c39..0e28c5cdbb70 100644 --- a/sc/source/ui/pagedlg/areasdlg.cxx +++ b/sc/source/ui/pagedlg/areasdlg.cxx @@ -790,7 +790,7 @@ static bool lcl_CheckRepeatString( const OUString& rStr, ScDocument* pDoc, bool SCCOLROW nVal = 0; sal_Int32 nLen = rStr.getLength(); bool bEndPos = false; - for (xub_StrLen i = 0; i < nLen; ++i) + for( sal_Int32 i = 0; i < nLen; ++i ) { const sal_Unicode c = rStr[i]; if (c == rsep) diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index d725a525bd05..1ca9f4055c4a 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -627,7 +627,7 @@ void ScDrawStringsVars::SetTextToWidthOrHash( ScRefCellValue& rCell, long nWidth sal_uInt8 nSignCount = 0, nDecimalCount = 0, nExpCount = 0; sal_Int32 nLen = aString.getLength(); sal_Unicode cDecSep = ScGlobal::GetpLocaleData()->getLocaleItem().decimalSeparator[0]; - for (xub_StrLen i = 0; i < nLen; ++i) + for( sal_Int32 i = 0; i < nLen; ++i ) { sal_Unicode c = aString[i]; if (c == sal_Unicode('-')) @@ -1223,9 +1223,8 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY if ( nMergeRows == 0 ) nMergeRows = 1; - long i; long nMergeSizeX = 0; - for ( i=0; i<nMergeCols; i++ ) + for ( long i=0; i<nMergeCols; i++ ) { long nColWidth = ( nCellX+i <= nX2 ) ? pRowInfo[0].pCellInfo[nCellX+i+1].nWidth : @@ -2021,7 +2020,7 @@ void ScOutputData::DrawStrings( sal_Bool bPixelToLogic ) { double fMul = GetStretch(); sal_Int32 nLen = aString.getLength(); - for (xub_StrLen i=0; i<nLen; i++) + for( sal_Int32 i = 0; i<nLen; i++ ) pDX[i] = (long)(pDX[i] / fMul + 0.5); } diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index dd90ac37d79b..81d3584c8152 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -498,7 +498,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak ) else if( HTML_ISALPHA( nNextCh ) ) { OUStringBuffer sEntityBuffer( MAX_ENTITY_LEN ); - xub_StrLen nPos = 0L; + sal_Int32 nPos = 0L; do { sEntityBuffer.append( nNextCh ); @@ -520,7 +520,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak ) DBG_ASSERT( rInput.Tell() - nStreamPos == (sal_uLong)(nPos+1L)*GetCharSize(), "UTF-8 is failing here" ); - for( xub_StrLen i=nPos-1L; i>1L; i-- ) + for( sal_Int32 i = nPos-1; i>1; i-- ) { nNextCh = sEntityBuffer[i]; sEntityBuffer.setLength( i ); @@ -1899,14 +1899,12 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader, if( 0xfe == (sal_uChar)pHeader[0] ) bUCS2B = true; - xub_StrLen nLen; - for( nLen = 2; - pHeader[nLen] != 0 || pHeader[nLen+1] != 0; - nLen+=2 ) - ; + sal_Int32 nLen = 2; + while( pHeader[nLen] != 0 || pHeader[nLen+1] != 0 ) + nLen += 2; OStringBuffer sTmp( (nLen - 2)/2 ); - for( xub_StrLen nPos = 2; nPos < nLen; nPos += 2 ) + for( sal_Int32 nPos = 2; nPos < nLen; nPos += 2 ) { sal_Unicode cUC; if( bUCS2B ) diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index 9384184cf041..970ddf8c4998 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -246,7 +246,7 @@ namespace { aDXArray.reserve(rInfo.mnTextLen); - for(xub_StrLen a(0); a < rInfo.mnTextLen; a++) + for(sal_Int32 a=0; a < rInfo.mnTextLen; a++) { aDXArray.push_back((double)rInfo.mpDXArray[a]); } diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index 528a5aec696c..298db8737229 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -100,7 +100,7 @@ namespace { maDblDXArray.reserve(mnTextLength); - for(xub_StrLen a(0); a < mnTextLength; a++) + for(sal_Int32 a=0; a < mnTextLength; a++) { maDblDXArray.push_back((double)rInfo.mpDXArray[a]); } diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index d38a5aa04b14..dd015348af08 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -183,7 +183,7 @@ xub_StrLen GetPostIt(xub_StrLen aCount,const SwpHints *pHts) xub_StrLen aIndex = 0; while (aCount) { - for (xub_StrLen i = 0; i <pHts->Count();i++) + for (sal_Int32 i = 0; i < pHts->Count(); i++ ) { aIndex++; const SwTxtAttr* pTxtAttr = (*pHts)[i]; @@ -197,7 +197,7 @@ xub_StrLen GetPostIt(xub_StrLen aCount,const SwpHints *pHts) } } // throw away all following non postits - for (xub_StrLen i = aIndex; i <pHts->Count();i++) + for( sal_Int32 i = aIndex; i < pHts->Count(); i++ ) { const SwTxtAttr* pTxtAttr = (*pHts)[i]; if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) && @@ -266,7 +266,7 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te nStart = swap; } - for (xub_StrLen i = 0; i <pHts->Count();i++) + for( sal_Int32 i = 0; i < pHts->Count(); i++ ) { xub_StrLen aPos = *(*pHts)[i]->GetStart(); const SwTxtAttr* pTxtAttr = (*pHts)[i]; diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index fd603b3d0874..0432fdfd23c9 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -1028,7 +1028,7 @@ sal_uLong SwCompareLine::GetHashValue() const case ND_SECTIONNODE: { OUString sStr( GetText() ); - for( xub_StrLen n = 0; n < sStr.getLength(); ++n ) + for( sal_Int32 n = 0; n < sStr.getLength(); ++n ) ( nRet <<= 1 ) += sStr[ n ]; } break; @@ -1243,7 +1243,7 @@ OUString SwCompareLine::GetText() const sal_uLong SwCompareLine::GetTxtNodeHashValue( const SwTxtNode& rNd, sal_uLong nVal ) { OUString sStr( rNd.GetExpandTxt() ); - for( xub_StrLen n = 0; n < sStr.getLength(); ++n ) + for( sal_Int32 n = 0; n < sStr.getLength(); ++n ) ( nVal <<= 1 ) += sStr[ n ]; return nVal; } diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 261b28d5ec05..ab94255154db 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -1410,7 +1410,7 @@ lcl_CalcBreaks( ::std::vector<xub_StrLen> & rBreaks, SwPaM const & rPam ) if (nEnd == pTxtNode->Len()) return; // paragraph selected until the end - for (xub_StrLen i = nStart; i < nEnd; ++i) + for (sal_Int32 i = nStart; i < nEnd; ++i) { const sal_Unicode c(pTxtNode->GetTxt()[i]); if ((CH_TXTATR_INWORD == c) || (CH_TXTATR_BREAKWORD == c)) diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 0ca02239591e..5683c1fe57fb 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1057,7 +1057,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh, if( T2T_PARA != cCh ) { - for (xub_StrLen nChPos = 0; nChPos < pTxtNd->GetTxt().getLength();) + for (sal_Int32 nChPos = 0; nChPos < pTxtNd->GetTxt().getLength();) { if (pTxtNd->GetTxt()[nChPos] == cCh) { diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 575f3d083b61..12522f816f44 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -459,7 +459,7 @@ sal_uInt16 SwAutoFormat::CalcLevel( const SwTxtNode& rNd, sal_uInt16 *pDigitLvl ++nLvl; } - for (xub_StrLen n = 0, nEnd = rTxt.getLength(); n < nEnd; ++n) + for( xub_StrLen n = 0, nEnd = rTxt.getLength(); n < nEnd; ++n ) { switch (rTxt[n]) { @@ -504,7 +504,7 @@ sal_Bool SwAutoFormat::IsNoAlphaLine( const SwTxtNode& rNd ) const xub_StrLen nANChar = 0, nBlnk = 0; CharClass& rCC = GetCharClass( rNd.GetSwAttrSet().GetLanguage().GetLanguage() ); - for( xub_StrLen n = 0, nEnd = rStr.getLength(); n < nEnd; ++n ) + for( sal_Int32 n = 0, nEnd = rStr.getLength(); n < nEnd; ++n ) if( IsSpace( rStr[ n ] ) ) ++nBlnk; else if( rCC.isLetterNumeric( rStr, n )) @@ -722,7 +722,7 @@ xub_StrLen SwAutoFormat::GetTrailingBlanks( const OUString& rStr ) const bool SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const { const OUString& rTxt = rNd.GetTxt(); - for (xub_StrLen n = 0, nEnd = rTxt.getLength(); n < nEnd; ++n) + for( sal_Int32 n = 0, nEnd = rTxt.getLength(); n < nEnd; ++n ) if (!IsSpace(rTxt[n])) { CharClass& rCC = GetCharClass( rNd.GetSwAttrSet(). diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index eb71ce95ebfb..9c89884a85a2 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -1350,7 +1350,7 @@ static bool lcl_IsValidRowName( const OUString& rStr ) { bool bIsValid = true; sal_Int32 nLen = rStr.getLength(); - for (xub_StrLen i = 0; i < nLen && bIsValid; ++i) + for( sal_Int32 i = 0; i < nLen && bIsValid; ++i ) { const sal_Unicode cChar = rStr[i]; if (cChar < '0' || cChar > '9') diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 4d977d92964a..7fbc03c97d32 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -249,7 +249,7 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf ) if ( nCurrDir != UBIDI_RTL ) { nCurrDir = UBIDI_RTL; - for ( xub_StrLen nCharIdx = 0; nCharIdx < nEnd; ++nCharIdx ) + for( sal_Int32 nCharIdx = 0; nCharIdx < nEnd; ++nCharIdx ) { UCharDirection nCharDir = u_charDirection ( aTxt[ nCharIdx ]); if ( nCharDir == U_LEFT_TO_RIGHT || diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 3e0ee4f4b43a..c688eb6b8954 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -118,9 +118,9 @@ static bool lcl_ConnectToPrev( sal_Unicode cCh, sal_Unicode cPrevCh ) /************************************************************************* * lcl_HasStrongLTR *************************************************************************/ -static bool lcl_HasStrongLTR ( const OUString& rTxt, xub_StrLen nStart, xub_StrLen nEnd ) +static bool lcl_HasStrongLTR ( const OUString& rTxt, sal_Int32 nStart, sal_Int32 nEnd ) { - for ( xub_StrLen nCharIdx = nStart; nCharIdx < nEnd; ++nCharIdx ) + for( sal_Int32 nCharIdx = nStart; nCharIdx < nEnd; ++nCharIdx ) { const UCharDirection nCharDir = u_charDirection ( rTxt[ nCharIdx ] ); if ( nCharDir == U_LEFT_TO_RIGHT || diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx index 8698b43999e2..1e6641275c59 100644 --- a/sw/source/core/text/txtfly.cxx +++ b/sw/source/core/text/txtfly.cxx @@ -486,9 +486,9 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf ) rInf.GetLen(); if( rInf.GetSpace() > 0 ) { - xub_StrLen nSpaceCnt = 0; + sal_Int32 nSpaceCnt = 0; const xub_StrLen nEndPos = rInf.GetIdx() + nTmpLen; - for( xub_StrLen nPos = rInf.GetIdx(); nPos < nEndPos; ++nPos ) + for( sal_Int32 nPos = rInf.GetIdx(); nPos < nEndPos; ++nPos ) { if( CH_BLANK == rInf.GetText()[ nPos ] ) ++nSpaceCnt; diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index 4c51fa982cf8..0f882dc7705d 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -1029,7 +1029,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) } // calculate offsets - for ( xub_StrLen j = 1; j < rInf.GetLen(); ++j ) + for( sal_Int32 j = 1; j < rInf.GetLen(); ++j ) { long nScr = pKernArray[ j ] - pKernArray[ j - 1 ]; nNextFix += nWidthPerChar; @@ -1128,14 +1128,14 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) } } long nGridAddSum = nGridWidthAdd; - for(xub_StrLen i = 0; i < rInf.GetLen(); i++,nGridAddSum += nGridWidthAdd ) + for(sal_Int32 i = 0; i < rInf.GetLen(); i++, nGridAddSum += nGridWidthAdd ) { pKernArray[i] += nGridAddSum; } long nKernSum = rInf.GetKern(); if ( bSpecialJust || rInf.GetKern() ) { - for( xub_StrLen i = 0; i < rInf.GetLen(); i++, nKernSum += rInf.GetKern() ) + for( sal_Int32 i = 0; i < rInf.GetLen(); i++, nKernSum += rInf.GetKern() ) { if ( CH_BLANK == rInf.GetText()[ rInf.GetIdx()+i ] ) nKernSum += nSpaceAdd; @@ -1197,7 +1197,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) //long nKernAdd = rInf.GetKern(); long nKernAdd = 0; long nGridAddSum = nGridWidthAdd + nKernAdd; - for(xub_StrLen i = 0; i < rInf.GetLen(); i++,nGridAddSum += nGridWidthAdd + nKernAdd ) + for(sal_Int32 i = 0; i < rInf.GetLen(); i++,nGridAddSum += nGridWidthAdd + nKernAdd ) { pKernArray[i] += nGridAddSum; } @@ -1255,7 +1255,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) } nDiff /= nZwi; long nSum = nDiff; - for( xub_StrLen i = 0; i < nZwi; ) + for( sal_Int32 i = 0; i < nZwi; ) { pKernArray[ i ] += nSum; if( ++i == nRest ) @@ -1345,7 +1345,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) if ( bStretch || bPaintBlank || rInf.GetKern() || bSpecialJust ) { - for( xub_StrLen i = 0; i < rInf.GetLen(); i++, + for( sal_Int32 i = 0; i < rInf.GetLen(); i++, nKernSum += rInf.GetKern() ) { if ( CH_BLANK == rInf.GetText()[ rInf.GetIdx()+i ] ) @@ -1630,7 +1630,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) const long nOtherHalf = nSpaceAdd - nHalfSpace; if ( nSpaceAdd && ( cChPrev == CH_BLANK ) ) nSpaceSum = nHalfSpace; - for ( xub_StrLen i=1; i<nCnt; ++i,nKernSum += rInf.GetKern() ) + for( sal_Int32 i=1; i<nCnt; ++i, nKernSum += rInf.GetKern() ) { nCh = rInf.GetText()[ rInf.GetIdx() + i ]; @@ -1951,7 +1951,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) if ( pPrtFont->GetKerning() ) nMul = 1; const sal_uInt16 nDiv = nMul+1; - for( xub_StrLen i=1; i<nCnt; i++ ) + for( sal_Int32 i = 1; i<nCnt; i++ ) { nCh = rInf.GetText()[ rInf.GetIdx() + i ]; long nScr; @@ -2149,7 +2149,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf ) else nGridWidthAdd = nGridWidthAdd - nDefaultFontHeight; - for(xub_StrLen j = 0; j < rInf.GetLen(); j++) + for(sal_Int32 j = 0; j < rInf.GetLen(); j++) { long nScr = pKernArray[ j ] + ( nSpaceAdd + nGridWidthAdd ) * ( j + 1 ); if( nScr >= rInf.GetOfst()) diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx index a73cf97d8049..2ae345bcaa5f 100644 --- a/sw/source/core/txtnode/fntcap.cxx +++ b/sw/source/core/txtnode/fntcap.cxx @@ -77,7 +77,7 @@ xub_StrLen sw_CalcCaseMap( const SwFont& rFnt, // special case for title case: const bool bTitle = SVX_CASEMAP_TITEL == rFnt.GetCaseMap() && g_pBreakIt->GetBreakIter().is(); - for ( xub_StrLen i = nOfst; i < nEnd; ++i ) + for ( sal_Int32 i = nOfst; i < nEnd; ++i ) { OUString aTmp(rOrigString.copy(i, 1)); @@ -781,7 +781,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo ) rDo.GetInf().SetOut( *pOldOut ); if( !bWordWise && rDo.GetInf().GetSpace() ) { - for( xub_StrLen nI = nOldPos; nI < nPos; ++nI ) + for( sal_Int32 nI = nOldPos; nI < nPos; ++nI ) { if( CH_BLANK == rOldText[nI] ) aPartSize.Width() += nSpaceAdd; diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index ef4edbf7ed5e..a71601a902b2 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -3450,7 +3450,7 @@ void SwTxtNode::ReplaceText( const SwIndex& rStart, const xub_StrLen nDelLen, const xub_StrLen nStartPos = rStart.GetIndex(); xub_StrLen nEndPos = nStartPos + nDelLen; xub_StrLen nLen = nDelLen; - for ( xub_StrLen nPos = nStartPos; nPos < nEndPos; ++nPos ) + for( sal_Int32 nPos = nStartPos; nPos < nEndPos; ++nPos ) { if ((CH_TXTATR_BREAKWORD == m_Text[nPos]) || (CH_TXTATR_INWORD == m_Text[nPos])) diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index 6472131870c9..897af654b3a5 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -1263,7 +1263,7 @@ void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const sal_Bool bGrey ) const bool bAsianFont = ( rInf.GetFont() && SW_CJK == rInf.GetFont()->GetActual() ); - for( xub_StrLen nTmp = nOldIdx; nTmp < nTmpEnd; ++nTmp ) + for( sal_Int32 nTmp = nOldIdx; nTmp < nTmpEnd; ++nTmp ) { if( CH_BLANK == rOldStr[nTmp] || bAsianFont || ( nTmp + 1 < rOldStr.getLength() && pSI && diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index 9786ab76345a..d60883fa4fd9 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -605,7 +605,7 @@ OUString DenoteSpecialCharacters(const OUString & rStr) xub_StrLen nStart = 0; sal_Unicode cLast = 0; - for (xub_StrLen i = 0; i < rStr.getLength(); i++) + for( sal_Int32 i = 0; i < rStr.getLength(); i++) { if (lcl_IsSpecialCharacter(rStr[i])) { diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx index bd0e91bce398..5ab65728658f 100644 --- a/sw/source/core/undo/unovwr.cxx +++ b/sw/source/core/undo/unovwr.cxx @@ -205,7 +205,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext) pTxtNd->SetIgnoreDontExpand( true ); ++rIdx; - for( xub_StrLen n = 0; n < aDelStr.getLength(); n++ ) + for( sal_Int32 n = 0; n < aDelStr.getLength(); n++ ) { // do it individually, to keep the attributes! OUString aTmpStr(aDelStr[n]); @@ -249,7 +249,7 @@ void SwUndoOverwrite::RepeatImpl(::sw::RepeatContext & rContext) ::sw::GroupUndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo()); rDoc.Overwrite(*pAktPam, OUString(aInsStr[0])); } - for( xub_StrLen n = 1; n < aInsStr.getLength(); ++n ) + for( sal_Int32 n = 1; n < aInsStr.getLength(); ++n ) rDoc.Overwrite( *pAktPam, OUString(aInsStr[n]) ); } @@ -277,7 +277,7 @@ void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & rContext) bool bOldExpFlg = pTxtNd->IsIgnoreDontExpand(); pTxtNd->SetIgnoreDontExpand( true ); - for( xub_StrLen n = 0; n < aInsStr.getLength(); n++ ) + for( sal_Int32 n = 0; n < aInsStr.getLength(); n++ ) { // do it individually, to keep the attributes! OUString const ins( @@ -459,7 +459,7 @@ void _UndoTransliterate_Data::SetChangeAtNode( SwDoc& rDoc ) else { sal_Int32* p = aOffsets.getArray(); - for( xub_StrLen n = 0; n < nLen; ++n, ++p ) + for( sal_Int32 n = 0; n < nLen; ++n, ++p ) *p = n + nStart; } pTNd->ReplaceTextOnly( nStart, nLen, sText, aOffsets ); diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index 4d53bc6808af..6c441c774768 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -465,7 +465,7 @@ static bool GetSubranges( const OUString &rRangeRepresentation, { OUString *pRanges = aRanges.getArray(); OUString aFirstTable; - for ( xub_StrLen i = 0; i < nLen && bRes; ++i) + for( sal_Int32 i = 0; i < nLen && bRes; ++i ) { OUString aRange( aRangesStr.getToken( i, ';' ) ); if (!aRange.isEmpty()) diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx index 9351dc0bf85f..2a1ad7252d8b 100644 --- a/sw/source/filter/basflt/iodetect.cxx +++ b/sw/source/filter/basflt/iodetect.cxx @@ -474,7 +474,7 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, sal_uLong &rLen, bSwap = true; sal_Char* pF = (sal_Char*)pNewBuf; sal_Char* pN = pF+1; - for(xub_StrLen n = 0; n < nNewLen; ++n, pF+=2, pN+=2) + for(sal_uLong n = 0; n < nNewLen; ++n, pF+=2, pN+=2 ) { sal_Char c = *pF; *pF = *pN; diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 53ced4ed7a1f..ed8064355a13 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -414,7 +414,7 @@ void SwWW8AttrIter::OutAttr( xub_StrLen nSwPos, bool bRuby ) sw::PoolItems aRangeItems; if (const SwpHints* pTxtAttrs = rNd.GetpSwpHints()) { - for (xub_StrLen i = 0; i < pTxtAttrs->Count(); ++i) + for( sal_Int32 i = 0; i < pTxtAttrs->Count(); ++i ) { const SwTxtAttr* pHt = (*pTxtAttrs)[i]; const xub_StrLen* pEnd = pHt->GetEnd(); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index c906b0b7cd91..e0d52c8bb47f 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -3059,7 +3059,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs) if (!bIsUnicode) nEndUsed = Custom8BitToUnicode(hConverter, p8Bits, nL2, pBuffer, nStrLen); - for( xub_StrLen nI = 0; nI < nStrLen; ++nI, ++pBuffer ) + for( sal_Int32 nI = 0; nI < nStrLen; ++nI, ++pBuffer ) if (m_bRegardHindiDigits && bBidi && LangUsesHindiNumbers(nCTLLang)) *pBuffer = TranslateToHindiNumbers(*pBuffer); @@ -5428,7 +5428,7 @@ namespace sal_uInt16 pStd97Pass[16]; memset( pStd97Pass, 0, sizeof( pStd97Pass ) ); - for (xub_StrLen nChar = 0; nChar < nLen; ++nChar ) + for( sal_Int32 nChar = 0; nChar < nLen; ++nChar ) pStd97Pass[nChar] = sUniPassword[nChar]; aCodec97.InitKey( pStd97Pass, pDocId ); @@ -5459,7 +5459,7 @@ namespace { sal_Unicode pPassword[16]; memset( pPassword, 0, sizeof( pPassword ) ); - for (xub_StrLen nChar = 0; nChar < nLen; ++nChar ) + for( sal_Int32 nChar = 0; nChar < nLen; ++nChar ) pPassword[nChar] = sUniPassword[nChar]; rCodec.InitKey( pPassword, pDocId ); diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index b4ddec9074c5..efd48e53c9b0 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -611,7 +611,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV, } else { - for(xub_StrLen i = SVBT8ToByte(rAV.cbTextBefore); + for(sal_Int32 i = SVBT8ToByte(rAV.cbTextBefore); i < SVBT8ToByte(rAV.cbTextAfter); ++i, pTxt += 2) { sTxt += OUString(SVBT16ToShort(*(SVBT16*)pTxt)); diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 29dbf460febf..6e28911334d5 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -486,11 +486,11 @@ WW8LSTInfo* WW8ListManager::GetLSTByListId( sal_uInt32 nIdLst ) const } static void lcl_CopyGreaterEight(OUString &rDest, OUString &rSrc, - xub_StrLen nStart, xub_StrLen nLen = STRING_LEN) + sal_Int32 nStart, sal_Int32 nLen = STRING_LEN) { if (nLen > rSrc.getLength() || nLen == STRING_LEN) nLen = rSrc.getLength(); - for (xub_StrLen nI = nStart; nI < nLen; ++nI) + for( sal_Int32 nI = nStart; nI < nLen; ++nI) { sal_Unicode nChar = rSrc[nI]; if (nChar > WW8ListManager::nMaxLevel) diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 7e81e88106c8..e949d3587817 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -267,7 +267,7 @@ xub_StrLen FindParaStart( const OUString& rStr, sal_Unicode cToken, sal_Unicode { bool bStr = false; // ignore inside a string - for( xub_StrLen nBuf=0; nBuf+1 < rStr.getLength(); nBuf++ ) + for( sal_Int32 nBuf = 0; nBuf+1 < rStr.getLength(); nBuf++ ) { if( rStr[ nBuf ] == '"' ) bStr = !bStr; @@ -973,7 +973,7 @@ void SwWW8ImplReader::MakeTagString( OUString& rStr, const OUString& rOrg ) sal_Unicode cChar; rStr = rOrg; - for( xub_StrLen nI = 0; + for( sal_Int32 nI = 0; nI < rStr.getLength() && rStr.getLength() < (MAX_FIELDLEN - 4); ++nI ) { bool bSetAsHex = false; diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index ffbd5f63aefa..2ddd993552a5 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -863,7 +863,7 @@ void SwEditWin::FlushInBuffer() OUString aNewText( aOldText ); if (rCTLOptions.IsCTLSequenceCheckingTypeAndReplace()) { - for (xub_StrLen k = 0; k < m_aInBuffer.getLength(); ++k) + for( sal_Int32 k = 0; k < m_aInBuffer.getLength(); ++k) { const sal_Unicode cChar = m_aInBuffer[k]; const sal_Int32 nPrevPos =xISC->correctInputSequence( aNewText, nTmpPos - 1, cChar, nCheckMode ); @@ -893,7 +893,7 @@ void SwEditWin::FlushInBuffer() } else { - for (xub_StrLen k = 0; k < m_aInBuffer.getLength(); ++k) + for( sal_Int32 k = 0; k < m_aInBuffer.getLength(); ++k ) { const sal_Unicode cChar = m_aInBuffer[k]; if (xISC->checkInputSequence( aNewText, nTmpPos - 1, cChar, nCheckMode )) diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx index fda87419b30c..c641baa9b723 100644 --- a/sw/source/ui/vba/vbatemplate.cxx +++ b/sw/source/ui/vba/vbatemplate.cxx @@ -33,7 +33,7 @@ static OUString lcl_CheckGroupName( const OUString& rGroupName ) { OUString sRet; //group name should contain only A-Z and a-z and spaces - for( xub_StrLen i = 0; i < rGroupName.getLength(); i++ ) + for( sal_Int32 i = 0; i < rGroupName.getLength(); i++ ) { sal_Unicode cChar = rGroupName[i]; if (comphelper::string::isalnumAscii(cChar) || diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 8d97a433223e..66e8ab173cfa 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -2761,7 +2761,7 @@ ImplMultiTextLineInfo::ImplMultiTextLineInfo() ImplMultiTextLineInfo::~ImplMultiTextLineInfo() { - for ( xub_StrLen i = 0; i < mnLines; i++ ) + for( sal_Int32 i = 0; i < mnLines; i++ ) delete mpLines[i]; delete [] mpLines; } @@ -2782,7 +2782,7 @@ void ImplMultiTextLineInfo::AddLine( ImplTextLineInfo* pLine ) void ImplMultiTextLineInfo::Clear() { - for ( xub_StrLen i = 0; i < mnLines; i++ ) + for( sal_Int32 i = 0; i < mnLines; i++ ) delete mpLines[i]; mnLines = 0; } diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 771d4980ad4a..87e5c1a2ec92 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -5243,7 +5243,7 @@ static sal_Bool ImplHandleIMECompositionInput( WinSalFrame* pFrame, sal_Int32 nTextLen2 = aEvt.maText.getLength(); pSalAttrAry = new sal_uInt16[nTextLen2]; memset( pSalAttrAry, 0, nTextLen2*sizeof( sal_uInt16 ) ); - for ( xub_StrLen i = 0; (i < nTextLen2) && (i < nAttrLen); i++ ) + for( sal_Int32 i = 0; (i < nTextLen2) && (i < nAttrLen); i++ ) { BYTE nWinAttr = pAttrBuf[i]; sal_uInt16 nSalAttr; |