1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _SVX_ESCHEREX_HXX
21 #define _SVX_ESCHEREX_HXX
25 #include <boost/shared_ptr.hpp>
26 #include <tools/solar.h>
27 #include <tools/gen.hxx>
28 #include <tools/stream.hxx>
29 #include <com/sun/star/uno/Reference.h>
30 #include <svtools/grfmgr.hxx>
31 #include <com/sun/star/awt/Size.hpp>
32 #include <com/sun/star/awt/Point.hpp>
33 #include <com/sun/star/awt/Rectangle.hpp>
34 #include <com/sun/star/beans/XPropertySet.hpp>
35 #include <com/sun/star/beans/PropertyState.hpp>
36 #include <com/sun/star/beans/PropertyValue.hpp>
37 #include <com/sun/star/drawing/BitmapMode.hpp>
38 #include <com/sun/star/drawing/Hatch.hpp>
39 #include <svx/msdffdef.hxx>
40 #include "filter/msfilter/msfilterdllapi.h"
42 /*Record Name FBT-Value Instance Contents Wrd Exl PPt Ver*/
43 // In the Microsoft documentation the naming scheme is msofbt... instead of ESCHER_...
44 #define ESCHER_DggContainer 0xF000 /* per-document data X X X */
45 #define ESCHER_Dgg 0xF006 /* an FDGG and several FIDCLs X X X 0 */
46 #define ESCHER_CLSID 0xF016 /* the CLSID of the application that put the data on the clipboard C C C 0 */
47 #define ESCHER_OPT 0xF00B /* count of properties the document-wide default shape properties X X X 3 */
48 #define ESCHER_ColorMRU 0xF11A /* count of colors the colors in the MRU swatch X X X 0 */
49 #define ESCHER_SplitMenuColors 0xF11E /* count of colors the colors in the top-level split menus X X X 0 */
50 #define ESCHER_BstoreContainer 0xF001 /* count of BLIPs all images in the document (JPEGs, metafiles, etc.) X X X */
51 #define ESCHER_BSE 0xF007 /* BLIP type an FBSE (one per BLIP) X X X 2 */
52 #define ESCHER_BlipFirst 0xF018 /* range of fbts reserved for various kinds of BLIPs X X X */
53 #define ESCHER_BlipLast 0xF117 /* range of fbts reserved for various kinds of BLIPs X X X */
55 #define ESCHER_DgContainer 0xF002 /* per-sheet/page/slide data X X X */
56 #define ESCHER_Dg 0xF008 /* drawing ID an FDG X X X 0 */
57 #define ESCHER_RegroupItems 0xF118 /* count of regroup entries several FRITs X X X 0 */
58 #define ESCHER_ColorScheme 0xF120 /* count of colors the colors of the source host's color scheme C C 0 */
59 #define ESCHER_SpgrContainer 0xF003 /* several SpContainers, the first of which is the group shape itself X X X */
60 #define ESCHER_SpContainer 0xF004 /* a shape X X X */
61 #define ESCHER_Spgr 0xF009 /* an FSPGR; only present if the shape is a group shape X X X 1 */
62 #define ESCHER_Sp 0xF00A /* shape type an FSP X X X 2 */
63 //#define ESCHER_OPT 0xF00B /* count of properties a shape property table X X X 3 */
64 #define ESCHER_Textbox 0xF00C /* RTF text C C C 0 */
65 #define ESCHER_ClientTextbox 0xF00D /* host-defined the text in the textbox, in host-defined format X X X */
66 #define ESCHER_Anchor 0xF00E /* a RECT, in 100000ths of an inch C C C 0 */
67 #define ESCHER_ChildAnchor 0xF00F /* a RECT, in units relative to the parent group X X X 0 */
68 #define ESCHER_ClientAnchor 0xF010 /* host-defined the location of the shape, in a host-defined format X X X */
69 #define ESCHER_ClientData 0xF011 /* host-defined host-specific data X X X */
70 #define ESCHER_OleObject 0xF11F /* a serialized IStorage for an OLE object C C C 0 */
71 #define ESCHER_DeletedPspl 0xF11D /* an FPSPL; only present in top-level deleted shapes X 0 */
72 #define ESCHER_SolverContainer 0xF005 /* count of rules the rules governing shapes X X X */
73 #define ESCHER_ConnectorRule 0xF012 /* an FConnectorRule X X 1 */
74 #define ESCHER_AlignRule 0xF013 /* an FAlignRule X X X 0 */
75 #define ESCHER_ArcRule 0xF014 /* an FARCRU X X X 0 */
76 #define ESCHER_ClientRule 0xF015 /* host-defined host-defined */
77 #define ESCHER_CalloutRule 0xF017 /* an FCORU X X X 0 */
78 #define ESCHER_Selection 0xF119 /* an FDGSL followed by the SPIDs of the shapes in the selection X 0 */
79 #define ESCHER_UDefProp 0xF122
81 #define SHAPEFLAG_GROUP 0x001 /* This shape is a group shape */
82 #define SHAPEFLAG_CHILD 0x002 /* Not a top-level shape */
83 #define SHAPEFLAG_PATRIARCH 0x004 /* This is the topmost group shape. Exactly one of these per drawing. */
84 #define SHAPEFLAG_DELETED 0x008 /* The shape has been deleted */
85 #define SHAPEFLAG_OLESHAPE 0x010 /* The shape is an OLE object */
86 #define SHAPEFLAG_HAVEMASTER 0x020 /* Shape has a hspMaster property */
87 #define SHAPEFLAG_FLIPH 0x040 /* Shape is flipped horizontally */
88 #define SHAPEFLAG_FLIPV 0x080 /* Shape is flipped vertically */
89 #define SHAPEFLAG_CONNECTOR 0x100 /* Connector type of shape */
90 #define SHAPEFLAG_HAVEANCHOR 0x200 /* Shape has an anchor of some kind */
91 #define SHAPEFLAG_BACKGROUND 0x400 /* Background shape */
92 #define SHAPEFLAG_HAVESPT 0x800 /* Shape has a shape type property */
94 #define ESCHER_ShpInst_Min 0
95 #define ESCHER_ShpInst_NotPrimitive ESCHER_ShpInst_Min
96 #define ESCHER_ShpInst_Rectangle 1
97 #define ESCHER_ShpInst_RoundRectangle 2
98 #define ESCHER_ShpInst_Ellipse 3
99 #define ESCHER_ShpInst_Diamond 4
100 #define ESCHER_ShpInst_IsocelesTriangle 5
101 #define ESCHER_ShpInst_RightTriangle 6
102 #define ESCHER_ShpInst_Parallelogram 7
103 #define ESCHER_ShpInst_Trapezoid 8
104 #define ESCHER_ShpInst_Hexagon 9
105 #define ESCHER_ShpInst_Octagon 10
106 #define ESCHER_ShpInst_Plus 11
107 #define ESCHER_ShpInst_Star 12
108 #define ESCHER_ShpInst_Arrow 13
109 #define ESCHER_ShpInst_ThickArrow 14
110 #define ESCHER_ShpInst_HomePlate 15
111 #define ESCHER_ShpInst_Cube 16
112 #define ESCHER_ShpInst_Balloon 17
113 #define ESCHER_ShpInst_Seal 18
114 #define ESCHER_ShpInst_Arc 19
115 #define ESCHER_ShpInst_Line 20
116 #define ESCHER_ShpInst_Plaque 21
117 #define ESCHER_ShpInst_Can 22
118 #define ESCHER_ShpInst_Donut 23
119 #define ESCHER_ShpInst_TextSimple 24
120 #define ESCHER_ShpInst_TextOctagon 25
121 #define ESCHER_ShpInst_TextHexagon 26
122 #define ESCHER_ShpInst_TextCurve 27
123 #define ESCHER_ShpInst_TextWave 28
124 #define ESCHER_ShpInst_TextRing 29
125 #define ESCHER_ShpInst_TextOnCurve 30
126 #define ESCHER_ShpInst_TextOnRing 31
127 #define ESCHER_ShpInst_StraightConnector1 32
128 #define ESCHER_ShpInst_BentConnector2 33
129 #define ESCHER_ShpInst_BentConnector3 34
130 #define ESCHER_ShpInst_BentConnector4 35
131 #define ESCHER_ShpInst_BentConnector5 36
132 #define ESCHER_ShpInst_CurvedConnector2 37
133 #define ESCHER_ShpInst_CurvedConnector3 38
134 #define ESCHER_ShpInst_CurvedConnector4 39
135 #define ESCHER_ShpInst_CurvedConnector5 40
136 #define ESCHER_ShpInst_Callout1 41
137 #define ESCHER_ShpInst_Callout2 42
138 #define ESCHER_ShpInst_Callout3 43
139 #define ESCHER_ShpInst_AccentCallout1 44
140 #define ESCHER_ShpInst_AccentCallout2 45
141 #define ESCHER_ShpInst_AccentCallout3 46
142 #define ESCHER_ShpInst_BorderCallout1 47
143 #define ESCHER_ShpInst_BorderCallout2 48
144 #define ESCHER_ShpInst_BorderCallout3 49
145 #define ESCHER_ShpInst_AccentBorderCallout1 50
146 #define ESCHER_ShpInst_AccentBorderCallout2 51
147 #define ESCHER_ShpInst_AccentBorderCallout3 52
148 #define ESCHER_ShpInst_Ribbon 53
149 #define ESCHER_ShpInst_Ribbon2 54
150 #define ESCHER_ShpInst_Chevron 55
151 #define ESCHER_ShpInst_Pentagon 56
152 #define ESCHER_ShpInst_NoSmoking 57
153 #define ESCHER_ShpInst_Seal8 58
154 #define ESCHER_ShpInst_Seal16 59
155 #define ESCHER_ShpInst_Seal32 60
156 #define ESCHER_ShpInst_WedgeRectCallout 61
157 #define ESCHER_ShpInst_WedgeRRectCallout 62
158 #define ESCHER_ShpInst_WedgeEllipseCallout 63
159 #define ESCHER_ShpInst_Wave 64
160 #define ESCHER_ShpInst_FoldedCorner 65
161 #define ESCHER_ShpInst_LeftArrow 66
162 #define ESCHER_ShpInst_DownArrow 67
163 #define ESCHER_ShpInst_UpArrow 68
164 #define ESCHER_ShpInst_LeftRightArrow 69
165 #define ESCHER_ShpInst_UpDownArrow 70
166 #define ESCHER_ShpInst_IrregularSeal1 71
167 #define ESCHER_ShpInst_IrregularSeal2 72
168 #define ESCHER_ShpInst_LightningBolt 73
169 #define ESCHER_ShpInst_Heart 74
170 #define ESCHER_ShpInst_PictureFrame 75
171 #define ESCHER_ShpInst_QuadArrow 76
172 #define ESCHER_ShpInst_LeftArrowCallout 77
173 #define ESCHER_ShpInst_RightArrowCallout 78
174 #define ESCHER_ShpInst_UpArrowCallout 79
175 #define ESCHER_ShpInst_DownArrowCallout 80
176 #define ESCHER_ShpInst_LeftRightArrowCallout 81
177 #define ESCHER_ShpInst_UpDownArrowCallout 82
178 #define ESCHER_ShpInst_QuadArrowCallout 83
179 #define ESCHER_ShpInst_Bevel 84
180 #define ESCHER_ShpInst_LeftBracket 85
181 #define ESCHER_ShpInst_RightBracket 86
182 #define ESCHER_ShpInst_LeftBrace 87
183 #define ESCHER_ShpInst_RightBrace 88
184 #define ESCHER_ShpInst_LeftUpArrow 89
185 #define ESCHER_ShpInst_BentUpArrow 90
186 #define ESCHER_ShpInst_BentArrow 91
187 #define ESCHER_ShpInst_Seal24 92
188 #define ESCHER_ShpInst_StripedRightArrow 93
189 #define ESCHER_ShpInst_NotchedRightArrow 94
190 #define ESCHER_ShpInst_BlockArc 95
191 #define ESCHER_ShpInst_SmileyFace 96
192 #define ESCHER_ShpInst_VerticalScroll 97
193 #define ESCHER_ShpInst_HorizontalScroll 98
194 #define ESCHER_ShpInst_CircularArrow 99
195 #define ESCHER_ShpInst_NotchedCircularArrow 100
196 #define ESCHER_ShpInst_UturnArrow 101
197 #define ESCHER_ShpInst_CurvedRightArrow 102
198 #define ESCHER_ShpInst_CurvedLeftArrow 103
199 #define ESCHER_ShpInst_CurvedUpArrow 104
200 #define ESCHER_ShpInst_CurvedDownArrow 105
201 #define ESCHER_ShpInst_CloudCallout 106
202 #define ESCHER_ShpInst_EllipseRibbon 107
203 #define ESCHER_ShpInst_EllipseRibbon2 108
204 #define ESCHER_ShpInst_FlowChartProcess 109
205 #define ESCHER_ShpInst_FlowChartDecision 110
206 #define ESCHER_ShpInst_FlowChartInputOutput 111
207 #define ESCHER_ShpInst_FlowChartPredefinedProcess 112
208 #define ESCHER_ShpInst_FlowChartInternalStorage 113
209 #define ESCHER_ShpInst_FlowChartDocument 114
210 #define ESCHER_ShpInst_FlowChartMultidocument 115
211 #define ESCHER_ShpInst_FlowChartTerminator 116
212 #define ESCHER_ShpInst_FlowChartPreparation 117
213 #define ESCHER_ShpInst_FlowChartManualInput 118
214 #define ESCHER_ShpInst_FlowChartManualOperation 119
215 #define ESCHER_ShpInst_FlowChartConnector 120
216 #define ESCHER_ShpInst_FlowChartPunchedCard 121
217 #define ESCHER_ShpInst_FlowChartPunchedTape 122
218 #define ESCHER_ShpInst_FlowChartSummingJunction 123
219 #define ESCHER_ShpInst_FlowChartOr 124
220 #define ESCHER_ShpInst_FlowChartCollate 125
221 #define ESCHER_ShpInst_FlowChartSort 126
222 #define ESCHER_ShpInst_FlowChartExtract 127
223 #define ESCHER_ShpInst_FlowChartMerge 128
224 #define ESCHER_ShpInst_FlowChartOfflineStorage 129
225 #define ESCHER_ShpInst_FlowChartOnlineStorage 130
226 #define ESCHER_ShpInst_FlowChartMagneticTape 131
227 #define ESCHER_ShpInst_FlowChartMagneticDisk 132
228 #define ESCHER_ShpInst_FlowChartMagneticDrum 133
229 #define ESCHER_ShpInst_FlowChartDisplay 134
230 #define ESCHER_ShpInst_FlowChartDelay 135
231 #define ESCHER_ShpInst_TextPlainText 136
232 #define ESCHER_ShpInst_TextStop 137
233 #define ESCHER_ShpInst_TextTriangle 138
234 #define ESCHER_ShpInst_TextTriangleInverted 139
235 #define ESCHER_ShpInst_TextChevron 140
236 #define ESCHER_ShpInst_TextChevronInverted 141
237 #define ESCHER_ShpInst_TextRingInside 142
238 #define ESCHER_ShpInst_TextRingOutside 143
239 #define ESCHER_ShpInst_TextArchUpCurve 144
240 #define ESCHER_ShpInst_TextArchDownCurve 145
241 #define ESCHER_ShpInst_TextCircleCurve 146
242 #define ESCHER_ShpInst_TextButtonCurve 147
243 #define ESCHER_ShpInst_TextArchUpPour 148
244 #define ESCHER_ShpInst_TextArchDownPour 149
245 #define ESCHER_ShpInst_TextCirclePour 150
246 #define ESCHER_ShpInst_TextButtonPour 151
247 #define ESCHER_ShpInst_TextCurveUp 152
248 #define ESCHER_ShpInst_TextCurveDown 153
249 #define ESCHER_ShpInst_TextCascadeUp 154
250 #define ESCHER_ShpInst_TextCascadeDown 155
251 #define ESCHER_ShpInst_TextWave1 156
252 #define ESCHER_ShpInst_TextWave2 157
253 #define ESCHER_ShpInst_TextWave3 158
254 #define ESCHER_ShpInst_TextWave4 159
255 #define ESCHER_ShpInst_TextInflate 160
256 #define ESCHER_ShpInst_TextDeflate 161
257 #define ESCHER_ShpInst_TextInflateBottom 162
258 #define ESCHER_ShpInst_TextDeflateBottom 163
259 #define ESCHER_ShpInst_TextInflateTop 164
260 #define ESCHER_ShpInst_TextDeflateTop 165
261 #define ESCHER_ShpInst_TextDeflateInflate 166
262 #define ESCHER_ShpInst_TextDeflateInflateDeflate 167
263 #define ESCHER_ShpInst_TextFadeRight 168
264 #define ESCHER_ShpInst_TextFadeLeft 169
265 #define ESCHER_ShpInst_TextFadeUp 170
266 #define ESCHER_ShpInst_TextFadeDown 171
267 #define ESCHER_ShpInst_TextSlantUp 172
268 #define ESCHER_ShpInst_TextSlantDown 173
269 #define ESCHER_ShpInst_TextCanUp 174
270 #define ESCHER_ShpInst_TextCanDown 175
271 #define ESCHER_ShpInst_FlowChartAlternateProcess 176
272 #define ESCHER_ShpInst_FlowChartOffpageConnector 177
273 #define ESCHER_ShpInst_Callout90 178
274 #define ESCHER_ShpInst_AccentCallout90 179
275 #define ESCHER_ShpInst_BorderCallout90 180
276 #define ESCHER_ShpInst_AccentBorderCallout90 181
277 #define ESCHER_ShpInst_LeftRightUpArrow 182
278 #define ESCHER_ShpInst_Sun 183
279 #define ESCHER_ShpInst_Moon 184
280 #define ESCHER_ShpInst_BracketPair 185
281 #define ESCHER_ShpInst_BracePair 186
282 #define ESCHER_ShpInst_Seal4 187
283 #define ESCHER_ShpInst_DoubleWave 188
284 #define ESCHER_ShpInst_ActionButtonBlank 189
285 #define ESCHER_ShpInst_ActionButtonHome 190
286 #define ESCHER_ShpInst_ActionButtonHelp 191
287 #define ESCHER_ShpInst_ActionButtonInformation 192
288 #define ESCHER_ShpInst_ActionButtonForwardNext 193
289 #define ESCHER_ShpInst_ActionButtonBackPrevious 194
290 #define ESCHER_ShpInst_ActionButtonEnd 195
291 #define ESCHER_ShpInst_ActionButtonBeginning 196
292 #define ESCHER_ShpInst_ActionButtonReturn 197
293 #define ESCHER_ShpInst_ActionButtonDocument 198
294 #define ESCHER_ShpInst_ActionButtonSound 199
295 #define ESCHER_ShpInst_ActionButtonMovie 200
296 #define ESCHER_ShpInst_HostControl 201
297 #define ESCHER_ShpInst_TextBox 202
298 #define ESCHER_ShpInst_COUNT 203
299 #define ESCHER_ShpInst_Max 0x0FFF
300 #define ESCHER_ShpInst_Nil ESCHER_ShpInst_Max
303 { // GEL provided types...
304 ERROR
= 0, // An error occurred during loading
305 UNKNOWN
, // An unknown blip type
306 EMF
, // Windows Enhanced Metafile
307 WMF
, // Windows Metafile
308 PICT
, // Macintosh PICT
312 FirstClient
= 32, // First client defined blip type
313 LastClient
= 255 // Last client defined blip type
316 enum ESCHER_FillStyle
318 ESCHER_FillSolid
, // Fill with a solid color
319 ESCHER_FillPattern
, // Fill with a pattern (bitmap)
320 ESCHER_FillTexture
, // A texture (pattern with its own color map)
321 ESCHER_FillPicture
, // Center a picture in the shape
322 ESCHER_FillShade
, // Shade from start to end points
323 ESCHER_FillShadeCenter
, // Shade from bounding rectangle to end point
324 ESCHER_FillShadeShape
, // Shade from shape outline to end point
325 ESCHER_FillShadeScale
,
326 ESCHER_FillShadeTitle
,
327 ESCHER_FillBackground
332 ESCHER_wColor
, // only used for predefined shades
333 ESCHER_wAutomatic
, // depends on object type
334 ESCHER_wGrayScale
, // shades of gray only
335 ESCHER_wLightGrayScale
, // shades of light gray only
336 ESCHER_wInverseGray
, // dark gray mapped to light gray, etc.
337 ESCHER_wGrayOutline
, // pure gray and white
338 ESCHER_wBlackTextLine
, // black text and lines, all else grayscale
339 ESCHER_wHighContrast
, // pure black and white mode (no grays)
340 ESCHER_wBlack
, // solid black msobwWhite, // solid white
341 ESCHER_wDontShow
, // object not drawn
342 ESCHER_wNumModes
// number of Black and white modes
347 enum ESCHER_ShapePath
349 ESCHER_ShapeLines
, // A line of straight segments
350 ESCHER_ShapeLinesClosed
, // A closed polygonal object
351 ESCHER_ShapeCurves
, // A line of Bezier curve segments
352 ESCHER_ShapeCurvesClosed
, // A closed shape with curved edges
353 ESCHER_ShapeComplex
// pSegmentInfo must be non-empty
362 ESCHER_WrapTopBottom
,
369 ESCHER_bwColor
, // only used for predefined shades
370 ESCHER_bwAutomatic
, // depends on object type
371 ESCHER_bwGrayScale
, // shades of gray only
372 ESCHER_bwLightGrayScale
, // shades of light gray only
373 ESCHER_bwInverseGray
, // dark gray mapped to light gray, etc.
374 ESCHER_bwGrayOutline
, // pure gray and white
375 ESCHER_bwBlackTextLine
, // black text and lines, all else grayscale
376 ESCHER_bwHighContrast
, // pure black and white mode (no grays)
377 ESCHER_bwBlack
, // solid black
378 ESCHER_bwWhite
, // solid white
379 ESCHER_bwDontShow
, // object not drawn
380 ESCHER_bwNumModes
// number of Black and white modes
384 enum ESCHER_AnchorText
389 ESCHER_AnchorTopCentered
,
390 ESCHER_AnchorMiddleCentered
,
391 ESCHER_AnchorBottomCentered
,
392 ESCHER_AnchorTopBaseline
,
393 ESCHER_AnchorBottomBaseline
,
394 ESCHER_AnchorTopCenteredBaseline
,
395 ESCHER_AnchorBottomCenteredBaseline
400 ESCHER_cDir0
, // Right
401 ESCHER_cDir90
, // Down
402 ESCHER_cDir180
, // Left
409 ESCHER_cxstyleStraight
= 0,
411 ESCHER_cxstyleCurved
,
418 ESCHER_txflHorzN
, // Horizontal non-@
419 ESCHER_txflTtoBA
, // Top to Bottom @-font
420 ESCHER_txflBtoT
, // Bottom to Top non-@
421 ESCHER_txflTtoBN
, // Top to Bottom non-@
422 ESCHER_txflHorzA
, // Horizontal @-font
423 ESCHER_txflVertN
// Vertical, non-@
426 // text direction (needed for Bi-Di support)
429 ESCHER_txdirLTR
, // left-to-right text direction
430 ESCHER_txdirRTL
, // right-to-left text direction
431 ESCHER_txdirContext
// context text direction
437 ESCHER_spcotRightAngle
= 1,
438 ESCHER_spcotOneSegment
= 2,
439 ESCHER_spcotTwoSegment
= 3,
440 ESCHER_spcotThreeSegment
= 4
460 ESCHER_spcodSpecified
463 // FontWork alignment
464 enum ESCHER_GeoTextAlign
466 ESCHER_AlignTextStretch
, // Stretch each line of text to fit width.
467 ESCHER_AlignTextCenter
, // Center text on width.
468 ESCHER_AlignTextLeft
, // Left justify.
469 ESCHER_AlignTextRight
, // Right justify.
470 ESCHER_AlignTextLetterJust
, // Spread letters out to fit width.
471 ESCHER_AlignTextWordJust
, // Spread words out to fit width.
472 ESCHER_AlignTextInvalid
// Invalid
475 // flags for pictures
476 enum ESCHER_BlipFlags
478 ESCHER_BlipFlagDefault
= 0,
479 ESCHER_BlipFlagComment
= 0, // Blip name is a comment
480 ESCHER_BlipFlagFile
, // Blip name is a file name
481 ESCHER_BlipFlagURL
, // Blip name is a full URL
482 ESCHER_BlipFlagType
= 3, // Mask to extract type
483 /* Or the following flags with any of the above. */
484 ESCHER_BlipFlagDoNotSave
= 4,
485 ESCHER_BlipFlagLinkToFile
= 8
489 enum ESCHER_3DRenderMode
491 ESCHER_FullRender
, // Generate a full rendering
492 ESCHER_Wireframe
, // Generate a wireframe
493 ESCHER_BoundingCube
// Generate a bounding cube
497 enum ESCHER_xFormType
499 ESCHER_xFormAbsolute
, // Apply transform in absolute space centered on shape
500 ESCHER_xFormShape
, // Apply transform to shape geometry
501 ESCHER_xFormDrawing
// Apply transform in drawing space
505 enum ESCHER_ShadowType
507 ESCHER_ShadowOffset
, // N pixel offset shadow
508 ESCHER_ShadowDouble
, // Use second offset too
509 ESCHER_ShadowRich
, // Rich perspective shadow (cast relative to shape)
510 ESCHER_ShadowShape
, // Rich perspective shadow (cast in shape space)
511 ESCHER_ShadowDrawing
, // Perspective shadow cast in drawing space
512 ESCHER_ShadowEmbossOrEngrave
515 // - the type of a (length) measurement
518 ESCHER_dzTypeMin
= 0,
519 ESCHER_dzTypeDefault
= 0, // Default size, ignore the values
520 ESCHER_dzTypeA
= 1, // Values are in EMUs
521 ESCHER_dzTypeV
= 2, // Values are in pixels
522 ESCHER_dzTypeShape
= 3, // Values are 16.16 fractions of shape size
523 ESCHER_dzTypeFixedAspect
= 4, // Aspect ratio is fixed
524 ESCHER_dzTypeAFixed
= 5, // EMUs, fixed aspect ratio
525 ESCHER_dzTypeVFixed
= 6, // Pixels, fixed aspect ratio
526 ESCHER_dzTypeShapeFixed
= 7, // Proportion of shape, fixed aspect ratio
527 ESCHER_dzTypeFixedAspectEnlarge
= 8, // Aspect ratio is fixed, favor larger size
528 ESCHER_dzTypeAFixedBig
= 9, // EMUs, fixed aspect ratio
529 ESCHER_dzTypeVFixedBig
= 10, // Pixels, fixed aspect ratio
530 ESCHER_dzTypeShapeFixedBig
= 11, // Proportion of shape, fixed aspect ratio
531 ESCHER_dzTypeMax
= 11
534 // how to interpret the colors in a shaded fill.
535 enum ESCHER_ShadeType
537 ESCHER_ShadeNone
= 0, // Interpolate without correction between RGBs
538 ESCHER_ShadeGamma
= 1, // Apply gamma correction to colors
539 ESCHER_ShadeSigma
= 2, // Apply a sigma transfer function to position
540 ESCHER_ShadeBand
= 4, // Add a flat band at the start of the shade
541 ESCHER_ShadeOneColor
= 8, // This is a one color shade
543 /* A parameter for the band or sigma function can be stored in the top
544 16 bits of the value - this is a proportion of *each* band of the
545 shade to make flat (or the approximate equal value for a sigma
546 function). NOTE: the parameter is not used for the sigma function,
547 instead a built in value is used. This value should not be changed
549 ESCHER_ShadeParameterShift
= 16,
550 ESCHER_ShadeParameterMask
= 0xffff0000,
552 ESCHER_ShadeDefault
= (ESCHER_ShadeGamma
|ESCHER_ShadeSigma
|
553 (16384<<ESCHER_ShadeParameterShift
))
556 // compound line style
557 enum ESCHER_LineStyle
559 ESCHER_LineSimple
, // Single line (of width lineWidth)
560 ESCHER_LineDouble
, // Double lines of equal width
561 ESCHER_LineThickThin
, // Double lines, one thick, one thin
562 ESCHER_LineThinThick
, // Double lines, reverse order
563 ESCHER_LineTriple
// Three lines, thin, thick, thin
566 // how to "fill" the line contour
569 ESCHER_lineSolidType
, // Fill with a solid color
570 ESCHER_linePattern
, // Fill with a pattern (bitmap)
571 ESCHER_lineTexture
, // A texture (pattern with its own color map)
572 ESCHER_linePicture
// Center a picture in the shape
576 enum ESCHER_LineDashing
578 ESCHER_LineSolid
, // Solid (continuous) pen
579 ESCHER_LineDashSys
, // PS_DASH system dash style
580 ESCHER_LineDotSys
, // PS_DOT system dash style
581 ESCHER_LineDashDotSys
, // PS_DASHDOT system dash style
582 ESCHER_LineDashDotDotSys
, // PS_DASHDOTDOT system dash style
583 ESCHER_LineDotGEL
, // square dot style
584 ESCHER_LineDashGEL
, // dash style
585 ESCHER_LineLongDashGEL
, // long dash style
586 ESCHER_LineDashDotGEL
, // dash short dash
587 ESCHER_LineLongDashDotGEL
, // long dash short dash
588 ESCHER_LineLongDashDotDotGEL
// long dash short dash short dash
596 ESCHER_LineArrowStealthEnd
,
597 ESCHER_LineArrowDiamondEnd
,
598 ESCHER_LineArrowOvalEnd
,
599 ESCHER_LineArrowOpenEnd
603 enum ESCHER_LineWidth
605 ESCHER_LineNarrowArrow
,
606 ESCHER_LineMediumWidthArrow
,
611 enum ESCHER_LineEndLenght
613 ESCHER_LineShortArrow
,
614 ESCHER_LineMediumLenArrow
,
621 ESCHER_LineJoinBevel
, // Join edges by a straight line
622 ESCHER_LineJoinMiter
, // Extend edges until they join
623 ESCHER_LineJoinRound
// Draw an arc between the two edges
626 // line cap style (applies to ends of dash segments too).
629 ESCHER_LineEndCapRound
, // Rounded ends - the default
630 ESCHER_LineEndCapSquare
, // Square protrudes by half line width
631 ESCHER_LineEndCapFlat
// Line ends at end point
635 // 1pt = 12700 EMU (English Metric Units)
636 // 1pt = 20 Twip = 20/1440" = 1/72"
638 // 1" = 12700*72 = 914400 EMU
642 #define ESCHER_Prop_Rotation 4 /* Fixed Point 16.16 degrees */
644 #define ESCHER_Prop_LockRotation 119 /* sal_Bool No rotation */
645 #define ESCHER_Prop_LockAspectRatio 120 /* sal_Bool Don't allow changes in aspect ratio */
646 #define ESCHER_Prop_LockPosition 121 /* sal_Bool Don't allow the shape to be moved */
647 #define ESCHER_Prop_LockAgainstSelect 122 /* sal_Bool Shape may not be selected */
648 #define ESCHER_Prop_LockCropping 123 /* sal_Bool No cropping this shape */
649 #define ESCHER_Prop_LockVertices 124 /* sal_Bool Edit Points not allowed */
650 #define ESCHER_Prop_LockText 125 /* sal_Bool Do not edit text */
651 #define ESCHER_Prop_LockAdjustHandles 126 /* sal_Bool Do not adjust */
652 #define ESCHER_Prop_LockAgainstGrouping 127 /* sal_Bool Do not group this shape */
654 #define ESCHER_Prop_lTxid 128 /* LONG id for the text, value determined by the host */
655 #define ESCHER_Prop_dxTextLeft 129 /* LONG margins relative to shape's inscribed */
656 #define ESCHER_Prop_dyTextTop 130 /* LONG text rectangle (in EMUs) */
657 #define ESCHER_Prop_dxTextRight 131 /* LONG */
658 #define ESCHER_Prop_dyTextBottom 132 /* LONG */
659 #define ESCHER_Prop_WrapText 133 /* MSOWRAPMODE Wrap text at shape margins */
660 #define ESCHER_Prop_scaleText 134 /* LONG Text zoom/scale (used if fFitTextToShape) */
661 #define ESCHER_Prop_AnchorText 135 /* ESCHER_AnchorText How to anchor the text */
662 #define ESCHER_Prop_txflTextFlow 136 /* MSOTXFL Text flow */
663 #define ESCHER_Prop_cdirFont 137 /* MSOCDIR Font rotation */
664 #define ESCHER_Prop_hspNext 138 /* MSOHSP ID of the next shape (used by Word for linked textboxes) */
665 #define ESCHER_Prop_txdir 139 /* MSOTXDIR Bi-Di Text direction */
666 #define ESCHER_Prop_SelectText 187 /* sal_Bool sal_True if single click selects text, sal_False if two clicks */
667 #define ESCHER_Prop_AutoTextMargin 188 /* sal_Bool use host's margin calculations */
668 #define ESCHER_Prop_RotateText 189 /* sal_Bool Rotate text with shape */
669 #define ESCHER_Prop_FitShapeToText 190 /* sal_Bool Size shape to fit text size */
670 #define ESCHER_Prop_FitTextToShape 191 /* sal_Bool Size text to fit shape size */
672 #define ESCHER_Prop_gtextUNICODE 192 /* WCHAR* UNICODE text string */
673 #define ESCHER_Prop_gtextRTF 193 /* char* RTF text string */
674 #define ESCHER_Prop_gtextAlign 194 /* MSOGEOTEXTALIGN alignment on curve */
675 #define ESCHER_Prop_gtextSize 195 /* LONG default point size */
676 #define ESCHER_Prop_gtextSpacing 196 /* LONG fixed point 16.16 */
677 #define ESCHER_Prop_gtextFont 197 /* WCHAR* font family name */
678 #define ESCHER_Prop_gtextFReverseRows 240 /* sal_Bool Reverse row order */
679 #define ESCHER_Prop_fGtext 241 /* sal_Bool Has text effect */
680 #define ESCHER_Prop_gtextFVertical 242 /* sal_Bool Rotate characters */
681 #define ESCHER_Prop_gtextFKern 243 /* sal_Bool Kern characters */
682 #define ESCHER_Prop_gtextFTight 244 /* sal_Bool Tightening or tracking */
683 #define ESCHER_Prop_gtextFStretch 245 /* sal_Bool Stretch to fit shape */
684 #define ESCHER_Prop_gtextFShrinkFit 246 /* sal_Bool Char bounding box */
685 #define ESCHER_Prop_gtextFBestFit 247 /* sal_Bool Scale text-on-path */
686 #define ESCHER_Prop_gtextFNormalize 248 /* sal_Bool Stretch char height */
687 #define ESCHER_Prop_gtextFDxMeasure 249 /* sal_Bool Do not measure along path */
688 #define ESCHER_Prop_gtextFBold 250 /* sal_Bool Bold font */
689 #define ESCHER_Prop_gtextFItalic 251 /* sal_Bool Italic font */
690 #define ESCHER_Prop_gtextFUnderline 252 /* sal_Bool Underline font */
691 #define ESCHER_Prop_gtextFShadow 253 /* sal_Bool Shadow font */
692 #define ESCHER_Prop_gtextFSmallcaps 254 /* sal_Bool Small caps font */
693 #define ESCHER_Prop_gtextFStrikethrough 255 /* sal_Bool Strike through font */
695 #define ESCHER_Prop_cropFromTop 256 /* LONG 16.16 fraction times total */
696 #define ESCHER_Prop_cropFromBottom 257 /* LONG image width or height, */
697 #define ESCHER_Prop_cropFromLeft 258 /* LONG as appropriate. */
698 #define ESCHER_Prop_cropFromRight 259 /* LONG */
699 #define ESCHER_Prop_pib 260 /* IMsoBlip* Blip to display */
700 #define ESCHER_Prop_pibName 261 /* WCHAR* Blip file name */
701 #define ESCHER_Prop_pibFlags 262 /* MSOBLIPFLAGS Blip flags */
702 #define ESCHER_Prop_pictureTransparent 263 /* LONG transparent color (none if ~0UL) */
703 #define ESCHER_Prop_pictureContrast 264 /* LONG contrast setting */
704 #define ESCHER_Prop_pictureBrightness 265 /* LONG brightness setting */
705 #define ESCHER_Prop_pictureGamma 266 /* LONG 16.16 gamma */
706 #define ESCHER_Prop_pictureId 267 /* LONG Host-defined ID for OLE objects (usually a pointer) */
707 #define ESCHER_Prop_pictureDblCrMod 268 /* MSOCLR Modification used if shape has double shadow */
708 #define ESCHER_Prop_pictureFillCrMod 269 /* MSOCLR */
709 #define ESCHER_Prop_pictureLineCrMod 270 /* MSOCLR */
710 #define ESCHER_Prop_pibPrint 271 /* IMsoBlip* Blip to display when printing */
711 #define ESCHER_Prop_pibPrintName 272 /* WCHAR* Blip file name */
712 #define ESCHER_Prop_pibPrintFlags 273 /* MSOBLIPFLAGS Blip flags */
713 #define ESCHER_Prop_fNoHitTestPicture 316 /* sal_Bool Do not hit test the picture */
714 #define ESCHER_Prop_pictureGray 317 /* sal_Bool grayscale display */
715 #define ESCHER_Prop_pictureBiLevel 318 /* sal_Bool bi-level display */
716 #define ESCHER_Prop_pictureActive 319 /* sal_Bool Server is active (OLE objects only) */
718 #define ESCHER_Prop_geoLeft 320 /* LONG Defines the G (geometry) coordinate space. */
719 #define ESCHER_Prop_geoTop 321 /* LONG */
720 #define ESCHER_Prop_geoRight 322 /* LONG */
721 #define ESCHER_Prop_geoBottom 323 /* LONG */
722 #define ESCHER_Prop_shapePath 324 /* MSOSHAPEPATH */
723 #define ESCHER_Prop_pVertices 325 /* IMsoArray An array of points, in G units. */
724 #define ESCHER_Prop_pSegmentInfo 326 /* IMsoArray */
725 #define ESCHER_Prop_adjustValue 327 /* LONG Adjustment values corresponding to */
726 #define ESCHER_Prop_adjust2Value 328 /* LONG the positions of the adjust handles */
727 #define ESCHER_Prop_adjust3Value 329 /* LONG of the shape. The number of values */
728 #define ESCHER_Prop_adjust4Value 330 /* LONG used and their allowable ranges vary */
729 #define ESCHER_Prop_adjust5Value 331 /* LONG from shape type to shape type. */
730 #define ESCHER_Prop_adjust6Value 332 /* LONG */
731 #define ESCHER_Prop_adjust7Value 333 /* LONG */
732 #define ESCHER_Prop_adjust8Value 334 /* LONG */
733 #define ESCHER_Prop_adjust9Value 335 /* LONG */
734 #define ESCHER_Prop_adjust10Value 336 /* LONG */
735 #define ESCHER_Prop_fShadowOK 378 /* sal_Bool Shadow may be set */
736 #define ESCHER_Prop_f3DOK 379 /* sal_Bool 3D may be set */
737 #define ESCHER_Prop_fLineOK 380 /* sal_Bool Line style may be set */
738 #define ESCHER_Prop_fGtextOK 381 /* sal_Bool Text effect (FontWork) supported */
739 #define ESCHER_Prop_fFillShadeShapeOK 382 /* sal_Bool */
740 #define ESCHER_Prop_fFillOK 383 /* sal_Bool OK to fill the shape through the UI or VBA? */
742 #define ESCHER_Prop_fillType 384 /* ESCHER_FillStyle Type of fill */
743 #define ESCHER_Prop_fillColor 385 /* MSOCLR Foreground color */
744 #define ESCHER_Prop_fillOpacity 386 /* LONG Fixed 16.16 */
745 #define ESCHER_Prop_fillBackColor 387 /* MSOCLR Background color */
746 #define ESCHER_Prop_fillBackOpacity 388 /* LONG Shades only */
747 #define ESCHER_Prop_fillCrMod 389 /* MSOCLR Modification for BW views */
748 #define ESCHER_Prop_fillBlip 390 /* IMsoBlip* Pattern/texture */
749 #define ESCHER_Prop_fillBlipName 391 /* WCHAR* Blip file name */
750 #define ESCHER_Prop_fillBlipFlags 392 /* MSOBLIPFLAGS Blip flags */
751 #define ESCHER_Prop_fillWidth 393 /* LONG How big (A units) to make a metafile texture. */
752 #define ESCHER_Prop_fillHeight 394 /* LONG */
753 #define ESCHER_Prop_fillAngle 395 /* LONG Fade angle - degrees in 16.16 */
754 #define ESCHER_Prop_fillFocus 396 /* LONG Linear shaded fill focus percent */
755 #define ESCHER_Prop_fillToLeft 397 /* LONG Fraction 16.16 */
756 #define ESCHER_Prop_fillToTop 398 /* LONG Fraction 16.16 */
757 #define ESCHER_Prop_fillToRight 399 /* LONG Fraction 16.16 */
758 #define ESCHER_Prop_fillToBottom 400 /* LONG Fraction 16.16 */
759 #define ESCHER_Prop_fillRectLeft 401 /* LONG For shaded fills, use the specified rectangle */
760 #define ESCHER_Prop_fillRectTop 402 /* LONG instead of the shape's bounding rect to */
761 #define ESCHER_Prop_fillRectRight 403 /* LONG define how large the fade is going to be. */
762 #define ESCHER_Prop_fillRectBottom 404 /* LONG */
763 #define ESCHER_Prop_fillDztype 405 /* MSODZTYPE */
764 #define ESCHER_Prop_fillShadePreset 406 /* LONG Special shades */
765 #define ESCHER_Prop_fillShadeColors 407 /* IMsoArray a preset array of colors */
766 #define ESCHER_Prop_fillOriginX 408 /* LONG */
767 #define ESCHER_Prop_fillOriginY 409 /* LONG */
768 #define ESCHER_Prop_fillShapeOriginX 410 /* LONG */
769 #define ESCHER_Prop_fillShapeOriginY 411 /* LONG */
770 #define ESCHER_Prop_fillShadeType 412 /* MSOSHADETYPE Type of shading, if a shaded (gradient) fill. */
771 #define ESCHER_Prop_fFilled 443 /* sal_Bool Is shape filled? */
772 #define ESCHER_Prop_fHitTestFill 444 /* sal_Bool Should we hit test fill? */
773 #define ESCHER_Prop_fillShape 445 /* sal_Bool Register pattern on shape */
774 #define ESCHER_Prop_fillUseRect 446 /* sal_Bool Use the large rect? */
775 #define ESCHER_Prop_fNoFillHitTest 447 /* sal_Bool Hit test a shape as though filled */
777 #define ESCHER_Prop_lineColor 448 /* MSOCLR Color of line */
778 #define ESCHER_Prop_lineOpacity 449 /* LONG Not implemented */
779 #define ESCHER_Prop_lineBackColor 450 /* MSOCLR Background color */
780 #define ESCHER_Prop_lineCrMod 451 /* MSOCLR Modification for BW views */
781 #define ESCHER_Prop_lineType 452 /* MSOLINETYPE Type of line */
782 #define ESCHER_Prop_lineFillBlip 453 /* IMsoBlip* Pattern/texture */
783 #define ESCHER_Prop_lineFillBlipName 454 /* WCHAR* Blip file name */
784 #define ESCHER_Prop_lineFillBlipFlags 455 /* MSOBLIPFLAGS Blip flags */
785 #define ESCHER_Prop_lineFillWidth 456 /* LONG How big (A units) to make */
786 #define ESCHER_Prop_lineFillHeight 457 /* LONG a metafile texture. */
787 #define ESCHER_Prop_lineFillDztype 458 /* MSODZTYPE How to interpret fillWidth/Height numbers. */
788 #define ESCHER_Prop_lineWidth 459 /* LONG A units; 1pt == 12700 EMUs */
789 #define ESCHER_Prop_lineMiterLimit 460 /* LONG ratio (16.16) of width */
790 #define ESCHER_Prop_lineStyle 461 /* MSOLINESTYLE Draw parallel lines? */
791 #define ESCHER_Prop_lineDashing 462 /* MSOLINEDASHING Can be overridden by: */
792 #define ESCHER_Prop_lineDashStyle 463 /* IMsoArray As Win32 ExtCreatePen */
793 #define ESCHER_Prop_lineStartArrowhead 464 /* MSOLINEEND Arrow at start */
794 #define ESCHER_Prop_lineEndArrowhead 465 /* MSOLINEEND Arrow at end */
795 #define ESCHER_Prop_lineStartArrowWidth 466 /* MSOLINEENDWIDTH Arrow at start */
796 #define ESCHER_Prop_lineStartArrowLength 467 /* MSOLINEENDLENGTH Arrow at end */
797 #define ESCHER_Prop_lineEndArrowWidth 468 /* MSOLINEENDWIDTH Arrow at start */
798 #define ESCHER_Prop_lineEndArrowLength 469 /* MSOLINEENDLENGTH Arrow at end */
799 #define ESCHER_Prop_lineJoinStyle 470 /* MSOLINEJOIN How to join lines */
800 #define ESCHER_Prop_lineEndCapStyle 471 /* MSOLINECAP How to end lines */
801 #define ESCHER_Prop_fArrowheadsOK 507 /* sal_Bool Allow arrowheads if prop. is set */
802 #define ESCHER_Prop_fLine 508 /* sal_Bool Any line? */
803 #define ESCHER_Prop_fHitTestLine 509 /* sal_Bool Should we hit test lines? */
804 #define ESCHER_Prop_lineFillShape 510 /* sal_Bool Register pattern on shape */
805 #define ESCHER_Prop_fNoLineDrawDash 511 /* sal_Bool Draw a dashed line if no line */
807 #define ESCHER_Prop_shadowType 512 /* MSOSHADOWTYPE Type of effect */
808 #define ESCHER_Prop_shadowColor 513 /* MSOCLR Foreground color */
809 #define ESCHER_Prop_shadowHighlight 514 /* MSOCLR Embossed color */
810 #define ESCHER_Prop_shadowCrMod 515 /* MSOCLR Modification for BW views */
811 #define ESCHER_Prop_shadowOpacity 516 /* LONG Fixed 16.16 */
812 #define ESCHER_Prop_shadowOffsetX 517 /* LONG Offset shadow */
813 #define ESCHER_Prop_shadowOffsetY 518 /* LONG Offset shadow */
814 #define ESCHER_Prop_shadowSecondOffsetX 519 /* LONG Double offset shadow */
815 #define ESCHER_Prop_shadowSecondOffsetY 520 /* LONG Double offset shadow */
816 #define ESCHER_Prop_shadowScaleXToX 521 /* LONG 16.16 */
817 #define ESCHER_Prop_shadowScaleYToX 522 /* LONG 16.16 */
818 #define ESCHER_Prop_shadowScaleXToY 523 /* LONG 16.16 */
819 #define ESCHER_Prop_shadowScaleYToY 524 /* LONG 16.16 */
820 #define ESCHER_Prop_shadowPerspectiveX 525 /* LONG 16.16 / weight */
821 #define ESCHER_Prop_shadowPerspectiveY 526 /* LONG 16.16 / weight */
822 #define ESCHER_Prop_shadowWeight 527 /* LONG scaling factor */
823 #define ESCHER_Prop_shadowOriginX 528 /* LONG */
824 #define ESCHER_Prop_shadowOriginY 529 /* LONG */
825 #define ESCHER_Prop_fShadow 574 /* sal_Bool Any shadow? */
826 #define ESCHER_Prop_fshadowObscured 575 /* sal_Bool Excel5-style shadow */
828 #define ESCHER_Prop_perspectiveType 576 /* MSOXFORMTYPE Where transform applies */
829 #define ESCHER_Prop_perspectiveOffsetX 577 /* LONG The LONG values define a */
830 #define ESCHER_Prop_perspectiveOffsetY 578 /* LONG transformation matrix, */
831 #define ESCHER_Prop_perspectiveScaleXToX 579 /* LONG effectively, each value */
832 #define ESCHER_Prop_perspectiveScaleYToX 580 /* LONG is scaled by the */
833 #define ESCHER_Prop_perspectiveScaleXToY 581 /* LONG perspectiveWeight parameter. */
834 #define ESCHER_Prop_perspectiveScaleYToY 582 /* LONG */
835 #define ESCHER_Prop_perspectivePerspectiveX 583 /* LONG */
836 #define ESCHER_Prop_perspectivePerspectiveY 584 /* LONG */
837 #define ESCHER_Prop_perspectiveWeight 585 /* LONG Scaling factor */
838 #define ESCHER_Prop_perspectiveOriginX 586 /* LONG */
839 #define ESCHER_Prop_perspectiveOriginY 587 /* LONG */
840 #define ESCHER_Prop_fPerspective 639 /* sal_Bool On/off */
842 #define ESCHER_Prop_c3DSpecularAmt 640 /* LONG Fixed-point 16.16 */
843 #define ESCHER_Prop_c3DDiffuseAmt 641 /* LONG Fixed-point 16.16 */
844 #define ESCHER_Prop_c3DShininess 642 /* LONG Default gives OK results */
845 #define ESCHER_Prop_c3DEdgeThickness 643 /* LONG Specular edge thickness */
846 #define ESCHER_Prop_c3DExtrudeForward 644 /* LONG Distance of extrusion in EMUs */
847 #define ESCHER_Prop_c3DExtrudeBackward 645 /* LONG */
848 #define ESCHER_Prop_c3DExtrudePlane 646 /* LONG Extrusion direction */
849 #define ESCHER_Prop_c3DExtrusionColor 647 /* MSOCLR Basic color of extruded part of shape; the lighting model used will determine the exact shades used when rendering. */
850 #define ESCHER_Prop_c3DCrMod 648 /* MSOCLR Modification for BW views */
851 #define ESCHER_Prop_f3D 700 /* sal_Bool Does this shape have a 3D effect? */
852 #define ESCHER_Prop_fc3DMetallic 701 /* sal_Bool Use metallic specularity? */
853 #define ESCHER_Prop_fc3DUseExtrusionColor 702 /* sal_Bool */
854 #define ESCHER_Prop_fc3DLightFace 703 /* sal_Bool */
856 #define ESCHER_Prop_c3DYRotationAngle 704 /* LONG degrees (16.16) about y axis */
857 #define ESCHER_Prop_c3DXRotationAngle 705 /* LONG degrees (16.16) about x axis */
858 #define ESCHER_Prop_c3DRotationAxisX 706 /* LONG These specify the rotation axis; */
859 #define ESCHER_Prop_c3DRotationAxisY 707 /* LONG only their relative magnitudes */
860 #define ESCHER_Prop_c3DRotationAxisZ 708 /* LONG matter. */
861 #define ESCHER_Prop_c3DRotationAngle 709 /* LONG degrees (16.16) about axis */
862 #define ESCHER_Prop_c3DRotationCenterX 710 /* LONG rotation center x (16.16 or g-units) */
863 #define ESCHER_Prop_c3DRotationCenterY 711 /* LONG rotation center y (16.16 or g-units) */
864 #define ESCHER_Prop_c3DRotationCenterZ 712 /* LONG rotation center z (absolute (emus)) */
865 #define ESCHER_Prop_c3DRenderMode 713 /* MSO3DRENDERMODE Full,wireframe, or bcube */
866 #define ESCHER_Prop_c3DTolerance 714 /* LONG pixels (16.16) */
867 #define ESCHER_Prop_c3DXViewpoint 715 /* LONG X view point (emus) */
868 #define ESCHER_Prop_c3DYViewpoint 716 /* LONG Y view point (emus) */
869 #define ESCHER_Prop_c3DZViewpoint 717 /* LONG Z view distance (emus) */
870 #define ESCHER_Prop_c3DOriginX 718 /* LONG */
871 #define ESCHER_Prop_c3DOriginY 719 /* LONG */
872 #define ESCHER_Prop_c3DSkewAngle 720 /* LONG degree (16.16) skew angle */
873 #define ESCHER_Prop_c3DSkewAmount 721 /* LONG Percentage skew amount */
874 #define ESCHER_Prop_c3DAmbientIntensity 722 /* LONG Fixed point intensity */
875 #define ESCHER_Prop_c3DKeyX 723 /* LONG Key light source direc- */
876 #define ESCHER_Prop_c3DKeyY 724 /* LONG tion; only their relative */
877 #define ESCHER_Prop_c3DKeyZ 725 /* LONG magnitudes matter */
878 #define ESCHER_Prop_c3DKeyIntensity 726 /* LONG Fixed point intensity */
879 #define ESCHER_Prop_c3DFillX 727 /* LONG Fill light source direc- */
880 #define ESCHER_Prop_c3DFillY 728 /* LONG tion; only their relative */
881 #define ESCHER_Prop_c3DFillZ 729 /* LONG magnitudes matter */
882 #define ESCHER_Prop_c3DFillIntensity 730 /* LONG Fixed point intensity */
883 #define ESCHER_Prop_fc3DConstrainRotation 763 /* sal_Bool */
884 #define ESCHER_Prop_fc3DRotationCenterAuto 764 /* sal_Bool */
885 #define ESCHER_Prop_fc3DParallel 765 /* sal_Bool Parallel projection? */
886 #define ESCHER_Prop_fc3DKeyHarsh 766 /* sal_Bool Is key lighting harsh? */
887 #define ESCHER_Prop_fc3DFillHarsh 767 /* sal_Bool Is fill lighting harsh? */
889 #define ESCHER_Prop_hspMaster 769 /* MSOHSP master shape */
890 #define ESCHER_Prop_cxstyle 771 /* MSOCXSTYLE Type of connector */
891 #define ESCHER_Prop_bWMode 772 /* ESCHERwMode Settings for modifications to */
892 #define ESCHER_Prop_bWModePureBW 773 /* ESCHERwMode be made when in different */
893 #define ESCHER_Prop_bWModeBW 774 /* ESCHERwMode forms of black-and-white mode. */
894 #define ESCHER_Prop_fOleIcon 826 /* sal_Bool For OLE objects, whether the object is in icon form */
895 #define ESCHER_Prop_fPreferRelativeResize 827 /* sal_Bool For UI only. Prefer relative resizing. */
896 #define ESCHER_Prop_fLockShapeType 828 /* sal_Bool Lock the shape type (don't allow Change Shape) */
897 #define ESCHER_Prop_fDeleteAttachedObject 830 /* sal_Bool */
898 #define ESCHER_Prop_fBackground 831 /* sal_Bool If sal_True, this is the background shape. */
900 #define ESCHER_Prop_spcot 832 /* MSOSPCOT Callout type */
901 #define ESCHER_Prop_dxyCalloutGap 833 /* LONG Distance from box to first point.(EMUs) */
902 #define ESCHER_Prop_spcoa 834 /* MSOSPCOA Callout angle */
903 #define ESCHER_Prop_spcod 835 /* MSOSPCOD Callout drop type */
904 #define ESCHER_Prop_dxyCalloutDropSpecified 836 /* LONG if msospcodSpecified, the actual drop distance */
905 #define ESCHER_Prop_dxyCalloutLengthSpecified 837 /* LONG if fCalloutLengthSpecified, the actual distance */
906 #define ESCHER_Prop_fCallout 889 /* sal_Bool Is the shape a callout? */
907 #define ESCHER_Prop_fCalloutAccentBar 890 /* sal_Bool does callout have accent bar */
908 #define ESCHER_Prop_fCalloutTextBorder 891 /* sal_Bool does callout have a text border */
909 #define ESCHER_Prop_fCalloutMinusX 892 /* sal_Bool */
910 #define ESCHER_Prop_fCalloutMinusY 893 /* sal_Bool */
911 #define ESCHER_Prop_fCalloutDropAuto 894 /* sal_Bool If true, then we occasionally invert the drop distance */
912 #define ESCHER_Prop_fCalloutLengthSpecified 895 /* sal_Bool if true, we look at dxyCalloutLengthSpecified */
914 #define ESCHER_Prop_wzName 896 /* WCHAR* Shape Name (present only if explicitly set) */
915 #define ESCHER_Prop_wzDescription 897 /* WCHAR* alternate text */
916 #define ESCHER_Prop_pihlShape 898 /* IHlink* The hyperlink in the shape. */
917 #define ESCHER_Prop_pWrapPolygonVertices 899 /* IMsoArray The polygon that text will be wrapped around (Word) */
918 #define ESCHER_Prop_dxWrapDistLeft 900 /* LONG Left wrapping distance from text (Word) */
919 #define ESCHER_Prop_dyWrapDistTop 901 /* LONG Top wrapping distance from text (Word) */
920 #define ESCHER_Prop_dxWrapDistRight 902 /* LONG Right wrapping distance from text (Word) */
921 #define ESCHER_Prop_dyWrapDistBottom 903 /* LONG Bottom wrapping distance from text (Word) */
922 #define ESCHER_Prop_lidRegroup 904 /* LONG Regroup ID */
923 #define ESCHER_Prop_tableProperties 927
924 #define ESCHER_Prop_tableRowProperties 928
925 #define ESCHER_Prop_fEditedWrap 953 /* sal_Bool Has the wrap polygon been edited? */
926 #define ESCHER_Prop_fBehindDocument 954 /* sal_Bool Word-only (shape is behind text) */
927 #define ESCHER_Prop_fOnDblClickNotify 955 /* sal_Bool Notify client on a double click */
928 #define ESCHER_Prop_fIsButton 956 /* sal_Bool A button shape (i.e., clicking performs an action). Set for shapes with attached hyperlinks or macros. */
929 #define ESCHER_Prop_fOneD 957 /* sal_Bool 1D adjustment */
930 #define ESCHER_Prop_fHidden 958 /* sal_Bool Do not display */
931 #define ESCHER_Prop_fPrint 959 /* sal_Bool Print this shape */
933 #define ESCHER_PERSISTENTRY_PREALLOCATE 64
935 #define ESCHER_Persist_PrivateEntry 0x80000000
936 #define ESCHER_Persist_Dgg 0x00010000
937 #define ESCHER_Persist_Dg 0x00020000
938 #define ESCHER_Persist_CurrentPosition 0x00040000
939 #define ESCHER_Persist_Grouping_Snap 0x00050000
940 #define ESCHER_Persist_Grouping_Logic 0x00060000
942 const sal_uInt32 DFF_DGG_CLUSTER_SIZE
= 0x00000400; /// Shape IDs per cluster in DGG atom.
944 // ---------------------------------------------------------------------------------------------
946 namespace com
{ namespace sun
{ namespace star
{
951 struct EnhancedCustomShapeAdjustmentValue
;
957 struct MSFILTER_DLLPUBLIC EscherConnectorListEntry
959 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> mXConnector
;
960 ::com::sun::star::awt::Point maPointA
;
961 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> mXConnectToA
;
962 ::com::sun::star::awt::Point maPointB
;
963 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> mXConnectToB
;
965 sal_uInt32
GetConnectorRule( sal_Bool bFirst
);
967 EscherConnectorListEntry( const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> & rC
,
968 const ::com::sun::star::awt::Point
& rPA
,
969 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> & rSA
,
970 const ::com::sun::star::awt::Point
& rPB
,
971 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> & rSB
) :
976 mXConnectToB( rSB
) {}
978 sal_uInt32
GetClosestPoint( const Polygon
& rPoly
, const ::com::sun::star::awt::Point
& rP
);
981 struct MSFILTER_DLLPUBLIC EscherExContainer
986 EscherExContainer( SvStream
& rSt
, const sal_uInt16 nRecType
, const sal_uInt16 nInstance
= 0 );
987 ~EscherExContainer();
990 struct MSFILTER_DLLPUBLIC EscherExAtom
995 EscherExAtom( SvStream
& rSt
, const sal_uInt16 nRecType
, const sal_uInt16 nInstance
= 0, const sal_uInt8 nVersion
= 0 );
999 struct EscherPropertyValueHelper
1001 static sal_Bool
GetPropertyValue(
1002 ::com::sun::star::uno::Any
& rAny
,
1003 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> &,
1004 const OUString
& rPropertyName
,
1005 sal_Bool bTestPropertyAvailability
= sal_False
1008 static ::com::sun::star::beans::PropertyState
GetPropertyState(
1009 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> &,
1010 const OUString
& rPropertyName
1014 // ---------------------------------------------------------------------------------------------
1016 struct EscherPersistEntry
1019 sal_uInt32 mnOffset
;
1021 EscherPersistEntry( sal_uInt32 nId
, sal_uInt32 nOffset
) { mnID
= nId
; mnOffset
= nOffset
; };
1025 // ---------------------------------------------------------------------------------------------
1027 class EscherBlibEntry
1030 friend class EscherGraphicProvider
;
1031 friend class EscherEx
;
1035 sal_uInt32 mnIdentifier
[ 4 ];
1036 sal_uInt32 mnPictureOffset
; // offset to the graphic im PictureStreams
1037 sal_uInt32 mnSize
; // size of real graphic
1039 sal_uInt32 mnRefCount
; // !! reference count
1040 sal_uInt32 mnSizeExtra
; // !! size of preceding header
1042 ESCHER_BlibType meBlibType
;
1045 MapMode maPrefMapMode
;
1048 sal_Bool mbIsNativeGraphicPossible
;
1053 sal_uInt32 nPictureOffset
,
1054 const GraphicObject
& rObj
,
1056 const GraphicAttr
* pAttr
= NULL
1061 void WriteBlibEntry( SvStream
& rSt
, sal_Bool bWritePictureOffset
, sal_uInt32 nResize
= 0 );
1062 sal_Bool
IsEmpty() const { return mbIsEmpty
; };
1064 sal_Bool
operator==( const EscherBlibEntry
& ) const;
1067 // ---------------------------------------------------------------------------------------------
1069 #define _E_GRAPH_PROV_USE_INSTANCES 1
1070 #define _E_GRAPH_PROV_DO_NOT_ROTATE_METAFILES 2
1072 class MSFILTER_DLLPUBLIC EscherGraphicProvider
1076 EscherBlibEntry
** mpBlibEntrys
;
1077 sal_uInt32 mnBlibBufSize
;
1078 sal_uInt32 mnBlibEntrys
;
1084 sal_uInt32
ImplInsertBlib( EscherBlibEntry
* p_EscherBlibEntry
);
1088 sal_uInt32
GetBlibStoreContainerSize( SvStream
* pMergePicStreamBSE
= NULL
) const;
1089 void WriteBlibStoreContainer( SvStream
& rStrm
, SvStream
* pMergePicStreamBSE
= NULL
);
1090 sal_Bool
WriteBlibStoreEntry(SvStream
& rStrm
, sal_uInt32 nBlipId
,
1091 sal_Bool bWritePictureOffset
, sal_uInt32 nResize
= 0);
1092 sal_uInt32
GetBlibID(
1093 SvStream
& rPicOutStream
,
1094 const OString
& rGraphicId
,
1095 const Rectangle
& rBoundRect
,
1096 const com::sun::star::awt::Rectangle
* pVisArea
= NULL
,
1097 const GraphicAttr
* pGrafikAttr
= NULL
1099 sal_Bool
HasGraphics() const { return mnBlibEntrys
!= 0; };
1101 void SetNewBlipStreamOffset( sal_Int32 nOffset
);
1103 sal_Bool
GetPrefSize( const sal_uInt32 nBlibId
, Size
& rSize
, MapMode
& rMapMode
);
1105 void SetBaseURI( const OUString
& rBaseURI
) { maBaseURI
= rBaseURI
; };
1106 const OUString
& GetBaseURI() { return maBaseURI
; };
1108 EscherGraphicProvider( sal_uInt32 nFlags
= _E_GRAPH_PROV_DO_NOT_ROTATE_METAFILES
);
1109 ~EscherGraphicProvider();
1113 struct EscherShapeListEntry
;
1114 typedef ::std::vector
< EscherShapeListEntry
* > EscherShapeList_impl
;
1115 typedef ::std::vector
< EscherConnectorListEntry
* > EscherConnectorList_impl
;
1117 class MSFILTER_DLLPUBLIC EscherSolverContainer
1119 EscherShapeList_impl maShapeList
;
1120 EscherConnectorList_impl maConnectorList
;
1124 sal_uInt32
GetShapeId(
1125 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> & rShape
1129 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> &,
1134 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> &,
1135 const ::com::sun::star::awt::Point
& rA
,
1136 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> &,
1137 const ::com::sun::star::awt::Point
& rB
,
1138 ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> & rConB
1141 void WriteSolver( SvStream
& );
1143 EscherSolverContainer(){};
1144 ~EscherSolverContainer();
1147 // ---------------------------------------------------------------------------------------------
1149 #define ESCHER_CREATEPOLYGON_LINE 1
1150 #define ESCHER_CREATEPOLYGON_POLYLINE 2
1151 #define ESCHER_CREATEPOLYGON_POLYPOLYGON 4
1154 class SdrObjCustomShape
;
1156 struct EscherPropSortStruct
1159 sal_uInt32 nPropSize
;
1160 sal_uInt32 nPropValue
;
1164 typedef std::vector
< EscherPropSortStruct
> EscherProperties
;
1166 class MSFILTER_DLLPUBLIC EscherPropertyContainer
1168 EscherGraphicProvider
* pGraphicProvider
;
1169 SvStream
* pPicOutStrm
;
1170 Rectangle
* pShapeBoundRect
;
1172 EscherPropSortStruct
* pSortStruct
;
1174 sal_uInt32 nSortCount
;
1175 sal_uInt32 nSortBufSize
;
1176 sal_uInt32 nCountCount
;
1177 sal_uInt32 nCountSize
;
1179 sal_Bool bHasComplexData
;
1180 sal_Bool bSuppressRotation
;
1183 sal_uInt32
ImplGetColor( const sal_uInt32 rColor
, sal_Bool bSwap
= sal_True
);
1184 void ImplCreateGraphicAttributes(
1185 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> & rXPropSet
,
1187 sal_Bool bCreateCroppingAttributes
1189 sal_Bool
ImplCreateEmbeddedBmp( const OString
& rUniqueId
);
1194 EscherPropertyContainer();
1195 EscherPropertyContainer(
1196 EscherGraphicProvider
& rGraphicProvider
, // the PropertyContainer needs to know
1197 SvStream
* pPicOutStrm
, // the GraphicProvider to be able to write
1198 Rectangle
& rShapeBoundRect
// FillBitmaps or GraphicObjects.
1199 ); // under some circumstances the ShapeBoundRect
1200 // is adjusted this will happen when rotated
1201 // GraphicObjects are saved to PowerPoint
1202 ~EscherPropertyContainer();
1204 void AddOpt( sal_uInt16 nPropertyID
, const OUString
& rString
);
1207 sal_uInt16 nPropertyID
,
1208 sal_uInt32 nPropValue
,
1209 sal_Bool bBlib
= sal_False
1213 sal_uInt16 nPropertyID
,
1215 sal_uInt32 nPropValue
,
1217 sal_uInt32 nPropSize
1220 sal_Bool
GetOpt( sal_uInt16 nPropertyID
, sal_uInt32
& rPropValue
) const;
1222 sal_Bool
GetOpt( sal_uInt16 nPropertyID
, EscherPropSortStruct
& rPropValue
) const;
1224 EscherProperties
GetOpts() const;
1226 void Commit( SvStream
& rSt
, sal_uInt16 nVersion
= 3, sal_uInt16 nRecType
= ESCHER_OPT
);
1228 sal_Bool
CreateShapeProperties(
1229 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> & rXShape
1231 sal_Bool
CreateOLEGraphicProperties(
1232 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> & rXOleObject
1234 sal_Bool
CreateGraphicProperties(
1235 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> & rXShape
,
1236 const GraphicObject
& rGraphicObj
1238 sal_Bool
CreateMediaGraphicProperties(
1239 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> & rXMediaObject
1242 /** Creates a complex ESCHER_Prop_fillBlip containing the BLIP directly (for Excel charts). */
1243 sal_Bool
CreateEmbeddedBitmapProperties(
1244 const OUString
& rBitmapUrl
,
1245 ::com::sun::star::drawing::BitmapMode eBitmapMode
1247 /** Creates a complex ESCHER_Prop_fillBlip containing a hatch style (for Excel charts). */
1248 sal_Bool
CreateEmbeddedHatchProperties(
1249 const ::com::sun::star::drawing::Hatch
& rHatch
,
1250 const Color
& rBackColor
,
1251 bool bFillBackground
1254 // the GraphicProperties will only be created if a GraphicProvider and PicOutStrm is known
1255 // DR: #99897# if no GraphicProvider is present, a complex ESCHER_Prop_fillBlip
1256 // will be created, containing the BLIP directly (e.g. for Excel charts).
1257 sal_Bool
CreateGraphicProperties(
1258 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> & rXPropSet
,
1259 const OUString
& rSource
,
1260 const sal_Bool bCreateFillBitmap
,
1261 const sal_Bool bCreateCroppingAttributes
= sal_False
,
1262 const sal_Bool bFillBitmapModeAllowed
= sal_True
1265 sal_Bool
CreatePolygonProperties(
1266 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> & rXPropSet
,
1269 ::com::sun::star::awt::Rectangle
& rGeoRect
,
1270 Polygon
* pPolygon
= NULL
1273 static sal_uInt32
GetGradientColor(
1274 const ::com::sun::star::awt::Gradient
* pGradient
,
1275 sal_uInt32 nStartColor
1278 void CreateGradientProperties( const ::com::sun::star::awt::Gradient
& rGradient
);
1279 void CreateGradientProperties(
1280 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> &,
1281 sal_Bool bTransparentGradient
= sal_False
1284 void CreateLineProperties(
1285 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> &,
1288 void CreateFillProperties(
1289 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> &,
1291 sal_Bool bTransparentGradient
= sal_False
);
1292 void CreateFillProperties(
1293 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> &,
1295 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> & rXShape
);
1296 void CreateTextProperties(
1297 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> &,
1299 const sal_Bool bIsCustomShape
= sal_False
,
1300 const sal_Bool bIsTextFrame
= sal_True
1303 sal_Bool
CreateConnectorProperties(
1304 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> & rXShape
,
1305 EscherSolverContainer
& rSolver
,
1306 ::com::sun::star::awt::Rectangle
& rGeoRect
,
1307 sal_uInt16
& rShapeType
,
1308 sal_uInt16
& rShapeFlags
1311 // Because shadow properties depends to the line and fillstyle, the CreateShadowProperties method should be called at last.
1312 // It activ only when at least a FillStyle or LineStyle is set.
1313 sal_Bool
CreateShadowProperties(
1314 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> &
1317 // creates all necessary CustomShape properties, this includes also Text-, Shadow-, Fill-, and LineProperties
1318 void CreateCustomShapeProperties(
1319 const MSO_SPT eShapeType
,
1320 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> &
1322 sal_Bool
IsFontWork() const;
1324 // helper functions which are also used by the escher import
1325 static PolyPolygon
GetPolyPolygon(
1326 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> & rXShape
1328 static PolyPolygon
GetPolyPolygon( const ::com::sun::star::uno::Any
& rSource
);
1329 static MSO_SPT
GetCustomShapeType(
1330 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> & rXShape
,
1331 sal_uInt32
& nMirrorFlags
1333 static MSO_SPT
GetCustomShapeType(
1334 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
> & rXShape
,
1335 sal_uInt32
& nMirrorFlags
,
1336 OUString
& rShapeType
1339 // helper functions which are also used in ooxml export
1340 static sal_Bool
GetLineArrow(
1341 const sal_Bool bLineStart
,
1342 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> & rXPropSet
,
1343 ESCHER_LineEnd
& reLineEnd
,
1344 sal_Int32
& rnArrowLength
,
1345 sal_Int32
& rnArrowWidth
1347 static sal_Bool
IsDefaultObject( SdrObjCustomShape
* pCustoShape
);
1348 static void LookForPolarHandles(
1349 const MSO_SPT eShapeType
,
1350 sal_Int32
& nAdjustmentsWhichNeedsToBeConverted
1352 static sal_Bool
GetAdjustmentValue( const com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue
& rkProp
, sal_Int32 nIndex
, sal_Int32 nAdjustmentsWhichNeedsToBeConverted
, sal_Int32
& nValue
);
1355 // ---------------------------------------------------------------------------------------------
1357 typedef ::std::vector
< EscherPersistEntry
* > EscherPersistTable_impl
;
1359 class MSFILTER_DLLPUBLIC EscherPersistTable
1363 EscherPersistTable_impl maPersistTable
;
1365 sal_Bool
PtIsID( sal_uInt32 nID
);
1366 void PtInsert( sal_uInt32 nID
, sal_uInt32 nOfs
);
1367 sal_uInt32
PtDelete( sal_uInt32 nID
);
1368 sal_uInt32
PtGetOffsetByID( sal_uInt32 nID
);
1369 sal_uInt32
PtReplace( sal_uInt32 nID
, sal_uInt32 nOfs
);
1370 sal_uInt32
PtReplaceOrInsert( sal_uInt32 nID
, sal_uInt32 nOfs
);
1371 sal_uInt32
PtGetCount() const { return maPersistTable
.size(); };
1373 EscherPersistTable();
1374 virtual ~EscherPersistTable();
1377 // ---------------------------------------------------------------------------------------------
1381 /// abstract base class for ESCHER_ClientTextbox, ESCHER_ClientData
1382 class MSFILTER_DLLPUBLIC EscherExClientRecord_Base
1385 EscherExClientRecord_Base() {}
1386 virtual ~EscherExClientRecord_Base();
1388 /// Application writes the record header
1389 /// using rEx.AddAtom(...) followed by
1390 /// record data written to rEx.GetStream()
1391 virtual void WriteData( EscherEx
& rEx
) const = 0;
1395 /// abstract base class for ESCHER_ClientAnchor
1396 class MSFILTER_DLLPUBLIC EscherExClientAnchor_Base
1399 EscherExClientAnchor_Base() {}
1400 virtual ~EscherExClientAnchor_Base();
1402 /// Application writes the record header
1403 /// using rEx.AddAtom(...) followed by
1404 /// record data written to rEx.GetStream()
1405 virtual void WriteData( EscherEx
& rEx
,
1406 const Rectangle
& rRect
) = 0;
1409 class InteractionInfo
1411 bool mbHasInteraction
;
1412 SAL_WNODEPRECATED_DECLARATIONS_PUSH
1413 std::auto_ptr
<SvMemoryStream
> mpHyperlinkRecord
;
1414 SAL_WNODEPRECATED_DECLARATIONS_POP
1418 InteractionInfo( SvMemoryStream
* pStream
, bool bInteraction
) : mbHasInteraction( bInteraction
)
1420 mpHyperlinkRecord
.reset( pStream
);
1422 bool hasInteraction() { return mbHasInteraction
; }
1423 SAL_WNODEPRECATED_DECLARATIONS_PUSH
1424 const std::auto_ptr
< SvMemoryStream
>& getHyperlinkRecord() { return mpHyperlinkRecord
; }
1425 SAL_WNODEPRECATED_DECLARATIONS_POP
1428 class EscherExHostAppData
1431 EscherExClientAnchor_Base
* pClientAnchor
;
1432 EscherExClientRecord_Base
* pClientData
;
1433 EscherExClientRecord_Base
* pClientTextbox
;
1434 InteractionInfo
* pInteractionInfo
;
1435 // ignore single shape if entire pages are written
1436 sal_Bool bDontWriteShape
;
1439 EscherExHostAppData() : pClientAnchor(0), pClientData(0),
1440 pClientTextbox(0), pInteractionInfo(0), bDontWriteShape(sal_False
)
1443 void SetInteractionInfo( InteractionInfo
* p
)
1444 { pInteractionInfo
= p
; }
1445 void SetClientAnchor( EscherExClientAnchor_Base
* p
)
1446 { pClientAnchor
= p
; }
1447 void SetClientData( EscherExClientRecord_Base
* p
)
1448 { pClientData
= p
; }
1449 void SetClientTextbox( EscherExClientRecord_Base
* p
)
1450 { pClientTextbox
= p
; }
1451 void SetDontWriteShape( sal_Bool b
)
1452 { bDontWriteShape
= b
; }
1453 InteractionInfo
* GetInteractionInfo() const
1454 { return pInteractionInfo
; }
1455 EscherExClientAnchor_Base
* GetClientAnchor() const
1456 { return pClientAnchor
; }
1457 EscherExClientRecord_Base
* GetClientData() const
1458 { return pClientData
; }
1459 EscherExClientRecord_Base
* GetClientTextbox() const
1460 { return pClientTextbox
; }
1462 void WriteClientAnchor( EscherEx
& rEx
, const Rectangle
& rRect
)
1463 { if( pClientAnchor
) pClientAnchor
->WriteData( rEx
, rRect
); }
1464 void WriteClientData( EscherEx
& rEx
)
1465 { if( pClientData
) pClientData
->WriteData( rEx
); }
1466 void WriteClientTextbox( EscherEx
& rEx
)
1467 { if( pClientTextbox
) pClientTextbox
->WriteData( rEx
); }
1469 sal_Bool
DontWriteShape() const { return bDontWriteShape
; }
1473 // ============================================================================
1475 /** Instance for global DFF data, shared through various instances of EscherEx. */
1476 class MSFILTER_DLLPUBLIC EscherExGlobal
: public EscherGraphicProvider
1479 explicit EscherExGlobal( sal_uInt32 nGraphicProvFlags
= _E_GRAPH_PROV_DO_NOT_ROTATE_METAFILES
);
1480 virtual ~EscherExGlobal();
1482 /** Returns a new drawing ID for a new drawing container (DGCONTAINER). */
1483 sal_uInt32
GenerateDrawingId();
1484 /** Creates and returns a new shape identifier, updates the internal shape
1485 counters and registers the identifier in the DGG cluster table.
1486 @param nDrawingId Drawing identifier has to be passed to be able to
1487 generate shape identifiers for multiple drawings simultaniously. */
1488 sal_uInt32
GenerateShapeId( sal_uInt32 nDrawingId
, bool bIsInSpgr
);
1489 /** Returns the number of shapes in the current drawing, based on number of
1490 calls to the GenerateShapeId() function. */
1491 sal_uInt32
GetDrawingShapeCount( sal_uInt32 nDrawingId
) const;
1492 /** Returns the last shape identifier generated by the GenerateShapeId()
1494 sal_uInt32
GetLastShapeId( sal_uInt32 nDrawingId
) const;
1496 /** Sets the flag indicating that the DGGCONTAINER exists. */
1497 inline void SetDggContainer() { mbHasDggCont
= true; }
1498 /** Sets the flag indicating that the DGGCONTAINER exists. */
1499 inline bool HasDggContainer() const { return mbHasDggCont
; }
1500 /** Returns the total size of the DGG atom (including header). */
1501 sal_uInt32
GetDggAtomSize() const;
1502 /** Writes the complete DGG atom to the passed stream (overwrites existing data!). */
1503 void WriteDggAtom( SvStream
& rStrm
) const;
1505 /** Called if a picture shall be written and no picture stream is set at
1506 class ImplEscherExSdr.
1508 On first invokation, this function calls the virtual member function
1509 ImplQueryPictureStream(). The return value will be cached internally
1510 for subsequent calls and for the GetPictureStream() function.
1512 SvStream
* QueryPictureStream();
1514 /** Returns the picture stream if existing (queried), otherwise null. */
1515 inline SvStream
* GetPictureStream() { return mpPicStrm
; }
1518 /** Derived classes may implement to create a new stream used to store the
1521 The implementation has to take care about lifetime of the returned
1522 stream (it will not be destructed automatically). This function is
1523 called exactly once. The return value will be cached internally for
1524 repeated calls of the public QueryPictureStream() function.
1526 virtual SvStream
* ImplQueryPictureStream();
1531 sal_uInt32 mnDrawingId
; /// Identifier of drawing this cluster belongs to (one-based index into maDrawingInfos).
1532 sal_uInt32 mnNextShapeId
; /// Next free shape identifier in this cluster.
1533 inline explicit ClusterEntry( sal_uInt32 nDrawingId
) : mnDrawingId( nDrawingId
), mnNextShapeId( 0 ) {}
1535 typedef ::std::vector
< ClusterEntry
> ClusterTable
;
1539 sal_uInt32 mnClusterId
; /// Currently used cluster (one-based index into maClusterTable).
1540 sal_uInt32 mnShapeCount
; /// Current number of shapes in this drawing.
1541 sal_uInt32 mnLastShapeId
; /// Last shape identifier generated for this drawing.
1542 inline explicit DrawingInfo( sal_uInt32 nClusterId
) : mnClusterId( nClusterId
), mnShapeCount( 0 ), mnLastShapeId( 0 ) {}
1544 typedef ::std::vector
< DrawingInfo
> DrawingInfoVector
;
1546 ClusterTable maClusterTable
; /// List with cluster IDs (used object IDs in drawings).
1547 DrawingInfoVector maDrawingInfos
; /// Data about all used drawings.
1548 SvStream
* mpPicStrm
; /// Cached result of ImplQueryPictureStream().
1549 bool mbHasDggCont
; /// True = the DGGCONTAINER has been initialized.
1550 bool mbPicStrmQueried
; /// True = ImplQueryPictureStream() has been called.
1553 typedef ::boost::shared_ptr
< EscherExGlobal
> EscherExGlobalRef
;
1555 // ---------------------------------------------------------------------------------------------
1559 class ImplEscherExSdr
;
1561 class MSFILTER_DLLPUBLIC EscherEx
: public EscherPersistTable
1564 typedef ::std::auto_ptr
< ImplEscherExSdr
> ImplEscherExSdrPtr
;
1566 EscherExGlobalRef mxGlobal
;
1567 ImplEscherExSdrPtr mpImplEscherExSdr
;
1568 SvStream
* mpOutStrm
;
1570 sal_uInt32 mnStrmStartOfs
;
1571 std::vector
< sal_uInt32
> mOffsets
;
1572 std::vector
< sal_uInt16
> mRecTypes
;
1574 sal_uInt32 mnCurrentDg
;
1575 sal_uInt32 mnCountOfs
;
1577 sal_uInt32 mnGroupLevel
;
1578 sal_uInt16 mnHellLayerId
;
1580 sal_Bool mbEscherSpgr
;
1581 sal_Bool mbEscherDg
;
1582 sal_Bool mbOleEmf
; // OLE is EMF instead of WMF
1585 virtual sal_Bool
DoSeek( sal_uInt32 nKey
);
1588 explicit EscherEx( const EscherExGlobalRef
& rxGlobal
, SvStream
* pOutStrm
);
1589 virtual ~EscherEx();
1591 /** Creates and returns a new shape identifier, updates the internal shape
1592 counters and registers the identifier in the DGG cluster table. */
1593 inline sal_uInt32
GenerateShapeId() { return mxGlobal
->GenerateShapeId( mnCurrentDg
, mbEscherSpgr
); }
1595 /** Returns the graphic provider from the global object that has been
1596 passed to the constructor.
1598 inline EscherGraphicProvider
& GetGraphicProvider() { return *mxGlobal
; }
1600 /** Called if a picture shall be written and no picture stream is set at
1601 class ImplEscherExSdr.
1603 inline SvStream
* QueryPictureStream() { return mxGlobal
->QueryPictureStream(); }
1605 /// Inserts internal data into the EscherStream, this process
1606 /// may and has to be executed only once
1607 /// If pPicStreamMergeBSE is known, the BLIPs from this stream are being
1608 /// merged into the MsofbtBSE Records of the EscherStream like it's
1609 /// required for Excel (and maybe Word?)
1610 virtual void Flush( SvStream
* pPicStreamMergeBSE
= NULL
);
1612 /** Inserts the passed number of bytes at the current position of the
1615 Inserts dummy bytes and moves all following stream data, and updates
1616 all internal stream offsets stored in the PersistTable and the affected
1617 container sizes, which makes this operation very expensive. (!)
1619 @param nBytes The number of bytes to be inserted into the stream.
1621 @param bExpandEndOfAtom If set to true, an atom that currently ends
1622 exactly at the current stream position will be expanded to include
1623 the inserted data. If set to false, an atom that currently ends
1624 exactly at the current stream position will not be expanded to
1625 include the inserted data (used to insert e.g. a new atom after an
1626 existing atom). Note that containers that end exactly at the
1627 current stream position are always expanded to include the inserted
1630 void InsertAtCurrentPos( sal_uInt32 nBytes
, bool bExpandEndOfAtom
);
1632 void InsertPersistOffset( sal_uInt32 nKey
, sal_uInt32 nOffset
); // It is not being checked if this key is already in the PersistantTable
1633 void ReplacePersistOffset( sal_uInt32 nKey
, sal_uInt32 nOffset
);
1634 sal_uInt32
GetPersistOffset( sal_uInt32 nKey
);
1635 sal_Bool
SeekToPersistOffset( sal_uInt32 nKey
);
1636 virtual sal_Bool
InsertAtPersistOffset( sal_uInt32 nKey
, sal_uInt32 nValue
); // nValue is being inserted into the Stream where it's appropriate (overwrite modus), without that the
1637 // current StreamPosition changes
1639 SvStream
& GetStream() const { return *mpOutStrm
; }
1640 sal_uLong
GetStreamPos() const { return mpOutStrm
->Tell(); }
1642 // features during the creation of the following Containers:
1644 // ESCHER_DggContainer: a EscherDgg Atom is automatically being created and managed
1645 // ESCHER_DgContainer: a EscherDg Atom is automatically being created and managed
1646 // ESCHER_SpgrContainer:
1647 // ESCHER_SpContainer:
1649 virtual void OpenContainer( sal_uInt16 nEscherContainer
, int nRecInstance
= 0 );
1650 virtual void CloseContainer();
1652 virtual void BeginAtom();
1653 virtual void EndAtom( sal_uInt16 nRecType
, int nRecVersion
= 0, int nRecInstance
= 0 );
1654 virtual void AddAtom( sal_uInt32 nAtomSitze
, sal_uInt16 nRecType
, int nRecVersion
= 0, int nRecInstance
= 0 );
1655 virtual void AddChildAnchor( const Rectangle
& rRectangle
);
1656 virtual void AddClientAnchor( const Rectangle
& rRectangle
);
1658 virtual sal_uInt32
EnterGroup( const OUString
& rShapeName
, const Rectangle
* pBoundRect
= 0 );
1659 sal_uInt32
EnterGroup( const Rectangle
* pBoundRect
= NULL
);
1660 sal_uInt32
GetGroupLevel() const { return mnGroupLevel
; };
1661 virtual sal_Bool
SetGroupSnapRect( sal_uInt32 nGroupLevel
, const Rectangle
& rRect
);
1662 virtual sal_Bool
SetGroupLogicRect( sal_uInt32 nGroupLevel
, const Rectangle
& rRect
);
1663 virtual void LeaveGroup();
1665 // a ESCHER_Sp is being written ( a ESCHER_DgContainer has to be opened for this purpose!)
1666 virtual void AddShape( sal_uInt32 nShpInstance
, sal_uInt32 nFlagIds
, sal_uInt32 nShapeID
= 0 );
1668 virtual void Commit( EscherPropertyContainer
& rProps
, const Rectangle
& rRect
);
1670 sal_uInt32
GetColor( const sal_uInt32 nColor
, sal_Bool bSwap
= sal_True
);
1671 sal_uInt32
GetColor( const Color
& rColor
, sal_Bool bSwap
= sal_True
);
1673 // ...Sdr... implemented in eschesdo.cxx
1675 void AddSdrPage( const SdrPage
& rPage
);
1676 void AddUnoShapes( const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShapes
>& rxShapes
);
1678 /// returns the ShapeID
1679 sal_uInt32
AddSdrObject( const SdrObject
& rObj
);
1681 /// If objects are written through AddSdrObject the
1682 /// SolverContainer has to be written, and maybe some
1683 /// maintenance to be done.
1684 void EndSdrObjectPage();
1686 /// Called before a shape is written, application supplies
1687 /// ClientRecords. May set AppData::bDontWriteShape so the
1688 /// shape is ignored.
1689 virtual EscherExHostAppData
* StartShape(
1690 const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
>& rShape
,
1691 const Rectangle
* pChildAnchor
);
1693 /// Called after a shape is written to inform the application
1694 /// of the resulted shape type and ID.
1695 virtual void EndShape( sal_uInt16 nShapeType
, sal_uInt32 nShapeID
);
1697 /// Called before an AdditionalText EnterGroup occurs.
1698 /// The current shape will be written in three parts:
1699 /// a group shape, the shape itself, and an extra textbox shape.
1700 /// The complete flow is:
1701 /// StartShape sets HostData1.
1702 /// EnterAdditionalTextGroup sets HostData2, App may modify
1703 /// HostData1 and keep track of the change.
1704 /// The group shape is written with HostData2.
1705 /// Another StartShape with the same (!) object sets HostData3.
1706 /// The current shape is written with HostData3.
1707 /// EndShape is called for the current shape.
1708 /// Another StartShape with the same (!) object sets HostData4.
1709 /// The textbox shape is written with HostData4.
1710 /// EndShape is called for the textbox shape.
1711 /// EndShape is called for the group shape, this provides
1712 /// the same functionality as an ordinary recursive group.
1713 virtual EscherExHostAppData
* EnterAdditionalTextGroup();
1715 /// Called if an ESCHER_Prop_lTxid shall be written
1716 virtual sal_uInt32
QueryTextID( const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
>&, sal_uInt32 nShapeId
);
1717 // add an dummy rectangle shape into the escher stream
1718 sal_uInt32
AddDummyShape();
1720 static const SdrObject
* GetSdrObject( const ::com::sun::star::uno::Reference
< ::com::sun::star::drawing::XShape
>& rXShape
);
1722 void SetHellLayerId( sal_uInt16 nId
) { mnHellLayerId
= nId
; }
1723 sal_uInt16
GetHellLayerId() const { return mnHellLayerId
; }
1726 EscherEx( const EscherEx
& );
1727 EscherEx
& operator=( const EscherEx
& );
1729 // prevent C-style cast to former base class EscherGraphicProvider
1730 operator EscherGraphicProvider
&();
1731 operator EscherGraphicProvider
const&();
1737 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */