summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox/workbookhelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/oox/workbookhelper.cxx')
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 09c6947c1477..6ab4ecab8450 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -449,8 +449,7 @@ Reference< XDatabaseRange > WorkbookGlobals::createDatabaseRangeObject( OUString
// find an unused name
PropertySet aDocProps( mxDoc );
Reference< XDatabaseRanges > xDatabaseRanges( aDocProps.getAnyProperty( PROP_DatabaseRanges ), UNO_QUERY_THROW );
- Reference< XNameAccess > xNameAccess( xDatabaseRanges, UNO_QUERY_THROW );
- orName = ContainerHelper::getUnusedName( xNameAccess, orName, '_' );
+ orName = ContainerHelper::getUnusedName( xDatabaseRanges, orName, '_' );
// create the database range
xDatabaseRanges->addNewByName( orName, aDestRange );
xDatabaseRange.set( xDatabaseRanges->getByName( orName ), UNO_QUERY );