[prev in list] [next in list] [prev in thread] [next in thread]
List: libreoffice-commits
Subject: [Libreoffice-commits] core.git: sc/source
From: logerrit () kemper ! freedesktop ! org (Libreoffice Gerrit user)
Date: 2018-11-30 12:33:25
Message-ID: 20181130123325.74F88761D7 () kemper ! freedesktop ! org
[Download RAW message or body]
sc/source/ui/app/inputhdl.cxx | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
New commits:
commit ca8c0452d98c86a61f69f6700d844135944620ac
Author: Mike Kaganski <mike.kaganski@collabora.com>
AuthorDate: Fri Nov 30 11:34:54 2018 +0100
Commit: Mike Kaganski <mike.kaganski@collabora.com>
CommitDate: Fri Nov 30 13:32:55 2018 +0100
tdf#114113: handle quoted sheet names
Change-Id: I569903fc06448fe6ee7f948488319b6b1f1f8fbb
Reviewed-on: https://gerrit.libreoffice.org/64334
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 36af4bd5979c..ab2d53995fd4 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -325,8 +325,24 @@ void ScInputHandler::InitRangeFinder( const OUString& rFormula )
// Text zwischen Trennern
nStart = nPos;
handle_r1c1:
- while ( nPos<nLen && !ScGlobal::UnicodeStrChr( aDelimiters.getStr(), pChar[nPos] ) )
- ++nPos;
+ {
+ bool bSingleQuoted = false;
+ while (nPos < nLen)
+ {
+ // tdf#114113: handle addresses with quoted sheet names like "'Sheet 1'.A1"
+ // Literal single quotes in sheet names are masked by another single quote
+ if (pChar[nPos] == '\'')
+ {
+ bSingleQuoted = !bSingleQuoted;
+ }
+ else if (!bSingleQuoted) // Get everything in single quotes, including separators
+ {
+ if (ScGlobal::UnicodeStrChr(aDelimiters.getStr(), pChar[nPos]))
+ break;
+ }
+ ++nPos;
+ }
+ }
// for R1C1 '-' in R[-]... or C[-]... are not delimiters
// Nothing heroic here to ensure that there are '[]' around a negative
_______________________________________________
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic