summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-28 12:21:40 +0200
committerNoel Grandin <noel@peralex.com>2013-11-06 08:51:22 +0200
commit296329a926877d069f55364a177d734f385ce7ae (patch)
treed95dff15946339b5a2df8c7c29159b97137ee30e /sc
parentebeff1814cbecfba9bbeaeba8067b58f71703a39 (diff)
convert xub_StrLen to sal_Int32
convert for loops using xub_StrLen to use sal_Int32 Change-Id: I5f635ca078966fefe938dbc7e8dea7c8d0d0b554
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/compiler.cxx2
-rw-r--r--sc/source/core/tool/interpr2.cxx4
-rw-r--r--sc/source/filter/excel/xecontent.cxx2
-rw-r--r--sc/source/filter/excel/xeroot.cxx2
-rw-r--r--sc/source/filter/excel/xicontent.cxx9
-rw-r--r--sc/source/filter/excel/xihelper.cxx4
-rw-r--r--sc/source/filter/ftools/ftools.cxx2
-rw-r--r--sc/source/ui/app/inputhdl.cxx4
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx2
-rw-r--r--sc/source/ui/view/output2.cxx7
10 files changed, 18 insertions, 20 deletions
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);
}