summaryrefslogtreecommitdiff
path: root/sw
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 /sw
parent7ca4ea54b4d610104df1b88ae5b04c2081a4a429 (diff)
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>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/html/htmltabw.cxx33
1 files changed, 15 insertions, 18 deletions
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 )