diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-04-28 00:03:33 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-05-03 22:31:57 +0200 |
commit | 2e87da7e81f942519f57955d79f63f3c727fbe0c (patch) | |
tree | e0be1d1cc7cb927121ce6fce4829f3bba781eaba /sw | |
parent | 51e8b2b5781e596c9b6943833e4c182bff2bc1e1 (diff) |
Avoid possible downcasts and rely on implicit type conversions
Change-Id: I5f4dcdeaaad9959780d270410686a93dc727b05d
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/fields/dbfld.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/fields/docufld.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/fields/expfld.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx index ae66fb925b67..631efa78f1c3 100644 --- a/sw/source/core/fields/dbfld.cxx +++ b/sw/source/core/fields/dbfld.cxx @@ -816,7 +816,7 @@ OUString SwDBSetNumberField::Expand() const { if(0 !=(GetSubType() & nsSwExtendedSubType::SUB_INVISIBLE) || nNumber == 0) return OUString(); - return FormatNumber((sal_uInt16)nNumber, GetFormat()); + return FormatNumber(nNumber, GetFormat()); } void SwDBSetNumberField::Evaluate(SwDoc* pDoc) diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 2a1001d98581..798ceab4a2f6 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -124,7 +124,7 @@ OUString SwPageNumberFieldType::Expand( sal_uInt32 nFmt, short nOff, if( SVX_NUM_CHAR_SPECIAL == nTmpFmt ) return rUserStr; - return FormatNumber( (sal_uInt16)nTmp, nTmpFmt ); + return FormatNumber( nTmp, nTmpFmt ); } SwFieldType* SwPageNumberFieldType::Copy() const @@ -749,7 +749,7 @@ OUString SwDocStatFieldType::Expand(sal_uInt16 nSubType, sal_uInt32 nFmt) const } if( nVal <= SHRT_MAX ) - return FormatNumber( (sal_uInt16)nVal, nFmt ); + return FormatNumber( nVal, nFmt ); return OUString::number( nVal ); } diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 94b99af0d08a..28f222c863e0 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -858,7 +858,7 @@ void SwSetExpField::SetValue( const double& rAny ) SwValueField::SetValue(rAny); if( IsSequenceFld() ) - sExpand = FormatNumber( (sal_uInt32)GetValue(), GetFormat() ); + sExpand = FormatNumber( GetValue(), GetFormat() ); else sExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue( rAny, GetFormat(), GetLanguage()); |