summaryrefslogtreecommitdiff
path: root/chart2/source/tools
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-06-07 21:54:42 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-06-08 10:25:12 +0200
commit5895be734d1872c9c014aca5fe77813dd78cfd14 (patch)
tree96f7620f4772ae88c669db98dec99afc72e874fa /chart2/source/tools
parent76dc21860ce185bd5495adde8858d2f23284c78e (diff)
Simplify Sequences initializations (chart2)(part1)
Change-Id: I97ddde9659f337932b4165b794a769b83882126d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116802 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'chart2/source/tools')
-rw-r--r--chart2/source/tools/CommonConverters.cxx12
-rw-r--r--chart2/source/tools/DataSourceHelper.cxx18
2 files changed, 8 insertions, 22 deletions
diff --git a/chart2/source/tools/CommonConverters.cxx b/chart2/source/tools/CommonConverters.cxx
index 01b2c2c758a4..76bb4a071b7c 100644
--- a/chart2/source/tools/CommonConverters.cxx
+++ b/chart2/source/tools/CommonConverters.cxx
@@ -388,11 +388,7 @@ awt::Size Direction3DToAWTSize( const drawing::Direction3D& rDirection )
uno::Sequence< double > B3DPointToSequence( const ::basegfx::B3DPoint& rPoint )
{
- uno::Sequence< double > aRet(3);
- aRet[0] = rPoint.getX();
- aRet[1] = rPoint.getY();
- aRet[2] = rPoint.getZ();
- return aRet;
+ return { rPoint.getX(), rPoint.getY(), rPoint.getZ() };
}
drawing::Position3D SequenceToPosition3D( const uno::Sequence< double >& rSeq )
@@ -408,11 +404,7 @@ drawing::Position3D SequenceToPosition3D( const uno::Sequence< double >& rSeq )
uno::Sequence< double > Position3DToSequence( const drawing::Position3D& rPosition )
{
- uno::Sequence< double > aRet(3);
- aRet[0] = rPosition.PositionX;
- aRet[1] = rPosition.PositionY;
- aRet[2] = rPosition.PositionZ;
- return aRet;
+ return { rPosition.PositionX, rPosition.PositionY, rPosition.PositionZ };
}
using namespace ::com::sun::star::chart2;
diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx
index 3d6bb54592fe..7722da5e6e60 100644
--- a/chart2/source/tools/DataSourceHelper.cxx
+++ b/chart2/source/tools/DataSourceHelper.cxx
@@ -155,18 +155,12 @@ uno::Sequence< beans::PropertyValue > DataSourceHelper::createArguments(
if( bUseColumns )
eRowSource = css::chart::ChartDataRowSource_COLUMNS;
- uno::Sequence< beans::PropertyValue > aArguments(3);
- aArguments[0] = beans::PropertyValue( "DataRowSource"
- , -1, uno::Any( eRowSource )
- , beans::PropertyState_DIRECT_VALUE );
- aArguments[1] = beans::PropertyValue( "FirstCellAsLabel"
- , -1, uno::Any( bFirstCellAsLabel )
- , beans::PropertyState_DIRECT_VALUE );
- aArguments[2] = beans::PropertyValue( "HasCategories"
- , -1, uno::Any( bHasCategories )
- , beans::PropertyState_DIRECT_VALUE );
-
- return aArguments;
+ return
+ {
+ { "DataRowSource", -1, uno::Any( eRowSource), beans::PropertyState_DIRECT_VALUE },
+ { "FirstCellAsLabel", -1, uno::Any( bFirstCellAsLabel ), beans::PropertyState_DIRECT_VALUE },
+ { "HasCategories", -1, uno::Any( bHasCategories ), beans::PropertyState_DIRECT_VALUE }
+ };
}
uno::Sequence< beans::PropertyValue > DataSourceHelper::createArguments(