summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-28 19:08:13 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-28 19:09:28 +0100
commitb646aa35d0f5c1115178167f78c6adadb0090aee (patch)
tree31b9a4d4cce15fd23ec1d7a5fce48a9a0ebb7fe1 /unotools
parentc0de7e43b8b51c48c4c0a1f641a1654678bba07a (diff)
Clean up C-style casts from pointers to void
Change-Id: I8c40cbe7c6928d89eb280344436a4b68a4884bd1
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/fltrcfg.cxx10
-rw-r--r--unotools/source/config/fontcfg.cxx8
-rw-r--r--unotools/source/config/misccfg.cxx6
-rw-r--r--unotools/source/config/saveopt.cxx2
-rw-r--r--unotools/source/misc/fontcvt.cxx4
-rw-r--r--unotools/source/ucbhelper/ucblockbytes.cxx2
6 files changed, 16 insertions, 16 deletions
diff --git a/unotools/source/config/fltrcfg.cxx b/unotools/source/config/fltrcfg.cxx
index 84806e4b8979..da64f94323a4 100644
--- a/unotools/source/config/fltrcfg.cxx
+++ b/unotools/source/config/fltrcfg.cxx
@@ -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);
}
diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx
index e4a966170565..8f496a05116a 100644
--- a/unotools/source/config/fontcfg.cxx
+++ b/unotools/source/config/fontcfg.cxx
@@ -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;
diff --git a/unotools/source/config/misccfg.cxx b/unotools/source/config/misccfg.cxx
index 2624f41b6b5c..bb6f1d51fdc0 100644
--- a/unotools/source/config/misccfg.cxx
+++ b/unotools/source/config/misccfg.cxx
@@ -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",
}
}
diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx
index 18f958136998..47a190fb44e9 100644
--- a/unotools/source/config/saveopt.cxx
+++ b/unotools/source/config/saveopt.cxx
@@ -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()
diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx
index f91ab9a83ea0..cdc99a87b332 100644
--- a/unotools/source/misc/fontcvt.cxx
+++ b/unotools/source/misc/fontcvt.cxx
@@ -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 );
}
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index a4f8c1f81dda..c3b60498dff5 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -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
{