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

Noel Grandin noel at peralex.com
Fri Jan 15 00:42:51 PST 2016


 xmloff/source/style/GradientStyle.cxx |   23 ++++-------------------
 xmloff/source/style/HatchStyle.cxx    |   15 +++------------
 2 files changed, 7 insertions(+), 31 deletions(-)

New commits:
commit f0920199f2983a89b66e3b64d555353d7fe47e52
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Jan 15 10:42:04 2016 +0200

    -Werror=unused-but-set-variable
    
    Change-Id: I981e1b660dc94333935b3a451847198940e47e99

diff --git a/xmloff/source/style/GradientStyle.cxx b/xmloff/source/style/GradientStyle.cxx
index 3c33b46..141fcc9 100644
--- a/xmloff/source/style/GradientStyle.cxx
+++ b/xmloff/source/style/GradientStyle.cxx
@@ -98,9 +98,6 @@ void XMLGradientStyleImport::importXML(
         XML_TOKEN_MAP_END
     };
 
-    bool bHasName       = false;
-    bool bHasStyle      = false;
-    bool bHasStartColor = false;
     OUString aDisplayName;
 
     awt::Gradient aGradient;
@@ -127,15 +124,10 @@ void XMLGradientStyleImport::importXML(
         switch( aTokenMap.Get( nPrefix, aStrAttrName ) )
         {
         case XML_TOK_GRADIENT_NAME:
-            {
-                rStrName = rStrValue;
-                bHasName = true;
-            }
+            rStrName = rStrValue;
             break;
         case XML_TOK_GRADIENT_DISPLAY_NAME:
-            {
-                aDisplayName = rStrValue;
-            }
+            aDisplayName = rStrValue;
             break;
         case XML_TOK_GRADIENT_STYLE:
             {
@@ -143,7 +135,6 @@ void XMLGradientStyleImport::importXML(
                 if( SvXMLUnitConverter::convertEnum( eValue, rStrValue, pXML_GradientStyle_Enum ) )
                 {
                     aGradient.Style = (awt::GradientStyle) eValue;
-                    bHasStyle = true;
                 }
             }
             break;
@@ -156,16 +147,10 @@ void XMLGradientStyleImport::importXML(
             aGradient.YOffset = static_cast< sal_Int16 >( nTmpValue );
             break;
         case XML_TOK_GRADIENT_STARTCOLOR:
-            {
-                bHasStartColor = ::sax::Converter::convertColor(
-                        aGradient.StartColor, rStrValue);
-            }
+            ::sax::Converter::convertColor(aGradient.StartColor, rStrValue);
             break;
         case XML_TOK_GRADIENT_ENDCOLOR:
-            {
-                bHasStartColor = ::sax::Converter::convertColor(
-                        aGradient.EndColor, rStrValue);
-            }
+            ::sax::Converter::convertColor(aGradient.EndColor, rStrValue);
             break;
         case XML_TOK_GRADIENT_STARTINT:
             ::sax::Converter::convertPercent( nTmpValue, rStrValue );
diff --git a/xmloff/source/style/HatchStyle.cxx b/xmloff/source/style/HatchStyle.cxx
index 9b76e19..43c1e02 100644
--- a/xmloff/source/style/HatchStyle.cxx
+++ b/xmloff/source/style/HatchStyle.cxx
@@ -84,10 +84,7 @@ void XMLHatchStyleImport::importXML(
         XML_TOKEN_MAP_END
     };
 
-    bool bHasName  = false;
     bool bHasStyle = false;
-    bool bHasColor = false;
-    bool bHasDist  = false;
     OUString aDisplayName;
 
     drawing::Hatch aHatch;
@@ -111,10 +108,7 @@ void XMLHatchStyleImport::importXML(
         switch( aTokenMap.Get( nPrefix, aStrAttrName ) )
         {
             case XML_TOK_HATCH_NAME:
-                {
-                    rStrName = rStrValue;
-                    bHasName = true;
-                }
+                rStrName = rStrValue;
                 break;
             case XML_TOK_HATCH_DISPLAY_NAME:
                 aDisplayName = rStrValue;
@@ -128,13 +122,10 @@ void XMLHatchStyleImport::importXML(
                 }
                 break;
             case XML_TOK_HATCH_COLOR:
-                {
-                    bHasColor = ::sax::Converter::convertColor(
-                            aHatch.Color, rStrValue);
-                }
+                ::sax::Converter::convertColor(aHatch.Color, rStrValue);
                 break;
             case XML_TOK_HATCH_DISTANCE:
-                bHasDist = rUnitConverter.convertMeasureToCore(
+                rUnitConverter.convertMeasureToCore(
                         (sal_Int32&)aHatch.Distance, rStrValue );
                 break;
             case XML_TOK_HATCH_ROTATION:


More information about the Libreoffice-commits mailing list