diff options
Diffstat (limited to 'filter/source/flash/swfwriter1.cxx')
-rw-r--r-- | filter/source/flash/swfwriter1.cxx | 127 |
1 files changed, 64 insertions, 63 deletions
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index 06dcb7323516..2dcaf36c682e 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -1178,7 +1178,7 @@ bool Writer::Impl_writeStroke( SvtGraphicStroke& rStroke ) // as log as not LINESTYLE2 and DefineShape4 is used (which // added support for LineJoin), only round LineJoins are - // supported. Fallback to META_POLYLINE_ACTION and META_LINE_ACTION + // supported. Fallback to MetaActionType::POLYLINE and MetaActionType::LINE if(SvtGraphicStroke::joinRound != rStroke.getJoinType()) return false; @@ -1381,12 +1381,12 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) int bMap = 0; for( size_t i = 0, nCount = rMtf.GetActionSize(); i < nCount; i++ ) { - const MetaAction* pAction = rMtf.GetAction( i ); - const sal_uInt16 nType = pAction->GetType(); + const MetaAction* pAction = rMtf.GetAction( i ); + const MetaActionType nType = pAction->GetType(); switch( nType ) { - case( META_PIXEL_ACTION ): + case( MetaActionType::PIXEL ): { const MetaPixelAction* pA = static_cast<const MetaPixelAction*>(pAction); @@ -1394,7 +1394,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_POINT_ACTION ): + case( MetaActionType::POINT ): { const MetaPointAction* pA = static_cast<const MetaPointAction*>(pAction); @@ -1402,7 +1402,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_LINE_ACTION ): + case( MetaActionType::LINE ): { const MetaLineAction* pA = static_cast<const MetaLineAction*>(pAction); @@ -1421,13 +1421,13 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_RECT_ACTION ): + case( MetaActionType::RECT ): { Impl_writeRect( static_cast<const MetaRectAction*>(pAction)->GetRect(), 0, 0 ); } break; - case( META_ROUNDRECT_ACTION ): + case( MetaActionType::ROUNDRECT ): { const MetaRoundRectAction* pA = static_cast<const MetaRoundRectAction*>(pAction); @@ -1435,7 +1435,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_ELLIPSE_ACTION ): + case( MetaActionType::ELLIPSE ): { const MetaEllipseAction* pA = static_cast<const MetaEllipseAction*>(pAction); const Rectangle& rRect = pA->GetRect(); @@ -1444,39 +1444,40 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_ARC_ACTION ): - case( META_PIE_ACTION ): - case( META_CHORD_ACTION ): - case( META_POLYGON_ACTION ): + case( MetaActionType::ARC ): + case( MetaActionType::PIE ): + case( MetaActionType::CHORD ): + case( MetaActionType::POLYGON ): { Polygon aPoly; switch( nType ) { - case( META_ARC_ACTION ): + case( MetaActionType::ARC ): { const MetaArcAction* pA = static_cast<const MetaArcAction*>(pAction); aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC ); } break; - case( META_PIE_ACTION ): + case( MetaActionType::PIE ): { const MetaPieAction* pA = static_cast<const MetaPieAction*>(pAction); aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_PIE ); } break; - case( META_CHORD_ACTION ): + case( MetaActionType::CHORD ): { const MetaChordAction* pA = static_cast<const MetaChordAction*>(pAction); aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD ); } break; - case( META_POLYGON_ACTION ): + case( MetaActionType::POLYGON ): aPoly = static_cast<const MetaPolygonAction*>(pAction)->GetPolygon(); break; + default: break; } if( aPoly.GetSize() ) @@ -1486,7 +1487,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_POLYLINE_ACTION ): + case( MetaActionType::POLYLINE ): { const MetaPolyLineAction* pA = static_cast<const MetaPolyLineAction*>(pAction); const Polygon& rPoly = pA->GetPolygon(); @@ -1506,7 +1507,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_POLYPOLYGON_ACTION ): + case( MetaActionType::POLYPOLYGON ): { const MetaPolyPolygonAction* pA = static_cast<const MetaPolyPolygonAction*>(pAction); const tools::PolyPolygon& rPolyPoly = pA->GetPolyPolygon(); @@ -1516,7 +1517,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_GRADIENT_ACTION ): + case( MetaActionType::GRADIENT ): { const MetaGradientAction* pA = static_cast<const MetaGradientAction*>(pAction); @@ -1525,14 +1526,14 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_GRADIENTEX_ACTION ): + case( MetaActionType::GRADIENTEX ): { const MetaGradientExAction* pA = static_cast<const MetaGradientExAction*>(pAction); Impl_writeGradientEx( pA->GetPolyPolygon(), pA->GetGradient() ); } break; - case META_HATCH_ACTION: + case MetaActionType::HATCH: { const MetaHatchAction* pA = static_cast<const MetaHatchAction*>(pAction); GDIMetaFile aTmpMtf; @@ -1542,7 +1543,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_TRANSPARENT_ACTION ): + case( MetaActionType::TRANSPARENT ): { const MetaTransparentAction* pA = static_cast<const MetaTransparentAction*>(pAction); const tools::PolyPolygon& rPolyPoly = pA->GetPolyPolygon(); @@ -1556,7 +1557,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_FLOATTRANSPARENT_ACTION ): + case( MetaActionType::FLOATTRANSPARENT ): { const MetaFloatTransparentAction* pA = static_cast<const MetaFloatTransparentAction*>(pAction); GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() ); @@ -1594,7 +1595,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_EPS_ACTION ): + case( MetaActionType::EPS ): { const MetaEPSAction* pA = static_cast<const MetaEPSAction*>(pAction); const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() ); @@ -1604,7 +1605,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) { const MetaAction* pSubstAct = aGDIMetaFile.GetAction( j ); - if( pSubstAct->GetType() == META_BMPSCALE_ACTION ) + if( pSubstAct->GetType() == MetaActionType::BMPSCALE ) { bFound = true; const MetaBmpScaleAction* pBmpScaleAction = static_cast<const MetaBmpScaleAction*>(pSubstAct); @@ -1616,7 +1617,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_COMMENT_ACTION ): + case( MetaActionType::COMMENT ): { const MetaCommentAction* pA = static_cast<const MetaCommentAction*>(pAction); const sal_uInt8* pData = pA->GetData(); @@ -1630,9 +1631,9 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) { pAction = rMtf.GetAction( i ); - if( pAction->GetType() == META_GRADIENTEX_ACTION ) + if( pAction->GetType() == MetaActionType::GRADIENTEX ) pGradAction = static_cast<const MetaGradientExAction*>(pAction); - else if( ( pAction->GetType() == META_COMMENT_ACTION ) && + else if( ( pAction->GetType() == MetaActionType::COMMENT ) && ( static_cast<const MetaCommentAction*>(pAction)->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_END") ) ) { bDone = true; @@ -1664,7 +1665,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) { pAction = rMtf.GetAction( i ); - if( ( pAction->GetType() == META_COMMENT_ACTION ) && + if( ( pAction->GetType() == MetaActionType::COMMENT ) && ( static_cast<const MetaCommentAction*>(pAction)->GetComment().equalsIgnoreAsciiCase("XPATHFILL_SEQ_END") ) ) { bDone = true; @@ -1694,7 +1695,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) { pAction = rMtf.GetAction( i ); - if( ( pAction->GetType() == META_COMMENT_ACTION ) && + if( ( pAction->GetType() == MetaActionType::COMMENT ) && ( static_cast<const MetaCommentAction*>(pAction)->GetComment().equalsIgnoreAsciiCase("XPATHSTROKE_SEQ_END") ) ) { bDone = true; @@ -1705,7 +1706,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_BMPSCALE_ACTION ): + case( MetaActionType::BMPSCALE ): { const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction); @@ -1715,7 +1716,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_BMP_ACTION ): + case( MetaActionType::BMP ): { const MetaBmpAction* pA = static_cast<const MetaBmpAction*>(pAction); Impl_writeImage( pA->GetBitmap(), @@ -1724,7 +1725,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_BMPSCALEPART_ACTION ): + case( MetaActionType::BMPSCALEPART ): { const MetaBmpScalePartAction* pA = static_cast<const MetaBmpScalePartAction*>(pAction); Impl_writeImage( pA->GetBitmap(), @@ -1733,7 +1734,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_BMPEX_ACTION ): + case( MetaActionType::BMPEX ): { const MetaBmpExAction* pA = static_cast<const MetaBmpExAction*>(pAction); Impl_writeImage( pA->GetBitmapEx(), @@ -1742,7 +1743,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_BMPEXSCALE_ACTION ): + case( MetaActionType::BMPEXSCALE ): { const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction); Impl_writeImage( pA->GetBitmapEx(), @@ -1751,7 +1752,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_BMPEXSCALEPART_ACTION ): + case( MetaActionType::BMPEXSCALEPART ): { const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pAction); Impl_writeImage( pA->GetBitmapEx(), @@ -1760,75 +1761,75 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) } break; - case( META_TEXT_ACTION ): + case( MetaActionType::TEXT ): { const MetaTextAction* pA = static_cast<const MetaTextAction*>(pAction); Impl_writeText( pA->GetPoint(), pA->GetText().copy( pA->GetIndex(), pA->GetLen() ), NULL, 0); } break; - case( META_TEXTRECT_ACTION ): + case( MetaActionType::TEXTRECT ): { const MetaTextRectAction* pA = static_cast<const MetaTextRectAction*>(pAction); Impl_writeText( pA->GetRect().TopLeft(), pA->GetText(), NULL, 0 ); } break; - case( META_TEXTARRAY_ACTION ): + case( MetaActionType::TEXTARRAY ): { const MetaTextArrayAction* pA = static_cast<const MetaTextArrayAction*>(pAction); Impl_writeText( pA->GetPoint(), pA->GetText().copy( pA->GetIndex(), pA->GetLen() ), pA->GetDXArray(), 0 ); } break; - case( META_STRETCHTEXT_ACTION ): + case( MetaActionType::STRETCHTEXT ): { const MetaStretchTextAction* pA = static_cast<const MetaStretchTextAction*>(pAction); Impl_writeText( pA->GetPoint(), pA->GetText().copy( pA->GetIndex(), pA->GetLen() ), NULL, pA->GetWidth() ); } break; - case( META_ISECTRECTCLIPREGION_ACTION ): + case( MetaActionType::ISECTRECTCLIPREGION ): { const MetaISectRectClipRegionAction* pA = static_cast<const MetaISectRectClipRegionAction*>(pAction); clipRect = pA->GetRect(); } // fall-through - case( META_CLIPREGION_ACTION ): - case( META_ISECTREGIONCLIPREGION_ACTION ): - case( META_MOVECLIPREGION_ACTION ): + case( MetaActionType::CLIPREGION ): + case( MetaActionType::ISECTREGIONCLIPREGION ): + case( MetaActionType::MOVECLIPREGION ): { const_cast<MetaAction*>(pAction)->Execute( mpVDev ); } break; - case( META_MAPMODE_ACTION ): + case( MetaActionType::MAPMODE ): { bMap++; } // fall-through - case( META_REFPOINT_ACTION ): - case( META_LINECOLOR_ACTION ): - case( META_FILLCOLOR_ACTION ): - case( META_TEXTLINECOLOR_ACTION ): - case( META_TEXTFILLCOLOR_ACTION ): - case( META_TEXTCOLOR_ACTION ): - case( META_TEXTALIGN_ACTION ): - case( META_FONT_ACTION ): - case( META_PUSH_ACTION ): - case( META_POP_ACTION ): - case( META_LAYOUTMODE_ACTION ): + case( MetaActionType::REFPOINT ): + case( MetaActionType::LINECOLOR ): + case( MetaActionType::FILLCOLOR ): + case( MetaActionType::TEXTLINECOLOR ): + case( MetaActionType::TEXTFILLCOLOR ): + case( MetaActionType::TEXTCOLOR ): + case( MetaActionType::TEXTALIGN ): + case( MetaActionType::FONT ): + case( MetaActionType::PUSH ): + case( MetaActionType::POP ): + case( MetaActionType::LAYOUTMODE ): { const_cast<MetaAction*>(pAction)->Execute( mpVDev ); } break; - case( META_RASTEROP_ACTION ): - case( META_MASK_ACTION ): - case( META_MASKSCALE_ACTION ): - case( META_MASKSCALEPART_ACTION ): - case( META_WALLPAPER_ACTION ): - case( META_TEXTLINE_ACTION ): + case( MetaActionType::RASTEROP ): + case( MetaActionType::MASK ): + case( MetaActionType::MASKSCALE ): + case( MetaActionType::MASKSCALEPART ): + case( MetaActionType::WALLPAPER ): + case( MetaActionType::TEXTLINE ): { // !!! >>> we don't want to support these actions } |