diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2021-06-08 22:00:41 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2021-06-09 07:43:32 +0200 |
commit | bd536744ec947090819d59e0f0ec9f2c454aa428 (patch) | |
tree | c970950805e3953e5b7c663fa8095cbd20beb737 /reportdesign | |
parent | 96f8ed6619a73655f9c3b94e6a4a3979cc67f551 (diff) |
Simplify Sequences initializations (reportdesign)
Change-Id: I06f2675ee1270f04c6107761fbfc26a5570cc9c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116866
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'reportdesign')
4 files changed, 12 insertions, 24 deletions
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 2fda942e438b..fd6bf1bb56c1 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -1926,10 +1926,7 @@ void SAL_CALL OReportDefinition::setMimeType( const OUString& _mimetype ) uno::Sequence< OUString > SAL_CALL OReportDefinition::getAvailableMimeTypes( ) { - uno::Sequence< OUString > s_aList(2); - s_aList[0] = MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII; - s_aList[1] = MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII; - return s_aList; + return { MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII, MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_ASCII }; } // css::XUnoTunnel @@ -2649,13 +2646,7 @@ uno::Any SAL_CALL OReportDefinition::getTransferData( const datatransfer::DataFl uno::Sequence< datatransfer::DataFlavor > SAL_CALL OReportDefinition::getTransferDataFlavors( ) { - uno::Sequence< datatransfer::DataFlavor > aRet(1); - - aRet[0] = datatransfer::DataFlavor( "image/png", - "PNG", - cppu::UnoType<uno::Sequence< sal_Int8 >>::get() ); - - return aRet; + return { { "image/png", "PNG", cppu::UnoType<uno::Sequence< sal_Int8 >>::get() } }; } sal_Bool SAL_CALL OReportDefinition::isDataFlavorSupported( const datatransfer::DataFlavor& aFlavor ) diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx index 8c37f99afda9..464d7ac46cbc 100644 --- a/reportdesign/source/core/api/Shape.cxx +++ b/reportdesign/source/core/api/Shape.cxx @@ -137,11 +137,7 @@ uno::Sequence< OUString > SAL_CALL OShape::getSupportedServiceNames( ) } else { - uno::Sequence< OUString > aServices(2); - aServices.getArray()[0] = SERVICE_SHAPE; - aServices.getArray()[1] = m_sServiceName; - - return aServices; + return { SERVICE_SHAPE, m_sServiceName }; } } diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx index dd770ff9fd5b..ef1c58ada24f 100644 --- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx +++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx @@ -226,8 +226,7 @@ void DataProviderHandler::impl_updateChartTitle_throw(const uno::Any& _aValue) OUString sStr; _aValue >>= sStr; xFormatted->setString(sStr); - uno::Sequence< uno::Reference< chart2::XFormattedString> > aArgs(1); - aArgs[0] = xFormatted; + uno::Sequence< uno::Reference< chart2::XFormattedString> > aArgs { xFormatted }; xTitle->setText(aArgs); } } diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index 512b6837be30..280e9060e67f 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -1354,12 +1354,14 @@ uno::Sequence< OUString > SAL_CALL GeometryHandler::getActuatingProperties() { ::osl::MutexGuard aGuard( m_aMutex ); - uno::Sequence< OUString > aSeq(5); - aSeq[0] = PROPERTY_BACKTRANSPARENT; - aSeq[1] = PROPERTY_CONTROLBACKGROUNDTRANSPARENT; - aSeq[2] = PROPERTY_FORMULALIST; - aSeq[3] = PROPERTY_TYPE; - aSeq[4] = PROPERTY_DATAFIELD; + uno::Sequence< OUString > aSeq + { + PROPERTY_BACKTRANSPARENT, + PROPERTY_CONTROLBACKGROUNDTRANSPARENT, + PROPERTY_FORMULALIST, + PROPERTY_TYPE, + PROPERTY_DATAFIELD + }; return ::comphelper::concatSequences(m_xFormComponentHandler->getActuatingProperties(),aSeq); } |