[Libreoffice-commits] core.git: sc/source
Thomas Arnhold
thomas at arnhold.org
Thu Mar 14 17:20:45 PDT 2013
sc/source/core/data/global.cxx | 4 ++--
sc/source/core/tool/stringutil.cxx | 2 +-
sc/source/filter/excel/xicontent.cxx | 2 +-
sc/source/filter/ftools/ftools.cxx | 2 +-
sc/source/ui/dbgui/validate.cxx | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 7295d392ea3908c3a789ec8cf50dd91fc02299bb
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Fri Mar 15 01:20:05 2013 +0100
fixes
from b0cf3aba085373d84a55ef144b273a8a89d017af
Change-Id: I03a7df23ea9838715304d0359536403af89bcfa3
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 52aeae8..2d439ee 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -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));
}
}
}
diff --git a/sc/source/core/tool/stringutil.cxx b/sc/source/core/tool/stringutil.cxx
index e196d65..14ea674 100644
--- a/sc/source/core/tool/stringutil.cxx
+++ b/sc/source/core/tool/stringutil.cxx
@@ -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();
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index fef829b..de6fd13 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -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 );
}
}
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index 569d3a4..5cf7042 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -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() {}
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index e66c5da..d04e361 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -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 )
More information about the Libreoffice-commits
mailing list