[Libreoffice-commits] core.git: 2 commits - sc/source sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Jul 29 14:25:51 UTC 2018


 sc/source/filter/xml/xmltransformationi.cxx |    1 +
 sw/source/filter/html/swhtml.cxx            |   16 ++++------------
 2 files changed, 5 insertions(+), 12 deletions(-)

New commits:
commit 726038bf16c3657b45395570646a173ae310572f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Jul 29 11:54:04 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Jul 29 16:25:40 2018 +0200

    coverity#1438139 Uninitialized scalar field
    
    Change-Id: I7443003bb457a1cfb2e7df4225e94748ab09b5e9
    Reviewed-on: https://gerrit.libreoffice.org/58273
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/filter/xml/xmltransformationi.cxx b/sc/source/filter/xml/xmltransformationi.cxx
index 4eaa77bf7ff7..d07e0a124f9b 100644
--- a/sc/source/filter/xml/xmltransformationi.cxx
+++ b/sc/source/filter/xml/xmltransformationi.cxx
@@ -257,6 +257,7 @@ uno::Reference<xml::sax::XFastContextHandler>
 ScXMLColumnTextContext::ScXMLColumnTextContext(
     ScXMLImport& rImport, const rtl::Reference<sax_fastparser::FastAttributeList>& rAttrList)
     : ScXMLImportContext(rImport)
+    , maType(sc::TEXT_TRANSFORM_TYPE::TO_LOWER)
 {
     OUString aType = OUString();
 
commit c6a890317fc82abec0cd9acb77d0a8d41252bf3b
Author:     Jochen Nitschke <j.nitschke+logerrit at ok.de>
AuthorDate: Sun Jul 29 13:54:20 2018 +0200
Commit:     Jochen Nitschke <j.nitschke+logerrit at ok.de>
CommitDate: Sun Jul 29 16:25:30 2018 +0200

    remove unused parameter rFont
    
    Change-Id: Iaccae5a81e555e27924452b87489e33629988b5d
    Reviewed-on: https://gerrit.libreoffice.org/58280
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Jenkins
    Reviewed-by: Jochen Nitschke <j.nitschke+logerrit at ok.de>

diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index e48b55471639..991251d62adb 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -2106,14 +2106,12 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken )
 }
 
 static void lcl_swhtml_getItemInfo( const HTMLAttr& rAttr,
-                                 bool& rScriptDependent, bool& rFont,
+                                 bool& rScriptDependent,
                                  sal_uInt16& rScriptType )
 {
     switch( rAttr.GetItem().Which() )
     {
     case RES_CHRATR_FONT:
-        rFont = true;
-        SAL_FALLTHROUGH;
     case RES_CHRATR_FONTSIZE:
     case RES_CHRATR_LANGUAGE:
     case RES_CHRATR_POSTURE:
@@ -2122,8 +2120,6 @@ static void lcl_swhtml_getItemInfo( const HTMLAttr& rAttr,
         rScriptDependent = true;
         break;
     case RES_CHRATR_CJK_FONT:
-        rFont = true;
-        SAL_FALLTHROUGH;
     case RES_CHRATR_CJK_FONTSIZE:
     case RES_CHRATR_CJK_LANGUAGE:
     case RES_CHRATR_CJK_POSTURE:
@@ -2132,8 +2128,6 @@ static void lcl_swhtml_getItemInfo( const HTMLAttr& rAttr,
         rScriptDependent = true;
         break;
     case RES_CHRATR_CTL_FONT:
-        rFont = true;
-        SAL_FALLTHROUGH;
     case RES_CHRATR_CTL_FONTSIZE:
     case RES_CHRATR_CTL_LANGUAGE:
     case RES_CHRATR_CTL_POSTURE:
@@ -2143,7 +2137,6 @@ static void lcl_swhtml_getItemInfo( const HTMLAttr& rAttr,
         break;
     default:
         rScriptDependent = false;
-        rFont = false;
         break;
     }
 }
@@ -2225,10 +2218,10 @@ bool SwHTMLParser::AppendTextNode( SwHTMLAppendMode eMode, bool bUpdateNum )
                         pAttr->GetSttCnt() == 0;
 
                     sal_Int32 nStt = pAttr->nSttContent;
-                    bool bScript = false, bFont = false;
+                    bool bScript = false;
                     sal_uInt16 nScriptItem;
                     bool bInsert = true;
-                       lcl_swhtml_getItemInfo( *pAttr, bScript, bFont,
+                       lcl_swhtml_getItemInfo( *pAttr, bScript,
                                             nScriptItem );
                         // set previous part
                     if( bScript )
@@ -3099,8 +3092,7 @@ bool SwHTMLParser::EndAttr( HTMLAttr* pAttr, bool bChkEmpty )
         // We do some optimization for script dependent attributes here.
         if( *pEndIdx == pAttr->GetSttPara() )
         {
-            bool bFont = false;
-            lcl_swhtml_getItemInfo( *pAttr, bScript, bFont, nScriptItem );
+            lcl_swhtml_getItemInfo( *pAttr, bScript, nScriptItem );
         }
     }
     else


More information about the Libreoffice-commits mailing list