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 /dbaccess | |
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 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/TextConnectionHelper.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/queryfilter.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/TokenWriter.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 9 |
4 files changed, 13 insertions, 14 deletions
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx index 0ac82b4bbe65..83f1febcb673 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx @@ -86,7 +86,7 @@ DBG_NAME(OTextConnectionHelper) { DBG_CTOR(OTextConnectionHelper,NULL); - xub_StrLen nCnt = comphelper::string::getTokenCount(m_aFieldSeparatorList, '\t'); + sal_Int32 nCnt = comphelper::string::getTokenCount(m_aFieldSeparatorList, '\t'); xub_StrLen i; for( i = 0 ; i < nCnt ; i += 2 ) @@ -469,7 +469,7 @@ DBG_NAME(OTextConnectionHelper) void OTextConnectionHelper::SetSeparator( ComboBox& rBox, const OUString& rList, const OUString& rVal ) { char nTok = '\t'; - xub_StrLen nCnt(comphelper::string::getTokenCount(rList, nTok)); + sal_Int32 nCnt = comphelper::string::getTokenCount(rList, nTok); xub_StrLen i; for( i=0 ; i<nCnt ; i+=2 ) diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index fa7f1b78762c..e624cbbcef67 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -210,7 +210,7 @@ DlgFilterCrit::~DlgFilterCrit() sal_Int32 DlgFilterCrit::GetOSQLPredicateType( const OUString& _rSelectedPredicate ) const { sal_Int32 nPredicateIndex = -1; - for ( xub_StrLen i=0; i < comphelper::string::getTokenCount(aSTR_COMPARE_OPERATORS, ';'); ++i) + for ( sal_Int32 i=0; i < comphelper::string::getTokenCount(aSTR_COMPARE_OPERATORS, ';'); ++i) if ( aSTR_COMPARE_OPERATORS.getToken(i, ';') == _rSelectedPredicate ) { nPredicateIndex = i; @@ -712,7 +712,7 @@ IMPL_LINK( DlgFilterCrit, ListSelectHdl, ListBox *, pListBox ) if(eColumnSearch == ColumnSearch::FULL) { - for(xub_StrLen i=0;i < comphelper::string::getTokenCount(aSTR_COMPARE_OPERATORS, ';');i++) + for(sal_Int32 i=0;i < comphelper::string::getTokenCount(aSTR_COMPARE_OPERATORS, ';');i++) pComp->InsertEntry(aSTR_COMPARE_OPERATORS.getToken(i, ';')); } else if(eColumnSearch == ColumnSearch::CHAR) @@ -722,7 +722,7 @@ IMPL_LINK( DlgFilterCrit, ListSelectHdl, ListBox *, pListBox ) } else if(eColumnSearch == ColumnSearch::BASIC) { - xub_StrLen i; + sal_Int32 i; for( i = 0; i < 6; i++ ) pComp->InsertEntry(aSTR_COMPARE_OPERATORS.getToken(i, ';')); for(i=8; i < comphelper::string::getTokenCount(aSTR_COMPARE_OPERATORS, ';'); ++i) diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index ef4b72b5a503..1e4895f90748 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -103,7 +103,7 @@ ODatabaseImportExport::ODatabaseImportExport(const ::svx::ODataAccessDescriptor& osl_atomic_increment( &m_refCount ); impl_initFromDescriptor( _aDataDescriptor, false ); - xub_StrLen nCount = comphelper::string::getTokenCount(rExchange, char(11)); + sal_Int32 nCount = comphelper::string::getTokenCount(rExchange, char(11)); if( nCount > SBA_FORMAT_SELECTION_COUNT && !rExchange.getToken(4, ';').isEmpty()) { m_pRowMarker = new sal_Int32[nCount-SBA_FORMAT_SELECTION_COUNT]; @@ -403,11 +403,11 @@ sal_Bool ORTFImportExport::Write() } (*m_pStream) << "{\\fonttbl"; - xub_StrLen nTokenCount = comphelper::string::getTokenCount(aFonts, ';'); - for(sal_uInt32 j=0;j<nTokenCount;++j) + sal_Int32 nTokenCount = comphelper::string::getTokenCount(aFonts, ';'); + for(sal_Int32 j=0; j<nTokenCount; ++j) { (*m_pStream) << "\\f"; - m_pStream->WriteNumber(static_cast<sal_Int32>(j)); + m_pStream->WriteNumber(j); (*m_pStream) << "\\fcharset0\\fnil "; (*m_pStream) << comphelper::string::getToken(aFonts, j, ';').getStr(); (*m_pStream) << ';'; diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 78f5f7e72d48..1b45eac413b2 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -69,7 +69,7 @@ namespace if ( !bAsterix ) { OUString sName = _sFieldName; - xub_StrLen nTokenCount = comphelper::string::getTokenCount(sName, '.'); + sal_Int32 nTokenCount = comphelper::string::getTokenCount(sName, '.'); if ( (nTokenCount == 2 && sName.getToken(1,'.')[0] == '*' ) || (nTokenCount == 3 && sName.getToken(2,'.')[0] == '*' ) ) { @@ -139,9 +139,8 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent ) SetTitleFont(aTitleFont); OUString aTxt(ModuleRes(STR_QUERY_SORTTEXT)); - xub_StrLen nCount = comphelper::string::getTokenCount(aTxt, ';'); - xub_StrLen nIdx = 0; - for (; nIdx < nCount; nIdx++) + sal_Int32 nCount = comphelper::string::getTokenCount(aTxt, ';'); + for (sal_Int32 nIdx = 0; nIdx < nCount; nIdx++) m_pOrderCell->InsertEntry(aTxt.getToken(nIdx, ';')); for(long i=0;i < BROW_ROW_CNT;i++) @@ -202,7 +201,7 @@ void OSelectionBrowseBox::initialize() // We slip in a few optionals one, too. if ( lcl_SupportsCoreSQLGrammar(xConnection) ) { - xub_StrLen nCount = comphelper::string::getTokenCount(m_aFunctionStrings, ';'); + sal_Int32 nCount = comphelper::string::getTokenCount(m_aFunctionStrings, ';'); for (xub_StrLen nIdx = 0; nIdx < nCount; nIdx++) m_pFunctionCell->InsertEntry(m_aFunctionStrings.getToken(nIdx, ';')); } |