summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-05 19:30:53 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-08-05 22:11:36 +0200
commit98788274275d7c9effa2a3839469bd35d9290f1e (patch)
tree5f3c0e0b26e2aa83ae4bca1e5ebcd4a85b93f5a5 /sw
parent2c4401b9051ceb955de367f7d63d1e8a6038399d (diff)
coverity#1438225 Improper use of negative value
and coverity#1438221 Argument cannot be negative coverity#1438213 Argument cannot be negative coverity#1438227 Argument cannot be negative coverity#1438223 Argument cannot be negative coverity#1438222 Argument cannot be negative coverity#1438215 Improper use of negative value coverity#1438220 Improper use of negative value coverity#1438217 Improper use of negative value Change-Id: I398ae9901b27f6b65f03aad03638939b5880a671 Reviewed-on: https://gerrit.libreoffice.org/58626 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/tox/txmsrt.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
-rw-r--r--sw/source/uibase/misc/glosdoc.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx
index 41b66760ec20..a5dbd956b0c5 100644
--- a/sw/source/core/tox/txmsrt.cxx
+++ b/sw/source/core/tox/txmsrt.cxx
@@ -673,7 +673,7 @@ sal_uInt16 SwTOXAuthority::GetLevel() const
sal_uInt16 nRet = 1;
if( pTOXIntl->IsNumeric( sText ) )
{
- nRet = static_cast<sal_uInt16>(sText.toInt32());
+ nRet = sText.toUInt32();
nRet++;
}
//illegal values are also set to 'ARTICLE' as non-numeric values are
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 5f112ea0b1fc..9ea5388cbc4b 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2652,7 +2652,7 @@ bool DocxAttributeOutput::StartURL( const OUString& rUrl, const OUString& rTarge
// Extract <seqname>, the field instruction text has the name quoted.
OUString aSequenceName = sMark.copy(0, nPos);
// Extract <index>.
- sal_uInt32 nIndex = sMark.copy(nPos + 1, sMark.getLength() - nPos - sizeof("|sequence")).toInt32();
+ sal_uInt32 nIndex = sMark.copy(nPos + 1, sMark.getLength() - nPos - sizeof("|sequence")).toUInt32();
std::map<OUString, std::vector<OString> >::iterator it = m_aSeqBookmarksNames.find(aSequenceName);
if (it != m_aSeqBookmarksNames.end())
{
diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx
index c23f9d36c127..b2037bc4e61b 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -120,7 +120,7 @@ bool SwGlossaries::FindGroupName(OUString& rGroup)
for(size_t i = 0; i < nCount; ++i)
{
const OUString sTemp( GetGroupName( i ));
- sal_uInt16 nPath = static_cast<sal_uInt16>(sTemp.getToken(1, GLOS_DELIM).toInt32());
+ sal_uInt16 nPath = sTemp.getToken(1, GLOS_DELIM).toUInt32();
if (!SWUnoHelper::UCB_IsCaseSensitiveFileName( m_PathArr[nPath] )
&& rSCmp.isEqual( rGroup, sTemp.getToken( 0, GLOS_DELIM) ) )