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>
diff --git a/sc/qa/unit/data/wks/fail/ofz14129-1.wks b/sc/qa/unit/data/wks/fail/ofz14129-1.wks
new file mode 100644
index 0000000..016d87e
--- /dev/null
+++ b/sc/qa/unit/data/wks/fail/ofz14129-1.wks
Binary files differ
diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx
index dabbd05..2c0a0f7 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; });