summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-08-26 13:06:05 +0200
committerAndras Timar <andras.timar@collabora.com>2015-09-19 21:31:10 +0200
commit751234fbc027010ff64b98db782563038c84b6d8 (patch)
tree7249107562a884b5e0c08639d93dd749c8a2076d /sc
parent54bb2322cc9cc66c3086ef4459f45e8b33b3f064 (diff)
do not parse range fragments as valid ranges
For example, "B2:" or ":B2" were accepted as valid range, with the missing part set to A1, which resulted in a A1:B2 range. An omitted sheet specifier always results in a valid relative sheet, hence that flag is set, so testing flags for non-null before the final result is available isn't sufficient. Change-Id: I57d1b7cf71a298e7ac108b0e13aab88208f0f00c (cherry picked from commit ed6209f572bad38bdb066be668163fe8acf52056) Reviewed-on: https://gerrit.libreoffice.org/18023 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/address.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index fa34c6432293..0920eb9f02e5 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1521,7 +1521,7 @@ static sal_uInt16 lcl_ScRange_Parse_OOo( ScRange& rRange,
nRes2 |= SCA_COL_ABSOLUTE;
}
}
- if (nRes1 && nRes2)
+ if ((nRes1 & SCA_VALID) && (nRes2 & SCA_VALID))
{
// PutInOrder / Justify
sal_uInt16 nMask, nBits1, nBits2;