diff options
-rw-r--r-- | formula/inc/formula/tokenarray.hxx | 1 | ||||
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 7 |
2 files changed, 2 insertions, 6 deletions
diff --git a/formula/inc/formula/tokenarray.hxx b/formula/inc/formula/tokenarray.hxx index 4ea8210251..174e48c481 100644 --- a/formula/inc/formula/tokenarray.hxx +++ b/formula/inc/formula/tokenarray.hxx @@ -138,6 +138,7 @@ public: USHORT GetCodeError() const { return nError; } void SetCodeError( USHORT n ) { nError = n; } short GetRefs() const { return nRefs; } + void IncrementRefs() { ++nRefs; } void SetHyperLink( BOOL bVal ) { bHyperLink = bVal; } BOOL IsHyperLink() const { return bHyperLink; } diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 7ee8d12b69..110cba7d56 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1673,12 +1673,7 @@ void FormulaCompiler::AppendString( rtl::OUStringBuffer& rBuffer, const String & else { String aStr( rStr ); - xub_StrLen nPos = 0; - while ( (nPos = aStr.Search( '"', nPos)) != STRING_NOTFOUND ) - { - aStr.Insert( '"', nPos ); - nPos += 2; - } + aStr.SearchAndReplaceAll( '"', String( RTL_CONSTASCII_USTRINGPARAM( "\"\""))); rBuffer.append(aStr); } rBuffer.append(sal_Unicode('"')); |