summaryrefslogtreecommitdiff
path: root/svtools
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 /svtools
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 'svtools')
-rw-r--r--svtools/source/contnr/imivctl1.cxx2
-rw-r--r--svtools/source/control/inettbc.cxx8
2 files changed, 3 insertions, 7 deletions
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: