From 7a2f07c4bd5d26657593044dd441ba5fd168e5de Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Sun, 19 Mar 2017 17:05:49 +0100 Subject: Use just geParameter instead of hasParameter + getParameter getParameter returns and empty string if the key is not found, so we can just avoid searching twice for the same key. Change-Id: Ic48debce05fe94d8e087b64bde5a589e54bfb616 --- sfx2/source/view/viewfrm.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index bd29aaf003f3..a16fda352944 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -2416,9 +2416,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const OUString& sMacro ) aMacroName = aName.getToken( 0, cTok, nIndex ); // get location - OUString aLocKey("location"); - if ( xUrl->hasParameter( aLocKey ) ) - aLocation = xUrl->getParameter( aLocKey ); + aLocation = xUrl->getParameter( "location" ); } BasicManager* pBasMgr = nullptr; -- cgit