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

Clean up C-style casts from pointers to void

Change-Id: Ia1facd79ccfa142412c833bded0d65b50e71d961
üst 7eeabbca
...@@ -140,7 +140,7 @@ public: ...@@ -140,7 +140,7 @@ public:
virtual SfxTabPage* CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet ) SAL_OVERRIDE; virtual SfxTabPage* CreateTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet ) SAL_OVERRIDE;
}; };
#define SM_MOD() ( *(SmModule**) GetAppData(SHL_SM) ) #define SM_MOD() ( *reinterpret_cast<SmModule**>(GetAppData(SHL_SM)) )
#endif // INCLUDED_STARMATH_INC_SMMOD_HXX #endif // INCLUDED_STARMATH_INC_SMMOD_HXX
......
...@@ -51,7 +51,7 @@ namespace ...@@ -51,7 +51,7 @@ namespace
SmDLL::SmDLL() SmDLL::SmDLL()
{ {
SmModule** ppShlPtr = (SmModule**) GetAppData(SHL_SM); SmModule** ppShlPtr = reinterpret_cast<SmModule**>(GetAppData(SHL_SM));
if ( *ppShlPtr ) if ( *ppShlPtr )
return; return;
......
...@@ -392,9 +392,9 @@ static sal_Int16 lcl_AnyToINT16(const uno::Any& rAny) ...@@ -392,9 +392,9 @@ static sal_Int16 lcl_AnyToINT16(const uno::Any& rAny)
sal_Int16 nRet = 0; sal_Int16 nRet = 0;
if( eType == uno::TypeClass_DOUBLE ) if( eType == uno::TypeClass_DOUBLE )
nRet = (sal_Int16)*(double*)rAny.getValue(); nRet = (sal_Int16)*static_cast<double const *>(rAny.getValue());
else if( eType == uno::TypeClass_FLOAT ) else if( eType == uno::TypeClass_FLOAT )
nRet = (sal_Int16)*(float*)rAny.getValue(); nRet = (sal_Int16)*static_cast<float const *>(rAny.getValue());
else else
rAny >>= nRet; rAny >>= nRet;
return nRet; return nRet;
...@@ -478,7 +478,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* ...@@ -478,7 +478,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
{ {
if((*pValues).getValueType() != ::getBooleanCppuType()) if((*pValues).getValueType() != ::getBooleanCppuType())
throw IllegalArgumentException(); throw IllegalArgumentException();
bool bVal = *(sal_Bool*)(*pValues).getValue(); bool bVal = *static_cast<sal_Bool const *>((*pValues).getValue());
vcl::Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId)); vcl::Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId));
aNewFont.SetItalic((bVal) ? ITALIC_NORMAL : ITALIC_NONE); aNewFont.SetItalic((bVal) ? ITALIC_NORMAL : ITALIC_NONE);
aFormat.SetFont((*ppEntries)->mnMemberId, aNewFont); aFormat.SetFont((*ppEntries)->mnMemberId, aNewFont);
...@@ -494,7 +494,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* ...@@ -494,7 +494,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
{ {
if((*pValues).getValueType() != ::getBooleanCppuType()) if((*pValues).getValueType() != ::getBooleanCppuType())
throw IllegalArgumentException(); throw IllegalArgumentException();
bool bVal = *(sal_Bool*)(*pValues).getValue(); bool bVal = *static_cast<sal_Bool const *>((*pValues).getValue());
vcl::Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId)); vcl::Font aNewFont(aFormat.GetFont((*ppEntries)->mnMemberId));
aNewFont.SetWeight((bVal) ? WEIGHT_BOLD : WEIGHT_NORMAL); aNewFont.SetWeight((bVal) ? WEIGHT_BOLD : WEIGHT_NORMAL);
aFormat.SetFont((*ppEntries)->mnMemberId, aNewFont); aFormat.SetFont((*ppEntries)->mnMemberId, aNewFont);
...@@ -534,7 +534,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* ...@@ -534,7 +534,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
case HANDLE_IS_TEXT_MODE : case HANDLE_IS_TEXT_MODE :
{ {
aFormat.SetTextmode(*(sal_Bool*)(*pValues).getValue()); aFormat.SetTextmode(*static_cast<sal_Bool const *>((*pValues).getValue()));
} }
break; break;
...@@ -592,7 +592,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* ...@@ -592,7 +592,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any*
} }
break; break;
case HANDLE_IS_SCALE_ALL_BRACKETS : case HANDLE_IS_SCALE_ALL_BRACKETS :
aFormat.SetScaleNormalBrackets(*(sal_Bool*)(*pValues).getValue()); aFormat.SetScaleNormalBrackets(*static_cast<sal_Bool const *>((*pValues).getValue()));
break; break;
case HANDLE_PRINTER_NAME: case HANDLE_PRINTER_NAME:
{ {
......
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