Kaydet (Commit) 7295d392 authored tarafından Thomas Arnhold's avatar Thomas Arnhold

fixes

from b0cf3aba

Change-Id: I03a7df23ea9838715304d0359536403af89bcfa3
üst 3cafeddf
......@@ -822,7 +822,7 @@ void ScGlobal::AddQuotes( OUString& rString, sal_Unicode cQuote, bool bEscapeEmb
pQ[0] = pQ[1] = cQuote;
pQ[2] = 0;
rtl::OUString aQuotes( pQ );
rString.replaceAll( OUString(cQuote), aQuotes);
rString = rString.replaceAll( OUString(cQuote), aQuotes);
}
rString = OUString( cQuote ) + OUString( cQuote );
}
......@@ -838,7 +838,7 @@ void ScGlobal::EraseQuotes( OUString& rString, sal_Unicode cQuote, bool bUnescap
pQ[0] = pQ[1] = cQuote;
pQ[2] = 0;
rtl::OUString aQuotes( pQ );
rString.replaceAll( aQuotes, OUString(cQuote));
rString = rString.replaceAll( aQuotes, OUString(cQuote));
}
}
}
......
......@@ -238,7 +238,7 @@ sal_Int32 ScStringUtil::GetQuotedTokenCount(const OUString &rIn, const OUString&
OUString ScStringUtil::GetQuotedToken(const OUString &rIn, sal_Int32 nToken, const OUString& rQuotedPairs,
sal_Unicode cTok, sal_Int32& rIndex )
{
assert( !(rQuotedPairs.Len()%2) );
assert( !(rQuotedPairs.getLength()%2) );
assert( rQuotedPairs.indexOf(cTok) == -1 );
const sal_Unicode* pStr = rIn.getStr();
......
......@@ -955,7 +955,7 @@ void XclImpWebQuery::ReadWqtables( XclImpStream& rStrm )
else
{
ScGlobal::EraseQuotes( aToken, '"', false );
if( aToken.getLength() )
if( !aToken.isEmpty() )
maTables = ScGlobal::addToken( maTables, ScfTools::GetNameFromHTMLName( aToken ), cSep );
}
}
......
......@@ -340,7 +340,7 @@ bool ScfTools::GetHTMLNameFromName( const String& rSource, OUString& rName )
if( CharClass::isAsciiNumeric( aIndex ) && (aIndex.toInt32() > 0) )
rName = aIndex;
}
return rName.getLength() > 0;
return !rName.isEmpty();
}
ScFormatFilterPluginImpl::ScFormatFilterPluginImpl() {}
......
......@@ -283,7 +283,7 @@ bool lclGetStringListFromFormula( OUString& rStringList, const OUString& rFmlaSt
{
OUString aToken( ScStringUtil::GetQuotedToken(rFmlaStr, 0, aQuotes, cFmlaSep, nStringIx ) );
aToken = comphelper::string::strip(aToken, ' ');
if( aToken.getLength() ) // ignore empty tokens, i.e. "a";;"b"
if( !aToken.isEmpty() ) // ignore empty tokens, i.e. "a";;"b"
{
bIsStringList = ScGlobal::IsQuoted( aToken, '"' );
if( bIsStringList )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment