summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2022-09-06 13:48:29 +0200
committerEike Rathke <erack@redhat.com>2022-09-06 15:40:59 +0200
commit64f673238cf9b645a751e8f8137ca14e595a779a (patch)
tree0b853fa52978a2b853234fad471b18720fc9523f /formula
parent9a193c81f735771796a347cb4d545b8d277c0625 (diff)
A ColRowName (label) is a QuotedLabel is a SingleQuoted
Hence a ' is not escaped by \' but by '' doubling it. See also ODFF 5.10 Quoted Label https://docs.oasis-open.org/office/OpenDocument/v1.3/os/part4-formula/OpenDocument-v1.3-os-part4-formula.html#__RefHeading__1017950_715980110 Apparently this was always wrong and even stored in files and never correctly read/compiled back. Change-Id: I94bdb7d1fdffe9bbd77cf443883dd76637be981b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139491 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'formula')
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index 3f41b2196bcf..6684fd17da47 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1203,7 +1203,7 @@ bool FormulaCompiler::DeQuote( OUString& rStr )
if ( nLen > 1 && rStr[0] == '\'' && rStr[ nLen-1 ] == '\'' )
{
rStr = rStr.copy( 1, nLen-2 );
- rStr = rStr.replaceAll( "\\\'", "\'" );
+ rStr = rStr.replaceAll( "''", "'" );
return true;
}
return false;