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