summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-15 10:03:53 +0200
committerNoel Grandin <noel@peralex.com>2015-05-15 10:05:03 +0200
commitad0c5e6c663642c1e4b212e4e6a38ebfe8c3e0a7 (patch)
tree6176009e3c65a6a1ce392ca4c4a9eccea3c3517c /vcl
parentd93915b2aeabbde90b7eb539116b9be49e0d1a5c (diff)
convert META_*_ACTION constants to scoped enum
Change-Id: I8ecfbfecd765a35fafcbcc5452b0d04a89be2459
Diffstat (limited to 'vcl')
-rw-r--r--vcl/README.GDIMetaFile2
-rw-r--r--vcl/qa/cppunit/wmf/wmfimporttest.cxx8
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx119
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx107
-rw-r--r--vcl/source/gdi/cvtsvm.cxx90
-rw-r--r--vcl/source/gdi/gdimetafiletools.cxx122
-rw-r--r--vcl/source/gdi/gdimtf.cxx327
-rw-r--r--vcl/source/gdi/impgraph.cxx2
-rw-r--r--vcl/source/gdi/metaact.cxx450
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx118
-rw-r--r--vcl/source/gdi/print2.cxx186
-rw-r--r--vcl/source/outdev/bitmap.cxx30
-rw-r--r--vcl/source/outdev/mask.cxx14
-rw-r--r--vcl/source/outdev/text.cxx2
-rw-r--r--vcl/source/outdev/transparent.cxx2
15 files changed, 794 insertions, 785 deletions
diff --git a/vcl/README.GDIMetaFile b/vcl/README.GDIMetaFile
index f594885fbdf6..bd263395aed2 100644
--- a/vcl/README.GDIMetaFile
+++ b/vcl/README.GDIMetaFile
@@ -131,7 +131,7 @@ acts as a prototype for other actions.
CONSTRUCTORS AND DESTRUCTORS
- MetaAction() - default constructor, sets mnRefCount to 1 and
- mnType, in this case META_NULL_ACTION
+ mnType, in this case MetaActionType::NONE
- MetaAction(sal_uInt16 nType) - virtual constructor, sets mnType to nType, and
mnRefCount to 1
- ~MetaAction
diff --git a/vcl/qa/cppunit/wmf/wmfimporttest.cxx b/vcl/qa/cppunit/wmf/wmfimporttest.cxx
index 6b1cec40060a..3cee5fe9bb18 100644
--- a/vcl/qa/cppunit/wmf/wmfimporttest.cxx
+++ b/vcl/qa/cppunit/wmf/wmfimporttest.cxx
@@ -62,7 +62,7 @@ void WmfTest::testNonPlaceableWmf()
MetafileXmlDump dumper;
dumper.filterAllActionTypes();
- dumper.filterActionType(META_POLYLINE_ACTION, false);
+ dumper.filterActionType(MetaActionType::POLYLINE, false);
xmlDocPtr pDoc = dumper.dumpAndParse(aGDIMetaFile);
CPPUNIT_ASSERT (pDoc);
@@ -91,7 +91,7 @@ void WmfTest::testSine()
MetafileXmlDump dumper;
dumper.filterAllActionTypes();
- dumper.filterActionType(META_ISECTRECTCLIPREGION_ACTION, false);
+ dumper.filterActionType(MetaActionType::ISECTRECTCLIPREGION, false);
xmlDocPtr pDoc = dumper.dumpAndParse(aGDIMetaFile);
CPPUNIT_ASSERT (pDoc);
@@ -107,7 +107,7 @@ void WmfTest::testEmfProblem()
MetafileXmlDump dumper;
dumper.filterAllActionTypes();
- dumper.filterActionType(META_ISECTRECTCLIPREGION_ACTION, false);
+ dumper.filterActionType(MetaActionType::ISECTRECTCLIPREGION, false);
xmlDocPtr pDoc = dumper.dumpAndParse(aGDIMetaFile);
CPPUNIT_ASSERT (pDoc);
@@ -126,7 +126,7 @@ void WmfTest::testWorldTransformFontSize()
MetafileXmlDump dumper;
dumper.filterAllActionTypes();
- dumper.filterActionType(META_FONT_ACTION, false);
+ dumper.filterActionType(MetaActionType::FONT, false);
xmlDocPtr pDoc = dumper.dumpAndParse(aGDIMetaFile);
CPPUNIT_ASSERT (pDoc);
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index 3d50e2667bd9..c4ab01fb9229 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -997,12 +997,12 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
for( size_t j = 0, nActionCount = rMtf.GetActionSize(); j < nActionCount; j++ )
{
- const MetaAction* pAction = rMtf.GetAction( j );
- const sal_uInt16 nType = pAction->GetType();
+ const MetaAction* pAction = rMtf.GetAction( j );
+ const MetaActionType nType = pAction->GetType();
switch( nType )
{
- case( META_PIXEL_ACTION ):
+ case( MetaActionType::PIXEL ):
{
const MetaPixelAction* pA = static_cast<const MetaPixelAction*>(pAction);
@@ -1014,7 +1014,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case( META_POINT_ACTION ):
+ case( MetaActionType::POINT ):
{
if( maVDev->IsLineColor() )
{
@@ -1029,7 +1029,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case( META_LINE_ACTION ):
+ case( MetaActionType::LINE ):
{
if( maVDev->IsLineColor() )
{
@@ -1064,7 +1064,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case( META_RECT_ACTION ):
+ case( MetaActionType::RECT ):
{
if( maVDev->IsLineColor() || maVDev->IsFillColor() )
{
@@ -1080,7 +1080,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case( META_ROUNDRECT_ACTION ):
+ case( MetaActionType::ROUNDRECT ):
{
if( maVDev->IsLineColor() || maVDev->IsFillColor() )
{
@@ -1097,7 +1097,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case( META_ELLIPSE_ACTION ):
+ case( MetaActionType::ELLIPSE ):
{
if( maVDev->IsLineColor() || maVDev->IsFillColor() )
{
@@ -1113,10 +1113,10 @@ void EMFWriter::ImplWrite( 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 ):
{
if( maVDev->IsLineColor() || maVDev->IsFillColor() )
{
@@ -1124,38 +1124,39 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
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;
}
- ImplWritePolygonRecord( aPoly, nType != META_ARC_ACTION );
+ ImplWritePolygonRecord( aPoly, nType != MetaActionType::ARC );
}
}
break;
- case( META_POLYLINE_ACTION ):
+ case( MetaActionType::POLYLINE ):
{
if( maVDev->IsLineColor() )
{
@@ -1178,14 +1179,14 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case( META_POLYPOLYGON_ACTION ):
+ case( MetaActionType::POLYPOLYGON ):
{
if( maVDev->IsLineColor() || maVDev->IsFillColor() )
ImplWritePolyPolygonRecord( static_cast<const MetaPolyPolygonAction*>(pAction)->GetPolyPolygon() );
}
break;
- case( META_GRADIENT_ACTION ):
+ case( MetaActionType::GRADIENT ):
{
const MetaGradientAction* pA = static_cast<const MetaGradientAction*>(pAction);
GDIMetaFile aTmpMtf;
@@ -1195,7 +1196,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case META_HATCH_ACTION:
+ case MetaActionType::HATCH:
{
const MetaHatchAction* pA = static_cast<const MetaHatchAction*>(pAction);
GDIMetaFile aTmpMtf;
@@ -1205,7 +1206,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case META_TRANSPARENT_ACTION:
+ case MetaActionType::TRANSPARENT:
{
const tools::PolyPolygon& rPolyPoly = static_cast<const MetaTransparentAction*>(pAction)->GetPolyPolygon();
if( rPolyPoly.Count() )
@@ -1220,7 +1221,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case META_FLOATTRANSPARENT_ACTION:
+ case MetaActionType::FLOATTRANSPARENT:
{
const MetaFloatTransparentAction* pA = static_cast<const MetaFloatTransparentAction*>(pAction);
@@ -1251,7 +1252,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case( META_EPS_ACTION ):
+ case( MetaActionType::EPS ):
{
const MetaEPSAction* pA = static_cast<const MetaEPSAction*>(pAction);
const GDIMetaFile aSubstitute( pA->GetSubstitute() );
@@ -1259,7 +1260,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
for( size_t i = 0, nCount = aSubstitute.GetActionSize(); i < nCount; i++ )
{
const MetaAction* pSubstAct = aSubstitute.GetAction( i );
- if( pSubstAct->GetType() == META_BMPSCALE_ACTION )
+ if( pSubstAct->GetType() == MetaActionType::BMPSCALE )
{
maVDev->Push( PushFlags::ALL );
ImplBeginRecord( WIN_EMR_SAVEDC );
@@ -1283,21 +1284,21 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case META_BMP_ACTION:
+ case MetaActionType::BMP:
{
const MetaBmpAction* pA = static_cast<const MetaBmpAction *>(pAction);
ImplWriteBmpRecord( pA->GetBitmap(), pA->GetPoint(), maVDev->PixelToLogic( pA->GetBitmap().GetSizePixel() ), WIN_SRCCOPY );
}
break;
- case META_BMPSCALE_ACTION:
+ case MetaActionType::BMPSCALE:
{
const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction);
ImplWriteBmpRecord( pA->GetBitmap(), pA->GetPoint(), pA->GetSize(), WIN_SRCCOPY );
}
break;
- case META_BMPSCALEPART_ACTION:
+ case MetaActionType::BMPSCALEPART:
{
const MetaBmpScalePartAction* pA = static_cast<const MetaBmpScalePartAction*>(pAction);
Bitmap aTmp( pA->GetBitmap() );
@@ -1307,7 +1308,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case META_BMPEX_ACTION:
+ case MetaActionType::BMPEX:
{
const MetaBmpExAction* pA = static_cast<const MetaBmpExAction *>(pAction);
Bitmap aBmp( pA->GetBitmapEx().GetBitmap() );
@@ -1325,7 +1326,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case META_BMPEXSCALE_ACTION:
+ case MetaActionType::BMPEXSCALE:
{
const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction);
Bitmap aBmp( pA->GetBitmapEx().GetBitmap() );
@@ -1343,7 +1344,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case META_BMPEXSCALEPART_ACTION:
+ case MetaActionType::BMPEXSCALEPART:
{
const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pAction);
BitmapEx aBmpEx( pA->GetBitmapEx() );
@@ -1363,7 +1364,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case META_TEXT_ACTION:
+ case MetaActionType::TEXT:
{
const MetaTextAction* pA = static_cast<const MetaTextAction*>(pAction);
const OUString aText = pA->GetText().copy( pA->GetIndex(), std::min(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) );
@@ -1373,7 +1374,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case META_TEXTRECT_ACTION:
+ case MetaActionType::TEXTRECT:
{
const MetaTextRectAction* pA = static_cast<const MetaTextRectAction*>(pAction);
const OUString aText( pA->GetText() );
@@ -1383,7 +1384,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case META_TEXTARRAY_ACTION:
+ case MetaActionType::TEXTARRAY:
{
const MetaTextArrayAction* pA = static_cast<const MetaTextArrayAction*>(pAction);
const OUString aText = pA->GetText().copy( pA->GetIndex(), std::min(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) );
@@ -1393,7 +1394,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case META_STRETCHTEXT_ACTION:
+ case MetaActionType::STRETCHTEXT:
{
const MetaStretchTextAction* pA = static_cast<const MetaStretchTextAction*>(pAction);
const OUString aText = pA->GetText().copy( pA->GetIndex(), std::min(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) );
@@ -1403,32 +1404,32 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case( META_LINECOLOR_ACTION ):
+ case( MetaActionType::LINECOLOR ):
{
const_cast<MetaAction*>(pAction)->Execute( maVDev );
mbLineChanged = true;
}
break;
- case( META_FILLCOLOR_ACTION ):
+ case( MetaActionType::FILLCOLOR ):
{
const_cast<MetaAction*>(pAction)->Execute( maVDev );
mbFillChanged = true;
}
break;
- case( META_TEXTCOLOR_ACTION ):
- case( META_TEXTLINECOLOR_ACTION ):
- case( META_TEXTFILLCOLOR_ACTION ):
- case( META_TEXTALIGN_ACTION ):
- case( META_FONT_ACTION ):
+ case( MetaActionType::TEXTCOLOR ):
+ case( MetaActionType::TEXTLINECOLOR ):
+ case( MetaActionType::TEXTFILLCOLOR ):
+ case( MetaActionType::TEXTALIGN ):
+ case( MetaActionType::FONT ):
{
const_cast<MetaAction*>(pAction)->Execute( maVDev );
mbTextChanged = true;
}
break;
- case( META_ISECTRECTCLIPREGION_ACTION ):
+ case( MetaActionType::ISECTRECTCLIPREGION ):
{
const_cast<MetaAction*>(pAction)->Execute( maVDev );
@@ -1438,20 +1439,20 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- 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( maVDev );
}
break;
- case( META_REFPOINT_ACTION ):
- case( META_MAPMODE_ACTION ):
+ case( MetaActionType::REFPOINT ):
+ case( MetaActionType::MAPMODE ):
const_cast<MetaAction*>(pAction)->Execute( maVDev );
break;
- case( META_PUSH_ACTION ):
+ case( MetaActionType::PUSH ):
{
const_cast<MetaAction*>(pAction)->Execute( maVDev );
@@ -1460,7 +1461,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case( META_POP_ACTION ):
+ case( MetaActionType::POP ):
{
const_cast<MetaAction*>(pAction)->Execute( maVDev );
@@ -1473,14 +1474,14 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case( META_RASTEROP_ACTION ):
+ case( MetaActionType::RASTEROP ):
{
const_cast<MetaAction*>(pAction)->Execute( maVDev );
ImplWriteRasterOp( static_cast<const MetaRasterOpAction*>(pAction)->GetRasterOp() );
}
break;
- case( META_LAYOUTMODE_ACTION ):
+ case( MetaActionType::LAYOUTMODE ):
{
ComplexTextLayoutMode nLayoutMode = static_cast<const MetaLayoutModeAction*>(pAction)->GetLayoutMode();
mnHorTextAlign = 0;
@@ -1495,7 +1496,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
break;
}
- case( META_COMMENT_ACTION ):
+ case( MetaActionType::COMMENT ):
{
MetaCommentAction const*const pCommentAction(
static_cast<MetaCommentAction const*>(pAction));
@@ -1509,12 +1510,12 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case( META_MASK_ACTION ):
- case( META_MASKSCALE_ACTION ):
- case( META_MASKSCALEPART_ACTION ):
- case( META_WALLPAPER_ACTION ):
- case( META_TEXTLINE_ACTION ):
- case( META_GRADIENTEX_ACTION ):
+ case( MetaActionType::MASK ):
+ case( MetaActionType::MASKSCALE ):
+ case( MetaActionType::MASKSCALEPART ):
+ case( MetaActionType::WALLPAPER ):
+ case( MetaActionType::TEXTLINE ):
+ case( MetaActionType::GRADIENTEX ):
{
// !!! >>> we don't want to support these actions
}
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index dc98e2eae9b6..468479deff31 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -197,14 +197,15 @@ void WMFWriter::CountActionsAndBitmaps( const GDIMetaFile & rMTF )
switch( pMA->GetType() )
{
- case META_BMP_ACTION:
- case META_BMPSCALE_ACTION:
- case META_BMPSCALEPART_ACTION:
- case META_BMPEX_ACTION:
- case META_BMPEXSCALE_ACTION:
- case META_BMPEXSCALEPART_ACTION:
+ case MetaActionType::BMP:
+ case MetaActionType::BMPSCALE:
+ case MetaActionType::BMPSCALEPART:
+ case MetaActionType::BMPEX:
+ case MetaActionType::BMPEXSCALE:
+ case MetaActionType::BMPEXSCALEPART:
nNumberOfBitmaps++;
break;
+ default: break;
}
nNumberOfActions++;
}
@@ -1021,7 +1022,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
switch( pMA->GetType() )
{
- case META_PIXEL_ACTION:
+ case MetaActionType::PIXEL:
{
const MetaPixelAction* pA = static_cast<const MetaPixelAction *>(pMA);
aSrcLineInfo = LineInfo();
@@ -1030,7 +1031,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_POINT_ACTION:
+ case MetaActionType::POINT:
{
const MetaPointAction* pA = static_cast<const MetaPointAction*>(pMA);
const Point& rPt = pA->GetPoint();
@@ -1041,7 +1042,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_LINE_ACTION:
+ case MetaActionType::LINE:
{
const MetaLineAction* pA = static_cast<const MetaLineAction *>(pMA);
if(pA->GetLineInfo().IsDefault())
@@ -1062,7 +1063,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_RECT_ACTION:
+ case MetaActionType::RECT:
{
const MetaRectAction* pA = static_cast<const MetaRectAction*>(pMA);
aSrcLineInfo = LineInfo();
@@ -1071,7 +1072,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_ROUNDRECT_ACTION:
+ case MetaActionType::ROUNDRECT:
{
const MetaRoundRectAction* pA = static_cast<const MetaRoundRectAction*>(pMA);
aSrcLineInfo = LineInfo();
@@ -1080,7 +1081,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_ELLIPSE_ACTION:
+ case MetaActionType::ELLIPSE:
{
const MetaEllipseAction* pA = static_cast<const MetaEllipseAction*>(pMA);
aSrcLineInfo = LineInfo();
@@ -1089,7 +1090,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_ARC_ACTION:
+ case MetaActionType::ARC:
{
const MetaArcAction* pA = static_cast<const MetaArcAction*>(pMA);
aSrcLineInfo = LineInfo();
@@ -1098,7 +1099,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_PIE_ACTION:
+ case MetaActionType::PIE:
{
const MetaPieAction* pA = static_cast<const MetaPieAction*>(pMA);
aSrcLineInfo = LineInfo();
@@ -1107,7 +1108,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_CHORD_ACTION:
+ case MetaActionType::CHORD:
{
const MetaChordAction* pA = static_cast<const MetaChordAction*>(pMA);
aSrcLineInfo = LineInfo();
@@ -1116,7 +1117,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_POLYLINE_ACTION:
+ case MetaActionType::POLYLINE:
{
const MetaPolyLineAction* pA = static_cast<const MetaPolyLineAction*>(pMA);
const Polygon& rPoly = pA->GetPolygon();
@@ -1138,7 +1139,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_POLYGON_ACTION:
+ case MetaActionType::POLYGON:
{
const MetaPolygonAction* pA = static_cast<const MetaPolygonAction*>(pMA);
aSrcLineInfo = LineInfo();
@@ -1147,7 +1148,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_POLYPOLYGON_ACTION:
+ case MetaActionType::POLYPOLYGON:
{
const MetaPolyPolygonAction* pA = static_cast<const MetaPolyPolygonAction*>(pMA);
aSrcLineInfo = LineInfo();
@@ -1156,7 +1157,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_TEXTRECT_ACTION:
+ case MetaActionType::TEXTRECT:
{
const MetaTextRectAction * pA = static_cast<const MetaTextRectAction*>(pMA);
OUString aTemp( pA->GetText() );
@@ -1169,7 +1170,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_TEXT_ACTION:
+ case MetaActionType::TEXT:
{
const MetaTextAction * pA = static_cast<const MetaTextAction*>(pMA);
OUString aTemp = pA->GetText().copy( pA->GetIndex(), std::min<sal_Int32>(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) );
@@ -1180,7 +1181,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_TEXTARRAY_ACTION:
+ case MetaActionType::TEXTARRAY:
{
const MetaTextArrayAction* pA = static_cast<const MetaTextArrayAction*>(pMA);
@@ -1192,7 +1193,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_STRETCHTEXT_ACTION:
+ case MetaActionType::STRETCHTEXT:
{
const MetaStretchTextAction* pA = static_cast<const MetaStretchTextAction *>(pMA);
OUString aTemp = pA->GetText().copy( pA->GetIndex(), std::min<sal_Int32>(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) );
@@ -1222,21 +1223,21 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_BMP_ACTION:
+ case MetaActionType::BMP:
{
const MetaBmpAction* pA = static_cast<const MetaBmpAction *>(pMA);
WMFRecord_StretchDIB( pA->GetPoint(), pA->GetBitmap().GetSizePixel(), pA->GetBitmap() );
}
break;
- case META_BMPSCALE_ACTION:
+ case MetaActionType::BMPSCALE:
{
const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pMA);
WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), pA->GetBitmap() );
}
break;
- case META_BMPSCALEPART_ACTION:
+ case MetaActionType::BMPSCALEPART:
{
const MetaBmpScalePartAction* pA = static_cast<const MetaBmpScalePartAction*>(pMA);
Bitmap aTmp( pA->GetBitmap() );
@@ -1246,7 +1247,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_BMPEX_ACTION:
+ case MetaActionType::BMPEX:
{
const MetaBmpExAction* pA = static_cast<const MetaBmpExAction *>(pMA);
Bitmap aBmp( pA->GetBitmapEx().GetBitmap() );
@@ -1264,7 +1265,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_BMPEXSCALE_ACTION:
+ case MetaActionType::BMPEXSCALE:
{
const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pMA);
Bitmap aBmp( pA->GetBitmapEx().GetBitmap() );
@@ -1282,7 +1283,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_BMPEXSCALEPART_ACTION:
+ case MetaActionType::BMPEXSCALEPART:
{
const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pMA);
BitmapEx aBmpEx( pA->GetBitmapEx() );
@@ -1302,7 +1303,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_GRADIENT_ACTION:
+ case MetaActionType::GRADIENT:
{
const MetaGradientAction* pA = static_cast<const MetaGradientAction*>(pMA);
GDIMetaFile aTmpMtf;
@@ -1312,7 +1313,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_HATCH_ACTION:
+ case MetaActionType::HATCH:
{
const MetaHatchAction* pA = static_cast<const MetaHatchAction*>(pMA);
GDIMetaFile aTmpMtf;
@@ -1322,7 +1323,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_WALLPAPER_ACTION:
+ case MetaActionType::WALLPAPER:
{
const MetaWallpaperAction* pA = static_cast<const MetaWallpaperAction*>(pMA);
const Color& rColor = pA->GetWallpaper().GetColor();
@@ -1339,14 +1340,14 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_ISECTRECTCLIPREGION_ACTION:
+ case MetaActionType::ISECTRECTCLIPREGION:
{
const MetaISectRectClipRegionAction* pA = static_cast<const MetaISectRectClipRegionAction*>(pMA);
WMFRecord_IntersectClipRect( pA->GetRect() );
}
break;
- case META_LINECOLOR_ACTION:
+ case MetaActionType::LINECOLOR:
{
const MetaLineColorAction* pA = static_cast<const MetaLineColorAction*>(pMA);
@@ -1357,7 +1358,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_FILLCOLOR_ACTION:
+ case MetaActionType::FILLCOLOR:
{
const MetaFillColorAction* pA = static_cast<const MetaFillColorAction*>(pMA);
@@ -1368,14 +1369,14 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_TEXTCOLOR_ACTION:
+ case MetaActionType::TEXTCOLOR:
{
const MetaTextColorAction* pA = static_cast<const MetaTextColorAction*>(pMA);
aSrcTextColor = pA->GetColor();
}
break;
- case META_TEXTFILLCOLOR_ACTION:
+ case MetaActionType::TEXTFILLCOLOR:
{
const MetaTextFillColorAction* pA = static_cast<const MetaTextFillColorAction*>(pMA);
if( pA->IsSetting() )
@@ -1385,14 +1386,14 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_TEXTALIGN_ACTION:
+ case MetaActionType::TEXTALIGN:
{
const MetaTextAlignAction* pA = static_cast<const MetaTextAlignAction*>(pMA);
eSrcTextAlign = pA->GetTextAlign();
}
break;
- case META_MAPMODE_ACTION:
+ case MetaActionType::MAPMODE:
{
const MetaMapModeAction* pA = static_cast<const MetaMapModeAction*>(pMA);
@@ -1446,7 +1447,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_FONT_ACTION:
+ case MetaActionType::FONT:
{
const MetaFontAction* pA = static_cast<const MetaFontAction*>(pMA);
aSrcFont = pA->GetFont();
@@ -1463,7 +1464,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_PUSH_ACTION:
+ case MetaActionType::PUSH:
{
const MetaPushAction* pA = static_cast<const MetaPushAction*>(pMA);
@@ -1487,7 +1488,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_POP_ACTION:
+ case MetaActionType::POP:
{
WMFWriterAttrStackMember * pAt=pAttrStack;
@@ -1525,7 +1526,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_EPS_ACTION :
+ case MetaActionType::EPS :
{
const MetaEPSAction* pA = static_cast<const MetaEPSAction*>(pMA);
const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() );
@@ -1534,7 +1535,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
for ( size_t i = 0; i < nCount; i++ )
{
const MetaAction* pMetaAct = aGDIMetaFile.GetAction( i );
- if ( pMetaAct->GetType() == META_BMPSCALE_ACTION )
+ if ( pMetaAct->GetType() == MetaActionType::BMPSCALE )
{
const MetaBmpScaleAction* pBmpScaleAction = static_cast<const MetaBmpScaleAction*>(pMetaAct);
WMFRecord_StretchDIB( pA->GetPoint(), pA->GetSize(), pBmpScaleAction->GetBitmap() );
@@ -1544,14 +1545,14 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_RASTEROP_ACTION:
+ case MetaActionType::RASTEROP:
{
const MetaRasterOpAction* pA = static_cast<const MetaRasterOpAction*>(pMA);
eSrcRasterOp=pA->GetRasterOp();
}
break;
- case META_TRANSPARENT_ACTION:
+ case MetaActionType::TRANSPARENT:
{
aSrcLineInfo = LineInfo();
SetLineAndFillAttr();
@@ -1559,7 +1560,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case META_FLOATTRANSPARENT_ACTION:
+ case MetaActionType::FLOATTRANSPARENT:
{
const MetaFloatTransparentAction* pA = static_cast<const MetaFloatTransparentAction*>(pMA);
@@ -1590,7 +1591,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
break;
- case( META_LAYOUTMODE_ACTION ):
+ case( MetaActionType::LAYOUTMODE ):
{
ComplexTextLayoutMode nLayoutMode = static_cast<const MetaLayoutModeAction*>(pMA)->GetLayoutMode();
eSrcHorTextAlign = 0; // TA_LEFT
@@ -1606,24 +1607,24 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
}
// Unsupported Actions
- case META_MASK_ACTION:
- case META_MASKSCALE_ACTION:
- case META_MASKSCALEPART_ACTION:
+ case MetaActionType::MASK:
+ case MetaActionType::MASKSCALE:
+ case MetaActionType::MASKSCALEPART:
{
OSL_FAIL( "Unsupported action: MetaMask...Action!" );
}
break;
- case META_CLIPREGION_ACTION:
+ case MetaActionType::CLIPREGION:
break;
- case META_ISECTREGIONCLIPREGION_ACTION:
+ case MetaActionType::ISECTREGIONCLIPREGION:
{
OSL_FAIL( "Unsupported action: MetaISectRegionClipRegionAction!" );
}
break;
- case META_MOVECLIPREGION_ACTION:
+ case MetaActionType::MOVECLIPREGION:
{
OSL_FAIL( "Unsupported action: MetaMoveClipRegionAction!" );
}
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index 8509f66d8eaf..2ea10376490e 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -1420,7 +1420,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
switch( pAction->GetType() )
{
- case( META_PIXEL_ACTION ):
+ case( MetaActionType::PIXEL ):
{
const MetaPixelAction* pAct = static_cast<const MetaPixelAction*>(pAction);
@@ -1432,7 +1432,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_POINT_ACTION ):
+ case( MetaActionType::POINT ):
{
const MetaPointAction* pAct = static_cast<const MetaPointAction*>(pAction);
@@ -1443,7 +1443,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_LINE_ACTION ):
+ case( MetaActionType::LINE ):
{
const MetaLineAction* pAct = static_cast<const MetaLineAction*>(pAction);
const LineInfo& rInfo = pAct->GetLineInfo();
@@ -1512,7 +1512,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_RECT_ACTION ):
+ case( MetaActionType::RECT ):
{
const MetaRectAction* pAct = static_cast<const MetaRectAction*>(pAction);
@@ -1525,7 +1525,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_ROUNDRECT_ACTION ):
+ case( MetaActionType::ROUNDRECT ):
{
const MetaRoundRectAction* pAct = static_cast<const MetaRoundRectAction*>(pAction);
@@ -1538,7 +1538,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_ELLIPSE_ACTION ):
+ case( MetaActionType::ELLIPSE ):
{
const MetaEllipseAction* pAct = static_cast<const MetaEllipseAction*>(pAction);
@@ -1549,7 +1549,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_ARC_ACTION ):
+ case( MetaActionType::ARC ):
{
const MetaArcAction* pAct = static_cast<const MetaArcAction*>(pAction);
@@ -1562,7 +1562,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_PIE_ACTION ):
+ case( MetaActionType::PIE ):
{
const MetaPieAction* pAct = static_cast<const MetaPieAction*>(pAction);
@@ -1575,7 +1575,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_CHORD_ACTION ):
+ case( MetaActionType::CHORD ):
{
const MetaChordAction* pAct = static_cast<const MetaChordAction*>(pAction);
Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(),
@@ -1592,7 +1592,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_POLYLINE_ACTION ):
+ case( MetaActionType::POLYLINE ):
{
// #i102224#
const MetaPolyLineAction* pAct = static_cast<const MetaPolyLineAction*>(pAction);
@@ -1679,7 +1679,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_POLYGON_ACTION ):
+ case( MetaActionType::POLYGON ):
{
const MetaPolygonAction* pAct = static_cast<const MetaPolygonAction*>(pAction);
// #i102224# Here the possible curved nature of Polygon was
@@ -1706,7 +1706,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_POLYPOLYGON_ACTION ):
+ case( MetaActionType::POLYPOLYGON ):
{
const MetaPolyPolygonAction* pAct = static_cast<const MetaPolyPolygonAction*>(pAction);
ImplWritePolyPolyAction( rOStm, pAct->GetPolyPolygon() );
@@ -1719,7 +1719,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_TEXT_ACTION ):
+ case( MetaActionType::TEXT ):
{
const MetaTextAction* pAct = static_cast<const MetaTextAction*>(pAction);
OUString aUniText( pAct->GetText() );
@@ -1740,7 +1740,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_TEXTARRAY_ACTION ):
+ case( MetaActionType::TEXTARRAY ):
{
const MetaTextArrayAction* pAct = static_cast<const MetaTextArrayAction*>(pAction);
OString aText(OUStringToOString(pAct->GetText(), rActualCharSet));
@@ -1784,7 +1784,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_STRETCHTEXT_ACTION ):
+ case( MetaActionType::STRETCHTEXT ):
{
const MetaStretchTextAction* pAct = static_cast<const MetaStretchTextAction*>(pAction);
OUString aUniText( pAct->GetText() );
@@ -1806,7 +1806,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_BMP_ACTION ):
+ case( MetaActionType::BMP ):
{
const MetaBmpAction* pAct = static_cast<const MetaBmpAction*>(pAction);
@@ -1818,7 +1818,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_BMPSCALE_ACTION ):
+ case( MetaActionType::BMPSCALE ):
{
const MetaBmpScaleAction* pAct = static_cast<const MetaBmpScaleAction*>(pAction);
@@ -1831,7 +1831,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_BMPSCALEPART_ACTION ):
+ case( MetaActionType::BMPSCALEPART ):
{
const MetaBmpScalePartAction* pAct = static_cast<const MetaBmpScalePartAction*>(pAction);
@@ -1846,7 +1846,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_BMPEX_ACTION ):
+ case( MetaActionType::BMPEX ):
{
const MetaBmpExAction* pAct = static_cast<const MetaBmpExAction*>(pAction);
const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
@@ -1859,7 +1859,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_BMPEXSCALE_ACTION ):
+ case( MetaActionType::BMPEXSCALE ):
{
const MetaBmpExScaleAction* pAct = static_cast<const MetaBmpExScaleAction*>(pAction);
const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
@@ -1873,7 +1873,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_BMPEXSCALEPART_ACTION ):
+ case( MetaActionType::BMPEXSCALEPART ):
{
const MetaBmpExScalePartAction* pAct = static_cast<const MetaBmpExScalePartAction*>(pAction);
const Bitmap aBmp( Graphic( pAct->GetBitmapEx() ).GetBitmap() );
@@ -1889,7 +1889,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_GRADIENT_ACTION ):
+ case( MetaActionType::GRADIENT ):
{
const MetaGradientAction* pAct = static_cast<const MetaGradientAction*>(pAction);
const Gradient& rGrad = pAct->GetGradient();
@@ -1910,7 +1910,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_GRADIENTEX_ACTION ):
+ case( MetaActionType::GRADIENTEX ):
{
const MetaGradientExAction* pA = static_cast<const MetaGradientExAction*>(pAction);
sal_uLong nOldPos, nNewPos;
@@ -1937,7 +1937,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_WALLPAPER_ACTION ):
+ case( MetaActionType::WALLPAPER ):
{
const MetaWallpaperAction* pAct = static_cast<const MetaWallpaperAction*>(pAction);
const Color& rColor = pAct->GetWallpaper().GetColor();
@@ -1957,7 +1957,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_CLIPREGION_ACTION ):
+ case( MetaActionType::CLIPREGION ):
{
const MetaClipRegionAction* pAct = static_cast<const MetaClipRegionAction*>(pAction);
const vcl::Region& rRegion = pAct->GetRegion();
@@ -1984,7 +1984,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_ISECTRECTCLIPREGION_ACTION ):
+ case( MetaActionType::ISECTRECTCLIPREGION ):
{
const MetaISectRectClipRegionAction* pAct = static_cast<const MetaISectRectClipRegionAction*>(pAction);
@@ -1995,7 +1995,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_MOVECLIPREGION_ACTION ):
+ case( MetaActionType::MOVECLIPREGION ):
{
const MetaMoveClipRegionAction* pAct = static_cast<const MetaMoveClipRegionAction*>(pAction);
@@ -2007,7 +2007,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_LINECOLOR_ACTION ):
+ case( MetaActionType::LINECOLOR ):
{
const MetaLineColorAction* pAct = static_cast<const MetaLineColorAction*>(pAction);
ImplWriteLineColor( rOStm, rLineCol = pAct->GetColor(), pAct->IsSetting() ? 1 : 0 );
@@ -2015,7 +2015,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_FILLCOLOR_ACTION ):
+ case( MetaActionType::FILLCOLOR ):
{
const MetaFillColorAction* pAct = static_cast<const MetaFillColorAction*>(pAction);
ImplWriteFillColor( rOStm, pAct->GetColor(), pAct->IsSetting() ? 1 : 0 );
@@ -2023,7 +2023,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_FONT_ACTION ):
+ case( MetaActionType::FONT ):
{
rSaveVDev.SetFont( static_cast<const MetaFontAction*>(pAction)->GetFont() );
ImplWriteFont( rOStm, rSaveVDev.GetFont(), rActualCharSet );
@@ -2031,7 +2031,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_TEXTCOLOR_ACTION ):
+ case( MetaActionType::TEXTCOLOR ):
{
vcl::Font aSaveFont( rSaveVDev.GetFont() );
@@ -2042,7 +2042,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_TEXTFILLCOLOR_ACTION ):
+ case( MetaActionType::TEXTFILLCOLOR ):
{
const MetaTextFillColorAction* pAct = static_cast<const MetaTextFillColorAction*>(pAction);
vcl::Font aSaveFont( rSaveVDev.GetFont() );
@@ -2058,7 +2058,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_TEXTALIGN_ACTION ):
+ case( MetaActionType::TEXTALIGN ):
{
vcl::Font aSaveFont( rSaveVDev.GetFont() );
@@ -2069,7 +2069,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_MAPMODE_ACTION ):
+ case( MetaActionType::MAPMODE ):
{
const MetaMapModeAction* pAct = static_cast<const MetaMapModeAction*>(pAction);
@@ -2080,7 +2080,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_PUSH_ACTION ):
+ case( MetaActionType::PUSH ):
{
ImplWritePushAction( rOStm );
rLineColStack.push( new Color( rLineCol ) );
@@ -2089,7 +2089,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_POP_ACTION ):
+ case( MetaActionType::POP ):
{
Color* pCol;
if (rLineColStack.empty())
@@ -2112,7 +2112,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_RASTEROP_ACTION ):
+ case( MetaActionType::RASTEROP ):
{
const MetaRasterOpAction* pAct = static_cast<const MetaRasterOpAction*>(pAction);
@@ -2164,7 +2164,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_TRANSPARENT_ACTION ):
+ case( MetaActionType::TRANSPARENT ):
{
const tools::PolyPolygon& rPolyPoly = static_cast<const MetaTransparentAction*>(pAction)->GetPolyPolygon();
const sal_Int16 nTrans = static_cast<const MetaTransparentAction*>(pAction)->GetTransparence();
@@ -2223,7 +2223,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_FLOATTRANSPARENT_ACTION ):
+ case( MetaActionType::FLOATTRANSPARENT ):
{
const MetaFloatTransparentAction* pA = static_cast<const MetaFloatTransparentAction*>(pAction);
const GDIMetaFile& rTransMtf = pA->GetGDIMetaFile();
@@ -2285,7 +2285,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_HATCH_ACTION ):
+ case( MetaActionType::HATCH ):
{
const MetaHatchAction* pA = static_cast<const MetaHatchAction*>(pAction);
const tools::PolyPolygon& rPolyPoly = pA->GetPolyPolygon();
@@ -2328,7 +2328,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_REFPOINT_ACTION ):
+ case( MetaActionType::REFPOINT ):
{
const MetaRefPointAction* pA = static_cast<const MetaRefPointAction*>(pAction);
const Point& rRefPoint = pA->GetRefPoint();
@@ -2357,7 +2357,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_TEXTLINECOLOR_ACTION ):
+ case( MetaActionType::TEXTLINECOLOR ):
{
const MetaTextLineColorAction* pA = static_cast<const MetaTextLineColorAction*>(pAction);
const Color& rColor = pA->GetColor();
@@ -2386,7 +2386,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_TEXTLINE_ACTION ):
+ case( MetaActionType::TEXTLINE ):
{
const MetaTextLineAction* pA = static_cast<const MetaTextLineAction*>(pAction);
const Point& rStartPt = pA->GetStartPoint();
@@ -2417,10 +2417,10 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
}
break;
- case( META_EPS_ACTION ):
+ case( MetaActionType::EPS ):
break;
- case( META_COMMENT_ACTION ):
+ case( MetaActionType::COMMENT ):
{
const MetaCommentAction* pA = static_cast<const MetaCommentAction*>(pAction);
const sal_uInt32 nDataSize = pA->GetDataSize();
diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx
index 1c19a11a4305..51961c8fc1af 100644
--- a/vcl/source/gdi/gdimetafiletools.cxx
+++ b/vcl/source/gdi/gdimetafiletools.cxx
@@ -282,7 +282,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
for(sal_uLong i(0); i < nObjCount; ++i)
{
const MetaAction* pAction(rSource.GetAction(i));
- const sal_uInt16 nType(pAction->GetType());
+ const MetaActionType nType(pAction->GetType());
bool bDone(false);
// basic operation takes care of clipregion actions (four) and push/pop of these
@@ -291,7 +291,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
// below
switch(nType)
{
- case META_CLIPREGION_ACTION :
+ case MetaActionType::CLIPREGION :
{
const MetaClipRegionAction* pA = static_cast< const MetaClipRegionAction* >(pAction);
@@ -310,7 +310,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_ISECTRECTCLIPREGION_ACTION :
+ case MetaActionType::ISECTRECTCLIPREGION :
{
const MetaISectRectClipRegionAction* pA = static_cast< const MetaISectRectClipRegionAction* >(pAction);
const Rectangle& rRect = pA->GetRect();
@@ -330,7 +330,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_ISECTREGIONCLIPREGION_ACTION :
+ case MetaActionType::ISECTREGIONCLIPREGION :
{
const MetaISectRegionClipRegionAction* pA = static_cast< const MetaISectRegionClipRegionAction* >(pAction);
const vcl::Region& rRegion = pA->GetRegion();
@@ -348,7 +348,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_MOVECLIPREGION_ACTION :
+ case MetaActionType::MOVECLIPREGION :
{
const MetaMoveClipRegionAction* pA = static_cast< const MetaMoveClipRegionAction* >(pAction);
const long aHorMove(pA->GetHorzMove());
@@ -364,7 +364,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_PUSH_ACTION :
+ case MetaActionType::PUSH :
{
const MetaPushAction* pA = static_cast< const MetaPushAction* >(pAction);
const PushFlags nFlags(pA->GetFlags());
@@ -383,7 +383,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_POP_ACTION :
+ case MetaActionType::POP :
{
if(aPushFlags.size())
@@ -423,7 +423,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_MAPMODE_ACTION :
+ case MetaActionType::MAPMODE :
{
const MetaMapModeAction* pA = static_cast< const MetaMapModeAction* >(pAction);
@@ -448,7 +448,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
// pixel actions, just check on inside
- case META_PIXEL_ACTION :
+ case MetaActionType::PIXEL :
{
const MetaPixelAction* pA = static_cast< const MetaPixelAction* >(pAction);
const Point& rPoint = pA->GetPoint();
@@ -463,7 +463,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_POINT_ACTION :
+ case MetaActionType::POINT :
{
const MetaPointAction* pA = static_cast< const MetaPointAction* >(pAction);
const Point& rPoint = pA->GetPoint();
@@ -480,7 +480,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
// geometry actions
- case META_LINE_ACTION :
+ case MetaActionType::LINE :
{
const MetaLineAction* pA = static_cast< const MetaLineAction* >(pAction);
const Point& rStart(pA->GetStartPoint());
@@ -498,7 +498,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_RECT_ACTION :
+ case MetaActionType::RECT :
{
const MetaRectAction* pA = static_cast< const MetaRectAction* >(pAction);
const Rectangle& rRect = pA->GetRect();
@@ -523,7 +523,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_ROUNDRECT_ACTION :
+ case MetaActionType::ROUNDRECT :
{
const MetaRoundRectAction* pA = static_cast< const MetaRoundRectAction* >(pAction);
const Rectangle& rRect = pA->GetRect();
@@ -562,7 +562,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_ELLIPSE_ACTION :
+ case MetaActionType::ELLIPSE :
{
const MetaEllipseAction* pA = static_cast< const MetaEllipseAction* >(pAction);
const Rectangle& rRect = pA->GetRect();
@@ -588,7 +588,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_ARC_ACTION :
+ case MetaActionType::ARC :
{
const MetaArcAction* pA = static_cast< const MetaArcAction* >(pAction);
const Rectangle& rRect = pA->GetRect();
@@ -614,7 +614,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_PIE_ACTION :
+ case MetaActionType::PIE :
{
const MetaPieAction* pA = static_cast< const MetaPieAction* >(pAction);
const Rectangle& rRect = pA->GetRect();
@@ -640,7 +640,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_CHORD_ACTION :
+ case MetaActionType::CHORD :
{
const MetaChordAction* pA = static_cast< const MetaChordAction* >(pAction);
const Rectangle& rRect = pA->GetRect();
@@ -666,7 +666,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_POLYLINE_ACTION :
+ case MetaActionType::POLYLINE :
{
const MetaPolyLineAction* pA = static_cast< const MetaPolyLineAction* >(pAction);
@@ -678,7 +678,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_POLYGON_ACTION :
+ case MetaActionType::POLYGON :
{
const MetaPolygonAction* pA = static_cast< const MetaPolygonAction* >(pAction);
@@ -690,7 +690,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_POLYPOLYGON_ACTION :
+ case MetaActionType::POLYPOLYGON :
{
const MetaPolyPolygonAction* pA = static_cast< const MetaPolyPolygonAction* >(pAction);
const tools::PolyPolygon& rPoly = pA->GetPolyPolygon();
@@ -706,7 +706,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
// bitmap actions, create BitmapEx with alpha channel derived
// from clipping
- case META_BMPEX_ACTION :
+ case MetaActionType::BMPEX :
{
const MetaBmpExAction* pA = static_cast< const MetaBmpExAction* >(pAction);
const BitmapEx& rBitmapEx = pA->GetBitmapEx();
@@ -733,7 +733,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_BMP_ACTION :
+ case MetaActionType::BMP :
{
const MetaBmpAction* pA = static_cast< const MetaBmpAction* >(pAction);
const Bitmap& rBitmap = pA->GetBitmap();
@@ -760,7 +760,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_BMPEXSCALE_ACTION :
+ case MetaActionType::BMPEXSCALE :
{
const MetaBmpExScaleAction* pA = static_cast< const MetaBmpExScaleAction* >(pAction);
@@ -773,7 +773,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_BMPSCALE_ACTION :
+ case MetaActionType::BMPSCALE :
{
const MetaBmpScaleAction* pA = static_cast< const MetaBmpScaleAction* >(pAction);
@@ -786,7 +786,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_BMPEXSCALEPART_ACTION :
+ case MetaActionType::BMPEXSCALEPART :
{
const MetaBmpExScalePartAction* pA = static_cast< const MetaBmpExScalePartAction* >(pAction);
const BitmapEx& rBitmapEx = pA->GetBitmapEx();
@@ -820,7 +820,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_BMPSCALEPART_ACTION :
+ case MetaActionType::BMPSCALEPART :
{
const MetaBmpScalePartAction* pA = static_cast< const MetaBmpScalePartAction* >(pAction);
const Bitmap& rBitmap = pA->GetBitmap();
@@ -856,7 +856,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
// need to handle all those 'hacks' which hide data in comments
- case META_COMMENT_ACTION :
+ case MetaActionType::COMMENT :
{
const MetaCommentAction* pA = static_cast< const MetaCommentAction* >(pAction);
const OString& rComment = pA->GetComment();
@@ -864,9 +864,9 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
if(rComment.equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN"))
{
// nothing to do; this just means that between here and XGRAD_SEQ_END
- // exists a META_GRADIENTEX_ACTION mixed with Xor-tricked painiting
+ // exists a MetaActionType::GRADIENTEX mixed with Xor-tricked painiting
// commands. This comment is used to scan over these and filter for
- // the gradient action. It is needed to support META_GRADIENTEX_ACTION
+ // the gradient action. It is needed to support MetaActionType::GRADIENTEX
// in this processor to solve usages.
}
else if(rComment.equalsIgnoreAsciiCase("XPATHFILL_SEQ_BEGIN"))
@@ -961,7 +961,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
// need to handle gradient fills (hopefully only unroated ones)
- case META_GRADIENT_ACTION :
+ case MetaActionType::GRADIENT :
{
const MetaGradientAction* pA = static_cast< const MetaGradientAction* >(pAction);
const Rectangle& rRect = pA->GetRect();
@@ -986,7 +986,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
break;
}
- case META_GRADIENTEX_ACTION :
+ case MetaActionType::GRADIENTEX :
{
const MetaGradientExAction* pA = static_cast< const MetaGradientExAction* >(pAction);
const tools::PolyPolygon& rPolyPoly = pA->GetPolyPolygon();
@@ -1001,31 +1001,31 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
// not (yet) supported actions
- // META_NULL_ACTION
- // META_TEXT_ACTION
- // META_TEXTARRAY_ACTION
- // META_STRETCHTEXT_ACTION
- // META_TEXTRECT_ACTION
- // META_MASK_ACTION
- // META_MASKSCALE_ACTION
- // META_MASKSCALEPART_ACTION
- // META_HATCH_ACTION
- // META_WALLPAPER_ACTION
- // META_FILLCOLOR_ACTION
- // META_TEXTCOLOR_ACTION
- // META_TEXTFILLCOLOR_ACTION
- // META_TEXTALIGN_ACTION
- // META_MAPMODE_ACTION
- // META_FONT_ACTION
- // META_TRANSPARENT_ACTION
- // META_EPS_ACTION
- // META_REFPOINT_ACTION
- // META_TEXTLINECOLOR_ACTION
- // META_TEXTLINE_ACTION
- // META_FLOATTRANSPARENT_ACTION
- // META_LAYOUTMODE_ACTION
- // META_TEXTLANGUAGE_ACTION
- // META_OVERLINECOLOR_ACTION
+ // MetaActionType::NONE
+ // MetaActionType::TEXT
+ // MetaActionType::TEXTARRAY
+ // MetaActionType::STRETCHTEXT
+ // MetaActionType::TEXTRECT
+ // MetaActionType::MASK
+ // MetaActionType::MASKSCALE
+ // MetaActionType::MASKSCALEPART
+ // MetaActionType::HATCH
+ // MetaActionType::WALLPAPER
+ // MetaActionType::FILLCOLOR
+ // MetaActionType::TEXTCOLOR
+ // MetaActionType::TEXTFILLCOLOR
+ // MetaActionType::TEXTALIGN
+ // MetaActionType::MAPMODE
+ // MetaActionType::FONT
+ // MetaActionType::TRANSPARENT
+ // MetaActionType::EPS
+ // MetaActionType::REFPOINT
+ // MetaActionType::TEXTLINECOLOR
+ // MetaActionType::TEXTLINE
+ // MetaActionType::FLOATTRANSPARENT
+ // MetaActionType::LAYOUTMODE
+ // MetaActionType::TEXTLANGUAGE
+ // MetaActionType::OVERLINECOLOR
// if an action is not handled at all, it will simply get copied to the
// target (see below). This is the default for all non-implemented actions
@@ -1064,14 +1064,14 @@ bool usesClipActions(const GDIMetaFile& rSource)
for(sal_uLong i(0); i < nObjCount; ++i)
{
const MetaAction* pAction(rSource.GetAction(i));
- const sal_uInt16 nType(pAction->GetType());
+ const MetaActionType nType(pAction->GetType());
switch(nType)
{
- case META_CLIPREGION_ACTION :
- case META_ISECTRECTCLIPREGION_ACTION :
- case META_ISECTREGIONCLIPREGION_ACTION :
- case META_MOVECLIPREGION_ACTION :
+ case MetaActionType::CLIPREGION :
+ case MetaActionType::ISECTRECTCLIPREGION :
+ case MetaActionType::ISECTREGIONCLIPREGION :
+ case MetaActionType::MOVECLIPREGION :
{
return true;
}
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 2b3415862be0..25a3632d8a61 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -363,7 +363,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos )
{
if( !Hook() && pAction )
{
- if( pAction->GetType() == META_COMMENT_ACTION &&
+ if( pAction->GetType() == MetaActionType::COMMENT &&
static_cast<MetaCommentAction*>(pAction)->GetComment() == "DELEGATE_PLUGGABLE_RENDERER" )
{
ImplDelegate2PluggableRenderer(static_cast<MetaCommentAction*>(pAction), pOut);
@@ -730,7 +730,7 @@ void GDIMetaFile::Move( long nX, long nY )
for( MetaAction* pAct = FirstAction(); pAct; pAct = NextAction() )
{
- const long nType = pAct->GetType();
+ const MetaActionType nType = pAct->GetType();
MetaAction* pModAct;
if( pAct->GetRefCount() > 1 )
@@ -741,9 +741,9 @@ void GDIMetaFile::Move( long nX, long nY )
else
pModAct = pAct;
- if( ( META_MAPMODE_ACTION == nType ) ||
- ( META_PUSH_ACTION == nType ) ||
- ( META_POP_ACTION == nType ) )
+ if( ( MetaActionType::MAPMODE == nType ) ||
+ ( MetaActionType::PUSH == nType ) ||
+ ( MetaActionType::POP == nType ) )
{
pModAct->Execute( aMapVDev.get() );
aOffset = OutputDevice::LogicToLogic( aBaseOffset, GetPrefMapMode(), aMapVDev->GetMapMode() );
@@ -765,7 +765,7 @@ void GDIMetaFile::Move( long nX, long nY, long nDPIX, long nDPIY )
for( MetaAction* pAct = FirstAction(); pAct; pAct = NextAction() )
{
- const long nType = pAct->GetType();
+ const MetaActionType nType = pAct->GetType();
MetaAction* pModAct;
if( pAct->GetRefCount() > 1 )
@@ -776,9 +776,9 @@ void GDIMetaFile::Move( long nX, long nY, long nDPIX, long nDPIY )
else
pModAct = pAct;
- if( ( META_MAPMODE_ACTION == nType ) ||
- ( META_PUSH_ACTION == nType ) ||
- ( META_POP_ACTION == nType ) )
+ if( ( MetaActionType::MAPMODE == nType ) ||
+ ( MetaActionType::PUSH == nType ) ||
+ ( MetaActionType::POP == nType ) )
{
pModAct->Execute( aMapVDev.get() );
if( aMapVDev->GetMapMode().GetMapUnit() == MAP_PIXEL )
@@ -832,16 +832,16 @@ void GDIMetaFile::Clip( const Rectangle& i_rClipRect )
for( MetaAction* pAct = FirstAction(); pAct; pAct = NextAction() )
{
- const long nType = pAct->GetType();
+ const MetaActionType nType = pAct->GetType();
- if( ( META_MAPMODE_ACTION == nType ) ||
- ( META_PUSH_ACTION == nType ) ||
- ( META_POP_ACTION == nType ) )
+ if( ( MetaActionType::MAPMODE == nType ) ||
+ ( MetaActionType::PUSH == nType ) ||
+ ( MetaActionType::POP == nType ) )
{
pAct->Execute( aMapVDev.get() );
aCurRect = OutputDevice::LogicToLogic( i_rClipRect, GetPrefMapMode(), aMapVDev->GetMapMode() );
}
- else if( nType == META_CLIPREGION_ACTION )
+ else if( nType == MetaActionType::CLIPREGION )
{
MetaClipRegionAction* pOldAct = static_cast<MetaClipRegionAction*>(pAct);
vcl::Region aNewReg( aCurRect );
@@ -939,11 +939,11 @@ void GDIMetaFile::Rotate( long nAngle10 )
for( MetaAction* pAction = FirstAction(); pAction; pAction = NextAction() )
{
- const sal_uInt16 nActionType = pAction->GetType();
+ const MetaActionType nActionType = pAction->GetType();
switch( nActionType )
{
- case( META_PIXEL_ACTION ):
+ case( MetaActionType::PIXEL ):
{
MetaPixelAction* pAct = static_cast<MetaPixelAction*>(pAction);
aMtf.AddAction( new MetaPixelAction( ImplGetRotatedPoint( pAct->GetPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
@@ -951,14 +951,14 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_POINT_ACTION ):
+ case( MetaActionType::POINT ):
{
MetaPointAction* pAct = static_cast<MetaPointAction*>(pAction);
aMtf.AddAction( new MetaPointAction( ImplGetRotatedPoint( pAct->GetPoint(), aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
- case( META_LINE_ACTION ):
+ case( MetaActionType::LINE ):
{
MetaLineAction* pAct = static_cast<MetaLineAction*>(pAction);
aMtf.AddAction( new MetaLineAction( ImplGetRotatedPoint( pAct->GetStartPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
@@ -967,14 +967,14 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_RECT_ACTION ):
+ case( MetaActionType::RECT ):
{
MetaRectAction* pAct = static_cast<MetaRectAction*>(pAction);
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
- case( META_ROUNDRECT_ACTION ):
+ case( MetaActionType::ROUNDRECT ):
{
MetaRoundRectAction* pAct = static_cast<MetaRoundRectAction*>(pAction);
const Polygon aRoundRectPoly( pAct->GetRect(), pAct->GetHorzRound(), pAct->GetVertRound() );
@@ -983,7 +983,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_ELLIPSE_ACTION ):
+ case( MetaActionType::ELLIPSE ):
{
MetaEllipseAction* pAct = static_cast<MetaEllipseAction*>(pAction);
const Polygon aEllipsePoly( pAct->GetRect().Center(), pAct->GetRect().GetWidth() >> 1, pAct->GetRect().GetHeight() >> 1 );
@@ -992,7 +992,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_ARC_ACTION ):
+ case( MetaActionType::ARC ):
{
MetaArcAction* pAct = static_cast<MetaArcAction*>(pAction);
const Polygon aArcPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_ARC );
@@ -1001,7 +1001,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_PIE_ACTION ):
+ case( MetaActionType::PIE ):
{
MetaPieAction* pAct = static_cast<MetaPieAction*>(pAction);
const Polygon aPiePoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_PIE );
@@ -1010,7 +1010,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_CHORD_ACTION ):
+ case( MetaActionType::CHORD ):
{
MetaChordAction* pAct = static_cast<MetaChordAction*>(pAction);
const Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_CHORD );
@@ -1019,28 +1019,28 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_POLYLINE_ACTION ):
+ case( MetaActionType::POLYLINE ):
{
MetaPolyLineAction* pAct = static_cast<MetaPolyLineAction*>(pAction);
aMtf.AddAction( new MetaPolyLineAction( ImplGetRotatedPolygon( pAct->GetPolygon(), aRotAnchor, aRotOffset, fSin, fCos ), pAct->GetLineInfo() ) );
}
break;
- case( META_POLYGON_ACTION ):
+ case( MetaActionType::POLYGON ):
{
MetaPolygonAction* pAct = static_cast<MetaPolygonAction*>(pAction);
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( pAct->GetPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
- case( META_POLYPOLYGON_ACTION ):
+ case( MetaActionType::POLYPOLYGON ):
{
MetaPolyPolygonAction* pAct = static_cast<MetaPolyPolygonAction*>(pAction);
aMtf.AddAction( new MetaPolyPolygonAction( ImplGetRotatedPolyPolygon( pAct->GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
break;
- case( META_TEXT_ACTION ):
+ case( MetaActionType::TEXT ):
{
MetaTextAction* pAct = static_cast<MetaTextAction*>(pAction);
aMtf.AddAction( new MetaTextAction( ImplGetRotatedPoint( pAct->GetPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
@@ -1048,7 +1048,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_TEXTARRAY_ACTION ):
+ case( MetaActionType::TEXTARRAY ):
{
MetaTextArrayAction* pAct = static_cast<MetaTextArrayAction*>(pAction);
aMtf.AddAction( new MetaTextArrayAction( ImplGetRotatedPoint( pAct->GetPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
@@ -1056,7 +1056,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_STRETCHTEXT_ACTION ):
+ case( MetaActionType::STRETCHTEXT ):
{
MetaStretchTextAction* pAct = static_cast<MetaStretchTextAction*>(pAction);
aMtf.AddAction( new MetaStretchTextAction( ImplGetRotatedPoint( pAct->GetPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
@@ -1064,7 +1064,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_TEXTLINE_ACTION ):
+ case( MetaActionType::TEXTLINE ):
{
MetaTextLineAction* pAct = static_cast<MetaTextLineAction*>(pAction);
aMtf.AddAction( new MetaTextLineAction( ImplGetRotatedPoint( pAct->GetStartPoint(), aRotAnchor, aRotOffset, fSin, fCos ),
@@ -1072,7 +1072,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_BMPSCALE_ACTION ):
+ case( MetaActionType::BMPSCALE ):
{
MetaBmpScaleAction* pAct = static_cast<MetaBmpScaleAction*>(pAction);
Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
@@ -1085,7 +1085,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_BMPSCALEPART_ACTION ):
+ case( MetaActionType::BMPSCALEPART ):
{
MetaBmpScalePartAction* pAct = static_cast<MetaBmpScalePartAction*>(pAction);
Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
@@ -1099,7 +1099,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_BMPEXSCALE_ACTION ):
+ case( MetaActionType::BMPEXSCALE ):
{
MetaBmpExScaleAction* pAct = static_cast<MetaBmpExScaleAction*>(pAction);
Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
@@ -1112,7 +1112,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_BMPEXSCALEPART_ACTION ):
+ case( MetaActionType::BMPEXSCALEPART ):
{
MetaBmpExScalePartAction* pAct = static_cast<MetaBmpExScalePartAction*>(pAction);
Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
@@ -1126,7 +1126,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_GRADIENT_ACTION ):
+ case( MetaActionType::GRADIENT ):
{
MetaGradientAction* pAct = static_cast<MetaGradientAction*>(pAction);
@@ -1136,7 +1136,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_GRADIENTEX_ACTION ):
+ case( MetaActionType::GRADIENTEX ):
{
MetaGradientExAction* pAct = static_cast<MetaGradientExAction*>(pAction);
aMtf.AddAction( new MetaGradientExAction( ImplGetRotatedPolyPolygon( pAct->GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ),
@@ -1145,7 +1145,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
break;
// Handle gradientex comment block correctly
- case( META_COMMENT_ACTION ):
+ case( MetaActionType::COMMENT ):
{
MetaCommentAction* pCommentAct = static_cast<MetaCommentAction*>(pAction);
if( pCommentAct->GetComment() == "XGRAD_SEQ_BEGIN" )
@@ -1156,9 +1156,9 @@ void GDIMetaFile::Rotate( long nAngle10 )
// skip everything, except gradientex action
while( pAction )
{
- const sal_uInt16 nType = pAction->GetType();
+ const MetaActionType nType = pAction->GetType();
- if( META_GRADIENTEX_ACTION == nType )
+ if( MetaActionType::GRADIENTEX == nType )
{
// Add rotated gradientex
MetaGradientExAction* pAct = static_cast<MetaGradientExAction*>(pAction);
@@ -1166,7 +1166,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
ImplGetRotatedPolyPolygon( pAct->GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ),
pAct->GetGradient() );
}
- else if( META_COMMENT_ACTION == nType)
+ else if( MetaActionType::COMMENT == nType)
{
MetaCommentAction* pAct = static_cast<MetaCommentAction*>(pAction);
if( pAct->GetComment() == "XGRAD_SEQ_END" )
@@ -1233,7 +1233,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_HATCH_ACTION ):
+ case( MetaActionType::HATCH ):
{
MetaHatchAction* pAct = static_cast<MetaHatchAction*>(pAction);
Hatch aHatch( pAct->GetHatch() );
@@ -1244,7 +1244,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_TRANSPARENT_ACTION ):
+ case( MetaActionType::TRANSPARENT ):
{
MetaTransparentAction* pAct = static_cast<MetaTransparentAction*>(pAction);
aMtf.AddAction( new MetaTransparentAction( ImplGetRotatedPolyPolygon( pAct->GetPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ),
@@ -1252,7 +1252,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_FLOATTRANSPARENT_ACTION ):
+ case( MetaActionType::FLOATTRANSPARENT ):
{
MetaFloatTransparentAction* pAct = static_cast<MetaFloatTransparentAction*>(pAction);
GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
@@ -1265,7 +1265,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_EPS_ACTION ):
+ case( MetaActionType::EPS ):
{
MetaEPSAction* pAct = static_cast<MetaEPSAction*>(pAction);
GDIMetaFile aEPSMtf( pAct->GetSubstitute() );
@@ -1278,7 +1278,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_CLIPREGION_ACTION ):
+ case( MetaActionType::CLIPREGION ):
{
MetaClipRegionAction* pAct = static_cast<MetaClipRegionAction*>(pAction);
@@ -1292,7 +1292,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_ISECTRECTCLIPREGION_ACTION ):
+ case( MetaActionType::ISECTRECTCLIPREGION ):
{
MetaISectRectClipRegionAction* pAct = static_cast<MetaISectRectClipRegionAction*>(pAction);
aMtf.AddAction( new MetaISectRegionClipRegionAction(vcl::Region(
@@ -1301,7 +1301,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_ISECTREGIONCLIPREGION_ACTION ):
+ case( MetaActionType::ISECTREGIONCLIPREGION ):
{
MetaISectRegionClipRegionAction* pAct = static_cast<MetaISectRegionClipRegionAction*>(pAction);
const vcl::Region& rRegion = pAct->GetRegion();
@@ -1316,14 +1316,14 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_REFPOINT_ACTION ):
+ case( MetaActionType::REFPOINT ):
{
MetaRefPointAction* pAct = static_cast<MetaRefPointAction*>(pAction);
aMtf.AddAction( new MetaRefPointAction( ImplGetRotatedPoint( pAct->GetRefPoint(), aRotAnchor, aRotOffset, fSin, fCos ), pAct->IsSetting() ) );
}
break;
- case( META_FONT_ACTION ):
+ case( MetaActionType::FONT ):
{
MetaFontAction* pAct = static_cast<MetaFontAction*>(pAction);
vcl::Font aFont( pAct->GetFont() );
@@ -1333,14 +1333,14 @@ void GDIMetaFile::Rotate( long nAngle10 )
}
break;
- case( META_BMP_ACTION ):
- case( META_BMPEX_ACTION ):
- case( META_MASK_ACTION ):
- case( META_MASKSCALE_ACTION ):
- case( META_MASKSCALEPART_ACTION ):
- case( META_WALLPAPER_ACTION ):
- case( META_TEXTRECT_ACTION ):
- case( META_MOVECLIPREGION_ACTION ):
+ case( MetaActionType::BMP ):
+ case( MetaActionType::BMPEX ):
+ case( MetaActionType::MASK ):
+ case( MetaActionType::MASKSCALE ):
+ case( MetaActionType::MASKSCALEPART ):
+ case( MetaActionType::WALLPAPER ):
+ case( MetaActionType::TEXTRECT ):
+ case( MetaActionType::MOVECLIPREGION ):
{
OSL_FAIL( "GDIMetaFile::Rotate(): unsupported action" );
}
@@ -1353,9 +1353,9 @@ void GDIMetaFile::Rotate( long nAngle10 )
aMtf.AddAction( pAction );
// update rotation point and offset, if necessary
- if( ( META_MAPMODE_ACTION == nActionType ) ||
- ( META_PUSH_ACTION == nActionType ) ||
- ( META_POP_ACTION == nActionType ) )
+ if( ( MetaActionType::MAPMODE == nActionType ) ||
+ ( MetaActionType::PUSH == nActionType ) ||
+ ( MetaActionType::POP == nActionType ) )
{
aRotAnchor = OutputDevice::LogicToLogic( aOrigin, aPrefMapMode, aMapVDev->GetMapMode() );
aRotOffset = OutputDevice::LogicToLogic( aOffset, aPrefMapMode, aMapVDev->GetMapMode() );
@@ -1418,12 +1418,12 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
for(sal_uLong a(0); a < nCount; a++)
{
MetaAction* pAction = GetAction(a);
- const sal_uInt16 nActionType = pAction->GetType();
+ const MetaActionType nActionType = pAction->GetType();
Rectangle* pUseHairline = (pHairline && aMapVDev->IsLineColor()) ? pHairline : 0;
switch( nActionType )
{
- case( META_PIXEL_ACTION ):
+ case( MetaActionType::PIXEL ):
{
MetaPixelAction* pAct = static_cast<MetaPixelAction*>(pAction);
ImplActionBounds( aBound,
@@ -1433,7 +1433,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_POINT_ACTION ):
+ case( MetaActionType::POINT ):
{
MetaPointAction* pAct = static_cast<MetaPointAction*>(pAction);
ImplActionBounds( aBound,
@@ -1443,7 +1443,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_LINE_ACTION ):
+ case( MetaActionType::LINE ):
{
MetaLineAction* pAct = static_cast<MetaLineAction*>(pAction);
Point aP1( pAct->GetStartPoint() ), aP2( pAct->GetEndPoint() );
@@ -1462,28 +1462,28 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_RECT_ACTION ):
+ case( MetaActionType::RECT ):
{
MetaRectAction* pAct = static_cast<MetaRectAction*>(pAction);
ImplActionBounds( aBound, OutputDevice::LogicToLogic( pAct->GetRect(), aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, pUseHairline );
}
break;
- case( META_ROUNDRECT_ACTION ):
+ case( MetaActionType::ROUNDRECT ):
{
MetaRoundRectAction* pAct = static_cast<MetaRoundRectAction*>(pAction);
ImplActionBounds( aBound, OutputDevice::LogicToLogic( pAct->GetRect(), aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, pUseHairline );
}
break;
- case( META_ELLIPSE_ACTION ):
+ case( MetaActionType::ELLIPSE ):
{
MetaEllipseAction* pAct = static_cast<MetaEllipseAction*>(pAction);
ImplActionBounds( aBound, OutputDevice::LogicToLogic( pAct->GetRect(), aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, pUseHairline );
}
break;
- case( META_ARC_ACTION ):
+ case( MetaActionType::ARC ):
{
MetaArcAction* pAct = static_cast<MetaArcAction*>(pAction);
// FIXME: this is imprecise
@@ -1492,7 +1492,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_PIE_ACTION ):
+ case( MetaActionType::PIE ):
{
MetaPieAction* pAct = static_cast<MetaPieAction*>(pAction);
// FIXME: this is imprecise
@@ -1501,7 +1501,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_CHORD_ACTION ):
+ case( MetaActionType::CHORD ):
{
MetaChordAction* pAct = static_cast<MetaChordAction*>(pAction);
// FIXME: this is imprecise
@@ -1510,7 +1510,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_POLYLINE_ACTION ):
+ case( MetaActionType::POLYLINE ):
{
MetaPolyLineAction* pAct = static_cast<MetaPolyLineAction*>(pAction);
Rectangle aRect( pAct->GetPolygon().GetBoundRect() );
@@ -1527,7 +1527,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_POLYGON_ACTION ):
+ case( MetaActionType::POLYGON ):
{
MetaPolygonAction* pAct = static_cast<MetaPolygonAction*>(pAction);
Rectangle aRect( pAct->GetPolygon().GetBoundRect() );
@@ -1535,7 +1535,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_POLYPOLYGON_ACTION ):
+ case( MetaActionType::POLYPOLYGON ):
{
MetaPolyPolygonAction* pAct = static_cast<MetaPolyPolygonAction*>(pAction);
Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
@@ -1543,7 +1543,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_TEXT_ACTION ):
+ case( MetaActionType::TEXT ):
{
MetaTextAction* pAct = static_cast<MetaTextAction*>(pAction);
Rectangle aRect;
@@ -1555,7 +1555,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_TEXTARRAY_ACTION ):
+ case( MetaActionType::TEXTARRAY ):
{
MetaTextArrayAction* pAct = static_cast<MetaTextArrayAction*>(pAction);
Rectangle aRect;
@@ -1568,7 +1568,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_STRETCHTEXT_ACTION ):
+ case( MetaActionType::STRETCHTEXT ):
{
MetaStretchTextAction* pAct = static_cast<MetaStretchTextAction*>(pAction);
Rectangle aRect;
@@ -1581,7 +1581,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_TEXTLINE_ACTION ):
+ case( MetaActionType::TEXTLINE ):
{
MetaTextLineAction* pAct = static_cast<MetaTextLineAction*>(pAction);
// measure a test string to get ascend and descent right
@@ -1597,7 +1597,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_BMPSCALE_ACTION ):
+ case( MetaActionType::BMPSCALE ):
{
MetaBmpScaleAction* pAct = static_cast<MetaBmpScaleAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
@@ -1605,7 +1605,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_BMPSCALEPART_ACTION ):
+ case( MetaActionType::BMPSCALEPART ):
{
MetaBmpScalePartAction* pAct = static_cast<MetaBmpScalePartAction*>(pAction);
Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
@@ -1613,7 +1613,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_BMPEXSCALE_ACTION ):
+ case( MetaActionType::BMPEXSCALE ):
{
MetaBmpExScaleAction* pAct = static_cast<MetaBmpExScaleAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
@@ -1621,7 +1621,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_BMPEXSCALEPART_ACTION ):
+ case( MetaActionType::BMPEXSCALEPART ):
{
MetaBmpExScalePartAction* pAct = static_cast<MetaBmpExScalePartAction*>(pAction);
Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
@@ -1629,7 +1629,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_GRADIENT_ACTION ):
+ case( MetaActionType::GRADIENT ):
{
MetaGradientAction* pAct = static_cast<MetaGradientAction*>(pAction);
Rectangle aRect( pAct->GetRect() );
@@ -1637,7 +1637,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_GRADIENTEX_ACTION ):
+ case( MetaActionType::GRADIENTEX ):
{
MetaGradientExAction* pAct = static_cast<MetaGradientExAction*>(pAction);
Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
@@ -1645,13 +1645,13 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_COMMENT_ACTION ):
+ case( MetaActionType::COMMENT ):
{
// nothing to do
};
break;
- case( META_HATCH_ACTION ):
+ case( MetaActionType::HATCH ):
{
MetaHatchAction* pAct = static_cast<MetaHatchAction*>(pAction);
Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
@@ -1659,7 +1659,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_TRANSPARENT_ACTION ):
+ case( MetaActionType::TRANSPARENT ):
{
MetaTransparentAction* pAct = static_cast<MetaTransparentAction*>(pAction);
Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
@@ -1667,7 +1667,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_FLOATTRANSPARENT_ACTION ):
+ case( MetaActionType::FLOATTRANSPARENT ):
{
MetaFloatTransparentAction* pAct = static_cast<MetaFloatTransparentAction*>(pAction);
// MetaFloatTransparentAction is defined limiting it's content Metafile
@@ -1677,7 +1677,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_EPS_ACTION ):
+ case( MetaActionType::EPS ):
{
MetaEPSAction* pAct = static_cast<MetaEPSAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
@@ -1685,7 +1685,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_CLIPREGION_ACTION ):
+ case( MetaActionType::CLIPREGION ):
{
MetaClipRegionAction* pAct = static_cast<MetaClipRegionAction*>(pAction);
if( pAct->IsClipping() )
@@ -1695,7 +1695,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_ISECTRECTCLIPREGION_ACTION ):
+ case( MetaActionType::ISECTRECTCLIPREGION ):
{
MetaISectRectClipRegionAction* pAct = static_cast<MetaISectRectClipRegionAction*>(pAction);
Rectangle aRect( OutputDevice::LogicToLogic( pAct->GetRect(), aMapVDev->GetMapMode(), GetPrefMapMode() ) );
@@ -1706,7 +1706,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_ISECTREGIONCLIPREGION_ACTION ):
+ case( MetaActionType::ISECTREGIONCLIPREGION ):
{
MetaISectRegionClipRegionAction* pAct = static_cast<MetaISectRegionClipRegionAction*>(pAction);
Rectangle aRect( OutputDevice::LogicToLogic( pAct->GetRegion().GetBoundRect(), aMapVDev->GetMapMode(), GetPrefMapMode() ) );
@@ -1717,7 +1717,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_BMP_ACTION ):
+ case( MetaActionType::BMP ):
{
MetaBmpAction* pAct = static_cast<MetaBmpAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmap().GetSizePixel() ) );
@@ -1725,7 +1725,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_BMPEX_ACTION ):
+ case( MetaActionType::BMPEX ):
{
MetaBmpExAction* pAct = static_cast<MetaBmpExAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmapEx().GetSizePixel() ) );
@@ -1733,7 +1733,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_MASK_ACTION ):
+ case( MetaActionType::MASK ):
{
MetaMaskAction* pAct = static_cast<MetaMaskAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmap().GetSizePixel() ) );
@@ -1741,7 +1741,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_MASKSCALE_ACTION ):
+ case( MetaActionType::MASKSCALE ):
{
MetaMaskScalePartAction* pAct = static_cast<MetaMaskScalePartAction*>(pAction);
Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
@@ -1749,7 +1749,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_MASKSCALEPART_ACTION ):
+ case( MetaActionType::MASKSCALEPART ):
{
MetaMaskScalePartAction* pAct = static_cast<MetaMaskScalePartAction*>(pAction);
Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
@@ -1757,7 +1757,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_WALLPAPER_ACTION ):
+ case( MetaActionType::WALLPAPER ):
{
MetaWallpaperAction* pAct = static_cast<MetaWallpaperAction*>(pAction);
Rectangle aRect( pAct->GetRect() );
@@ -1765,7 +1765,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_TEXTRECT_ACTION ):
+ case( MetaActionType::TEXTRECT ):
{
MetaTextRectAction* pAct = static_cast<MetaTextRectAction*>(pAction);
Rectangle aRect( pAct->GetRect() );
@@ -1773,7 +1773,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
}
break;
- case( META_MOVECLIPREGION_ACTION ):
+ case( MetaActionType::MOVECLIPREGION ):
{
MetaMoveClipRegionAction* pAct = static_cast<MetaMoveClipRegionAction*>(pAction);
if( ! aClipStack.back().IsEmpty() )
@@ -1789,7 +1789,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
pAction->Execute( aMapVDev.get() );
- if( nActionType == META_PUSH_ACTION )
+ if( nActionType == MetaActionType::PUSH )
{
MetaPushAction* pAct = static_cast<MetaPushAction*>(pAction);
aPushFlagStack.push_back( pAct->GetFlags() );
@@ -1799,7 +1799,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
aClipStack.push_back( aRect );
}
}
- else if( nActionType == META_POP_ACTION )
+ else if( nActionType == MetaActionType::POP )
{
// sanity check
if( ! aPushFlagStack.empty() )
@@ -1924,18 +1924,18 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
for( MetaAction* pAction = FirstAction(); pAction; pAction = NextAction() )
{
- const sal_uInt16 nType = pAction->GetType();
+ const MetaActionType nType = pAction->GetType();
switch( nType )
{
- case( META_PIXEL_ACTION ):
+ case( MetaActionType::PIXEL ):
{
MetaPixelAction* pAct = static_cast<MetaPixelAction*>(pAction);
aMtf.push_back( new MetaPixelAction( pAct->GetPoint(), pFncCol( pAct->GetColor(), pColParam ) ) );
}
break;
- case( META_LINECOLOR_ACTION ):
+ case( MetaActionType::LINECOLOR ):
{
MetaLineColorAction* pAct = static_cast<MetaLineColorAction*>(pAction);
@@ -1948,7 +1948,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
- case( META_FILLCOLOR_ACTION ):
+ case( MetaActionType::FILLCOLOR ):
{
MetaFillColorAction* pAct = static_cast<MetaFillColorAction*>(pAction);
@@ -1961,14 +1961,14 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
- case( META_TEXTCOLOR_ACTION ):
+ case( MetaActionType::TEXTCOLOR ):
{
MetaTextColorAction* pAct = static_cast<MetaTextColorAction*>(pAction);
aMtf.push_back( new MetaTextColorAction( pFncCol( pAct->GetColor(), pColParam ) ) );
}
break;
- case( META_TEXTFILLCOLOR_ACTION ):
+ case( MetaActionType::TEXTFILLCOLOR ):
{
MetaTextFillColorAction* pAct = static_cast<MetaTextFillColorAction*>(pAction);
@@ -1981,7 +1981,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
- case( META_TEXTLINECOLOR_ACTION ):
+ case( MetaActionType::TEXTLINECOLOR ):
{
MetaTextLineColorAction* pAct = static_cast<MetaTextLineColorAction*>(pAction);
@@ -1994,7 +1994,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
- case( META_OVERLINECOLOR_ACTION ):
+ case( MetaActionType::OVERLINECOLOR ):
{
MetaOverlineColorAction* pAct = static_cast<MetaOverlineColorAction*>(pAction);
@@ -2007,7 +2007,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
- case( META_FONT_ACTION ):
+ case( MetaActionType::FONT ):
{
MetaFontAction* pAct = static_cast<MetaFontAction*>(pAction);
vcl::Font aFont( pAct->GetFont() );
@@ -2018,7 +2018,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
- case( META_WALLPAPER_ACTION ):
+ case( MetaActionType::WALLPAPER ):
{
MetaWallpaperAction* pAct = static_cast<MetaWallpaperAction*>(pAction);
Wallpaper aWall( pAct->GetWallpaper() );
@@ -2042,15 +2042,15 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
- case( META_BMP_ACTION ):
- case( META_BMPEX_ACTION ):
- case( META_MASK_ACTION ):
+ case( MetaActionType::BMP ):
+ case( MetaActionType::BMPEX ):
+ case( MetaActionType::MASK ):
{
OSL_FAIL( "Don't use bitmap actions of this type in metafiles!" );
}
break;
- case( META_BMPSCALE_ACTION ):
+ case( MetaActionType::BMPSCALE ):
{
MetaBmpScaleAction* pAct = static_cast<MetaBmpScaleAction*>(pAction);
aMtf.push_back( new MetaBmpScaleAction( pAct->GetPoint(), pAct->GetSize(),
@@ -2058,7 +2058,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
- case( META_BMPSCALEPART_ACTION ):
+ case( MetaActionType::BMPSCALEPART ):
{
MetaBmpScalePartAction* pAct = static_cast<MetaBmpScalePartAction*>(pAction);
aMtf.push_back( new MetaBmpScalePartAction( pAct->GetDestPoint(), pAct->GetDestSize(),
@@ -2068,7 +2068,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
- case( META_BMPEXSCALE_ACTION ):
+ case( MetaActionType::BMPEXSCALE ):
{
MetaBmpExScaleAction* pAct = static_cast<MetaBmpExScaleAction*>(pAction);
aMtf.push_back( new MetaBmpExScaleAction( pAct->GetPoint(), pAct->GetSize(),
@@ -2077,7 +2077,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
- case( META_BMPEXSCALEPART_ACTION ):
+ case( MetaActionType::BMPEXSCALEPART ):
{
MetaBmpExScalePartAction* pAct = static_cast<MetaBmpExScalePartAction*>(pAction);
aMtf.push_back( new MetaBmpExScalePartAction( pAct->GetDestPoint(), pAct->GetDestSize(),
@@ -2087,7 +2087,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
- case( META_MASKSCALE_ACTION ):
+ case( MetaActionType::MASKSCALE ):
{
MetaMaskScaleAction* pAct = static_cast<MetaMaskScaleAction*>(pAction);
aMtf.push_back( new MetaMaskScaleAction( pAct->GetPoint(), pAct->GetSize(),
@@ -2097,7 +2097,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
- case( META_MASKSCALEPART_ACTION ):
+ case( MetaActionType::MASKSCALEPART ):
{
MetaMaskScalePartAction* pAct = static_cast<MetaMaskScalePartAction*>(pAction);
aMtf.push_back( new MetaMaskScalePartAction( pAct->GetDestPoint(), pAct->GetDestSize(),
@@ -2108,7 +2108,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
- case( META_GRADIENT_ACTION ):
+ case( MetaActionType::GRADIENT ):
{
MetaGradientAction* pAct = static_cast<MetaGradientAction*>(pAction);
Gradient aGradient( pAct->GetGradient() );
@@ -2119,7 +2119,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
- case( META_GRADIENTEX_ACTION ):
+ case( MetaActionType::GRADIENTEX ):
{
MetaGradientExAction* pAct = static_cast<MetaGradientExAction*>(pAction);
Gradient aGradient( pAct->GetGradient() );
@@ -2130,7 +2130,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
- case( META_HATCH_ACTION ):
+ case( MetaActionType::HATCH ):
{
MetaHatchAction* pAct = static_cast<MetaHatchAction*>(pAction);
Hatch aHatch( pAct->GetHatch() );
@@ -2140,7 +2140,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
- case( META_FLOATTRANSPARENT_ACTION ):
+ case( MetaActionType::FLOATTRANSPARENT ):
{
MetaFloatTransparentAction* pAct = static_cast<MetaFloatTransparentAction*>(pAction);
GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
@@ -2153,7 +2153,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol
}
break;
- case( META_EPS_ACTION ):
+ case( MetaActionType::EPS ):
{
MetaEPSAction* pAct = static_cast<MetaEPSAction*>(pAction);
GDIMetaFile aSubst( pAct->GetSubstitute() );
@@ -2356,11 +2356,11 @@ sal_uLong GDIMetaFile::GetChecksum() const
switch( pAction->GetType() )
{
- case( META_BMP_ACTION ):
+ case( MetaActionType::BMP ):
{
MetaBmpAction* pAct = static_cast<MetaBmpAction*>(pAction);
- ShortToSVBT16( pAct->GetType(), aBT16 );
+ ShortToSVBT16( static_cast<sal_uInt16>(pAct->GetType()), aBT16 );
nCrc = rtl_crc32( nCrc, aBT16, 2 );
UInt32ToSVBT32( pAct->GetBitmap().GetChecksum(), aBT32 );
@@ -2374,11 +2374,11 @@ sal_uLong GDIMetaFile::GetChecksum() const
}
break;
- case( META_BMPSCALE_ACTION ):
+ case( MetaActionType::BMPSCALE ):
{
MetaBmpScaleAction* pAct = static_cast<MetaBmpScaleAction*>(pAction);
- ShortToSVBT16( pAct->GetType(), aBT16 );
+ ShortToSVBT16( static_cast<sal_uInt16>(pAct->GetType()), aBT16 );
nCrc = rtl_crc32( nCrc, aBT16, 2 );
UInt32ToSVBT32( pAct->GetBitmap().GetChecksum(), aBT32 );
@@ -2398,11 +2398,11 @@ sal_uLong GDIMetaFile::GetChecksum() const
}
break;
- case( META_BMPSCALEPART_ACTION ):
+ case( MetaActionType::BMPSCALEPART ):
{
MetaBmpScalePartAction* pAct = static_cast<MetaBmpScalePartAction*>(pAction);
- ShortToSVBT16( pAct->GetType(), aBT16 );
+ ShortToSVBT16( static_cast<sal_uInt16>(pAct->GetType()), aBT16 );
nCrc = rtl_crc32( nCrc, aBT16, 2 );
UInt32ToSVBT32( pAct->GetBitmap().GetChecksum(), aBT32 );
@@ -2434,11 +2434,11 @@ sal_uLong GDIMetaFile::GetChecksum() const
}
break;
- case( META_BMPEX_ACTION ):
+ case( MetaActionType::BMPEX ):
{
MetaBmpExAction* pAct = static_cast<MetaBmpExAction*>(pAction);
- ShortToSVBT16( pAct->GetType(), aBT16 );
+ ShortToSVBT16( static_cast<sal_uInt16>(pAct->GetType()), aBT16 );
nCrc = rtl_crc32( nCrc, aBT16, 2 );
UInt32ToSVBT32( pAct->GetBitmapEx().GetChecksum(), aBT32 );
@@ -2452,11 +2452,11 @@ sal_uLong GDIMetaFile::GetChecksum() const
}
break;
- case( META_BMPEXSCALE_ACTION ):
+ case( MetaActionType::BMPEXSCALE ):
{
MetaBmpExScaleAction* pAct = static_cast<MetaBmpExScaleAction*>(pAction);
- ShortToSVBT16( pAct->GetType(), aBT16 );
+ ShortToSVBT16( static_cast<sal_uInt16>(pAct->GetType()), aBT16 );
nCrc = rtl_crc32( nCrc, aBT16, 2 );
UInt32ToSVBT32( pAct->GetBitmapEx().GetChecksum(), aBT32 );
@@ -2476,11 +2476,11 @@ sal_uLong GDIMetaFile::GetChecksum() const
}
break;
- case( META_BMPEXSCALEPART_ACTION ):
+ case( MetaActionType::BMPEXSCALEPART ):
{
MetaBmpExScalePartAction* pAct = static_cast<MetaBmpExScalePartAction*>(pAction);
- ShortToSVBT16( pAct->GetType(), aBT16 );
+ ShortToSVBT16( static_cast<sal_uInt16>(pAct->GetType()), aBT16 );
nCrc = rtl_crc32( nCrc, aBT16, 2 );
UInt32ToSVBT32( pAct->GetBitmapEx().GetChecksum(), aBT32 );
@@ -2512,11 +2512,11 @@ sal_uLong GDIMetaFile::GetChecksum() const
}
break;
- case( META_MASK_ACTION ):
+ case( MetaActionType::MASK ):
{
MetaMaskAction* pAct = static_cast<MetaMaskAction*>(pAction);
- ShortToSVBT16( pAct->GetType(), aBT16 );
+ ShortToSVBT16( static_cast<sal_uInt16>(pAct->GetType()), aBT16 );
nCrc = rtl_crc32( nCrc, aBT16, 2 );
UInt32ToSVBT32( pAct->GetBitmap().GetChecksum(), aBT32 );
@@ -2533,11 +2533,11 @@ sal_uLong GDIMetaFile::GetChecksum() const
}
break;
- case( META_MASKSCALE_ACTION ):
+ case( MetaActionType::MASKSCALE ):
{
MetaMaskScaleAction* pAct = static_cast<MetaMaskScaleAction*>(pAction);
- ShortToSVBT16( pAct->GetType(), aBT16 );
+ ShortToSVBT16( static_cast<sal_uInt16>(pAct->GetType()), aBT16 );
nCrc = rtl_crc32( nCrc, aBT16, 2 );
UInt32ToSVBT32( pAct->GetBitmap().GetChecksum(), aBT32 );
@@ -2560,11 +2560,11 @@ sal_uLong GDIMetaFile::GetChecksum() const
}
break;
- case( META_MASKSCALEPART_ACTION ):
+ case( MetaActionType::MASKSCALEPART ):
{
MetaMaskScalePartAction* pAct = static_cast<MetaMaskScalePartAction*>(pAction);
- ShortToSVBT16( pAct->GetType(), aBT16 );
+ ShortToSVBT16( static_cast<sal_uInt16>(pAct->GetType()), aBT16 );
nCrc = rtl_crc32( nCrc, aBT16, 2 );
UInt32ToSVBT32( pAct->GetBitmap().GetChecksum(), aBT32 );
@@ -2599,14 +2599,14 @@ sal_uLong GDIMetaFile::GetChecksum() const
}
break;
- case META_EPS_ACTION :
+ case MetaActionType::EPS :
{
MetaEPSAction* pAct = static_cast<MetaEPSAction*>(pAction);
nCrc = rtl_crc32( nCrc, pAct->GetLink().GetData(), pAct->GetLink().GetDataSize() );
}
break;
- case META_CLIPREGION_ACTION :
+ case MetaActionType::CLIPREGION :
{
MetaClipRegionAction& rAct = static_cast<MetaClipRegionAction&>(*pAction);
const vcl::Region& rRegion = rAct.GetRegion();
@@ -2699,21 +2699,21 @@ sal_uLong GDIMetaFile::GetSizeBytes() const
// add sizes for large action content
switch( pAction->GetType() )
{
- case( META_BMP_ACTION ): nSizeBytes += static_cast<MetaBmpAction*>( pAction )->GetBitmap().GetSizeBytes(); break;
- case( META_BMPSCALE_ACTION ): nSizeBytes += static_cast<MetaBmpScaleAction*>( pAction )->GetBitmap().GetSizeBytes(); break;
- case( META_BMPSCALEPART_ACTION ): nSizeBytes += static_cast<MetaBmpScalePartAction*>( pAction )->GetBitmap().GetSizeBytes(); break;
+ case( MetaActionType::BMP ): nSizeBytes += static_cast<MetaBmpAction*>( pAction )->GetBitmap().GetSizeBytes(); break;
+ case( MetaActionType::BMPSCALE ): nSizeBytes += static_cast<MetaBmpScaleAction*>( pAction )->GetBitmap().GetSizeBytes(); break;
+ case( MetaActionType::BMPSCALEPART ): nSizeBytes += static_cast<MetaBmpScalePartAction*>( pAction )->GetBitmap().GetSizeBytes(); break;
- case( META_BMPEX_ACTION ): nSizeBytes += static_cast<MetaBmpExAction*>( pAction )->GetBitmapEx().GetSizeBytes(); break;
- case( META_BMPEXSCALE_ACTION ): nSizeBytes += static_cast<MetaBmpExScaleAction*>( pAction )->GetBitmapEx().GetSizeBytes(); break;
- case( META_BMPEXSCALEPART_ACTION ): nSizeBytes += static_cast<MetaBmpExScalePartAction*>( pAction )->GetBitmapEx().GetSizeBytes(); break;
+ case( MetaActionType::BMPEX ): nSizeBytes += static_cast<MetaBmpExAction*>( pAction )->GetBitmapEx().GetSizeBytes(); break;
+ case( MetaActionType::BMPEXSCALE ): nSizeBytes += static_cast<MetaBmpExScaleAction*>( pAction )->GetBitmapEx().GetSizeBytes(); break;
+ case( MetaActionType::BMPEXSCALEPART ): nSizeBytes += static_cast<MetaBmpExScalePartAction*>( pAction )->GetBitmapEx().GetSizeBytes(); break;
- case( META_MASK_ACTION ): nSizeBytes += static_cast<MetaMaskAction*>( pAction )->GetBitmap().GetSizeBytes(); break;
- case( META_MASKSCALE_ACTION ): nSizeBytes += static_cast<MetaMaskScaleAction*>( pAction )->GetBitmap().GetSizeBytes(); break;
- case( META_MASKSCALEPART_ACTION ): nSizeBytes += static_cast<MetaMaskScalePartAction*>( pAction )->GetBitmap().GetSizeBytes(); break;
+ case( MetaActionType::MASK ): nSizeBytes += static_cast<MetaMaskAction*>( pAction )->GetBitmap().GetSizeBytes(); break;
+ case( MetaActionType::MASKSCALE ): nSizeBytes += static_cast<MetaMaskScaleAction*>( pAction )->GetBitmap().GetSizeBytes(); break;
+ case( MetaActionType::MASKSCALEPART ): nSizeBytes += static_cast<MetaMaskScalePartAction*>( pAction )->GetBitmap().GetSizeBytes(); break;
- case( META_POLYLINE_ACTION ): nSizeBytes += static_cast<MetaPolyLineAction*>( pAction )->GetPolygon().GetSize() * sizeof( Point ); break;
- case( META_POLYGON_ACTION ): nSizeBytes += static_cast<MetaPolygonAction*>( pAction )->GetPolygon().GetSize() * sizeof( Point ); break;
- case( META_POLYPOLYGON_ACTION ):
+ case( MetaActionType::POLYLINE ): nSizeBytes += static_cast<MetaPolyLineAction*>( pAction )->GetPolygon().GetSize() * sizeof( Point ); break;
+ case( MetaActionType::POLYGON ): nSizeBytes += static_cast<MetaPolygonAction*>( pAction )->GetPolygon().GetSize() * sizeof( Point ); break;
+ case( MetaActionType::POLYPOLYGON ):
{
const tools::PolyPolygon& rPolyPoly = static_cast<MetaPolyPolygonAction*>( pAction )->GetPolyPolygon();
@@ -2722,10 +2722,10 @@ sal_uLong GDIMetaFile::GetSizeBytes() const
}
break;
- case( META_TEXT_ACTION ): nSizeBytes += static_cast<MetaTextAction*>( pAction )->GetText().getLength() * sizeof( sal_Unicode ); break;
- case( META_STRETCHTEXT_ACTION ): nSizeBytes += static_cast<MetaStretchTextAction*>( pAction )->GetText().getLength() * sizeof( sal_Unicode ); break;
- case( META_TEXTRECT_ACTION ): nSizeBytes += static_cast<MetaTextRectAction*>( pAction )->GetText().getLength() * sizeof( sal_Unicode ); break;
- case( META_TEXTARRAY_ACTION ):
+ case( MetaActionType::TEXT ): nSizeBytes += static_cast<MetaTextAction*>( pAction )->GetText().getLength() * sizeof( sal_Unicode ); break;
+ case( MetaActionType::STRETCHTEXT ): nSizeBytes += static_cast<MetaStretchTextAction*>( pAction )->GetText().getLength() * sizeof( sal_Unicode ); break;
+ case( MetaActionType::TEXTRECT ): nSizeBytes += static_cast<MetaTextRectAction*>( pAction )->GetText().getLength() * sizeof( sal_Unicode ); break;
+ case( MetaActionType::TEXTARRAY ):
{
MetaTextArrayAction* pTextArrayAction = static_cast<MetaTextArrayAction*>(pAction);
@@ -2735,6 +2735,7 @@ sal_uLong GDIMetaFile::GetSizeBytes() const
nSizeBytes += ( pTextArrayAction->GetLen() << 2 );
}
break;
+ default: break;
}
}
@@ -2781,7 +2782,7 @@ SvStream& ReadGDIMetaFile( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
if( pAction )
{
- if (pAction->GetType() == META_COMMENT_ACTION)
+ if (pAction->GetType() == MetaActionType::COMMENT)
{
MetaCommentAction* pCommentAct = static_cast<MetaCommentAction*>(pAction);
if ( pCommentAct->GetComment() == "EMF_PLUS" )
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 7758c6d32161..a96bb61654a9 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -439,7 +439,7 @@ bool ImpGraphic::ImplIsEPS() const
{
return( ( meType == GRAPHIC_GDIMETAFILE ) &&
( maMetaFile.GetActionSize() > 0 ) &&
- ( maMetaFile.GetAction( 0 )->GetType() == META_EPS_ACTION ) );
+ ( maMetaFile.GetAction( 0 )->GetType() == MetaActionType::EPS ) );
}
Bitmap ImpGraphic::ImplGetBitmap(const GraphicConversionParameters& rParameters) const
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 870195925a79..604aaa9861ed 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -35,7 +35,7 @@ namespace
{
const char *
-meta_action_name(sal_uInt16 nMetaAction)
+meta_action_name(MetaActionType nMetaAction)
{
#ifndef SAL_LOG_INFO
(void) nMetaAction;
@@ -43,60 +43,60 @@ meta_action_name(sal_uInt16 nMetaAction)
#else
switch( nMetaAction )
{
- case META_NULL_ACTION: return "NULL";
- case META_PIXEL_ACTION: return "PIXEL";
- case META_POINT_ACTION: return "POINT";
- case META_LINE_ACTION: return "LINE";
- case META_RECT_ACTION: return "RECT";
- case META_ROUNDRECT_ACTION: return "ROUNDRECT";
- case META_ELLIPSE_ACTION: return "ELLIPSE";
- case META_ARC_ACTION: return "ARC";
- case META_PIE_ACTION: return "PIE";
- case META_CHORD_ACTION: return "CHORD";
- case META_POLYLINE_ACTION: return "POLYLINE";
- case META_POLYGON_ACTION: return "POLYGON";
- case META_POLYPOLYGON_ACTION: return "POLYPOLYGON";
- case META_TEXT_ACTION: return "TEXT";
- case META_TEXTARRAY_ACTION: return "TEXTARRAY";
- case META_STRETCHTEXT_ACTION: return "STRETCHTEXT";
- case META_TEXTRECT_ACTION: return "TEXTRECT";
- case META_BMP_ACTION: return "BMP";
- case META_BMPSCALE_ACTION: return "BMPSCALE";
- case META_BMPSCALEPART_ACTION: return "BMPSCALEPART";
- case META_BMPEX_ACTION: return "BMPEX";
- case META_BMPEXSCALE_ACTION: return "BMPEXSCALE";
- case META_BMPEXSCALEPART_ACTION: return "BMPEXSCALEPART";
- case META_MASK_ACTION: return "MASK";
- case META_MASKSCALE_ACTION: return "MASKSCALE";
- case META_MASKSCALEPART_ACTION: return "MASKSCALEPART";
- case META_GRADIENT_ACTION: return "GRADIENT";
- case META_HATCH_ACTION: return "HATCH";
- case META_WALLPAPER_ACTION: return "WALLPAPER";
- case META_CLIPREGION_ACTION: return "CLIPREGION";
- case META_ISECTRECTCLIPREGION_ACTION: return "ISECTRECTCLIPREGION";
- case META_ISECTREGIONCLIPREGION_ACTION: return "ISECTREGIONCLIPREGION";
- case META_MOVECLIPREGION_ACTION: return "MOVECLIPREGION";
- case META_LINECOLOR_ACTION: return "LINECOLOR";
- case META_FILLCOLOR_ACTION: return "FILLCOLOR";
- case META_TEXTCOLOR_ACTION: return "TEXTCOLOR";
- case META_TEXTFILLCOLOR_ACTION: return "TEXTFILLCOLOR";
- case META_TEXTALIGN_ACTION: return "TEXTALIGN";
- case META_MAPMODE_ACTION: return "MAPMODE";
- case META_FONT_ACTION: return "FONT";
- case META_PUSH_ACTION: return "PUSH";
- case META_POP_ACTION: return "POP";
- case META_RASTEROP_ACTION: return "RASTEROP";
- case META_TRANSPARENT_ACTION: return "TRANSPARENT";
- case META_EPS_ACTION: return "EPS";
- case META_REFPOINT_ACTION: return "REFPOINT";
- case META_TEXTLINECOLOR_ACTION: return "TEXTLINECOLOR";
- case META_TEXTLINE_ACTION: return "TEXTLINE";
- case META_FLOATTRANSPARENT_ACTION: return "FLOATTRANSPARENT";
- case META_GRADIENTEX_ACTION: return "GRADIENTEX";
- case META_LAYOUTMODE_ACTION: return "LAYOUTMODE";
- case META_TEXTLANGUAGE_ACTION: return "TEXTLANGUAGE";
- case META_OVERLINECOLOR_ACTION: return "OVERLINECOLOR";
- case META_COMMENT_ACTION: return "COMMENT";
+ case MetaActionType::NONE: return "NULL";
+ case MetaActionType::PIXEL: return "PIXEL";
+ case MetaActionType::POINT: return "POINT";
+ case MetaActionType::LINE: return "LINE";
+ case MetaActionType::RECT: return "RECT";
+ case MetaActionType::ROUNDRECT: return "ROUNDRECT";
+ case MetaActionType::ELLIPSE: return "ELLIPSE";
+ case MetaActionType::ARC: return "ARC";
+ case MetaActionType::PIE: return "PIE";
+ case MetaActionType::CHORD: return "CHORD";
+ case MetaActionType::POLYLINE: return "POLYLINE";
+ case MetaActionType::POLYGON: return "POLYGON";
+ case MetaActionType::POLYPOLYGON: return "POLYPOLYGON";
+ case MetaActionType::TEXT: return "TEXT";
+ case MetaActionType::TEXTARRAY: return "TEXTARRAY";
+ case MetaActionType::STRETCHTEXT: return "STRETCHTEXT";
+ case MetaActionType::TEXTRECT: return "TEXTRECT";
+ case MetaActionType::BMP: return "BMP";
+ case MetaActionType::BMPSCALE: return "BMPSCALE";
+ case MetaActionType::BMPSCALEPART: return "BMPSCALEPART";
+ case MetaActionType::BMPEX: return "BMPEX";
+ case MetaActionType::BMPEXSCALE: return "BMPEXSCALE";
+ case MetaActionType::BMPEXSCALEPART: return "BMPEXSCALEPART";
+ case MetaActionType::MASK: return "MASK";
+ case MetaActionType::MASKSCALE: return "MASKSCALE";
+ case MetaActionType::MASKSCALEPART: return "MASKSCALEPART";
+ case MetaActionType::GRADIENT: return "GRADIENT";
+ case MetaActionType::HATCH: return "HATCH";
+ case MetaActionType::WALLPAPER: return "WALLPAPER";
+ case MetaActionType::CLIPREGION: return "CLIPREGION";
+ case MetaActionType::ISECTRECTCLIPREGION: return "ISECTRECTCLIPREGION";
+ case MetaActionType::ISECTREGIONCLIPREGION: return "ISECTREGIONCLIPREGION";
+ case MetaActionType::MOVECLIPREGION: return "MOVECLIPREGION";
+ case MetaActionType::LINECOLOR: return "LINECOLOR";
+ case MetaActionType::FILLCOLOR: return "FILLCOLOR";
+ case MetaActionType::TEXTCOLOR: return "TEXTCOLOR";
+ case MetaActionType::TEXTFILLCOLOR: return "TEXTFILLCOLOR";
+ case MetaActionType::TEXTALIGN: return "TEXTALIGN";
+ case MetaActionType::MAPMODE: return "MAPMODE";
+ case MetaActionType::FONT: return "FONT";
+ case MetaActionType::PUSH: return "PUSH";
+ case MetaActionType::POP: return "POP";
+ case MetaActionType::RASTEROP: return "RASTEROP";
+ case MetaActionType::TRANSPARENT: return "TRANSPARENT";
+ case MetaActionType::EPS: return "EPS";
+ case MetaActionType::REFPOINT: return "REFPOINT";
+ case MetaActionType::TEXTLINECOLOR: return "TEXTLINECOLOR";
+ case MetaActionType::TEXTLINE: return "TEXTLINE";
+ case MetaActionType::FLOATTRANSPARENT: return "FLOATTRANSPARENT";
+ case MetaActionType::GRADIENTEX: return "GRADIENTEX";
+ case MetaActionType::LAYOUTMODE: return "LAYOUTMODE";
+ case MetaActionType::TEXTLANGUAGE: return "TEXTLANGUAGE";
+ case MetaActionType::OVERLINECOLOR: return "OVERLINECOLOR";
+ case MetaActionType::COMMENT: return "COMMENT";
default:
// Yes, return a pointer to a static buffer. This is a very
// local debugging output function, so no big deal.
@@ -148,11 +148,11 @@ inline void ImplScaleLineInfo( LineInfo& rLineInfo, double fScaleX, double fScal
MetaAction::MetaAction() :
mnRefCount( 1 ),
- mnType( META_NULL_ACTION )
+ mnType( MetaActionType::NONE )
{
}
-MetaAction::MetaAction( sal_uInt16 nType ) :
+MetaAction::MetaAction( MetaActionType nType ) :
mnRefCount( 1 ),
mnType( nType )
{
@@ -186,7 +186,7 @@ bool MetaAction::Compare( const MetaAction& ) const
void MetaAction::Write( SvStream& rOStm, ImplMetaWriteData* )
{
- rOStm.WriteUInt16( mnType );
+ rOStm.WriteUInt16( static_cast<sal_uInt16>(mnType) );
}
void MetaAction::Read( SvStream&, ImplMetaReadData* )
@@ -197,68 +197,68 @@ void MetaAction::Read( SvStream&, ImplMetaReadData* )
MetaAction* MetaAction::ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData )
{
MetaAction* pAction = NULL;
- sal_uInt16 nType = 0;
-
- rIStm.ReadUInt16( nType );
+ sal_uInt16 nTmp = 0;
+ rIStm.ReadUInt16( nTmp );
+ MetaActionType nType = static_cast<MetaActionType>(nTmp);
SAL_INFO("vcl.gdi", "ReadMetaAction " << meta_action_name( nType ));
switch( nType )
{
- case META_NULL_ACTION: pAction = new MetaAction; break;
- case META_PIXEL_ACTION: pAction = new MetaPixelAction; break;
- case META_POINT_ACTION: pAction = new MetaPointAction; break;
- case META_LINE_ACTION: pAction = new MetaLineAction; break;
- case META_RECT_ACTION: pAction = new MetaRectAction; break;
- case META_ROUNDRECT_ACTION: pAction = new MetaRoundRectAction; break;
- case META_ELLIPSE_ACTION: pAction = new MetaEllipseAction; break;
- case META_ARC_ACTION: pAction = new MetaArcAction; break;
- case META_PIE_ACTION: pAction = new MetaPieAction; break;
- case META_CHORD_ACTION: pAction = new MetaChordAction; break;
- case META_POLYLINE_ACTION: pAction = new MetaPolyLineAction; break;
- case META_POLYGON_ACTION: pAction = new MetaPolygonAction; break;
- case META_POLYPOLYGON_ACTION: pAction = new MetaPolyPolygonAction; break;
- case META_TEXT_ACTION: pAction = new MetaTextAction; break;
- case META_TEXTARRAY_ACTION: pAction = new MetaTextArrayAction; break;
- case META_STRETCHTEXT_ACTION: pAction = new MetaStretchTextAction; break;
- case META_TEXTRECT_ACTION: pAction = new MetaTextRectAction; break;
- case META_TEXTLINE_ACTION: pAction = new MetaTextLineAction; break;
- case META_BMP_ACTION: pAction = new MetaBmpAction; break;
- case META_BMPSCALE_ACTION: pAction = new MetaBmpScaleAction; break;
- case META_BMPSCALEPART_ACTION: pAction = new MetaBmpScalePartAction; break;
- case META_BMPEX_ACTION: pAction = new MetaBmpExAction; break;
- case META_BMPEXSCALE_ACTION: pAction = new MetaBmpExScaleAction; break;
- case META_BMPEXSCALEPART_ACTION: pAction = new MetaBmpExScalePartAction; break;
- case META_MASK_ACTION: pAction = new MetaMaskAction; break;
- case META_MASKSCALE_ACTION: pAction = new MetaMaskScaleAction; break;
- case META_MASKSCALEPART_ACTION: pAction = new MetaMaskScalePartAction; break;
- case META_GRADIENT_ACTION: pAction = new MetaGradientAction; break;
- case META_GRADIENTEX_ACTION: pAction = new MetaGradientExAction; break;
- case META_HATCH_ACTION: pAction = new MetaHatchAction; break;
- case META_WALLPAPER_ACTION: pAction = new MetaWallpaperAction; break;
- case META_CLIPREGION_ACTION: pAction = new MetaClipRegionAction; break;
- case META_ISECTRECTCLIPREGION_ACTION: pAction = new MetaISectRectClipRegionAction; break;
- case META_ISECTREGIONCLIPREGION_ACTION: pAction = new MetaISectRegionClipRegionAction; break;
- case META_MOVECLIPREGION_ACTION: pAction = new MetaMoveClipRegionAction; break;
- case META_LINECOLOR_ACTION: pAction = new MetaLineColorAction; break;
- case META_FILLCOLOR_ACTION: pAction = new MetaFillColorAction; break;
- case META_TEXTCOLOR_ACTION: pAction = new MetaTextColorAction; break;
- case META_TEXTFILLCOLOR_ACTION: pAction = new MetaTextFillColorAction; break;
- case META_TEXTLINECOLOR_ACTION: pAction = new MetaTextLineColorAction; break;
- case META_OVERLINECOLOR_ACTION: pAction = new MetaOverlineColorAction; break;
- case META_TEXTALIGN_ACTION: pAction = new MetaTextAlignAction; break;
- case META_MAPMODE_ACTION: pAction = new MetaMapModeAction; break;
- case META_FONT_ACTION: pAction = new MetaFontAction; break;
- case META_PUSH_ACTION: pAction = new MetaPushAction; break;
- case META_POP_ACTION: pAction = new MetaPopAction; break;
- case META_RASTEROP_ACTION: pAction = new MetaRasterOpAction; break;
- case META_TRANSPARENT_ACTION: pAction = new MetaTransparentAction; break;
- case META_FLOATTRANSPARENT_ACTION: pAction = new MetaFloatTransparentAction; break;
- case META_EPS_ACTION: pAction = new MetaEPSAction; break;
- case META_REFPOINT_ACTION: pAction = new MetaRefPointAction; break;
- case META_COMMENT_ACTION: pAction = new MetaCommentAction; break;
- case META_LAYOUTMODE_ACTION: pAction = new MetaLayoutModeAction; break;
- case META_TEXTLANGUAGE_ACTION: pAction = new MetaTextLanguageAction; break;
+ case MetaActionType::NONE: pAction = new MetaAction; break;
+ case MetaActionType::PIXEL: pAction = new MetaPixelAction; break;
+ case MetaActionType::POINT: pAction = new MetaPointAction; break;
+ case MetaActionType::LINE: pAction = new MetaLineAction; break;
+ case MetaActionType::RECT: pAction = new MetaRectAction; break;
+ case MetaActionType::ROUNDRECT: pAction = new MetaRoundRectAction; break;
+ case MetaActionType::ELLIPSE: pAction = new MetaEllipseAction; break;
+ case MetaActionType::ARC: pAction = new MetaArcAction; break;
+ case MetaActionType::PIE: pAction = new MetaPieAction; break;
+ case MetaActionType::CHORD: pAction = new MetaChordAction; break;
+ case MetaActionType::POLYLINE: pAction = new MetaPolyLineAction; break;
+ case MetaActionType::POLYGON: pAction = new MetaPolygonAction; break;
+ case MetaActionType::POLYPOLYGON: pAction = new MetaPolyPolygonAction; break;
+ case MetaActionType::TEXT: pAction = new MetaTextAction; break;
+ case MetaActionType::TEXTARRAY: pAction = new MetaTextArrayAction; break;
+ case MetaActionType::STRETCHTEXT: pAction = new MetaStretchTextAction; break;
+ case MetaActionType::TEXTRECT: pAction = new MetaTextRectAction; break;
+ case MetaActionType::TEXTLINE: pAction = new MetaTextLineAction; break;
+ case MetaActionType::BMP: pAction = new MetaBmpAction; break;
+ case MetaActionType::BMPSCALE: pAction = new MetaBmpScaleAction; break;
+ case MetaActionType::BMPSCALEPART: pAction = new MetaBmpScalePartAction; break;
+ case MetaActionType::BMPEX: pAction = new MetaBmpExAction; break;
+ case MetaActionType::BMPEXSCALE: pAction = new MetaBmpExScaleAction; break;
+ case MetaActionType::BMPEXSCALEPART: pAction = new MetaBmpExScalePartAction; break;
+ case MetaActionType::MASK: pAction = new MetaMaskAction; break;
+ case MetaActionType::MASKSCALE: pAction = new MetaMaskScaleAction; break;
+ case MetaActionType::MASKSCALEPART: pAction = new MetaMaskScalePartAction; break;
+ case MetaActionType::GRADIENT: pAction = new MetaGradientAction; break;
+ case MetaActionType::GRADIENTEX: pAction = new MetaGradientExAction; break;
+ case MetaActionType::HATCH: pAction = new MetaHatchAction; break;
+ case MetaActionType::WALLPAPER: pAction = new MetaWallpaperAction; break;
+ case MetaActionType::CLIPREGION: pAction = new MetaClipRegionAction; break;
+ case MetaActionType::ISECTRECTCLIPREGION: pAction = new MetaISectRectClipRegionAction; break;
+ case MetaActionType::ISECTREGIONCLIPREGION: pAction = new MetaISectRegionClipRegionAction; break;
+ case MetaActionType::MOVECLIPREGION: pAction = new MetaMoveClipRegionAction; break;
+ case MetaActionType::LINECOLOR: pAction = new MetaLineColorAction; break;
+ case MetaActionType::FILLCOLOR: pAction = new MetaFillColorAction; break;
+ case MetaActionType::TEXTCOLOR: pAction = new MetaTextColorAction; break;
+ case MetaActionType::TEXTFILLCOLOR: pAction = new MetaTextFillColorAction; break;
+ case MetaActionType::TEXTLINECOLOR: pAction = new MetaTextLineColorAction; break;
+ case MetaActionType::OVERLINECOLOR: pAction = new MetaOverlineColorAction; break;
+ case MetaActionType::TEXTALIGN: pAction = new MetaTextAlignAction; break;
+ case MetaActionType::MAPMODE: pAction = new MetaMapModeAction; break;
+ case MetaActionType::FONT: pAction = new MetaFontAction; break;
+ case MetaActionType::PUSH: pAction = new MetaPushAction; break;
+ case MetaActionType::POP: pAction = new MetaPopAction; break;
+ case MetaActionType::RASTEROP: pAction = new MetaRasterOpAction; break;
+ case MetaActionType::TRANSPARENT: pAction = new MetaTransparentAction; break;
+ case MetaActionType::FLOATTRANSPARENT: pAction = new MetaFloatTransparentAction; break;
+ case MetaActionType::EPS: pAction = new MetaEPSAction; break;
+ case MetaActionType::REFPOINT: pAction = new MetaRefPointAction; break;
+ case MetaActionType::COMMENT: pAction = new MetaCommentAction; break;
+ case MetaActionType::LAYOUTMODE: pAction = new MetaLayoutModeAction; break;
+ case MetaActionType::TEXTLANGUAGE: pAction = new MetaTextLanguageAction; break;
default:
{
@@ -274,14 +274,14 @@ MetaAction* MetaAction::ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData
}
MetaPixelAction::MetaPixelAction() :
- MetaAction(META_PIXEL_ACTION)
+ MetaAction(MetaActionType::PIXEL)
{}
MetaPixelAction::~MetaPixelAction()
{}
MetaPixelAction::MetaPixelAction( const Point& rPt, const Color& rColor ) :
- MetaAction ( META_PIXEL_ACTION ),
+ MetaAction ( MetaActionType::PIXEL ),
maPt ( rPt ),
maColor ( rColor )
{}
@@ -330,14 +330,14 @@ void MetaPixelAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaPointAction::MetaPointAction() :
- MetaAction(META_POINT_ACTION)
+ MetaAction(MetaActionType::POINT)
{}
MetaPointAction::~MetaPointAction()
{}
MetaPointAction::MetaPointAction( const Point& rPt ) :
- MetaAction ( META_POINT_ACTION ),
+ MetaAction ( MetaActionType::POINT ),
maPt ( rPt )
{}
@@ -382,21 +382,21 @@ void MetaPointAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaLineAction::MetaLineAction() :
- MetaAction(META_LINE_ACTION)
+ MetaAction(MetaActionType::LINE)
{}
MetaLineAction::~MetaLineAction()
{}
MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd ) :
- MetaAction ( META_LINE_ACTION ),
+ MetaAction ( MetaActionType::LINE ),
maStartPt ( rStart ),
maEndPt ( rEnd )
{}
MetaLineAction::MetaLineAction( const Point& rStart, const Point& rEnd,
const LineInfo& rLineInfo ) :
- MetaAction ( META_LINE_ACTION ),
+ MetaAction ( MetaActionType::LINE ),
maLineInfo ( rLineInfo ),
maStartPt ( rStart ),
maEndPt ( rEnd )
@@ -463,14 +463,14 @@ void MetaLineAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaRectAction::MetaRectAction() :
- MetaAction(META_RECT_ACTION)
+ MetaAction(MetaActionType::RECT)
{}
MetaRectAction::~MetaRectAction()
{}
MetaRectAction::MetaRectAction( const Rectangle& rRect ) :
- MetaAction ( META_RECT_ACTION ),
+ MetaAction ( MetaActionType::RECT ),
maRect ( rRect )
{}
@@ -515,7 +515,7 @@ void MetaRectAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaRoundRectAction::MetaRoundRectAction() :
- MetaAction ( META_ROUNDRECT_ACTION ),
+ MetaAction ( MetaActionType::ROUNDRECT ),
mnHorzRound ( 0 ),
mnVertRound ( 0 )
{}
@@ -525,7 +525,7 @@ MetaRoundRectAction::~MetaRoundRectAction()
MetaRoundRectAction::MetaRoundRectAction( const Rectangle& rRect,
sal_uInt32 nHorzRound, sal_uInt32 nVertRound ) :
- MetaAction ( META_ROUNDRECT_ACTION ),
+ MetaAction ( MetaActionType::ROUNDRECT ),
maRect ( rRect ),
mnHorzRound ( nHorzRound ),
mnVertRound ( nVertRound )
@@ -577,14 +577,14 @@ void MetaRoundRectAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaEllipseAction::MetaEllipseAction() :
- MetaAction(META_ELLIPSE_ACTION)
+ MetaAction(MetaActionType::ELLIPSE)
{}
MetaEllipseAction::~MetaEllipseAction()
{}
MetaEllipseAction::MetaEllipseAction( const Rectangle& rRect ) :
- MetaAction ( META_ELLIPSE_ACTION ),
+ MetaAction ( MetaActionType::ELLIPSE ),
maRect ( rRect )
{}
@@ -629,7 +629,7 @@ void MetaEllipseAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaArcAction::MetaArcAction() :
- MetaAction(META_ARC_ACTION)
+ MetaAction(MetaActionType::ARC)
{}
MetaArcAction::~MetaArcAction()
@@ -637,7 +637,7 @@ MetaArcAction::~MetaArcAction()
MetaArcAction::MetaArcAction( const Rectangle& rRect,
const Point& rStart, const Point& rEnd ) :
- MetaAction ( META_ARC_ACTION ),
+ MetaAction ( MetaActionType::ARC ),
maRect ( rRect ),
maStartPt ( rStart ),
maEndPt ( rEnd )
@@ -694,7 +694,7 @@ void MetaArcAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaPieAction::MetaPieAction() :
- MetaAction(META_PIE_ACTION)
+ MetaAction(MetaActionType::PIE)
{}
MetaPieAction::~MetaPieAction()
@@ -702,7 +702,7 @@ MetaPieAction::~MetaPieAction()
MetaPieAction::MetaPieAction( const Rectangle& rRect,
const Point& rStart, const Point& rEnd ) :
- MetaAction ( META_PIE_ACTION ),
+ MetaAction ( MetaActionType::PIE ),
maRect ( rRect ),
maStartPt ( rStart ),
maEndPt ( rEnd )
@@ -759,7 +759,7 @@ void MetaPieAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaChordAction::MetaChordAction() :
- MetaAction(META_CHORD_ACTION)
+ MetaAction(MetaActionType::CHORD)
{}
MetaChordAction::~MetaChordAction()
@@ -767,7 +767,7 @@ MetaChordAction::~MetaChordAction()
MetaChordAction::MetaChordAction( const Rectangle& rRect,
const Point& rStart, const Point& rEnd ) :
- MetaAction ( META_CHORD_ACTION ),
+ MetaAction ( MetaActionType::CHORD ),
maRect ( rRect ),
maStartPt ( rStart ),
maEndPt ( rEnd )
@@ -824,19 +824,19 @@ void MetaChordAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaPolyLineAction::MetaPolyLineAction() :
- MetaAction(META_POLYLINE_ACTION)
+ MetaAction(MetaActionType::POLYLINE)
{}
MetaPolyLineAction::~MetaPolyLineAction()
{}
MetaPolyLineAction::MetaPolyLineAction( const Polygon& rPoly ) :
- MetaAction ( META_POLYLINE_ACTION ),
+ MetaAction ( MetaActionType::POLYLINE ),
maPoly ( rPoly )
{}
MetaPolyLineAction::MetaPolyLineAction( const Polygon& rPoly, const LineInfo& rLineInfo ) :
- MetaAction ( META_POLYLINE_ACTION ),
+ MetaAction ( MetaActionType::POLYLINE ),
maLineInfo ( rLineInfo ),
maPoly ( rPoly )
{}
@@ -915,14 +915,14 @@ void MetaPolyLineAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaPolygonAction::MetaPolygonAction() :
- MetaAction(META_POLYGON_ACTION)
+ MetaAction(MetaActionType::POLYGON)
{}
MetaPolygonAction::~MetaPolygonAction()
{}
MetaPolygonAction::MetaPolygonAction( const Polygon& rPoly ) :
- MetaAction ( META_POLYGON_ACTION ),
+ MetaAction ( MetaActionType::POLYGON ),
maPoly ( rPoly )
{}
@@ -984,14 +984,14 @@ void MetaPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaPolyPolygonAction::MetaPolyPolygonAction() :
- MetaAction(META_POLYPOLYGON_ACTION)
+ MetaAction(MetaActionType::POLYPOLYGON)
{}
MetaPolyPolygonAction::~MetaPolyPolygonAction()
{}
MetaPolyPolygonAction::MetaPolyPolygonAction( const tools::PolyPolygon& rPolyPoly ) :
- MetaAction ( META_POLYPOLYGON_ACTION ),
+ MetaAction ( MetaActionType::POLYPOLYGON ),
maPolyPoly ( rPolyPoly )
{}
@@ -1091,7 +1091,7 @@ void MetaPolyPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaTextAction::MetaTextAction() :
- MetaAction ( META_TEXT_ACTION ),
+ MetaAction ( MetaActionType::TEXT ),
mnIndex ( 0 ),
mnLen ( 0 )
{}
@@ -1101,7 +1101,7 @@ MetaTextAction::~MetaTextAction()
MetaTextAction::MetaTextAction( const Point& rPt, const OUString& rStr,
sal_Int32 nIndex, sal_Int32 nLen ) :
- MetaAction ( META_TEXT_ACTION ),
+ MetaAction ( MetaActionType::TEXT ),
maPt ( rPt ),
maStr ( rStr ),
mnIndex ( nIndex ),
@@ -1167,14 +1167,14 @@ void MetaTextAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
}
MetaTextArrayAction::MetaTextArrayAction() :
- MetaAction ( META_TEXTARRAY_ACTION ),
+ MetaAction ( MetaActionType::TEXTARRAY ),
mpDXAry ( NULL ),
mnIndex ( 0 ),
mnLen ( 0 )
{}
MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
- MetaAction ( META_TEXTARRAY_ACTION ),
+ MetaAction ( MetaActionType::TEXTARRAY ),
maStartPt ( rAction.maStartPt ),
maStr ( rAction.maStr ),
mnIndex ( rAction.mnIndex ),
@@ -1196,7 +1196,7 @@ MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
const long* pDXAry,
sal_Int32 nIndex,
sal_Int32 nLen ) :
- MetaAction ( META_TEXTARRAY_ACTION ),
+ MetaAction ( MetaActionType::TEXTARRAY ),
maStartPt ( rStartPt ),
maStr ( rStr ),
mnIndex ( nIndex ),
@@ -1338,7 +1338,7 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
}
MetaStretchTextAction::MetaStretchTextAction() :
- MetaAction ( META_STRETCHTEXT_ACTION ),
+ MetaAction ( MetaActionType::STRETCHTEXT ),
mnWidth ( 0 ),
mnIndex ( 0 ),
mnLen ( 0 )
@@ -1350,7 +1350,7 @@ MetaStretchTextAction::~MetaStretchTextAction()
MetaStretchTextAction::MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth,
const OUString& rStr,
sal_Int32 nIndex, sal_Int32 nLen ) :
- MetaAction ( META_STRETCHTEXT_ACTION ),
+ MetaAction ( MetaActionType::STRETCHTEXT ),
maPt ( rPt ),
maStr ( rStr ),
mnWidth ( nWidth ),
@@ -1421,7 +1421,7 @@ void MetaStretchTextAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
}
MetaTextRectAction::MetaTextRectAction() :
- MetaAction ( META_TEXTRECT_ACTION ),
+ MetaAction ( MetaActionType::TEXTRECT ),
mnStyle ( 0 )
{}
@@ -1430,7 +1430,7 @@ MetaTextRectAction::~MetaTextRectAction()
MetaTextRectAction::MetaTextRectAction( const Rectangle& rRect,
const OUString& rStr, sal_uInt16 nStyle ) :
- MetaAction ( META_TEXTRECT_ACTION ),
+ MetaAction ( MetaActionType::TEXTRECT ),
maRect ( rRect ),
maStr ( rStr ),
mnStyle ( nStyle )
@@ -1488,7 +1488,7 @@ void MetaTextRectAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
}
MetaTextLineAction::MetaTextLineAction() :
- MetaAction ( META_TEXTLINE_ACTION ),
+ MetaAction ( MetaActionType::TEXTLINE ),
mnWidth ( 0 ),
meStrikeout ( STRIKEOUT_NONE ),
meUnderline ( UNDERLINE_NONE ),
@@ -1502,7 +1502,7 @@ MetaTextLineAction::MetaTextLineAction( const Point& rPos, long nWidth,
FontStrikeout eStrikeout,
FontUnderline eUnderline,
FontUnderline eOverline ) :
- MetaAction ( META_TEXTLINE_ACTION ),
+ MetaAction ( MetaActionType::TEXTLINE ),
maPos ( rPos ),
mnWidth ( nWidth ),
meStrikeout ( eStrikeout ),
@@ -1577,14 +1577,14 @@ void MetaTextLineAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaBmpAction::MetaBmpAction() :
- MetaAction(META_BMP_ACTION)
+ MetaAction(MetaActionType::BMP)
{}
MetaBmpAction::~MetaBmpAction()
{}
MetaBmpAction::MetaBmpAction( const Point& rPt, const Bitmap& rBmp ) :
- MetaAction ( META_BMP_ACTION ),
+ MetaAction ( MetaActionType::BMP ),
maBmp ( rBmp ),
maPt ( rPt )
{}
@@ -1636,7 +1636,7 @@ void MetaBmpAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaBmpScaleAction::MetaBmpScaleAction() :
- MetaAction(META_BMPSCALE_ACTION)
+ MetaAction(MetaActionType::BMPSCALE)
{}
MetaBmpScaleAction::~MetaBmpScaleAction()
@@ -1644,7 +1644,7 @@ MetaBmpScaleAction::~MetaBmpScaleAction()
MetaBmpScaleAction::MetaBmpScaleAction( const Point& rPt, const Size& rSz,
const Bitmap& rBmp ) :
- MetaAction ( META_BMPSCALE_ACTION ),
+ MetaAction ( MetaActionType::BMPSCALE ),
maBmp ( rBmp ),
maPt ( rPt ),
maSz ( rSz )
@@ -1703,7 +1703,7 @@ void MetaBmpScaleAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaBmpScalePartAction::MetaBmpScalePartAction() :
- MetaAction(META_BMPSCALEPART_ACTION)
+ MetaAction(MetaActionType::BMPSCALEPART)
{}
MetaBmpScalePartAction::~MetaBmpScalePartAction()
@@ -1712,7 +1712,7 @@ MetaBmpScalePartAction::~MetaBmpScalePartAction()
MetaBmpScalePartAction::MetaBmpScalePartAction( const Point& rDstPt, const Size& rDstSz,
const Point& rSrcPt, const Size& rSrcSz,
const Bitmap& rBmp ) :
- MetaAction ( META_BMPSCALEPART_ACTION ),
+ MetaAction ( MetaActionType::BMPSCALEPART ),
maBmp ( rBmp ),
maDstPt ( rDstPt ),
maDstSz ( rDstSz ),
@@ -1779,14 +1779,14 @@ void MetaBmpScalePartAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaBmpExAction::MetaBmpExAction() :
- MetaAction(META_BMPEX_ACTION)
+ MetaAction(MetaActionType::BMPEX)
{}
MetaBmpExAction::~MetaBmpExAction()
{}
MetaBmpExAction::MetaBmpExAction( const Point& rPt, const BitmapEx& rBmpEx ) :
- MetaAction ( META_BMPEX_ACTION ),
+ MetaAction ( MetaActionType::BMPEX ),
maBmpEx ( rBmpEx ),
maPt ( rPt )
{}
@@ -1838,7 +1838,7 @@ void MetaBmpExAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaBmpExScaleAction::MetaBmpExScaleAction() :
- MetaAction(META_BMPEXSCALE_ACTION)
+ MetaAction(MetaActionType::BMPEXSCALE)
{}
MetaBmpExScaleAction::~MetaBmpExScaleAction()
@@ -1846,7 +1846,7 @@ MetaBmpExScaleAction::~MetaBmpExScaleAction()
MetaBmpExScaleAction::MetaBmpExScaleAction( const Point& rPt, const Size& rSz,
const BitmapEx& rBmpEx ) :
- MetaAction ( META_BMPEXSCALE_ACTION ),
+ MetaAction ( MetaActionType::BMPEXSCALE ),
maBmpEx ( rBmpEx ),
maPt ( rPt ),
maSz ( rSz )
@@ -1905,7 +1905,7 @@ void MetaBmpExScaleAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaBmpExScalePartAction::MetaBmpExScalePartAction() :
- MetaAction(META_BMPEXSCALEPART_ACTION)
+ MetaAction(MetaActionType::BMPEXSCALEPART)
{}
MetaBmpExScalePartAction::~MetaBmpExScalePartAction()
@@ -1914,7 +1914,7 @@ MetaBmpExScalePartAction::~MetaBmpExScalePartAction()
MetaBmpExScalePartAction::MetaBmpExScalePartAction( const Point& rDstPt, const Size& rDstSz,
const Point& rSrcPt, const Size& rSrcSz,
const BitmapEx& rBmpEx ) :
- MetaAction ( META_BMPEXSCALEPART_ACTION ),
+ MetaAction ( MetaActionType::BMPEXSCALEPART ),
maBmpEx ( rBmpEx ),
maDstPt ( rDstPt ),
maDstSz ( rDstSz ),
@@ -1981,7 +1981,7 @@ void MetaBmpExScalePartAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaMaskAction::MetaMaskAction() :
- MetaAction(META_MASK_ACTION)
+ MetaAction(MetaActionType::MASK)
{}
MetaMaskAction::~MetaMaskAction()
@@ -1990,7 +1990,7 @@ MetaMaskAction::~MetaMaskAction()
MetaMaskAction::MetaMaskAction( const Point& rPt,
const Bitmap& rBmp,
const Color& rColor ) :
- MetaAction ( META_MASK_ACTION ),
+ MetaAction ( MetaActionType::MASK ),
maBmp ( rBmp ),
maColor ( rColor ),
maPt ( rPt )
@@ -2044,7 +2044,7 @@ void MetaMaskAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaMaskScaleAction::MetaMaskScaleAction() :
- MetaAction(META_MASKSCALE_ACTION)
+ MetaAction(MetaActionType::MASKSCALE)
{}
MetaMaskScaleAction::~MetaMaskScaleAction()
@@ -2053,7 +2053,7 @@ MetaMaskScaleAction::~MetaMaskScaleAction()
MetaMaskScaleAction::MetaMaskScaleAction( const Point& rPt, const Size& rSz,
const Bitmap& rBmp,
const Color& rColor ) :
- MetaAction ( META_MASKSCALE_ACTION ),
+ MetaAction ( MetaActionType::MASKSCALE ),
maBmp ( rBmp ),
maColor ( rColor ),
maPt ( rPt ),
@@ -2114,7 +2114,7 @@ void MetaMaskScaleAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaMaskScalePartAction::MetaMaskScalePartAction() :
- MetaAction(META_MASKSCALEPART_ACTION)
+ MetaAction(MetaActionType::MASKSCALEPART)
{}
MetaMaskScalePartAction::~MetaMaskScalePartAction()
@@ -2124,7 +2124,7 @@ MetaMaskScalePartAction::MetaMaskScalePartAction( const Point& rDstPt, const Siz
const Point& rSrcPt, const Size& rSrcSz,
const Bitmap& rBmp,
const Color& rColor ) :
- MetaAction ( META_MASKSCALEPART_ACTION ),
+ MetaAction ( MetaActionType::MASKSCALEPART ),
maBmp ( rBmp ),
maColor ( rColor ),
maDstPt ( rDstPt ),
@@ -2135,7 +2135,7 @@ MetaMaskScalePartAction::MetaMaskScalePartAction( const Point& rDstPt, const Siz
void MetaMaskScalePartAction::Execute( OutputDevice* pOut )
{
- pOut->DrawMask( maDstPt, maDstSz, maSrcPt, maSrcSz, maBmp, maColor, META_MASKSCALE_ACTION );
+ pOut->DrawMask( maDstPt, maDstSz, maSrcPt, maSrcSz, maBmp, maColor, MetaActionType::MASKSCALE );
}
MetaAction* MetaMaskScalePartAction::Clone()
@@ -2195,14 +2195,14 @@ void MetaMaskScalePartAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaGradientAction::MetaGradientAction() :
- MetaAction(META_GRADIENT_ACTION)
+ MetaAction(MetaActionType::GRADIENT)
{}
MetaGradientAction::~MetaGradientAction()
{}
MetaGradientAction::MetaGradientAction( const Rectangle& rRect, const Gradient& rGradient ) :
- MetaAction ( META_GRADIENT_ACTION ),
+ MetaAction ( MetaActionType::GRADIENT ),
maRect ( rRect ),
maGradient ( rGradient )
{}
@@ -2251,11 +2251,11 @@ void MetaGradientAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaGradientExAction::MetaGradientExAction() :
- MetaAction ( META_GRADIENTEX_ACTION )
+ MetaAction ( MetaActionType::GRADIENTEX )
{}
MetaGradientExAction::MetaGradientExAction( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient ) :
- MetaAction ( META_GRADIENTEX_ACTION ),
+ MetaAction ( MetaActionType::GRADIENTEX ),
maPolyPoly ( rPolyPoly ),
maGradient ( rGradient )
{}
@@ -2317,14 +2317,14 @@ void MetaGradientExAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaHatchAction::MetaHatchAction() :
- MetaAction(META_HATCH_ACTION)
+ MetaAction(MetaActionType::HATCH)
{}
MetaHatchAction::~MetaHatchAction()
{}
MetaHatchAction::MetaHatchAction( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch ) :
- MetaAction ( META_HATCH_ACTION ),
+ MetaAction ( MetaActionType::HATCH ),
maPolyPoly ( rPolyPoly ),
maHatch ( rHatch )
{}
@@ -2379,7 +2379,7 @@ void MetaHatchAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaWallpaperAction::MetaWallpaperAction() :
- MetaAction(META_WALLPAPER_ACTION)
+ MetaAction(MetaActionType::WALLPAPER)
{}
MetaWallpaperAction::~MetaWallpaperAction()
@@ -2387,7 +2387,7 @@ MetaWallpaperAction::~MetaWallpaperAction()
MetaWallpaperAction::MetaWallpaperAction( const Rectangle& rRect,
const Wallpaper& rPaper ) :
- MetaAction ( META_WALLPAPER_ACTION ),
+ MetaAction ( MetaActionType::WALLPAPER ),
maRect ( rRect ),
maWallpaper ( rPaper )
{}
@@ -2435,7 +2435,7 @@ void MetaWallpaperAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaClipRegionAction::MetaClipRegionAction() :
- MetaAction ( META_CLIPREGION_ACTION ),
+ MetaAction ( MetaActionType::CLIPREGION ),
mbClip ( false )
{}
@@ -2443,7 +2443,7 @@ MetaClipRegionAction::~MetaClipRegionAction()
{}
MetaClipRegionAction::MetaClipRegionAction( const vcl::Region& rRegion, bool bClip ) :
- MetaAction ( META_CLIPREGION_ACTION ),
+ MetaAction ( MetaActionType::CLIPREGION ),
maRegion ( rRegion ),
mbClip ( bClip )
{}
@@ -2496,14 +2496,14 @@ void MetaClipRegionAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaISectRectClipRegionAction::MetaISectRectClipRegionAction() :
- MetaAction(META_ISECTRECTCLIPREGION_ACTION)
+ MetaAction(MetaActionType::ISECTRECTCLIPREGION)
{}
MetaISectRectClipRegionAction::~MetaISectRectClipRegionAction()
{}
MetaISectRectClipRegionAction::MetaISectRectClipRegionAction( const Rectangle& rRect ) :
- MetaAction ( META_ISECTRECTCLIPREGION_ACTION ),
+ MetaAction ( MetaActionType::ISECTRECTCLIPREGION ),
maRect ( rRect )
{}
@@ -2548,14 +2548,14 @@ void MetaISectRectClipRegionAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaISectRegionClipRegionAction::MetaISectRegionClipRegionAction() :
- MetaAction(META_ISECTREGIONCLIPREGION_ACTION)
+ MetaAction(MetaActionType::ISECTREGIONCLIPREGION)
{}
MetaISectRegionClipRegionAction::~MetaISectRegionClipRegionAction()
{}
MetaISectRegionClipRegionAction::MetaISectRegionClipRegionAction( const vcl::Region& rRegion ) :
- MetaAction ( META_ISECTREGIONCLIPREGION_ACTION ),
+ MetaAction ( MetaActionType::ISECTREGIONCLIPREGION ),
maRegion ( rRegion )
{
}
@@ -2601,7 +2601,7 @@ void MetaISectRegionClipRegionAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaMoveClipRegionAction::MetaMoveClipRegionAction() :
- MetaAction ( META_MOVECLIPREGION_ACTION ),
+ MetaAction ( MetaActionType::MOVECLIPREGION ),
mnHorzMove ( 0 ),
mnVertMove ( 0 )
{}
@@ -2610,7 +2610,7 @@ MetaMoveClipRegionAction::~MetaMoveClipRegionAction()
{}
MetaMoveClipRegionAction::MetaMoveClipRegionAction( long nHorzMove, long nVertMove ) :
- MetaAction ( META_MOVECLIPREGION_ACTION ),
+ MetaAction ( MetaActionType::MOVECLIPREGION ),
mnHorzMove ( nHorzMove ),
mnVertMove ( nVertMove )
{}
@@ -2656,7 +2656,7 @@ void MetaMoveClipRegionAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaLineColorAction::MetaLineColorAction() :
- MetaAction ( META_LINECOLOR_ACTION ),
+ MetaAction ( MetaActionType::LINECOLOR ),
mbSet ( false )
{}
@@ -2664,7 +2664,7 @@ MetaLineColorAction::~MetaLineColorAction()
{}
MetaLineColorAction::MetaLineColorAction( const Color& rColor, bool bSet ) :
- MetaAction ( META_LINECOLOR_ACTION ),
+ MetaAction ( MetaActionType::LINECOLOR ),
maColor ( rColor ),
mbSet ( bSet )
{}
@@ -2706,7 +2706,7 @@ void MetaLineColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaFillColorAction::MetaFillColorAction() :
- MetaAction ( META_FILLCOLOR_ACTION ),
+ MetaAction ( MetaActionType::FILLCOLOR ),
mbSet ( false )
{}
@@ -2714,7 +2714,7 @@ MetaFillColorAction::~MetaFillColorAction()
{}
MetaFillColorAction::MetaFillColorAction( const Color& rColor, bool bSet ) :
- MetaAction ( META_FILLCOLOR_ACTION ),
+ MetaAction ( MetaActionType::FILLCOLOR ),
maColor ( rColor ),
mbSet ( bSet )
{}
@@ -2756,14 +2756,14 @@ void MetaFillColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaTextColorAction::MetaTextColorAction() :
- MetaAction(META_TEXTCOLOR_ACTION)
+ MetaAction(MetaActionType::TEXTCOLOR)
{}
MetaTextColorAction::~MetaTextColorAction()
{}
MetaTextColorAction::MetaTextColorAction( const Color& rColor ) :
- MetaAction ( META_TEXTCOLOR_ACTION ),
+ MetaAction ( MetaActionType::TEXTCOLOR ),
maColor ( rColor )
{}
@@ -2798,7 +2798,7 @@ void MetaTextColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaTextFillColorAction::MetaTextFillColorAction() :
- MetaAction ( META_TEXTFILLCOLOR_ACTION ),
+ MetaAction ( MetaActionType::TEXTFILLCOLOR ),
mbSet ( false )
{}
@@ -2806,7 +2806,7 @@ MetaTextFillColorAction::~MetaTextFillColorAction()
{}
MetaTextFillColorAction::MetaTextFillColorAction( const Color& rColor, bool bSet ) :
- MetaAction ( META_TEXTFILLCOLOR_ACTION ),
+ MetaAction ( MetaActionType::TEXTFILLCOLOR ),
maColor ( rColor ),
mbSet ( bSet )
{}
@@ -2848,7 +2848,7 @@ void MetaTextFillColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaTextLineColorAction::MetaTextLineColorAction() :
- MetaAction ( META_TEXTLINECOLOR_ACTION ),
+ MetaAction ( MetaActionType::TEXTLINECOLOR ),
mbSet ( false )
{}
@@ -2856,7 +2856,7 @@ MetaTextLineColorAction::~MetaTextLineColorAction()
{}
MetaTextLineColorAction::MetaTextLineColorAction( const Color& rColor, bool bSet ) :
- MetaAction ( META_TEXTLINECOLOR_ACTION ),
+ MetaAction ( MetaActionType::TEXTLINECOLOR ),
maColor ( rColor ),
mbSet ( bSet )
{}
@@ -2898,7 +2898,7 @@ void MetaTextLineColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaOverlineColorAction::MetaOverlineColorAction() :
- MetaAction ( META_OVERLINECOLOR_ACTION ),
+ MetaAction ( MetaActionType::OVERLINECOLOR ),
mbSet ( false )
{}
@@ -2906,7 +2906,7 @@ MetaOverlineColorAction::~MetaOverlineColorAction()
{}
MetaOverlineColorAction::MetaOverlineColorAction( const Color& rColor, bool bSet ) :
- MetaAction ( META_OVERLINECOLOR_ACTION ),
+ MetaAction ( MetaActionType::OVERLINECOLOR ),
maColor ( rColor ),
mbSet ( bSet )
{}
@@ -2948,7 +2948,7 @@ void MetaOverlineColorAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaTextAlignAction::MetaTextAlignAction() :
- MetaAction ( META_TEXTALIGN_ACTION ),
+ MetaAction ( MetaActionType::TEXTALIGN ),
maAlign ( ALIGN_TOP )
{}
@@ -2956,7 +2956,7 @@ MetaTextAlignAction::~MetaTextAlignAction()
{}
MetaTextAlignAction::MetaTextAlignAction( TextAlign aAlign ) :
- MetaAction ( META_TEXTALIGN_ACTION ),
+ MetaAction ( MetaActionType::TEXTALIGN ),
maAlign ( aAlign )
{}
@@ -2993,14 +2993,14 @@ void MetaTextAlignAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaMapModeAction::MetaMapModeAction() :
- MetaAction(META_MAPMODE_ACTION)
+ MetaAction(MetaActionType::MAPMODE)
{}
MetaMapModeAction::~MetaMapModeAction()
{}
MetaMapModeAction::MetaMapModeAction( const MapMode& rMapMode ) :
- MetaAction ( META_MAPMODE_ACTION ),
+ MetaAction ( MetaActionType::MAPMODE ),
maMapMode ( rMapMode )
{}
@@ -3043,14 +3043,14 @@ void MetaMapModeAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaFontAction::MetaFontAction() :
- MetaAction(META_FONT_ACTION)
+ MetaAction(MetaActionType::FONT)
{}
MetaFontAction::~MetaFontAction()
{}
MetaFontAction::MetaFontAction( const vcl::Font& rFont ) :
- MetaAction ( META_FONT_ACTION ),
+ MetaAction ( MetaActionType::FONT ),
maFont ( rFont )
{
// #96876: because RTL_TEXTENCODING_SYMBOL is often set at the StarSymbol font,
@@ -3109,7 +3109,7 @@ void MetaFontAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
}
MetaPushAction::MetaPushAction() :
- MetaAction ( META_PUSH_ACTION ),
+ MetaAction ( MetaActionType::PUSH ),
mnFlags ( PushFlags::NONE )
{}
@@ -3117,7 +3117,7 @@ MetaPushAction::~MetaPushAction()
{}
MetaPushAction::MetaPushAction( PushFlags nFlags ) :
- MetaAction ( META_PUSH_ACTION ),
+ MetaAction ( MetaActionType::PUSH ),
mnFlags ( nFlags )
{}
@@ -3154,7 +3154,7 @@ void MetaPushAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaPopAction::MetaPopAction() :
- MetaAction(META_POP_ACTION)
+ MetaAction(MetaActionType::POP)
{}
MetaPopAction::~MetaPopAction()
@@ -3184,7 +3184,7 @@ void MetaPopAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaRasterOpAction::MetaRasterOpAction() :
- MetaAction ( META_RASTEROP_ACTION ),
+ MetaAction ( MetaActionType::RASTEROP ),
meRasterOp ( ROP_OVERPAINT )
{}
@@ -3192,7 +3192,7 @@ MetaRasterOpAction::~MetaRasterOpAction()
{}
MetaRasterOpAction::MetaRasterOpAction( RasterOp eRasterOp ) :
- MetaAction ( META_RASTEROP_ACTION ),
+ MetaAction ( MetaActionType::RASTEROP ),
meRasterOp ( eRasterOp )
{
}
@@ -3230,7 +3230,7 @@ void MetaRasterOpAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaTransparentAction::MetaTransparentAction() :
- MetaAction ( META_TRANSPARENT_ACTION ),
+ MetaAction ( MetaActionType::TRANSPARENT ),
mnTransPercent ( 0 )
{}
@@ -3238,7 +3238,7 @@ MetaTransparentAction::~MetaTransparentAction()
{}
MetaTransparentAction::MetaTransparentAction( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent ) :
- MetaAction ( META_TRANSPARENT_ACTION ),
+ MetaAction ( MetaActionType::TRANSPARENT ),
maPolyPoly ( rPolyPoly ),
mnTransPercent ( nTransPercent )
{}
@@ -3301,7 +3301,7 @@ void MetaTransparentAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaFloatTransparentAction::MetaFloatTransparentAction() :
- MetaAction(META_FLOATTRANSPARENT_ACTION)
+ MetaAction(MetaActionType::FLOATTRANSPARENT)
{}
MetaFloatTransparentAction::~MetaFloatTransparentAction()
@@ -3309,7 +3309,7 @@ MetaFloatTransparentAction::~MetaFloatTransparentAction()
MetaFloatTransparentAction::MetaFloatTransparentAction( const GDIMetaFile& rMtf, const Point& rPos,
const Size& rSize, const Gradient& rGradient ) :
- MetaAction ( META_FLOATTRANSPARENT_ACTION ),
+ MetaAction ( MetaActionType::FLOATTRANSPARENT ),
maMtf ( rMtf ),
maPoint ( rPos ),
maSize ( rSize ),
@@ -3370,7 +3370,7 @@ void MetaFloatTransparentAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaEPSAction::MetaEPSAction() :
- MetaAction(META_EPS_ACTION)
+ MetaAction(MetaActionType::EPS)
{}
MetaEPSAction::~MetaEPSAction()
@@ -3378,7 +3378,7 @@ MetaEPSAction::~MetaEPSAction()
MetaEPSAction::MetaEPSAction( const Point& rPoint, const Size& rSize,
const GfxLink& rGfxLink, const GDIMetaFile& rSubst ) :
- MetaAction ( META_EPS_ACTION ),
+ MetaAction ( MetaActionType::EPS ),
maGfxLink ( rGfxLink ),
maSubst ( rSubst ),
maPoint ( rPoint ),
@@ -3439,7 +3439,7 @@ void MetaEPSAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaRefPointAction::MetaRefPointAction() :
- MetaAction ( META_REFPOINT_ACTION ),
+ MetaAction ( MetaActionType::REFPOINT ),
mbSet ( false )
{}
@@ -3447,7 +3447,7 @@ MetaRefPointAction::~MetaRefPointAction()
{}
MetaRefPointAction::MetaRefPointAction( const Point& rRefPoint, bool bSet ) :
- MetaAction ( META_REFPOINT_ACTION ),
+ MetaAction ( MetaActionType::REFPOINT ),
maRefPoint ( rRefPoint ),
mbSet ( bSet )
{}
@@ -3489,14 +3489,14 @@ void MetaRefPointAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaCommentAction::MetaCommentAction( sal_Int32 nValue ) :
- MetaAction ( META_COMMENT_ACTION ),
+ MetaAction ( MetaActionType::COMMENT ),
mnValue ( nValue )
{
ImplInitDynamicData( NULL, 0UL );
}
MetaCommentAction::MetaCommentAction( const MetaCommentAction& rAct ) :
- MetaAction ( META_COMMENT_ACTION ),
+ MetaAction ( MetaActionType::COMMENT ),
maComment ( rAct.maComment ),
mnValue ( rAct.mnValue )
{
@@ -3504,7 +3504,7 @@ MetaCommentAction::MetaCommentAction( const MetaCommentAction& rAct ) :
}
MetaCommentAction::MetaCommentAction( const OString& rComment, sal_Int32 nValue, const sal_uInt8* pData, sal_uInt32 nDataSize ) :
- MetaAction ( META_COMMENT_ACTION ),
+ MetaAction ( MetaActionType::COMMENT ),
maComment ( rComment ),
mnValue ( nValue )
{
@@ -3703,7 +3703,7 @@ void MetaCommentAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaLayoutModeAction::MetaLayoutModeAction() :
- MetaAction ( META_LAYOUTMODE_ACTION ),
+ MetaAction ( MetaActionType::LAYOUTMODE ),
mnLayoutMode( TEXT_LAYOUT_DEFAULT )
{}
@@ -3711,7 +3711,7 @@ MetaLayoutModeAction::~MetaLayoutModeAction()
{}
MetaLayoutModeAction::MetaLayoutModeAction( ComplexTextLayoutMode nLayoutMode ) :
- MetaAction ( META_LAYOUTMODE_ACTION ),
+ MetaAction ( MetaActionType::LAYOUTMODE ),
mnLayoutMode( nLayoutMode )
{}
@@ -3748,7 +3748,7 @@ void MetaLayoutModeAction::Read( SvStream& rIStm, ImplMetaReadData* )
}
MetaTextLanguageAction::MetaTextLanguageAction() :
- MetaAction ( META_TEXTLANGUAGE_ACTION ),
+ MetaAction ( MetaActionType::TEXTLANGUAGE ),
meTextLanguage( LANGUAGE_DONTKNOW )
{}
@@ -3756,7 +3756,7 @@ MetaTextLanguageAction::~MetaTextLanguageAction()
{}
MetaTextLanguageAction::MetaTextLanguageAction( LanguageType eTextLanguage ) :
- MetaAction ( META_TEXTLANGUAGE_ACTION ),
+ MetaAction ( MetaActionType::TEXTLANGUAGE ),
meTextLanguage( eTextLanguage )
{}
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 05d4e25083af..4ac06594e2f2 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -258,26 +258,26 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
{
if ( !i_pOutDevData || !i_pOutDevData->PlaySyncPageAct( m_rOuterFace, i ) )
{
- const MetaAction* pAction = aMtf.GetAction( i );
- const sal_uInt16 nType = pAction->GetType();
+ const MetaAction* pAction = aMtf.GetAction( i );
+ const MetaActionType nType = pAction->GetType();
switch( nType )
{
- case( META_PIXEL_ACTION ):
+ case( MetaActionType::PIXEL ):
{
const MetaPixelAction* pA = static_cast<const MetaPixelAction*>(pAction);
m_rOuterFace.DrawPixel( pA->GetPoint(), pA->GetColor() );
}
break;
- case( META_POINT_ACTION ):
+ case( MetaActionType::POINT ):
{
const MetaPointAction* pA = static_cast<const MetaPointAction*>(pAction);
m_rOuterFace.DrawPixel( pA->GetPoint() );
}
break;
- case( META_LINE_ACTION ):
+ case( MetaActionType::LINE ):
{
const MetaLineAction* pA = static_cast<const MetaLineAction*>(pAction);
if ( pA->GetLineInfo().IsDefault() )
@@ -287,56 +287,56 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_RECT_ACTION ):
+ case( MetaActionType::RECT ):
{
const MetaRectAction* pA = static_cast<const MetaRectAction*>(pAction);
m_rOuterFace.DrawRect( pA->GetRect() );
}
break;
- case( META_ROUNDRECT_ACTION ):
+ case( MetaActionType::ROUNDRECT ):
{
const MetaRoundRectAction* pA = static_cast<const MetaRoundRectAction*>(pAction);
m_rOuterFace.DrawRect( pA->GetRect(), pA->GetHorzRound(), pA->GetVertRound() );
}
break;
- case( META_ELLIPSE_ACTION ):
+ case( MetaActionType::ELLIPSE ):
{
const MetaEllipseAction* pA = static_cast<const MetaEllipseAction*>(pAction);
m_rOuterFace.DrawEllipse( pA->GetRect() );
}
break;
- case( META_ARC_ACTION ):
+ case( MetaActionType::ARC ):
{
const MetaArcAction* pA = static_cast<const MetaArcAction*>(pAction);
m_rOuterFace.DrawArc( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint() );
}
break;
- case( META_PIE_ACTION ):
+ case( MetaActionType::PIE ):
{
const MetaArcAction* pA = static_cast<const MetaArcAction*>(pAction);
m_rOuterFace.DrawPie( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint() );
}
break;
- case( META_CHORD_ACTION ):
+ case( MetaActionType::CHORD ):
{
const MetaChordAction* pA = static_cast<const MetaChordAction*>(pAction);
m_rOuterFace.DrawChord( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint() );
}
break;
- case( META_POLYGON_ACTION ):
+ case( MetaActionType::POLYGON ):
{
const MetaPolygonAction* pA = static_cast<const MetaPolygonAction*>(pAction);
m_rOuterFace.DrawPolygon( pA->GetPolygon() );
}
break;
- case( META_POLYLINE_ACTION ):
+ case( MetaActionType::POLYLINE ):
{
const MetaPolyLineAction* pA = static_cast<const MetaPolyLineAction*>(pAction);
if ( pA->GetLineInfo().IsDefault() )
@@ -346,14 +346,14 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_POLYPOLYGON_ACTION ):
+ case( MetaActionType::POLYPOLYGON ):
{
const MetaPolyPolygonAction* pA = static_cast<const MetaPolyPolygonAction*>(pAction);
m_rOuterFace.DrawPolyPolygon( pA->GetPolyPolygon() );
}
break;
- case( META_GRADIENT_ACTION ):
+ case( MetaActionType::GRADIENT ):
{
const MetaGradientAction* pA = static_cast<const MetaGradientAction*>(pAction);
const Gradient& rGradient = pA->GetGradient();
@@ -369,7 +369,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_GRADIENTEX_ACTION ):
+ case( MetaActionType::GRADIENTEX ):
{
const MetaGradientExAction* pA = static_cast<const MetaGradientExAction*>(pAction);
const Gradient& rGradient = pA->GetGradient();
@@ -381,21 +381,21 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case META_HATCH_ACTION:
+ case MetaActionType::HATCH:
{
const MetaHatchAction* pA = static_cast<const MetaHatchAction*>(pAction);
m_rOuterFace.DrawHatch( pA->GetPolyPolygon(), pA->GetHatch() );
}
break;
- case( META_TRANSPARENT_ACTION ):
+ case( MetaActionType::TRANSPARENT ):
{
const MetaTransparentAction* pA = static_cast<const MetaTransparentAction*>(pAction);
m_rOuterFace.DrawTransparent( pA->GetPolyPolygon(), pA->GetTransparence() );
}
break;
- case( META_FLOATTRANSPARENT_ACTION ):
+ case( MetaActionType::FLOATTRANSPARENT ):
{
const MetaFloatTransparentAction* pA = static_cast<const MetaFloatTransparentAction*>(pAction);
@@ -488,7 +488,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_EPS_ACTION ):
+ case( MetaActionType::EPS ):
{
const MetaEPSAction* pA = static_cast<const MetaEPSAction*>(pAction);
const GDIMetaFile aSubstitute( pA->GetSubstitute() );
@@ -510,7 +510,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_COMMENT_ACTION ):
+ case( MetaActionType::COMMENT ):
if( ! i_rContext.m_bTransparenciesWereRemoved )
{
const MetaCommentAction* pA = static_cast<const MetaCommentAction*>(pAction);
@@ -524,9 +524,9 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
{
pAction = aMtf.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;
@@ -747,7 +747,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
while( ++i < nCount )
{
pAction = aMtf.GetAction( i );
- if ( pAction->GetType() == META_COMMENT_ACTION )
+ if ( pAction->GetType() == MetaActionType::COMMENT )
{
OString sComment( static_cast<const MetaCommentAction*>(pAction)->GetComment() );
if (sComment == sSeqEnd)
@@ -757,7 +757,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
// the replacement action for stroke is a filled rectangle
// the set fillcolor of the replacement is part of the graphics
// state and must not be skipped
- else if( pAction->GetType() == META_FILLCOLOR_ACTION )
+ else if( pAction->GetType() == MetaActionType::FILLCOLOR )
{
const MetaFillColorAction* pMA = static_cast<const MetaFillColorAction*>(pAction);
if( pMA->IsSetting() )
@@ -772,7 +772,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_BMP_ACTION ):
+ case( MetaActionType::BMP ):
{
const MetaBmpAction* pA = static_cast<const MetaBmpAction*>(pAction);
BitmapEx aBitmapEx( pA->GetBitmap() );
@@ -784,14 +784,14 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_BMPSCALE_ACTION ):
+ case( MetaActionType::BMPSCALE ):
{
const MetaBmpScaleAction* pA = static_cast<const MetaBmpScaleAction*>(pAction);
implWriteBitmapEx( pA->GetPoint(), pA->GetSize(), BitmapEx( pA->GetBitmap() ), pDummyVDev, i_rContext );
}
break;
- case( META_BMPSCALEPART_ACTION ):
+ case( MetaActionType::BMPSCALEPART ):
{
const MetaBmpScalePartAction* pA = static_cast<const MetaBmpScalePartAction*>(pAction);
BitmapEx aBitmapEx( pA->GetBitmap() );
@@ -800,7 +800,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_BMPEX_ACTION ):
+ case( MetaActionType::BMPEX ):
{
const MetaBmpExAction* pA = static_cast<const MetaBmpExAction*>(pAction);
BitmapEx aBitmapEx( pA->GetBitmapEx() );
@@ -810,14 +810,14 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_BMPEXSCALE_ACTION ):
+ case( MetaActionType::BMPEXSCALE ):
{
const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction);
implWriteBitmapEx( pA->GetPoint(), pA->GetSize(), pA->GetBitmapEx(), pDummyVDev, i_rContext );
}
break;
- case( META_BMPEXSCALEPART_ACTION ):
+ case( MetaActionType::BMPEXSCALEPART ):
{
const MetaBmpExScalePartAction* pA = static_cast<const MetaBmpExScalePartAction*>(pAction);
BitmapEx aBitmapEx( pA->GetBitmapEx() );
@@ -826,43 +826,43 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_MASK_ACTION ):
- case( META_MASKSCALE_ACTION ):
- case( META_MASKSCALEPART_ACTION ):
+ case( MetaActionType::MASK ):
+ case( MetaActionType::MASKSCALE ):
+ case( MetaActionType::MASKSCALEPART ):
{
OSL_TRACE( "MetaMask...Action not supported yet" );
}
break;
- case( META_TEXT_ACTION ):
+ case( MetaActionType::TEXT ):
{
const MetaTextAction* pA = static_cast<const MetaTextAction*>(pAction);
m_rOuterFace.DrawText( pA->GetPoint(), pA->GetText().copy( pA->GetIndex(), std::min<sal_Int32>(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) ) );
}
break;
- case( META_TEXTRECT_ACTION ):
+ case( MetaActionType::TEXTRECT ):
{
const MetaTextRectAction* pA = static_cast<const MetaTextRectAction*>(pAction);
m_rOuterFace.DrawText( pA->GetRect(), pA->GetText(), pA->GetStyle() );
}
break;
- case( META_TEXTARRAY_ACTION ):
+ case( MetaActionType::TEXTARRAY ):
{
const MetaTextArrayAction* pA = static_cast<const MetaTextArrayAction*>(pAction);
m_rOuterFace.DrawTextArray( pA->GetPoint(), pA->GetText(), pA->GetDXArray(), pA->GetIndex(), pA->GetLen() );
}
break;
- case( META_STRETCHTEXT_ACTION ):
+ case( MetaActionType::STRETCHTEXT ):
{
const MetaStretchTextAction* pA = static_cast<const MetaStretchTextAction*>(pAction);
m_rOuterFace.DrawStretchText( pA->GetPoint(), pA->GetWidth(), pA->GetText(), pA->GetIndex(), pA->GetLen() );
}
break;
- case( META_TEXTLINE_ACTION ):
+ case( MetaActionType::TEXTLINE ):
{
const MetaTextLineAction* pA = static_cast<const MetaTextLineAction*>(pAction);
m_rOuterFace.DrawTextLine( pA->GetStartPoint(), pA->GetWidth(), pA->GetStrikeout(), pA->GetUnderline(), pA->GetOverline() );
@@ -870,7 +870,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_CLIPREGION_ACTION ):
+ case( MetaActionType::CLIPREGION ):
{
const MetaClipRegionAction* pA = static_cast<const MetaClipRegionAction*>(pAction);
@@ -889,14 +889,14 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_ISECTRECTCLIPREGION_ACTION ):
+ case( MetaActionType::ISECTRECTCLIPREGION ):
{
const MetaISectRectClipRegionAction* pA = static_cast<const MetaISectRectClipRegionAction*>(pAction);
m_rOuterFace.IntersectClipRegion( pA->GetRect() );
}
break;
- case( META_ISECTREGIONCLIPREGION_ACTION ):
+ case( MetaActionType::ISECTREGIONCLIPREGION ):
{
const MetaISectRegionClipRegionAction* pA = static_cast<const MetaISectRegionClipRegionAction*>(pAction);
vcl::Region aReg( pA->GetRegion() );
@@ -904,21 +904,21 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_MOVECLIPREGION_ACTION ):
+ case( MetaActionType::MOVECLIPREGION ):
{
const MetaMoveClipRegionAction* pA = static_cast<const MetaMoveClipRegionAction*>(pAction);
m_rOuterFace.MoveClipRegion( pA->GetHorzMove(), pA->GetVertMove() );
}
break;
- case( META_MAPMODE_ACTION ):
+ case( MetaActionType::MAPMODE ):
{
const_cast< MetaAction* >( pAction )->Execute( pDummyVDev );
m_rOuterFace.SetMapMode( pDummyVDev->GetMapMode() );
}
break;
- case( META_LINECOLOR_ACTION ):
+ case( MetaActionType::LINECOLOR ):
{
const MetaLineColorAction* pA = static_cast<const MetaLineColorAction*>(pAction);
@@ -929,7 +929,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_FILLCOLOR_ACTION ):
+ case( MetaActionType::FILLCOLOR ):
{
const MetaFillColorAction* pA = static_cast<const MetaFillColorAction*>(pAction);
@@ -940,7 +940,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_TEXTLINECOLOR_ACTION ):
+ case( MetaActionType::TEXTLINECOLOR ):
{
const MetaTextLineColorAction* pA = static_cast<const MetaTextLineColorAction*>(pAction);
@@ -951,7 +951,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_OVERLINECOLOR_ACTION ):
+ case( MetaActionType::OVERLINECOLOR ):
{
const MetaOverlineColorAction* pA = static_cast<const MetaOverlineColorAction*>(pAction);
@@ -962,7 +962,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_TEXTFILLCOLOR_ACTION ):
+ case( MetaActionType::TEXTFILLCOLOR ):
{
const MetaTextFillColorAction* pA = static_cast<const MetaTextFillColorAction*>(pAction);
@@ -973,28 +973,28 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_TEXTCOLOR_ACTION ):
+ case( MetaActionType::TEXTCOLOR ):
{
const MetaTextColorAction* pA = static_cast<const MetaTextColorAction*>(pAction);
m_rOuterFace.SetTextColor( pA->GetColor() );
}
break;
- case( META_TEXTALIGN_ACTION ):
+ case( MetaActionType::TEXTALIGN ):
{
const MetaTextAlignAction* pA = static_cast<const MetaTextAlignAction*>(pAction);
m_rOuterFace.SetTextAlign( pA->GetTextAlign() );
}
break;
- case( META_FONT_ACTION ):
+ case( MetaActionType::FONT ):
{
const MetaFontAction* pA = static_cast<const MetaFontAction*>(pAction);
m_rOuterFace.SetFont( pA->GetFont() );
}
break;
- case( META_PUSH_ACTION ):
+ case( MetaActionType::PUSH ):
{
const MetaPushAction* pA = static_cast<const MetaPushAction*>(pAction);
@@ -1003,41 +1003,41 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
break;
- case( META_POP_ACTION ):
+ case( MetaActionType::POP ):
{
pDummyVDev->Pop();
m_rOuterFace.Pop();
}
break;
- case( META_LAYOUTMODE_ACTION ):
+ case( MetaActionType::LAYOUTMODE ):
{
const MetaLayoutModeAction* pA = static_cast<const MetaLayoutModeAction*>(pAction);
m_rOuterFace.SetLayoutMode( pA->GetLayoutMode() );
}
break;
- case META_TEXTLANGUAGE_ACTION:
+ case MetaActionType::TEXTLANGUAGE:
{
const MetaTextLanguageAction* pA = static_cast<const MetaTextLanguageAction*>(pAction);
m_rOuterFace.SetDigitLanguage( pA->GetTextLanguage() );
}
break;
- case( META_WALLPAPER_ACTION ):
+ case( MetaActionType::WALLPAPER ):
{
const MetaWallpaperAction* pA = static_cast<const MetaWallpaperAction*>(pAction);
m_rOuterFace.DrawWallpaper( pA->GetRect(), pA->GetWallpaper() );
}
break;
- case( META_RASTEROP_ACTION ):
+ case( MetaActionType::RASTEROP ):
{
// !!! >>> we don't want to support this actions
}
break;
- case( META_REFPOINT_ACTION ):
+ case( MetaActionType::REFPOINT ):
{
// !!! >>> we don't want to support this actions
}
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index c8470ac55d09..fbed7a746b67 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -75,19 +75,19 @@ bool IsTransparentAction( const MetaAction& rAct )
{
switch( rAct.GetType() )
{
- case META_TRANSPARENT_ACTION:
+ case MetaActionType::TRANSPARENT:
return true;
- case META_FLOATTRANSPARENT_ACTION:
+ case MetaActionType::FLOATTRANSPARENT:
return true;
- case META_BMPEX_ACTION:
+ case MetaActionType::BMPEX:
return static_cast<const MetaBmpExAction&>(rAct).GetBitmapEx().IsTransparent();
- case META_BMPEXSCALE_ACTION:
+ case MetaActionType::BMPEXSCALE:
return static_cast<const MetaBmpExScaleAction&>(rAct).GetBitmapEx().IsTransparent();
- case META_BMPEXSCALEPART_ACTION:
+ case MetaActionType::BMPEXSCALEPART:
return static_cast<const MetaBmpExScalePartAction&>(rAct).GetBitmapEx().IsTransparent();
default:
@@ -102,7 +102,7 @@ bool IsTransparentAction( const MetaAction& rAct )
*/
bool DoesActionHandleTransparency( const MetaAction& rAct )
{
- // META_FLOATTRANSPARENT_ACTION can contain a whole metafile,
+ // MetaActionType::FLOATTRANSPARENT can contain a whole metafile,
// which is to be rendered with the given transparent gradient. We
// currently cannot emulate transparent painting on a white
// background reliably.
@@ -111,10 +111,10 @@ bool DoesActionHandleTransparency( const MetaAction& rAct )
// white background.
switch( rAct.GetType() )
{
- case META_TRANSPARENT_ACTION:
- case META_BMPEX_ACTION:
- case META_BMPEXSCALE_ACTION:
- case META_BMPEXSCALEPART_ACTION:
+ case MetaActionType::TRANSPARENT:
+ case MetaActionType::BMPEX:
+ case MetaActionType::BMPEXSCALE:
+ case MetaActionType::BMPEXSCALEPART:
return true;
default:
@@ -157,7 +157,7 @@ void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
const OutputDevice& rStateOutDev,
Color aBgColor )
{
- if( rAct.GetType() == META_TRANSPARENT_ACTION )
+ if( rAct.GetType() == MetaActionType::TRANSPARENT )
{
const MetaTransparentAction* pTransAct = static_cast<const MetaTransparentAction*>(&rAct);
sal_uInt16 nTransparency( pTransAct->GetTransparence() );
@@ -192,19 +192,19 @@ void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
switch( rAct.GetType() )
{
- case META_BMPEX_ACTION:
+ case MetaActionType::BMPEX:
aBmpEx = static_cast<const MetaBmpExAction&>(rAct).GetBitmapEx();
break;
- case META_BMPEXSCALE_ACTION:
+ case MetaActionType::BMPEXSCALE:
aBmpEx = static_cast<const MetaBmpExScaleAction&>(rAct).GetBitmapEx();
break;
- case META_BMPEXSCALEPART_ACTION:
+ case MetaActionType::BMPEXSCALEPART:
aBmpEx = static_cast<const MetaBmpExScaleAction&>(rAct).GetBitmapEx();
break;
- case META_TRANSPARENT_ACTION:
+ case MetaActionType::TRANSPARENT:
default:
OSL_FAIL("Printer::GetPreparedMetafile impossible state reached");
@@ -252,18 +252,18 @@ void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
// add corresponding action
switch( rAct.GetType() )
{
- case META_BMPEX_ACTION:
+ case MetaActionType::BMPEX:
o_rMtf.AddAction( new MetaBmpAction(
static_cast<const MetaBmpExAction&>(rAct).GetPoint(),
aBmp ));
break;
- case META_BMPEXSCALE_ACTION:
+ case MetaActionType::BMPEXSCALE:
o_rMtf.AddAction( new MetaBmpScaleAction(
static_cast<const MetaBmpExScaleAction&>(rAct).GetPoint(),
static_cast<const MetaBmpExScaleAction&>(rAct).GetSize(),
aBmp ));
break;
- case META_BMPEXSCALEPART_ACTION:
+ case MetaActionType::BMPEXSCALEPART:
o_rMtf.AddAction( new MetaBmpScalePartAction(
static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestPoint(),
static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestSize(),
@@ -288,62 +288,62 @@ bool ImplIsNotTransparent( const MetaAction& rAct, const OutputDevice& rOut )
switch( rAct.GetType() )
{
- case META_POINT_ACTION:
+ case MetaActionType::POINT:
if( !bLineTransparency )
bRet = true;
break;
- case META_LINE_ACTION:
+ case MetaActionType::LINE:
if( !bLineTransparency )
bRet = true;
break;
- case META_RECT_ACTION:
+ case MetaActionType::RECT:
if( !bLineTransparency || !bFillTransparency )
bRet = true;
break;
- case META_ROUNDRECT_ACTION:
+ case MetaActionType::ROUNDRECT:
if( !bLineTransparency || !bFillTransparency )
bRet = true;
break;
- case META_ELLIPSE_ACTION:
+ case MetaActionType::ELLIPSE:
if( !bLineTransparency || !bFillTransparency )
bRet = true;
break;
- case META_ARC_ACTION:
+ case MetaActionType::ARC:
if( !bLineTransparency || !bFillTransparency )
bRet = true;
break;
- case META_PIE_ACTION:
+ case MetaActionType::PIE:
if( !bLineTransparency || !bFillTransparency )
bRet = true;
break;
- case META_CHORD_ACTION:
+ case MetaActionType::CHORD:
if( !bLineTransparency || !bFillTransparency )
bRet = true;
break;
- case META_POLYLINE_ACTION:
+ case MetaActionType::POLYLINE:
if( !bLineTransparency )
bRet = true;
break;
- case META_POLYGON_ACTION:
+ case MetaActionType::POLYGON:
if( !bLineTransparency || !bFillTransparency )
bRet = true;
break;
- case META_POLYPOLYGON_ACTION:
+ case MetaActionType::POLYPOLYGON:
if( !bLineTransparency || !bFillTransparency )
bRet = true;
break;
- case META_TEXT_ACTION:
+ case MetaActionType::TEXT:
{
const MetaTextAction& rTextAct = static_cast<const MetaTextAction&>(rAct);
const OUString aString( rTextAct.GetText().copy(rTextAct.GetIndex(), rTextAct.GetLen()) );
@@ -352,7 +352,7 @@ bool ImplIsNotTransparent( const MetaAction& rAct, const OutputDevice& rOut )
}
break;
- case META_TEXTARRAY_ACTION:
+ case MetaActionType::TEXTARRAY:
{
const MetaTextArrayAction& rTextAct = static_cast<const MetaTextArrayAction&>(rAct);
const OUString aString( rTextAct.GetText().copy(rTextAct.GetIndex(), rTextAct.GetLen()) );
@@ -361,26 +361,26 @@ bool ImplIsNotTransparent( const MetaAction& rAct, const OutputDevice& rOut )
}
break;
- case META_PIXEL_ACTION:
- case META_BMP_ACTION:
- case META_BMPSCALE_ACTION:
- case META_BMPSCALEPART_ACTION:
- case META_BMPEX_ACTION:
- case META_BMPEXSCALE_ACTION:
- case META_BMPEXSCALEPART_ACTION:
- case META_MASK_ACTION:
- case META_MASKSCALE_ACTION:
- case META_MASKSCALEPART_ACTION:
- case META_GRADIENT_ACTION:
- case META_GRADIENTEX_ACTION:
- case META_HATCH_ACTION:
- case META_WALLPAPER_ACTION:
- case META_TRANSPARENT_ACTION:
- case META_FLOATTRANSPARENT_ACTION:
- case META_EPS_ACTION:
- case META_TEXTRECT_ACTION:
- case META_STRETCHTEXT_ACTION:
- case META_TEXTLINE_ACTION:
+ case MetaActionType::PIXEL:
+ case MetaActionType::BMP:
+ case MetaActionType::BMPSCALE:
+ case MetaActionType::BMPSCALEPART:
+ case MetaActionType::BMPEX:
+ case MetaActionType::BMPEXSCALE:
+ case MetaActionType::BMPEXSCALEPART:
+ case MetaActionType::MASK:
+ case MetaActionType::MASKSCALE:
+ case MetaActionType::MASKSCALEPART:
+ case MetaActionType::GRADIENT:
+ case MetaActionType::GRADIENTEX:
+ case MetaActionType::HATCH:
+ case MetaActionType::WALLPAPER:
+ case MetaActionType::TRANSPARENT:
+ case MetaActionType::FLOATTRANSPARENT:
+ case MetaActionType::EPS:
+ case MetaActionType::TEXTRECT:
+ case MetaActionType::STRETCHTEXT:
+ case MetaActionType::TEXTLINE:
// all other actions: generate non-transparent output
bRet = true;
break;
@@ -399,15 +399,15 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut
switch( rAct.GetType() )
{
- case META_PIXEL_ACTION:
+ case MetaActionType::PIXEL:
aActionBounds = Rectangle( static_cast<const MetaPixelAction&>(rAct).GetPoint(), Size( 1, 1 ) );
break;
- case META_POINT_ACTION:
+ case MetaActionType::POINT:
aActionBounds = Rectangle( static_cast<const MetaPointAction&>(rAct).GetPoint(), Size( 1, 1 ) );
break;
- case META_LINE_ACTION:
+ case MetaActionType::LINE:
{
const MetaLineAction& rMetaLineAction = static_cast<const MetaLineAction&>(rAct);
aActionBounds = Rectangle( rMetaLineAction.GetStartPoint(), rMetaLineAction.GetEndPoint() );
@@ -424,17 +424,17 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut
break;
}
- case META_RECT_ACTION:
+ case MetaActionType::RECT:
aActionBounds = static_cast<const MetaRectAction&>(rAct).GetRect();
break;
- case META_ROUNDRECT_ACTION:
+ case MetaActionType::ROUNDRECT:
aActionBounds = Polygon( static_cast<const MetaRoundRectAction&>(rAct).GetRect(),
static_cast<const MetaRoundRectAction&>(rAct).GetHorzRound(),
static_cast<const MetaRoundRectAction&>(rAct).GetVertRound() ).GetBoundRect();
break;
- case META_ELLIPSE_ACTION:
+ case MetaActionType::ELLIPSE:
{
const Rectangle& rRect = static_cast<const MetaEllipseAction&>(rAct).GetRect();
aActionBounds = Polygon( rRect.Center(),
@@ -443,25 +443,25 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut
break;
}
- case META_ARC_ACTION:
+ case MetaActionType::ARC:
aActionBounds = Polygon( static_cast<const MetaArcAction&>(rAct).GetRect(),
static_cast<const MetaArcAction&>(rAct).GetStartPoint(),
static_cast<const MetaArcAction&>(rAct).GetEndPoint(), POLY_ARC ).GetBoundRect();
break;
- case META_PIE_ACTION:
+ case MetaActionType::PIE:
aActionBounds = Polygon( static_cast<const MetaPieAction&>(rAct).GetRect(),
static_cast<const MetaPieAction&>(rAct).GetStartPoint(),
static_cast<const MetaPieAction&>(rAct).GetEndPoint(), POLY_PIE ).GetBoundRect();
break;
- case META_CHORD_ACTION:
+ case MetaActionType::CHORD:
aActionBounds = Polygon( static_cast<const MetaChordAction&>(rAct).GetRect(),
static_cast<const MetaChordAction&>(rAct).GetStartPoint(),
static_cast<const MetaChordAction&>(rAct).GetEndPoint(), POLY_CHORD ).GetBoundRect();
break;
- case META_POLYLINE_ACTION:
+ case MetaActionType::POLYLINE:
{
const MetaPolyLineAction& rMetaPolyLineAction = static_cast<const MetaPolyLineAction&>(rAct);
aActionBounds = rMetaPolyLineAction.GetPolygon().GetBoundRect();
@@ -477,90 +477,90 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut
break;
}
- case META_POLYGON_ACTION:
+ case MetaActionType::POLYGON:
aActionBounds = static_cast<const MetaPolygonAction&>(rAct).GetPolygon().GetBoundRect();
break;
- case META_POLYPOLYGON_ACTION:
+ case MetaActionType::POLYPOLYGON:
aActionBounds = static_cast<const MetaPolyPolygonAction&>(rAct).GetPolyPolygon().GetBoundRect();
break;
- case META_BMP_ACTION:
+ case MetaActionType::BMP:
aActionBounds = Rectangle( static_cast<const MetaBmpAction&>(rAct).GetPoint(),
rOut.PixelToLogic( static_cast<const MetaBmpAction&>(rAct).GetBitmap().GetSizePixel() ) );
break;
- case META_BMPSCALE_ACTION:
+ case MetaActionType::BMPSCALE:
aActionBounds = Rectangle( static_cast<const MetaBmpScaleAction&>(rAct).GetPoint(),
static_cast<const MetaBmpScaleAction&>(rAct).GetSize() );
break;
- case META_BMPSCALEPART_ACTION:
+ case MetaActionType::BMPSCALEPART:
aActionBounds = Rectangle( static_cast<const MetaBmpScalePartAction&>(rAct).GetDestPoint(),
static_cast<const MetaBmpScalePartAction&>(rAct).GetDestSize() );
break;
- case META_BMPEX_ACTION:
+ case MetaActionType::BMPEX:
aActionBounds = Rectangle( static_cast<const MetaBmpExAction&>(rAct).GetPoint(),
rOut.PixelToLogic( static_cast<const MetaBmpExAction&>(rAct).GetBitmapEx().GetSizePixel() ) );
break;
- case META_BMPEXSCALE_ACTION:
+ case MetaActionType::BMPEXSCALE:
aActionBounds = Rectangle( static_cast<const MetaBmpExScaleAction&>(rAct).GetPoint(),
static_cast<const MetaBmpExScaleAction&>(rAct).GetSize() );
break;
- case META_BMPEXSCALEPART_ACTION:
+ case MetaActionType::BMPEXSCALEPART:
aActionBounds = Rectangle( static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestPoint(),
static_cast<const MetaBmpExScalePartAction&>(rAct).GetDestSize() );
break;
- case META_MASK_ACTION:
+ case MetaActionType::MASK:
aActionBounds = Rectangle( static_cast<const MetaMaskAction&>(rAct).GetPoint(),
rOut.PixelToLogic( static_cast<const MetaMaskAction&>(rAct).GetBitmap().GetSizePixel() ) );
break;
- case META_MASKSCALE_ACTION:
+ case MetaActionType::MASKSCALE:
aActionBounds = Rectangle( static_cast<const MetaMaskScaleAction&>(rAct).GetPoint(),
static_cast<const MetaMaskScaleAction&>(rAct).GetSize() );
break;
- case META_MASKSCALEPART_ACTION:
+ case MetaActionType::MASKSCALEPART:
aActionBounds = Rectangle( static_cast<const MetaMaskScalePartAction&>(rAct).GetDestPoint(),
static_cast<const MetaMaskScalePartAction&>(rAct).GetDestSize() );
break;
- case META_GRADIENT_ACTION:
+ case MetaActionType::GRADIENT:
aActionBounds = static_cast<const MetaGradientAction&>(rAct).GetRect();
break;
- case META_GRADIENTEX_ACTION:
+ case MetaActionType::GRADIENTEX:
aActionBounds = static_cast<const MetaGradientExAction&>(rAct).GetPolyPolygon().GetBoundRect();
break;
- case META_HATCH_ACTION:
+ case MetaActionType::HATCH:
aActionBounds = static_cast<const MetaHatchAction&>(rAct).GetPolyPolygon().GetBoundRect();
break;
- case META_WALLPAPER_ACTION:
+ case MetaActionType::WALLPAPER:
aActionBounds = static_cast<const MetaWallpaperAction&>(rAct).GetRect();
break;
- case META_TRANSPARENT_ACTION:
+ case MetaActionType::TRANSPARENT:
aActionBounds = static_cast<const MetaTransparentAction&>(rAct).GetPolyPolygon().GetBoundRect();
break;
- case META_FLOATTRANSPARENT_ACTION:
+ case MetaActionType::FLOATTRANSPARENT:
aActionBounds = Rectangle( static_cast<const MetaFloatTransparentAction&>(rAct).GetPoint(),
static_cast<const MetaFloatTransparentAction&>(rAct).GetSize() );
break;
- case META_EPS_ACTION:
+ case MetaActionType::EPS:
aActionBounds = Rectangle( static_cast<const MetaEPSAction&>(rAct).GetPoint(),
static_cast<const MetaEPSAction&>(rAct).GetSize() );
break;
- case META_TEXT_ACTION:
+ case MetaActionType::TEXT:
{
const MetaTextAction& rTextAct = static_cast<const MetaTextAction&>(rAct);
const OUString aString( rTextAct.GetText().copy(rTextAct.GetIndex(), rTextAct.GetLen()) );
@@ -578,7 +578,7 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut
}
break;
- case META_TEXTARRAY_ACTION:
+ case MetaActionType::TEXTARRAY:
{
const MetaTextArrayAction& rTextAct = static_cast<const MetaTextArrayAction&>(rAct);
const OUString aString( rTextAct.GetText().copy(rTextAct.GetIndex(), rTextAct.GetLen()) );
@@ -599,11 +599,11 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut
}
break;
- case META_TEXTRECT_ACTION:
+ case MetaActionType::TEXTRECT:
aActionBounds = static_cast<const MetaTextRectAction&>(rAct).GetRect();
break;
- case META_STRETCHTEXT_ACTION:
+ case MetaActionType::STRETCHTEXT:
{
const MetaStretchTextAction& rTextAct = static_cast<const MetaStretchTextAction&>(rAct);
const OUString aString( rTextAct.GetText().copy(rTextAct.GetIndex(), rTextAct.GetLen()) );
@@ -629,8 +629,8 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut
}
break;
- case META_TEXTLINE_ACTION:
- OSL_FAIL("META_TEXTLINE_ACTION not supported");
+ case MetaActionType::TEXTLINE:
+ OSL_FAIL("MetaActionType::TEXTLINE not supported");
break;
default:
@@ -760,7 +760,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
{
switch( pCurrAct->GetType() )
{
- case META_RECT_ACTION:
+ case MetaActionType::RECT:
{
if( !checkRect(
aBackgroundComponent.aBounds,
@@ -772,7 +772,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
nLastBgAction=nActionNum; // this _is_ background
break;
}
- case META_POLYGON_ACTION:
+ case MetaActionType::POLYGON:
{
const Polygon aPoly(
static_cast<const MetaPolygonAction*>(pCurrAct)->GetPolygon());
@@ -788,7 +788,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
nLastBgAction=nActionNum; // this _is_ background
break;
}
- case META_POLYPOLYGON_ACTION:
+ case MetaActionType::POLYPOLYGON:
{
const tools::PolyPolygon aPoly(
static_cast<const MetaPolyPolygonAction*>(pCurrAct)->GetPolyPolygon());
@@ -805,7 +805,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
nLastBgAction=nActionNum; // this _is_ background
break;
}
- case META_WALLPAPER_ACTION:
+ case MetaActionType::WALLPAPER:
{
if( !checkRect(
aBackgroundComponent.aBounds,
@@ -1203,9 +1203,9 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
aPaintVDev->EnableOutput(true);
// but process every action
- const sal_uInt16 nType( pCurrAct->GetType() );
+ const MetaActionType nType( pCurrAct->GetType() );
- if( META_MAPMODE_ACTION == nType )
+ if( MetaActionType::MAPMODE == nType )
{
pCurrAct->Execute( aMapVDev.get() );
@@ -1215,12 +1215,12 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
aMtfMap.SetOrigin( Point( -aNewOrg.X(), -aNewOrg.Y() ) );
aPaintVDev->SetMapMode( aMtfMap );
}
- else if( ( META_PUSH_ACTION == nType ) || ( META_POP_ACTION ) == nType )
+ else if( ( MetaActionType::PUSH == nType ) || ( MetaActionType::POP ) == nType )
{
pCurrAct->Execute( aMapVDev.get() );
pCurrAct->Execute( aPaintVDev.get() );
}
- else if( META_GRADIENT_ACTION == nType )
+ else if( MetaActionType::GRADIENT == nType )
{
MetaGradientAction* pGradientAction = static_cast<MetaGradientAction*>(pCurrAct);
Printer* pPrinter = dynamic_cast< Printer* >(this);
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 01c279fb181f..71e6afc54a74 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -36,18 +36,18 @@
void OutputDevice::DrawBitmap( const Point& rDestPt, const Bitmap& rBitmap )
{
const Size aSizePix( rBitmap.GetSizePixel() );
- DrawBitmap( rDestPt, PixelToLogic( aSizePix ), Point(), aSizePix, rBitmap, META_BMP_ACTION );
+ DrawBitmap( rDestPt, PixelToLogic( aSizePix ), Point(), aSizePix, rBitmap, MetaActionType::BMP );
}
void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize, const Bitmap& rBitmap )
{
- DrawBitmap( rDestPt, rDestSize, Point(), rBitmap.GetSizePixel(), rBitmap, META_BMPSCALE_ACTION );
+ DrawBitmap( rDestPt, rDestSize, Point(), rBitmap.GetSizePixel(), rBitmap, MetaActionType::BMPSCALE );
}
void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
- const Bitmap& rBitmap, const sal_uLong nAction )
+ const Bitmap& rBitmap, const MetaActionType nAction )
{
if( ImplIsRecordLayout() )
return;
@@ -98,18 +98,20 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
{
switch( nAction )
{
- case( META_BMP_ACTION ):
+ case( MetaActionType::BMP ):
mpMetaFile->AddAction( new MetaBmpAction( rDestPt, aBmp ) );
break;
- case( META_BMPSCALE_ACTION ):
+ case( MetaActionType::BMPSCALE ):
mpMetaFile->AddAction( new MetaBmpScaleAction( rDestPt, rDestSize, aBmp ) );
break;
- case( META_BMPSCALEPART_ACTION ):
+ case( MetaActionType::BMPSCALEPART ):
mpMetaFile->AddAction( new MetaBmpScalePartAction(
rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel, aBmp ) );
break;
+
+ default: break;
}
}
@@ -142,7 +144,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
if ( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight )
{
- if ( nAction == META_BMPSCALE_ACTION )
+ if ( nAction == MetaActionType::BMPSCALE )
ScaleBitmap (aBmp, aPosAry);
mpGraphics->DrawBitmap( aPosAry, *aBmp.ImplGetImpBitmap()->ImplGetSalBitmap(), this );
@@ -237,7 +239,7 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt,
else
{
const Size aSizePix( rBitmapEx.GetSizePixel() );
- DrawBitmapEx( rDestPt, PixelToLogic( aSizePix ), Point(), aSizePix, rBitmapEx, META_BMPEX_ACTION );
+ DrawBitmapEx( rDestPt, PixelToLogic( aSizePix ), Point(), aSizePix, rBitmapEx, MetaActionType::BMPEX );
}
}
@@ -253,14 +255,14 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
}
else
{
- DrawBitmapEx( rDestPt, rDestSize, Point(), rBitmapEx.GetSizePixel(), rBitmapEx, META_BMPEXSCALE_ACTION );
+ DrawBitmapEx( rDestPt, rDestSize, Point(), rBitmapEx.GetSizePixel(), rBitmapEx, MetaActionType::BMPEXSCALE );
}
}
void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
- const BitmapEx& rBitmapEx, const sal_uLong nAction )
+ const BitmapEx& rBitmapEx, const MetaActionType nAction )
{
if( ImplIsRecordLayout() )
@@ -328,18 +330,20 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
{
switch( nAction )
{
- case( META_BMPEX_ACTION ):
+ case( MetaActionType::BMPEX ):
mpMetaFile->AddAction( new MetaBmpExAction( rDestPt, aBmpEx ) );
break;
- case( META_BMPEXSCALE_ACTION ):
+ case( MetaActionType::BMPEXSCALE ):
mpMetaFile->AddAction( new MetaBmpExScaleAction( rDestPt, rDestSize, aBmpEx ) );
break;
- case( META_BMPEXSCALEPART_ACTION ):
+ case( MetaActionType::BMPEXSCALEPART ):
mpMetaFile->AddAction( new MetaBmpExScalePartAction( rDestPt, rDestSize,
rSrcPtPixel, rSrcSizePixel, aBmpEx ) );
break;
+
+ default: break;
}
}
diff --git a/vcl/source/outdev/mask.cxx b/vcl/source/outdev/mask.cxx
index 9f6b55f9d14b..b61115ea31eb 100644
--- a/vcl/source/outdev/mask.cxx
+++ b/vcl/source/outdev/mask.cxx
@@ -34,19 +34,19 @@ void OutputDevice::DrawMask( const Point& rDestPt,
const Bitmap& rBitmap, const Color& rMaskColor )
{
const Size aSizePix( rBitmap.GetSizePixel() );
- DrawMask( rDestPt, PixelToLogic( aSizePix ), Point(), aSizePix, rBitmap, rMaskColor, META_MASK_ACTION );
+ DrawMask( rDestPt, PixelToLogic( aSizePix ), Point(), aSizePix, rBitmap, rMaskColor, MetaActionType::MASK );
}
void OutputDevice::DrawMask( const Point& rDestPt, const Size& rDestSize,
const Bitmap& rBitmap, const Color& rMaskColor )
{
- DrawMask( rDestPt, rDestSize, Point(), rBitmap.GetSizePixel(), rBitmap, rMaskColor, META_MASKSCALE_ACTION );
+ DrawMask( rDestPt, rDestSize, Point(), rBitmap.GetSizePixel(), rBitmap, rMaskColor, MetaActionType::MASKSCALE );
}
void OutputDevice::DrawMask( const Point& rDestPt, const Size& rDestSize,
const Point& rSrcPtPixel, const Size& rSrcSizePixel,
const Bitmap& rBitmap, const Color& rMaskColor,
- const sal_uLong nAction )
+ const MetaActionType nAction )
{
if( ImplIsRecordLayout() )
return;
@@ -61,20 +61,22 @@ void OutputDevice::DrawMask( const Point& rDestPt, const Size& rDestSize,
{
switch( nAction )
{
- case( META_MASK_ACTION ):
+ case( MetaActionType::MASK ):
mpMetaFile->AddAction( new MetaMaskAction( rDestPt,
rBitmap, rMaskColor ) );
break;
- case( META_MASKSCALE_ACTION ):
+ case( MetaActionType::MASKSCALE ):
mpMetaFile->AddAction( new MetaMaskScaleAction( rDestPt,
rDestSize, rBitmap, rMaskColor ) );
break;
- case( META_MASKSCALEPART_ACTION ):
+ case( MetaActionType::MASKSCALEPART ):
mpMetaFile->AddAction( new MetaMaskScalePartAction( rDestPt, rDestSize,
rSrcPtPixel, rSrcSizePixel, rBitmap, rMaskColor ) );
break;
+
+ default: break;
}
}
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index d371f8ec8d95..b142dd2dc30b 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1858,7 +1858,7 @@ void OutputDevice::DrawText( const Rectangle& rRect, const OUString& rOrigStr, s
return;
// temporarily disable mtf action generation (ImplDrawText _does_
- // create META_TEXT_ACTIONs otherwise)
+ // create MetaActionType::TEXTs otherwise)
GDIMetaFile* pMtf = mpMetaFile;
if ( !bDecomposeTextRectAction )
mpMetaFile = NULL;
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 69236f8146e9..17eccc28748f 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -204,7 +204,7 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask
Bitmap aBandBmp(aPaint);
aBandBmp.Crop(*aRectIter);
- DrawBitmap(aMapPt, aMapSz, Point(), aBandBmp.GetSizePixel(), aBandBmp, META_BMPSCALEPART_ACTION);
+ DrawBitmap(aMapPt, aMapSz, Point(), aBandBmp.GetSizePixel(), aBandBmp, MetaActionType::BMPSCALEPART);
}
mbMap = bOldMap;