svtools/source/contnr/treelistbox.cxx |    4 ----
 sw/source/filter/html/htmltabw.cxx    |   33 +++++++++++++++------------------
 vcl/unx/gtk/salprn-gtk.cxx            |    4 ----
 3 files changed, 15 insertions(+), 26 deletions(-)

New commits:
commit 3b2df17f8e1b8b4d90dda691c79ffda9d2643bae
Author: Jochen Nitschke <j.nitschke+loger...@ok.de>
Date:   Mon Sep 11 07:00:49 2017 +0200

    cppcheck: knownConditionTrueFalse
    
    Change-Id: I216635d7eed8d32c84b44fc80db2e6047b8ee252
    Reviewed-on: https://gerrit.libreoffice.org/42158
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/svtools/source/contnr/treelistbox.cxx 
b/svtools/source/contnr/treelistbox.cxx
index d0a7e2003738..894fa12ef6f4 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -2724,7 +2724,6 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, 
long nLine, vcl::Render
     bool bInUse = rEntry.HasInUseEmphasis();
     // if a ClipRegion was set from outside, we don't have to reset it
     const WinBits nWindowStyle = GetStyle();
-    const bool bResetClipRegion = false;
     const bool bHideSelection = (nWindowStyle & WB_HIDESELECTION) !=0 && 
!HasFocus();
     const StyleSettings& rSettings = 
rRenderContext.GetSettings().GetStyleSettings();
 
@@ -2981,9 +2980,6 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, 
long nLine, vcl::Render
             }
         }
     }
-
-    if (bResetClipRegion)
-        rRenderContext.SetClipRegion();
 }
 
 void SvTreeListBox::PreparePaint(vcl::RenderContext& /*rRenderContext*/, 
SvTreeListEntry& /*rEntry*/)
diff --git a/sw/source/filter/html/htmltabw.cxx 
b/sw/source/filter/html/htmltabw.cxx
index d159d5d806f6..9f9f61a9d9e1 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -262,8 +262,6 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
     if ( !nRowSpan )
         return;
 
-    bool bOutWidth = true;
-
     const SwStartNode* pSttNd = pBox->GetSttNd();
     bool bHead = false;
     if( pSttNd )
@@ -317,30 +315,29 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
     }
 
     long nWidth = 0;
+    bool bOutWidth = true;
     sal_uInt32 nPrcWidth = SAL_MAX_UINT32;
-    if( bOutWidth )
+
+    if( m_bLayoutExport )
     {
-        if( m_bLayoutExport )
+        if( pCell->HasPrcWidthOpt() )
         {
-            if( pCell->HasPrcWidthOpt() )
-            {
-                nPrcWidth = pCell->GetWidthOpt();
-            }
-            else
-            {
-                nWidth = pCell->GetWidthOpt();
-                if( !nWidth )
-                    bOutWidth = false;
-            }
+            nPrcWidth = pCell->GetWidthOpt();
         }
         else
         {
-            if( HasRelWidths() )
-                nPrcWidth = GetPrcWidth(nCol, nColSpan);
-            else
-                nWidth = GetAbsWidth( nCol, nColSpan );
+            nWidth = pCell->GetWidthOpt();
+            if( !nWidth )
+                bOutWidth = false;
         }
     }
+    else
+    {
+        if( HasRelWidths() )
+            nPrcWidth = GetPrcWidth(nCol, nColSpan);
+        else
+            nWidth = GetAbsWidth( nCol, nColSpan );
+    }
 
     long nHeight = pCell->GetHeight() > 0
                         ? GetAbsHeight( pCell->GetHeight(), nRow, nRowSpan )
diff --git a/vcl/unx/gtk/salprn-gtk.cxx b/vcl/unx/gtk/salprn-gtk.cxx
index f82525481731..09c26aab4aab 100644
--- a/vcl/unx/gtk/salprn-gtk.cxx
+++ b/vcl/unx/gtk/salprn-gtk.cxx
@@ -435,7 +435,6 @@ GtkPrintDialog::impl_initCustomTab()
     GtkWidget* pCurParent = nullptr;
     GtkWidget* pCurTabPage = nullptr;
     GtkWidget* pCurSubGroup = nullptr;
-    GtkWidget* pStandardPrintRangeContainer = nullptr;
     bool bIgnoreSubgroup = false;
     for (int i = 0; i != rOptions.getLength(); i++)
     {
@@ -723,9 +722,6 @@ GtkPrintDialog::impl_initCustomTab()
         }
     }
 
-    if (pStandardPrintRangeContainer)
-        gtk_widget_destroy(pStandardPrintRangeContainer);
-
     CustomTabs_t::const_reverse_iterator aEnd = aCustomTabs.rend();
     for (CustomTabs_t::const_reverse_iterator aI = aCustomTabs.rbegin(); aI != 
aEnd; ++aI)
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to