summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-08-02 23:33:47 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2013-08-02 23:36:40 +0200
commitfc9080a0c60f263d00eb71111fcda72b3c0a2ebb (patch)
treefb52c67b3dd1ed4548bdd22bda12d8d166798056
parentd82433b0051a93632d66fdd6ab1df10166879c6e (diff)
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
-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 edf724e9edd3..e49a84642636 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1870,21 +1870,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;
@@ -1984,6 +1969,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"