[Libreoffice-commits] core.git: cppcanvas/source framework/source hwpfilter/source lingucomponent/source linguistic/source reportdesign/source sc/source sdext/source sd/source smoketest/libtest.cxx svtools/source svx/source sw/source tools/source vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Nov 25 15:52:51 UTC 2018
cppcanvas/source/mtfrenderer/implrenderer.cxx | 2 +-
framework/source/layoutmanager/layoutmanager.cxx | 5 ++---
hwpfilter/source/hwpreader.cxx | 8 ++++----
lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx | 4 ++--
linguistic/source/gciterator.cxx | 13 +++++--------
reportdesign/source/ui/dlg/GroupsSorting.cxx | 6 +++---
sc/source/core/data/global2.cxx | 2 +-
sc/source/core/tool/interpr2.cxx | 2 +-
sc/source/core/tool/interpr3.cxx | 6 +++---
sc/source/core/tool/interpr5.cxx | 10 +++++-----
sd/source/ui/dlg/headerfooterdlg.cxx | 2 +-
sdext/source/minimizer/impoptimizer.cxx | 2 +-
smoketest/libtest.cxx | 3 +--
svtools/source/contnr/imivctl1.cxx | 2 +-
svtools/source/control/inettbc.cxx | 8 ++------
svx/source/dialog/graphctl.cxx | 2 +-
svx/source/fmcomp/gridctrl.cxx | 2 +-
sw/source/core/layout/hffrm.cxx | 2 +-
sw/source/filter/html/htmlatr.cxx | 7 ++-----
sw/source/filter/html/htmlcss1.cxx | 2 +-
sw/source/filter/html/htmlform.cxx | 5 +----
sw/source/filter/html/htmltabw.cxx | 2 +-
tools/source/inet/inetmime.cxx | 2 +-
vcl/source/filter/graphicfilter.cxx | 4 ++--
vcl/source/treelist/imap2.cxx | 4 ++--
25 files changed, 46 insertions(+), 61 deletions(-)
New commits:
commit c59a5b81e9521a92587e701bcad82bf643b00493
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Nov 25 16:31:42 2018 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sun Nov 25 16:52:30 2018 +0100
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 at collabora.com>
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index cee91bcd3853..84b46e003aad 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -2798,7 +2798,7 @@ namespace cppcanvas
aSubset.mnSubsetBegin = 0;
aSubset.mnSubsetEnd = nEndIndex - aRangeEnd->mnOrigIndex;
- ENSURE_OR_RETURN_FALSE( aSubset.mnSubsetBegin >= 0 && aSubset.mnSubsetEnd >= 0,
+ ENSURE_OR_RETURN_FALSE(aSubset.mnSubsetEnd >= 0,
"ImplRenderer::forSubsetRange(): Invalid indices" );
rFunctor( *aRangeEnd, aSubset );
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index b33f92557fd9..d26927ae61d2 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -478,13 +478,12 @@ bool LayoutManager::readWindowStateData( const OUString& aName, UIElement& rElem
SolarMutexResettableGuard aWriteLock;
bool bGlobalSettings( bInGlobalSettings );
- GlobalSettings* pGlobalSettings( nullptr );
if ( rGlobalSettings == nullptr )
{
rGlobalSettings.reset( new GlobalSettings( rComponentContext ) );
bGetSettingsState = true;
}
- pGlobalSettings = rGlobalSettings.get();
+ GlobalSettings* pGlobalSettings = rGlobalSettings.get();
aWriteLock.clear();
try
@@ -563,7 +562,7 @@ bool LayoutManager::readWindowStateData( const OUString& aName, UIElement& rElem
}
// oversteer values with global settings
- if ( pGlobalSettings && ( bGetSettingsState || bGlobalSettings ))
+ if (bGetSettingsState || bGlobalSettings)
{
if ( pGlobalSettings->HasToolbarStatesInfo())
{
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index dea71b5ea4e9..71ee7fd40689 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -1146,7 +1146,7 @@ void HwpReader::makeMasterStyles()
rendEl("style:header");
}
/* Will be the default. */
- else if( pPage->header_odd && !pPage->header_even )
+ else if (pPage->header_odd)
{
rstartEl("style:header", mxList.get());
padd("text:style-name", sXML_CDATA, "Standard");
@@ -1181,7 +1181,7 @@ void HwpReader::makeMasterStyles()
rendEl("style:header-left");
}
/* Will be the default. */
- else if( pPage->header_even && !pPage->header_odd )
+ else if (pPage->header_even)
{
rstartEl("style:header-left", mxList.get());
padd("text:style-name", sXML_CDATA, "Standard");
@@ -1247,7 +1247,7 @@ void HwpReader::makeMasterStyles()
rendEl("style:footer");
}
/* Will be the default. */
- else if( pPage->footer_odd && !pPage->footer_even )
+ else if (pPage->footer_odd)
{
rstartEl("style:footer", mxList.get());
padd("text:style-name", sXML_CDATA, "Standard");
@@ -1282,7 +1282,7 @@ void HwpReader::makeMasterStyles()
rendEl("style:footer-left");
}
/* Will be the default. */
- else if( pPage->footer_even && !pPage->footer_odd )
+ else if (pPage->footer_even)
{
rstartEl("style:footer-left", mxList.get());
padd("text:style-name", sXML_CDATA, "Standard");
diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
index 01c587c60ec4..181d6a8bb0f4 100644
--- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
@@ -381,7 +381,7 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo
{
int leftrep = 0;
bool hit = (n >= minLen);
- if (!rep || !rep[i] || (i >= n))
+ if (!rep || !rep[i])
{
hit = hit && (hyphens[i]&1) && (i < Leading);
hit = hit && (i >= (minLead-1) );
@@ -407,7 +407,7 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo
if (hit)
{
nHyphenationPos = i;
- if (rep && (i < n) && rep[i])
+ if (rep && rep[i])
{
nHyphenationPosAlt = i - pos[i];
nHyphenationPosAltHyph = i + leftrep - pos[i];
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index 9e1e11532080..5d27876d6d57 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -206,14 +206,11 @@ static sal_Int32 lcl_BacktraceWhiteSpaces( const OUString &rText, sal_Int32 nSta
if (0 <= nPosBefore && nPosBefore < nLen && lcl_IsWhiteSpace( pStart[ nPosBefore ] ))
{
nStartPos = nPosBefore;
- if (0 <= nStartPos && nStartPos < nLen)
- {
- const sal_Unicode *pText = rText.getStr() + nStartPos;
- while (pText > pStart && lcl_IsWhiteSpace( *pText ))
- --pText;
- // now add 1 since we want to point to the first char after the last char in the sentence...
- nRes = pText - pStart + 1;
- }
+ const sal_Unicode *pText = rText.getStr() + nStartPos;
+ while (pText > pStart && lcl_IsWhiteSpace( *pText ))
+ --pText;
+ // now add 1 since we want to point to the first char after the last char in the sentence...
+ nRes = pText - pStart + 1;
}
DBG_ASSERT( 0 <= nRes && nRes <= nLen, "lcl_BacktraceWhiteSpaces return value out of range" );
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index a47ae0ea4640..bac0c4dbae50 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -887,8 +887,8 @@ void OGroupsSortingDialog::UpdateData( )
void OGroupsSortingDialog::DisplayData( sal_Int32 _nRow )
{
- sal_Int32 nGroupPos = m_pFieldExpression->getGroupPosition(_nRow);
- bool bEmpty = nGroupPos == NO_GROUP;
+ const sal_Int32 nGroupPos = m_pFieldExpression->getGroupPosition(_nRow);
+ const bool bEmpty = nGroupPos == NO_GROUP;
m_pProperties->Enable(!bEmpty);
checkButtons(_nRow);
@@ -896,7 +896,7 @@ void OGroupsSortingDialog::DisplayData( sal_Int32 _nRow )
if ( m_pCurrentGroupListener.is() )
m_pCurrentGroupListener->dispose();
m_pCurrentGroupListener = nullptr;
- if ( !bEmpty && nGroupPos != NO_GROUP )
+ if (!bEmpty)
{
uno::Reference< report::XGroup> xGroup = getGroup(nGroupPos);
diff --git a/sc/source/core/data/global2.cxx b/sc/source/core/data/global2.cxx
index 6ae017c103e9..04687ebf7ab0 100644
--- a/sc/source/core/data/global2.cxx
+++ b/sc/source/core/data/global2.cxx
@@ -229,7 +229,7 @@ bool ScSolveParam::operator==( const ScSolveParam& r ) const
bEqual = true;
else if ( !pStrTargetVal || !r.pStrTargetVal )
bEqual = false;
- else if ( pStrTargetVal && r.pStrTargetVal )
+ else
bEqual = ( *pStrTargetVal == *(r.pStrTargetVal) );
}
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index c151000f34e1..aeba2c660b5d 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -627,7 +627,7 @@ void ScInterpreter::ScWorkday_MS()
while ( nRef >= 0 && nSortArray.at( nRef ) > nDate )
nRef--;
- if ( !( nRef >= 0 && nSortArray.at( nRef ) == nDate ) || nRef < 0 )
+ if (nRef < 0 || nSortArray.at(nRef) != nDate)
nDays++;
}
}
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index 56078ea0b915..ac980b7257da 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -218,7 +218,7 @@ double ScInterpreter::gauss(double x)
0.00000000011301172, 0.00000000000511243, -0.00000000000021218 };
nVal = taylor(t0, 11, (xAbs * xAbs)) * xAbs;
}
- else if ((xShort >= 1) && (xShort <= 2))
+ else if (xShort <= 2)
{
static const double t2[] =
{ 0.47724986805182079, 0.05399096651318805, -0.05399096651318805,
@@ -231,7 +231,7 @@ double ScInterpreter::gauss(double x)
-0.00000000000172127, -0.00000000000008634, 0.00000000000007894 };
nVal = taylor(t2, 23, (xAbs - 2.0));
}
- else if ((xShort >= 3) && (xShort <= 4))
+ else if (xShort <= 4)
{
static const double t4[] =
{ 0.49996832875816688, 0.00013383022576489, -0.00026766045152977,
@@ -4083,7 +4083,7 @@ void ScInterpreter::ScRank( bool bAverage )
double fFirstPos = -1.0;
bool bFinished = false;
SCSIZE i;
- for ( i = 0; i < nSize && !bFinished && nGlobalError == FormulaError::NONE; i++ )
+ for (i = 0; i < nSize && !bFinished; i++)
{
if ( aSortArray[ i ] == fVal )
{
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 2ab00919d6fa..c898d7a95057 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -740,7 +740,7 @@ static int lcl_LUP_decompose( ScMatrix* mA, const SCSIZE n,
bool bSingular=false;
for (SCSIZE i=0; i<n && !bSingular; i++)
- bSingular = bSingular || ((mA->GetDouble(i,i))==0.0);
+ bSingular = (mA->GetDouble(i,i)) == 0.0;
if (bSingular)
nSign = 0;
@@ -2520,7 +2520,7 @@ void ScInterpreter::CalculateRGPRKP(bool _bRKP)
// that they aren't zero.
bool bIsSingular=false;
for (SCSIZE row=0; row < K && !bIsSingular; row++)
- bIsSingular = bIsSingular || aVecR[row]==0.0;
+ bIsSingular = aVecR[row] == 0.0;
if (bIsSingular)
{
PushNoValue();
@@ -2677,7 +2677,7 @@ void ScInterpreter::CalculateRGPRKP(bool _bRKP)
// that they aren't zero.
bool bIsSingular=false;
for (SCSIZE row=0; row < K && !bIsSingular; row++)
- bIsSingular = bIsSingular || aVecR[row]==0.0;
+ bIsSingular = aVecR[row] == 0.0;
if (bIsSingular)
{
PushNoValue();
@@ -3018,7 +3018,7 @@ void ScInterpreter::CalculateTrendGrowth(bool _bGrowth)
// that they aren't zero.
bool bIsSingular=false;
for (SCSIZE row=0; row < K && !bIsSingular; row++)
- bIsSingular = bIsSingular || aVecR[row]==0.0;
+ bIsSingular = aVecR[row] == 0.0;
if (bIsSingular)
{
PushNoValue();
@@ -3077,7 +3077,7 @@ void ScInterpreter::CalculateTrendGrowth(bool _bGrowth)
// that they aren't zero.
bool bIsSingular=false;
for (SCSIZE row=0; row < K && !bIsSingular; row++)
- bIsSingular = bIsSingular || aVecR[row]==0.0;
+ bIsSingular = aVecR[row] == 0.0;
if (bIsSingular)
{
PushNoValue();
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index 1be962aa96e4..6f3e6464d15d 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -662,7 +662,7 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType &rLanguage, boo
for (sal_Int32 nPara = 0; (nPara < nParaCount) && !bHasDateFieldItem; ++nPara)
{
sal_uInt16 nFieldCount = pEdit->GetFieldCount(nPara);
- for (sal_uInt16 nField = 0; (nField < nFieldCount) && !bHasDateFieldItem; ++nField)
+ for (sal_uInt16 nField = 0; (nField < nFieldCount); ++nField)
{
EFieldInfo aFieldInfo = pEdit->GetFieldInfo(nPara, nField);
if (aFieldInfo.pFieldItem)
diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx
index b1559d9500e5..da4f611bc474 100644
--- a/sdext/source/minimizer/impoptimizer.cxx
+++ b/sdext/source/minimizer/impoptimizer.cxx
@@ -306,7 +306,7 @@ static Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentCont
if ( ( aSourceSizePixel.Width > 0 ) && ( aSourceSizePixel.Height > 0 ) )
{
OUString aDestMimeType( "image/png" );
- if ( rGraphicSettings.mbJPEGCompression && !bTransparent && !bAlpha && !bAnimated )
+ if (rGraphicSettings.mbJPEGCompression && !bTransparent && !bAlpha)
{
aDestMimeType = "image/jpeg";
// if( aSourceMimeType != aDestMimeType )
diff --git a/smoketest/libtest.cxx b/smoketest/libtest.cxx
index 244d32a3d335..c23f1d2a992c 100644
--- a/smoketest/libtest.cxx
+++ b/smoketest/libtest.cxx
@@ -73,8 +73,7 @@ int main (int argc, char **argv)
start = getTimeMS();
- if( argc < 2 ||
- ( argc > 1 && ( !strcmp( argv[1], "--help" ) || !strcmp( argv[1], "-h" ) ) ) )
+ if (argc < 2 || !strcmp(argv[1], "--help") || !strcmp(argv[1], "-h"))
return help();
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 0f11688fe863..066562294ce0 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -2425,7 +2425,7 @@ void SvxIconChoiceCtrl_Impl::SelectRect( const tools::Rectangle& rRect, bool bAd
if( bSelected )
SelectEntry( pEntry, false, true );
}
- else if( bAdd && bOverlaps )
+ else if (bOverlaps)
{
// The entry is inside an old (=>span multiple rectangles with Ctrl)
// selection rectangle.
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 5120dfdbb53f..bcd14d5b6eee 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -1150,12 +1150,11 @@ void MatchContext_Impl::doExecute()
INetProtocol eBaseProt = INetURLObject::CompareProtocolScheme( pBox->aBaseURL );
if ( pBox->aBaseURL.isEmpty() )
eBaseProt = INetURLObject::CompareProtocolScheme( SvtPathOptions().GetWorkPath() );
- INetProtocol eSmartProt = INetProtocol::NotValid;
// if the user input is a valid URL, go on with it
// otherwise it could be parsed smart with a predefined smart protocol
// ( or if this is not set with the protocol of a predefined base URL )
- if( eProt == INetProtocol::NotValid || eProt == eSmartProt || (eSmartProt == INetProtocol::NotValid && eProt == eBaseProt) )
+ if (eProt == INetProtocol::NotValid || eProt == eBaseProt)
{
// not stopped yet ?
if( schedule() )
@@ -1264,7 +1263,7 @@ void MatchContext_Impl::doExecute()
INetURLObject aCurObj;
OUString aCurString, aCurMainURL;
INetURLObject aObj;
- aObj.SetSmartProtocol( eSmartProt == INetProtocol::NotValid ? INetProtocol::Http : eSmartProt );
+ aObj.SetSmartProtocol(INetProtocol::Http);
for( ;; )
{
for(const auto& rPick : aPickList)
@@ -1279,9 +1278,6 @@ void MatchContext_Impl::doExecute()
if( eProt != INetProtocol::NotValid && aCurObj.GetProtocol() != eProt )
continue;
- if( eSmartProt != INetProtocol::NotValid && aCurObj.GetProtocol() != eSmartProt )
- continue;
-
switch( aCurObj.GetProtocol() )
{
case INetProtocol::Http:
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index 22a4443e1cea..12920202fff6 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -463,7 +463,7 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
else
{
// move handle with index nHandleIndex
- if(pHdl && (nX || nY))
+ if (nX || nY)
{
// now move the Handle (nX, nY)
Point aStartPoint(pHdl->GetPos());
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 0827efb3df9b..d52cf33efbe8 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -2352,7 +2352,7 @@ bool DbGridControl::SeekCursor(long nRow, bool bAbsolute)
DBG_ASSERT( !m_pSeekCursor->isAfterLast() && !m_pSeekCursor->isBeforeFirst(),
"DbGridControl::SeekCursor: how did the seek cursor get to this position?!" );
nSteps = nRow - (m_pSeekCursor->getRow() - 1);
- bAbsolute = bAbsolute || (std::abs(nSteps) > 100);
+ bAbsolute = std::abs(nSteps) > 100;
}
if ( bAbsolute )
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx
index da3442879815..c3c5e34d2942 100644
--- a/sw/source/core/layout/hffrm.cxx
+++ b/sw/source/core/layout/hffrm.cxx
@@ -715,7 +715,7 @@ void SwPageFrame::PrepareHeader()
if ( GetUpper() )
::RegistFlys( this, pH );
}
- else if ( pLay && pLay->IsHeaderFrame() )
+ else if (pLay->IsHeaderFrame())
{ // Remove header if present.
::DelFlys( pLay, this );
pLay->Cut();
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 );
}
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index 0b0cafc2c85f..decd1041a547 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -1163,7 +1163,7 @@ OUString INetMIME::decodeHeaderFieldBody(const OString& rBody)
for (const sal_Char * p = pBegin; p != pEnd;)
{
OUString sEncodedText;
- if (p != pEnd && *p == '=' /* && bStartEncodedWord */)
+ if (*p == '=' /* && bStartEncodedWord */)
{
const sal_Char * q = p + 1;
bool bEncodedWord = q != pEnd && *q++ == '?';
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 6eaccfbc37ee..efe986c71977 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1675,7 +1675,6 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath,
ErrCode nStatus;
GfxLinkType eLinkType = GfxLinkType::NONE;
const bool bLinkSet = rGraphic.IsGfxLink();
- std::unique_ptr<FilterConfigItem> pFilterConfigItem;
Size aPreviewSizeHint( 0, 0 );
bool bAllowPartialStreamRead = false;
@@ -2018,11 +2017,12 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath,
nStatus = ERRCODE_GRFILTER_FILTERERROR;
else
{
+ std::unique_ptr<FilterConfigItem> pFilterConfigItem;
OUString aShortName;
if( nFormat != GRFILTER_FORMAT_DONTKNOW )
{
aShortName = GetImportFormatShortName( nFormat ).toAsciiUpperCase();
- if ( ( !pFilterConfigItem ) && aShortName == "PCD" )
+ if (aShortName == "PCD")
{
OUString aFilterConfigPath( "Office.Common/Filter/Graphic/Import/PCD" );
pFilterConfigItem = o3tl::make_unique<FilterConfigItem>( aFilterConfigPath );
diff --git a/vcl/source/treelist/imap2.cxx b/vcl/source/treelist/imap2.cxx
index d2bcc37a8520..80df5e6a8412 100644
--- a/vcl/source/treelist/imap2.cxx
+++ b/vcl/source/treelist/imap2.cxx
@@ -254,7 +254,7 @@ void ImageMap::ImpReadCERNLine( const OString& rLine )
// find instruction
OStringBuffer aBuf;
- while( ( cChar >= 'a' ) && ( cChar <= 'z' ) && NOTEOL( cChar ) )
+ while ((cChar >= 'a') && (cChar <= 'z'))
{
aBuf.append(cChar);
cChar = *pStr++;
@@ -389,7 +389,7 @@ void ImageMap::ImpReadNCSALine( const OString& rLine )
// find instruction
OStringBuffer aBuf;
- while( ( cChar >= 'a' ) && ( cChar <= 'z' ) && NOTEOL( cChar ) )
+ while ((cChar >= 'a') && (cChar <= 'z'))
{
aBuf.append(cChar);
cChar = *pStr++;
More information about the Libreoffice-commits
mailing list