basic/source/inc/namecont.hxx |    7 -------
 basic/source/uno/namecont.cxx |    9 ++-------
 2 files changed, 2 insertions(+), 14 deletions(-)

New commits:
commit e413d962ac6f4cc6c32bd153a030a57a57d66676
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sun Dec 1 12:47:01 2024 +0500
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sun Dec 1 10:27:16 2024 +0100

    Drop unneeded indirection and unused argument
    
    The extra complexity was introduced for #i94994# in commit
    326696598621c5883d7c28f491ca8192e8cfb21c (CWS-TOOLING: integrate CWS
    ab61, 2009-02-11).
    
    Change-Id: If5a69984e3c2c963d4eea2824373fbf1e8a47fef
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177603
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx
index 4db38ac881a4..0fea0a27a550 100644
--- a/basic/source/inc/namecont.hxx
+++ b/basic/source/inc/namecont.hxx
@@ -583,13 +583,6 @@ public:
     virtual void SAL_CALL removeChangesListener( const css::uno::Reference<
         css::util::XChangesListener >& xListener ) override;
 
-public:
-    struct LibraryContainerAccess { friend class SfxLibraryContainer; private: 
LibraryContainerAccess() { } };
-    void    removeElementWithoutChecks( const OUString& _rElementName, 
LibraryContainerAccess )
-    {
-        impl_removeWithoutChecks( _rElementName );
-    }
-
 protected:
     virtual bool isLoadedStorable();
 
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index ca2fb19f4f26..94c4f9a2dd39 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -2253,13 +2253,8 @@ void SAL_CALL SfxLibraryContainer::removeLibrary( const 
OUString& Name )
     }
     if( xNameAccess->hasElements() )
     {
-        Sequence< OUString > aNames = pImplLib->getElementNames();
-        sal_Int32 nNameCount = aNames.getLength();
-        const OUString* pNames = aNames.getConstArray();
-        for( sal_Int32 i = 0 ; i < nNameCount ; ++i, ++pNames )
-        {
-            pImplLib->removeElementWithoutChecks( *pNames, 
SfxLibrary::LibraryContainerAccess() );
-        }
+        for (auto& name : pImplLib->getElementNames())
+            pImplLib->impl_removeWithoutChecks(name);
     }
 
     // Delete index file

Reply via email to