summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-29 15:13:23 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-03-29 15:13:45 +0200
commita52cf476e7cec9d0c70dd4ee93cbd328b66479ad (patch)
tree9e03f530d36c1c65f0db9d8698677e802137b3bb
parentc266ba458f444e5f4a4bafbf4073710c31897536 (diff)
Clean up template-parameter-dependent C-style casts
Change-Id: Ia1ab134a0afbeeb3ae40264bd4233a47df26b734
-rw-r--r--avmedia/source/vlc/wrapper/SymbolLoader.hxx4
-rw-r--r--basebmp/source/bitmapdevice.cxx2
-rw-r--r--basic/source/comp/codegen.cxx8
-rw-r--r--compilerplugins/clang/cstylecast.cxx4
-rw-r--r--connectivity/source/drivers/evoab2/EApi.cxx4
-rw-r--r--connectivity/source/drivers/firebird/ResultSet.cxx2
-rw-r--r--connectivity/source/drivers/kab/KDriver.cxx2
-rw-r--r--cpputools/source/unoexe/unoexe.cxx2
-rw-r--r--extensions/source/propctrlr/stringrepresentation.cxx2
-rw-r--r--include/basebmp/accessorfunctors.hxx8
-rw-r--r--include/basebmp/rgbmaskpixelformats.hxx18
-rw-r--r--include/cppu/Map.hxx4
-rw-r--r--include/dbaccess/genericcontroller.hxx2
-rw-r--r--include/svx/ofaitem.hxx2
-rw-r--r--io/source/acceptor/acc_socket.cxx2
-rw-r--r--io/source/connector/connector.hxx2
-rw-r--r--mysqlc/source/mysqlc_preparedstatement.cxx2
-rw-r--r--sc/inc/stlalgorithm.hxx2
-rw-r--r--sc/source/core/data/compressedarray.cxx8
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx14
-rw-r--r--sc/source/ui/inc/ChildWindowWrapper.hxx2
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx2
-rw-r--r--toolkit/source/awt/scrollabledialog.cxx2
-rw-r--r--xmloff/source/text/XMLPropertyBackpatcher.cxx4
24 files changed, 50 insertions, 54 deletions
diff --git a/avmedia/source/vlc/wrapper/SymbolLoader.hxx b/avmedia/source/vlc/wrapper/SymbolLoader.hxx
index 3f9089597004..dce28f6230d4 100644
--- a/avmedia/source/vlc/wrapper/SymbolLoader.hxx
+++ b/avmedia/source/vlc/wrapper/SymbolLoader.hxx
@@ -73,8 +73,8 @@ namespace
{
for (size_t i = 0; i < N; ++i)
{
- SymbolFunc aMethod = ( SymbolFunc )osl_getFunctionSymbol
- ( aModule, OUString::createFromAscii( pMap[ i ].symName ).pData );
+ SymbolFunc aMethod = reinterpret_cast<SymbolFunc>(osl_getFunctionSymbol
+ ( aModule, OUString::createFromAscii( pMap[ i ].symName ).pData ));
if ( !aMethod )
{
SAL_WARN("avmedia", "Cannot load method " << pMap[ i ].symName);
diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx
index 71a2e85bdeef..0e2e004ddcb3 100644
--- a/basebmp/source/bitmapdevice.cxx
+++ b/basebmp/source/bitmapdevice.cxx
@@ -762,7 +762,7 @@ namespace
sal_Int32 nDestX = rDstRect.getMinX();
sal_Int32 nDestY = rDstRect.getMinY();
- char* dstBuf = (char*)getBuffer().get();
+ char* dstBuf = reinterpret_cast<char*>(getBuffer().get());
char* srcBuf = reinterpret_cast<char*>(rSrcBitmap->getBuffer().get());
sal_Int32 dstStride = getScanlineStride();
sal_Int32 srcStride = rSrcBitmap->getScanlineStride();
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx
index 8d4abe72b553..8b199c4faa4d 100644
--- a/basic/source/comp/codegen.cxx
+++ b/basic/source/comp/codegen.cxx
@@ -520,7 +520,7 @@ public:
break;
}
- m_ConvertedBuf += (S)nOp1;
+ m_ConvertedBuf += static_cast<S>(nOp1);
}
virtual void processOpCode2( SbiOpcode eOp, T nOp1, T nOp2 )
{
@@ -528,8 +528,8 @@ public:
if ( eOp == _CASEIS )
if ( nOp1 )
nOp1 = static_cast<T>( convertBufferOffSet(m_pStart, nOp1) );
- m_ConvertedBuf += (S)nOp1;
- m_ConvertedBuf += (S)nOp2;
+ m_ConvertedBuf += static_cast<S>(nOp1);
+ m_ConvertedBuf += static_cast<S>(nOp2);
}
virtual bool processParams(){ return true; }
@@ -569,7 +569,7 @@ PCodeBuffConvertor<T,S>::convert()
PCodeBufferWalker< T > aBuf( m_pStart, m_nSize );
BufferTransformer< T, S > aTrnsfrmer;
aBuf.visitBuffer( aTrnsfrmer );
- m_pCnvtdBuf = (sal_uInt8*)aTrnsfrmer.buffer().GetBuffer();
+ m_pCnvtdBuf = reinterpret_cast<sal_uInt8*>(aTrnsfrmer.buffer().GetBuffer());
m_nCnvtdSize = static_cast<S>( aTrnsfrmer.buffer().GetSize() );
}
diff --git a/compilerplugins/clang/cstylecast.cxx b/compilerplugins/clang/cstylecast.cxx
index 47e8d17b8977..d34e7299eded 100644
--- a/compilerplugins/clang/cstylecast.cxx
+++ b/compilerplugins/clang/cstylecast.cxx
@@ -120,10 +120,6 @@ bool CStyleCast::VisitCStyleCastExpr(const CStyleCastExpr * expr) {
incompTo = "incomplete ";
}
}
- // ignore stuff from inside templates for now
- if( expr->getCastKind() == CK_Dependent ) {
- return true;
- }
if (externCFunction || expr->getLocStart().isMacroID()) {
SourceLocation spellingLocation = compiler.getSourceManager().getSpellingLoc(
expr->getLocStart());
diff --git a/connectivity/source/drivers/evoab2/EApi.cxx b/connectivity/source/drivers/evoab2/EApi.cxx
index 1bc88aeb08ab..e3120d85bf09 100644
--- a/connectivity/source/drivers/evoab2/EApi.cxx
+++ b/connectivity/source/drivers/evoab2/EApi.cxx
@@ -112,8 +112,8 @@ tryLink( oslModule &aModule, const char *pName, const ApiMap (&pMap)[N])
{
for (guint i = 0; i < N; ++i)
{
- SymbolFunc aMethod = (SymbolFunc)osl_getFunctionSymbol
- (aModule, OUString::createFromAscii ( pMap[ i ].sym_name ).pData);
+ SymbolFunc aMethod = reinterpret_cast<SymbolFunc>(osl_getFunctionSymbol
+ (aModule, OUString::createFromAscii ( pMap[ i ].sym_name ).pData));
if( !aMethod )
{
fprintf( stderr, "Warning: missing symbol '%s' in '%s'\n",
diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx
index d3531d785f4e..2dfe6be3bb0a 100644
--- a/connectivity/source/drivers/firebird/ResultSet.cxx
+++ b/connectivity/source/drivers/firebird/ResultSet.cxx
@@ -381,7 +381,7 @@ T OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHORT nType)
return T();
if ((m_pSqlda->sqlvar[nColumnIndex-1].sqltype & ~1) == nType)
- return *((T*) m_pSqlda->sqlvar[nColumnIndex-1].sqldata);
+ return *reinterpret_cast<T*>(m_pSqlda->sqlvar[nColumnIndex-1].sqldata);
else
return retrieveValue< ORowSetValue >(nColumnIndex, 0);
}
diff --git a/connectivity/source/drivers/kab/KDriver.cxx b/connectivity/source/drivers/kab/KDriver.cxx
index 3deb36b34351..21bf85d24934 100644
--- a/connectivity/source/drivers/kab/KDriver.cxx
+++ b/connectivity/source/drivers/kab/KDriver.cxx
@@ -107,7 +107,7 @@ namespace
{
const OUString sSymbolName = OUString::createFromAscii( _pAsciiSymbolName );
- _rFunction = (FUNCTION)( osl_getSymbol( _rModule, sSymbolName.pData ) );
+ _rFunction = reinterpret_cast<FUNCTION>( osl_getSymbol( _rModule, sSymbolName.pData ) );
if ( !_rFunction )
{ // did not find the symbol
diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx
index 94c0e113f519..b292deb6e35e 100644
--- a/cpputools/source/unoexe/unoexe.cxx
+++ b/cpputools/source/unoexe/unoexe.cxx
@@ -174,7 +174,7 @@ void createInstance(
rxOut = Reference< T >::query( x );
if (! rxOut.is())
{
- const Type & rType = ::getCppuType( (const Reference< T > *)0 );
+ const Type & rType = cppu::UnoType<T>::get();
throw RuntimeException(
"service instance \"" + rServiceName +
"\" does not support demanded interface \"" +
diff --git a/extensions/source/propctrlr/stringrepresentation.cxx b/extensions/source/propctrlr/stringrepresentation.cxx
index d0c253c57c2a..ba0cad91bf67 100644
--- a/extensions/source/propctrlr/stringrepresentation.cxx
+++ b/extensions/source/propctrlr/stringrepresentation.cxx
@@ -359,7 +359,7 @@ namespace
do
{
_out_SplitUp.realloc( _out_SplitUp.getLength() + 1 );
- _out_SplitUp[ _out_SplitUp.getLength() - 1 ] = (ElementType)_rTransformer( _rComposed.getToken( 0, '\n', tokenPos ) );
+ _out_SplitUp[ _out_SplitUp.getLength() - 1 ] = static_cast<ElementType>(_rTransformer( _rComposed.getToken( 0, '\n', tokenPos ) ));
}
while ( tokenPos != -1 );
}
diff --git a/include/basebmp/accessorfunctors.hxx b/include/basebmp/accessorfunctors.hxx
index 87edfed17290..02e3abaded95 100644
--- a/include/basebmp/accessorfunctors.hxx
+++ b/include/basebmp/accessorfunctors.hxx
@@ -82,7 +82,7 @@ template< typename T,
// mask will be 0, iff m == 0, and 1 otherwise
const T mask( unsigned_cast<T>(m | -m) >> (sizeof(unsigned_T)*8 - 1) );
- return v1*(M)(1-mask) + v2*mask;
+ return v1*static_cast<M>(1-mask) + v2*mask;
}
};
template< typename T,
@@ -98,7 +98,7 @@ template< typename T,
// mask will be 0, iff m == 0, and 1 otherwise
const T mask( unsigned_cast<T>(m | -m) >> (sizeof(unsigned_T)*8 - 1) );
- return v1*mask + v2*(M)(1-mask);
+ return v1*mask + v2*static_cast<M>(1-mask);
}
};
@@ -114,7 +114,7 @@ template< typename T, typename M > struct FastIntegerOutputMaskFunctor<T,M,true>
{
OSL_ASSERT(m<=1);
- return v1*(M)(1-m) + v2*m;
+ return v1*static_cast<M>(1-m) + v2*m;
}
};
template< typename T, typename M > struct FastIntegerOutputMaskFunctor<T,M,false> :
@@ -125,7 +125,7 @@ template< typename T, typename M > struct FastIntegerOutputMaskFunctor<T,M,false
{
OSL_ASSERT(m<=1);
- return v1*m + v2*(M)(1-m);
+ return v1*m + v2*static_cast<M>(1-m);
}
};
diff --git a/include/basebmp/rgbmaskpixelformats.hxx b/include/basebmp/rgbmaskpixelformats.hxx
index 060c0a99e59a..262b17ea983b 100644
--- a/include/basebmp/rgbmaskpixelformats.hxx
+++ b/include/basebmp/rgbmaskpixelformats.hxx
@@ -118,29 +118,29 @@ template< typename PixelType,
// spread the value into the component_type range
ColorType res( (shiftRight(red,
base_type::red_shift-8*
- (signed)sizeof(typename base_type::component_type)+
+ static_cast<signed>(sizeof(typename base_type::component_type))+
base_type::red_bits)) |
(shiftRight(red,
base_type::red_shift-8*
- (signed)sizeof(typename base_type::component_type)+
+ static_cast<signed>(sizeof(typename base_type::component_type))+
2*base_type::red_bits)),
(shiftRight(green,
base_type::green_shift-8*
- (signed)sizeof(typename base_type::component_type)+
+ static_cast<signed>(sizeof(typename base_type::component_type))+
base_type::green_bits)) |
(shiftRight(green,
base_type::green_shift-8*
- (signed)sizeof(typename base_type::component_type)+
+ static_cast<signed>(sizeof(typename base_type::component_type))+
2*base_type::green_bits)),
(shiftRight(blue,
base_type::blue_shift-8*
- (signed)sizeof(typename base_type::component_type)+
+ static_cast<signed>(sizeof(typename base_type::component_type))+
base_type::blue_bits)) |
(shiftRight(blue,
base_type::blue_shift-8*
- (signed)sizeof(typename base_type::component_type)+
+ static_cast<signed>(sizeof(typename base_type::component_type))+
2*base_type::blue_bits)) );
return res;
}
@@ -178,15 +178,15 @@ template< typename PixelType,
BaseValue |
(shiftLeft(red,
base_type::red_shift-8*
- (signed)sizeof(typename base_type::component_type)+
+ static_cast<signed>(sizeof(typename base_type::component_type))+
base_type::red_bits) & RedMask) |
(shiftLeft(green,
base_type::green_shift-8*
- (signed)sizeof(typename base_type::component_type)+
+ static_cast<signed>(sizeof(typename base_type::component_type))+
base_type::green_bits) & GreenMask) |
(shiftLeft(blue,
base_type::blue_shift-8*
- (signed)sizeof(typename base_type::component_type)+
+ static_cast<signed>(sizeof(typename base_type::component_type))+
base_type::blue_bits) & BlueMask) );
return SwapBytes ? byteSwap(res) : res;
diff --git a/include/cppu/Map.hxx b/include/cppu/Map.hxx
index 2b6397918c3f..20b5f2607b88 100644
--- a/include/cppu/Map.hxx
+++ b/include/cppu/Map.hxx
@@ -40,7 +40,7 @@ namespace cppu
{
css::uno::Mapping curr2outer(css::uno::Environment::getCurrent(), outerEnv);
- return reinterpret_cast<T *>(curr2outer.mapInterface(pT, getCppuType((css::uno::Reference<T> *)NULL)));
+ return reinterpret_cast<T *>(curr2outer.mapInterface(pT, cppu::UnoType<T>::get()));
}
@@ -55,7 +55,7 @@ namespace cppu
{
css::uno::Mapping outer2curr(outerEnv, css::uno::Environment::getCurrent());
- return reinterpret_cast<T *>(outer2curr.mapInterface(pT, getCppuType((css::uno::Reference<T> *)NULL)));
+ return reinterpret_cast<T *>(outer2curr.mapInterface(pT, cppu::UnoType<T>::get()));
}
diff --git a/include/dbaccess/genericcontroller.hxx b/include/dbaccess/genericcontroller.hxx
index 5c6a6593189b..acd0e0668989 100644
--- a/include/dbaccess/genericcontroller.hxx
+++ b/include/dbaccess/genericcontroller.hxx
@@ -83,7 +83,7 @@ namespace dbaui
public:
optional ( ) : base_type( ) { }
explicit optional ( T const& val ) : base_type( val ) { }
- optional ( optional const& rhs ) : base_type( (base_type const&)rhs ) { }
+ optional ( optional const& rhs ) : base_type( static_cast<base_type const&>(rhs) ) { }
public:
optional& operator= ( T const& rhs )
diff --git a/include/svx/ofaitem.hxx b/include/svx/ofaitem.hxx
index cc648b9cc134..482f9fefadc0 100644
--- a/include/svx/ofaitem.hxx
+++ b/include/svx/ofaitem.hxx
@@ -57,7 +57,7 @@ public:
{}
virtual bool operator==( const SfxPoolItem& rItem ) const SAL_OVERRIDE
{
- return mxRef == ((OfaRefItem<reference_type> &)rItem).mxRef;
+ return mxRef == static_cast<OfaRefItem<reference_type> const &>(rItem).mxRef;
}
virtual SfxPoolItem*Clone( SfxItemPool* /*pPool = 0*/ ) const SAL_OVERRIDE
{
diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx
index 89fb44dde0f4..bf6569189cef 100644
--- a/io/source/acceptor/acc_socket.cxx
+++ b/io/source/acceptor/acc_socket.cxx
@@ -42,7 +42,7 @@ namespace io_acceptor {
{
size_t operator () (const ::com::sun::star::uno::Reference<T> & ref) const
{
- return (size_t)ref.get();
+ return reinterpret_cast<size_t>(ref.get());
}
};
diff --git a/io/source/connector/connector.hxx b/io/source/connector/connector.hxx
index 8c439ad5e28e..fe059bd4a8d0 100644
--- a/io/source/connector/connector.hxx
+++ b/io/source/connector/connector.hxx
@@ -37,7 +37,7 @@ namespace stoc_connector
{
size_t operator () (const ::com::sun::star::uno::Reference<T> & ref) const
{
- return (size_t)ref.get();
+ return reinterpret_cast<size_t>(ref.get());
}
};
diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx b/mysqlc/source/mysqlc_preparedstatement.cxx
index 99c1ab5e7670..6b68f6e060b7 100644
--- a/mysqlc/source/mysqlc_preparedstatement.cxx
+++ b/mysqlc/source/mysqlc_preparedstatement.cxx
@@ -536,7 +536,7 @@ namespace
sal_Int32 nValue(0);
if ( !( _value >>= nValue ) )
mysqlc_sdbc_driver::throwInvalidArgumentException( "OPreparedStatement::setObjectWithInfo", _rxParam );
- (_rxParam.get()->*_Setter)( _parameterIndex, (INTTYPE)nValue );
+ (_rxParam.get()->*_Setter)( _parameterIndex, static_cast<INTTYPE>(nValue) );
}
}
diff --git a/sc/inc/stlalgorithm.hxx b/sc/inc/stlalgorithm.hxx
index 3c7014446fa4..6446097ed57b 100644
--- a/sc/inc/stlalgorithm.hxx
+++ b/sc/inc/stlalgorithm.hxx
@@ -65,7 +65,7 @@ public:
pointer allocate(size_type n)
{
- return (pointer)rtl_allocateAlignedMemory(_Alignment, n*sizeof(value_type));
+ return static_cast<pointer>(rtl_allocateAlignedMemory(_Alignment, n*sizeof(value_type)));
}
void deallocate(pointer p, size_type)
diff --git a/sc/source/core/data/compressedarray.cxx b/sc/source/core/data/compressedarray.cxx
index ebe2822e5f61..36249d291ed6 100644
--- a/sc/source/core/data/compressedarray.cxx
+++ b/sc/source/core/data/compressedarray.cxx
@@ -96,14 +96,14 @@ size_t ScCompressedArray<A,D>::Search( A nAccess ) const
{
i = (nLo + nHi) / 2;
if (i > 0)
- nStart = (long) pData[i - 1].nEnd;
+ nStart = static_cast<long>(pData[i - 1].nEnd);
else
nStart = -1;
- nEnd = (long) pData[i].nEnd;
- if (nEnd < (long) nAccess)
+ nEnd = static_cast<long>(pData[i].nEnd);
+ if (nEnd < static_cast<long>(nAccess))
nLo = ++i;
else
- if (nStart >= (long) nAccess)
+ if (nStart >= static_cast<long>(nAccess))
nHi = --i;
else
bFound = true;
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 085a582ec0dd..3821480769a4 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -1511,7 +1511,7 @@ public:
throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__);
SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << 1 << ": cl_mem: " << mpClmem2);
- err = clSetKernelArg(redKernel, 1, sizeof(cl_mem), (void*)&mpClmem2);
+ err = clSetKernelArg(redKernel, 1, sizeof(cl_mem), &mpClmem2);
if (CL_SUCCESS != err)
throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__);
@@ -1540,11 +1540,11 @@ public:
{
/*average need more reduction kernel for count computing*/
boost::scoped_array<double> pAllBuffer(new double[2 * w]);
- double* resbuf = (double*)clEnqueueMapBuffer(kEnv.mpkCmdQueue,
+ double* resbuf = static_cast<double*>(clEnqueueMapBuffer(kEnv.mpkCmdQueue,
mpClmem2,
CL_TRUE, CL_MAP_READ, 0,
sizeof(double) * w, 0, NULL, NULL,
- &err);
+ &err));
if (err != CL_SUCCESS)
throw OpenCLError("clEnqueueMapBuffer", err, __FILE__, __LINE__);
@@ -1569,7 +1569,7 @@ public:
throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__);
SAL_INFO("sc.opencl", "Kernel " << redKernel << " arg " << 1 << ": cl_mem: " << mpClmem2);
- err = clSetKernelArg(redKernel, 1, sizeof(cl_mem), (void*)&mpClmem2);
+ err = clSetKernelArg(redKernel, 1, sizeof(cl_mem), &mpClmem2);
if (CL_SUCCESS != err)
throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__);
@@ -1594,11 +1594,11 @@ public:
err = clFinish(kEnv.mpkCmdQueue);
if (CL_SUCCESS != err)
throw OpenCLError("clFinish", err, __FILE__, __LINE__);
- resbuf = (double*)clEnqueueMapBuffer(kEnv.mpkCmdQueue,
+ resbuf = static_cast<double*>(clEnqueueMapBuffer(kEnv.mpkCmdQueue,
mpClmem2,
CL_TRUE, CL_MAP_READ, 0,
sizeof(double) * w, 0, NULL, NULL,
- &err);
+ &err));
if (err != CL_SUCCESS)
throw OpenCLError("clEnqueueMapBuffer", err, __FILE__, __LINE__);
for (int i = 0; i < w; i++)
@@ -1622,7 +1622,7 @@ public:
}
// set kernel arg
SAL_INFO("sc.opencl", "Kernel " << k << " arg " << argno << ": cl_mem: " << mpClmem2);
- err = clSetKernelArg(k, argno, sizeof(cl_mem), (void*)&(mpClmem2));
+ err = clSetKernelArg(k, argno, sizeof(cl_mem), &(mpClmem2));
if (CL_SUCCESS != err)
throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__);
return 1;
diff --git a/sc/source/ui/inc/ChildWindowWrapper.hxx b/sc/source/ui/inc/ChildWindowWrapper.hxx
index 3d52f96b0d0a..48938e9ea591 100644
--- a/sc/source/ui/inc/ChildWindowWrapper.hxx
+++ b/sc/source/ui/inc/ChildWindowWrapper.hxx
@@ -62,7 +62,7 @@ public:
virtual SfxChildWinInfo GetInfo() const SAL_OVERRIDE
{
SfxChildWinInfo aInfo = SfxChildWindow::GetInfo();
- ((SfxModelessDialog*)GetWindow())->FillInfo( aInfo );
+ static_cast<SfxModelessDialog*>(GetWindow())->FillInfo( aInfo );
return aInfo;
}
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 0ea53559ef60..9b530744688c 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -959,7 +959,7 @@ template<typename TableBorderType>
void lcl_fillBoxItems( SvxBoxItem& rOuter, SvxBoxInfoItem& rInner, const TableBorderType& rBorder )
{
::editeng::SvxBorderLine aLine;
- rOuter.SetDistance( (sal_uInt16)HMMToTwips( rBorder.Distance ) );
+ rOuter.SetDistance( static_cast<sal_uInt16>(HMMToTwips( rBorder.Distance )) );
rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.TopLine ), BOX_LINE_TOP );
rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.BottomLine ), BOX_LINE_BOTTOM );
rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.LeftLine ), BOX_LINE_LEFT );
diff --git a/toolkit/source/awt/scrollabledialog.cxx b/toolkit/source/awt/scrollabledialog.cxx
index 650cc12b66ef..823fba383af5 100644
--- a/toolkit/source/awt/scrollabledialog.cxx
+++ b/toolkit/source/awt/scrollabledialog.cxx
@@ -106,7 +106,7 @@ void ScrollableWrapper<T>::lcl_Scroll( long nX, long nY )
template< class T>
sal_IntPtr ScrollableWrapper<T>::LinkStubScrollBarHdl( void* pThis, void* pCaller)
{
- return ((ScrollableWrapper<T>*)pThis )->ScrollBarHdl( static_cast<ScrollBar*>(pCaller) );
+ return static_cast<ScrollableWrapper<T>*>(pThis)->ScrollBarHdl( static_cast<ScrollBar*>(pCaller) );
}
template< class T>
diff --git a/xmloff/source/text/XMLPropertyBackpatcher.cxx b/xmloff/source/text/XMLPropertyBackpatcher.cxx
index f244d0a54c6f..5844b0937e58 100644
--- a/xmloff/source/text/XMLPropertyBackpatcher.cxx
+++ b/xmloff/source/text/XMLPropertyBackpatcher.cxx
@@ -62,7 +62,7 @@ void XMLPropertyBackpatcher<A>::ResolveId(
{
// aah, we have a backpatch list!
BackpatchListType* pList =
- (BackpatchListType*)aBackpatchListMap[sName];
+ static_cast<BackpatchListType*>(aBackpatchListMap[sName]);
// a) remove list from list map
aBackpatchListMap.erase(sName);
@@ -133,7 +133,7 @@ void XMLPropertyBackpatcher<A>::SetProperty(
}
// insert footnote
- ((BackpatchListType*)aBackpatchListMap[sName])->push_back(xPropSet);
+ static_cast<BackpatchListType*>(aBackpatchListMap[sName])->push_back(xPropSet);
}
}