summaryrefslogtreecommitdiff
path: root/svtools/source/filter.vcl/wmf/winmtf.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/filter.vcl/wmf/winmtf.hxx')
-rw-r--r--svtools/source/filter.vcl/wmf/winmtf.hxx724
1 files changed, 362 insertions, 362 deletions
diff --git a/svtools/source/filter.vcl/wmf/winmtf.hxx b/svtools/source/filter.vcl/wmf/winmtf.hxx
index db9d44aca0f5..9f2a1b344381 100644
--- a/svtools/source/filter.vcl/wmf/winmtf.hxx
+++ b/svtools/source/filter.vcl/wmf/winmtf.hxx
@@ -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
@@ -57,140 +57,140 @@
#define SIMPLEREGION 2
#define COMPLEXREGION 3
-#define RGN_AND 1
-#define RGN_OR 2
-#define RGN_XOR 3
-#define RGN_DIFF 4
-#define RGN_COPY 5
+#define RGN_AND 1
+#define RGN_OR 2
+#define RGN_XOR 3
+#define RGN_DIFF 4
+#define RGN_COPY 5
-#define TRANSPARENT 1
-#define OPAQUE 2
-#define BKMODE_LAST 2
+#define TRANSPARENT 1
+#define OPAQUE 2
+#define BKMODE_LAST 2
/* xform stuff */
-#define MWT_IDENTITY 1
-#define MWT_LEFTMULTIPLY 2
-#define MWT_RIGHTMULTIPLY 3
+#define MWT_IDENTITY 1
+#define MWT_LEFTMULTIPLY 2
+#define MWT_RIGHTMULTIPLY 3
#define ENHMETA_STOCK_OBJECT 0x80000000
/* Stock Logical Objects */
-#define WHITE_BRUSH 0
-#define LTGRAY_BRUSH 1
-#define GRAY_BRUSH 2
-#define DKGRAY_BRUSH 3
-#define BLACK_BRUSH 4
-#define NULL_BRUSH 5
-#define HOLLOW_BRUSH NULL_BRUSH
-#define WHITE_PEN 6
-#define BLACK_PEN 7
-#define NULL_PEN 8
-#define OEM_FIXED_FONT 10
-#define ANSI_FIXED_FONT 11
-#define ANSI_VAR_FONT 12
-#define SYSTEM_FONT 13
-#define DEVICE_DEFAULT_FONT 14
-#define DEFAULT_PALETTE 15
-#define SYSTEM_FIXED_FONT 16
-
-
-#define R2_BLACK 1
-#define R2_NOTMERGEPEN 2
-#define R2_MASKNOTPEN 3
-#define R2_NOTCOPYPEN 4
-#define R2_MASKPENNOT 5
-#define R2_NOT 6
-#define R2_XORPEN 7
-#define R2_NOTMASKPEN 8
-#define R2_MASKPEN 9
-#define R2_NOTXORPEN 10
-#define R2_NOP 11
-#define R2_MERGENOTPEN 12
-#define R2_COPYPEN 13
-#define R2_MERGEPENNOT 14
-#define R2_MERGEPEN 15
-#define R2_WHITE 16
+#define WHITE_BRUSH 0
+#define LTGRAY_BRUSH 1
+#define GRAY_BRUSH 2
+#define DKGRAY_BRUSH 3
+#define BLACK_BRUSH 4
+#define NULL_BRUSH 5
+#define HOLLOW_BRUSH NULL_BRUSH
+#define WHITE_PEN 6
+#define BLACK_PEN 7
+#define NULL_PEN 8
+#define OEM_FIXED_FONT 10
+#define ANSI_FIXED_FONT 11
+#define ANSI_VAR_FONT 12
+#define SYSTEM_FONT 13
+#define DEVICE_DEFAULT_FONT 14
+#define DEFAULT_PALETTE 15
+#define SYSTEM_FIXED_FONT 16
+
+
+#define R2_BLACK 1
+#define R2_NOTMERGEPEN 2
+#define R2_MASKNOTPEN 3
+#define R2_NOTCOPYPEN 4
+#define R2_MASKPENNOT 5
+#define R2_NOT 6
+#define R2_XORPEN 7
+#define R2_NOTMASKPEN 8
+#define R2_MASKPEN 9
+#define R2_NOTXORPEN 10
+#define R2_NOP 11
+#define R2_MERGENOTPEN 12
+#define R2_COPYPEN 13
+#define R2_MERGEPENNOT 14
+#define R2_MERGEPEN 15
+#define R2_WHITE 16
/* Mapping Modes */
-#define MM_TEXT 1
-#define MM_LOMETRIC 2
-#define MM_HIMETRIC 3
-#define MM_LOENGLISH 4
-#define MM_HIENGLISH 5
-#define MM_TWIPS 6
-#define MM_ISOTROPIC 7
-#define MM_ANISOTROPIC 8
+#define MM_TEXT 1
+#define MM_LOMETRIC 2
+#define MM_HIMETRIC 3
+#define MM_LOENGLISH 4
+#define MM_HIENGLISH 5
+#define MM_TWIPS 6
+#define MM_ISOTROPIC 7
+#define MM_ANISOTROPIC 8
/* Graphics Modes */
-#define GM_COMPATIBLE 1
-#define GM_ADVANCED 2
-#define GM_LAST 2
+#define GM_COMPATIBLE 1
+#define GM_ADVANCED 2
+#define GM_LAST 2
/* StretchBlt() Modes */
-#define BLACKONWHITE 1
-#define WHITEONBLACK 2
-#define COLORONCOLOR 3
-#define HALFTONE 4
-#define MAXSTRETCHBLTMODE 4
-#define STRETCH_ANDSCANS BLACKONWHITE
-#define STRETCH_ORSCANS WHITEONBLACK
-#define STRETCH_DELETESCANS COLORONCOLOR
-#define STRETCH_HALFTONE HALFTONE
-
-#define LF_FACESIZE 32
+#define BLACKONWHITE 1
+#define WHITEONBLACK 2
+#define COLORONCOLOR 3
+#define HALFTONE 4
+#define MAXSTRETCHBLTMODE 4
+#define STRETCH_ANDSCANS BLACKONWHITE
+#define STRETCH_ORSCANS WHITEONBLACK
+#define STRETCH_DELETESCANS COLORONCOLOR
+#define STRETCH_HALFTONE HALFTONE
+
+#define LF_FACESIZE 32
struct LOGFONTW
{
- INT32 lfHeight;
- INT32 lfWidth;
- INT32 lfEscapement;
- INT32 lfOrientation;
- INT32 lfWeight;
- BYTE lfItalic;
- BYTE lfUnderline;
- BYTE lfStrikeOut;
- BYTE lfCharSet;
- BYTE lfOutPrecision;
- BYTE lfClipPrecision;
- BYTE lfQuality;
- BYTE lfPitchAndFamily;
- String alfFaceName;
+ INT32 lfHeight;
+ INT32 lfWidth;
+ INT32 lfEscapement;
+ INT32 lfOrientation;
+ INT32 lfWeight;
+ BYTE lfItalic;
+ BYTE lfUnderline;
+ BYTE lfStrikeOut;
+ BYTE lfCharSet;
+ BYTE lfOutPrecision;
+ BYTE lfClipPrecision;
+ BYTE lfQuality;
+ BYTE lfPitchAndFamily;
+ String alfFaceName;
};
-#define TA_NOUPDATECP 0x0000
-#define TA_UPDATECP 0x0001
-#define TA_LEFT 0x0000
-#define TA_RIGHT 0x0002
-#define TA_CENTER 0x0006
-#define TA_RIGHT_CENTER (TA_RIGHT | TA_CENTER)
-#define TA_TOP 0x0000
-#define TA_BOTTOM 0x0008
-#define TA_BASELINE 0x0018
-
-#define SRCCOPY 0x00CC0020L
-#define SRCPAINT 0x00EE0086L
-#define SRCAND 0x008800C6L
-#define SRCINVERT 0x00660046L
-#define SRCERASE 0x00440328L
-#define NOTSRCCOPY 0x00330008L
-#define NOTSRCERASE 0x001100A6L
-#define MERGECOPY 0x00C000CAL
-#define MERGEPAINT 0x00BB0226L
-#define PATCOPY 0x00F00021L
-#define PATPAINT 0x00FB0A09L
-#define PATINVERT 0x005A0049L
-#define DSTINVERT 0x00550009L
-#define BLACKNESS 0x00000042L
-#define WHITENESS 0x00FF0062L
-
-#define PS_SOLID 0
-#define PS_DASH 1
-#define PS_DOT 2
-#define PS_DASHDOT 3
-#define PS_DASHDOTDOT 4
-#define PS_NULL 5
-#define PS_INSIDEFRAME 6
+#define TA_NOUPDATECP 0x0000
+#define TA_UPDATECP 0x0001
+#define TA_LEFT 0x0000
+#define TA_RIGHT 0x0002
+#define TA_CENTER 0x0006
+#define TA_RIGHT_CENTER (TA_RIGHT | TA_CENTER)
+#define TA_TOP 0x0000
+#define TA_BOTTOM 0x0008
+#define TA_BASELINE 0x0018
+
+#define SRCCOPY 0x00CC0020L
+#define SRCPAINT 0x00EE0086L
+#define SRCAND 0x008800C6L
+#define SRCINVERT 0x00660046L
+#define SRCERASE 0x00440328L
+#define NOTSRCCOPY 0x00330008L
+#define NOTSRCERASE 0x001100A6L
+#define MERGECOPY 0x00C000CAL
+#define MERGEPAINT 0x00BB0226L
+#define PATCOPY 0x00F00021L
+#define PATPAINT 0x00FB0A09L
+#define PATINVERT 0x005A0049L
+#define DSTINVERT 0x00550009L
+#define BLACKNESS 0x00000042L
+#define WHITENESS 0x00FF0062L
+
+#define PS_SOLID 0
+#define PS_DASH 1
+#define PS_DOT 2
+#define PS_DASHDOT 3
+#define PS_DASHDOTDOT 4
+#define PS_NULL 5
+#define PS_INSIDEFRAME 6
#define PS_USERSTYLE 7
#define PS_ALTERNATE 8
#define PS_STYLE_MASK 15
@@ -209,14 +209,14 @@ struct LOGFONTW
#define PS_GEOMETRIC 0x10000
#define PS_TYPE_MASK 0xF0000
-#define ANSI_CHARSET 0
-#define DEFAULT_CHARSET 1
-#define SYMBOL_CHARSET 2
-#define SHIFTJIS_CHARSET 128
-#define HANGEUL_CHARSET 129
-#define GB2312_CHARSET 134
-#define CHINESEBIG5_CHARSET 136
-#define OEM_CHARSET 255
+#define ANSI_CHARSET 0
+#define DEFAULT_CHARSET 1
+#define SYMBOL_CHARSET 2
+#define SHIFTJIS_CHARSET 128
+#define HANGEUL_CHARSET 129
+#define GB2312_CHARSET 134
+#define CHINESEBIG5_CHARSET 136
+#define OEM_CHARSET 255
/*WINVER >= 0x0400*/
#define JOHAB_CHARSET 130
#define HEBREW_CHARSET 177
@@ -230,70 +230,70 @@ struct LOGFONTW
#define MAC_CHARSET 77
#define BALTIC_CHARSET 186
-#define ETO_OPAQUE 0x0002
-#define ETO_CLIPPED 0x0004
+#define ETO_OPAQUE 0x0002
+#define ETO_CLIPPED 0x0004
/*WINVER >= 0x0400*/
-#define ETO_GLYPH_INDEX 0x0010
-#define ETO_RTLREADING 0x0080
-#define ETO_NUMERICSLOCAL 0x0400
-#define ETO_NUMERICSLATIN 0x0800
-#define ETO_IGNORELANGUAGE 0x1000
+#define ETO_GLYPH_INDEX 0x0010
+#define ETO_RTLREADING 0x0080
+#define ETO_NUMERICSLOCAL 0x0400
+#define ETO_NUMERICSLATIN 0x0800
+#define ETO_IGNORELANGUAGE 0x1000
/*_WIN32_WINNT >= 0x0500*/
-#define ETO_PDY 0x2000
+#define ETO_PDY 0x2000
-#define DEFAULT_PITCH 0x00
-#define FIXED_PITCH 0x01
-#define VARIABLE_PITCH 0x02
+#define DEFAULT_PITCH 0x00
+#define FIXED_PITCH 0x01
+#define VARIABLE_PITCH 0x02
/* Font Families */
-#define FF_DONTCARE 0x00
-#define FF_ROMAN 0x10
-#define FF_SWISS 0x20
-#define FF_MODERN 0x30
-#define FF_SCRIPT 0x40
-#define FF_DECORATIVE 0x50
-
-#define FW_DONTCARE 0
-#define FW_THIN 100
-#define FW_EXTRALIGHT 200
-#define FW_LIGHT 300
-#define FW_NORMAL 400
-#define FW_MEDIUM 500
-#define FW_SEMIBOLD 600
-#define FW_BOLD 700
-#define FW_EXTRABOLD 800
-#define FW_HEAVY 900
-#define FW_ULTRALIGHT 200
-#define FW_REGULAR 400
-#define FW_DEMIBOLD 600
-#define FW_ULTRABOLD 800
-#define FW_BLACK 900
-
-#define BS_SOLID 0
-#define BS_NULL 1
-#define BS_HOLLOW 1
-#define BS_HATCHED 2
-#define BS_PATTERN 3
-#define BS_INDEXED 4
-#define BS_DIBPATTERN 5
-#define BS_DIBPATTERNPT 6
-#define BS_PATTERN8X8 7
-#define BS_DIBPATTERN8X8 8
-#define BS_MONOPATTERN 9
-
-#define W_HS_HORIZONTAL 0
-#define W_HS_VERTICAL 1
-#define W_HS_FDIAGONAL 2
-#define W_HS_BDIAGONAL 3
-#define W_HS_CROSS 4
-#define W_HS_DIAGCROSS 5
+#define FF_DONTCARE 0x00
+#define FF_ROMAN 0x10
+#define FF_SWISS 0x20
+#define FF_MODERN 0x30
+#define FF_SCRIPT 0x40
+#define FF_DECORATIVE 0x50
+
+#define FW_DONTCARE 0
+#define FW_THIN 100
+#define FW_EXTRALIGHT 200
+#define FW_LIGHT 300
+#define FW_NORMAL 400
+#define FW_MEDIUM 500
+#define FW_SEMIBOLD 600
+#define FW_BOLD 700
+#define FW_EXTRABOLD 800
+#define FW_HEAVY 900
+#define FW_ULTRALIGHT 200
+#define FW_REGULAR 400
+#define FW_DEMIBOLD 600
+#define FW_ULTRABOLD 800
+#define FW_BLACK 900
+
+#define BS_SOLID 0
+#define BS_NULL 1
+#define BS_HOLLOW 1
+#define BS_HATCHED 2
+#define BS_PATTERN 3
+#define BS_INDEXED 4
+#define BS_DIBPATTERN 5
+#define BS_DIBPATTERNPT 6
+#define BS_PATTERN8X8 7
+#define BS_DIBPATTERN8X8 8
+#define BS_MONOPATTERN 9
+
+#define W_HS_HORIZONTAL 0
+#define W_HS_VERTICAL 1
+#define W_HS_FDIAGONAL 2
+#define W_HS_BDIAGONAL 3
+#define W_HS_CROSS 4
+#define W_HS_DIAGCROSS 5
#define RDH_RECTANGLES 1
-#define W_MFCOMMENT 15
+#define W_MFCOMMENT 15
-#define PRIVATE_ESCAPE_UNICODE 2
+#define PRIVATE_ESCAPE_UNICODE 2
//============================ WMFReader ==================================
@@ -304,7 +304,7 @@ struct LOGFONTW
#define WIN_MTF_ASSERT_MIFE 0x20000000
void WinMtfAssertHandler( const sal_Char*, sal_uInt32 nFlags = WIN_MTF_ASSERT_MIFE );
-#endif
+#endif
class WinMtfClipPath
{
@@ -313,10 +313,10 @@ class WinMtfClipPath
public :
WinMtfClipPath(): maClip() {};
- void setClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode );
- void intersectClipRect( const Rectangle& rRect );
- void excludeClipRect( const Rectangle& rRect );
- void moveClipRegion( const Size& rSize );
+ void setClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode );
+ void intersectClipRect( const Rectangle& rRect );
+ void excludeClipRect( const Rectangle& rRect );
+ void moveClipRegion( const Size& rSize );
bool isEmpty() const { return maClip.isCleared(); }
@@ -330,23 +330,23 @@ public :
class WinMtfPathObj : public PolyPolygon
{
- sal_Bool bClosed;
+ sal_Bool bClosed;
public :
WinMtfPathObj() { bClosed = sal_True; }
void Init() { Clear(); bClosed = sal_True; };
- void ClosePath();
+ void ClosePath();
- void AddPoint( const Point& rPoint );
- void AddPolygon( const Polygon& rPoly );
- void AddPolyLine( const Polygon& rPoly );
- void AddPolyPolygon( const PolyPolygon& rPolyPolygon );
+ void AddPoint( const Point& rPoint );
+ void AddPolygon( const Polygon& rPoly );
+ void AddPolyLine( const Polygon& rPoly );
+ void AddPolyPolygon( const PolyPolygon& rPolyPolygon );
};
struct WinMtfFontStyle
{
- Font aFont;
+ Font aFont;
WinMtfFontStyle( LOGFONTW& rLogFont );
};
@@ -360,19 +360,19 @@ typedef enum {
struct WinMtfFillStyle
{
- Color aFillColor;
- BOOL bTransparent;
+ Color aFillColor;
+ BOOL bTransparent;
WinMtfFillStyleType aType;
Bitmap aBmp;
WinMtfFillStyle() :
- aFillColor ( Color( COL_BLACK ) ),
+ aFillColor ( Color( COL_BLACK ) ),
bTransparent( FALSE )
{
};
WinMtfFillStyle( const Color& rColor, BOOL bTrans = FALSE ) :
- aFillColor ( rColor ),
+ aFillColor ( rColor ),
bTransparent( bTrans ),
aType ( FillStyleSolid )
{
@@ -396,21 +396,21 @@ struct WinMtfFillStyle
struct WinMtfLineStyle
{
- Color aLineColor;
- LineInfo aLineInfo;
- BOOL bTransparent;
+ Color aLineColor;
+ LineInfo aLineInfo;
+ BOOL bTransparent;
WinMtfLineStyle() :
- aLineColor ( COL_BLACK ),
+ aLineColor ( COL_BLACK ),
bTransparent( FALSE ) {};
WinMtfLineStyle( const Color& rColor, BOOL bTrans = FALSE ) :
- aLineColor ( rColor ),
+ aLineColor ( rColor ),
bTransparent( bTrans ) {};
WinMtfLineStyle( const Color& rColor, const LineInfo rStyle, BOOL bTrans = FALSE ) :
- aLineColor ( rColor ),
- aLineInfo ( rStyle ),
+ aLineColor ( rColor ),
+ aLineInfo ( rStyle ),
bTransparent( bTrans ) {};
BOOL operator==( const WinMtfLineStyle& rStyle ) { return ( ( aLineColor == rStyle.aLineColor ) && ( bTransparent == rStyle.bTransparent ) && ( aLineInfo == rStyle.aLineInfo ) ); };
@@ -434,12 +434,12 @@ struct WinMtfLineStyle
struct XForm
{
- float eM11;
- float eM12;
- float eM21;
- float eM22;
- float eDx;
- float eDy;
+ float eM11;
+ float eM12;
+ float eM21;
+ float eM22;
+ float eDx;
+ float eDy;
XForm()
{
eM11 = eM22 = 1.0f;
@@ -454,25 +454,25 @@ struct XForm
struct SaveStruct
{
sal_uInt32 nBkMode, nMapMode, nGfxMode, nTextLayoutMode;
- sal_Int32 nWinOrgX, nWinOrgY, nWinExtX, nWinExtY;
- sal_Int32 nDevOrgX, nDevOrgY, nDevWidth, nDevHeight;
+ sal_Int32 nWinOrgX, nWinOrgY, nWinExtX, nWinExtY;
+ sal_Int32 nDevOrgX, nDevOrgY, nDevWidth, nDevHeight;
- WinMtfLineStyle aLineStyle;
- WinMtfFillStyle aFillStyle;
+ WinMtfLineStyle aLineStyle;
+ WinMtfFillStyle aFillStyle;
- Font aFont;
- Color aBkColor;
- Color aTextColor;
+ Font aFont;
+ Color aBkColor;
+ Color aTextColor;
sal_uInt32 nTextAlign;
RasterOp eRasterOp;
- Point aActPos;
- WinMtfPathObj aPathObj;
- WinMtfClipPath aClipPath;
- XForm aXForm;
+ Point aActPos;
+ WinMtfPathObj aPathObj;
+ WinMtfClipPath aClipPath;
+ XForm aXForm;
- sal_Bool bRecordPath;
- sal_Bool bFillStyleSelected;
+ sal_Bool bRecordPath;
+ sal_Bool bFillStyleSelected;
};
typedef ::boost::shared_ptr< SaveStruct > SaveStructPtr;
@@ -481,9 +481,9 @@ typedef ::boost::shared_ptr< SaveStruct > SaveStructPtr;
struct BSaveStruct
{
- Bitmap aBmp;
- Rectangle aOutRect;
- UINT32 nWinRop;
+ Bitmap aBmp;
+ Rectangle aOutRect;
+ UINT32 nWinRop;
WinMtfFillStyle aStyle;
BSaveStruct( const Bitmap& rBmp, const Rectangle& rOutRect, UINT32 nRop, WinMtfFillStyle& rStyle ) :
@@ -496,12 +496,12 @@ enum GDIObjectType { GDI_DUMMY = 0, GDI_PEN = 1, GDI_BRUSH = 2, GDI_FONT = 3, GD
struct GDIObj
{
- void* pStyle;
- GDIObjectType eType;
+ void* pStyle;
+ GDIObjectType eType;
GDIObj() :
- pStyle ( NULL ),
- eType ( GDI_DUMMY )
+ pStyle ( NULL ),
+ eType ( GDI_DUMMY )
{
};
@@ -542,148 +542,148 @@ struct GDIObj
class WinMtfOutput
{
- WinMtfPathObj aPathObj;
- WinMtfClipPath aClipPath;
+ WinMtfPathObj aPathObj;
+ WinMtfClipPath aClipPath;
- WinMtfLineStyle maLatestLineStyle;
- WinMtfLineStyle maLineStyle;
- WinMtfFillStyle maLatestFillStyle;
- WinMtfFillStyle maFillStyle;
+ WinMtfLineStyle maLatestLineStyle;
+ WinMtfLineStyle maLineStyle;
+ WinMtfFillStyle maLatestFillStyle;
+ WinMtfFillStyle maFillStyle;
Font maLatestFont;
- Font maFont;
+ Font maFont;
sal_uInt32 mnLatestTextAlign;
sal_uInt32 mnTextAlign;
Color maLatestTextColor;
- Color maTextColor;
+ Color maTextColor;
Color maLatestBkColor;
- Color maBkColor;
- sal_uInt32 mnLatestTextLayoutMode;
- sal_uInt32 mnTextLayoutMode;
+ Color maBkColor;
+ sal_uInt32 mnLatestTextLayoutMode;
+ sal_uInt32 mnTextLayoutMode;
sal_uInt32 mnLatestBkMode;
sal_uInt32 mnBkMode;
RasterOp meLatestRasterOp;
- RasterOp meRasterOp;
+ RasterOp meRasterOp;
std::vector< GDIObj* > vGDIObj;
- Point maActPos;
+ Point maActPos;
sal_uInt32 mnRop;
sal_Bool mbNopMode;
- sal_Bool mbFillStyleSelected;
+ sal_Bool mbFillStyleSelected;
sal_Bool mbClipNeedsUpdate;
sal_Bool mbComplexClip;
std::vector< SaveStructPtr > vSaveStack;
- sal_uInt32 mnGfxMode;
+ sal_uInt32 mnGfxMode;
sal_uInt32 mnMapMode;
- XForm maXForm;
- sal_Int32 mnDevOrgX, mnDevOrgY;
- sal_Int32 mnDevWidth, mnDevHeight;
- sal_Int32 mnWinOrgX, mnWinOrgY; // aktuelles Window-Origin
- sal_Int32 mnWinExtX, mnWinExtY; // aktuelles Window-Extent
-
- sal_Int32 mnPixX, mnPixY; // Reference Device in pixel
- sal_Int32 mnMillX, mnMillY; // Reference Device in Mill
- Rectangle mrclFrame; // rectangle in logical units 1/100th mm
- Rectangle mrclBounds;
-
- GDIMetaFile* mpGDIMetaFile;
-
- void UpdateLineStyle();
- void UpdateFillStyle();
-
- Point ImplMap( const Point& rPt );
- Size ImplMap( const Size& rSz );
- Rectangle ImplMap( const Rectangle& rRectangle );
- void ImplMap( Font& rFont );
- Polygon& ImplMap( Polygon& rPolygon );
- PolyPolygon& ImplMap( PolyPolygon& rPolyPolygon );
- void ImplResizeObjectArry( UINT32 nNewEntry );
- void ImplSetNonPersistentLineColorTransparenz();
- void ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly );
- void ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx rBitmap );
+ XForm maXForm;
+ sal_Int32 mnDevOrgX, mnDevOrgY;
+ sal_Int32 mnDevWidth, mnDevHeight;
+ sal_Int32 mnWinOrgX, mnWinOrgY; // aktuelles Window-Origin
+ sal_Int32 mnWinExtX, mnWinExtY; // aktuelles Window-Extent
+
+ sal_Int32 mnPixX, mnPixY; // Reference Device in pixel
+ sal_Int32 mnMillX, mnMillY; // Reference Device in Mill
+ Rectangle mrclFrame; // rectangle in logical units 1/100th mm
+ Rectangle mrclBounds;
+
+ GDIMetaFile* mpGDIMetaFile;
+
+ void UpdateLineStyle();
+ void UpdateFillStyle();
+
+ Point ImplMap( const Point& rPt );
+ Size ImplMap( const Size& rSz );
+ Rectangle ImplMap( const Rectangle& rRectangle );
+ void ImplMap( Font& rFont );
+ Polygon& ImplMap( Polygon& rPolygon );
+ PolyPolygon& ImplMap( PolyPolygon& rPolyPolygon );
+ void ImplResizeObjectArry( UINT32 nNewEntry );
+ void ImplSetNonPersistentLineColorTransparenz();
+ void ImplDrawClippedPolyPolygon( const PolyPolygon& rPolyPoly );
+ void ImplDrawBitmap( const Point& rPos, const Size& rSize, const BitmapEx rBitmap );
public:
- void SetDevOrg( const Point& rPoint );
- void SetDevOrgOffset( INT32 nXAdd, INT32 nYAdd );
- void SetDevExt( const Size& rSize );
- void ScaleDevExt( double fX, double fY );
+ void SetDevOrg( const Point& rPoint );
+ void SetDevOrgOffset( INT32 nXAdd, INT32 nYAdd );
+ void SetDevExt( const Size& rSize );
+ void ScaleDevExt( double fX, double fY );
- void SetWinOrg( const Point& rPoint );
- void SetWinOrgOffset( INT32 nX, INT32 nY );
- void SetWinExt( const Size& rSize );
- void ScaleWinExt( double fX, double fY );
+ void SetWinOrg( const Point& rPoint );
+ void SetWinOrgOffset( INT32 nX, INT32 nY );
+ void SetWinExt( const Size& rSize );
+ void ScaleWinExt( double fX, double fY );
- void SetrclBounds( const Rectangle& rRect );
- void SetrclFrame( const Rectangle& rRect );
- void SetRefPix( const Size& rSize );
- void SetRefMill( const Size& rSize );
+ void SetrclBounds( const Rectangle& rRect );
+ void SetrclFrame( const Rectangle& rRect );
+ void SetRefPix( const Size& rSize );
+ void SetRefMill( const Size& rSize );
- sal_uInt32 GetMapMode() const { return mnMapMode; };
+ sal_uInt32 GetMapMode() const { return mnMapMode; };
void SetMapMode( sal_uInt32 mnMapMode );
- void SetWorldTransform( const XForm& rXForm );
- void ModifyWorldTransform( const XForm& rXForm, UINT32 nMode );
-
- void Push();
- void Pop();
-
- UINT32 SetRasterOp( UINT32 nRasterOp );
- void StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill );
-
- void SetGfxMode( sal_Int32 nGfxMode ){ mnGfxMode = nGfxMode; };
- sal_Int32 GetGfxMode() const { return mnGfxMode; };
- void SetBkMode( UINT32 nMode );
- void SetBkColor( const Color& rColor );
- void SetTextColor( const Color& rColor );
- void SetTextAlign( UINT32 nAlign );
- void CreateObject( GDIObjectType, void* pStyle = NULL );
- void CreateObject( INT32 nIndex, GDIObjectType, void* pStyle = NULL );
- void DeleteObject( INT32 nIndex );
- void SelectObject( INT32 nIndex );
- CharSet GetCharSet(){ return maFont.GetCharSet(); };
+ void SetWorldTransform( const XForm& rXForm );
+ void ModifyWorldTransform( const XForm& rXForm, UINT32 nMode );
+
+ void Push();
+ void Pop();
+
+ UINT32 SetRasterOp( UINT32 nRasterOp );
+ void StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill );
+
+ void SetGfxMode( sal_Int32 nGfxMode ){ mnGfxMode = nGfxMode; };
+ sal_Int32 GetGfxMode() const { return mnGfxMode; };
+ void SetBkMode( UINT32 nMode );
+ void SetBkColor( const Color& rColor );
+ void SetTextColor( const Color& rColor );
+ void SetTextAlign( UINT32 nAlign );
+ void CreateObject( GDIObjectType, void* pStyle = NULL );
+ void CreateObject( INT32 nIndex, GDIObjectType, void* pStyle = NULL );
+ void DeleteObject( INT32 nIndex );
+ void SelectObject( INT32 nIndex );
+ CharSet GetCharSet(){ return maFont.GetCharSet(); };
WinMtfFillStyle& GetFillStyle () { return maFillStyle; }
- void SetFont( const Font& rFont );
- const Font& GetFont() const;
- void SetTextLayoutMode( const sal_uInt32 nLayoutMode );
- sal_uInt32 GetTextLayoutMode() const;
-
- void ClearPath(){ aPathObj.Init(); };
- void ClosePath(){ aPathObj.ClosePath(); };
- const PolyPolygon& GetPathObj(){ return aPathObj; };
-
- void MoveTo( const Point& rPoint, sal_Bool bRecordPath = sal_False );
- void LineTo( const Point& rPoint, sal_Bool bRecordPath = sal_False );
- void DrawPixel( const Point& rSource, const Color& rColor );
- void DrawLine( const Point& rSource, const Point& rDest );
- void DrawRect( const Rectangle& rRect, BOOL bEdge = TRUE );
- void DrawRoundRect( const Rectangle& rRect, const Size& rSize );
- void DrawEllipse( const Rectangle& rRect );
- void DrawArc( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle, BOOL bDrawTo = FALSE );
- void DrawPie( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle );
- void DrawChord( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle );
- void DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath = sal_False );
- void DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordPath = sal_False );
- void DrawPolyLine( Polygon& rPolygon, sal_Bool bDrawTo = sal_False, sal_Bool bRecordPath = sal_False );
- void DrawPolyBezier( Polygon& rPolygin, sal_Bool bDrawTo = sal_False, sal_Bool bRecordPath = sal_False );
- void DrawText( Point& rPosition, String& rString, sal_Int32* pDXArry = NULL, sal_Bool bRecordPath = sal_False,
+ void SetFont( const Font& rFont );
+ const Font& GetFont() const;
+ void SetTextLayoutMode( const sal_uInt32 nLayoutMode );
+ sal_uInt32 GetTextLayoutMode() const;
+
+ void ClearPath(){ aPathObj.Init(); };
+ void ClosePath(){ aPathObj.ClosePath(); };
+ const PolyPolygon& GetPathObj(){ return aPathObj; };
+
+ void MoveTo( const Point& rPoint, sal_Bool bRecordPath = sal_False );
+ void LineTo( const Point& rPoint, sal_Bool bRecordPath = sal_False );
+ void DrawPixel( const Point& rSource, const Color& rColor );
+ void DrawLine( const Point& rSource, const Point& rDest );
+ void DrawRect( const Rectangle& rRect, BOOL bEdge = TRUE );
+ void DrawRoundRect( const Rectangle& rRect, const Size& rSize );
+ void DrawEllipse( const Rectangle& rRect );
+ void DrawArc( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle, BOOL bDrawTo = FALSE );
+ void DrawPie( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle );
+ void DrawChord( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle );
+ void DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath = sal_False );
+ void DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordPath = sal_False );
+ void DrawPolyLine( Polygon& rPolygon, sal_Bool bDrawTo = sal_False, sal_Bool bRecordPath = sal_False );
+ void DrawPolyBezier( Polygon& rPolygin, sal_Bool bDrawTo = sal_False, sal_Bool bRecordPath = sal_False );
+ void DrawText( Point& rPosition, String& rString, sal_Int32* pDXArry = NULL, sal_Bool bRecordPath = sal_False,
sal_Int32 nGraphicsMode = GM_COMPATIBLE );
- void ResolveBitmapActions( List& rSaveList );
+ void ResolveBitmapActions( List& rSaveList );
- void IntersectClipRect( const Rectangle& rRect );
- void ExcludeClipRect( const Rectangle& rRect );
- void MoveClipRegion( const Size& rSize );
- void SetClipPath( const PolyPolygon& rPolyPoly, sal_Int32 nClippingMode, sal_Bool bIsMapped );
- void UpdateClipRegion();
- void AddFromGDIMetaFile( GDIMetaFile& rGDIMetaFile );
+ void IntersectClipRect( const Rectangle& rRect );
+ void ExcludeClipRect( const Rectangle& rRect );
+ void MoveClipRegion( const Size& rSize );
+ void SetClipPath( const PolyPolygon& rPolyPoly, sal_Int32 nClippingMode, sal_Bool bIsMapped );
+ void UpdateClipRegion();
+ void AddFromGDIMetaFile( GDIMetaFile& rGDIMetaFile );
void PassEMFPlus( void* pBuffer, UINT32 nLength );
void PassEMFPlusHeaderInfo();
WinMtfOutput( GDIMetaFile& rGDIMetaFile );
- virtual ~WinMtfOutput();
+ virtual ~WinMtfOutput();
};
// -----------------------------------------------------------------------------
@@ -692,20 +692,20 @@ class WinMtf
{
protected:
- WinMtfOutput* pOut; //
- SvStream* pWMF; // Die einzulesende WMF/EMF-Datei
+ WinMtfOutput* pOut; //
+ SvStream* pWMF; // Die einzulesende WMF/EMF-Datei
- UINT32 nStartPos, nEndPos;
- List aBmpSaveList;
+ UINT32 nStartPos, nEndPos;
+ List aBmpSaveList;
- FilterConfigItem* pFilterConfigItem;
+ FilterConfigItem* pFilterConfigItem;
com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator;
// Sorgt dafuer, das aSampledBrush der aktuelle Brush des GDIMetaFiles ist.
- Color ReadColor();
- void Callback( USHORT nPercent );
+ Color ReadColor();
+ void Callback( USHORT nPercent );
WinMtf( WinMtfOutput* pOut, SvStream& rStreamWMF, FilterConfigItem* pConfigItem = NULL );
~WinMtf();
@@ -718,21 +718,21 @@ class WinMtf
class EnhWMFReader : public WinMtf
{
- sal_Bool bRecordPath;
- sal_Int32 nRecordCount;
+ sal_Bool bRecordPath;
+ sal_Int32 nRecordCount;
BOOL bEMFPlus;
- BOOL ReadHeader();
- Rectangle ReadRectangle( INT32, INT32, INT32, INT32 ); // Liesst und konvertiert ein Rechteck
- void ImplExtTextOut( BOOL bWideCharakter );
+ BOOL ReadHeader();
+ Rectangle ReadRectangle( INT32, INT32, INT32, INT32 ); // Liesst und konvertiert ein Rechteck
+ void ImplExtTextOut( BOOL bWideCharakter );
public:
EnhWMFReader( SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = NULL )
: WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ), bRecordPath( sal_False ), bEMFPlus (FALSE) {};
~EnhWMFReader();
- BOOL ReadEnhWMF();
+ BOOL ReadEnhWMF();
void ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC);
void ReadGDIComment();
};
@@ -743,47 +743,47 @@ class WMFReader : public WinMtf
{
private:
- VirtualDevice aVDev; // just for the purpose of "IsFontAvailable"
- UINT16 nUnitsPerInch;
- sal_uInt32 nRecSize;
+ VirtualDevice aVDev; // just for the purpose of "IsFontAvailable"
+ UINT16 nUnitsPerInch;
+ sal_uInt32 nRecSize;
// embedded EMF data
- SvMemoryStream* pEMFStream;
+ SvMemoryStream* pEMFStream;
// total number of comment records containing EMF data
sal_uInt32 nEMFRecCount;
-
+
// number of EMF records read
sal_uInt32 nEMFRec;
// total size of embedded EMF data
sal_uInt32 nEMFSize;
- sal_uInt32 nSkipActions;
- sal_uInt32 nCurrentAction;
- sal_uInt32 nUnicodeEscapeAction;
+ sal_uInt32 nSkipActions;
+ sal_uInt32 nCurrentAction;
+ sal_uInt32 nUnicodeEscapeAction;
// Liesst den Kopf der WMF-Datei
- BOOL ReadHeader();
+ BOOL ReadHeader();
// Liesst die Parameter des Rocords mit der Funktionsnummer nFunction.
- void ReadRecordParams( USHORT nFunction );
+ void ReadRecordParams( USHORT nFunction );
- Point ReadPoint(); // Liesst und konvertiert einen Punkt (erst X dann Y)
- Point ReadYX(); // Liesst und konvertiert einen Punkt (erst Y dann X)
- Rectangle ReadRectangle(); // Liesst und konvertiert ein Rechteck
- Size ReadYXExt();
+ Point ReadPoint(); // Liesst und konvertiert einen Punkt (erst X dann Y)
+ Point ReadYX(); // Liesst und konvertiert einen Punkt (erst Y dann X)
+ Rectangle ReadRectangle(); // Liesst und konvertiert ein Rechteck
+ Size ReadYXExt();
sal_Bool GetPlaceableBound( Rectangle& rSize, SvStream* pStrm );
public:
WMFReader( SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = NULL )
: WinMtf( new WinMtfOutput( rGDIMetaFile ), rStreamWMF, pConfigItem ) {};
-
+
~WMFReader();
// Liesst aus dem Stream eine WMF-Datei und fuellt das GDIMetaFile
- void ReadWMF();
+ void ReadWMF();
};
#endif