summaryrefslogtreecommitdiff
path: root/sc/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter')
-rw-r--r--sc/source/filter/xml/xmlmappingi.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/sc/source/filter/xml/xmlmappingi.cxx b/sc/source/filter/xml/xmlmappingi.cxx
index c40734afc177..c2f8b4004213 100644
--- a/sc/source/filter/xml/xmlmappingi.cxx
+++ b/sc/source/filter/xml/xmlmappingi.cxx
@@ -105,15 +105,11 @@ ScXMLMappingContext::ScXMLMappingContext( ScXMLImport& rImport,
if (!aProvider.isEmpty())
{
ScDocument* pDoc = GetScImport().GetDocument();
- ScDBData* pDBData = pDoc->GetDBCollection()->getNamedDBs().findByUpperName(ScGlobal::pCharClass->uppercase(aDBName));
- if (pDBData)
- {
- auto& rDataMapper = pDoc->GetExternalDataMapper();
- sc::ExternalDataSource aSource(aURL, aProvider, pDoc);
- aSource.setID(aID);
- aSource.setDBData(pDBData);
- rDataMapper.insertDataSource(aSource);
- }
+ auto& rDataMapper = pDoc->GetExternalDataMapper();
+ sc::ExternalDataSource aSource(aURL, aProvider, pDoc);
+ aSource.setID(aID);
+ aSource.setDBData(aDBName);
+ rDataMapper.insertDataSource(aSource);
}
}