From d03e7a8fba5494dc10433f33d902683eaae639bb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 12 May 2022 11:52:05 +0200 Subject: speed up simple use of NamedValueCollection where instantiating and allocating a whole map just to extract a single key is way inefficient Change-Id: I55248bc71a9e8826cab9b76fa6916bfa888efa0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134226 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmloff/source/xforms/xformsimport.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'xmloff') diff --git a/xmloff/source/xforms/xformsimport.cxx b/xmloff/source/xforms/xformsimport.cxx index 1e4b05295e71..69daa630b63e 100644 --- a/xmloff/source/xforms/xformsimport.cxx +++ b/xmloff/source/xforms/xformsimport.cxx @@ -136,8 +136,7 @@ void applyXFormsSettings( const Reference< XNameAccess >& _rXForms, const Sequen if ( !_rXForms.is() ) return; - ::comphelper::NamedValueCollection aSettings( _rSettings ); - Reference< XNameAccess > xModelSettings( aSettings.get( "XFormModels" ), UNO_QUERY ); + Reference< XNameAccess > xModelSettings( ::comphelper::NamedValueCollection::get( _rSettings, u"XFormModels" ), UNO_QUERY ); if ( !xModelSettings.is() ) { OSL_FAIL( "applyXFormsSettings: wrong type for the XFormModels settings!" ); -- cgit