diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-04 17:48:27 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-04 17:49:43 +0200 |
commit | 3705cf82121667674b582e9317d972b1ac9d57f4 (patch) | |
tree | 83b3cd6f27560bfaefa46c7ea2decc5eabd12883 /extensions/source | |
parent | a977937927729eaff61bd670fdd45d3508b19371 (diff) |
abpilot: refer embedded data source from doc settings
So that even if the address book data source wizard creates the embedded
data source, next time the document is loaded, we can find it.
Change-Id: Ibb11fa119fb27976437e54bed1d590cfd9863236
Diffstat (limited to 'extensions/source')
-rw-r--r-- | extensions/source/abpilot/datasourcehandling.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx index f3d6268b1e7a..01157758eb27 100644 --- a/extensions/source/abpilot/datasourcehandling.cxx +++ b/extensions/source/abpilot/datasourcehandling.cxx @@ -406,6 +406,12 @@ namespace abp }); xStorable->storeAsURL(sTmpName, aSequence); m_pImpl->sName = sTmpName; + + // 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(pObjectShell->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)); } } } |