diff options
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/uno/namecont.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index b83344a3ed33..9608fa15bdda 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -1946,8 +1946,21 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto // fdo#68983: If there's a password and the password is not known, only // copying the storage works! // Can we simply copy the storage? - if (!mbOldInfoFormat && !pImplLib->isLoadedStorable() && - !mbOasis2OOoFormat && xSourceLibrariesStor.is()) + bool isCopyStorage = !mbOldInfoFormat && !mbOasis2OOoFormat + && !pImplLib->isLoadedStorable() + && xSourceLibrariesStor.is() /* null for user profile */; + if (isCopyStorage) + { + try + { + xSourceLibrariesStor->isStorageElement(rLib.aName); + } + catch (container::NoSuchElementException const&) + { + isCopyStorage = false; + } + } + if (isCopyStorage) { try { |