[Libreoffice-commits] core.git: basic/source

Lionel Elie Mamane lionel at mamane.lu
Thu Jul 24 08:34:36 PDT 2014


 basic/source/uno/namecont.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 1392a88c2540bc06381680d664129eb79c8b75fc
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Thu Jul 24 17:19:09 2014 +0200

    fdo#52076 remove empty library instead of writing it out empty
    
    Change-Id: Id4fd8c4f34e8ed07044eb428049731c4b9b694ca
    Reviewed-on: https://gerrit.libreoffice.org/10507
    Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
    Tested-by: Lionel Elie Mamane <lionel at mamane.lu>

diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index ac35350..1417aa5 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1837,8 +1837,12 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
             Any aLibAny = maNameContainer.getByName( aNames[0] );
             Reference< XNameAccess > xNameAccess;
             aLibAny >>= xNameAccess;
-            if ( ! ( xNameAccess->hasElements() || ( bInplaceStorage && isModified() ) ) )
+            if ( ! xNameAccess->hasElements() )
             {
+                if ( bInplaceStorage && mxStorage->hasByName(maLibrariesDir) )
+                {
+                    mxStorage->removeElement(maLibrariesDir);
+                }
                 return;
             }
         }


More information about the Libreoffice-commits mailing list