xmloff/source/style/GradientStyle.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit e4bc01d9f57d47d943ff1910e42abda3d9033f46
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sun Mar 13 10:38:28 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sun Mar 13 13:04:06 2022 +0100

    ofz: Use-of-uninitialized-value
    
    Change-Id: I6239ebb640bf248d226979ed17de92930898f9ac
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131464
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/xmloff/source/style/GradientStyle.cxx 
b/xmloff/source/style/GradientStyle.cxx
index 17c058727679..7626db9db8ce 100644
--- a/xmloff/source/style/GradientStyle.cxx
+++ b/xmloff/source/style/GradientStyle.cxx
@@ -65,12 +65,16 @@ void XMLGradientStyleImport::importXML(
     OUString aDisplayName;
 
     awt::Gradient aGradient;
+    aGradient.Style = css::awt::GradientStyle_LINEAR;
+    aGradient.StartColor = 0;
+    aGradient.EndColor = 0;
+    aGradient.Angle = 0;
+    aGradient.Border = 0;
     aGradient.XOffset = 0;
     aGradient.YOffset = 0;
     aGradient.StartIntensity = 100;
     aGradient.EndIntensity = 100;
-    aGradient.Angle = 0;
-    aGradient.Border = 0;
+    aGradient.StepCount = 0;
 
     for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList ))
     {

Reply via email to