summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-28 19:05:19 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-28 19:09:23 +0100
commit3a32d02b618f0b7e41758ec7832bff0051d98c72 (patch)
tree047428de4340e3f098da878f782688483fe6fffd /oox
parentf365f652f5721639a9787e1fddeb101045782c5c (diff)
Clean up C-style casts from pointers to void
Change-Id: I4fd18b7282322ed7c1bcc12bb4f938bd4b57c87a
Diffstat (limited to 'oox')
-rw-r--r--oox/source/core/xmlfilterbase.cxx2
-rw-r--r--oox/source/export/drawingml.cxx34
2 files changed, 18 insertions, 18 deletions
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 3eccfe950551..5597a5865cf5 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -772,7 +772,7 @@ writeCustomProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xP
case TypeClass_BOOLEAN:
{
bool val ;
- val = *( sal_Bool * )( aprop[n].Value ).getValue();
+ val = *static_cast<sal_Bool const *>(( aprop[n].Value ).getValue());
writeElement( pAppProps, FSNS( XML_vt, XML_bool ), val ? 1 : 0);
}
break;
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 05a95e672ad3..57bb0b054beb 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -904,7 +904,7 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic , bool bRelPathToMedia )
.appendAscii( pExtension )
.makeStringAndClear(),
sMediaType );
- xOutStream->writeBytes( Sequence< sal_Int8 >( (const sal_Int8*) aData, nDataSize ) );
+ xOutStream->writeBytes( Sequence< sal_Int8 >( static_cast<const sal_Int8*>(aData), nDataSize ) );
xOutStream->closeOutput();
OString sRelPathToMedia = "media/image";
@@ -1184,16 +1184,16 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel
sal_Int32 nCharEscapement = 0;
if( GETA( CharHeight ) )
- nSize = (sal_Int32) (100*(*((float*) mAny.getValue())));
+ nSize = (sal_Int32) (100*(*static_cast<float const *>(mAny.getValue())));
if ( ( bComplex && GETA( CharWeightComplex ) ) || GETA( CharWeight ) )
{
- if ( *((float*) mAny.getValue()) >= awt::FontWeight::SEMIBOLD )
+ if ( *static_cast<float const *>(mAny.getValue()) >= awt::FontWeight::SEMIBOLD )
bold = "1";
}
if ( ( bComplex && GETA( CharPostureComplex ) ) || GETA( CharPosture ) )
- switch ( *((awt::FontSlant*) mAny.getValue()) )
+ switch ( *static_cast<awt::FontSlant const *>(mAny.getValue()) )
{
case awt::FontSlant_OBLIQUE :
case awt::FontSlant_ITALIC :
@@ -1205,7 +1205,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel
if ( GETAD( CharUnderline ) )
{
- switch ( *((sal_Int16*) mAny.getValue()) )
+ switch ( *static_cast<sal_Int16 const *>(mAny.getValue()) )
{
case awt::FontUnderline::SINGLE :
underline = "sng";
@@ -1260,7 +1260,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel
if ( GETAD( CharStrikeout ) )
{
- switch ( *((sal_Int16*) mAny.getValue()) )
+ switch ( *static_cast<sal_Int16 const *>(mAny.getValue()) )
{
case awt::FontStrikeout::NONE :
strikeout = "noStrike";
@@ -1307,7 +1307,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel
if( GETA( CharCaseMap ) )
{
- switch ( *((sal_Int16*) mAny.getValue()) )
+ switch ( *static_cast<sal_Int16 const *>(mAny.getValue()) )
{
case CaseMap::UPPERCASE :
cap = "all";
@@ -1332,7 +1332,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel
// mso doesn't like text color to be placed after typeface
if( GETAD( CharColor ) )
{
- sal_uInt32 color = *((sal_uInt32*) mAny.getValue());
+ sal_uInt32 color = *static_cast<sal_uInt32 const *>(mAny.getValue());
DBG(fprintf(stderr, "run color: %x auto: %x\n", static_cast<unsigned int>( color ), static_cast<unsigned int>( COL_AUTO )));
if( color == COL_AUTO ) // nCharColor depends to the background color
@@ -1416,7 +1416,7 @@ const char* DrawingML::GetFieldType( ::com::sun::star::uno::Reference< ::com::su
if( GETA( TextPortionType ) )
{
- aFieldType = OUString( *(OUString*)mAny.getValue() );
+ aFieldType = OUString( *static_cast<OUString const *>(mAny.getValue()) );
DBG(fprintf (stderr, "field type: %s\n", USS(aFieldType) ));
}
@@ -1621,27 +1621,27 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
DBG(fprintf (stderr, "pro name: %s\n", OUStringToOString( aPropName, RTL_TEXTENCODING_UTF8 ).getStr()));
if ( aPropName == "NumberingType" )
{
- nNumberingType = *( (sal_Int16*)pValue );
+ nNumberingType = *( static_cast<sal_Int16 const *>(pValue) );
}
else if ( aPropName == "Prefix" )
{
- if( *(OUString*)pValue == ")")
+ if( *static_cast<OUString const *>(pValue) == ")")
bPBoth = true;
}
else if ( aPropName == "Suffix" )
{
- if( *(OUString*)pValue == ".")
+ if( *static_cast<OUString const *>(pValue) == ".")
bSDot = true;
- else if( *(OUString*)pValue == ")")
+ else if( *static_cast<OUString const *>(pValue) == ")")
bPBehind = true;
}
else if ( aPropName == "BulletChar" )
{
- aBulletChar = OUString ( *( (OUString*)pValue ) )[ 0 ];
+ aBulletChar = OUString ( *( static_cast<OUString const *>(pValue) ) )[ 0 ];
}
else if ( aPropName == "BulletFont" )
{
- aFontDesc = *( (awt::FontDescriptor*)pValue );
+ aFontDesc = *static_cast<awt::FontDescriptor const *>(pValue);
bHasFontDesc = true;
// Our numbullet dialog has set the wrong textencoding for our "StarSymbol" font,
@@ -1654,11 +1654,11 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
}
else if ( aPropName == "BulletRelSize" )
{
- nBulletRelSize = *( (sal_Int16*)pValue );
+ nBulletRelSize = *static_cast<sal_Int16 const *>(pValue);
}
else if ( aPropName == "GraphicURL" )
{
- aGraphicURL = ( *(OUString*)pValue );
+ aGraphicURL = *static_cast<OUString const *>(pValue);
DBG(fprintf (stderr, "graphic url: %s\n", OUStringToOString( aGraphicURL, RTL_TEXTENCODING_UTF8 ).getStr()));
}
else if ( aPropName == "GraphicSize" )