summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-12 11:52:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-12 18:03:46 +0200
commitd03e7a8fba5494dc10433f33d902683eaae639bb (patch)
tree5ecd804d7330efbd0854235638d76fd504a1ccdd /ucb
parente5c33076ab2a4d995e312908ca482b56dd502189 (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 'ucb')
-rw-r--r--ucb/source/ucp/tdoc/tdoc_docmgr.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
index 2f0602d23dc4..1ecc775204ba 100644
--- a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
@@ -535,9 +535,7 @@ bool OfficeDocumentsManager::isDocumentPreview(
if ( !xModel.is() )
return false;
- ::comphelper::NamedValueCollection aArgs(
- xModel->getArgs() );
- bool bIsPreview = aArgs.getOrDefault( "Preview", false );
+ bool bIsPreview = ::comphelper::NamedValueCollection::getOrDefault( xModel->getArgs(), u"Preview", false );
return bIsPreview;
}