Kaydet (Commit) 0240cbf5 authored tarafından Eike Rathke's avatar Eike Rathke

fdo#36109 in INDIRECT() make a non-existing sheet produce an error again

* In lcl_ScAddress_Parse_OOo() don't assume non-existing sheets would be
  external documents if there was no sheet separator. This lead to an
  external reference being created that is only an error if
  dereferenced, not if fed to ISERROR() and the like.
* In ScInterpreter::ScIndirect() push errNoRef instead of
  errInvalidArgument to produce a #REF! error.
üst df6f5c80
......@@ -1017,12 +1017,14 @@ lcl_ScAddress_Parse_OOo( const sal_Unicode* p, ScDocument* pDoc, ScAddress& rAdd
if (!bExtDoc && (!pDoc || !pDoc->GetTable( aTab, nTab )))
{
// Specified table name is not found in this document. Assume this is an external document.
bExtDoc = true;
aDocName = aTab;
xub_StrLen n = aTab.SearchBackward('.');
if (n != STRING_NOTFOUND && n > 0)
{
// Extension found. Strip it.
aTab.Erase(n);
bExtDoc = true;
}
else
// No extension found. This is probably not an external document.
nBits = 0;
......
......@@ -6620,7 +6620,7 @@ void ScInterpreter::ScIndirect()
}
while (false);
PushIllegalArgument();
PushError( errNoRef);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment