Kaydet (Commit) 5ca4b9d5 authored tarafından Michael Stahl's avatar Michael Stahl

Revert "fdo#67685 open xSourceLibrariesStor only when needed"

This reverts commit fc9080a0.

This bug was apparently introduced by
af34774d, which will be reverted
in the next commit.

Change-Id: I81ccb5bf9cc7e29fbf1e66d02f38268ee1fd1d0c
üst 0e21019e
...@@ -1860,6 +1860,21 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto ...@@ -1860,6 +1860,21 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
DBG_UNHANDLED_EXCEPTION(); DBG_UNHANDLED_EXCEPTION();
return; 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; int iArray = 0;
...@@ -1988,21 +2003,6 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto ...@@ -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 // then we need to clean up the temporary storage we used for this
if ( bInplaceStorage && !sTempTargetStorName.isEmpty() ) 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( SAL_WARN_IF(
!xSourceLibrariesStor.is(), "basic", !xSourceLibrariesStor.is(), "basic",
("SfxLibrariesContainer::storeLibraries_impl: unexpected: we should" ("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