sw/source/filter/xml/xmltbli.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit a07b4b432f47902290ff698ec48c79c63d3419ad
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Tue Oct 22 19:33:22 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Oct 22 23:04:55 2024 +0200

    tdf#163486: PVS: Expression is always true
    
    V560    A part of conditional expression is always true: pNumFormat.
    V560    A part of conditional expression is always true: pNumFormat != 
nullptr.
    
    Change-Id: I6c780fa67bd65da06cfdde37d34eda93bb4ab13c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175445
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 76b62fe426f5..8bd58ca29baf 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -1926,7 +1926,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
             // default num format?
             if( const SwTableBoxNumFormat* pNumFormat = 
pBoxFormat2->GetItemIfSet( RES_BOXATR_FORMAT, false ) )
             {
-                if (pNumFormat && (pNumFormat->GetValue() % 
SV_COUNTRY_LANGUAGE_OFFSET) == 0)
+                if ((pNumFormat->GetValue() % SV_COUNTRY_LANGUAGE_OFFSET) == 0)
                 {
                     // only one text node?
                     SwNodeIndex aNodeIndex( *(pCell->GetStartNode()), 1 );
@@ -1980,8 +1980,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
                     const SwDoc* pDoc = m_pBoxFormat->GetDoc();
                     const SvNumberFormatter* pNumberFormatter = pDoc ?
                         pDoc->GetNumberFormatter() : nullptr;
-                    if( pNumFormat != nullptr && pNumberFormatter &&
-                        !pNumberFormatter->GetEntry( pNumFormat->GetValue() 
)->IsTextFormat() )
+                    if( pNumberFormatter && !pNumberFormatter->GetEntry( 
pNumFormat->GetValue() )->IsTextFormat() )
                         m_pBoxFormat->ResetFormatAttr( RES_BOXATR_FORMAT );
                 }
             }

Reply via email to