diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-05-21 19:43:46 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-22 10:14:11 -0500 |
commit | adfd7805bc61ff4ec56f6570fc516ff3aad74a28 (patch) | |
tree | a0dbb879557c9640a3643580a4010105ffb8f5af | |
parent | 1926ab7e68be80eb5431a0a11a45e3d5eccf0f50 (diff) |
Revert "fdo#67685 open xSourceLibrariesStor only when needed"
This reverts commit fc9080a0c60f263d00eb71111fcda72b3c0a2ebb.
This bug was apparently introduced by
af34774d260a68fc02cd78ba90dd8d4afaf1a2a4, which will be reverted
in the next commit.
Change-Id: I81ccb5bf9cc7e29fbf1e66d02f38268ee1fd1d0c
(cherry picked from commit 5ca4b9d51046b9b6a36b91c9abd0cc1e7c04b480)
Reviewed-on: https://gerrit.libreoffice.org/9436
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | basic/source/uno/namecont.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 357f2e0c4bed..20e2bb39cb4c 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -1871,6 +1871,21 @@ 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; @@ -1999,21 +2014,6 @@ 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" |