summaryrefslogtreecommitdiff
path: root/xmlscript/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-28 19:08:44 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-28 19:09:29 +0100
commitb51252247ef9b53fea133aaa801e662369f71ea4 (patch)
treed90fe1b8593623f01950f1b8145f208c1bf462f2 /xmlscript/source
parent44b9b27b1ad161191d254f5497e7eb0766854966 (diff)
Clean up C-style casts from pointers to void
Change-Id: Id64d800ccebab274e5bb7ad2667c0e270e745bdf
Diffstat (limited to 'xmlscript/source')
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx4
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_export.cxx26
2 files changed, 15 insertions, 15 deletions
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
index dc5d0b79648f..10d03ce7378a 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
@@ -873,10 +873,10 @@ void ElementDescriptor::readFormattedFieldModel( StyleBag * all_styles )
switch (a.getValueTypeClass())
{
case TypeClass_DOUBLE:
- addAttribute( XMLNS_DIALOGS_PREFIX ":value-default", OUString::number( *(double const *)a.getValue() ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":value-default", OUString::number( *static_cast<double const *>(a.getValue()) ) );
break;
case TypeClass_STRING:
- addAttribute( XMLNS_DIALOGS_PREFIX ":value-default", *(OUString const *)a.getValue() );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":value-default", *static_cast<OUString const *>(a.getValue()) );
break;
default:
break;
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
index ab9049ff0d4c..5bb12a3e917a 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
@@ -518,7 +518,7 @@ void ElementDescriptor::readHexLongAttr( OUString const & rPropName, OUString co
Any a( _xProps->getPropertyValue( rPropName ) );
if (a.getValueTypeClass() == TypeClass_LONG)
{
- addAttribute( rAttrName, "0x" + OUString::number((sal_Int64)(sal_uInt64)*(sal_uInt32 *)a.getValue(),16) );
+ addAttribute( rAttrName, "0x" + OUString::number((sal_Int64)(sal_uInt64)*static_cast<sal_uInt32 const *>(a.getValue()),16) );
}
}
}
@@ -530,7 +530,7 @@ void ElementDescriptor::readDateFormatAttr( OUString const & rPropName, OUString
Any a( _xProps->getPropertyValue( rPropName ) );
if (a.getValueTypeClass() == TypeClass_SHORT)
{
- switch (*(sal_Int16 const *)a.getValue())
+ switch (*static_cast<sal_Int16 const *>(a.getValue()))
{
case 0:
addAttribute( rAttrName, "system_short" );
@@ -627,7 +627,7 @@ void ElementDescriptor::readTimeFormatAttr( OUString const & rPropName, OUString
Any a( _xProps->getPropertyValue( rPropName ) );
if (a.getValueTypeClass() == TypeClass_SHORT)
{
- switch (*(sal_Int16 const *)a.getValue())
+ switch (*static_cast<sal_Int16 const *>(a.getValue()))
{
case 0:
addAttribute( rAttrName, "24h_short" );
@@ -664,7 +664,7 @@ void ElementDescriptor::readAlignAttr( OUString const & rPropName, OUString cons
Any a( _xProps->getPropertyValue( rPropName ) );
if (a.getValueTypeClass() == TypeClass_SHORT)
{
- switch (*(sal_Int16 const *)a.getValue())
+ switch (*static_cast<sal_Int16 const *>(a.getValue()))
{
case 0:
addAttribute( rAttrName, "left" );
@@ -745,7 +745,7 @@ void ElementDescriptor::readImageAlignAttr( OUString const & rPropName, OUString
Any a( _xProps->getPropertyValue( rPropName ) );
if (a.getValueTypeClass() == TypeClass_SHORT)
{
- switch (*(sal_Int16 const *)a.getValue())
+ switch (*static_cast<sal_Int16 const *>(a.getValue()))
{
case 0:
addAttribute( rAttrName, "left" );
@@ -776,7 +776,7 @@ void ElementDescriptor::readImagePositionAttr( OUString const & rPropName, OUStr
Any a( _xProps->getPropertyValue( rPropName ) );
if (a.getValueTypeClass() == TypeClass_SHORT)
{
- switch (*(sal_Int16 const *)a.getValue())
+ switch (*static_cast<sal_Int16 const *>(a.getValue()))
{
case awt::ImagePosition::LeftTop:
addAttribute( rAttrName, "left-top" );
@@ -832,7 +832,7 @@ void ElementDescriptor::readButtonTypeAttr( OUString const & rPropName, OUString
Any a( _xProps->getPropertyValue( rPropName ) );
if (a.getValueTypeClass() == TypeClass_SHORT)
{
- switch (*(sal_Int16 const *)a.getValue())
+ switch (*static_cast<sal_Int16 const *>(a.getValue()))
{
case awt::PushButtonType_STANDARD:
addAttribute( rAttrName, "standard" );
@@ -861,7 +861,7 @@ void ElementDescriptor::readOrientationAttr( OUString const & rPropName, OUStrin
Any a( _xProps->getPropertyValue( rPropName ) );
if (a.getValueTypeClass() == TypeClass_LONG)
{
- switch (*(sal_Int32 const *)a.getValue())
+ switch (*static_cast<sal_Int32 const *>(a.getValue()))
{
case 0:
addAttribute( rAttrName, "horizontal" );
@@ -884,7 +884,7 @@ void ElementDescriptor::readLineEndFormatAttr( OUString const & rPropName, OUStr
Any a( _xProps->getPropertyValue( rPropName ) );
if (a.getValueTypeClass() == TypeClass_SHORT)
{
- switch (*(sal_Int16 const *)a.getValue())
+ switch (*static_cast<sal_Int16 const *>(a.getValue()))
{
case awt::LineEndFormat::CARRIAGE_RETURN:
addAttribute( rAttrName, "carriage-return" );
@@ -1103,22 +1103,22 @@ void ElementDescriptor::readDefaults( bool supportPrintable, bool supportVisible
a = _xProps->getPropertyValue( "PositionX" );
if (a.getValueTypeClass() == TypeClass_LONG)
{
- addAttribute( XMLNS_DIALOGS_PREFIX ":left", OUString::number( *(sal_Int32 const *)a.getValue() ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":left", OUString::number( *static_cast<sal_Int32 const *>(a.getValue()) ) );
}
a = _xProps->getPropertyValue( "PositionY" );
if (a.getValueTypeClass() == TypeClass_LONG)
{
- addAttribute( XMLNS_DIALOGS_PREFIX ":top", OUString::number( *(sal_Int32 const *)a.getValue() ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":top", OUString::number( *static_cast<sal_Int32 const *>(a.getValue()) ) );
}
a = _xProps->getPropertyValue( "Width" );
if (a.getValueTypeClass() == TypeClass_LONG)
{
- addAttribute( XMLNS_DIALOGS_PREFIX ":width", OUString::number( *(sal_Int32 const *)a.getValue() ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":width", OUString::number( *static_cast<sal_Int32 const *>(a.getValue()) ) );
}
a = _xProps->getPropertyValue( "Height" );
if (a.getValueTypeClass() == TypeClass_LONG)
{
- addAttribute( XMLNS_DIALOGS_PREFIX ":height", OUString::number( *(sal_Int32 const *)a.getValue() ) );
+ addAttribute( XMLNS_DIALOGS_PREFIX ":height", OUString::number( *static_cast<sal_Int32 const *>(a.getValue()) ) );
}
if (supportPrintable)