diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-05-21 19:43:46 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-06-02 19:01:52 +0200 |
commit | dfe2b71125460f862e77ee17ac239ee72778ea74 (patch) | |
tree | 6d5e8e1c5cdfbba8482c2495ec45f8c428939ede /basic/source | |
parent | aa44b5415af1f0dde89dc6f5bba578336f735016 (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>
Diffstat (limited to 'basic/source')
-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" |