summaryrefslogtreecommitdiff
path: root/xmloff/source/style/xmlbahdl.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:09:29 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:09:29 +0100
commitdec5264878903ee010e9a6296357750f6c69c844 (patch)
treee987833003c31730486c95e82b6cc97b960de1a2 /xmloff/source/style/xmlbahdl.cxx
parentab279d30de4188baa4b33688aaed96072f3b4818 (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/style/xmlbahdl.cxx')
-rw-r--r--xmloff/source/style/xmlbahdl.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/xmloff/source/style/xmlbahdl.cxx b/xmloff/source/style/xmlbahdl.cxx
index 82993b999451..5831514df60f 100644
--- a/xmloff/source/style/xmlbahdl.cxx
+++ b/xmloff/source/style/xmlbahdl.cxx
@@ -37,14 +37,14 @@ static void lcl_xmloff_setAny( Any& rValue, sal_Int32 nValue, sal_Int8 nBytes )
nValue = SCHAR_MIN;
else if( nValue > SCHAR_MAX )
nValue = SCHAR_MAX;
- rValue <<= (sal_Int8)nValue;
+ rValue <<= static_cast<sal_Int8>(nValue);
break;
case 2:
if( nValue < SHRT_MIN )
nValue = SHRT_MIN;
else if( nValue > SHRT_MAX )
nValue = SHRT_MAX;
- rValue <<= (sal_Int16)nValue;
+ rValue <<= static_cast<sal_Int16>(nValue);
break;
case 4:
rValue <<= nValue;
@@ -335,7 +335,7 @@ bool XMLDoublePercentPropHdl::importXML( const OUString& rStrImpValue, Any& rVal
{
sal_Int32 nValue = 0;
bRet = ::sax::Converter::convertPercent( nValue, rStrImpValue );
- fValue = ((double)nValue) / 100.0;
+ fValue = static_cast<double>(nValue) / 100.0;
}
rValue <<= fValue;
@@ -352,7 +352,7 @@ bool XMLDoublePercentPropHdl::exportXML( OUString& rStrExpValue, const Any& rVal
fValue *= 100.0;
if( fValue > 0 ) fValue += 0.5; else fValue -= 0.5;
- sal_Int32 nValue = (sal_Int32)fValue;
+ sal_Int32 nValue = static_cast<sal_Int32>(fValue);
OUStringBuffer aOut;
::sax::Converter::convertPercent( aOut, nValue );
@@ -762,7 +762,7 @@ bool XMLIsAutoColorPropHdl::importXML( const OUString& rStrImpValue, Any& rValue
bool bValue;
bool const bRet = ::sax::Converter::convertBool( bValue, rStrImpValue );
if( bRet && bValue )
- rValue <<= (sal_Int32)-1;
+ rValue <<= sal_Int32(-1);
return true;
}