Kaydet (Commit) b57f8a94 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Reduce to static_cast any reinterpret_cast from void pointers

Change-Id: I97e238df6fc71367b4a17a5da48ed527c5b57666
üst 26655d09
......@@ -288,7 +288,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
{
OSL_ASSERT( rSubIncrements[0].IntervalCount.getValueTypeClass() == uno::TypeClass_LONG );
rOutItemSet.Put( SfxInt32Item( nWhichId,
*reinterpret_cast< const sal_Int32 * >(
*static_cast< const sal_Int32 * >(
rSubIncrements[0].IntervalCount.getValue()) ));
}
else
......
......@@ -153,7 +153,7 @@ void CharacterPropertyItemConverter::FillSpecialItem(
aValue = GetPropertySet()->getPropertyValue( "CharUnderlineHasColor" );
if( aValue.hasValue() &&
( *reinterpret_cast< const sal_Bool * >( aValue.getValue()) != sal_False ))
( *static_cast< const sal_Bool * >( aValue.getValue()) != sal_False ))
{
aItem.PutValue( aValue, MID_TL_HASCOLOR );
bModified = true;
......@@ -185,7 +185,7 @@ void CharacterPropertyItemConverter::FillSpecialItem(
aValue = GetPropertySet()->getPropertyValue( "CharOverlineHasColor" );
if ( aValue.hasValue() &&
( *reinterpret_cast< const sal_Bool* >( aValue.getValue() ) != sal_False ) )
( *static_cast< const sal_Bool* >( aValue.getValue() ) != sal_False ) )
{
aItem.PutValue( aValue, MID_TL_HASCOLOR );
bModified = true;
......
......@@ -109,7 +109,7 @@ bool ChartTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj
{
case CHARTTRANSFER_OBJECTTYPE_DRAWMODEL:
{
SdrModel* pMarkedObjModel = reinterpret_cast< SdrModel* >( pUserObject );
SdrModel* pMarkedObjModel = static_cast< SdrModel* >( pUserObject );
if ( pMarkedObjModel )
{
rxOStm->SetBufferSize( 0xff00 );
......
......@@ -62,7 +62,7 @@ struct OOO_DLLPUBLIC_CHARTTOOLS AnyToDouble : public ::std::unary_function< ::co
::com::sun::star::uno::TypeClass eClass( rAny.getValueType().getTypeClass() );
if( eClass == ::com::sun::star::uno::TypeClass_DOUBLE )
{
fResult = * reinterpret_cast< const double * >( rAny.getValue() );
fResult = * static_cast< const double * >( rAny.getValue() );
}
return fResult;
......@@ -79,7 +79,7 @@ struct OOO_DLLPUBLIC_CHARTTOOLS AnyToString : public ::std::unary_function< ::co
::com::sun::star::uno::TypeClass eClass( rAny.getValueType().getTypeClass() );
if( eClass == ::com::sun::star::uno::TypeClass_DOUBLE )
{
const double* pDouble = reinterpret_cast< const double * >( rAny.getValue() );
const double* pDouble = static_cast< const double * >( rAny.getValue() );
if( ::rtl::math::isNan(*pDouble) )
return OUString();
return ::rtl::math::doubleToUString(
......@@ -92,7 +92,7 @@ struct OOO_DLLPUBLIC_CHARTTOOLS AnyToString : public ::std::unary_function< ::co
}
else if( eClass == ::com::sun::star::uno::TypeClass_STRING )
{
return * reinterpret_cast< const OUString * >( rAny.getValue() );
return * static_cast< const OUString * >( rAny.getValue() );
}
return OUString();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment