basic/source/uno/namecont.cxx | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-)
New commits: commit a05a4a7d546c8ed6d106e7b2d81aac83f87b3b92 Author: Lionel Elie Mamane <[email protected]> Date: Fri Aug 2 23:33:47 2013 +0200 fdo#67685 open xSourceLibrariesStor only when needed else it keeps loadLibrary from completing, because the latter cannot open the storage because it is already open in read/write mode. Change-Id: Icd0aabfff6e67af2c38a8f9185f8485b46ab1516 Reviewed-on: https://gerrit.libreoffice.org/5262 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 4dcf9c4..816a542 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -1877,21 +1877,6 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto DBG_UNHANDLED_EXCEPTION(); return; } - - // open the source storage which might be used to copy yet-unmodified libraries - try - { - if ( mxStorage->hasByName( maLibrariesDir ) || bInplaceStorage ) - { - xSourceLibrariesStor = mxStorage->openStorageElement( maLibrariesDir, - bInplaceStorage ? embed::ElementModes::READWRITE : embed::ElementModes::READ ); - } - } - catch( const uno::Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - return; - } } int iArray = 0; @@ -1991,6 +1976,21 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto // then we need to clean up the temporary storage we used for this if ( bInplaceStorage && !sTempTargetStorName.isEmpty() ) { + // open the source storage which might be used to copy yet-unmodified libraries + try + { + if ( mxStorage->hasByName( maLibrariesDir ) || bInplaceStorage ) + { + xSourceLibrariesStor = mxStorage->openStorageElement( maLibrariesDir, + bInplaceStorage ? embed::ElementModes::READWRITE : embed::ElementModes::READ ); + } + } + catch( const uno::Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + return; + } + SAL_WARN_IF( !xSourceLibrariesStor.is(), "basic", ("SfxLibrariesContainer::storeLibraries_impl: unexpected: we should" _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
