summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-05-21 19:43:46 +0200
committerMichael Stahl <mstahl@redhat.com>2014-05-22 13:12:55 +0200
commit5ca4b9d51046b9b6a36b91c9abd0cc1e7c04b480 (patch)
treeb741c9f1795737e17f0bf58949e8384ed9a6371e
parent0e21019e0d61911b4c0ddef07691e9f9f6384cba (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
-rw-r--r--basic/source/uno/namecont.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index bc5f796cdada..c3329d1c47e5 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1860,6 +1860,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;
@@ -1988,21 +2003,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"