oox/source/drawingml/shape.cxx |   22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

New commits:
commit e44fc2be0d9b0ed7b8983aca42471303e1fca55f
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Sat Oct 16 10:16:06 2021 +0200
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Sat Oct 16 18:12:11 2021 +0200

    Simplify vector initialization in oox
    
    Change-Id: I1d7cfd157d56a501be4497e6f4e94f3f33429139
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123689
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 50a3c6ae5528..6821dffc9f34 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1349,10 +1349,12 @@ Reference< XShape > const & Shape::createAndInsert(
             }
 
             // Store original fill and line colors of the shape and the theme 
color name to InteropGrabBag
-            std::vector<beans::PropertyValue> aProperties;
-            
aProperties.push_back(comphelper::makePropertyValue("EmuLineWidth", 
aLineProperties.moLineWidth.get(0)));
-            
aProperties.push_back(comphelper::makePropertyValue("OriginalSolidFillClr", 
aShapeProps.getProperty(PROP_FillColor)));
-            
aProperties.push_back(comphelper::makePropertyValue("OriginalLnSolidFillClr", 
aShapeProps.getProperty(PROP_LineColor)));
+            std::vector<beans::PropertyValue> aProperties
+            {
+                comphelper::makePropertyValue("EmuLineWidth", 
aLineProperties.moLineWidth.get(0)),
+                comphelper::makePropertyValue("OriginalSolidFillClr", 
aShapeProps.getProperty(PROP_FillColor)),
+                comphelper::makePropertyValue("OriginalLnSolidFillClr", 
aShapeProps.getProperty(PROP_LineColor))
+            };
             OUString sColorFillScheme = 
aFillProperties.maFillColor.getSchemeName();
             if( !aFillProperties.maFillColor.isPlaceHolder() && 
!sColorFillScheme.isEmpty() )
             {
@@ -1380,8 +1382,10 @@ Reference< XShape > const & Shape::createAndInsert(
                 { // for each stop in the gradient definition:
 
                     // save position
-                    std::vector<beans::PropertyValue> aGradientStop;
-                    
aGradientStop.push_back(comphelper::makePropertyValue("Pos", rPos));
+                    std::vector<beans::PropertyValue> aGradientStop
+                    {
+                        comphelper::makePropertyValue("Pos", rPos)
+                    };
 
                     OUString sStopColorScheme = rColor.getSchemeName();
                     if( sStopColorScheme.isEmpty() )
@@ -1422,8 +1426,10 @@ Reference< XShape > const & Shape::createAndInsert(
                     PropertyValue aEffect = it->getEffect();
                     if( !aEffect.Name.isEmpty() )
                     {
-                        std::vector<beans::PropertyValue> aEffectsGrabBag;
-                        
aEffectsGrabBag.push_back(comphelper::makePropertyValue("Attribs", 
aEffect.Value));
+                        std::vector<beans::PropertyValue> aEffectsGrabBag
+                        {
+                            comphelper::makePropertyValue("Attribs", 
aEffect.Value)
+                        };
 
                         Color& aColor( it->moColor );
                         OUString sColorScheme = aColor.getSchemeName();

Reply via email to