diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-07-13 20:12:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-14 14:04:03 +0100 |
commit | 82937ce3d7bc2382c4da22365d1245c9f7db178c (patch) | |
tree | dbae8b3a02a1b0f21326ba2d5da41cf946d48962 /sc | |
parent | 46894ec48eb33dc99dab807c9fcaf0caa7c6cd84 (diff) |
String::SearchAndReplaceAllAscii -> OUString::replaceAll
Change-Id: I5091835c9f71c712f15996e5c6263fc5f21f6f96
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index ca104245b3f7..3c64b816f229 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -633,14 +633,15 @@ static bool lcl_parseExternalName( return true; } -static String lcl_makeExternalNameStr( const String& rFile, const String& rName, +static OUString lcl_makeExternalNameStr(const OUString& rFile, const OUString& rName, const sal_Unicode cSep, bool bODF ) { - String aFile( rFile), aName( rName), aEscQuote( "''"); - aFile.SearchAndReplaceAllAscii( "'", aEscQuote); + OUString aEscQuote("''"); + OUString aFile(rFile.replaceAll("'", aEscQuote)); + OUString aName(rName); if (bODF) - aName.SearchAndReplaceAllAscii( "'", aEscQuote); - OUStringBuffer aBuf( aFile.Len() + aName.Len() + 9); + aName = aName.replaceAll("'", aEscQuote); + OUStringBuffer aBuf(aFile.getLength() + aName.getLength() + 9); if (bODF) aBuf.append( sal_Unicode( '[')); aBuf.append( sal_Unicode( '\'')); @@ -652,7 +653,7 @@ static String lcl_makeExternalNameStr( const String& rFile, const String& rName, aBuf.append( aName); if (bODF) aBuf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "']")); - return String( aBuf.makeStringAndClear()); + return aBuf.makeStringAndClear(); } static bool lcl_getLastTabName( OUString& rTabName2, const OUString& rTabName1, @@ -879,7 +880,7 @@ struct ConventionOOO_A1 : public Convention_A1 { if (bDisplayTabName) { - String aFile; + OUString aFile; const OUString* p = pRefMgr->getExternalFileName(nFileId); if (p) { @@ -888,10 +889,9 @@ struct ConventionOOO_A1 : public Convention_A1 else aFile = INetURLObject::decode(*p, INET_HEX_ESCAPE, INetURLObject::DECODE_UNAMBIGUOUS); } - aFile.SearchAndReplaceAllAscii("'", OUString("''")); rBuffer.append(sal_Unicode('\'')); - rBuffer.append(aFile); + rBuffer.append(aFile.replaceAll("'", "''")); rBuffer.append(sal_Unicode('\'')); rBuffer.append(sal_Unicode('#')); |