[Libreoffice-commits] core.git: i18npool/source linguistic/source lotuswordpro/source sfx2/source svx/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Nov 25 19:36:19 UTC 2018
i18npool/source/localedata/LocaleNode.cxx | 2 +-
linguistic/source/lngsvcmgr.cxx | 6 +++---
lotuswordpro/source/filter/lwpfnlayout.cxx | 4 ++--
lotuswordpro/source/filter/lwppara.cxx | 2 +-
sfx2/source/appl/linkmgr2.cxx | 9 +++++----
svx/source/sidebar/line/LinePropertyPanelBase.cxx | 14 +++++++-------
6 files changed, 19 insertions(+), 18 deletions(-)
New commits:
commit 4ac2f1799f1d6d428c06e5699c246184dd8590ad
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Nov 25 19:52:09 2018 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sun Nov 25 20:35:57 2018 +0100
tdf#120703 PVS: V560 A part of conditional expression is always true/false
Change-Id: I2ae298f49ceba8059cd7236431db9a4d9a46b125
Reviewed-on: https://gerrit.libreoffice.org/63992
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 11d3f4bb070c..a3d2595022f0 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -2025,7 +2025,7 @@ void LCMiscNode::generateCode (const OFileWriter &of) const
}
of.writeParameter("ReservedWord", str, nbOfWords);
// "true", ..., "below" trigger untranslated warning.
- if (!bEnglishLocale && curNode && (0 <= i && i <= 7) &&
+ if (!bEnglishLocale && curNode && i <= 7 &&
str.equalsIgnoreAsciiCaseAscii( ReserveWord[i].value))
{
fprintf( stderr,
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 9d57c1432b29..a95f5bfd4fbd 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -1585,7 +1585,7 @@ void SAL_CALL
mxSpellDsp->SetServiceList( rLocale, rServiceImplNames );
SaveCfgSvcs( SN_SPELLCHECKER );
- if (mxListenerHelper.is() && bChanged)
+ if (mxListenerHelper)
mxListenerHelper->AddLngSvcEvt(
linguistic2::LinguServiceEventFlags::SPELL_CORRECT_WORDS_AGAIN |
linguistic2::LinguServiceEventFlags::SPELL_WRONG_WORDS_AGAIN );
@@ -1602,7 +1602,7 @@ void SAL_CALL
mxGrammarDsp->SetServiceList( rLocale, rServiceImplNames );
SaveCfgSvcs( SN_GRAMMARCHECKER );
- if (mxListenerHelper.is() && bChanged)
+ if (mxListenerHelper)
mxListenerHelper->AddLngSvcEvt(
linguistic2::LinguServiceEventFlags::PROOFREAD_AGAIN );
}
@@ -1618,7 +1618,7 @@ void SAL_CALL
mxHyphDsp->SetServiceList( rLocale, rServiceImplNames );
SaveCfgSvcs( SN_HYPHENATOR );
- if (mxListenerHelper.is() && bChanged)
+ if (mxListenerHelper)
mxListenerHelper->AddLngSvcEvt(
linguistic2::LinguServiceEventFlags::HYPHENATE_AGAIN );
}
diff --git a/lotuswordpro/source/filter/lwpfnlayout.cxx b/lotuswordpro/source/filter/lwpfnlayout.cxx
index c2ac01055119..6dc167ff8dda 100644
--- a/lotuswordpro/source/filter/lwpfnlayout.cxx
+++ b/lotuswordpro/source/filter/lwpfnlayout.cxx
@@ -264,7 +264,7 @@ LwpVirtualLayout* LwpEnSuperTableLayout::GetMainTableLayout()
{
break;
}
- if (pLayout && pLayout->GetLayoutType() == LWP_ENDNOTE_LAYOUT)
+ if (pLayout->GetLayoutType() == LWP_ENDNOTE_LAYOUT)
{
return pLayout;
}
@@ -321,7 +321,7 @@ LwpVirtualLayout* LwpFnSuperTableLayout::GetMainTableLayout()
{
break;
}
- if (pLayout && pLayout->GetLayoutType() == LWP_FOOTNOTE_LAYOUT)
+ if (pLayout->GetLayoutType() == LWP_FOOTNOTE_LAYOUT)
{
return pLayout;
}
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index aca3fb934ac3..5b92281b0560 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -546,7 +546,7 @@ void LwpPara::RegisterStyle()
}
else
{
- if (pNumbering && pNumbering->GetLevel() < nFoundBound && pParaSilverBullet
+ if (pNumbering->GetLevel() < nFoundBound
&& (pParaSilverBullet->GetObjectID() != m_pSilverBullet->GetObjectID()
|| pNumbering->GetPosition() != nPosition))
{
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 05c817ab7855..b2d9d8a37b61 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -471,14 +471,15 @@ void LinkManager::InsertFileLink(
void LinkManager::CancelTransfers()
{
SvFileObject* pFileObj;
- sfx2::SvBaseLink* pLnk;
const sfx2::SvBaseLinks& rLnks = GetLinks();
for( size_t n = rLnks.size(); n; )
- if( nullptr != ( pLnk = &(*rLnks[ --n ])) &&
- OBJECT_CLIENT_FILE == (OBJECT_CLIENT_FILE & pLnk->GetObjType()) &&
- nullptr != ( pFileObj = static_cast<SvFileObject*>(pLnk->GetObj()) ) )
+ {
+ const sfx2::SvBaseLink& rLnk = *rLnks[--n];
+ if (OBJECT_CLIENT_FILE == (OBJECT_CLIENT_FILE & rLnk.GetObjType())
+ && nullptr != (pFileObj = static_cast<SvFileObject*>(rLnk.GetObj())))
pFileObj->CancelTransfers();
+ }
}
// For the purpose of sending Status information from the file object to
diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
index 33c478fc457f..618aece61eec 100644
--- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx
+++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx
@@ -705,19 +705,19 @@ void LinePropertyPanelBase::SetWidthIcon()
if(nVal <= 6)
mpTBWidth->SetItemImage( nIdWidth, mpIMGWidthIcon[0]);
- else if(nVal > 6 && nVal <= 9)
+ else if (nVal <= 9)
mpTBWidth->SetItemImage( nIdWidth, mpIMGWidthIcon[1]);
- else if(nVal > 9 && nVal <= 12)
+ else if (nVal <= 12)
mpTBWidth->SetItemImage( nIdWidth, mpIMGWidthIcon[2]);
- else if(nVal > 12 && nVal <= 19)
+ else if (nVal <= 19)
mpTBWidth->SetItemImage( nIdWidth, mpIMGWidthIcon[3]);
- else if(nVal > 19 && nVal <= 26)
+ else if (nVal <= 26)
mpTBWidth->SetItemImage( nIdWidth, mpIMGWidthIcon[4]);
- else if(nVal > 26 && nVal <= 37)
+ else if (nVal <= 37)
mpTBWidth->SetItemImage( nIdWidth, mpIMGWidthIcon[5]);
- else if(nVal > 37 && nVal <=52)
+ else if (nVal <= 52)
mpTBWidth->SetItemImage( nIdWidth, mpIMGWidthIcon[6]);
- else if(nVal > 52)
+ else
mpTBWidth->SetItemImage( nIdWidth, mpIMGWidthIcon[7]);
}
More information about the Libreoffice-commits
mailing list