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

Clean up C-style casts from pointers to void

Change-Id: I8c40cbe7c6928d89eb280344436a4b68a4884bd1
üst c0de7e43
......@@ -124,9 +124,9 @@ void SvtAppFilterOptions_Impl::Load()
const Any* pValues = aValues.getConstArray();
if(pValues[0].hasValue())
bLoadVBA = *(sal_Bool*)pValues[0].getValue();
bLoadVBA = *static_cast<sal_Bool const *>(pValues[0].getValue());
if(pValues[1].hasValue())
bSaveVBA = *(sal_Bool*)pValues[1].getValue();
bSaveVBA = *static_cast<sal_Bool const *>(pValues[1].getValue());
}
class SvtWriterFilterOptions_Impl : public SvtAppFilterOptions_Impl
......@@ -174,7 +174,7 @@ void SvtWriterFilterOptions_Impl::Load()
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
if(pValues[0].hasValue())
bLoadExecutable = *(sal_Bool*)pValues[0].getValue();
bLoadExecutable = *static_cast<sal_Bool const *>(pValues[0].getValue());
}
class SvtCalcFilterOptions_Impl : public SvtAppFilterOptions_Impl
......@@ -222,7 +222,7 @@ void SvtCalcFilterOptions_Impl::Load()
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
if(pValues[0].hasValue())
bLoadExecutable = *(sal_Bool*)pValues[0].getValue();
bLoadExecutable = *static_cast<sal_Bool const *>(pValues[0].getValue());
}
struct SvtFilterOptions_Impl
......@@ -410,7 +410,7 @@ void SvtFilterOptions::Load()
{
if(pValues[nProp].hasValue())
{
bool bVal = *(sal_Bool*)pValues[nProp].getValue();
bool bVal = *static_cast<sal_Bool const *>(pValues[nProp].getValue());
sal_uLong nFlag = lcl_GetFlag(nProp);
pImp->SetFlag( nFlag, bVal);
}
......
......@@ -879,7 +879,7 @@ void FontSubstConfiguration::fillSubstVector( const com::sun::star::uno::Referen
Any aAny = rFont->getByName( rType );
if( aAny.getValueTypeClass() == TypeClass_STRING )
{
const OUString* pLine = (const OUString*)aAny.getValue();
const OUString* pLine = static_cast<const OUString*>(aAny.getValue());
sal_Int32 nLength = pLine->getLength();
if( nLength )
{
......@@ -928,7 +928,7 @@ FontWeight FontSubstConfiguration::getSubstWeight( const com::sun::star::uno::Re
Any aAny = rFont->getByName( rType );
if( aAny.getValueTypeClass() == TypeClass_STRING )
{
const OUString* pLine = (const OUString*)aAny.getValue();
const OUString* pLine = static_cast<const OUString*>(aAny.getValue());
if( !pLine->isEmpty() )
{
for( weight=SAL_N_ELEMENTS(pWeightNames)-1; weight >= 0; weight-- )
......@@ -960,7 +960,7 @@ FontWidth FontSubstConfiguration::getSubstWidth( const com::sun::star::uno::Refe
Any aAny = rFont->getByName( rType );
if( aAny.getValueTypeClass() == TypeClass_STRING )
{
const OUString* pLine = (const OUString*)aAny.getValue();
const OUString* pLine = static_cast<const OUString*>(aAny.getValue());
if( !pLine->isEmpty() )
{
for( width=SAL_N_ELEMENTS(pWidthNames)-1; width >= 0; width-- )
......@@ -992,7 +992,7 @@ unsigned long FontSubstConfiguration::getSubstType( const com::sun::star::uno::R
Any aAny = rFont->getByName( rType );
if( aAny.getValueTypeClass() == TypeClass_STRING )
{
const OUString* pLine = (const OUString*)aAny.getValue();
const OUString* pLine = static_cast<const OUString*>(aAny.getValue());
if( !pLine->isEmpty() )
{
sal_Int32 nIndex = 0;
......
......@@ -140,9 +140,9 @@ void SfxMiscCfg::Load()
{
switch(nProp)
{
case 0: bPaperSize = *(sal_Bool*)pValues[nProp].getValue(); break; //"Print/Warning/PaperSize",
case 1: bPaperOrientation = *(sal_Bool*)pValues[nProp].getValue(); break; //"Print/Warning/PaperOrientation",
case 2: bNotFound = *(sal_Bool*)pValues[nProp].getValue(); break; //"Print/Warning/NotFound",
case 0: bPaperSize = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; //"Print/Warning/PaperSize",
case 1: bPaperOrientation = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; //"Print/Warning/PaperOrientation",
case 2: bNotFound = *static_cast<sal_Bool const *>(pValues[nProp].getValue()); break; //"Print/Warning/NotFound",
case 3: pValues[nProp] >>= nYear2000;break; //"DateFormat/TwoDigitYear",
}
}
......
......@@ -779,7 +779,7 @@ SvtLoadOptions_Impl::SvtLoadOptions_Impl()
const Any* pValues = aValues.getConstArray();
DBG_ASSERT( aValues.getLength() == aNames.getLength(), "GetProperties failed" );
if (pValues[0].getValueTypeClass() == ::com::sun::star::uno::TypeClass_BOOLEAN)
bLoadUserDefinedSettings = *(sal_Bool *)pValues[0].getValue();
bLoadUserDefinedSettings = *static_cast<sal_Bool const *>(pValues[0].getValue());
}
SvtLoadOptions_Impl::~SvtLoadOptions_Impl()
......
......@@ -1490,7 +1490,7 @@ sal_Unicode ConvertFontToSubsFontChar(
FontToSubsFontConverter hConverter, sal_Unicode cChar )
{
if ( hConverter )
return ((ConvertChar*)hConverter)->RecodeChar( cChar );
return static_cast<ConvertChar*>(hConverter)->RecodeChar( cChar );
else
return cChar;
}
......@@ -1500,7 +1500,7 @@ OUString GetFontToSubsFontName( FontToSubsFontConverter hConverter )
if ( !hConverter )
return OUString();
const char* pName = ((ConvertChar*)hConverter)->mpSubsFontName;
const char* pName = static_cast<ConvertChar*>(hConverter)->mpSubsFontName;
return OUString::createFromAscii( pName );
}
......
......@@ -1402,7 +1402,7 @@ ErrCode UcbLockBytes::WriteAt(sal_uInt64 const nPos, const void *pBuffer,
return ERRCODE_IO_CANTSEEK;
}
sal_Int8* pData = (sal_Int8*) pBuffer;
sal_Int8 const * pData = static_cast<sal_Int8 const *>(pBuffer);
Sequence<sal_Int8> aData( pData, nCount );
try
{
......
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