diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-23 09:47:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-23 09:48:10 +0000 |
commit | ed76d1d3504c92bff6bb3e6417e4440572fcd959 (patch) | |
tree | 6d06b4a20bef5acf0c1a4118685f09acdd27fbb7 /xmloff | |
parent | a61c4ae9cef23a53ea88f957e090bd5ee9b28ca6 (diff) |
loplugins:redundantcast teach it about c-style typedef casts
Change-Id: I1ac11a2481c0f4d8be1e1fd7c7637ac0ece3d65c
Reviewed-on: https://gerrit.libreoffice.org/35558
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/animationimport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/forms/propertyimport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/cdouthdl.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/xmlnume.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumi.cxx | 22 | ||||
-rw-r--r-- | xmloff/source/style/xmlstyle.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/txtfldi.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 4 |
8 files changed, 22 insertions, 22 deletions
diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 74f967560ef8..28aac0cafbb3 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -1091,7 +1091,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: if( xTransitionFilter.is() ) { if( SvXMLUnitConverter::convertEnum( nEnum, rValue, aAnimations_EnumMap_TransitionType ) ) - xTransitionFilter->setTransition( (sal_Int16)nEnum ); + xTransitionFilter->setTransition( nEnum ); } } break; @@ -1101,7 +1101,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: if( xTransitionFilter.is() ) { if( SvXMLUnitConverter::convertEnum( nEnum, rValue, aAnimations_EnumMap_TransitionSubType ) ) - xTransitionFilter->setSubtype( (sal_Int16)nEnum ); + xTransitionFilter->setSubtype( nEnum ); } } break; diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 16b1e36de110..2fc1045a9f8e 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -116,7 +116,7 @@ Any PropertyConversion::convertString( const css::uno::Type& _rExpectedType, if (TypeClass_SHORT == _rExpectedType.getTypeClass()) aReturn <<= (sal_Int16)nValue; else - aReturn <<= (sal_Int32)nValue; + aReturn <<= nValue; break; } bEnumAsInt = true; diff --git a/xmloff/source/style/cdouthdl.cxx b/xmloff/source/style/cdouthdl.cxx index 7f10c0288916..d81437fb5aaf 100644 --- a/xmloff/source/style/cdouthdl.cxx +++ b/xmloff/source/style/cdouthdl.cxx @@ -281,7 +281,7 @@ bool XMLCrossedOutTextPropHdl::importXML( const OUString& rStrImpValue, uno::Any sal_Int16 eStrikeout = ('/' == rStrImpValue[0] ? awt::FontStrikeout::SLASH : awt::FontStrikeout::X); - rValue <<= (sal_Int16)eStrikeout; + rValue <<= eStrikeout; bRet = true; } diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx index dc0db67ce914..cc9ec571bb2a 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -131,7 +131,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel, rProp.Value >>= sValue; if( !sValue.isEmpty() ) { - cBullet = (sal_Unicode)sValue[0]; + cBullet = sValue[0]; } } else if( rProp.Name == "BulletRelSize" ) diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index ccb171c197fd..c70a3c0ddec3 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -450,7 +450,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties() beans::PropertyValue *pProps = aPropSeq.getArray(); sal_Int32 nPos = 0; pProps[nPos].Name = "NumberingType"; - pProps[nPos++].Value <<= (sal_Int16)eType ; + pProps[nPos++].Value <<= eType ; pProps[nPos].Name = "Prefix"; pProps[nPos++].Value <<= sPrefix; @@ -463,26 +463,26 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties() sal_Int32 nLeftMargin = nSpaceBefore + nMinLabelWidth; pProps[nPos].Name = "LeftMargin"; - pProps[nPos++].Value <<= (sal_Int32)nLeftMargin; + pProps[nPos++].Value <<= nLeftMargin; sal_Int32 nFirstLineOffset = -nMinLabelWidth; pProps[nPos].Name = "FirstLineOffset"; - pProps[nPos++].Value <<= (sal_Int32)nFirstLineOffset; + pProps[nPos++].Value <<= nFirstLineOffset; pProps[nPos].Name = "SymbolTextDistance"; pProps[nPos++].Value <<= (sal_Int16)nMinLabelDist; pProps[nPos].Name = "PositionAndSpaceMode"; - pProps[nPos++].Value <<= (sal_Int16)ePosAndSpaceMode; + pProps[nPos++].Value <<= ePosAndSpaceMode; pProps[nPos].Name = "LabelFollowedBy"; - pProps[nPos++].Value <<= (sal_Int16)eLabelFollowedBy; + pProps[nPos++].Value <<= eLabelFollowedBy; pProps[nPos].Name = "ListtabStopPosition"; - pProps[nPos++].Value <<= (sal_Int32)nListtabStopPosition; + pProps[nPos++].Value <<= nListtabStopPosition; pProps[nPos].Name = "FirstLineIndent"; - pProps[nPos++].Value <<= (sal_Int32)nFirstLineIndent; + pProps[nPos++].Value <<= nFirstLineIndent; pProps[nPos].Name = "IndentAt"; - pProps[nPos++].Value <<= (sal_Int32)nIndentAt; + pProps[nPos++].Value <<= nIndentAt; OUString sDisplayTextStyleName = GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, sTextStyleName ); @@ -550,16 +550,16 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties() pProps[nPos++].Value <<= aSize; pProps[nPos].Name = "VertOrient"; - pProps[nPos++].Value <<= (sal_Int16)eImageVertOrient; + pProps[nPos++].Value <<= eImageVertOrient; } if( bNum ) { pProps[nPos].Name = "StartWith"; - pProps[nPos++].Value <<= (sal_Int16)nNumStartValue; + pProps[nPos++].Value <<= nNumStartValue; pProps[nPos].Name = "ParentNumbering"; - pProps[nPos++].Value <<= (sal_Int16)nNumDisplayLevels; + pProps[nPos++].Value <<= nNumDisplayLevels; } if( ( bNum || bBullet ) && nRelSize ) diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index 398832de1dc2..9f362ca19846 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -223,9 +223,9 @@ struct SvXMLStyleIndexCmp_Impl { sal_Int32 nRet; - if( (sal_uInt16)r1.GetFamily() < (sal_uInt16)r2.GetFamily() ) + if( r1.GetFamily() < r2.GetFamily() ) nRet = -1; - else if( (sal_uInt16)r1.GetFamily() > (sal_uInt16)r2.GetFamily() ) + else if( r1.GetFamily() > r2.GetFamily() ) nRet = 1; else nRet = r1.GetName().compareTo( r2.GetName() ); diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index e521e19eb982..308ea75fc69e 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -2056,7 +2056,7 @@ void XMLFileNameImportContext::ProcessAttribute( if (SvXMLUnitConverter::convertEnum(nTmp, sAttrValue, aFilenameDisplayMap)) { - nFormat = (sal_uInt16)nTmp; + nFormat = nTmp; } break; } @@ -2128,7 +2128,7 @@ void XMLTemplateNameImportContext::ProcessAttribute( if (SvXMLUnitConverter::convertEnum(nTmp, sAttrValue, aTemplateDisplayMap)) { - nFormat = (sal_uInt16)nTmp; + nFormat = nTmp; } break; } diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index d733d7ffa263..62491265a464 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -3450,7 +3450,7 @@ void XMLTextParagraphExport::exportText( const OUString& rText, if( nSpaceChars > 1 ) { OUStringBuffer sTmp; - sTmp.append( (sal_Int32)nSpaceChars ); + sTmp.append( nSpaceChars ); GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_C, sTmp.makeStringAndClear() ); } @@ -3513,7 +3513,7 @@ void XMLTextParagraphExport::exportText( const OUString& rText, if( nSpaceChars > 1 ) { OUStringBuffer sTmp; - sTmp.append( (sal_Int32)nSpaceChars ); + sTmp.append( nSpaceChars ); GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_C, sTmp.makeStringAndClear() ); } |