[PATCH] Janitorial: deduplicate code; no behaviour change

Lionel Elie Mamane lionel.mamane at gestman.lu
Mon Aug 15 05:02:25 PDT 2011


---
 basic/source/uno/namecont.cxx |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 4882c6f..2251d12 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1806,10 +1806,8 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
         // open the source storage which might be used to copy yet-unmodified libraries
         try
         {
-            if ( mxStorage->hasByName( maLibrariesDir ) )
+            if ( mxStorage->hasByName( maLibrariesDir ) || bInplaceStorage )
                 xSourceLibrariesStor = mxStorage->openStorageElement( maLibrariesDir, bInplaceStorage ? embed::ElementModes::READWRITE : embed::ElementModes::READ );
-            else if ( bInplaceStorage )
-                xSourceLibrariesStor = mxStorage->openStorageElement( maLibrariesDir, embed::ElementModes::READWRITE );
         }
         catch( const uno::Exception& )
         {
-- 
1.7.2.5


--AqsLC8rIMeq19msA--


More information about the LibreOffice mailing list