summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@erack.de>2011-08-23 18:34:42 +0200
committerEike Rathke <erack@erack.de>2011-08-23 19:10:31 +0200
commit0240cbf5bad319f82afe8fda9fb9f897e5e33e3d (patch)
treea59286d030df721a8546aa4ab8aef480a8d87e96 /sc
parentdf6f5c8014fe2477f7c3026007593fdc4cb69c8a (diff)
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.
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/address.cxx4
-rw-r--r--sc/source/core/tool/interpr1.cxx2
2 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 20fd586d0516..53def4f9c13f 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -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;
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 73fc350328c0..fdbeb58e20a2 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -6620,7 +6620,7 @@ void ScInterpreter::ScIndirect()
}
while (false);
- PushIllegalArgument();
+ PushError( errNoRef);
}
}
}