summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-09-11 07:00:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-11 14:27:45 +0200
commit3b2df17f8e1b8b4d90dda691c79ffda9d2643bae (patch)
tree6863ea14ccdd3e07bf9650d0c009a5459c36b92c
parentclang-tidy modernize-use-emplace in hwpfilter..lotuswordpro (diff)
downloadcore-3b2df17f8e1b8b4d90dda691c79ffda9d2643bae.tar.gz
core-3b2df17f8e1b8b4d90dda691c79ffda9d2643bae.zip
cppcheck: knownConditionTrueFalse
Change-Id: I216635d7eed8d32c84b44fc80db2e6047b8ee252 Reviewed-on: https://gerrit.libreoffice.org/42158 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--svtools/source/contnr/treelistbox.cxx4
-rw-r--r--sw/source/filter/html/htmltabw.cxx33
-rw-r--r--vcl/unx/gtk/salprn-gtk.cxx4
3 files changed, 15 insertions, 26 deletions
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)
{