diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-25 09:34:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-25 12:03:17 +0200 |
commit | f74da1315a5b2ec232a66944e41ff90231b383be (patch) | |
tree | 60d464c45df3531013642d61cbc8302ac815a1ae /reportdesign | |
parent | 04a6a5d5cdc6889c6f0e41b3df537f59baeee9f9 (diff) |
use more comphelper::InitAnyPropertySequence
Found with:
git grep -n -A10 'Sequence.*Any' -- *.cxx | grep -B5 -w PropertyValueProvider
and:
git grep -n 'Sequence.*Any.*( *&'
Change-Id: Icb18c98bdd3f8352817e443ff78de5df042859ad
Reviewed-on: https://gerrit.libreoffice.org/40389
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/ui/inspection/DataProviderHandler.cxx | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx index 5a04e5e2b7dc..c9713e4b2235 100644 --- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx +++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx @@ -21,6 +21,7 @@ #include <comphelper/namedvaluecollection.hxx> #include <comphelper/property.hxx> #include <comphelper/types.hxx> +#include <comphelper/propertysequence.hxx> #include <cppuhelper/supportsservice.hxx> #include "strings.hxx" #include <toolkit/helper/vclunohelper.hxx> @@ -483,27 +484,15 @@ sal_Bool SAL_CALL DataProviderHandler::suspend(sal_Bool Suspend) } bool DataProviderHandler::impl_dialogLinkedFields_nothrow( ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const { - uno::Sequence<uno::Any> aSeq(6); - beans::PropertyValue aParam; - aParam.Name = "ParentWindow"; - aParam.Value = m_xContext->getValueByName("DialogParentWindow"); - aSeq[0] <<= aParam; - aParam.Name = "Detail"; - aParam.Value <<= m_xDataProvider; - aSeq[1] <<= aParam; - aParam.Name = "Master"; - aParam.Value <<= m_xReportComponent->getSection()->getReportDefinition(); - aSeq[2] <<= aParam; - - aParam.Name = "Explanation"; - aParam.Value <<= RptResId(RID_STR_EXPLANATION); - aSeq[3] <<= aParam; - aParam.Name = "DetailLabel"; - aParam.Value <<= RptResId(RID_STR_DETAILLABEL); - aSeq[4] <<= aParam; - aParam.Name = "MasterLabel"; - aParam.Value <<= RptResId(RID_STR_MASTERLABEL); - aSeq[5] <<= aParam; + uno::Sequence<uno::Any> aSeq(comphelper::InitAnyPropertySequence( + { + {"ParentWindow", uno::Any(m_xContext->getValueByName("DialogParentWindow"))}, + {"Detail", uno::Any(m_xDataProvider)}, + {"Master", uno::Any(m_xReportComponent->getSection()->getReportDefinition())}, + {"Explanation", uno::Any(RptResId(RID_STR_EXPLANATION))}, + {"DetailLabel", uno::Any(RptResId(RID_STR_DETAILLABEL))}, + {"MasterLabel", uno::Any(RptResId(RID_STR_MASTERLABEL))}, + })); uno::Reference< ui::dialogs::XExecutableDialog > xDialog( m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( @@ -516,14 +505,11 @@ bool DataProviderHandler::impl_dialogLinkedFields_nothrow( ::osl::ClearableMutex bool DataProviderHandler::impl_dialogChartType_nothrow( ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const { - uno::Sequence<uno::Any> aSeq(2); - beans::PropertyValue aParam; - aParam.Name = "ParentWindow"; - aParam.Value = m_xContext->getValueByName("DialogParentWindow"); - aSeq[0] <<= aParam; - aParam.Name = "ChartModel"; - aParam.Value <<= m_xChartModel; - aSeq[1] <<= aParam; + uno::Sequence<uno::Any> aSeq(comphelper::InitAnyPropertySequence( + { + {"ParentWindow", uno::Any(m_xContext->getValueByName("DialogParentWindow"))}, + {"ChartModel", uno::Any(m_xChartModel)} + })); uno::Reference< ui::dialogs::XExecutableDialog > xDialog( m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext( |