diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:09:29 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:09:29 +0100 |
commit | dec5264878903ee010e9a6296357750f6c69c844 (patch) | |
tree | e987833003c31730486c95e82b6cc97b960de1a2 /xmloff/source/transform | |
parent | ab279d30de4188baa4b33688aaed96072f3b4818 (diff) |
More loplugin:cstylecast: xmloff
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files
Change-Id: Ic872cef7bb9982305528ec3ce12a1871f055b752
Diffstat (limited to 'xmloff/source/transform')
-rw-r--r-- | xmloff/source/transform/OOo2Oasis.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/transform/Oasis2OOo.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/transform/StyleOASISTContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/transform/StyleOOoTContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/transform/TransformerBase.cxx | 6 |
5 files changed, 7 insertions, 7 deletions
diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx index 7548ccbe5974..45b9279bb66c 100644 --- a/xmloff/source/transform/OOo2Oasis.cxx +++ b/xmloff/source/transform/OOo2Oasis.cxx @@ -1946,7 +1946,7 @@ sal_Int64 SAL_CALL OOo2OasisTransformer::getSomething( const Sequence< sal_Int8 } else { - return (sal_Int64)0; + return sal_Int64(0); } } diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx index 5a981090c6ff..27aa5aebbb1c 100644 --- a/xmloff/source/transform/Oasis2OOo.cxx +++ b/xmloff/source/transform/Oasis2OOo.cxx @@ -1933,7 +1933,7 @@ sal_Int64 SAL_CALL Oasis2OOoTransformer::getSomething( const Sequence< sal_Int8 } else { - return (sal_Int64)0; + return sal_Int64(0); } } diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx index 151e5367be0a..3546f0bc7377 100644 --- a/xmloff/source/transform/StyleOASISTContext.cxx +++ b/xmloff/source/transform/StyleOASISTContext.cxx @@ -507,7 +507,7 @@ void XMLPropertiesTContext_Impl::StartElement( { sal_Int32 nValue; ::sax::Converter::convertPercent( nValue, rAttrValue ); - const double fValue = ((double)nValue) / 100.0; + const double fValue = static_cast<double>(nValue) / 100.0; pAttrList->AddAttribute( rAttrName, OUString::number( fValue ) ); } break; diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx index 29512be6af94..738f1e7622d7 100644 --- a/xmloff/source/transform/StyleOOoTContext.cxx +++ b/xmloff/source/transform/StyleOOoTContext.cxx @@ -900,7 +900,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement( case XML_ATACTION_GAMMA_OOO: // converts double value to percentage { double fValue = sAttrValue.toDouble(); - sal_Int32 nValue = (sal_Int32)((fValue * 100.0) + ( fValue > 0 ? 0.5 : - 0.5 ) ); + sal_Int32 nValue = static_cast<sal_Int32>((fValue * 100.0) + ( fValue > 0 ? 0.5 : - 0.5 ) ); OUStringBuffer aOut; ::sax::Converter::convertPercent( aOut, nValue ); diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx index 3dafadeb6937..34864459a114 100644 --- a/xmloff/source/transform/TransformerBase.cxx +++ b/xmloff/source/transform/TransformerBase.cxx @@ -567,7 +567,7 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList( { // #i13778#,#i36248# apply correct twip-to-1/100mm - nMeasure = (sal_Int32)( nMeasure >= 0 + nMeasure = static_cast<sal_Int32>( nMeasure >= 0 ? ((nMeasure*127+36)/72) : ((nMeasure*127-36)/72) ); @@ -735,7 +735,7 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList( { // #i13778#,#i36248#/ apply correct 1/100mm-to-twip conversion - nMeasure = (sal_Int32)( nMeasure >= 0 + nMeasure = static_cast<sal_Int32>( nMeasure >= 0 ? ((nMeasure*72+63)/127) : ((nMeasure*72-63)/127) ); @@ -816,7 +816,7 @@ XMLMutableAttributeList *XMLTransformerBase::ProcessAttrList( if( (c >= '0') && (c <= '9') ) aBuffer.append( c ); else - aBuffer.append( (sal_Int32)c ); + aBuffer.append( static_cast<sal_Int32>(c) ); } pMutableAttrList->SetValueByIndex( i, aBuffer.makeStringAndClear() ); |