LibreOffice Module emfio (master) 1
Namespaces | Macros | Functions | Variables
emfreader.cxx File Reference
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
#include <emfreader.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <vcl/dibtools.hxx>
#include <o3tl/safeint.hxx>
#include <o3tl/sprintf.hxx>
#include <tools/stream.hxx>
#include <memory>
#include <unotools/configmgr.hxx>
#include <vcl/graph.hxx>
#include <vcl/pdfread.hxx>
#include <rtl/bootstrap.hxx>
#include <vcl/filter/PngImageWriter.hxx>
Include dependency graph for emfreader.cxx:

Go to the source code of this file.

Namespaces

namespace  emfio
 

Macros

#define EMR_HEADER   1
 
#define EMR_POLYBEZIER   2
 
#define EMR_POLYGON   3
 
#define EMR_POLYLINE   4
 
#define EMR_POLYBEZIERTO   5
 
#define EMR_POLYLINETO   6
 
#define EMR_POLYPOLYLINE   7
 
#define EMR_POLYPOLYGON   8
 
#define EMR_SETWINDOWEXTEX   9
 
#define EMR_SETWINDOWORGEX   10
 
#define EMR_SETVIEWPORTEXTEX   11
 
#define EMR_SETVIEWPORTORGEX   12
 
#define EMR_SETBRUSHORGEX   13
 
#define EMR_EOF   14
 
#define EMR_SETPIXELV   15
 
#define EMR_SETMAPPERFLAGS   16
 
#define EMR_SETMAPMODE   17
 
#define EMR_SETBKMODE   18
 
#define EMR_SETPOLYFILLMODE   19
 
#define EMR_SETROP2   20
 
#define EMR_SETSTRETCHBLTMODE   21
 
#define EMR_SETTEXTALIGN   22
 
#define EMR_SETCOLORADJUSTMENT   23
 
#define EMR_SETTEXTCOLOR   24
 
#define EMR_SETBKCOLOR   25
 
#define EMR_OFFSETCLIPRGN   26
 
#define EMR_MOVETOEX   27
 
#define EMR_SETMETARGN   28
 
#define EMR_EXCLUDECLIPRECT   29
 
#define EMR_INTERSECTCLIPRECT   30
 
#define EMR_SCALEVIEWPORTEXTEX   31
 
#define EMR_SCALEWINDOWEXTEX   32
 
#define EMR_SAVEDC   33
 
#define EMR_RESTOREDC   34
 
#define EMR_SETWORLDTRANSFORM   35
 
#define EMR_MODIFYWORLDTRANSFORM   36
 
#define EMR_SELECTOBJECT   37
 
#define EMR_CREATEPEN   38
 
#define EMR_CREATEBRUSHINDIRECT   39
 
#define EMR_DELETEOBJECT   40
 
#define EMR_ANGLEARC   41
 
#define EMR_ELLIPSE   42
 
#define EMR_RECTANGLE   43
 
#define EMR_ROUNDRECT   44
 
#define EMR_ARC   45
 
#define EMR_CHORD   46
 
#define EMR_PIE   47
 
#define EMR_SELECTPALETTE   48
 
#define EMR_CREATEPALETTE   49
 
#define EMR_SETPALETTEENTRIES   50
 
#define EMR_RESIZEPALETTE   51
 
#define EMR_REALIZEPALETTE   52
 
#define EMR_EXTFLOODFILL   53
 
#define EMR_LINETO   54
 
#define EMR_ARCTO   55
 
#define EMR_POLYDRAW   56
 
#define EMR_SETARCDIRECTION   57
 
#define EMR_SETMITERLIMIT   58
 
#define EMR_BEGINPATH   59
 
#define EMR_ENDPATH   60
 
#define EMR_CLOSEFIGURE   61
 
#define EMR_FILLPATH   62
 
#define EMR_STROKEANDFILLPATH   63
 
#define EMR_STROKEPATH   64
 
#define EMR_FLATTENPATH   65
 
#define EMR_WIDENPATH   66
 
#define EMR_SELECTCLIPPATH   67
 
#define EMR_ABORTPATH   68
 
#define EMR_COMMENT   70
 
#define EMR_COMMENT_EMFPLUS   0x2B464D45
 
#define EMR_COMMENT_EMFSPOOL   0x00000000
 
#define EMR_COMMENT_PUBLIC   0x43494447
 
#define EMR_FILLRGN   71
 
#define EMR_FRAMERGN   72
 
#define EMR_INVERTRGN   73
 
#define EMR_PAINTRGN   74
 
#define EMR_EXTSELECTCLIPRGN   75
 
#define EMR_BITBLT   76
 
#define EMR_STRETCHBLT   77
 
#define EMR_MASKBLT   78
 
#define EMR_PLGBLT   79
 
#define EMR_SETDIBITSTODEVICE   80
 
#define EMR_STRETCHDIBITS   81
 
#define EMR_EXTCREATEFONTINDIRECTW   82
 
#define EMR_EXTTEXTOUTA   83
 
#define EMR_EXTTEXTOUTW   84
 
#define EMR_POLYBEZIER16   85
 
#define EMR_POLYGON16   86
 
#define EMR_POLYLINE16   87
 
#define EMR_POLYBEZIERTO16   88
 
#define EMR_POLYLINETO16   89
 
#define EMR_POLYPOLYLINE16   90
 
#define EMR_POLYPOLYGON16   91
 
#define EMR_POLYDRAW16   92
 
#define EMR_CREATEMONOBRUSH   93
 
#define EMR_CREATEDIBPATTERNBRUSHPT   94
 
#define EMR_EXTCREATEPEN   95
 
#define EMR_POLYTEXTOUTA   96
 
#define EMR_POLYTEXTOUTW   97
 
#define EMR_SETICMMODE   98
 
#define EMR_CREATECOLORSPACE   99
 
#define EMR_SETCOLORSPACE   100
 
#define EMR_DELETECOLORSPACE   101
 
#define EMR_GLSRECORD   102
 
#define EMR_GLSBOUNDEDRECORD   103
 
#define EMR_PIXELFORMAT   104
 
#define EMR_DRAWESCAPE   105
 
#define EMR_EXTESCAPE   106
 
#define EMR_STARTDOC   107
 
#define EMR_SMALLTEXTOUT   108
 
#define EMR_FORCEUFIMAPPING   109
 
#define EMR_NAMEDESCAPE   110
 
#define EMR_COLORCORRECTPALETTE   111
 
#define EMR_SETICMPROFILEA   112
 
#define EMR_SETICMPROFILEW   113
 
#define EMR_ALPHABLEND   114
 
#define EMR_ALPHADIBBLEND   115
 
#define EMR_TRANSPARENTBLT   116
 
#define EMR_TRANSPARENTDIB   117
 
#define EMR_GRADIENTFILL   118
 
#define EMR_SETLINKEDUFIS   119
 
#define EMR_SETTEXTJUSTIFICATION   120
 
#define PDF_SIGNATURE   0x50444620
 

Functions

static SvStreamemfio::operator>> (SvStream &rStream, sal_Int16 &n)
 
static SvStreamemfio::operator>> (SvStream &rStream, sal_Int32 &n)
 

Variables

constexpr sal_Int32 ARCDIRECTION_CLOCKWISE = 0x00000002
 
const sal_uInt32 emfio::EMR_COMMENT_BEGINGROUP = 0x00000002
 
const sal_uInt32 emfio::EMR_COMMENT_ENDGROUP = 0x00000003
 
const sal_uInt32 emfio::EMR_COMMENT_MULTIFORMATS = 0x40000004
 
const sal_uInt32 emfio::EMR_COMMENT_WINDOWS_METAFILE = 0x80000001
 

Macro Definition Documentation

◆ EMR_ABORTPATH

#define EMR_ABORTPATH   68

Definition at line 107 of file emfreader.cxx.

◆ EMR_ALPHABLEND

#define EMR_ALPHABLEND   114

Definition at line 162 of file emfreader.cxx.

◆ EMR_ALPHADIBBLEND

#define EMR_ALPHADIBBLEND   115

Definition at line 163 of file emfreader.cxx.

◆ EMR_ANGLEARC

#define EMR_ANGLEARC   41

Definition at line 80 of file emfreader.cxx.

◆ EMR_ARC

#define EMR_ARC   45

Definition at line 84 of file emfreader.cxx.

◆ EMR_ARCTO

#define EMR_ARCTO   55

Definition at line 94 of file emfreader.cxx.

◆ EMR_BEGINPATH

#define EMR_BEGINPATH   59

Definition at line 98 of file emfreader.cxx.

◆ EMR_BITBLT

#define EMR_BITBLT   76

Definition at line 120 of file emfreader.cxx.

◆ EMR_CHORD

#define EMR_CHORD   46

Definition at line 85 of file emfreader.cxx.

◆ EMR_CLOSEFIGURE

#define EMR_CLOSEFIGURE   61

Definition at line 100 of file emfreader.cxx.

◆ EMR_COLORCORRECTPALETTE

#define EMR_COLORCORRECTPALETTE   111

Definition at line 159 of file emfreader.cxx.

◆ EMR_COMMENT

#define EMR_COMMENT   70

Definition at line 109 of file emfreader.cxx.

◆ EMR_COMMENT_EMFPLUS

#define EMR_COMMENT_EMFPLUS   0x2B464D45

Definition at line 111 of file emfreader.cxx.

◆ EMR_COMMENT_EMFSPOOL

#define EMR_COMMENT_EMFSPOOL   0x00000000

Definition at line 112 of file emfreader.cxx.

◆ EMR_COMMENT_PUBLIC

#define EMR_COMMENT_PUBLIC   0x43494447

Definition at line 113 of file emfreader.cxx.

◆ EMR_CREATEBRUSHINDIRECT

#define EMR_CREATEBRUSHINDIRECT   39

Definition at line 78 of file emfreader.cxx.

◆ EMR_CREATECOLORSPACE

#define EMR_CREATECOLORSPACE   99

Definition at line 145 of file emfreader.cxx.

◆ EMR_CREATEDIBPATTERNBRUSHPT

#define EMR_CREATEDIBPATTERNBRUSHPT   94

Definition at line 138 of file emfreader.cxx.

◆ EMR_CREATEMONOBRUSH

#define EMR_CREATEMONOBRUSH   93

Definition at line 137 of file emfreader.cxx.

◆ EMR_CREATEPALETTE

#define EMR_CREATEPALETTE   49

Definition at line 88 of file emfreader.cxx.

◆ EMR_CREATEPEN

#define EMR_CREATEPEN   38

Definition at line 77 of file emfreader.cxx.

◆ EMR_DELETECOLORSPACE

#define EMR_DELETECOLORSPACE   101

Definition at line 147 of file emfreader.cxx.

◆ EMR_DELETEOBJECT

#define EMR_DELETEOBJECT   40

Definition at line 79 of file emfreader.cxx.

◆ EMR_DRAWESCAPE

#define EMR_DRAWESCAPE   105

Definition at line 153 of file emfreader.cxx.

◆ EMR_ELLIPSE

#define EMR_ELLIPSE   42

Definition at line 81 of file emfreader.cxx.

◆ EMR_ENDPATH

#define EMR_ENDPATH   60

Definition at line 99 of file emfreader.cxx.

◆ EMR_EOF

#define EMR_EOF   14

Definition at line 53 of file emfreader.cxx.

◆ EMR_EXCLUDECLIPRECT

#define EMR_EXCLUDECLIPRECT   29

Definition at line 68 of file emfreader.cxx.

◆ EMR_EXTCREATEFONTINDIRECTW

#define EMR_EXTCREATEFONTINDIRECTW   82

Definition at line 126 of file emfreader.cxx.

◆ EMR_EXTCREATEPEN

#define EMR_EXTCREATEPEN   95

Definition at line 139 of file emfreader.cxx.

◆ EMR_EXTESCAPE

#define EMR_EXTESCAPE   106

Definition at line 154 of file emfreader.cxx.

◆ EMR_EXTFLOODFILL

#define EMR_EXTFLOODFILL   53

Definition at line 92 of file emfreader.cxx.

◆ EMR_EXTSELECTCLIPRGN

#define EMR_EXTSELECTCLIPRGN   75

Definition at line 119 of file emfreader.cxx.

◆ EMR_EXTTEXTOUTA

#define EMR_EXTTEXTOUTA   83

Definition at line 127 of file emfreader.cxx.

◆ EMR_EXTTEXTOUTW

#define EMR_EXTTEXTOUTW   84

Definition at line 128 of file emfreader.cxx.

◆ EMR_FILLPATH

#define EMR_FILLPATH   62

Definition at line 101 of file emfreader.cxx.

◆ EMR_FILLRGN

#define EMR_FILLRGN   71

Definition at line 115 of file emfreader.cxx.

◆ EMR_FLATTENPATH

#define EMR_FLATTENPATH   65

Definition at line 104 of file emfreader.cxx.

◆ EMR_FORCEUFIMAPPING

#define EMR_FORCEUFIMAPPING   109

Definition at line 157 of file emfreader.cxx.

◆ EMR_FRAMERGN

#define EMR_FRAMERGN   72

Definition at line 116 of file emfreader.cxx.

◆ EMR_GLSBOUNDEDRECORD

#define EMR_GLSBOUNDEDRECORD   103

Definition at line 149 of file emfreader.cxx.

◆ EMR_GLSRECORD

#define EMR_GLSRECORD   102

Definition at line 148 of file emfreader.cxx.

◆ EMR_GRADIENTFILL

#define EMR_GRADIENTFILL   118

Definition at line 166 of file emfreader.cxx.

◆ EMR_HEADER

#define EMR_HEADER   1

Definition at line 40 of file emfreader.cxx.

◆ EMR_INTERSECTCLIPRECT

#define EMR_INTERSECTCLIPRECT   30

Definition at line 69 of file emfreader.cxx.

◆ EMR_INVERTRGN

#define EMR_INVERTRGN   73

Definition at line 117 of file emfreader.cxx.

◆ EMR_LINETO

#define EMR_LINETO   54

Definition at line 93 of file emfreader.cxx.

◆ EMR_MASKBLT

#define EMR_MASKBLT   78

Definition at line 122 of file emfreader.cxx.

◆ EMR_MODIFYWORLDTRANSFORM

#define EMR_MODIFYWORLDTRANSFORM   36

Definition at line 75 of file emfreader.cxx.

◆ EMR_MOVETOEX

#define EMR_MOVETOEX   27

Definition at line 66 of file emfreader.cxx.

◆ EMR_NAMEDESCAPE

#define EMR_NAMEDESCAPE   110

Definition at line 158 of file emfreader.cxx.

◆ EMR_OFFSETCLIPRGN

#define EMR_OFFSETCLIPRGN   26

Definition at line 65 of file emfreader.cxx.

◆ EMR_PAINTRGN

#define EMR_PAINTRGN   74

Definition at line 118 of file emfreader.cxx.

◆ EMR_PIE

#define EMR_PIE   47

Definition at line 86 of file emfreader.cxx.

◆ EMR_PIXELFORMAT

#define EMR_PIXELFORMAT   104

Definition at line 150 of file emfreader.cxx.

◆ EMR_PLGBLT

#define EMR_PLGBLT   79

Definition at line 123 of file emfreader.cxx.

◆ EMR_POLYBEZIER

#define EMR_POLYBEZIER   2

Definition at line 41 of file emfreader.cxx.

◆ EMR_POLYBEZIER16

#define EMR_POLYBEZIER16   85

Definition at line 129 of file emfreader.cxx.

◆ EMR_POLYBEZIERTO

#define EMR_POLYBEZIERTO   5

Definition at line 44 of file emfreader.cxx.

◆ EMR_POLYBEZIERTO16

#define EMR_POLYBEZIERTO16   88

Definition at line 132 of file emfreader.cxx.

◆ EMR_POLYDRAW

#define EMR_POLYDRAW   56

Definition at line 95 of file emfreader.cxx.

◆ EMR_POLYDRAW16

#define EMR_POLYDRAW16   92

Definition at line 136 of file emfreader.cxx.

◆ EMR_POLYGON

#define EMR_POLYGON   3

Definition at line 42 of file emfreader.cxx.

◆ EMR_POLYGON16

#define EMR_POLYGON16   86

Definition at line 130 of file emfreader.cxx.

◆ EMR_POLYLINE

#define EMR_POLYLINE   4

Definition at line 43 of file emfreader.cxx.

◆ EMR_POLYLINE16

#define EMR_POLYLINE16   87

Definition at line 131 of file emfreader.cxx.

◆ EMR_POLYLINETO

#define EMR_POLYLINETO   6

Definition at line 45 of file emfreader.cxx.

◆ EMR_POLYLINETO16

#define EMR_POLYLINETO16   89

Definition at line 133 of file emfreader.cxx.

◆ EMR_POLYPOLYGON

#define EMR_POLYPOLYGON   8

Definition at line 47 of file emfreader.cxx.

◆ EMR_POLYPOLYGON16

#define EMR_POLYPOLYGON16   91

Definition at line 135 of file emfreader.cxx.

◆ EMR_POLYPOLYLINE

#define EMR_POLYPOLYLINE   7

Definition at line 46 of file emfreader.cxx.

◆ EMR_POLYPOLYLINE16

#define EMR_POLYPOLYLINE16   90

Definition at line 134 of file emfreader.cxx.

◆ EMR_POLYTEXTOUTA

#define EMR_POLYTEXTOUTA   96

Definition at line 140 of file emfreader.cxx.

◆ EMR_POLYTEXTOUTW

#define EMR_POLYTEXTOUTW   97

Definition at line 141 of file emfreader.cxx.

◆ EMR_REALIZEPALETTE

#define EMR_REALIZEPALETTE   52

Definition at line 91 of file emfreader.cxx.

◆ EMR_RECTANGLE

#define EMR_RECTANGLE   43

Definition at line 82 of file emfreader.cxx.

◆ EMR_RESIZEPALETTE

#define EMR_RESIZEPALETTE   51

Definition at line 90 of file emfreader.cxx.

◆ EMR_RESTOREDC

#define EMR_RESTOREDC   34

Definition at line 73 of file emfreader.cxx.

◆ EMR_ROUNDRECT

#define EMR_ROUNDRECT   44

Definition at line 83 of file emfreader.cxx.

◆ EMR_SAVEDC

#define EMR_SAVEDC   33

Definition at line 72 of file emfreader.cxx.

◆ EMR_SCALEVIEWPORTEXTEX

#define EMR_SCALEVIEWPORTEXTEX   31

Definition at line 70 of file emfreader.cxx.

◆ EMR_SCALEWINDOWEXTEX

#define EMR_SCALEWINDOWEXTEX   32

Definition at line 71 of file emfreader.cxx.

◆ EMR_SELECTCLIPPATH

#define EMR_SELECTCLIPPATH   67

Definition at line 106 of file emfreader.cxx.

◆ EMR_SELECTOBJECT

#define EMR_SELECTOBJECT   37

Definition at line 76 of file emfreader.cxx.

◆ EMR_SELECTPALETTE

#define EMR_SELECTPALETTE   48

Definition at line 87 of file emfreader.cxx.

◆ EMR_SETARCDIRECTION

#define EMR_SETARCDIRECTION   57

Definition at line 96 of file emfreader.cxx.

◆ EMR_SETBKCOLOR

#define EMR_SETBKCOLOR   25

Definition at line 64 of file emfreader.cxx.

◆ EMR_SETBKMODE

#define EMR_SETBKMODE   18

Definition at line 57 of file emfreader.cxx.

◆ EMR_SETBRUSHORGEX

#define EMR_SETBRUSHORGEX   13

Definition at line 52 of file emfreader.cxx.

◆ EMR_SETCOLORADJUSTMENT

#define EMR_SETCOLORADJUSTMENT   23

Definition at line 62 of file emfreader.cxx.

◆ EMR_SETCOLORSPACE

#define EMR_SETCOLORSPACE   100

Definition at line 146 of file emfreader.cxx.

◆ EMR_SETDIBITSTODEVICE

#define EMR_SETDIBITSTODEVICE   80

Definition at line 124 of file emfreader.cxx.

◆ EMR_SETICMMODE

#define EMR_SETICMMODE   98

Definition at line 144 of file emfreader.cxx.

◆ EMR_SETICMPROFILEA

#define EMR_SETICMPROFILEA   112

Definition at line 160 of file emfreader.cxx.

◆ EMR_SETICMPROFILEW

#define EMR_SETICMPROFILEW   113

Definition at line 161 of file emfreader.cxx.

◆ EMR_SETLINKEDUFIS

#define EMR_SETLINKEDUFIS   119

Definition at line 167 of file emfreader.cxx.

◆ EMR_SETMAPMODE

#define EMR_SETMAPMODE   17

Definition at line 56 of file emfreader.cxx.

◆ EMR_SETMAPPERFLAGS

#define EMR_SETMAPPERFLAGS   16

Definition at line 55 of file emfreader.cxx.

◆ EMR_SETMETARGN

#define EMR_SETMETARGN   28

Definition at line 67 of file emfreader.cxx.

◆ EMR_SETMITERLIMIT

#define EMR_SETMITERLIMIT   58

Definition at line 97 of file emfreader.cxx.

◆ EMR_SETPALETTEENTRIES

#define EMR_SETPALETTEENTRIES   50

Definition at line 89 of file emfreader.cxx.

◆ EMR_SETPIXELV

#define EMR_SETPIXELV   15

Definition at line 54 of file emfreader.cxx.

◆ EMR_SETPOLYFILLMODE

#define EMR_SETPOLYFILLMODE   19

Definition at line 58 of file emfreader.cxx.

◆ EMR_SETROP2

#define EMR_SETROP2   20

Definition at line 59 of file emfreader.cxx.

◆ EMR_SETSTRETCHBLTMODE

#define EMR_SETSTRETCHBLTMODE   21

Definition at line 60 of file emfreader.cxx.

◆ EMR_SETTEXTALIGN

#define EMR_SETTEXTALIGN   22

Definition at line 61 of file emfreader.cxx.

◆ EMR_SETTEXTCOLOR

#define EMR_SETTEXTCOLOR   24

Definition at line 63 of file emfreader.cxx.

◆ EMR_SETTEXTJUSTIFICATION

#define EMR_SETTEXTJUSTIFICATION   120

Definition at line 168 of file emfreader.cxx.

◆ EMR_SETVIEWPORTEXTEX

#define EMR_SETVIEWPORTEXTEX   11

Definition at line 50 of file emfreader.cxx.

◆ EMR_SETVIEWPORTORGEX

#define EMR_SETVIEWPORTORGEX   12

Definition at line 51 of file emfreader.cxx.

◆ EMR_SETWINDOWEXTEX

#define EMR_SETWINDOWEXTEX   9

Definition at line 48 of file emfreader.cxx.

◆ EMR_SETWINDOWORGEX

#define EMR_SETWINDOWORGEX   10

Definition at line 49 of file emfreader.cxx.

◆ EMR_SETWORLDTRANSFORM

#define EMR_SETWORLDTRANSFORM   35

Definition at line 74 of file emfreader.cxx.

◆ EMR_SMALLTEXTOUT

#define EMR_SMALLTEXTOUT   108

Definition at line 156 of file emfreader.cxx.

◆ EMR_STARTDOC

#define EMR_STARTDOC   107

Definition at line 155 of file emfreader.cxx.

◆ EMR_STRETCHBLT

#define EMR_STRETCHBLT   77

Definition at line 121 of file emfreader.cxx.

◆ EMR_STRETCHDIBITS

#define EMR_STRETCHDIBITS   81

Definition at line 125 of file emfreader.cxx.

◆ EMR_STROKEANDFILLPATH

#define EMR_STROKEANDFILLPATH   63

Definition at line 102 of file emfreader.cxx.

◆ EMR_STROKEPATH

#define EMR_STROKEPATH   64

Definition at line 103 of file emfreader.cxx.

◆ EMR_TRANSPARENTBLT

#define EMR_TRANSPARENTBLT   116

Definition at line 164 of file emfreader.cxx.

◆ EMR_TRANSPARENTDIB

#define EMR_TRANSPARENTDIB   117

Definition at line 165 of file emfreader.cxx.

◆ EMR_WIDENPATH

#define EMR_WIDENPATH   66

Definition at line 105 of file emfreader.cxx.

◆ PDF_SIGNATURE

#define PDF_SIGNATURE   0x50444620

Definition at line 170 of file emfreader.cxx.

Variable Documentation

◆ ARCDIRECTION_CLOCKWISE

constexpr sal_Int32 ARCDIRECTION_CLOCKWISE = 0x00000002
constexpr

Definition at line 173 of file emfreader.cxx.

Referenced by emfio::EmfReader::ReadEnhWMF().