summaryrefslogtreecommitdiffstats
path: root/sc/source/filter/oox/workbookhelper.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-06-07 03:56:56 +0200
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-06-07 04:48:17 +0200
commit86f8772131a0588f3bfa4f09cc03746a2afe8cc8 (patch)
treede9b22609604ac3714f0bd4ba447fae243dbb097 /sc/source/filter/oox/workbookhelper.cxx
parentmake sure all objects exist, related fdo#75692 (diff)
downloadcore-86f8772131a0588f3bfa4f09cc03746a2afe8cc8.tar.gz
core-86f8772131a0588f3bfa4f09cc03746a2afe8cc8.zip
don't try to import invalid document, fdo#79135
Change-Id: I3b601d629550078a8fa353bf838619f8d7b34718
Diffstat (limited to 'sc/source/filter/oox/workbookhelper.cxx')
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 4648c25d59e7..f59c4781bffa 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -433,6 +433,8 @@ ScRangeData* WorkbookGlobals::createLocalNamedRangeObject(
{
ScDocument& rDoc = getScDocument();
ScRangeName* pNames = rDoc.GetRangeName( nTab );
+ if(!pNames)
+ throw RuntimeException("invalid sheet index used");
// find an unused name
orName = findUnusedName( pNames, orName );
// create the named range