summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-01 12:11:52 +0200
committerNoel Grandin <noel@peralex.com>2014-10-01 13:08:43 +0200
commitc190577f754158c9e3b003a838bc97762e4773e8 (patch)
tree6b6188cedaa1c055b3293e20b821aab1e3a17849 /xmloff
parente5bf214ebb58637d1af89ea137c8952a46f14ef4 (diff)
loplugin: cstylecast
Change-Id: I25b82a96aace448a8debe90c181b22976ea95414
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLAxisContext.cxx4
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx4
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx12
-rw-r--r--xmloff/source/chart/SchXMLLegendContext.cxx2
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx4
-rw-r--r--xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx2
-rw-r--r--xmloff/source/chart/XMLChartStyleContext.cxx6
-rw-r--r--xmloff/source/core/xmlimp.cxx28
-rw-r--r--xmloff/source/draw/XMLShapePropertySetContext.cxx2
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx4
-rw-r--r--xmloff/source/draw/shapeexport.cxx2
-rw-r--r--xmloff/source/draw/xexptran.cxx116
-rw-r--r--xmloff/source/draw/ximp3dscene.cxx2
-rw-r--r--xmloff/source/draw/ximp3dscene.hxx4
-rw-r--r--xmloff/source/draw/ximpbody.hxx4
-rw-r--r--xmloff/source/draw/ximppage.cxx12
-rw-r--r--xmloff/source/draw/ximppage.hxx4
-rw-r--r--xmloff/source/draw/ximpstyl.cxx16
-rw-r--r--xmloff/source/draw/ximpstyl.hxx24
-rw-r--r--xmloff/source/style/XMLFontStylesContext_impl.hxx2
-rw-r--r--xmloff/source/style/prstylei.cxx10
-rw-r--r--xmloff/source/style/xmlnumfi.cxx4
-rw-r--r--xmloff/source/text/XMLIndexTOCContext.cxx4
-rw-r--r--xmloff/source/text/XMLTextListBlockContext.cxx4
-rw-r--r--xmloff/source/text/XMLTextShapeStyleContext.cxx2
-rw-r--r--xmloff/source/text/txtfldi.cxx2
-rw-r--r--xmloff/source/text/txtimp.cxx18
-rw-r--r--xmloff/source/text/txtparai.cxx14
28 files changed, 156 insertions, 156 deletions
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx
index 5dc939ecfaef..f7192cfcbd80 100644
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -228,7 +228,7 @@ void SchXMLAxisContext::CreateGrid( const OUString& sAutoStyleName, bool bIsMajo
SchXMLImportHelper::GetChartFamilyID(), sAutoStyleName );
if( pStyle && pStyle->ISA( XMLPropStyleContext ))
- (( XMLPropStyleContext* )pStyle )->FillPropertySet( xGridProp );
+ const_cast<XMLPropStyleContext*>( static_cast< const XMLPropStyleContext* >( pStyle ))->FillPropertySet( xGridProp );
}
}
}
@@ -501,7 +501,7 @@ void SchXMLAxisContext::CreateAxis()
if( xAxisSuppl.is() )
{
Reference< beans::XPropertySet > xXAxisProp( xAxisSuppl->getAxis(0), uno::UNO_QUERY );
- (( XMLPropStyleContext* )pStyle )->FillPropertySet( xXAxisProp );
+ const_cast<XMLPropStyleContext*>( static_cast< const XMLPropStyleContext* >( pStyle ))->FillPropertySet( xXAxisProp );
}
//set scale data of added x axis back to default
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index df97776b836c..28e338f9552b 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -372,7 +372,7 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut
SchXMLImportHelper::GetChartFamilyID(), sAutoStyleName );
if( pStyle && pStyle->ISA( XMLPropStyleContext ))
- (( XMLPropStyleContext* )pStyle )->FillPropertySet( xProp );
+ const_cast<XMLPropStyleContext*>( static_cast< const XMLPropStyleContext* >( pStyle ) )->FillPropertySet( xProp );
}
}
}
@@ -1198,7 +1198,7 @@ void SchXMLTitleContext::StartElement( const uno::Reference< xml::sax::XAttribut
SchXMLImportHelper::GetChartFamilyID(), msAutoStyleName );
if( pStyle && pStyle->ISA( XMLPropStyleContext ))
- (( XMLPropStyleContext* )pStyle )->FillPropertySet( xProp );
+ const_cast<XMLPropStyleContext*>( static_cast< const XMLPropStyleContext* >( pStyle ) )->FillPropertySet( xProp );
}
}
}
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 4f85439ad846..db5fc9edc979 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -767,8 +767,8 @@ void lcl_ReorderInternalSequencesAccordingToTheirRangeName(
for( ; nIndex < aIt->first; ++nIndex )
rInOutSequences.push_back(
SchXMLExportHelper_Impl::tDataSequenceCont::value_type(
- (uno::Reference< chart2::data::XDataSequence >)0,
- (uno::Reference< chart2::data::XDataSequence >)0 ));
+ uno::Reference< chart2::data::XDataSequence >(),
+ uno::Reference< chart2::data::XDataSequence >() ));
OSL_ASSERT( nIndex == aIt->first );
rInOutSequences.push_back( aIt->second );
}
@@ -2803,7 +2803,7 @@ void SchXMLExportHelper_Impl::exportSeries(
Reference< chart2::data::XDataSequence > xValues( xSequence->getValues() );
if( lcl_exportDomainForThisSequence( xValues, aFirstXDomainRange, mrExport ) )
m_aDataSequencesToExport.push_back( tLabelValuesDataPair(
- (uno::Reference< chart2::data::XDataSequence >)0, xValues ));
+ uno::Reference< chart2::data::XDataSequence >(), xValues ));
}
else if( nSeriesIdx==0 )
{
@@ -2819,7 +2819,7 @@ void SchXMLExportHelper_Impl::exportSeries(
}
if( xYValuesForBubbleChart.is() )
m_aDataSequencesToExport.push_back( tLabelValuesDataPair(
- (uno::Reference< chart2::data::XDataSequence >)0, xYValuesForBubbleChart ));
+ uno::Reference< chart2::data::XDataSequence >(), xYValuesForBubbleChart ));
}
}
@@ -2922,7 +2922,7 @@ void SchXMLExportHelper_Impl::exportPropertyMapping(
// register range for data table export
m_aDataSequencesToExport.push_back( tLabelValuesDataPair(
- (uno::Reference< chart2::data::XDataSequence >)0, xValues ));
+ uno::Reference< chart2::data::XDataSequence >(), xValues ));
}
}
}
@@ -3108,7 +3108,7 @@ void SchXMLExportHelper_Impl::exportErrorBar( const Reference<beans::XPropertySe
aErrorBarSequences.begin()); aIt != aErrorBarSequences.end(); ++aIt )
{
m_aDataSequencesToExport.push_back( tLabelValuesDataPair(
- (uno::Reference< chart2::data::XDataSequence >)0, *aIt ));
+ uno::Reference< chart2::data::XDataSequence >(), *aIt ));
}
}
diff --git a/xmloff/source/chart/SchXMLLegendContext.cxx b/xmloff/source/chart/SchXMLLegendContext.cxx
index c072ab9f6b42..7bb30bfc2c36 100644
--- a/xmloff/source/chart/SchXMLLegendContext.cxx
+++ b/xmloff/source/chart/SchXMLLegendContext.cxx
@@ -207,7 +207,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu
SchXMLImportHelper::GetChartFamilyID(), sAutoStyleName );
if( pStyle && pStyle->ISA( XMLPropStyleContext ))
- (( XMLPropStyleContext* )pStyle )->FillPropertySet( xLegendProps );
+ const_cast<XMLPropStyleContext*>( static_cast<const XMLPropStyleContext*>( pStyle ) )->FillPropertySet( xLegendProps );
}
}
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index e643771b1d31..6298cc74c389 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -841,7 +841,7 @@ void SchXMLWallFloorContext::StartElement( const uno::Reference< xml::sax::XAttr
SchXMLImportHelper::GetChartFamilyID(), sAutoStyleName );
if( pStyle && pStyle->ISA( XMLPropStyleContext ))
- (( XMLPropStyleContext* )pStyle )->FillPropertySet( xProp );
+ const_cast<XMLPropStyleContext*>( static_cast<const XMLPropStyleContext*>( pStyle ) )->FillPropertySet( xProp );
}
}
}
@@ -911,7 +911,7 @@ void SchXMLStockContext::StartElement( const uno::Reference< xml::sax::XAttribut
SchXMLImportHelper::GetChartFamilyID(), sAutoStyleName );
if( pStyle && pStyle->ISA( XMLPropStyleContext ))
- (( XMLPropStyleContext* )pStyle )->FillPropertySet( xProp );
+ const_cast<XMLPropStyleContext*>( static_cast<const XMLPropStyleContext*>( pStyle ) )->FillPropertySet( xProp );
}
}
}
diff --git a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx
index 32eb7255e56f..3cdafbb52ff0 100644
--- a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx
+++ b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx
@@ -130,7 +130,7 @@ void SchXMLEquationContext::StartElement( const uno::Reference< xml::sax::XAttri
{
// parse attributes
sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0;
- SchXMLImport& rImport = ( SchXMLImport& )GetImport();
+ SchXMLImport& rImport = static_cast< SchXMLImport& >(GetImport());
const SvXMLTokenMap& rAttrTokenMap = mrImportHelper.GetRegEquationAttrTokenMap();
OUString sAutoStyleName;
diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx
index cc7b285e1c21..ca3f36b9bedd 100644
--- a/xmloff/source/chart/XMLChartStyleContext.cxx
+++ b/xmloff/source/chart/XMLChartStyleContext.cxx
@@ -80,12 +80,12 @@ void lcl_NumberFormatStyleToProperty( const OUString& rStyleName, const OUString
{
if( !rStyleName.isEmpty())
{
- SvXMLNumFormatContext* pStyle = (SvXMLNumFormatContext *)rStylesContext.FindStyleChildContext(
- XML_STYLE_FAMILY_DATA_STYLE, rStyleName, true );
+ const SvXMLNumFormatContext* pStyle = static_cast<const SvXMLNumFormatContext *>(rStylesContext.FindStyleChildContext(
+ XML_STYLE_FAMILY_DATA_STYLE, rStyleName, true ));
if( pStyle )
{
uno::Any aNumberFormat;
- sal_Int32 nNumberFormat = pStyle->GetKey();
+ sal_Int32 nNumberFormat = const_cast<SvXMLNumFormatContext*>(pStyle)->GetKey();
aNumberFormat <<= nNumberFormat;
rPropSet->setPropertyValue( rPropertyName, aNumberFormat );
}
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index f9f196929324..33d84b154870 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -584,13 +584,13 @@ void SAL_CALL SvXMLImport::endDocument()
}
if( mxFontDecls.Is() )
- ((SvXMLStylesContext *)&mxFontDecls)->Clear();
+ static_cast<SvXMLStylesContext *>(&mxFontDecls)->Clear();
if( mxStyles.Is() )
- ((SvXMLStylesContext *)&mxStyles)->Clear();
+ static_cast<SvXMLStylesContext *>(&mxStyles)->Clear();
if( mxAutoStyles.Is() )
- ((SvXMLStylesContext *)&mxAutoStyles)->Clear();
+ static_cast<SvXMLStylesContext *>(&mxAutoStyles)->Clear();
if( mxMasterStyles.Is() )
- ((SvXMLStylesContext *)&mxMasterStyles)->Clear();
+ static_cast<SvXMLStylesContext *>(&mxMasterStyles)->Clear();
// possible form-layer related knittings which can only be done when
// the whole document exists
@@ -1538,32 +1538,32 @@ void SvXMLImport::SetMasterStyles( SvXMLStylesContext *pMasterStyles )
XMLFontStylesContext *SvXMLImport::GetFontDecls()
{
- return (XMLFontStylesContext *)&mxFontDecls;
+ return static_cast<XMLFontStylesContext *>(&mxFontDecls);
}
SvXMLStylesContext *SvXMLImport::GetStyles()
{
- return (SvXMLStylesContext *)&mxStyles;
+ return static_cast<SvXMLStylesContext *>(&mxStyles);
}
SvXMLStylesContext *SvXMLImport::GetAutoStyles()
{
- return (SvXMLStylesContext *)&mxAutoStyles;
+ return static_cast<SvXMLStylesContext *>(&mxAutoStyles);
}
const XMLFontStylesContext *SvXMLImport::GetFontDecls() const
{
- return (const XMLFontStylesContext *)&mxFontDecls;
+ return static_cast<const XMLFontStylesContext *>(&mxFontDecls);
}
const SvXMLStylesContext *SvXMLImport::GetStyles() const
{
- return (const SvXMLStylesContext *)&mxStyles;
+ return static_cast<const SvXMLStylesContext *>(&mxStyles);
}
const SvXMLStylesContext *SvXMLImport::GetAutoStyles() const
{
- return (const SvXMLStylesContext *)&mxAutoStyles;
+ return static_cast<const SvXMLStylesContext *>(&mxAutoStyles);
}
OUString SvXMLImport::GetAbsoluteReference(const OUString& rValue) const
@@ -1755,13 +1755,13 @@ void SvXMLImport::SetError(
void SvXMLImport::DisposingModel()
{
if( mxFontDecls.Is() )
- ((SvXMLStylesContext *)&mxFontDecls)->Clear();
+ static_cast<SvXMLStylesContext *>(&mxFontDecls)->Clear();
if( mxStyles.Is() )
- ((SvXMLStylesContext *)&mxStyles)->Clear();
+ static_cast<SvXMLStylesContext *>(&mxStyles)->Clear();
if( mxAutoStyles.Is() )
- ((SvXMLStylesContext *)&mxAutoStyles)->Clear();
+ static_cast<SvXMLStylesContext *>(&mxAutoStyles)->Clear();
if( mxMasterStyles.Is() )
- ((SvXMLStylesContext *)&mxMasterStyles)->Clear();
+ static_cast<SvXMLStylesContext *>(&mxMasterStyles)->Clear();
mxModel.set(0);
mxEventListener.set(NULL);
diff --git a/xmloff/source/draw/XMLShapePropertySetContext.cxx b/xmloff/source/draw/XMLShapePropertySetContext.cxx
index 1aec8f5a6df3..e4599f310e3b 100644
--- a/xmloff/source/draw/XMLShapePropertySetContext.cxx
+++ b/xmloff/source/draw/XMLShapePropertySetContext.cxx
@@ -52,7 +52,7 @@ void XMLShapePropertySetContext::EndElement()
Reference< container::XIndexReplace > xNumRule;
if( mxBulletStyle.Is() )
{
- SvxXMLListStyleContext* pBulletStyle = (SvxXMLListStyleContext*)&mxBulletStyle;
+ SvxXMLListStyleContext* pBulletStyle = static_cast<SvxXMLListStyleContext*>(&mxBulletStyle);
xNumRule = SvxXMLListStyleContext::CreateNumRule( GetImport().GetModel() );
if( xNumRule.is() )
pBulletStyle->FillUnoNumRule(xNumRule, NULL /* const SvI18NMap * ??? */ );
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index 6110b258ba2a..4b21bcaa268d 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -52,7 +52,7 @@ using namespace ::xmloff::token;
class SdXMLBodyContext_Impl : public SvXMLImportContext
{
- SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+ SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); }
public:
@@ -90,7 +90,7 @@ SvXMLImportContext *SdXMLBodyContext_Impl::CreateChildContext(
class SdXMLDocContext_Impl : public virtual SvXMLImportContext
{
protected:
- SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+ SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); }
public:
SdXMLDocContext_Impl(
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 2a838049342c..c5d09cdfb13c 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -1229,7 +1229,7 @@ void XMLShapeExport::ExportGraphicDefaults()
// construct PropertySetMapper
rtl::Reference< SvXMLExportPropertyMapper > xPropertySetMapper( CreateShapePropMapper( mrExport ) );
- ((XMLShapeExportPropertyMapper*)xPropertySetMapper.get())->SetAutoStyles( false );
+ static_cast<XMLShapeExportPropertyMapper*>(xPropertySetMapper.get())->SetAutoStyles( false );
// chain text attributes
xPropertySetMapper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(mrExport));
diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx
index f3968e3c37a2..6d9f3422372f 100644
--- a/xmloff/source/draw/xexptran.cxx
+++ b/xmloff/source/draw/xexptran.cxx
@@ -233,32 +233,32 @@ void SdXMLImExTransform2D::EmptyList()
{
case IMP_SDXMLEXP_TRANSOBJ2D_ROTATE :
{
- delete (ImpSdXMLExpTransObj2DRotate*)pObj;
+ delete static_cast<ImpSdXMLExpTransObj2DRotate*>(pObj);
break;
}
case IMP_SDXMLEXP_TRANSOBJ2D_SCALE :
{
- delete (ImpSdXMLExpTransObj2DScale*)pObj;
+ delete static_cast<ImpSdXMLExpTransObj2DScale*>(pObj);
break;
}
case IMP_SDXMLEXP_TRANSOBJ2D_TRANSLATE :
{
- delete (ImpSdXMLExpTransObj2DTranslate*)pObj;
+ delete static_cast<ImpSdXMLExpTransObj2DTranslate*>(pObj);
break;
}
case IMP_SDXMLEXP_TRANSOBJ2D_SKEWX :
{
- delete (ImpSdXMLExpTransObj2DSkewX*)pObj;
+ delete static_cast<ImpSdXMLExpTransObj2DSkewX*>(pObj);
break;
}
case IMP_SDXMLEXP_TRANSOBJ2D_SKEWY :
{
- delete (ImpSdXMLExpTransObj2DSkewY*)pObj;
+ delete static_cast<ImpSdXMLExpTransObj2DSkewY*>(pObj);
break;
}
case IMP_SDXMLEXP_TRANSOBJ2D_MATRIX :
{
- delete (ImpSdXMLExpTransObj2DMatrix*)pObj;
+ delete static_cast<ImpSdXMLExpTransObj2DMatrix*>(pObj);
break;
}
default :
@@ -308,39 +308,39 @@ const OUString& SdXMLImExTransform2D::GetExportString(const SvXMLUnitConverter&
case IMP_SDXMLEXP_TRANSOBJ2D_ROTATE :
{
aNewString += "rotate (";
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DRotate*)pObj)->mfRotate);
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj2DRotate*>(pObj)->mfRotate);
aNewString += aClosingBrace;
break;
}
case IMP_SDXMLEXP_TRANSOBJ2D_SCALE :
{
aNewString += "scale (";
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DScale*)pObj)->maScale.getX());
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj2DScale*>(pObj)->maScale.getX());
aNewString += aEmptySpace;
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DScale*)pObj)->maScale.getY());
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj2DScale*>(pObj)->maScale.getY());
aNewString += aClosingBrace;
break;
}
case IMP_SDXMLEXP_TRANSOBJ2D_TRANSLATE :
{
aNewString += "translate (";
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DTranslate*)pObj)->maTranslate.getX(), true);
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj2DTranslate*>(pObj)->maTranslate.getX(), true);
aNewString += aEmptySpace;
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DTranslate*)pObj)->maTranslate.getY(), true);
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj2DTranslate*>(pObj)->maTranslate.getY(), true);
aNewString += aClosingBrace;
break;
}
case IMP_SDXMLEXP_TRANSOBJ2D_SKEWX :
{
aNewString += "skewX (";
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DSkewX*)pObj)->mfSkewX);
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj2DSkewX*>(pObj)->mfSkewX);
aNewString += aClosingBrace;
break;
}
case IMP_SDXMLEXP_TRANSOBJ2D_SKEWY :
{
aNewString += "skewY (";
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DSkewY*)pObj)->mfSkewY);
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj2DSkewY*>(pObj)->mfSkewY);
aNewString += aClosingBrace;
break;
}
@@ -349,27 +349,27 @@ const OUString& SdXMLImExTransform2D::GetExportString(const SvXMLUnitConverter&
aNewString += "matrix (";
// a
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DMatrix*)pObj)->maMatrix.get(0, 0));
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj2DMatrix*>(pObj)->maMatrix.get(0, 0));
aNewString += aEmptySpace;
// b
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DMatrix*)pObj)->maMatrix.get(1, 0));
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj2DMatrix*>(pObj)->maMatrix.get(1, 0));
aNewString += aEmptySpace;
// c
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DMatrix*)pObj)->maMatrix.get(0, 1));
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj2DMatrix*>(pObj)->maMatrix.get(0, 1));
aNewString += aEmptySpace;
// d
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DMatrix*)pObj)->maMatrix.get(1, 1));
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj2DMatrix*>(pObj)->maMatrix.get(1, 1));
aNewString += aEmptySpace;
// e
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DMatrix*)pObj)->maMatrix.get(0, 2), true);
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj2DMatrix*>(pObj)->maMatrix.get(0, 2), true);
aNewString += aEmptySpace;
// f
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj2DMatrix*)pObj)->maMatrix.get(1, 2), true);
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj2DMatrix*>(pObj)->maMatrix.get(1, 2), true);
aNewString += aClosingBrace;
break;
@@ -546,34 +546,34 @@ void SdXMLImExTransform2D::GetFullTransform(::basegfx::B2DHomMatrix& rFullTrans)
// For the FileFormat there is a follow-up task (#i78698#) to fix this in the next
// ODF FileFormat version. For now - to emulate the old behaviour - it is necessary
// to mirror the value here
- rFullTrans.rotate(((ImpSdXMLExpTransObj2DRotate*)pObj)->mfRotate * -1.0);
+ rFullTrans.rotate(static_cast<ImpSdXMLExpTransObj2DRotate*>(pObj)->mfRotate * -1.0);
break;
}
case IMP_SDXMLEXP_TRANSOBJ2D_SCALE :
{
- const ::basegfx::B2DTuple& rScale = ((ImpSdXMLExpTransObj2DScale*)pObj)->maScale;
+ const ::basegfx::B2DTuple& rScale = static_cast<ImpSdXMLExpTransObj2DScale*>(pObj)->maScale;
rFullTrans.scale(rScale.getX(), rScale.getY());
break;
}
case IMP_SDXMLEXP_TRANSOBJ2D_TRANSLATE :
{
- const ::basegfx::B2DTuple& rTranslate = ((ImpSdXMLExpTransObj2DTranslate*)pObj)->maTranslate;
+ const ::basegfx::B2DTuple& rTranslate = static_cast<ImpSdXMLExpTransObj2DTranslate*>(pObj)->maTranslate;
rFullTrans.translate(rTranslate.getX(), rTranslate.getY());
break;
}
case IMP_SDXMLEXP_TRANSOBJ2D_SKEWX :
{
- rFullTrans.shearX(tan(((ImpSdXMLExpTransObj2DSkewX*)pObj)->mfSkewX));
+ rFullTrans.shearX(tan(static_cast<ImpSdXMLExpTransObj2DSkewX*>(pObj)->mfSkewX));
break;
}
case IMP_SDXMLEXP_TRANSOBJ2D_SKEWY :
{
- rFullTrans.shearY(tan(((ImpSdXMLExpTransObj2DSkewY*)pObj)->mfSkewY));
+ rFullTrans.shearY(tan(static_cast<ImpSdXMLExpTransObj2DSkewY*>(pObj)->mfSkewY));
break;
}
case IMP_SDXMLEXP_TRANSOBJ2D_MATRIX :
{
- rFullTrans *= ((ImpSdXMLExpTransObj2DMatrix*)pObj)->maMatrix;
+ rFullTrans *= static_cast<ImpSdXMLExpTransObj2DMatrix*>(pObj)->maMatrix;
break;
}
default :
@@ -655,32 +655,32 @@ void SdXMLImExTransform3D::EmptyList()
{
case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_X :
{
- delete (ImpSdXMLExpTransObj3DRotateX*)pObj;
+ delete static_cast<ImpSdXMLExpTransObj3DRotateX*>(pObj);
break;
}
case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_Y :
{
- delete (ImpSdXMLExpTransObj3DRotateY*)pObj;
+ delete static_cast<ImpSdXMLExpTransObj3DRotateY*>(pObj);
break;
}
case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_Z :
{
- delete (ImpSdXMLExpTransObj3DRotateZ*)pObj;
+ delete static_cast<ImpSdXMLExpTransObj3DRotateZ*>(pObj);
break;
}
case IMP_SDXMLEXP_TRANSOBJ3D_SCALE :
{
- delete (ImpSdXMLExpTransObj3DScale*)pObj;
+ delete static_cast<ImpSdXMLExpTransObj3DScale*>(pObj);
break;
}
case IMP_SDXMLEXP_TRANSOBJ3D_TRANSLATE :
{
- delete (ImpSdXMLExpTransObj3DTranslate*)pObj;
+ delete static_cast<ImpSdXMLExpTransObj3DTranslate*>(pObj);
break;
}
case IMP_SDXMLEXP_TRANSOBJ3D_MATRIX :
{
- delete (ImpSdXMLExpTransObj3DMatrix*)pObj;
+ delete static_cast<ImpSdXMLExpTransObj3DMatrix*>(pObj);
break;
}
default :
@@ -738,43 +738,43 @@ const OUString& SdXMLImExTransform3D::GetExportString(const SvXMLUnitConverter&
case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_X :
{
aNewString += "rotatex (";
- Imp_PutDoubleChar(aNewString, rConv, basegfx::rad2deg( ((ImpSdXMLExpTransObj3DRotateX*)pObj)->mfRotateX) );
+ Imp_PutDoubleChar(aNewString, rConv, basegfx::rad2deg( static_cast<ImpSdXMLExpTransObj3DRotateX*>(pObj)->mfRotateX) );
aNewString += aClosingBrace;
break;
}
case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_Y :
{
aNewString += "rotatey (";
- Imp_PutDoubleChar(aNewString, rConv, basegfx::rad2deg( ((ImpSdXMLExpTransObj3DRotateY*)pObj)->mfRotateY) );
+ Imp_PutDoubleChar(aNewString, rConv, basegfx::rad2deg( static_cast<ImpSdXMLExpTransObj3DRotateY*>(pObj)->mfRotateY) );
aNewString += aClosingBrace;
break;
}
case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_Z :
{
aNewString += "rotatez (";
- Imp_PutDoubleChar(aNewString, rConv, basegfx::rad2deg( ((ImpSdXMLExpTransObj3DRotateZ*)pObj)->mfRotateZ) );
+ Imp_PutDoubleChar(aNewString, rConv, basegfx::rad2deg( static_cast<ImpSdXMLExpTransObj3DRotateZ*>(pObj)->mfRotateZ) );
aNewString += aClosingBrace;
break;
}
case IMP_SDXMLEXP_TRANSOBJ3D_SCALE :
{
aNewString += "scale (";
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DScale*)pObj)->maScale.getX());
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DScale*>(pObj)->maScale.getX());
aNewString += aEmptySpace;
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DScale*)pObj)->maScale.getY());
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DScale*>(pObj)->maScale.getY());
aNewString += aEmptySpace;
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DScale*)pObj)->maScale.getZ());
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DScale*>(pObj)->maScale.getZ());
aNewString += aClosingBrace;
break;
}
case IMP_SDXMLEXP_TRANSOBJ3D_TRANSLATE :
{
aNewString += "translate (";
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DTranslate*)pObj)->maTranslate.getX(), true);
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DTranslate*>(pObj)->maTranslate.getX(), true);
aNewString += aEmptySpace;
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DTranslate*)pObj)->maTranslate.getY(), true);
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DTranslate*>(pObj)->maTranslate.getY(), true);
aNewString += aEmptySpace;
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DTranslate*)pObj)->maTranslate.getZ(), true);
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DTranslate*>(pObj)->maTranslate.getZ(), true);
aNewString += aClosingBrace;
break;
}
@@ -783,51 +783,51 @@ const OUString& SdXMLImExTransform3D::GetExportString(const SvXMLUnitConverter&
aNewString += "matrix (";
// a
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DMatrix*)pObj)->maMatrix.get(0, 0));
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DMatrix*>(pObj)->maMatrix.get(0, 0));
aNewString += aEmptySpace;
// b
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DMatrix*)pObj)->maMatrix.get(1, 0));
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DMatrix*>(pObj)->maMatrix.get(1, 0));
aNewString += aEmptySpace;
// c
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DMatrix*)pObj)->maMatrix.get(2, 0));
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DMatrix*>(pObj)->maMatrix.get(2, 0));
aNewString += aEmptySpace;
// d
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DMatrix*)pObj)->maMatrix.get(0, 1));
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DMatrix*>(pObj)->maMatrix.get(0, 1));
aNewString += aEmptySpace;
// e
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DMatrix*)pObj)->maMatrix.get(1, 1));
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DMatrix*>(pObj)->maMatrix.get(1, 1));
aNewString += aEmptySpace;
// f
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DMatrix*)pObj)->maMatrix.get(2, 1));
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DMatrix*>(pObj)->maMatrix.get(2, 1));
aNewString += aEmptySpace;
// g
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DMatrix*)pObj)->maMatrix.get(0, 2));
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DMatrix*>(pObj)->maMatrix.get(0, 2));
aNewString += aEmptySpace;
// h
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DMatrix*)pObj)->maMatrix.get(1, 2));
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DMatrix*>(pObj)->maMatrix.get(1, 2));
aNewString += aEmptySpace;
// i
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DMatrix*)pObj)->maMatrix.get(2, 2));
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DMatrix*>(pObj)->maMatrix.get(2, 2));
aNewString += aEmptySpace;
// j
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DMatrix*)pObj)->maMatrix.get(0, 3), true);
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DMatrix*>(pObj)->maMatrix.get(0, 3), true);
aNewString += aEmptySpace;
// k
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DMatrix*)pObj)->maMatrix.get(1, 3), true);
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DMatrix*>(pObj)->maMatrix.get(1, 3), true);
aNewString += aEmptySpace;
// l
- Imp_PutDoubleChar(aNewString, rConv, ((ImpSdXMLExpTransObj3DMatrix*)pObj)->maMatrix.get(2, 3), true);
+ Imp_PutDoubleChar(aNewString, rConv, static_cast<ImpSdXMLExpTransObj3DMatrix*>(pObj)->maMatrix.get(2, 3), true);
aNewString += aClosingBrace;
break;
@@ -1070,34 +1070,34 @@ void SdXMLImExTransform3D::GetFullTransform(::basegfx::B3DHomMatrix& rFullTrans)
{
case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_X :
{
- rFullTrans.rotate(((ImpSdXMLExpTransObj3DRotateX*)pObj)->mfRotateX, 0.0, 0.0);
+ rFullTrans.rotate(static_cast<ImpSdXMLExpTransObj3DRotateX*>(pObj)->mfRotateX, 0.0, 0.0);
break;
}
case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_Y :
{
- rFullTrans.rotate(0.0, ((ImpSdXMLExpTransObj3DRotateY*)pObj)->mfRotateY, 0.0);
+ rFullTrans.rotate(0.0, static_cast<ImpSdXMLExpTransObj3DRotateY*>(pObj)->mfRotateY, 0.0);
break;
}
case IMP_SDXMLEXP_TRANSOBJ3D_ROTATE_Z :
{
- rFullTrans.rotate(0.0, 0.0, ((ImpSdXMLExpTransObj3DRotateZ*)pObj)->mfRotateZ);
+ rFullTrans.rotate(0.0, 0.0, static_cast<ImpSdXMLExpTransObj3DRotateZ*>(pObj)->mfRotateZ);
break;
}
case IMP_SDXMLEXP_TRANSOBJ3D_SCALE :
{
- const ::basegfx::B3DTuple& rScale = ((ImpSdXMLExpTransObj3DScale*)pObj)->maScale;
+ const ::basegfx::B3DTuple& rScale = static_cast<ImpSdXMLExpTransObj3DScale*>(pObj)->maScale;
rFullTrans.scale(rScale.getX(), rScale.getY(), rScale.getZ());
break;
}
case IMP_SDXMLEXP_TRANSOBJ3D_TRANSLATE :
{
- const ::basegfx::B3DTuple& rTranslate = ((ImpSdXMLExpTransObj3DTranslate*)pObj)->maTranslate;
+ const ::basegfx::B3DTuple& rTranslate = static_cast<ImpSdXMLExpTransObj3DTranslate*>(pObj)->maTranslate;
rFullTrans.translate(rTranslate.getX(), rTranslate.getY(), rTranslate.getZ());
break;
}
case IMP_SDXMLEXP_TRANSOBJ3D_MATRIX :
{
- rFullTrans *= ((ImpSdXMLExpTransObj3DMatrix*)pObj)->maMatrix;
+ rFullTrans *= static_cast<ImpSdXMLExpTransObj3DMatrix*>(pObj)->maMatrix;
break;
}
default :
diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx
index f1dc67962568..ce1d8639b0fb 100644
--- a/xmloff/source/draw/ximp3dscene.cxx
+++ b/xmloff/source/draw/ximp3dscene.cxx
@@ -234,7 +234,7 @@ SvXMLImportContext * SdXML3DSceneAttributesHelper::create3DLightContext( sal_uIn
if(pContext)
{
pContext->AddRef();
- maList.push_back( (SdXML3DLightContext*)pContext );
+ maList.push_back( static_cast<SdXML3DLightContext*>(pContext) );
}
return pContext;
diff --git a/xmloff/source/draw/ximp3dscene.hxx b/xmloff/source/draw/ximp3dscene.hxx
index bbdfac75c363..b2fd87275c49 100644
--- a/xmloff/source/draw/ximp3dscene.hxx
+++ b/xmloff/source/draw/ximp3dscene.hxx
@@ -35,8 +35,8 @@ class SdXML3DSceneShapeContext : public SdXMLShapeContext, public SdXML3DSceneAt
// this is the scene at the same time
com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > mxChildren;
- const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
- SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+ const SdXMLImport& GetSdImport() const { return static_cast<const SdXMLImport&>(GetImport()); }
+ SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); }
protected:
void SetLocalShapesContext(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rNew)
diff --git a/xmloff/source/draw/ximpbody.hxx b/xmloff/source/draw/ximpbody.hxx
index 0a0cb161e546..c57638d8d307 100644
--- a/xmloff/source/draw/ximpbody.hxx
+++ b/xmloff/source/draw/ximpbody.hxx
@@ -53,8 +53,8 @@ public:
class SdXMLBodyContext : public SvXMLImportContext
{
- const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
- SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+ const SdXMLImport& GetSdImport() const { return static_cast<const SdXMLImport&>(GetImport()); }
+ SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); }
public:
SdXMLBodyContext( SdXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName );
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index 11a5a166b05f..a3e2bb92f510 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -355,7 +355,7 @@ void SdXMLGenericPageContext::SetStyle( OUString& rStyleName )
if( pContext && pContext->ISA( SvXMLStyleContext ) )
{
- const SdXMLStylesContext* pStyles = (SdXMLStylesContext*)pContext;
+ const SdXMLStylesContext* pStyles = static_cast<const SdXMLStylesContext*>(pContext);
if(pStyles)
{
const SvXMLStyleContext* pStyle = pStyles->FindStyleChildContext(
@@ -363,7 +363,7 @@ void SdXMLGenericPageContext::SetStyle( OUString& rStyleName )
if(pStyle && pStyle->ISA(XMLPropStyleContext))
{
- XMLPropStyleContext* pPropStyle = (XMLPropStyleContext*)pStyle;
+ const XMLPropStyleContext* pPropStyle = static_cast<const XMLPropStyleContext*>(pStyle);
Reference <beans::XPropertySet> xPropSet1(mxShapes, uno::UNO_QUERY);
if(xPropSet1.is())
@@ -392,7 +392,7 @@ void SdXMLGenericPageContext::SetStyle( OUString& rStyleName )
if(xPropSet.is())
{
- pPropStyle->FillPropertySet(xPropSet);
+ const_cast<XMLPropStyleContext*>(pPropStyle)->FillPropertySet(xPropSet);
if( xBackgroundSet.is() )
xPropSet1->setPropertyValue( aBackground, uno::makeAny( xBackgroundSet ) );
@@ -420,14 +420,14 @@ void SdXMLGenericPageContext::SetLayout()
if( pContext && pContext->ISA( SvXMLStyleContext ) )
{
- const SdXMLStylesContext* pStyles = (SdXMLStylesContext*)pContext;
+ const SdXMLStylesContext* pStyles = static_cast<const SdXMLStylesContext*>(pContext);
if(pStyles)
{
const SvXMLStyleContext* pStyle = pStyles->FindStyleChildContext( XML_STYLE_FAMILY_SD_PRESENTATIONPAGELAYOUT_ID, maPageLayoutName);
if(pStyle && pStyle->ISA(SdXMLPresentationPageLayoutContext))
{
- SdXMLPresentationPageLayoutContext* pLayout = (SdXMLPresentationPageLayoutContext*)pStyle;
+ const SdXMLPresentationPageLayoutContext* pLayout = static_cast<const SdXMLPresentationPageLayoutContext*>(pStyle);
nType = pLayout->GetTypeId();
}
}
@@ -489,7 +489,7 @@ void SdXMLGenericPageContext::SetPageMaster( OUString& rsPageMasterName )
if(pStyle && pStyle->ISA(SdXMLPageMasterContext))
{
- const SdXMLPageMasterContext* pPageMaster = (SdXMLPageMasterContext*)pStyle;
+ const SdXMLPageMasterContext* pPageMaster = static_cast<const SdXMLPageMasterContext*>(pStyle);
const SdXMLPageMasterStyleContext* pPageMasterContext = pPageMaster->GetPageMasterStyle();
if(pPageMasterContext)
diff --git a/xmloff/source/draw/ximppage.hxx b/xmloff/source/draw/ximppage.hxx
index 52cf4ccd899a..de944c8972fc 100644
--- a/xmloff/source/draw/ximppage.hxx
+++ b/xmloff/source/draw/ximppage.hxx
@@ -55,8 +55,8 @@ protected:
/** deletes all shapes on this drawing page */
void DeleteAllShapes();
- const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
- SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+ const SdXMLImport& GetSdImport() const { return static_cast<const SdXMLImport&>(GetImport()); }
+ SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); }
/** sets the properties from a page master style with the given name on this contexts page */
void SetPageMaster( OUString& rsPageMasterName );
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 83c2c481bacf..3e3ddd3c056a 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -439,7 +439,7 @@ SvXMLImportContext *SdXMLPageMasterContext::CreateChildContext(
{
pContext->AddRef();
DBG_ASSERT(!mpPageMasterStyle, "PageMasterStyle is set, there seem to be two of them (!)");
- mpPageMasterStyle = (SdXMLPageMasterStyleContext*)pContext;
+ mpPageMasterStyle = static_cast<SdXMLPageMasterStyleContext*>(pContext);
}
}
@@ -498,7 +498,7 @@ SvXMLImportContext *SdXMLPresentationPageLayoutContext::CreateChildContext(
if(pContext)
{
pContext->AddRef();
- maList.push_back( (SdXMLPresentationPlaceholderContext*)pContext );
+ maList.push_back( static_cast<SdXMLPresentationPlaceholderContext*>(pContext) );
}
}
@@ -885,7 +885,7 @@ void SdXMLMasterPageContext::EndElement()
{
SvXMLImportContext* pContext = GetSdImport().GetShapeImport()->GetStylesContext();
if( pContext && pContext->ISA( SvXMLStyleContext ) )
- ((SdXMLStylesContext*)pContext)->SetMasterPageStyles(*this);
+ static_cast<SdXMLStylesContext*>(pContext)->SetMasterPageStyles(*this);
}
SdXMLGenericPageContext::EndElement();
@@ -1160,7 +1160,7 @@ void SdXMLStylesContext::EndElement()
const SvXMLStyleContext* pStyle = GetStyle(a);
if(pStyle && pStyle->ISA(XMLShapeStyleContext))
{
- XMLShapeStyleContext* pDocStyle = (XMLShapeStyleContext*)pStyle;
+ const XMLShapeStyleContext* pDocStyle = static_cast<const XMLShapeStyleContext*>(pStyle);
SvXMLStylesContext* pStylesContext = GetSdImport().GetShapeImport()->GetStylesContext();
if( pStylesContext )
@@ -1169,10 +1169,10 @@ void SdXMLStylesContext::EndElement()
if(pStyle && pStyle->ISA(XMLShapeStyleContext))
{
- XMLShapeStyleContext* pParentStyle = (XMLShapeStyleContext*)pStyle;
+ const XMLShapeStyleContext* pParentStyle = static_cast<const XMLShapeStyleContext*>(pStyle);
if(pParentStyle->GetStyle().is())
{
- pDocStyle->SetStyle(pParentStyle->GetStyle());
+ const_cast<XMLShapeStyleContext*>(pDocStyle)->SetStyle(pParentStyle->GetStyle());
}
}
}
@@ -1469,7 +1469,7 @@ uno::Reference< container::XNameAccess > SdXMLStylesContext::getPageLayouts() co
if(pStyle && pStyle->ISA(SdXMLPresentationPageLayoutContext))
{
xLayouts->insertByName( pStyle->GetName(), uno::makeAny(
- (sal_Int32)((SdXMLPresentationPageLayoutContext*)pStyle)->GetTypeId() ) );
+ (sal_Int32)static_cast<const SdXMLPresentationPageLayoutContext*>(pStyle)->GetTypeId() ) );
}
}
@@ -1535,7 +1535,7 @@ SvXMLImportContext* SdXMLMasterStylesContext::CreateChildContext(
if(pContext)
{
pContext->AddRef();
- maMasterPageList.push_back( (SdXMLMasterPageContext*)pContext );
+ maMasterPageList.push_back( static_cast<SdXMLMasterPageContext*>(pContext) );
}
}
}
diff --git a/xmloff/source/draw/ximpstyl.hxx b/xmloff/source/draw/ximpstyl.hxx
index 6f88a0aed7c6..b1a693811cfc 100644
--- a/xmloff/source/draw/ximpstyl.hxx
+++ b/xmloff/source/draw/ximpstyl.hxx
@@ -42,8 +42,8 @@ class SdXMLPageMasterStyleContext: public SvXMLStyleContext
sal_Int32 mnHeight;
com::sun::star::view::PaperOrientation meOrientation;
- const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
- SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+ const SdXMLImport& GetSdImport() const { return static_cast<const SdXMLImport&>(GetImport()); }
+ SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); }
public:
TYPEINFO_OVERRIDE();
@@ -71,8 +71,8 @@ class SdXMLPageMasterContext: public SvXMLStyleContext
OUString msName;
SdXMLPageMasterStyleContext*mpPageMasterStyle;
- const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
- SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+ const SdXMLImport& GetSdImport() const { return static_cast<const SdXMLImport&>(GetImport()); }
+ SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); }
public:
TYPEINFO_OVERRIDE();
@@ -135,8 +135,8 @@ class SdXMLPresentationPlaceholderContext: public SvXMLImportContext
sal_Int32 mnWidth;
sal_Int32 mnHeight;
- const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
- SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+ const SdXMLImport& GetSdImport() const { return static_cast<const SdXMLImport&>(GetImport()); }
+ SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); }
public:
SdXMLPresentationPlaceholderContext(
@@ -162,8 +162,8 @@ class SdXMLPresentationPageLayoutContext: public SvXMLStyleContext
ImpPlaceholderList maList;
sal_uInt16 mnTypeId;
- const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
- SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+ const SdXMLImport& GetSdImport() const { return static_cast<const SdXMLImport&>(GetImport()); }
+ SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); }
public:
TYPEINFO_OVERRIDE();
@@ -192,8 +192,8 @@ class SdXMLStylesContext : public SvXMLStylesContext
SvXMLNumFmtHelper* mpNumFmtHelper;
SvNumberFormatter* mpNumFormatter;
- const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
- SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+ const SdXMLImport& GetSdImport() const { return static_cast<const SdXMLImport&>(GetImport()); }
+ SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); }
void ImpSetGraphicStyles() const;
void ImpSetCellStyles() const;
@@ -243,8 +243,8 @@ class SdXMLMasterStylesContext : public SvXMLImportContext
{
ImpMasterPageList maMasterPageList;
- const SdXMLImport& GetSdImport() const { return (const SdXMLImport&)GetImport(); }
- SdXMLImport& GetSdImport() { return (SdXMLImport&)GetImport(); }
+ const SdXMLImport& GetSdImport() const { return static_cast<const SdXMLImport&>(GetImport()); }
+ SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); }
public:
TYPEINFO_OVERRIDE();
diff --git a/xmloff/source/style/XMLFontStylesContext_impl.hxx b/xmloff/source/style/XMLFontStylesContext_impl.hxx
index 9f8edec913da..3938aa670659 100644
--- a/xmloff/source/style/XMLFontStylesContext_impl.hxx
+++ b/xmloff/source/style/XMLFontStylesContext_impl.hxx
@@ -35,7 +35,7 @@ class XMLFontStyleContextFontFace : public SvXMLStyleContext
XMLFontStylesContext *GetStyles()
{
- return ((XMLFontStylesContext *)&xStyles);
+ return static_cast<XMLFontStylesContext *>(&xStyles);
}
public:
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index 77a2fcffff5f..a8c5aa4ab85b 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -57,7 +57,7 @@ void XMLPropStyleContext::SetAttribute( sal_uInt16 nPrefixKey,
{
if( XML_NAMESPACE_STYLE == nPrefixKey && IsXMLToken( rLocalName, XML_FAMILY ) )
{
- DBG_ASSERT( GetFamily() == ((SvXMLStylesContext *)&mxStyles)->GetFamily( rValue ), "unexpected style family" );
+ DBG_ASSERT( GetFamily() == static_cast<SvXMLStylesContext *>(&mxStyles)->GetFamily( rValue ), "unexpected style family" );
}
else
{
@@ -193,7 +193,7 @@ SvXMLImportContext *XMLPropStyleContext::CreateChildContext(
if( nFamily )
{
rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap =
- ((SvXMLStylesContext *)&mxStyles)->GetImportPropertyMapper(
+ static_cast<SvXMLStylesContext *>(&mxStyles)->GetImportPropertyMapper(
GetFamily() );
if( xImpPrMap.is() )
pContext = new SvXMLPropertySetContext( GetImport(), nPrefix,
@@ -214,7 +214,7 @@ void XMLPropStyleContext::FillPropertySet(
const Reference< XPropertySet > & rPropSet )
{
rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap =
- ((SvXMLStylesContext *)&mxStyles)->GetImportPropertyMapper(
+ static_cast<SvXMLStylesContext *>(&mxStyles)->GetImportPropertyMapper(
GetFamily() );
DBG_ASSERT( xImpPrMap.is(), "There is the import prop mapper" );
if( xImpPrMap.is() )
@@ -230,7 +230,7 @@ Reference < XStyle > XMLPropStyleContext::Create()
Reference < XStyle > xNewStyle;
OUString sServiceName(
- ((SvXMLStylesContext *)&mxStyles)->GetServiceName( GetFamily() ) );
+ static_cast<SvXMLStylesContext *>(&mxStyles)->GetServiceName( GetFamily() ) );
if( !sServiceName.isEmpty() )
{
Reference< XMultiServiceFactory > xFactory( GetImport().GetModel(),
@@ -438,7 +438,7 @@ void XMLPropStyleContext::Finish( bool bOverwrite )
{
// The families cintaner must exist
Reference < XNameContainer > xFamilies =
- ((SvXMLStylesContext *)&mxStyles)->GetStylesContainer( GetFamily() );
+ static_cast<SvXMLStylesContext *>(&mxStyles)->GetStylesContainer( GetFamily() );
DBG_ASSERT( xFamilies.is(), "Families lost" );
if( !xFamilies.is() )
return;
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 35778d4f7a47..6c9b3f0ac8ac 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -1568,8 +1568,8 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter)
for (sal_uInt32 i = 0; i < aMyConditions.size(); i++)
{
- SvXMLNumFormatContext* pStyle = (SvXMLNumFormatContext *)pStyles->FindStyleChildContext(
- XML_STYLE_FAMILY_DATA_STYLE, aMyConditions[i].sMapName, false);
+ SvXMLNumFormatContext* pStyle = const_cast<SvXMLNumFormatContext*>( static_cast<const SvXMLNumFormatContext *>(pStyles->FindStyleChildContext(
+ XML_STYLE_FAMILY_DATA_STYLE, aMyConditions[i].sMapName, false)));
if (pStyle)
{
if ((pStyle->PrivateGetKey() > -1)) // don't reset pStyle's bRemoveAfterUse flag
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx
index 0054d6e04d71..e674dacaec41 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -268,7 +268,7 @@ void XMLIndexTOCContext::EndElement()
// get rid of last paragraph (unless it's the only paragraph)
rHelper->GetCursor()->goRight(1, sal_False);
if( xBodyContextRef.Is() &&
- ((XMLIndexBodyContext*)&xBodyContextRef)->HasContent() )
+ static_cast<XMLIndexBodyContext*>(&xBodyContextRef)->HasContent() )
{
rHelper->GetCursor()->goLeft(1, sal_True);
rHelper->GetText()->insertString(rHelper->GetCursorAsRange(),
@@ -301,7 +301,7 @@ SvXMLImportContext* XMLIndexTOCContext::CreateChildContext(
pContext = new XMLIndexBodyContext(GetImport(), nPrefix,
rLocalName);
if ( !xBodyContextRef.Is() ||
- !((XMLIndexBodyContext*)&xBodyContextRef)->HasContent() )
+ !static_cast<XMLIndexBodyContext*>(&xBodyContextRef)->HasContent() )
{
xBodyContextRef = pContext;
}
diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx
index ec0c91872198..25bab0ec5b9f 100644
--- a/xmloff/source/text/XMLTextListBlockContext.cxx
+++ b/xmloff/source/text/XMLTextListBlockContext.cxx
@@ -75,7 +75,7 @@ XMLTextListBlockContext::XMLTextListBlockContext(
if( mxParentListBlock.Is() )
{
XMLTextListBlockContext *pParent =
- (XMLTextListBlockContext *)&mxParentListBlock;
+ static_cast<XMLTextListBlockContext *>(&mxParentListBlock);
msListStyleName = pParent->GetListStyleName();
sParentListStyleName = msListStyleName;
mxNumRules = pParent->GetNumRules();
@@ -240,7 +240,7 @@ void XMLTextListBlockContext::EndElement()
// Numbering has not to be restarted if it has been restarted within
// a child list.
XMLTextListBlockContext *pParent =
- (XMLTextListBlockContext *)&mxParentListBlock;
+ static_cast<XMLTextListBlockContext *>(&mxParentListBlock);
if( pParent )
{
pParent->mbRestartNumbering = mbRestartNumbering;
diff --git a/xmloff/source/text/XMLTextShapeStyleContext.cxx b/xmloff/source/text/XMLTextShapeStyleContext.cxx
index 4e29e07d6d2b..a59f200c2d68 100644
--- a/xmloff/source/text/XMLTextShapeStyleContext.cxx
+++ b/xmloff/source/text/XMLTextShapeStyleContext.cxx
@@ -224,7 +224,7 @@ void XMLTextShapeStyleContext::CreateAndInsert( bool bOverwrite )
{
// set event suppplier and release reference to context
Reference<XEventsSupplier> xEventsSupplier(xStyle, UNO_QUERY);
- ((XMLEventsImportContext *)&xEventContext)->SetEvents(xEventsSupplier);
+ static_cast<XMLEventsImportContext *>(&xEventContext)->SetEvents(xEventsSupplier);
xEventContext = 0;
}
}
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index dbf3f0942d63..913613591016 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2760,7 +2760,7 @@ void XMLMacroFieldImportContext::PrepareField(
{
// get event sequence
XMLEventsImportContext* pEvents =
- (XMLEventsImportContext*)&xEventContext;
+ static_cast<XMLEventsImportContext*>(&xEventContext);
Sequence<PropertyValue> aValues;
pEvents->GetEventSequence( sOnClick, aValues );
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 527566712000..8c954064e399 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -1221,7 +1221,7 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars,
if (!rStyleName.isEmpty() && m_pImpl->m_xAutoStyles.Is())
{
const SvXMLStyleContext* pTempStyle =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)->
FindStyleChildContext( nFamily, rStyleName,
true );
pStyle = const_cast<XMLTextStyleContext*>(PTR_CAST( XMLTextStyleContext,pTempStyle));
@@ -1233,7 +1233,7 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars,
if( nCount )
{
rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)
->GetImportPropertyMapper(nFamily);
if( xImpPrMap.is() )
{
@@ -1431,7 +1431,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
if (!sStyleName.isEmpty() && m_pImpl->m_xAutoStyles.Is())
{
const SvXMLStyleContext* pTempStyle =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)->
FindStyleChildContext( nFamily, sStyleName, true );
pStyle = const_cast<XMLTextStyleContext*>(PTR_CAST( XMLTextStyleContext,pTempStyle));
}
@@ -2117,7 +2117,7 @@ void XMLTextImportHelper::SetRuby(
if (!rStyleName.isEmpty() && m_pImpl->m_xAutoStyles.Is())
{
const SvXMLStyleContext* pTempStyle =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)->
FindStyleChildContext( XML_STYLE_FAMILY_TEXT_RUBY,
rStyleName, true );
pStyle = const_cast<XMLPropStyleContext*>(PTR_CAST(XMLPropStyleContext,pTempStyle));
@@ -2351,7 +2351,7 @@ sal_Int32 XMLTextImportHelper::GetDataStyleKey(const OUString& sStyleName,
bool* pIsSystemLanguage )
{
const SvXMLStyleContext* pStyle =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)->
FindStyleChildContext( XML_STYLE_FAMILY_DATA_STYLE,
sStyleName, true );
@@ -2387,7 +2387,7 @@ const SvxXMLListStyleContext *XMLTextImportHelper::FindAutoListStyle( const OUSt
if (m_pImpl->m_xAutoStyles.Is())
{
const SvXMLStyleContext* pTempStyle =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)->
FindStyleChildContext( XML_STYLE_FAMILY_TEXT_LIST, rName,
true );
pStyle = PTR_CAST( SvxXMLListStyleContext ,pTempStyle);
@@ -2402,7 +2402,7 @@ XMLPropStyleContext *XMLTextImportHelper::FindAutoFrameStyle( const OUString& rN
if (m_pImpl->m_xAutoStyles.Is())
{
const SvXMLStyleContext* pTempStyle =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)->
FindStyleChildContext( XML_STYLE_FAMILY_SD_GRAPHICS_ID, rName,
true );
pStyle = const_cast<XMLPropStyleContext*>(PTR_CAST( XMLPropStyleContext ,pTempStyle));
@@ -2418,7 +2418,7 @@ XMLPropStyleContext* XMLTextImportHelper::FindSectionStyle(
if (m_pImpl->m_xAutoStyles.Is())
{
const SvXMLStyleContext* pTempStyle =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)->
FindStyleChildContext(
XML_STYLE_FAMILY_TEXT_SECTION,
rName, true );
@@ -2435,7 +2435,7 @@ XMLPropStyleContext* XMLTextImportHelper::FindPageMaster(
if (m_pImpl->m_xAutoStyles.Is())
{
const SvXMLStyleContext* pTempStyle =
- ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
+ static_cast<SvXMLStylesContext *>(&m_pImpl->m_xAutoStyles)->
FindStyleChildContext(
XML_STYLE_FAMILY_PAGE_MASTER,
rName, true );
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index a7b94e46a7dc..3aefc7827e68 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -256,7 +256,7 @@ XMLEndReferenceContext_Impl::XMLEndReferenceContext_Impl(
{
XMLHint_Impl *pHint = &rHints[nPos];
if ( pHint->IsReference() &&
- sName.equals( ((XMLReferenceHint_Impl *)pHint)->GetRefName()) )
+ sName.equals( static_cast<XMLReferenceHint_Impl *>(pHint)->GetRefName()) )
{
// set end and stop searching
pHint->SetEnd(GetImport().GetTextImport()->
@@ -1127,7 +1127,7 @@ void XMLIndexMarkImportContext_Impl::StartElement(
XMLHint_Impl *pHint = &rHints[nPos];
if ( pHint->IsIndexMark() &&
sID.equals(
- ((XMLIndexMarkHint_Impl *)pHint)->GetID()) )
+ static_cast<XMLIndexMarkHint_Impl *>(pHint)->GetID()) )
{
// set end and stop searching
pHint->SetEnd(xPos);
@@ -2086,7 +2086,7 @@ XMLParaContext::~XMLParaContext()
case XML_HINT_STYLE:
{
const OUString& rStyleName =
- ((XMLStyleHint_Impl *)pHint)->GetStyleName();
+ static_cast<XMLStyleHint_Impl *>(pHint)->GetStyleName();
if( !rStyleName.isEmpty() )
xTxtImport->SetStyleAndAttrs( GetImport(),
xAttrCursor, rStyleName,
@@ -2096,7 +2096,7 @@ XMLParaContext::~XMLParaContext()
case XML_HINT_REFERENCE:
{
const OUString& rRefName =
- ((XMLReferenceHint_Impl *)pHint)->GetRefName();
+ static_cast<XMLReferenceHint_Impl *>(pHint)->GetRefName();
if( !rRefName.isEmpty() )
{
if( !pHint->GetEnd().is() )
@@ -2115,7 +2115,7 @@ XMLParaContext::~XMLParaContext()
case XML_HINT_HYPERLINK:
{
const XMLHyperlinkHint_Impl *pHHint =
- (const XMLHyperlinkHint_Impl *)pHint;
+ static_cast<const XMLHyperlinkHint_Impl *>(pHint);
xTxtImport->SetHyperlink( GetImport(),
xAttrCursor,
pHHint->GetHRef(),
@@ -2129,7 +2129,7 @@ XMLParaContext::~XMLParaContext()
case XML_HINT_INDEX_MARK:
{
Reference<beans::XPropertySet> xMark(
- ((const XMLIndexMarkHint_Impl *)pHint)->GetMark());
+ static_cast<const XMLIndexMarkHint_Impl *>(pHint)->GetMark());
Reference<XTextContent> xContent(xMark, UNO_QUERY);
xTxtImport->GetText()->insertTextContent(
xAttrCursor, xContent, sal_True );
@@ -2138,7 +2138,7 @@ XMLParaContext::~XMLParaContext()
case XML_HINT_TEXT_FRAME:
{
const XMLTextFrameHint_Impl *pFHint =
- (const XMLTextFrameHint_Impl *)pHint;
+ static_cast<const XMLTextFrameHint_Impl *>(pHint);
// Check for text content (#i33242#)
Reference < XTextContent > xTextContent =
pFHint->GetTextContent();