diff options
author | elixir <prashant3.yishu@gmail.com> | 2013-03-07 19:35:49 +0530 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-03-11 15:50:44 +0000 |
commit | 7d1f4cdec307bb1e761bb5dd3d8231bba5833e10 (patch) | |
tree | 106a20fe24e8935e9b4943f17dad49dba67aa013 /sw | |
parent | c9d7427707ca36f60079833f53efd435202fe231 (diff) |
fdo#38838: Converting String/UniString to OUString
Change-Id: If64db96005fcd8a42e4fa24041867b99183965f9
Reviewed-on: https://gerrit.libreoffice.org/2586
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'sw')
27 files changed, 73 insertions, 72 deletions
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index d70655729706..2e4ae8187393 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -598,9 +598,9 @@ static sal_uInt16 lcl_FindOutlineNum( const SwNodes& rNds, String& rName ) // ([Number]+\.)+ (as a regular expression!) // (Number follwed by a period, with 5 repetitions) // i.e.: "1.1.", "1.", "1.1.1." - xub_StrLen nPos = 0; + sal_Int32 nPos = 0; String sNum = rName.GetToken( 0, '.', nPos ); - if( STRING_NOTFOUND == nPos ) + if( -1 == nPos ) return USHRT_MAX; // invalid number! sal_uInt16 nLevelVal[ MAXLEVEL ]; // numbers of all levels @@ -608,7 +608,7 @@ static sal_uInt16 lcl_FindOutlineNum( const SwNodes& rNds, String& rName ) sal_uInt8 nLevel = 0; String sName( rName ); - while( STRING_NOTFOUND != nPos ) + while( -1 != nPos ) { sal_uInt16 nVal = 0; sal_Unicode c; @@ -630,7 +630,7 @@ static sal_uInt16 lcl_FindOutlineNum( const SwNodes& rNds, String& rName ) sNum = sName.GetToken( 0, '.', nPos ); // #i4533# without this check all parts delimited by a dot are treated as outline numbers if(!comphelper::string::isdigitAsciiString(sNum)) - nPos = STRING_NOTFOUND; + nPos = -1; } rName = sName; // that's the follow-up text @@ -643,7 +643,7 @@ static sal_uInt16 lcl_FindOutlineNum( const SwNodes& rNds, String& rName ) SwTxtNode* pNd; nPos = 0; // search in the existing outline nodes for the required outline num array - for( ; nPos < rOutlNds.size(); ++nPos ) + for( ; nPos < (sal_Int32) rOutlNds.size(); ++nPos ) { pNd = rOutlNds[ nPos ]->GetTxtNode(); const int nLvl = pNd->GetAttrOutlineLevel()-1; //<-end,zhaojianwei @@ -679,7 +679,7 @@ static sal_uInt16 lcl_FindOutlineNum( const SwNodes& rNds, String& rName ) } } } - if( nPos >= rOutlNds.size() ) + if( nPos >= (sal_Int32) rOutlNds.size() ) nPos = USHRT_MAX; return nPos; } @@ -710,10 +710,10 @@ bool SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const //#i4533# leading numbers followed by a dot have been remove while //searching for the outline position //to compensate this they must be removed from the paragraphs text content, too - sal_uInt16 nPos = 0; + sal_Int32 nPos = 0; String sTempNum; while(sExpandedText.Len() && (sTempNum = sExpandedText.GetToken(0, '.', nPos)).Len() && - STRING_NOTFOUND != nPos && + -1 != nPos && comphelper::string::isdigitAsciiString(sTempNum)) { sExpandedText.Erase(0, nPos); diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index 8737885e0385..598547f6abfb 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -382,7 +382,7 @@ void SwEditShell::ApplyAutoMark() { String sLine(rtl::OStringToOUString(aRdLine, eChrSet)); - xub_StrLen nTokenPos = 0; + sal_Int32 nTokenPos = 0; String sToSelect( sLine.GetToken(0, ';', nTokenPos ) ); if( sToSelect.Len() ) { diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 5cb84001fabe..5a2e88a3e3f0 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -1339,13 +1339,13 @@ SwHiddenTxtField::SwHiddenTxtField( SwHiddenTxtFieldType* pFldType, { if(nSubType == TYP_CONDTXTFLD) { - sal_uInt16 nPos = 0; + sal_Int32 nPos = 0; aTRUETxt = rStr.GetToken(0, '|', nPos); - if(nPos != STRING_NOTFOUND) + if(nPos != -1) { aFALSETxt = rStr.GetToken(0, '|', nPos); - if(nPos != STRING_NOTFOUND) + if(nPos != -1) { aContent = rStr.GetToken(0, '|', nPos); bValid = sal_True; @@ -1507,7 +1507,7 @@ void SwHiddenTxtField::SetPar2(const rtl::OUString& rStr) if (nSubType == TYP_CONDTXTFLD) { sal_Int32 nPos = rStr.indexOf('|'); - if (nPos == STRING_NOTFOUND) + if (nPos == -1) aTRUETxt = rStr; else { diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 77af7de971df..4407919bb519 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -722,7 +722,7 @@ bool SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, sal_uInt16* pP ) const //#59900# Die Sortierung soll die Nummer korrekt einordnen //also "10" nach "9" und nicht "10" nach "1" const String& rTmp2 = rNew.sDlgEntry; - xub_StrLen nFndPos2 = 0; + sal_Int32 nFndPos2 = 0; String sNum2( rTmp2.GetToken( 0, ' ', nFndPos2 )); sal_Bool bIsNum2IsNumeric = rCC.isAsciiNumeric( sNum2 ); sal_Int32 nNum2 = bIsNum2IsNumeric ? sNum2.ToInt32() : 0; @@ -735,7 +735,7 @@ bool SwSeqFldList::SeekEntry( const _SeqFldLstElem& rNew, sal_uInt16* pP ) const //#59900# Die Sortierung soll die Nummer korrekt einordnen //also "10" nach "9" und nicht "10" nach "1" const String& rTmp1 = maData[nM]->sDlgEntry; - xub_StrLen nFndPos1 = 0; + sal_Int32 nFndPos1 = 0; String sNum1( rTmp1.GetToken( 0, ' ', nFndPos1 )); sal_Int32 nCmp; diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index a55543002089..b30c26d93aeb 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -614,7 +614,7 @@ void SwGrfNode::InsertLink( const String& rGrfName, const String& rFltName ) refLink->SetVisible( pIDLA->IsVisibleLinks() ); if( rFltName.EqualsAscii( "DDE" )) { - sal_uInt16 nTmp = 0; + sal_Int32 nTmp = 0; String sApp, sTopic, sItem; sApp = rGrfName.GetToken( 0, sfx2::cTokenSeperator, nTmp ); sTopic = rGrfName.GetToken( 0, sfx2::cTokenSeperator, nTmp ); diff --git a/sw/source/core/swg/SwXMLBlockExport.cxx b/sw/source/core/swg/SwXMLBlockExport.cxx index 9239474f68bc..d35b5cf40323 100644 --- a/sw/source/core/swg/SwXMLBlockExport.cxx +++ b/sw/source/core/swg/SwXMLBlockExport.cxx @@ -121,13 +121,13 @@ sal_uInt32 SwXMLTextBlockExport::exportDoc(const String &rText) { SvXMLElementExport aBody (*this, XML_NAMESPACE_OFFICE, XML_BODY, sal_True, sal_True); { - xub_StrLen nPos = 0; + sal_Int32 nPos = 0; do { String sTemp ( rText.GetToken( 0, '\015', nPos ) ); SvXMLElementExport aPara (*this, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False); GetDocHandler()->characters(sTemp); - } while (STRING_NOTFOUND != nPos ); + } while (-1 != nPos ); } } diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx b/sw/source/core/swg/SwXMLTextBlocks.cxx index 98f9eb130273..f8759ae859f7 100644 --- a/sw/source/core/swg/SwXMLTextBlocks.cxx +++ b/sw/source/core/swg/SwXMLTextBlocks.cxx @@ -595,7 +595,7 @@ void SwXMLTextBlocks::MakeBlockText( const String& rText ) if( pTxtNode->GetTxtColl() == pDoc->GetDfltTxtFmtColl() ) pTxtNode->ChgFmtColl( pDoc->GetTxtCollFromPool( RES_POOLCOLL_STANDARD )); - xub_StrLen nPos = 0; + sal_Int32 nPos = 0; do { if ( nPos ) @@ -605,7 +605,7 @@ void SwXMLTextBlocks::MakeBlockText( const String& rText ) SwIndex aIdx( pTxtNode ); String sTemp(rText.GetToken( 0, '\015', nPos ) ); pTxtNode->InsertText( sTemp, aIdx ); - } while ( STRING_NOTFOUND != nPos ); + } while ( -1 != nPos ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 3af6dfc5c5e1..2ec74e74015a 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -2471,7 +2471,7 @@ static sal_uInt16 lcl_GetIdByName( String& rName, String& rTypeName ) rName.Erase(0, 30); sal_uInt16 nResId = USHRT_MAX; - xub_StrLen nFound = 0; + sal_Int32 nFound = 0; rTypeName = rName.GetToken( 0, '.', nFound ); if(rTypeName.EqualsAscii("User")) nResId = RES_USERFLD; diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index 51bce34ebad7..243774fd8695 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -602,7 +602,7 @@ String NameFromCharSet(rtl_TextEncoding nChrSet) void SwAsciiOptions::ReadUserData( const String& rStr ) { - xub_StrLen nToken = 0; + sal_Int32 nToken = 0; sal_uInt16 nCnt = 0; String sToken; do { @@ -630,7 +630,7 @@ void SwAsciiOptions::ReadUserData( const String& rStr ) } } ++nCnt; - } while( STRING_NOTFOUND != nToken ); + } while( -1 != nToken ); } void SwAsciiOptions::WriteUserData( String& rStr ) diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 8dca8b746394..561fc483cd45 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -1170,8 +1170,8 @@ void SwHTMLWriter::PrepareFontList( const SvxFontItem& rFontItem, sal_Bool bContainsKeyword = sal_False; if( rName.Len() ) { - xub_StrLen nStrPos = 0; - while( nStrPos != STRING_NOTFOUND ) + sal_Int32 nStrPos = 0; + while( nStrPos != -1 ) { String aName = rName.GetToken( 0, ';', nStrPos ); aName = comphelper::string::strip(aName, ' '); diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index f03b7614ae97..41d488ed39ef 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -826,10 +826,10 @@ static void lcl_html_setEvents( for( i=0; i< rUnoMacroTbl.size(); i++ ) { const String& rStr(rUnoMacroTbl[i]); - xub_StrLen nIndex = 0; - if( !rStr.GetToken( 0, '-', nIndex ).Len() || STRING_NOTFOUND == nIndex ) + sal_Int32 nIndex = 0; + if( !rStr.GetToken( 0, '-', nIndex ).Len() || -1 == nIndex ) continue; - if( !rStr.GetToken( 0, '-', nIndex ).Len() || STRING_NOTFOUND == nIndex ) + if( !rStr.GetToken( 0, '-', nIndex ).Len() || -1 == nIndex ) continue; if( nIndex < rStr.Len() ) nEvents++; @@ -859,13 +859,13 @@ static void lcl_html_setEvents( for( i=0; i< rUnoMacroTbl.size(); ++i ) { const String& rStr = rUnoMacroTbl[i]; - xub_StrLen nIndex = 0; + sal_Int32 nIndex = 0; String sListener( rStr.GetToken( 0, '-', nIndex ) ); - if( !sListener.Len() || STRING_NOTFOUND == nIndex ) + if( !sListener.Len() || -1 == nIndex ) continue; String sMethod( rStr.GetToken( 0, '-', nIndex ) ); - if( !sMethod.Len() || STRING_NOTFOUND == nIndex ) + if( !sMethod.Len() || -1 == nIndex ) continue; String sCode( rStr.Copy( nIndex ) ); diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx index 3be35bdaaf6e..2973f6144cf4 100644 --- a/sw/source/filter/html/htmlforw.cxx +++ b/sw/source/filter/html/htmlforw.cxx @@ -1301,8 +1301,8 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt, if( sVal.Len() ) { sVal = convertLineEnd(sVal, LINEEND_LF); - xub_StrLen nPos = 0; - while ( nPos != STRING_NOTFOUND ) + sal_Int32 nPos = 0; + while ( nPos != -1 ) { if( nPos ) rWrt.Strm() << SwHTMLWriter::sNewLine; diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 48113a6a02cb..9d8d8db2f6a3 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -3771,8 +3771,8 @@ void SwHTMLParser::NewFontAttr( int nToken ) } sal_Bool bFound = sal_False; - xub_StrLen nStrPos = 0; - while( nStrPos!=STRING_NOTFOUND ) + sal_Int32 nStrPos = 0; + while( nStrPos!= -1 ) { String aFName = aFace.GetToken( 0, ',', nStrPos ); aFName = comphelper::string::strip(aFName, ' '); diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 8e7084522367..31f6d89dca34 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -633,7 +633,7 @@ namespace sw bool IsStarSymbol(const rtl::OUString &rFontName) { - xub_StrLen nIndex = 0; + sal_Int32 nIndex = 0; rtl::OUString sFamilyNm(GetNextFontToken(rFontName, nIndex)); return (sFamilyNm.equalsIgnoreAsciiCase("starsymbol") || sFamilyNm.equalsIgnoreAsciiCase("opensymbol")); diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx index b4afcffff739..f5e1f530c31f 100644 --- a/sw/source/filter/ww8/writerwordglue.cxx +++ b/sw/source/filter/ww8/writerwordglue.cxx @@ -453,10 +453,10 @@ namespace sw FontMapExport::FontMapExport(const String &rFamilyName) { - xub_StrLen nIndex = 0; + sal_Int32 nIndex = 0; msPrimary = GetNextFontToken(rFamilyName, nIndex); msSecondary = myImplHelpers::FindBestMSSubstituteFont(msPrimary); - if (!msSecondary.Len() && nIndex != STRING_NOTFOUND) + if (!msSecondary.Len() && nIndex != -1) msSecondary = GetNextFontToken(rFamilyName, nIndex); } @@ -735,14 +735,14 @@ namespace sw SwapQuotesInField(rParams); // Force to Japanese when finding one of 'geaE' - rtl::OUString sJChars( "geE" ); + OUString sJChars( "geE" ); bool bForceJapanese = ( STRING_NOTFOUND != rParams.SearchChar( sJChars.getStr() ) ); if ( bForceJapanese ) { - rParams.SearchAndReplaceAll( rtl::OUString( "ee" ), - rtl::OUString( "yyyy" ) ); - rParams.SearchAndReplaceAll( rtl::OUString( "EE" ), - rtl::OUString( "YYYY" ) ); + rParams.SearchAndReplaceAll( OUString( "ee" ), + OUString( "yyyy" ) ); + rParams.SearchAndReplaceAll( OUString( "EE" ), + OUString( "YYYY" ) ); } if (LANGUAGE_FRENCH != nDocLang) { diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index baeb447a65d8..4f9161fd7685 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -2194,8 +2194,8 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) const String& rStyles = pTOX->GetStyleNames( n ); if( rStyles.Len() ) { - xub_StrLen nPos = 0; - String sLvl = rtl::OUString(','); + sal_Int32 nPos = 0; + String sLvl = OUString(','); sLvl += OUString::number( n + 1 ); do { String sStyle( rStyles.GetToken( 0, @@ -2210,7 +2210,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) ( sTOption += sStyle ) += sLvl; } } - } while( STRING_NOTFOUND != nPos ); + } while( -1 != nPos ); } } @@ -2382,7 +2382,7 @@ void WW8Export::WritePostItBegin( ww::bytes* pOut ) String FieldString(ww::eField eIndex) { - String sRet(rtl::OUString(" ")); + String sRet(OUString(" ")); if (const char *pField = ww::GetEnglishFieldName(eIndex)) sRet.InsertAscii(pField, 1); return sRet; @@ -2653,7 +2653,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) case DI_CUSTOM: eFld = ww::eDOCPROPERTY; { - rtl::OUString sQuotes('\"'); + OUString sQuotes('\"'); const SwDocInfoField * pDocInfoField = dynamic_cast<const SwDocInfoField *> (pFld); diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 0760c96021fa..97a6641b2c31 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -282,9 +282,9 @@ bool WW8ReadFieldParams::GetTokenSttFromTo(sal_uInt16* pFrom, sal_uInt16* pTo, s String sParams( GetResult() ); - xub_StrLen nIndex = 0; + sal_Int32 nIndex = 0; String sStart( sParams.GetToken(0, '-', nIndex) ); - if( STRING_NOTFOUND != nIndex ) + if( -1 != nIndex ) { nStart = static_cast<sal_uInt16>(sStart.ToInt32()); nEnd = static_cast<sal_uInt16>(sParams.Copy(nIndex).ToInt32()); @@ -2824,17 +2824,17 @@ static void lcl_toxMatchTSwitch(SwWW8ImplReader& rReader, SwTOXBase& rBase, String sParams( rParam.GetResult() ); if( sParams.Len() ) { - xub_StrLen nIndex = 0; + sal_Int32 nIndex = 0; // Delimiters between styles and style levels appears to allow both ; and , String sTemplate( sParams.GetToken(0, ';', nIndex) ); - if( STRING_NOTFOUND == nIndex ) + if( -1 == nIndex ) { nIndex=0; sTemplate = sParams.GetToken(0, ',', nIndex); } - if( STRING_NOTFOUND == nIndex ) + if( -1 == nIndex ) { const SwFmt* pStyle = rReader.GetStyleWithOrgWWName(sTemplate); if( pStyle ) @@ -2842,12 +2842,12 @@ static void lcl_toxMatchTSwitch(SwWW8ImplReader& rReader, SwTOXBase& rBase, // Store Style for Level 0 into TOXBase rBase.SetStyleNames( sTemplate, 0 ); } - else while( STRING_NOTFOUND != nIndex ) + else while( -1 != nIndex ) { - xub_StrLen nOldIndex=nIndex; + sal_Int32 nOldIndex=nIndex; sal_uInt16 nLevel = static_cast<sal_uInt16>( sParams.GetToken(0, ';', nIndex).ToInt32()); - if( STRING_NOTFOUND == nIndex ) + if( -1 == nIndex ) { nIndex = nOldIndex; nLevel = static_cast<sal_uInt16>( @@ -2873,7 +2873,7 @@ static void lcl_toxMatchTSwitch(SwWW8ImplReader& rReader, SwTOXBase& rBase, // read next style name... nOldIndex = nIndex; sTemplate = sParams.GetToken(0, ';', nIndex); - if( STRING_NOTFOUND == nIndex ) + if( -1 == nIndex ) { nIndex=nOldIndex; sTemplate = sParams.GetToken(0, ',', nIndex); diff --git a/sw/source/ui/app/appenv.cxx b/sw/source/ui/app/appenv.cxx index fb1da4355e40..3b47034110ec 100644 --- a/sw/source/ui/app/appenv.cxx +++ b/sw/source/ui/app/appenv.cxx @@ -78,8 +78,8 @@ String InsertLabEnvText( SwWrtShell& rSh, SwFldMgr& rFldMgr, const String& rText String sRet; String aText(comphelper::string::remove(rText, '\r')); - sal_uInt16 nTokenPos = 0; - while( STRING_NOTFOUND != nTokenPos ) + sal_Int32 nTokenPos = 0; + while( -1 != nTokenPos ) { String aLine = aText.GetToken( 0, '\n', nTokenPos ); while ( aLine.Len() ) diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index f7f853273e8d..ad83d23c4540 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -404,7 +404,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog( { //header line xub_StrLen nHeaders = comphelper::string::getTokenCount(sLine, '\t'); - xub_StrLen nIndex = 0; + sal_Int32 nIndex = 0; for( xub_StrLen nToken = 0; nToken < nHeaders; ++nToken) { String sHeader = sLine.GetToken( 0, '\t', nIndex ); @@ -422,7 +422,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog( ::std::vector<OUString> aNewData; //analyze data line xub_StrLen nDataCount = comphelper::string::getTokenCount(sLine, '\t'); - xub_StrLen nIndex = 0; + sal_Int32 nIndex = 0; for( xub_StrLen nToken = 0; nToken < nDataCount; ++nToken) { String sData = sLine.GetToken( 0, '\t', nIndex ); diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 9c6cc3e38b7d..4a89b6eaab10 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -1770,7 +1770,7 @@ void SwInsertDBColAutoPilot::Load() pNewData->aDBColumns.insert(pInsDBColumn); } - sal_uInt16 n = 0; + sal_Int32 n = 0; String sTmp( pNewData->sTblList ); if( sTmp.Len() ) { @@ -1826,7 +1826,7 @@ void SwInsertDBColAutoPilot::Load() // now copy the user defined Numberformat strings to the // Shell. Then only these are available as ID - for( n = 0; n < aDBColumns.size() ; ++n ) + for( n = 0; n < (sal_Int32) aDBColumns.size() ; ++n ) { SwInsDBColumn& rSet = *aDBColumns[ n ]; for( sal_uInt16 m = 0; m < pNewData->aDBColumns.size() ; ++m ) diff --git a/sw/source/ui/dbui/mailmergechildwindow.cxx b/sw/source/ui/dbui/mailmergechildwindow.cxx index 95b494a264d8..31772621f6ad 100644 --- a/sw/source/ui/dbui/mailmergechildwindow.cxx +++ b/sw/source/ui/dbui/mailmergechildwindow.cxx @@ -589,7 +589,7 @@ void SwSendMailDialog::IterateMails() { String sTokens( pCurrentMailDescriptor->sCC ); sal_uInt16 nTokens = comphelper::string::getTokenCount(sTokens, ';'); - xub_StrLen nPos = 0; + sal_Int32 nPos = 0; for( sal_uInt16 nToken = 0; nToken < nTokens; ++nToken) { String sTmp = sTokens.GetToken( 0, ';', nPos); @@ -601,7 +601,7 @@ void SwSendMailDialog::IterateMails() { String sTokens( pCurrentMailDescriptor->sBCC ); sal_uInt16 nTokens = comphelper::string::getTokenCount(sTokens, ';'); - xub_StrLen nPos = 0; + sal_Int32 nPos = 0; for( sal_uInt16 nToken = 0; nToken < nTokens; ++nToken) { String sTmp = sTokens.GetToken( 0, ';', nPos); diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx index c0ed4f21e054..d7760d8fc150 100644 --- a/sw/source/ui/envelp/envimg.cxx +++ b/sw/source/ui/envelp/envimg.cxx @@ -55,7 +55,8 @@ SW_DLLPUBLIC String MakeSender() String sRet; String sSenderToken(SW_RES(STR_SENDER_TOKENS)); - xub_StrLen nSttPos = 0, nTokenCount = comphelper::string::getTokenCount(sSenderToken, ';'); + xub_StrLen nTokenCount = comphelper::string::getTokenCount(sSenderToken, ';'); + sal_Int32 nSttPos = 0; bool bLastLength = true; for( xub_StrLen i = 0; i < nTokenCount; i++ ) { diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index 3b7279aecd54..86fe43d574ea 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -615,9 +615,9 @@ String SwFldFuncPage::TurnMacroString(const String &rMacro) { // reverse content of aName String sTmp, sBuf; - sal_uInt16 nPos = 0; + sal_Int32 nPos = 0; - for (sal_uInt16 i = 0; i < 4 && nPos != STRING_NOTFOUND; i++) + for (sal_uInt16 i = 0; i < 4 && nPos != -1; i++) { if (i == 3) sTmp = rMacro.Copy(nPos); diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx index 7053a41221c0..13d3cc2eeaf2 100644 --- a/sw/source/ui/fldui/fldpage.cxx +++ b/sw/source/ui/fldui/fldpage.cxx @@ -200,7 +200,7 @@ sal_Bool SwFldPage::InsertFld(sal_uInt16 nTypeId, sal_uInt16 nSubType, const Str case TYP_DBNUMSETFLD: case TYP_DBSETNUMBERFLD: { - xub_StrLen nPos = 0; + sal_Int32 nPos = 0; SwDBData aData; aData.sDataSource = rPar1.GetToken(0, DB_DELIM, nPos); diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 9546729c6add..7d516a3f4fde 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -4068,7 +4068,7 @@ void SwEntryBrowseBox::ReadEntries(SvStream& rInStr) if( !pToInsert ) pToInsert = new AutoMarkEntry; - sal_uInt16 nSttPos = 0; + sal_Int32 nSttPos = 0; pToInsert->sSearch = sLine.GetToken(0, ';', nSttPos ); pToInsert->sAlternative = sLine.GetToken(0, ';', nSttPos ); pToInsert->sPrimKey = sLine.GetToken(0, ';', nSttPos ); diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 431278b31e05..1795eca83e01 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -1162,7 +1162,7 @@ void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse ) SET_CURR_SHELL(pWrtShell); - sal_uInt16 nPos = 0; + sal_Int32 nPos = 0; // Nein, es ist *keine* gute Idee GetToken gleich im Point-Konstr. // aufzurufen, denn welcher Parameter wird zuerst ausgewertet? diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index e89cb631b188..13ec0b791020 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -3104,7 +3104,7 @@ sal_Bool NaviContentBookmark::Paste( TransferableDataHelper& rData ) sal_Bool bRet = rData.GetString( SOT_FORMATSTR_ID_SONLK, sStr ); if( bRet ) { - xub_StrLen nPos = 0; + sal_Int32 nPos = 0; aUrl = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ); aDescr = sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ); nDefDrag= (sal_uInt16)sStr.GetToken(0, NAVI_BOOKMARK_DELIM, nPos ).ToInt32(); |