From 3705cf82121667674b582e9317d972b1ac9d57f4 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 4 Jun 2015 17:48:27 +0200 Subject: 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 --- extensions/source/abpilot/datasourcehandling.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'extensions/source') 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 xFactory(pObjectShell->GetModel(), uno::UNO_QUERY); + uno::Reference xPropertySet(xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY); + xPropertySet->setPropertyValue("EmbeddedDatabaseName", uno::makeAny(aStreamRelPath)); } } } -- cgit