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-26 11:38:01 +0200
commit22cf5c7f745b9b7645bdfc881de229731417aad6 (patch)
treed954ee10a2cdb64ac3ba380b172d8a6fdb191e46
parent25ad7c5f94be3535fcf73c0f325e864c82a084cc (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)
-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"