summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-12-01 12:47:01 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-12-01 10:27:16 +0100
commite413d962ac6f4cc6c32bd153a030a57a57d66676 (patch)
tree193ba3e5e1b5605f9112613dfa0938b287f13726
parentafc441e65107ed808c399b65f4737d25541cdf77 (diff)
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.kaganski@collabora.com>
-rw-r--r--basic/source/inc/namecont.hxx7
-rw-r--r--basic/source/uno/namecont.cxx9
2 files changed, 2 insertions, 14 deletions
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