From 58a32075ca4f457f570af75aef368dd6c389aca7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 3 May 2016 08:39:03 +0200 Subject: use Any constructor instead of temporaries Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a --- sc/source/ui/view/tabvwshg.cxx | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'sc/source/ui/view/tabvwshg.cxx') diff --git a/sc/source/ui/view/tabvwshg.cxx b/sc/source/ui/view/tabvwshg.cxx index 54b7ba43a6d2..73cbb2ca2073 100644 --- a/sc/source/ui/view/tabvwshg.cxx +++ b/sc/source/ui/view/tabvwshg.cxx @@ -71,29 +71,23 @@ void ScTabViewShell::InsertURLButton( const OUString& rName, const OUString& rUR return; uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY ); - uno::Any aAny; - aAny <<= OUString(rName); - xPropSet->setPropertyValue("Label", aAny ); + xPropSet->setPropertyValue("Label", uno::Any(rName) ); OUString aTmp = INetURLObject::GetAbsURL( pDoc->GetDocumentShell()->GetMedium()->GetBaseURL(), rURL ); - aAny <<= aTmp; - xPropSet->setPropertyValue("TargetURL", aAny ); + xPropSet->setPropertyValue("TargetURL", uno::Any(aTmp) ); if( !rTarget.isEmpty() ) { - aAny <<= rTarget; - xPropSet->setPropertyValue("TargetFrame", aAny ); + xPropSet->setPropertyValue("TargetFrame", uno::Any(rTarget) ); } form::FormButtonType eButtonType = form::FormButtonType_URL; - aAny <<= eButtonType; - xPropSet->setPropertyValue("ButtonType", aAny ); + xPropSet->setPropertyValue("ButtonType", uno::Any(eButtonType) ); if ( ::avmedia::MediaWindow::isMediaURL( rURL, ""/*TODO?*/ ) ) { - aAny <<= true; - xPropSet->setPropertyValue("DispatchURLInternal", aAny ); + xPropSet->setPropertyValue("DispatchURLInternal", uno::Any(true) ); } Point aPos; -- cgit