Kaydet (Commit) fc9080a0 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

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
üst d82433b0
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment