diff options
Diffstat (limited to 'filter/source/msfilter')
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 4 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 57 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 36 |
3 files changed, 48 insertions, 49 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 1e3d9cb8e592..561c98f49ccc 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -1367,7 +1367,7 @@ GraphicObject* lclDrawHatch( const drawing::Hatch& rHatch, const Color& rBackCol pVDev->SetLineColor(); pVDev->SetFillColor(bFillBackground ? rBackColor : Color(COL_TRANSPARENT)); pVDev->DrawRect(rRect); - pVDev->DrawHatch(tools::PolyPolygon(rRect), Hatch((HatchStyle)rHatch.Style, Color(rHatch.Color), rHatch.Distance, static_cast<sal_uInt16>(rHatch.Angle))); + pVDev->DrawHatch(tools::PolyPolygon(rRect), Hatch(static_cast<HatchStyle>(rHatch.Style), Color(rHatch.Color), rHatch.Distance, static_cast<sal_uInt16>(rHatch.Angle))); aMtf.Stop(); aMtf.WindStart(); aMtf.SetPrefMapMode(MapMode(MapUnit::Map100thMM)); @@ -3961,7 +3961,7 @@ EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject || pGraphicAttr->IsAdjusted() ) { SvMemoryStream aSt( sizeof( GraphicAttr ) ); - aSt.WriteUInt16( (sal_uInt16)pGraphicAttr->GetDrawMode() ) + aSt.WriteUInt16( static_cast<sal_uInt16>(pGraphicAttr->GetDrawMode()) ) .WriteUInt32( static_cast<sal_uInt32>(pGraphicAttr->GetMirrorFlags()) ) .WriteInt32( pGraphicAttr->GetLeftCrop() ) .WriteInt32( pGraphicAttr->GetTopCrop() ) diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index e765c3f9fb5e..f840ee3fce62 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -906,7 +906,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh sal_Int32 nLineWidth = static_cast<sal_Int32>(GetPropertyValue( DFF_Prop_lineWidth, 9525 )); // support LineCap - const MSO_LineCap eLineCap((MSO_LineCap)GetPropertyValue(DFF_Prop_lineEndCapStyle, mso_lineEndCapSquare)); + const MSO_LineCap eLineCap(static_cast<MSO_LineCap>(GetPropertyValue(DFF_Prop_lineEndCapStyle, mso_lineEndCapSquare))); switch(eLineCap) { @@ -928,7 +928,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh } } - MSO_LineDashing eLineDashing = (MSO_LineDashing)GetPropertyValue( DFF_Prop_lineDashing, mso_lineSolid ); + MSO_LineDashing eLineDashing = static_cast<MSO_LineDashing>(GetPropertyValue( DFF_Prop_lineDashing, mso_lineSolid )); if (eLineDashing == mso_lineSolid || nLineWidth < 0) rSet.Put(XLineStyleItem( drawing::LineStyle_SOLID ) ); else @@ -1008,7 +1008,7 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh MSO_LineJoin eLineJointDefault = mso_lineJoinMiter; if ( eShapeType == mso_sptMin ) eLineJointDefault = mso_lineJoinRound; - MSO_LineJoin eLineJoint = (MSO_LineJoin)GetPropertyValue( DFF_Prop_lineJoinStyle, eLineJointDefault ); + MSO_LineJoin eLineJoint = static_cast<MSO_LineJoin>(GetPropertyValue( DFF_Prop_lineJoinStyle, eLineJointDefault )); css::drawing::LineJoint eXLineJoint( css::drawing::LineJoint_MITER ); if ( eLineJoint == mso_lineJoinBevel ) eXLineJoint = css::drawing::LineJoint_BEVEL; @@ -1024,9 +1024,9 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh if ( IsProperty( DFF_Prop_lineStartArrowhead ) ) { - MSO_LineEnd eLineEnd = (MSO_LineEnd)GetPropertyValue( DFF_Prop_lineStartArrowhead, 0 ); - MSO_LineEndWidth eWidth = (MSO_LineEndWidth)GetPropertyValue( DFF_Prop_lineStartArrowWidth, mso_lineMediumWidthArrow ); - MSO_LineEndLength eLength = (MSO_LineEndLength)GetPropertyValue( DFF_Prop_lineStartArrowLength, mso_lineMediumLenArrow ); + MSO_LineEnd eLineEnd = static_cast<MSO_LineEnd>(GetPropertyValue( DFF_Prop_lineStartArrowhead, 0 )); + MSO_LineEndWidth eWidth = static_cast<MSO_LineEndWidth>(GetPropertyValue( DFF_Prop_lineStartArrowWidth, mso_lineMediumWidthArrow )); + MSO_LineEndLength eLength = static_cast<MSO_LineEndLength>(GetPropertyValue( DFF_Prop_lineStartArrowLength, mso_lineMediumLenArrow )); sal_Int32 nArrowWidth; bool bArrowCenter; @@ -1042,9 +1042,9 @@ void DffPropertyReader::ApplyLineAttributes( SfxItemSet& rSet, const MSO_SPT eSh if ( IsProperty( DFF_Prop_lineEndArrowhead ) ) { - MSO_LineEnd eLineEnd = (MSO_LineEnd)GetPropertyValue( DFF_Prop_lineEndArrowhead, 0 ); - MSO_LineEndWidth eWidth = (MSO_LineEndWidth)GetPropertyValue( DFF_Prop_lineEndArrowWidth, mso_lineMediumWidthArrow ); - MSO_LineEndLength eLength = (MSO_LineEndLength)GetPropertyValue( DFF_Prop_lineEndArrowLength, mso_lineMediumLenArrow ); + MSO_LineEnd eLineEnd = static_cast<MSO_LineEnd>(GetPropertyValue( DFF_Prop_lineEndArrowhead, 0 )); + MSO_LineEndWidth eWidth = static_cast<MSO_LineEndWidth>(GetPropertyValue( DFF_Prop_lineEndArrowWidth, mso_lineMediumWidthArrow )); + MSO_LineEndLength eLength = static_cast<MSO_LineEndLength>(GetPropertyValue( DFF_Prop_lineEndArrowLength, mso_lineMediumLenArrow )); sal_Int32 nArrowWidth; bool bArrowCenter; @@ -1285,7 +1285,7 @@ void DffPropertyReader::ApplyFillAttributes( SvStream& rIn, SfxItemSet& rSet, co if ( nFillFlags & 0x10 ) { - MSO_FillType eMSO_FillType = (MSO_FillType)GetPropertyValue( DFF_Prop_fillType, mso_fillSolid ); + MSO_FillType eMSO_FillType = static_cast<MSO_FillType>(GetPropertyValue( DFF_Prop_fillType, mso_fillSolid )); drawing::FillStyle eXFill = drawing::FillStyle_NONE; switch( eMSO_FillType ) { @@ -1430,7 +1430,7 @@ void DffPropertyReader::ApplyCustomShapeTextAttributes( SfxItemSet& rSet ) const if ( IsProperty( DFF_Prop_txflTextFlow ) ) { - MSO_TextFlow eTextFlow = (MSO_TextFlow)( GetPropertyValue( DFF_Prop_txflTextFlow, 0 ) & 0xFFFF ); + MSO_TextFlow eTextFlow = static_cast<MSO_TextFlow>( GetPropertyValue( DFF_Prop_txflTextFlow, 0 ) & 0xFFFF ); switch( eTextFlow ) { case mso_txflTtoBA : /* #68110# */ // Top to Bottom @-font, oben -> unten @@ -1543,7 +1543,7 @@ void DffPropertyReader::ApplyCustomShapeTextAttributes( SfxItemSet& rSet ) const rSet.Put( makeSdrTextUpperDistItem( nTextTop ) ); rSet.Put( makeSdrTextLowerDistItem( nTextBottom ) ); - rSet.Put( makeSdrTextWordWrapItem( (MSO_WrapMode)GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) != mso_wrapNone ) ); + rSet.Put( makeSdrTextWordWrapItem( static_cast<MSO_WrapMode>(GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare )) != mso_wrapNone ) ); rSet.Put( makeSdrTextAutoGrowHeightItem( ( GetPropertyValue( DFF_Prop_FitTextToShape, 0 ) & 2 ) != 0 ) ); } @@ -1593,7 +1593,7 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt if ( IsProperty( DFF_Prop_txflTextFlow ) || IsProperty( DFF_Prop_cdirFont ) ) { sal_Int32 nTextRotateAngle = 0; - MSO_TextFlow eTextFlow = (MSO_TextFlow)( GetPropertyValue( DFF_Prop_txflTextFlow, 0 ) & 0xFFFF ); + MSO_TextFlow eTextFlow = static_cast<MSO_TextFlow>( GetPropertyValue( DFF_Prop_txflTextFlow, 0 ) & 0xFFFF ); if ( eTextFlow == mso_txflBtoT ) // Bottom to Top non-@ nTextRotateAngle += 90; @@ -2654,7 +2654,7 @@ void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet, DffObj nFillFlags &= ~0x10; if ( nFillFlags & 0x10 ) { - MSO_FillType eMSO_FillType = (MSO_FillType)GetPropertyValue( DFF_Prop_fillType, mso_fillSolid ); + MSO_FillType eMSO_FillType = static_cast<MSO_FillType>(GetPropertyValue( DFF_Prop_fillType, mso_fillSolid )); switch( eMSO_FillType ) { case mso_fillSolid : @@ -3771,7 +3771,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons OUString aLinkFileName, aLinkFilterName; tools::Rectangle aVisArea; - MSO_BlipFlags eFlags = (MSO_BlipFlags)GetPropertyValue( DFF_Prop_pibFlags, mso_blipflagDefault ); + MSO_BlipFlags eFlags = static_cast<MSO_BlipFlags>(GetPropertyValue( DFF_Prop_pibFlags, mso_blipflagDefault )); sal_uInt32 nBlipId = GetPropertyValue( DFF_Prop_pib, 0 ); bool bGrfRead = false, @@ -4213,7 +4213,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r rSt.ReadUInt32( aObjData.nShapeId ) .ReadUInt32( temp ); aObjData.nSpFlags = ShapeFlag(temp); - aObjData.eShapeType = (MSO_SPT)maShapeRecords.Current()->nRecInstance; + aObjData.eShapeType = static_cast<MSO_SPT>(maShapeRecords.Current()->nRecInstance); } else { @@ -4397,7 +4397,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r ReadObjText( aObjectText, pRet ); } - eGeoTextAlign = ( (MSO_GeoTextAlign)GetPropertyValue( DFF_Prop_gtextAlign, mso_alignTextCenter ) ); + eGeoTextAlign = static_cast<MSO_GeoTextAlign>(GetPropertyValue( DFF_Prop_gtextAlign, mso_alignTextCenter )); { SdrTextHorzAdjust eHorzAdjust; switch( eGeoTextAlign ) @@ -4743,7 +4743,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r pRet->SetMergedItemSet(aSet); // connectors - MSO_ConnectorStyle eConnectorStyle = (MSO_ConnectorStyle)GetPropertyValue( DFF_Prop_cxstyle, mso_cxstyleStraight ); + MSO_ConnectorStyle eConnectorStyle = static_cast<MSO_ConnectorStyle>(GetPropertyValue( DFF_Prop_cxstyle, mso_cxstyleStraight )); static_cast<SdrEdgeObj*>(pRet)->ConnectToNode(true, nullptr); static_cast<SdrEdgeObj*>(pRet)->ConnectToNode(false, nullptr); @@ -5052,9 +5052,9 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, pImpRec->nShapeId = rObjData.nShapeId; pImpRec->eShapeType = rObjData.eShapeType; - MSO_WrapMode eWrapMode( (MSO_WrapMode)GetPropertyValue( + MSO_WrapMode eWrapMode( static_cast<MSO_WrapMode>(GetPropertyValue( DFF_Prop_WrapText, - mso_wrapSquare ) ); + mso_wrapSquare )) ); rObjData.bClientAnchor = maShapeRecords.SeekToContent( rSt, DFF_msofbtClientAnchor, SEEK_FROM_CURRENT_AND_RESTART ); @@ -5167,7 +5167,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, bool bVerticalText = false; if ( IsProperty( DFF_Prop_txflTextFlow ) ) { - MSO_TextFlow eTextFlow = (MSO_TextFlow)(GetPropertyValue( + MSO_TextFlow eTextFlow = static_cast<MSO_TextFlow>(GetPropertyValue( DFF_Prop_txflTextFlow, 0) & 0xFFFF); switch( eTextFlow ) { @@ -5277,8 +5277,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, aSet.Put( makeSdrTextAutoGrowWidthItem( false ) ); } - switch ( (MSO_WrapMode) - GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) ) + switch ( static_cast<MSO_WrapMode>(GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare )) ) { case mso_wrapNone : aSet.Put( makeSdrTextAutoGrowWidthItem( true ) ); @@ -5308,7 +5307,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, if ( IsProperty( DFF_Prop_anchorText ) ) { MSO_Anchor eTextAnchor = - (MSO_Anchor)GetPropertyValue( DFF_Prop_anchorText, 0 ); + static_cast<MSO_Anchor>(GetPropertyValue( DFF_Prop_anchorText, 0 )); SdrTextVertAdjust eTVA = SDRTEXTVERTADJUST_CENTER; bool bTVASet(false); @@ -5499,14 +5498,14 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, sal_uInt32 nLineFlags = GetPropertyValue( DFF_Prop_fNoLineDrawDash, 0 ); pImpRec->eLineStyle = (nLineFlags & 8) - ? (MSO_LineStyle)GetPropertyValue( + ? static_cast<MSO_LineStyle>(GetPropertyValue( DFF_Prop_lineStyle, - mso_lineSimple ) + mso_lineSimple )) : MSO_LineStyle_NONE; pTextImpRec->eLineStyle = pImpRec->eLineStyle; - pImpRec->eLineDashing = (MSO_LineDashing)GetPropertyValue( - DFF_Prop_lineDashing, mso_lineSolid ); + pImpRec->eLineDashing = static_cast<MSO_LineDashing>(GetPropertyValue( + DFF_Prop_lineDashing, mso_lineSolid )); pTextImpRec->eLineDashing = pImpRec->eLineDashing; if( pImpRec->nShapeId ) @@ -6101,7 +6100,7 @@ bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt, if( ( DFF_msofbtSp == nFbt ) && ( 4 <= nLength ) ) { // we've found the FSP: note Shape Type and Id! - eShapeType = (MSO_SPT)nInst; + eShapeType = static_cast<MSO_SPT>(nInst); rSt.ReadUInt32( aInfo.nShapeId ); rSt.SeekRel( nLength - 4 ); nReadSpCont += nLength; diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 8900fd5a60fb..b560fa6f7f71 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -291,7 +291,7 @@ SvStream& ReadPptDocumentAtom(SvStream& rIn, PptDocumentAtom& rAtom) // clamp dodgy data to avoid overflow in later calculations rAtom.aNotesPageSize.Width() = std::min<sal_Int32>(nNoticeX, 65536); rAtom.aNotesPageSize.Height() = std::min<sal_Int32>(nNoticeY, 65536); - rAtom.eSlidesPageFormat = (PptPageFormat)nSlidePageFormat; + rAtom.eSlidesPageFormat = static_cast<PptPageFormat>(nSlidePageFormat); rAtom.bEmbeddedTrueType = nEmbeddedTrueType; rAtom.bTitlePlaceholdersOmitted = nTitlePlaceHoldersOmitted; rAtom.bRightToLeft = nRightToLeft; @@ -810,7 +810,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi sal_Int32 nTextRotationAngle = 0; if ( IsProperty( DFF_Prop_txflTextFlow ) ) { - MSO_TextFlow eTextFlow = (MSO_TextFlow)( GetPropertyValue( DFF_Prop_txflTextFlow, 0 ) & 0xFFFF ); + MSO_TextFlow eTextFlow = static_cast<MSO_TextFlow>( GetPropertyValue( DFF_Prop_txflTextFlow, 0 ) & 0xFFFF ); switch( eTextFlow ) { case mso_txflBtoT : // Bottom to Top non-@, unten -> oben @@ -871,7 +871,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi eTHA = SDRTEXTHORZADJUST_CENTER; // read text anchor - MSO_Anchor eTextAnchor = (MSO_Anchor)GetPropertyValue( DFF_Prop_anchorText, mso_anchorTop ); + MSO_Anchor eTextAnchor = static_cast<MSO_Anchor>(GetPropertyValue( DFF_Prop_anchorText, mso_anchorTop )); switch( eTextAnchor ) { @@ -926,7 +926,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi eTHA = SDRTEXTHORZADJUST_BLOCK; // read text anchor - MSO_Anchor eTextAnchor = (MSO_Anchor)GetPropertyValue( DFF_Prop_anchorText, mso_anchorTop ); + MSO_Anchor eTextAnchor = static_cast<MSO_Anchor>(GetPropertyValue( DFF_Prop_anchorText, mso_anchorTop )); switch( eTextAnchor ) { @@ -998,8 +998,8 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi rPersistEntry.pPresentationObjects.reset( new sal_uInt32[ PPT_STYLESHEETENTRYS ] ); memset( rPersistEntry.pPresentationObjects.get(), 0, PPT_STYLESHEETENTRYS * 4 ); } - if ( !rPersistEntry.pPresentationObjects[ (int)nDestinationInstance ] ) - rPersistEntry.pPresentationObjects[ (int)nDestinationInstance ] = rObjData.rSpHd.GetRecBegFilePos(); + if ( !rPersistEntry.pPresentationObjects[ static_cast<int>(nDestinationInstance) ] ) + rPersistEntry.pPresentationObjects[ static_cast<int>(nDestinationInstance) ] = rObjData.rSpHd.GetRecBegFilePos(); } switch ( nDestinationInstance ) { @@ -1041,7 +1041,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi } } SdrObject* pTObj = nullptr; - bool bWordWrap = (MSO_WrapMode)GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) != mso_wrapNone; + bool bWordWrap = static_cast<MSO_WrapMode>(GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare )) != mso_wrapNone; bool bFitShapeToText = ( GetPropertyValue( DFF_Prop_FitTextToShape, 0 ) & 2 ) != 0; if ( dynamic_cast<const SdrObjCustomShape* >(pRet) != nullptr && ( eTextKind == OBJ_RECT ) ) @@ -1286,7 +1286,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi } if ( GetPropertyValue( DFF_Prop_fNoFillHitTest, 0 ) & 0x10 ) { - if ( (MSO_FillType)GetPropertyValue( DFF_Prop_fillType, mso_fillSolid ) == mso_fillBackground ) + if ( static_cast<MSO_FillType>(GetPropertyValue( DFF_Prop_fillType, mso_fillSolid )) == mso_fillBackground ) { rData.aBackgroundColoredObjects.push_back( pRet ); } @@ -2609,16 +2609,16 @@ bool SdrPowerPointImport::SeekToShape( SvStream& rSt, void* pClientData, sal_uIn switch ( aTextObj.GetInstance() ) { case TSS_Type::Title : - nShapePos = rPersist.pPresentationObjects[ (int)TSS_Type::PageTitle ]; + nShapePos = rPersist.pPresentationObjects[ int(TSS_Type::PageTitle) ]; break; case TSS_Type::PageTitle : - nShapePos = rPersist.pPresentationObjects[ (int)TSS_Type::PageTitle ]; + nShapePos = rPersist.pPresentationObjects[ int(TSS_Type::PageTitle) ]; break; case TSS_Type::Subtitle : case TSS_Type::HalfBody : case TSS_Type::QuarterBody : case TSS_Type::Body : - nShapePos = rPersist.pPresentationObjects[ (int)TSS_Type::Body ]; + nShapePos = rPersist.pPresentationObjects[ int(TSS_Type::Body) ]; break; default: break; } @@ -3327,7 +3327,7 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const while ( ( rSt.GetError() == ERRCODE_NONE ) && ( rSt.Tell() < nHdEndRecPos ) && ( i < nDepth ) ) { bStyles = true; - ReadPPTExtParaLevel( rSt, aExtParaSheet[ (TSS_Type)aHd.nRecInstance ].aExtParaLevel[ i++ ] ); + ReadPPTExtParaLevel( rSt, aExtParaSheet[ static_cast<TSS_Type>(aHd.nRecInstance) ].aExtParaLevel[ i++ ] ); } #ifdef DBG_UTIL if ( rSt.Tell() != aHd.GetRecEndFilePos() ) @@ -4157,7 +4157,7 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd } while ( ( aTxMasterStyleHd.nRecType == PPT_PST_TxMasterStyleAtom ) && ( rIn.Tell() < nEndRecPos ) ) //TODO: aTxMasterStyleHd may be used without having been properly initialized { - TSS_Type nInstance = (TSS_Type)aTxMasterStyleHd.nRecInstance; + TSS_Type nInstance = static_cast<TSS_Type>(aTxMasterStyleHd.nRecInstance); if ( ( nInstance <= TSS_Type::LAST ) && ( ( nInstance != TSS_Type::TextInShape ) || !bFoundTxMasterStyleAtom04 ) ) { @@ -5648,7 +5648,7 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, T Color aDefColor( COL_BLACK ); MSO_FillType eFillType = mso_fillSolid; if ( rManager.GetPropertyValue( DFF_Prop_fNoFillHitTest, 0 ) & 0x10 ) - eFillType = (MSO_FillType)rManager.GetPropertyValue( DFF_Prop_fillType, mso_fillSolid ); + eFillType = static_cast<MSO_FillType>(rManager.GetPropertyValue( DFF_Prop_fillType, mso_fillSolid )); else eFillType = mso_fillBackground; switch( eFillType ) @@ -6662,7 +6662,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport rIn.ReadUInt16( nTmp ); // this number tells us the TxMasterStyleAtom Instance if ( nTmp > 8 ) nTmp = 4; - TSS_Type nInstance = (TSS_Type)nTmp; + TSS_Type nInstance = static_cast<TSS_Type>(nTmp); aTextHd.SeekToEndOfRecord( rIn ); mxImplTextObj->mnInstance = nInstance; @@ -7719,7 +7719,7 @@ bool SdrPowerPointImport::IsVerticalText() const bool bVerticalText = false; if ( IsProperty( DFF_Prop_txflTextFlow ) ) { - MSO_TextFlow eTextFlow = (MSO_TextFlow)( GetPropertyValue( DFF_Prop_txflTextFlow, 0 ) & 0xFFFF ); + MSO_TextFlow eTextFlow = static_cast<MSO_TextFlow>( GetPropertyValue( DFF_Prop_txflTextFlow, 0 ) & 0xFFFF ); switch( eTextFlow ) { case mso_txflTtoBA : // Top to Bottom @-font, above -> below @@ -7750,7 +7750,7 @@ void SdrPowerPointImport::ApplyTextAnchorAttributes( PPTTextObj const & rText eTHA = SDRTEXTHORZADJUST_CENTER; // read text anchor - MSO_Anchor eTextAnchor = (MSO_Anchor)GetPropertyValue( DFF_Prop_anchorText, mso_anchorTop ); + MSO_Anchor eTextAnchor = static_cast<MSO_Anchor>(GetPropertyValue( DFF_Prop_anchorText, mso_anchorTop )); switch( eTextAnchor ) { @@ -7802,7 +7802,7 @@ void SdrPowerPointImport::ApplyTextAnchorAttributes( PPTTextObj const & rText eTHA = SDRTEXTHORZADJUST_BLOCK; // read text anchor - MSO_Anchor eTextAnchor = (MSO_Anchor)GetPropertyValue( DFF_Prop_anchorText, mso_anchorTop ); + MSO_Anchor eTextAnchor = static_cast<MSO_Anchor>(GetPropertyValue( DFF_Prop_anchorText, mso_anchorTop )); switch( eTextAnchor ) { |