summaryrefslogtreecommitdiff
path: root/sw/source/filter/html
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-11-25 16:31:42 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-11-25 16:52:30 +0100
commitc59a5b81e9521a92587e701bcad82bf643b00493 (patch)
treeb08b97f67c53e6ec1b3cae06cd19ebac2ca15cea /sw/source/filter/html
parent75299cd119dcb3121540471354d2b33af7f6684d (diff)
tdf#120703 PVS: V560 A part of conditional expression is always true/false
Change-Id: I8d98aa7dd77fbd79611b8a4aba77e8c378fd1cae Reviewed-on: https://gerrit.libreoffice.org/63981 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source/filter/html')
-rw-r--r--sw/source/filter/html/htmlatr.cxx7
-rw-r--r--sw/source/filter/html/htmlcss1.cxx2
-rw-r--r--sw/source/filter/html/htmlform.cxx5
-rw-r--r--sw/source/filter/html/htmltabw.cxx2
4 files changed, 5 insertions, 11 deletions
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 2edf9a57c5fe..f3c55482777a 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -441,7 +441,6 @@ static void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
bool bNoEndTag = false; // don't output an end tag
rHWrt.m_bNoAlign = false; // no ALIGN=... possible
- bool bNoStyle = false; // no STYLE=... possible
sal_uInt8 nBulletGrfLvl = 255; // The bullet graphic we want to output
// Are we in a bulleted or numbered list?
@@ -811,7 +810,6 @@ static void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
aToken = OOO_STRING_SVTOOLS_HTML_parabreak;
bPara = true;
rHWrt.m_bNoAlign = false;
- bNoStyle = false;
}
LanguageType eLang;
@@ -921,7 +919,7 @@ static void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
pTextNd->GetAnyFormatColl().GetPoolFormatId(), pTextNd->GetText()) > -1;
// and now, if necessary, the STYLE options
- if( rHWrt.m_bCfgOutStyles && rInfo.pItemSet && !bNoStyle)
+ if (rHWrt.m_bCfgOutStyles && rInfo.pItemSet)
{
OutCSS1_ParaTagStyleOpt( rWrt, *rInfo.pItemSet );
}
@@ -2368,8 +2366,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode )
bool bOutChar = true;
const SwTextAttr * pTextHt = nullptr;
- if( nAttrPos < nCntAttr && pHt->GetStart() == nStrPos
- && nStrPos != nEnd )
+ if (nAttrPos < nCntAttr && pHt->GetStart() == nStrPos)
{
do {
if ( pHt->End() && !pHt->HasDummyChar() )
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 26b6d2d370fe..cd94832ce815 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -755,7 +755,7 @@ void SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
InsertTag( aToken2, rItemSet, rPropInfo );
return;
}
- else if( pNext && CSS1_SELTYPE_PSEUDO == eNextType )
+ else if (CSS1_SELTYPE_PSEUDO == eNextType)
{
// maybe A:visited or A:link
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index d6b641ff8f52..43873b2d94ad 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -507,11 +507,8 @@ void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height )
const SwDoc *pDoc = pFrameFormat->GetDoc();
const SwPosition* pAPos = pFrameFormat->GetAnchor().GetContentAnchor();
- SwNode *pANd;
SwTableNode *pTableNd;
- if( pAPos &&
- nullptr != (pANd = & pAPos->nNode.GetNode()) &&
- nullptr != (pTableNd = pANd->FindTableNode()) )
+ if (pAPos && nullptr != (pTableNd = pAPos->nNode.GetNode().FindTableNode()))
{
const bool bLastGrf = !pTableNd->GetTable().DecGrfsThatResize();
SwHTMLTableLayout *pLayout =
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index d0dd6ca84bfb..13dd69cbd34f 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -694,7 +694,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
{
rWrt.OutBackground( pFrameFormat->GetAttrSet(), false );
- if( rWrt.m_bCfgOutStyles && pFrameFormat )
+ if (rWrt.m_bCfgOutStyles)
rWrt.OutCSS1_TableFrameFormatOptions( *pFrameFormat );
}