summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-06-25 20:06:47 +0200
committerAndras Timar <andras.timar@collabora.com>2015-06-30 18:51:05 +0200
commit220697fe51c5bcb759b4d9bc4493dda8d268fbe5 (patch)
tree8f78bf0dbd7a8a175792665515e77dde829c2181 /sc
parent97efbf26805a24555b15beb9d6292f23715550c3 (diff)
a singleton must be fully parsed to be valid, tdf#44419 related
No trailing characters must be present in 1:1 or A:A full row/column references, e.g. 2:2,2 is not valid. The original cause is the lexical analyzer that accepted 2,2 as the second part after the range operator because ',' is also the group separator here, which needs further changes. Change-Id: Iff354469f7dcb4e0b6fa645c39cc1f8ebad4a6ea (cherry picked from commit c48af2b55a60492565b987ee65d98edc6bd94533) Reviewed-on: https://gerrit.libreoffice.org/16490 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.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 06e49b78dc34..cbae8d71d7d4 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -917,7 +917,7 @@ static sal_uInt16 lcl_ScRange_Parse_XL_A1( ScRange& r,
tmp1 = lcl_eatWhiteSpace( tmp1 );
tmp2 = lcl_a1_get_row( tmp1, &r.aEnd, &nFlags2 );
- if( !tmp2 )
+ if( !tmp2 || *tmp2 != 0 ) // Must have fully parsed a singleton.
return 0;
r.aStart.SetCol( 0 ); r.aEnd.SetCol( MAXCOL );
@@ -940,7 +940,7 @@ static sal_uInt16 lcl_ScRange_Parse_XL_A1( ScRange& r,
tmp1 = lcl_eatWhiteSpace( tmp1 );
tmp2 = lcl_a1_get_col( tmp1, &r.aEnd, &nFlags2 );
- if( !tmp2 )
+ if( !tmp2 || *tmp2 != 0 ) // Must have fully parsed a singleton.
return 0;
r.aStart.SetRow( 0 ); r.aEnd.SetRow( MAXROW );