diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-28 13:55:01 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-29 08:57:08 +0200 |
commit | 7cdbde4867b14ae382262dc394ba83e609a8eecf (patch) | |
tree | 5fa180d35a8423a7857b0d57355f74a6d26b5bec /sc/source | |
parent | ab20a5888d3a7f964ef2fb3afe2477825da6037e (diff) |
Initialize Sequence<beans::NamedValue> from initializer_lists
Change-Id: I216dcbd983dcf3df79df9fda371b93114540a9d8
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 13 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 4 |
2 files changed, 7 insertions, 10 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 6b13abc7d94d..d4a05529df15 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -657,13 +657,12 @@ void ScXMLExport::_ExportMeta() GetAutoStylePool()->ClearEntries(); CollectSharedData(nTableCount, nShapesCount); - uno::Sequence<beans::NamedValue> stats(3); - stats[0] = beans::NamedValue(OUString("TableCount"), - uno::makeAny((sal_Int32)nTableCount)); - stats[1] = beans::NamedValue(OUString("CellCount"), - uno::makeAny(nCellCount)); - stats[2] = beans::NamedValue(OUString("ObjectCount"), - uno::makeAny(nShapesCount)); + uno::Sequence<beans::NamedValue> stats + { + { "TableCount", uno::makeAny((sal_Int32)nTableCount) }, + { "CellCount", uno::makeAny(nCellCount) }, + { "ObjectCount", uno::makeAny(nShapesCount) } + }; // update document statistics at the model uno::Reference<document::XDocumentPropertiesSupplier> xPropSup(GetModel(), diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 0fb15fdce41c..f1eadfd177ef 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -724,15 +724,13 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) if ( xFactory.is() ) { uno::Reference< task::XJob > xJob( xFactory->createInstanceWithContext( xContext ), uno::UNO_QUERY_THROW ); - uno::Sequence< beans::NamedValue > aArgsForJob(1); ScViewData* pViewData = GetViewData(); SfxViewShell* pViewShell = ( pViewData ? pViewData->GetViewShell() : NULL ); SfxViewFrame* pViewFrame = ( pViewShell ? pViewShell->GetViewFrame() : NULL ); SfxFrame* pFrame = ( pViewFrame ? &pViewFrame->GetFrame() : NULL ); uno::Reference< frame::XController > xController = ( pFrame ? pFrame->GetController() : 0 ); uno::Reference< sheet::XSpreadsheetView > xSpreadsheetView( xController, uno::UNO_QUERY_THROW ); - aArgsForJob[0] = beans::NamedValue( OUString( "SpreadsheetView" ), - uno::makeAny( xSpreadsheetView ) ); + uno::Sequence< beans::NamedValue > aArgsForJob { { "SpreadsheetView", uno::makeAny( xSpreadsheetView ) } }; xJob->execute( aArgsForJob ); } } |