diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-04-08 15:21:09 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-04-08 22:12:27 +0200 |
commit | 6e7bfc896e6cb4d91dcecf974f0d9ee41f35b86a (patch) | |
tree | 2e95be58fb60a9250e2f729c44143bb8194b29ee /sc | |
parent | 08557a159bde7dab626f36488c88af94d7da0deb (diff) |
ofz#14129 assert on empty string
Change-Id: I9ef3ef21111b3b853df43b2f84bfd7e5da824682
Reviewed-on: https://gerrit.libreoffice.org/70419
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/data/wks/fail/ofz14129-1.wks | bin | 0 -> 52 bytes | |||
-rw-r--r-- | sc/source/filter/lotus/tool.cxx | 7 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sc/qa/unit/data/wks/fail/ofz14129-1.wks b/sc/qa/unit/data/wks/fail/ofz14129-1.wks Binary files differnew file mode 100644 index 000000000000..016d87e63a86 --- /dev/null +++ b/sc/qa/unit/data/wks/fail/ofz14129-1.wks diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx index dabbd05dcd03..2c0a0f7465e9 100644 --- a/sc/source/filter/lotus/tool.cxx +++ b/sc/source/filter/lotus/tool.cxx @@ -480,9 +480,10 @@ bool RangeNameBufferWK3::FindRel( const OUString& rRef, sal_uInt16& rIndex ) bool RangeNameBufferWK3::FindAbs( const OUString& rRef, sal_uInt16& rIndex ) { - OUString aTmp( rRef ); - aTmp = aTmp.copy(1); - StringHashEntry aRef( aTmp ); // search w/o '$'! + if (rRef.isEmpty()) + return false; + OUString aTmp(rRef.copy(1)); + StringHashEntry aRef(aTmp); // search w/o '$'! std::vector<Entry>::iterator itr = std::find_if(maEntries.begin(), maEntries.end(), [&aRef](const Entry& rEntry) { return aRef == rEntry.aStrHashEntry; }); |