[Libreoffice-commits] core.git: svx/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 23 19:45:47 UTC 2020


 svx/source/sdr/primitive2d/sdrattributecreator.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 41e1e44a1fe102be0957e83b7b3f04bcd4ed19a8
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Thu Apr 23 18:09:42 2020 +0300
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Thu Apr 23 21:45:08 2020 +0200

    Don't call default ctor only to reassign later
    
    Change-Id: Ia725652f5124a2288bcca319a35d549c0bc3e351
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92793
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 55c44f3dc3b2..ddfddd5998b4 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -756,7 +756,6 @@ namespace drawinglayer::primitive2d
             attribute::SdrLineAttribute aLine;
             attribute::SdrLineStartEndAttribute aLineStartEnd;
             attribute::SdrTextAttribute aText;
-            attribute::SdrGlowAttribute aGlow;
             bool bFontworkHideContour(false);
 
             // look for text first
@@ -790,7 +789,7 @@ namespace drawinglayer::primitive2d
             {
                 // try shadow
                 const attribute::SdrShadowAttribute aShadow(createNewSdrShadowAttribute(rSet));
-                aGlow = createNewSdrGlowAttribute(rSet);
+                attribute::SdrGlowAttribute aGlow = createNewSdrGlowAttribute(rSet);
 
                 return attribute::SdrLineShadowTextAttribute(aLine, aLineStartEnd, aShadow, aText, aGlow);
             }
@@ -806,10 +805,8 @@ namespace drawinglayer::primitive2d
             attribute::SdrLineAttribute aLine;
             attribute::SdrFillAttribute aFill;
             attribute::SdrLineStartEndAttribute aLineStartEnd;
-            attribute::SdrShadowAttribute aShadow;
             attribute::FillGradientAttribute aFillFloatTransGradient;
             attribute::SdrTextAttribute aText;
-            attribute::SdrGlowAttribute aGlow;
             bool bFontworkHideContour(false);
 
             // look for text first
@@ -853,10 +850,10 @@ namespace drawinglayer::primitive2d
             if(bHasContent || !aLine.isDefault() || !aFill.isDefault() || !aText.isDefault())
             {
                 // try shadow
-                aShadow = createNewSdrShadowAttribute(rSet);
+                attribute::SdrShadowAttribute aShadow = createNewSdrShadowAttribute(rSet);
 
                 // glow
-                aGlow = createNewSdrGlowAttribute(rSet);
+                attribute::SdrGlowAttribute aGlow = createNewSdrGlowAttribute(rSet);
 
                 return attribute::SdrLineFillShadowTextAttribute(
                     aLine, aFill, aLineStartEnd, aShadow, aFillFloatTransGradient, aText, aGlow);


More information about the Libreoffice-commits mailing list