diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-03 08:39:03 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-05-04 12:39:40 +0200 |
commit | 58a32075ca4f457f570af75aef368dd6c389aca7 (patch) | |
tree | e437dcbdeb248b4316cb8a9281d1543419853f6d /sc/source/ui/view | |
parent | 7d47700972d267fe7c5270c5dadd45a523a2baec (diff) |
use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r-- | sc/source/ui/view/tabvwshg.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/view/viewdata.cxx | 4 |
2 files changed, 6 insertions, 14 deletions
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; diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 4bfa4e76b620..5c3e55214791 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -2651,11 +2651,9 @@ void ScViewData::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>& rSe maTabData[nTab]->WriteUserDataSequence(aTableViewSettings, *this, nTab); OUString sTabName; GetDocument()->GetName( nTab, sTabName ); - uno::Any aAny; - aAny <<= aTableViewSettings; try { - xNameContainer->insertByName(sTabName, aAny); + xNameContainer->insertByName(sTabName, uno::Any(aTableViewSettings)); } //#101739#; two tables with the same name are possible catch ( container::ElementExistException& ) |