diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-10 14:20:28 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-10 14:46:07 +0200 |
commit | 23c467fd7a1932015ef209f9db49acd167fd713f (patch) | |
tree | c16327da1d4a2acd3be0eb137f829f1d90765d39 /sw | |
parent | 1ee5e1a17cbd50f84990fb43fac7e8c811e604a9 (diff) |
SwDBManager::LoadAndRegisterDataSource: restore lost hunk
Accidently removed in commit f01f31201f9b26b3071ab25f9a5a3a0311ff7423
(SwDBManager: extract StoreEmbeddedDataSource() from registration code,
2015-06-09).
Change-Id: I27e47249b92b8fd19dcd09a1226f5e80184ea8db
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index ccd1372b1c36..6dc0bb4a4cac 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -2611,6 +2611,12 @@ OUString SwDBManager::LoadAndRegisterDataSource(const DBConnURITypes type, const uno::Reference<embed::XStorage> xStorage = pDocShell->GetStorage(); SwDBManager::StoreEmbeddedDataSource(xStore, xStorage, aStreamRelPath, aOwnURL); + + // Refer to the sub-storage name in the document settings, so + // we can load it again next time the file is imported. + uno::Reference<lang::XMultiServiceFactory> xFactory(pDocShell->GetModel(), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xPropertySet(xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY); + xPropertySet->setPropertyValue("EmbeddedDatabaseName", uno::makeAny(aStreamRelPath)); } } xDBContext->registerObject( sFind, xNewInstance ); |