diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2021-06-08 21:39:34 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2021-06-09 10:49:26 +0200 |
commit | 7af40a445551a07c6918f835da20ca461a6bd4ee (patch) | |
tree | 3f6816c85dd0e4008dc022e6e0a37079d7590881 /oox | |
parent | 07a09195adc65722207390e355a202100bc608ff (diff) |
Simplify Sequences initializations (i*->p*)
Change-Id: I6bf0eaa2233de2487d90a2f9ae7de263b4ddf1bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116865
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/textparagraphproperties.cxx | 3 | ||||
-rw-r--r-- | oox/source/export/drawingml.cxx | 19 | ||||
-rw-r--r-- | oox/source/ppt/pptfilterhelpers.cxx | 10 |
3 files changed, 16 insertions, 16 deletions
diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index 197f0e51f28a..70f1ac0c937b 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -476,8 +476,7 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p // Reset TabStops - these would be auto calculated by Impress TabStop aTabStop; aTabStop.Position = 0; - Sequence< TabStop > aSeq(1); - aSeq[0] = aTabStop; + Sequence< TabStop > aSeq { aTabStop }; aPropSet.setProperty( PROP_ParaTabStops, aSeq ); } } diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 4d2212b2d50f..385af08d590b 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -3546,16 +3546,15 @@ bool DrawingML::WriteCustomGeometry( if ( !aSegments.hasElements() ) { - aSegments = uno::Sequence<drawing::EnhancedCustomShapeSegment>(4); - aSegments[0].Count = 1; - aSegments[0].Command = drawing::EnhancedCustomShapeSegmentCommand::MOVETO; - aSegments[1].Count = static_cast<sal_Int16>(std::min( aPairs.getLength() - 1, sal_Int32(32767) )); - aSegments[1].Command = drawing::EnhancedCustomShapeSegmentCommand::LINETO; - aSegments[2].Count = 0; - aSegments[2].Command = drawing::EnhancedCustomShapeSegmentCommand::CLOSESUBPATH; - aSegments[3].Count = 0; - aSegments[3].Command = drawing::EnhancedCustomShapeSegmentCommand::ENDSUBPATH; - } + aSegments = uno::Sequence<drawing::EnhancedCustomShapeSegment> + { + { drawing::EnhancedCustomShapeSegmentCommand::MOVETO, 1 }, + { drawing::EnhancedCustomShapeSegmentCommand::LINETO, + static_cast<sal_Int16>(std::min( aPairs.getLength() - 1, sal_Int32(32767) )) }, + { drawing::EnhancedCustomShapeSegmentCommand::CLOSESUBPATH, 0 }, + { drawing::EnhancedCustomShapeSegmentCommand::ENDSUBPATH, 0 } + }; + }; int nExpectedPairCount = std::accumulate(std::cbegin(aSegments), std::cend(aSegments), 0, [](const int nSum, const drawing::EnhancedCustomShapeSegment& rSegment) { return nSum + rSegment.Count; }); diff --git a/oox/source/ppt/pptfilterhelpers.cxx b/oox/source/ppt/pptfilterhelpers.cxx index 295628adc712..23aae31c2212 100644 --- a/oox/source/ppt/pptfilterhelpers.cxx +++ b/oox/source/ppt/pptfilterhelpers.cxx @@ -302,10 +302,12 @@ namespace oox::ppt { sal_Int32 nA = aString.getToken(0, ',', index).toInt32(); sal_Int32 nB = aString.getToken(0, ',', index).toInt32(); sal_Int32 nC = aString.getToken(0, ',', index).toInt32(); - css::uno::Sequence<double> aHSL(3); - aHSL[0] = nA * 360.0 / 255.0; - aHSL[1] = nB / 255.0; - aHSL[2] = nC / 255.0; + css::uno::Sequence<double> aHSL + { + nA * 360.0 / 255.0, + nB / 255.0, + nC / 255.0 + }; rValue <<= aHSL; bRet = true; } |