summaryrefslogtreecommitdiff
path: root/svtools/source/filter.vcl/wmf/emfwr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/filter.vcl/wmf/emfwr.cxx')
-rw-r--r--svtools/source/filter.vcl/wmf/emfwr.cxx254
1 files changed, 127 insertions, 127 deletions
diff --git a/svtools/source/filter.vcl/wmf/emfwr.cxx b/svtools/source/filter.vcl/wmf/emfwr.cxx
index c87ad02ed63e..ab59f1bf332e 100644
--- a/svtools/source/filter.vcl/wmf/emfwr.cxx
+++ b/svtools/source/filter.vcl/wmf/emfwr.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -137,33 +137,33 @@
#define WIN_EMR_POLYTEXTOUTA 96
#define WIN_EMR_POLYTEXTOUTW 97
-#define WIN_SRCCOPY 0x00CC0020L
-#define WIN_SRCPAINT 0x00EE0086L
-#define WIN_SRCAND 0x008800C6L
-#define WIN_SRCINVERT 0x00660046L
+#define WIN_SRCCOPY 0x00CC0020L
+#define WIN_SRCPAINT 0x00EE0086L
+#define WIN_SRCAND 0x008800C6L
+#define WIN_SRCINVERT 0x00660046L
-#define HANDLE_INVALID 0xffffffff
-#define MAXHANDLES 65000
+#define HANDLE_INVALID 0xffffffff
+#define MAXHANDLES 65000
-#define LINE_SELECT 0x00000001
-#define FILL_SELECT 0x00000002
-#define TEXT_SELECT 0x00000004
+#define LINE_SELECT 0x00000001
+#define FILL_SELECT 0x00000002
+#define TEXT_SELECT 0x00000004
/* Text Alignment Options */
-#define TA_NOUPDATECP 0
-#define TA_UPDATECP 1
+#define TA_NOUPDATECP 0
+#define TA_UPDATECP 1
-#define TA_LEFT 0
-#define TA_RIGHT 2
-#define TA_CENTER 6
+#define TA_LEFT 0
+#define TA_RIGHT 2
+#define TA_CENTER 6
-#define TA_TOP 0
-#define TA_BOTTOM 8
-#define TA_BASELINE 24
-#define TA_RTLREADING 256
-#define TA_MASK (TA_BASELINE+TA_CENTER+TA_UPDATECP+TA_RTLREADING)
+#define TA_TOP 0
+#define TA_BOTTOM 8
+#define TA_BASELINE 24
+#define TA_RTLREADING 256
+#define TA_MASK (TA_BASELINE+TA_CENTER+TA_UPDATECP+TA_RTLREADING)
-#define MM_ANISOTROPIC 8
+#define MM_ANISOTROPIC 8
// -------------
// - EMFWriter -
@@ -178,21 +178,21 @@ BOOL EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfig
mnHorTextAlign = mnHandleCount = mnLastPercent = mnRecordPos = mnRecordCount = 0;
mnLineHandle = mnFillHandle = mnTextHandle = HANDLE_INVALID;
mbRecordOpen = FALSE;
-
+
mpStm = &rOStm;
maVDev.EnableOutput( FALSE );
maVDev.SetMapMode( rMtf.GetPrefMapMode() );
mpFilterConfigItem = pFilterConfigItem;
// don't work with pixel as destination map mode -> higher resolution preferrable
- maDestMapMode.SetMapUnit( MAP_100TH_MM );
+ maDestMapMode.SetMapUnit( MAP_100TH_MM );
const Size aMtfSizePix( maVDev.LogicToPixel( rMtf.GetPrefSize(), rMtf.GetPrefMapMode() ) );
const Size aMtfSizeLog( maVDev.LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MAP_100TH_MM ) );
-
+
// seek over header
// use [MS-EMF 2.2.11] HeaderExtension2 Object, otherwise resulting EMF cannot be converted with GetWinMetaFileBits()
- rOStm.SeekRel( 108 );
+ rOStm.SeekRel( 108 );
// write initial values
@@ -227,16 +227,16 @@ BOOL EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfig
ImplWrite( rMtf );
ImplBeginRecord( WIN_EMR_EOF );
- (*mpStm)<< (sal_uInt32)0 // nPalEntries
- << (sal_uInt32)0x10 // offPalEntries
- << (sal_uInt32)0x14; // nSizeLast
+ (*mpStm)<< (sal_uInt32)0 // nPalEntries
+ << (sal_uInt32)0x10 // offPalEntries
+ << (sal_uInt32)0x14; // nSizeLast
ImplEndRecord();
// write header
const ULONG nEndPos = mpStm->Tell(); mpStm->Seek( nHeaderPos );
-
- (*mpStm) << (UINT32) 0x00000001 << (UINT32) 108 //use [MS-EMF 2.2.11] HeaderExtension2 Object
+
+ (*mpStm) << (UINT32) 0x00000001 << (UINT32) 108 //use [MS-EMF 2.2.11] HeaderExtension2 Object
<< (INT32) 0 << (INT32) 0 << (INT32) ( aMtfSizePix.Width() - 1 ) << (INT32) ( aMtfSizePix.Height() - 1 )
<< (INT32) 0 << (INT32) 0 << (INT32) ( aMtfSizeLog.Width() - 1 ) << (INT32) ( aMtfSizeLog.Height() - 1 )
<< (UINT32) 0x464d4520 << (UINT32) 0x10000 << (UINT32) ( nEndPos - nHeaderPos )
@@ -247,7 +247,7 @@ BOOL EMFWriter::WriteEMF( const GDIMetaFile& rMtf, SvStream& rOStm, FilterConfig
<< (INT32) ( aMtfSizeLog.Width() * 10 ) << (INT32) ( aMtfSizeLog.Height() * 10 ); //use [MS-EMF 2.2.11] HeaderExtension2 Object
mpStm->Seek( nEndPos );
- delete[] mpHandlesUsed;
+ delete[] mpHandlesUsed;
return( mpStm->GetError() == ERRCODE_NONE );
}
@@ -308,7 +308,7 @@ void EMFWriter::ImplEndRecord()
sal_Int32 nFillBytes, nActPos = mpStm->Tell();
mpStm->Seek( mnRecordPos + 4 );
nFillBytes = nActPos - mnRecordPos;
- nFillBytes += 3; // each record has to be dword aligned
+ nFillBytes += 3; // each record has to be dword aligned
nFillBytes ^= 3;
nFillBytes &= 3;
*mpStm << (sal_uInt32)( ( nActPos - mnRecordPos ) + nFillBytes );
@@ -328,7 +328,7 @@ BOOL EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, ULONG nSelectType
{
UINT32 nStockObject = 0x80000000;
- if( LINE_SELECT == nSelectType )
+ if( LINE_SELECT == nSelectType )
nStockObject |= 0x00000007;
else if( FILL_SELECT == nSelectType )
nStockObject |= 0x00000001;
@@ -339,13 +339,13 @@ BOOL EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, ULONG nSelectType
ImplBeginRecord( WIN_EMR_SELECTOBJECT );
( *mpStm ) << nStockObject;
ImplEndRecord();
-
+
// destroy handle of created object
ImplBeginRecord( WIN_EMR_DELETEOBJECT );
( *mpStm ) << rHandle;
ImplEndRecord();
- // mark handle as free
+ // mark handle as free
ImplReleaseHandle( rHandle );
}
@@ -401,11 +401,11 @@ void EMFWriter::ImplCheckTextAttr()
{
if( mbTextChanged && ImplPrepareHandleSelect( mnTextHandle, TEXT_SELECT ) )
{
- const Font& rFont = maVDev.GetFont();
- String aFontName( rFont.GetName() );
- sal_Int32 nWeight;
- sal_uInt16 i;
- sal_uInt8 nPitchAndFamily;
+ const Font& rFont = maVDev.GetFont();
+ String aFontName( rFont.GetName() );
+ sal_Int32 nWeight;
+ sal_uInt16 i;
+ sal_uInt8 nPitchAndFamily;
ImplBeginRecord( WIN_EMR_EXTCREATEFONTINDIRECTW );
(*mpStm) << mnTextHandle;
@@ -413,7 +413,7 @@ void EMFWriter::ImplCheckTextAttr()
ImplWriteExtent( rFont.GetSize().Width() );
(*mpStm) << (INT32) rFont.GetOrientation() << (INT32) rFont.GetOrientation();
- switch( rFont.GetWeight() )
+ switch( rFont.GetWeight() )
{
case WEIGHT_THIN: nWeight = 100; break;
case WEIGHT_ULTRALIGHT: nWeight = 200; break;
@@ -425,9 +425,9 @@ void EMFWriter::ImplCheckTextAttr()
case WEIGHT_BOLD: nWeight = 700; break;
case WEIGHT_ULTRABOLD: nWeight = 800; break;
case WEIGHT_BLACK: nWeight = 900; break;
- default: nWeight = 0; break;
+ default: nWeight = 0; break;
}
-
+
(*mpStm) << nWeight;
(*mpStm) << (BYTE) ( ( ITALIC_NONE == rFont.GetItalic() ) ? 0 : 1 );
(*mpStm) << (BYTE) ( ( UNDERLINE_NONE == rFont.GetUnderline() ) ? 0 : 1 );
@@ -435,14 +435,14 @@ void EMFWriter::ImplCheckTextAttr()
(*mpStm) << (BYTE) ( ( RTL_TEXTENCODING_SYMBOL == rFont.GetCharSet() ) ? 2 : 0 );
(*mpStm) << (BYTE) 0 << (BYTE) 0 << (BYTE) 0;
- switch( rFont.GetPitch() )
+ switch( rFont.GetPitch() )
{
case PITCH_FIXED: nPitchAndFamily = 0x01; break;
case PITCH_VARIABLE: nPitchAndFamily = 0x02; break;
default: nPitchAndFamily = 0x00; break;
}
- switch( rFont.GetFamily() )
+ switch( rFont.GetFamily() )
{
case FAMILY_DECORATIVE: nPitchAndFamily |= 0x50; break;
case FAMILY_MODERN: nPitchAndFamily |= 0x30; break;
@@ -528,8 +528,8 @@ void EMFWriter::ImplWriteRasterOp( RasterOp eRop )
switch( eRop )
{
- case ROP_INVERT: nROP2 = 6; break;
- case ROP_XOR: nROP2 = 7; break;
+ case ROP_INVERT: nROP2 = 6; break;
+ case ROP_XOR: nROP2 = 7; break;
default: nROP2 = 13;break;
}
@@ -609,8 +609,8 @@ void EMFWriter::ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly )
ImplWritePolygonRecord( rPolyPoly[ 0 ], TRUE );
else
{
- sal_Bool bHasFlags = sal_False;
- sal_uInt32 nTotalPoints = 0;
+ sal_Bool bHasFlags = sal_False;
+ sal_uInt32 nTotalPoints = 0;
for( i = 0; i < nPolyCount; i++ )
{
@@ -674,12 +674,12 @@ void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed )
n++;
continue;
}
-
+
sal_uInt16 nBezPoints = 0;
-
+
while ( ( ( nBezPoints + n + 2 ) < rPoly.GetSize() ) && ( rPoly.GetFlags( nBezPoints + n ) == POLY_CONTROL ) )
nBezPoints += 3;
-
+
if ( nBezPoints )
{
ImplBeginRecord( WIN_EMR_POLYBEZIERTO );
@@ -699,12 +699,12 @@ void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed )
sal_uInt16 nPoints = 1;
while( ( nPoints + n ) < rPoly.GetSize() && ( rPoly.GetFlags( nPoints + n ) != POLY_CONTROL ) )
nPoints++;
-
+
if ( nPoints > 1 )
{
ImplBeginRecord( WIN_EMR_POLYLINETO );
Polygon aNewPoly( nPoints + 1 );
- aNewPoly[ 0 ] = rPoly[ n - 1];
+ aNewPoly[ 0 ] = rPoly[ n - 1];
for ( o = 1; o <= nPoints; o++ )
aNewPoly[ o ] = rPoly[ n - 1 + o ];
ImplWriteRect( aNewPoly.GetBoundRect() );
@@ -737,19 +737,19 @@ void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed )
// -----------------------------------------------------------------------------
-void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
+void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
const Size& rSz, UINT32 nROP )
{
if( !!rBmp )
{
- SvMemoryStream aMemStm( 65535, 65535 );
- const Size aBmpSizePixel( rBmp.GetSizePixel() );
+ SvMemoryStream aMemStm( 65535, 65535 );
+ const Size aBmpSizePixel( rBmp.GetSizePixel() );
ImplBeginRecord( WIN_EMR_STRETCHDIBITS );
ImplWriteRect( Rectangle( rPt, rSz ) );
ImplWritePoint( rPt );
(*mpStm) << (INT32) 0 << (INT32) 0 << (INT32) aBmpSizePixel.Width() << (INT32) aBmpSizePixel.Height();
-
+
// write offset positions and sizes later
const ULONG nOffPos = mpStm->Tell();
mpStm->SeekRel( 16 );
@@ -759,8 +759,8 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
rBmp.Write( aMemStm, TRUE, FALSE );
- UINT32 nDIBSize = aMemStm.Tell(), nHeaderSize, nCompression, nColsUsed, nPalCount, nImageSize;
- UINT16 nBitCount;
+ UINT32 nDIBSize = aMemStm.Tell(), nHeaderSize, nCompression, nColsUsed, nPalCount, nImageSize;
+ UINT16 nBitCount;
// get DIB parameters
aMemStm.Seek( 0 );
@@ -770,7 +770,7 @@ void EMFWriter::ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt,
aMemStm.SeekRel( 8 );
aMemStm >> nColsUsed;
- nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (UINT32) nBitCount ) ) :
+ nPalCount = ( nBitCount <= 8 ) ? ( nColsUsed ? nColsUsed : ( 1 << (UINT32) nBitCount ) ) :
( ( 3 == nCompression ) ? 12 : 0 );
mpStm->Write( aMemStm.GetData(), nDIBSize );
@@ -793,9 +793,9 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const String rText, cons
if( nLen )
{
- sal_uInt32 nNormWidth;
- sal_Int32* pOwnArray;
- sal_Int32* pDX;
+ sal_uInt32 nNormWidth;
+ sal_Int32* pOwnArray;
+ sal_Int32* pDX;
// get text sizes
if( pDXArray )
@@ -805,7 +805,7 @@ void EMFWriter::ImplWriteTextRecord( const Point& rPos, const String rText, cons
pDX = (sal_Int32*) pDXArray;
}
else
- {
+ {
pOwnArray = new sal_Int32[ nLen ];
nNormWidth = maVDev.GetTextArray( rText, pOwnArray );
pDX = pOwnArray;
@@ -905,12 +905,12 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
for( ULONG j = 0, nActionCount = rMtf.GetActionCount(); j < nActionCount; j++ )
{
- const MetaAction* pAction = rMtf.GetAction( j );
- const USHORT nType = pAction->GetType();
+ const MetaAction* pAction = rMtf.GetAction( j );
+ const USHORT nType = pAction->GetType();
switch( nType )
{
- case( META_PIXEL_ACTION ):
+ case( META_PIXEL_ACTION ):
{
const MetaPixelAction* pA = (const MetaPixelAction*) pAction;
@@ -922,7 +922,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case( META_POINT_ACTION ):
+ case( META_POINT_ACTION ):
{
if( maVDev.IsLineColor() )
{
@@ -946,7 +946,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
if(pA->GetLineInfo().IsDefault())
{
ImplCheckLineAttr();
-
+
ImplBeginRecord( WIN_EMR_MOVETOEX );
ImplWritePoint( pA->GetStartPoint() );
ImplEndRecord();
@@ -988,7 +988,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case( META_ROUNDRECT_ACTION ):
+ case( META_ROUNDRECT_ACTION ):
{
if( maVDev.IsLineColor() || maVDev.IsFillColor() )
{
@@ -1023,7 +1023,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case( META_ARC_ACTION ):
case( META_PIE_ACTION ):
- case( META_CHORD_ACTION ):
+ case( META_CHORD_ACTION ):
case( META_POLYGON_ACTION ):
{
if( maVDev.IsLineColor() || maVDev.IsFillColor() )
@@ -1046,13 +1046,13 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
break;
- case( META_CHORD_ACTION ):
+ case( META_CHORD_ACTION ):
{
const MetaChordAction* pA = (const MetaChordAction*) pAction;
aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD );
}
break;
-
+
case( META_POLYGON_ACTION ):
aPoly = ( (const MetaPolygonAction*) pAction )->GetPolygon();
break;
@@ -1067,8 +1067,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
if( maVDev.IsLineColor() )
{
- const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pAction;
- const Polygon& rPoly = pA->GetPolygon();
+ const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pAction;
+ const Polygon& rPoly = pA->GetPolygon();
if( rPoly.GetSize() )
{
@@ -1095,8 +1095,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case( META_GRADIENT_ACTION ):
{
- const MetaGradientAction* pA = (const MetaGradientAction*) pAction;
- GDIMetaFile aTmpMtf;
+ const MetaGradientAction* pA = (const MetaGradientAction*) pAction;
+ GDIMetaFile aTmpMtf;
maVDev.AddGradientActions( pA->GetRect(), pA->GetGradient(), aTmpMtf );
ImplWrite( aTmpMtf );
@@ -1105,8 +1105,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_HATCH_ACTION:
{
- const MetaHatchAction* pA = (const MetaHatchAction*) pAction;
- GDIMetaFile aTmpMtf;
+ const MetaHatchAction* pA = (const MetaHatchAction*) pAction;
+ GDIMetaFile aTmpMtf;
maVDev.AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf );
ImplWrite( aTmpMtf );
@@ -1124,15 +1124,15 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_FLOATTRANSPARENT_ACTION:
{
const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pAction;
-
- GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() );
- Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() );
- const Size aSrcSize( aTmpMtf.GetPrefSize() );
- const Point aDestPt( pA->GetPoint() );
- const Size aDestSize( pA->GetSize() );
- const double fScaleX = aSrcSize.Width() ? (double) aDestSize.Width() / aSrcSize.Width() : 1.0;
- const double fScaleY = aSrcSize.Height() ? (double) aDestSize.Height() / aSrcSize.Height() : 1.0;
- long nMoveX, nMoveY;
+
+ GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() );
+ Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() );
+ const Size aSrcSize( aTmpMtf.GetPrefSize() );
+ const Point aDestPt( pA->GetPoint() );
+ const Size aDestSize( pA->GetSize() );
+ const double fScaleX = aSrcSize.Width() ? (double) aDestSize.Width() / aSrcSize.Width() : 1.0;
+ const double fScaleY = aSrcSize.Height() ? (double) aDestSize.Height() / aSrcSize.Height() : 1.0;
+ long nMoveX, nMoveY;
if( fScaleX != 1.0 || fScaleY != 1.0 )
{
@@ -1154,8 +1154,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case( META_EPS_ACTION ):
{
- const MetaEPSAction* pA = (const MetaEPSAction*) pAction;
- const GDIMetaFile aSubstitute( pA->GetSubstitute() );
+ const MetaEPSAction* pA = (const MetaEPSAction*) pAction;
+ const GDIMetaFile aSubstitute( pA->GetSubstitute() );
for( ULONG i = 0, nCount = aSubstitute.GetActionCount(); i < nCount; i++ )
{
@@ -1166,7 +1166,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
ImplBeginRecord( WIN_EMR_SAVEDC );
ImplEndRecord();
- MapMode aMapMode( aSubstitute.GetPrefMapMode() );
+ MapMode aMapMode( aSubstitute.GetPrefMapMode() );
Size aOutSize( maVDev.LogicToLogic( pA->GetSize(), maVDev.GetMapMode(), aMapMode ) );
aMapMode.SetScaleX( Fraction( aOutSize.Width(), aSubstitute.GetPrefSize().Width() ) );
aMapMode.SetScaleY( Fraction( aOutSize.Height(), aSubstitute.GetPrefSize().Height() ) );
@@ -1200,8 +1200,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_BMPSCALEPART_ACTION:
{
- const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pAction;
- Bitmap aTmp( pA->GetBitmap() );
+ const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pAction;
+ Bitmap aTmp( pA->GetBitmap() );
if( aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ) )
ImplWriteBmpRecord( aTmp, pA->GetDestPoint(), pA->GetDestSize(), WIN_SRCCOPY );
@@ -1210,9 +1210,9 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_BMPEX_ACTION:
{
- const MetaBmpExAction* pA = (const MetaBmpExAction *) pAction;
- Bitmap aBmp( pA->GetBitmapEx().GetBitmap() );
- Bitmap aMsk( pA->GetBitmapEx().GetMask() );
+ const MetaBmpExAction* pA = (const MetaBmpExAction *) pAction;
+ Bitmap aBmp( pA->GetBitmapEx().GetBitmap() );
+ Bitmap aMsk( pA->GetBitmapEx().GetMask() );
if( !!aMsk )
{
@@ -1228,9 +1228,9 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_BMPEXSCALE_ACTION:
{
- const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pAction;
- Bitmap aBmp( pA->GetBitmapEx().GetBitmap() );
- Bitmap aMsk( pA->GetBitmapEx().GetMask() );
+ const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pAction;
+ Bitmap aBmp( pA->GetBitmapEx().GetBitmap() );
+ Bitmap aMsk( pA->GetBitmapEx().GetMask() );
if( !!aMsk )
{
@@ -1246,11 +1246,11 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_BMPEXSCALEPART_ACTION:
{
- const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pAction;
- BitmapEx aBmpEx( pA->GetBitmapEx() );
+ const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pAction;
+ BitmapEx aBmpEx( pA->GetBitmapEx() );
aBmpEx.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) );
- Bitmap aBmp( aBmpEx.GetBitmap() );
- Bitmap aMsk( aBmpEx.GetMask() );
+ Bitmap aBmp( aBmpEx.GetBitmap() );
+ Bitmap aMsk( aBmpEx.GetMask() );
if( !!aMsk )
{
@@ -1266,8 +1266,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_TEXT_ACTION:
{
- const MetaTextAction* pA = (const MetaTextAction*) pAction;
- const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() );
+ const MetaTextAction* pA = (const MetaTextAction*) pAction;
+ const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() );
ImplCheckTextAttr();
ImplWriteTextRecord( pA->GetPoint(), aText, NULL, 0 );
@@ -1276,8 +1276,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_TEXTRECT_ACTION:
{
- const MetaTextRectAction* pA = (const MetaTextRectAction*) pAction;
- const String aText( pA->GetText() );
+ const MetaTextRectAction* pA = (const MetaTextRectAction*) pAction;
+ const String aText( pA->GetText() );
ImplCheckTextAttr();
ImplWriteTextRecord( pA->GetRect().TopLeft(), aText, NULL, 0 );
@@ -1286,8 +1286,8 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_TEXTARRAY_ACTION:
{
- const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction;
- const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() );
+ const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pAction;
+ const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() );
ImplCheckTextAttr();
ImplWriteTextRecord( pA->GetPoint(), aText, pA->GetDXArray(), 0 );
@@ -1296,32 +1296,32 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case META_STRETCHTEXT_ACTION:
{
- const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pAction;
- const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() );
+ const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pAction;
+ const String aText( pA->GetText(), pA->GetIndex(), pA->GetLen() );
ImplCheckTextAttr();
ImplWriteTextRecord( pA->GetPoint(), aText, NULL, pA->GetWidth() );
}
break;
-
- case( META_LINECOLOR_ACTION ):
+
+ case( META_LINECOLOR_ACTION ):
{
( (MetaAction*) pAction )->Execute( &maVDev );
mbLineChanged = TRUE;
}
break;
-
- case( META_FILLCOLOR_ACTION ):
+
+ case( META_FILLCOLOR_ACTION ):
{
( (MetaAction*) pAction )->Execute( &maVDev );
mbFillChanged = TRUE;
}
break;
- case( META_TEXTCOLOR_ACTION ):
+ case( META_TEXTCOLOR_ACTION ):
case( META_TEXTLINECOLOR_ACTION ):
- case( META_TEXTFILLCOLOR_ACTION ):
- case( META_TEXTALIGN_ACTION ):
+ case( META_TEXTFILLCOLOR_ACTION ):
+ case( META_TEXTALIGN_ACTION ):
case( META_FONT_ACTION ):
{
( (MetaAction*) pAction )->Execute( &maVDev );
@@ -1332,7 +1332,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case( META_ISECTRECTCLIPREGION_ACTION ):
{
( (MetaAction*) pAction )->Execute( &maVDev );
-
+
ImplBeginRecord( WIN_EMR_INTERSECTCLIPRECT );
ImplWriteRect( ( (MetaISectRectClipRegionAction*) pAction )->GetRect() );
ImplEndRecord();
@@ -1340,7 +1340,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
break;
case( META_CLIPREGION_ACTION ):
- case( META_ISECTREGIONCLIPREGION_ACTION ):
+ case( META_ISECTREGIONCLIPREGION_ACTION ):
case( META_MOVECLIPREGION_ACTION ):
{
( (MetaAction*) pAction )->Execute( &maVDev );
@@ -1355,7 +1355,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case( META_PUSH_ACTION ):
{
( (MetaAction*) pAction )->Execute( &maVDev );
-
+
ImplBeginRecord( WIN_EMR_SAVEDC );
ImplEndRecord();
}
@@ -1364,11 +1364,11 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
case( META_POP_ACTION ):
{
( (MetaAction*) pAction )->Execute( &maVDev );
-
+
ImplBeginRecord( WIN_EMR_RESTOREDC );
(*mpStm) << (INT32) -1;
ImplEndRecord();
-
+
ImplWriteRasterOp( maVDev.GetRasterOp() );
mbLineChanged = mbFillChanged = mbTextChanged = TRUE;
}
@@ -1397,9 +1397,9 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
}
case( META_MASK_ACTION ):
- case( META_MASKSCALE_ACTION ):
- case( META_MASKSCALEPART_ACTION ):
- case( META_WALLPAPER_ACTION ):
+ case( META_MASKSCALE_ACTION ):
+ case( META_MASKSCALEPART_ACTION ):
+ case( META_WALLPAPER_ACTION ):
case( META_TEXTLINE_ACTION ):
case( META_COMMENT_ACTION ):
case( META_GRADIENTEX_ACTION ):