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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Oct 22 08:00:49 UTC 2018


 sw/source/core/doc/htmltbl.cxx |   13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit b9e4f8e1d7464858f15030ee55aa2b4a8b86e427
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Sun Oct 21 22:47:24 2018 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Oct 22 10:00:27 2018 +0200

    tdf#120703 (PVS): Recurring check.
    
    V571 The 'pColumn->GetWidthOption()' condition was already verified in line 1033.
    
    Change-Id: I5bc11bceddc8090f41bf86b45f880ceea3dfb204
    Reviewed-on: https://gerrit.libreoffice.org/62158
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index da0135abd966..346c67c552fe 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -1032,14 +1032,11 @@ void SwHTMLTableLayout::AutoLayoutPass1()
                 SwHTMLTableLayoutColumn *pColumn = GetColumn( i );
                 if (pColumn->IsRelWidthOption() && pColumn->GetWidthOption() && nQuotMax)
                 {
-                    if( pColumn->GetWidthOption() )
-                    {
-                        pColumn->SetMax( pColumn->GetMax() / nQuotMax );
-                        OSL_ENSURE( pColumn->GetMax() >= pColumn->GetMin(),
-                                "Minimum width is one column bigger than maximum" );
-                        if( pColumn->GetMax() < pColumn->GetMin() )
-                            pColumn->SetMax( pColumn->GetMin() );
-                    }
+                    pColumn->SetMax( pColumn->GetMax() / nQuotMax );
+                    OSL_ENSURE( pColumn->GetMax() >= pColumn->GetMin(),
+                            "Minimum width is one column bigger than maximum" );
+                    if( pColumn->GetMax() < pColumn->GetMin() )
+                        pColumn->SetMax( pColumn->GetMin() );
                 }
                 m_nMax += pColumn->GetMax();
             }


More information about the Libreoffice-commits mailing list