diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-12 11:52:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-12 18:03:46 +0200 |
commit | d03e7a8fba5494dc10433f33d902683eaae639bb (patch) | |
tree | 5ecd804d7330efbd0854235638d76fd504a1ccdd /xmloff | |
parent | e5c33076ab2a4d995e312908ca482b56dd502189 (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/xforms/xformsimport.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
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!" ); |