diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-28 13:20:52 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-05 13:18:14 +0200 |
commit | 3d65dfa3c98e0f79c579cfac23d55092f7554244 (patch) | |
tree | 492c438c7af8dc56240add22d259945b67ea130a /sc/source/ui/dbgui | |
parent | 9802db7ff181a9c4d15cc453725b63b82a941fff (diff) |
convert xub_StrLen to sal_Int32
Converts code that calls comphelper::string::getTokenCount() to
use sal_Int32 to store the return value.
Change-Id: I439605a39d29b1309649e30f3ff40dfa412efcde
Diffstat (limited to 'sc/source/ui/dbgui')
-rw-r--r-- | sc/source/ui/dbgui/asciiopt.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/dbgui/csvgrid.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/dbgui/csvruler.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/dbgui/fieldwnd.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/dbgui/imoptdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/dbgui/scuiasciiopt.cxx | 12 |
6 files changed, 17 insertions, 17 deletions
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx index d52d4aa32971..1072a89b71be 100644 --- a/sc/source/ui/dbgui/asciiopt.cxx +++ b/sc/source/ui/dbgui/asciiopt.cxx @@ -183,8 +183,8 @@ bool ScAsciiOptions::operator==( const ScAsciiOptions& rCmp ) const static OUString lcl_decodeSepString( const OUString & rSepNums, bool & o_bMergeFieldSeps ) { OUString aFieldSeps; - xub_StrLen nSub = comphelper::string::getTokenCount( rSepNums, '/'); - for (xub_StrLen i=0; i<nSub; ++i) + sal_Int32 nSub = comphelper::string::getTokenCount( rSepNums, '/'); + for (sal_Int32 i=0; i<nSub; ++i) { OUString aCode = rSepNums.getToken( i, '/' ); if ( aCode.equalsAscii(pStrMrg) ) @@ -204,7 +204,7 @@ static OUString lcl_decodeSepString( const OUString & rSepNums, bool & o_bMergeF void ScAsciiOptions::ReadFromString( const OUString& rString ) { - xub_StrLen nCount = comphelper::string::getTokenCount(rString, ','); + sal_Int32 nCount = comphelper::string::getTokenCount(rString, ','); OUString aToken; // Field separator. @@ -247,7 +247,7 @@ void ScAsciiOptions::ReadFromString( const OUString& rString ) delete[] pColFormat; aToken = rString.getToken(4,','); - xub_StrLen nSub = comphelper::string::getTokenCount(aToken, '/'); + sal_Int32 nSub = comphelper::string::getTokenCount(aToken, '/'); nInfoCount = nSub / 2; if (nInfoCount) { diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index 221da159997f..2440f850ff35 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -1071,9 +1071,9 @@ void ScCsvGrid::ImplDrawCellText( const Point& rPos, const OUString& rText ) /* #i60296# If string contains mixed script types, the space character U+0020 may be drawn with a wrong width (from non-fixed-width Asian or Complex font). Now we draw every non-space portion separately. */ - xub_StrLen nTokenCount = comphelper::string::getTokenCount(aPlainText, ' '); + sal_Int32 nTokenCount = comphelper::string::getTokenCount(aPlainText, ' '); sal_Int32 nCharIxInt = 0; - for( xub_StrLen nToken = 0; nToken < nTokenCount; ++nToken ) + for( sal_Int32 nToken = 0; nToken < nTokenCount; ++nToken ) { sal_Int32 nBeginIx = nCharIxInt; OUString aToken = aPlainText.getToken( 0, ' ', nCharIxInt ); diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx index 3ea0d517fc18..0363c09485d4 100644 --- a/sc/source/ui/dbgui/csvruler.cxx +++ b/sc/source/ui/dbgui/csvruler.cxx @@ -62,8 +62,8 @@ static void load_FixedWidthList(ScCsvSplits &aSplits) sSplits = sFixedWidthLists; // String ends with a semi-colon so there is no 'int' after the last one. - xub_StrLen n = comphelper::string::getTokenCount(sSplits, ';') - 1; - for (xub_StrLen i = 0; i < n; ++i) + sal_Int32 n = comphelper::string::getTokenCount(sSplits, ';') - 1; + for (sal_Int32 i = 0; i < n; ++i) aSplits.Insert( sSplits.getToken(i, ';').toInt32() ); } } diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx index 717867bad9c4..ca91ab663bb3 100644 --- a/sc/source/ui/dbgui/fieldwnd.cxx +++ b/sc/source/ui/dbgui/fieldwnd.cxx @@ -579,10 +579,10 @@ void ScDPFieldControlBase::DrawBackground( OutputDevice& rDev ) support hard line breaks here. This part will draw each line of the text for itself. */ - xub_StrLen nTokenCnt = comphelper::string::getTokenCount(GetText(), '\n'); + sal_Int32 nTokenCnt = comphelper::string::getTokenCount(GetText(), '\n'); long nY = (aSize.Height() - nTokenCnt * rDev.GetTextHeight()) / 2; sal_Int32 nStringIx = 0; - for( xub_StrLen nToken = 0; nToken < nTokenCnt; ++nToken ) + for( sal_Int32 nToken = 0; nToken < nTokenCnt; ++nToken ) { OUString aLine( GetText().getToken( 0, '\n', nStringIx ) ); Point aLinePos( (aSize.Width() - rDev.GetCtrlTextWidth( aLine )) / 2, nY ); diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx index 56d4b74851fd..fd2a18a136b6 100644 --- a/sc/source/ui/dbgui/imoptdlg.cxx +++ b/sc/source/ui/dbgui/imoptdlg.cxx @@ -45,7 +45,7 @@ ScImportOptions::ScImportOptions( const OUString& rStr ) bSaveAsShown = sal_True; // "true" if not in string (after CSV import) bQuoteAllText = false; bSaveFormulas = false; - xub_StrLen nTokenCount = comphelper::string::getTokenCount(rStr, ','); + sal_Int32 nTokenCount = comphelper::string::getTokenCount(rStr, ','); if ( nTokenCount >= 3 ) { // first 3 tokens: common diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 5e2720a1a149..87aa28c7daf7 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -62,8 +62,8 @@ using namespace com::sun::star::uno; static void lcl_FillCombo( ComboBox& rCombo, const OUString& rList, sal_Unicode cSelect ) { - xub_StrLen i; - xub_StrLen nCount = comphelper::string::getTokenCount(rList, '\t'); + sal_Int32 i; + sal_Int32 nCount = comphelper::string::getTokenCount(rList, '\t'); for ( i=0; i<nCount; i+=2 ) rCombo.InsertEntry( rList.getToken(i,'\t') ); @@ -86,8 +86,8 @@ static sal_Unicode lcl_CharFromCombo( ComboBox& rCombo, const OUString& rList ) OUString aStr = rCombo.GetText(); if ( !aStr.isEmpty() ) { - xub_StrLen nCount = comphelper::string::getTokenCount(rList, '\t'); - for ( xub_StrLen i=0; i<nCount; i+=2 ) + sal_Int32 nCount = comphelper::string::getTokenCount(rList, '\t'); + for ( sal_Int32 i=0; i<nCount; i+=2 ) { if ( ScGlobal::GetpTransliteration()->isEqual( aStr, rList.getToken(i,'\t') ) ) c = (sal_Unicode)rList.getToken(i+1,'\t').toInt32(); @@ -404,8 +404,8 @@ ScImportAsciiDlg::ScImportAsciiDlg( Window* pParent,OUString aDatName, pLbCustomLang->SelectLanguage(static_cast<LanguageType>(nLanguage), true); // *** column type ListBox *** - xub_StrLen nCount = comphelper::string::getTokenCount(aColumnUser, ';'); - for (xub_StrLen i=0; i<nCount; i++) + sal_Int32 nCount = comphelper::string::getTokenCount(aColumnUser, ';'); + for (sal_Int32 i=0; i<nCount; i++) pLbType->InsertEntry( aColumnUser.getToken( i, ';' ) ); pLbType->SetSelectHdl( LINK( this, ScImportAsciiDlg, LbColTypeHdl ) ); |