summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2014-07-24 17:19:09 +0200
committerMichael Stahl <mstahl@redhat.com>2014-07-29 14:10:53 +0000
commit73318369c824326702b44ab4af13a78719720f77 (patch)
tree38c56c450cf041181d39628fe152cc30a56211b0
parent1cf2cf1d4fbb1622c1789cb893d5e9fd9de1cd61 (diff)
fdo#52076 remove empty library instead of writing it out empty
Change-Id: Id4fd8c4f34e8ed07044eb428049731c4b9b694ca Reviewed-on: https://gerrit.libreoffice.org/10508 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--basic/source/uno/namecont.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 854f437f60cc..69ba27838aa6 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1815,8 +1815,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;
}
}