lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx | 13 ++++++------- vcl/source/window/layout.cxx | 1 - 2 files changed, 6 insertions(+), 8 deletions(-)
New commits: commit 6e2a017049c4a91632d69ffd02e63138616adda0 Author: Caolán McNamara <caol...@redhat.com> Date: Fri May 11 15:49:23 2018 +0100 coverity#1430057 rework warning code to use nonwarning pattern Change-Id: I1e41e81a88825a7c91ffb9603eb9d769bd41822a Reviewed-on: https://gerrit.libreoffice.org/54143 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx index ba9523bc78f8..c33c7176c0b3 100644 --- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx +++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx @@ -263,8 +263,6 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo sal_Int16 nMaxLeading, const css::beans::PropertyValues& aProperties ) { - int k = 0; - PropertyHelper_Hyphenation& rHelper = GetPropHelper(); rHelper.SetTmpPropVals(aProperties); sal_Int16 minTrail = rHelper.GetMinTrailing(); @@ -276,15 +274,15 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo Reference< XHyphenatedWord > xRes; - k = -1; - for (size_t j = 0; j < mvDicts.size(); j++) + int k = -1; + for (size_t j = 0; j < mvDicts.size(); ++j) { if (aLocale == mvDicts[j].aLoc) k = j; } // if we have a hyphenation dictionary matching this locale - if (k >= 0) + if (k != -1) { int nHyphenationPos = -1; int nHyphenationPosAlt = -1; @@ -520,9 +518,10 @@ Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const } int k = -1; - for (size_t j = 0; j < mvDicts.size(); j++) + for (size_t j = 0; j < mvDicts.size(); ++j) { - if (aLocale == mvDicts[j].aLoc) k = j; + if (aLocale == mvDicts[j].aLoc) + k = j; } // if we have a hyphenation dictionary matching this locale commit a4ca3023e22e2435d16e905696e5dad589f3f47d Author: Caolán McNamara <caol...@redhat.com> Date: Sat May 12 12:34:16 2018 +0100 unnecessary duplicate SetImage Change-Id: Ie337eeae3c8295c4d7e62401f438c50d5bfc9693 Reviewed-on: https://gerrit.libreoffice.org/54159 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 432796da766d..8f8e82975b25 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2355,7 +2355,6 @@ MessageDialog::MessageDialog(vcl::Window* pParent, break; case VclMessageType::Question: SetText(GetStandardQueryBoxText()); - m_pImage->SetImage(GetStandardQueryBoxImage()); break; case VclMessageType::Error: SetText(GetStandardErrorBoxText()); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits