sfx2/source/doc/objstor.cxx | 3 +-- sw/source/uibase/dbui/dbmgr.cxx | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-)
New commits: commit 4897f10beab678494a7c2dfdc140c424154e9f8c Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Wed Jun 10 14:22:26 2015 +0200 SfxObjectShell::CopyStoragesOfUnknownMediaType: still try to copy Base streams When Base is embedded in a Writer document, we still need this when the document is saved for the first time after embedding. Change-Id: I1103da01838abd4ac1b03dc4d44e10db3ce650bc diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 826d024..2c16494 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -3484,12 +3484,11 @@ bool SfxObjectShell::CopyStoragesOfUnknownMediaType( const uno::Reference< embed case SotClipboardFormatId::STARCALC_8: case SotClipboardFormatId::STARCHART_8: case SotClipboardFormatId::STARMATH_8: - case SotClipboardFormatId::STARBASE_8: break; default: { - OSL_ENSURE( aSubElements[nInd] == "Configurations2" || !xTarget->hasByName( aSubElements[nInd] ), + OSL_ENSURE( aSubElements[nInd] == "Configurations2" || nFormat == SotClipboardFormatId::STARBASE_8 || !xTarget->hasByName( aSubElements[nInd] ), "The target storage is an output storage, the element should not exist in the target!\n" ); if ( !xTarget->hasByName( aSubElements[nInd] ) ) commit 23c467fd7a1932015ef209f9db49acd167fd713f Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Wed Jun 10 14:20:28 2015 +0200 SwDBManager::LoadAndRegisterDataSource: restore lost hunk Accidently removed in commit f01f31201f9b26b3071ab25f9a5a3a0311ff7423 (SwDBManager: extract StoreEmbeddedDataSource() from registration code, 2015-06-09). Change-Id: I27e47249b92b8fd19dcd09a1226f5e80184ea8db diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index ccd1372..6dc0bb4 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 ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits