summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/interpr4.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:17:13 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:17:13 +0100
commit681783c9adf85bde36348f11c03d3a483bf545be (patch)
treea5b8a4eab1695275b3d2516738b43c0d3f6ee158 /sc/source/core/tool/interpr4.cxx
parentfe45359ab818659186672a0ca05979b589dedbfc (diff)
More loplugin:cstylecast: sc
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: I987ac3a6d062600a5e21c3462c70595dfaa51796
Diffstat (limited to 'sc/source/core/tool/interpr4.cxx')
-rw-r--r--sc/source/core/tool/interpr4.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 0fbc89b56180..54e221800324 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -430,10 +430,10 @@ bool ScInterpreter::CreateStringArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
return false;
// Append a 0-pad-byte if string length is odd
// MUST be sal_uInt16
- sal_uInt16 nStrLen = (sal_uInt16) aTmp.getLength();
+ sal_uInt16 nStrLen = static_cast<sal_uInt16>(aTmp.getLength());
sal_uInt16 nLen = ( nStrLen + 2 ) & ~1;
- if (((sal_uLong)nPos + (5 * sizeof(sal_uInt16)) + nLen) > MAXARRSIZE)
+ if ((static_cast<sal_uLong>(nPos) + (5 * sizeof(sal_uInt16)) + nLen) > MAXARRSIZE)
return false;
*p++ = static_cast<sal_uInt16>(nCol);
*p++ = static_cast<sal_uInt16>(nRow);
@@ -554,9 +554,9 @@ bool ScInterpreter::CreateCellArr(SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
return false;
// Append a 0-pad-byte if string length is odd
// MUST be sal_uInt16
- sal_uInt16 nStrLen = (sal_uInt16) aTmp.getLength();
+ sal_uInt16 nStrLen = static_cast<sal_uInt16>(aTmp.getLength());
sal_uInt16 nLen = ( nStrLen + 2 ) & ~1;
- if ( ((sal_uLong)nPos + 2 + nLen) > MAXARRSIZE)
+ if ( (static_cast<sal_uLong>(nPos) + 2 + nLen) > MAXARRSIZE)
return false;
*p++ = nLen;
memcpy( p, aTmp.getStr(), nStrLen + 1);
@@ -3281,7 +3281,7 @@ void ScInterpreter::ScMacro()
bool bOk = true;
for( short i = nParamCount; i && bOk ; i-- )
{
- SbxVariable* pPar = refPar->Get( (sal_uInt16) i );
+ SbxVariable* pPar = refPar->Get( static_cast<sal_uInt16>(i) );
switch( GetStackType() )
{
case svDouble: