summaryrefslogtreecommitdiffstats
path: root/sc/source/core/tool/address.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/tool/address.cxx')
-rw-r--r--sc/source/core/tool/address.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index e24a4ff4158e..aff7a6ab21aa 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -377,14 +377,13 @@ const sal_Unicode* ScRange::Parse_XL_Header(
}
++p;
- // 1-based, sequence starts with an empty element.
- if (pExternalLinks && pExternalLinks->getLength() > 1)
+ if (pExternalLinks && pExternalLinks->hasElements())
{
// A numeric "document name" is an index into the sequence.
if (CharClass::isAsciiNumeric( rExternDocName))
{
sal_Int32 i = rExternDocName.ToInt32();
- if (i <= 0 || i >= pExternalLinks->getLength())
+ if (i < 0 || i >= pExternalLinks->getLength())
return start;
const sheet::ExternalLinkInfo & rInfo = (*pExternalLinks)[i];
switch (rInfo.Type)
@@ -400,6 +399,11 @@ const sal_Unicode* ScRange::Parse_XL_Header(
rExternDocName = aStr;
}
break;
+ case sheet::ExternalLinkType::SELF :
+ return start; // ???
+ case sheet::ExternalLinkType::SPECIAL :
+ // silently return nothing (do not assert), caller has to handle this
+ return NULL;
default:
DBG_ERROR2( "ScRange::Parse_XL_Header: unhandled ExternalLinkType %d for index %d",
rInfo.Type, i);