diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:08:13 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:09:28 +0100 |
commit | b646aa35d0f5c1115178167f78c6adadb0090aee (patch) | |
tree | 31b9a4d4cce15fd23ec1d7a5fce48a9a0ebb7fe1 /unotools/source/config | |
parent | c0de7e43b8b51c48c4c0a1f641a1654678bba07a (diff) |
Clean up C-style casts from pointers to void
Change-Id: I8c40cbe7c6928d89eb280344436a4b68a4884bd1
Diffstat (limited to 'unotools/source/config')
-rw-r--r-- | unotools/source/config/fltrcfg.cxx | 10 | ||||
-rw-r--r-- | unotools/source/config/fontcfg.cxx | 8 | ||||
-rw-r--r-- | unotools/source/config/misccfg.cxx | 6 | ||||
-rw-r--r-- | unotools/source/config/saveopt.cxx | 2 |
4 files changed, 13 insertions, 13 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() |