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 _SVX_ESCHEREX_HXX
21 : #define _SVX_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/Hatch.hpp>
39 : #include <svx/msdffdef.hxx>
40 : #include "filter/msfilter/msfilterdllapi.h"
41 :
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 */
54 :
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
80 :
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 */
93 :
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
301 :
302 : enum ESCHER_BlibType
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
309 : PEG, // JFIF
310 : PNG, // PNG
311 : DIB, // Windows DIB
312 : FirstClient = 32, // First client defined blip type
313 : LastClient = 255 // Last client defined blip type
314 : };
315 :
316 : enum ESCHER_FillStyle
317 : {
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
328 : };
329 :
330 : enum ESCHER_wMode
331 : {
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
343 : };
344 :
345 :
346 : //
347 : enum ESCHER_ShapePath
348 : {
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
354 : };
355 :
356 :
357 : enum ESCHER_WrapMode
358 : {
359 : ESCHER_WrapSquare,
360 : ESCHER_WrapByPoints,
361 : ESCHER_WrapNone,
362 : ESCHER_WrapTopBottom,
363 : ESCHER_WrapThrough
364 : };
365 :
366 : //
367 : enum ESCHER_bwMode
368 : {
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
381 : };
382 :
383 :
384 : enum ESCHER_AnchorText
385 : {
386 : ESCHER_AnchorTop,
387 : ESCHER_AnchorMiddle,
388 : ESCHER_AnchorBottom,
389 : ESCHER_AnchorTopCentered,
390 : ESCHER_AnchorMiddleCentered,
391 : ESCHER_AnchorBottomCentered,
392 : ESCHER_AnchorTopBaseline,
393 : ESCHER_AnchorBottomBaseline,
394 : ESCHER_AnchorTopCenteredBaseline,
395 : ESCHER_AnchorBottomCenteredBaseline
396 : };
397 :
398 : enum ESCHER_cDir
399 : {
400 : ESCHER_cDir0, // Right
401 : ESCHER_cDir90, // Down
402 : ESCHER_cDir180, // Left
403 : ESCHER_cDir270 // Up
404 : };
405 :
406 : // connector style
407 : enum ESCHER_cxSTYLE
408 : {
409 : ESCHER_cxstyleStraight = 0,
410 : ESCHER_cxstyleBent,
411 : ESCHER_cxstyleCurved,
412 : ESCHER_cxstyleNone
413 : };
414 :
415 : // text flow
416 : enum ESCHER_txfl
417 : {
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-@
424 : };
425 :
426 : // text direction (needed for Bi-Di support)
427 : enum ESCHER_txDir
428 : {
429 : ESCHER_txdirLTR, // left-to-right text direction
430 : ESCHER_txdirRTL, // right-to-left text direction
431 : ESCHER_txdirContext // context text direction
432 : };
433 :
434 : // Callout Type
435 : enum ESCHER_spcot
436 : {
437 : ESCHER_spcotRightAngle = 1,
438 : ESCHER_spcotOneSegment = 2,
439 : ESCHER_spcotTwoSegment = 3,
440 : ESCHER_spcotThreeSegment= 4
441 : };
442 :
443 : // Callout Angle
444 : enum ESCHER_spcoa
445 : {
446 : ESCHER_spcoaAny,
447 : ESCHER_spcoa30,
448 : ESCHER_spcoa45,
449 : ESCHER_spcoa60,
450 : ESCHER_spcoa90,
451 : ESCHER_spcoa0
452 : };
453 :
454 : // Callout Drop
455 : enum ESCHER_spcod
456 : {
457 : ESCHER_spcodTop,
458 : ESCHER_spcodCenter,
459 : ESCHER_spcodBottom,
460 : ESCHER_spcodSpecified
461 : };
462 :
463 : // FontWork alignment
464 : enum ESCHER_GeoTextAlign
465 : {
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
473 : };
474 :
475 : // flags for pictures
476 : enum ESCHER_BlipFlags
477 : {
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
486 : };
487 :
488 : //
489 : enum ESCHER_3DRenderMode
490 : {
491 : ESCHER_FullRender, // Generate a full rendering
492 : ESCHER_Wireframe, // Generate a wireframe
493 : ESCHER_BoundingCube // Generate a bounding cube
494 : };
495 :
496 : //
497 : enum ESCHER_xFormType
498 : {
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
502 : };
503 :
504 : //
505 : enum ESCHER_ShadowType
506 : {
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
513 : };
514 :
515 : // - the type of a (length) measurement
516 : enum ESCHER_dzType
517 : {
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
532 : };
533 :
534 : // how to interpret the colors in a shaded fill.
535 : enum ESCHER_ShadeType
536 : {
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
542 :
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
548 : from the default! */
549 : ESCHER_ShadeParameterShift = 16,
550 : ESCHER_ShadeParameterMask = 0xffff0000,
551 :
552 : ESCHER_ShadeDefault = (ESCHER_ShadeGamma|ESCHER_ShadeSigma|
553 : (16384<<ESCHER_ShadeParameterShift))
554 : };
555 :
556 : // compound line style
557 : enum ESCHER_LineStyle
558 : {
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
564 : };
565 :
566 : // how to "fill" the line contour
567 : enum ESCHER_LineType
568 : {
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
573 : };
574 :
575 : // dashed line style
576 : enum ESCHER_LineDashing
577 : {
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
589 : };
590 :
591 : // line end effect
592 : enum ESCHER_LineEnd
593 : {
594 : ESCHER_LineNoEnd,
595 : ESCHER_LineArrowEnd,
596 : ESCHER_LineArrowStealthEnd,
597 : ESCHER_LineArrowDiamondEnd,
598 : ESCHER_LineArrowOvalEnd,
599 : ESCHER_LineArrowOpenEnd
600 : };
601 :
602 : // size of arrowhead
603 : enum ESCHER_LineWidth
604 : {
605 : ESCHER_LineNarrowArrow,
606 : ESCHER_LineMediumWidthArrow,
607 : ESCHER_LineWideArrow
608 : };
609 :
610 : // size of arrowhead
611 : enum ESCHER_LineEndLenght
612 : {
613 : ESCHER_LineShortArrow,
614 : ESCHER_LineMediumLenArrow,
615 : ESCHER_LineLongArrow
616 : };
617 :
618 : // line join style.
619 : enum ESCHER_LineJoin
620 : {
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
624 : };
625 :
626 : // line cap style (applies to ends of dash segments too).
627 : enum ESCHER_LineCap
628 : {
629 : ESCHER_LineEndCapRound, // Rounded ends - the default
630 : ESCHER_LineEndCapSquare, // Square protrudes by half line width
631 : ESCHER_LineEndCapFlat // Line ends at end point
632 : };
633 :
634 : // Shape Properties
635 : // 1pt = 12700 EMU (English Metric Units)
636 : // 1pt = 20 Twip = 20/1440" = 1/72"
637 : // 1twip=635 EMU
638 : // 1" = 12700*72 = 914400 EMU
639 : // 1" = 25.4mm
640 : // 1mm = 36000 EMU
641 : // Transform
642 : #define ESCHER_Prop_Rotation 4 /* Fixed Point 16.16 degrees */
643 : // Protection
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 */
653 : // Text
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 */
671 : // GeoText
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 */
694 : // Blip
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) */
717 : // Geometry
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? */
741 : // FillStyle
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 */
776 : // LineStyle
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 */
806 : // ShadowStyle
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 */
827 : // PerspectiveStyle
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 */
841 : // 3D Object
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 */
855 : // 3D Style
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? */
888 : // Shape
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. */
899 : // Callout
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 */
913 : // GroupShape
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 */
932 :
933 : #define ESCHER_PERSISTENTRY_PREALLOCATE 64
934 :
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
941 :
942 : const sal_uInt32 DFF_DGG_CLUSTER_SIZE = 0x00000400; /// Shape IDs per cluster in DGG atom.
943 :
944 : // ---------------------------------------------------------------------------------------------
945 :
946 : namespace com { namespace sun { namespace star {
947 : namespace awt {
948 : struct Gradient;
949 : }
950 : namespace drawing {
951 : struct EnhancedCustomShapeAdjustmentValue;
952 : class XShape;
953 : class XShapes;
954 : }
955 : }}}
956 :
957 0 : struct MSFILTER_DLLPUBLIC EscherConnectorListEntry
958 : {
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;
964 :
965 : sal_uInt32 GetConnectorRule( sal_Bool bFirst );
966 :
967 0 : 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 ) :
972 : mXConnector ( rC ),
973 : maPointA ( rPA ),
974 : mXConnectToA( rSA ),
975 : maPointB ( rPB ),
976 0 : mXConnectToB( rSB ) {}
977 :
978 : sal_uInt32 GetClosestPoint( const Polygon& rPoly, const ::com::sun::star::awt::Point& rP );
979 : };
980 :
981 : struct MSFILTER_DLLPUBLIC EscherExContainer
982 : {
983 : sal_uInt32 nContPos;
984 : SvStream& rStrm;
985 :
986 : EscherExContainer( SvStream& rSt, const sal_uInt16 nRecType, const sal_uInt16 nInstance = 0 );
987 : ~EscherExContainer();
988 : };
989 :
990 : struct MSFILTER_DLLPUBLIC EscherExAtom
991 : {
992 : sal_uInt32 nContPos;
993 : SvStream& rStrm;
994 :
995 : EscherExAtom( SvStream& rSt, const sal_uInt16 nRecType, const sal_uInt16 nInstance = 0, const sal_uInt8 nVersion = 0 );
996 : ~EscherExAtom();
997 : };
998 :
999 : struct EscherPropertyValueHelper
1000 : {
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 String& rPropertyName,
1005 : sal_Bool bTestPropertyAvailability = sal_False
1006 : );
1007 :
1008 : static ::com::sun::star::beans::PropertyState GetPropertyState(
1009 : const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > &,
1010 : const String& rPropertyName
1011 : );
1012 : };
1013 :
1014 : // ---------------------------------------------------------------------------------------------
1015 :
1016 : struct EscherPersistEntry
1017 : {
1018 : sal_uInt32 mnID;
1019 : sal_uInt32 mnOffset;
1020 :
1021 7 : EscherPersistEntry( sal_uInt32 nId, sal_uInt32 nOffset ) { mnID = nId; mnOffset = nOffset; };
1022 :
1023 : };
1024 :
1025 : // ---------------------------------------------------------------------------------------------
1026 :
1027 : class EscherBlibEntry
1028 : {
1029 :
1030 : friend class EscherGraphicProvider;
1031 : friend class EscherEx;
1032 :
1033 : protected:
1034 :
1035 : sal_uInt32 mnIdentifier[ 4 ];
1036 : sal_uInt32 mnPictureOffset; // offset to the graphic im PictureStreams
1037 : sal_uInt32 mnSize; // size of real graphic
1038 :
1039 : sal_uInt32 mnRefCount; // !! reference count
1040 : sal_uInt32 mnSizeExtra; // !! size of preceding header
1041 :
1042 : ESCHER_BlibType meBlibType;
1043 :
1044 : Size maPrefSize;
1045 : MapMode maPrefMapMode;
1046 :
1047 : sal_Bool mbIsEmpty;
1048 : sal_Bool mbIsNativeGraphicPossible;
1049 :
1050 : public:
1051 :
1052 : EscherBlibEntry(
1053 : sal_uInt32 nPictureOffset,
1054 : const GraphicObject& rObj,
1055 : const rtl::OString& rId,
1056 : const GraphicAttr* pAttr = NULL
1057 : );
1058 :
1059 : ~EscherBlibEntry();
1060 :
1061 : void WriteBlibEntry( SvStream& rSt, sal_Bool bWritePictureOffset, sal_uInt32 nResize = 0 );
1062 0 : sal_Bool IsEmpty() const { return mbIsEmpty; };
1063 :
1064 : sal_Bool operator==( const EscherBlibEntry& ) const;
1065 : };
1066 :
1067 : // ---------------------------------------------------------------------------------------------
1068 :
1069 : #define _E_GRAPH_PROV_USE_INSTANCES 1
1070 : #define _E_GRAPH_PROV_DO_NOT_ROTATE_METAFILES 2
1071 :
1072 : class MSFILTER_DLLPUBLIC EscherGraphicProvider
1073 : {
1074 : sal_uInt32 mnFlags;
1075 :
1076 : EscherBlibEntry** mpBlibEntrys;
1077 : sal_uInt32 mnBlibBufSize;
1078 : sal_uInt32 mnBlibEntrys;
1079 :
1080 : rtl::OUString maBaseURI;
1081 :
1082 : protected:
1083 :
1084 : sal_uInt32 ImplInsertBlib( EscherBlibEntry* p_EscherBlibEntry );
1085 :
1086 : public:
1087 :
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 rtl::OString& rGraphicId,
1095 : const Rectangle& rBoundRect,
1096 : const com::sun::star::awt::Rectangle* pVisArea = NULL,
1097 : const GraphicAttr* pGrafikAttr = NULL
1098 : );
1099 1 : sal_Bool HasGraphics() const { return mnBlibEntrys != 0; };
1100 :
1101 : void SetNewBlipStreamOffset( sal_Int32 nOffset );
1102 :
1103 : sal_Bool GetPrefSize( const sal_uInt32 nBlibId, Size& rSize, MapMode& rMapMode );
1104 :
1105 1 : void SetBaseURI( const rtl::OUString& rBaseURI ) { maBaseURI = rBaseURI; };
1106 0 : const rtl::OUString& GetBaseURI() { return maBaseURI; };
1107 :
1108 : EscherGraphicProvider( sal_uInt32 nFlags = _E_GRAPH_PROV_DO_NOT_ROTATE_METAFILES );
1109 : ~EscherGraphicProvider();
1110 :
1111 : };
1112 :
1113 : struct EscherShapeListEntry;
1114 : typedef ::std::vector< EscherShapeListEntry* > EscherShapeList_impl;
1115 : typedef ::std::vector< EscherConnectorListEntry* > EscherConnectorList_impl;
1116 :
1117 : class MSFILTER_DLLPUBLIC EscherSolverContainer
1118 : {
1119 : EscherShapeList_impl maShapeList;
1120 : EscherConnectorList_impl maConnectorList;
1121 :
1122 : public:
1123 :
1124 : sal_uInt32 GetShapeId(
1125 : const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rShape
1126 : ) const;
1127 :
1128 : void AddShape(
1129 : const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > &,
1130 : sal_uInt32 nId
1131 : );
1132 :
1133 : void AddConnector(
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
1139 : );
1140 :
1141 : void WriteSolver( SvStream& );
1142 :
1143 2 : EscherSolverContainer(){};
1144 : ~EscherSolverContainer();
1145 : };
1146 :
1147 : // ---------------------------------------------------------------------------------------------
1148 :
1149 : #define ESCHER_CREATEPOLYGON_LINE 1
1150 : #define ESCHER_CREATEPOLYGON_POLYLINE 2
1151 : #define ESCHER_CREATEPOLYGON_POLYPOLYGON 4
1152 :
1153 : class GraphicAttr;
1154 : class SdrObjCustomShape;
1155 :
1156 : struct EscherPropSortStruct
1157 : {
1158 : sal_uInt8* pBuf;
1159 : sal_uInt32 nPropSize;
1160 : sal_uInt32 nPropValue;
1161 : sal_uInt16 nPropId;
1162 : };
1163 :
1164 : typedef std::vector< EscherPropSortStruct > EscherProperties;
1165 :
1166 : class MSFILTER_DLLPUBLIC EscherPropertyContainer
1167 : {
1168 : EscherGraphicProvider* pGraphicProvider;
1169 : SvStream* pPicOutStrm;
1170 : Rectangle* pShapeBoundRect;
1171 :
1172 : EscherPropSortStruct* pSortStruct;
1173 :
1174 : sal_uInt32 nSortCount;
1175 : sal_uInt32 nSortBufSize;
1176 : sal_uInt32 nCountCount;
1177 : sal_uInt32 nCountSize;
1178 :
1179 : sal_Bool bHasComplexData;
1180 : sal_Bool bSuppressRotation;
1181 :
1182 :
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,
1186 : sal_uInt32 nBlibId,
1187 : sal_Bool bCreateCroppingAttributes
1188 : );
1189 : sal_Bool ImplCreateEmbeddedBmp( const rtl::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 rtl::OUString& rString );
1205 :
1206 : void AddOpt(
1207 : sal_uInt16 nPropertyID,
1208 : sal_uInt32 nPropValue,
1209 : sal_Bool bBlib = sal_False
1210 : );
1211 :
1212 : void AddOpt(
1213 : sal_uInt16 nPropertyID,
1214 : sal_Bool bBlib,
1215 : sal_uInt32 nPropValue,
1216 : sal_uInt8* pProp,
1217 : sal_uInt32 nPropSize
1218 : );
1219 :
1220 : sal_Bool GetOpt( sal_uInt16 nPropertyID, sal_uInt32& rPropValue ) const;
1221 :
1222 : sal_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 : sal_Bool CreateShapeProperties(
1229 : const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape
1230 : );
1231 : sal_Bool CreateOLEGraphicProperties(
1232 : const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXOleObject
1233 : );
1234 :
1235 : /** Creates a complex ESCHER_Prop_fillBlip containing the BLIP directly (for Excel charts). */
1236 : sal_Bool CreateEmbeddedBitmapProperties(
1237 : const ::rtl::OUString& rBitmapUrl,
1238 : ::com::sun::star::drawing::BitmapMode eBitmapMode
1239 : );
1240 : /** Creates a complex ESCHER_Prop_fillBlip containing a hatch style (for Excel charts). */
1241 : sal_Bool CreateEmbeddedHatchProperties(
1242 : const ::com::sun::star::drawing::Hatch& rHatch,
1243 : const Color& rBackColor,
1244 : bool bFillBackground
1245 : );
1246 :
1247 : // the GraphicProperties will only be created if a GraphicProvider and PicOutStrm is known
1248 : // DR: #99897# if no GraphicProvider is present, a complex ESCHER_Prop_fillBlip
1249 : // will be created, containing the BLIP directly (e.g. for Excel charts).
1250 : sal_Bool CreateGraphicProperties(
1251 : const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet,
1252 : const String& rSource,
1253 : const sal_Bool bCreateFillBitmap,
1254 : const sal_Bool bCreateCroppingAttributes = sal_False,
1255 : const sal_Bool bFillBitmapModeAllowed = sal_True
1256 : );
1257 :
1258 : sal_Bool CreatePolygonProperties(
1259 : const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet,
1260 : sal_uInt32 nFlags,
1261 : sal_Bool bBezier,
1262 : ::com::sun::star::awt::Rectangle& rGeoRect,
1263 : Polygon* pPolygon = NULL
1264 : );
1265 :
1266 : static sal_uInt32 GetGradientColor(
1267 : const ::com::sun::star::awt::Gradient* pGradient,
1268 : sal_uInt32 nStartColor
1269 : );
1270 :
1271 : void CreateGradientProperties( const ::com::sun::star::awt::Gradient & rGradient );
1272 : void CreateGradientProperties(
1273 : const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &
1274 : );
1275 : void CreateLineProperties(
1276 : const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
1277 : sal_Bool bEdge
1278 : );
1279 : void CreateFillProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &, sal_Bool bEdge );
1280 : void CreateTextProperties(
1281 : const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &,
1282 : sal_uInt32 nText,
1283 : const sal_Bool bIsCustomShape = sal_False,
1284 : const sal_Bool bIsTextFrame = sal_True
1285 : );
1286 :
1287 : sal_Bool CreateConnectorProperties(
1288 : const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape,
1289 : EscherSolverContainer& rSolver,
1290 : ::com::sun::star::awt::Rectangle& rGeoRect,
1291 : sal_uInt16& rShapeType,
1292 : sal_uInt16& rShapeFlags
1293 : );
1294 :
1295 : // Because shadow properties depends to the line and fillstyle, the CreateShadowProperties method should be called at last.
1296 : // It activ only when at least a FillStyle or LineStyle is set.
1297 : sal_Bool CreateShadowProperties(
1298 : const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &
1299 : );
1300 :
1301 : // creates all necessary CustomShape properties, this includes also Text-, Shadow-, Fill-, and LineProperties
1302 : void CreateCustomShapeProperties(
1303 : const MSO_SPT eShapeType,
1304 : const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > &
1305 : );
1306 : sal_Bool IsFontWork() const;
1307 :
1308 : // helper functions which are also used by the escher import
1309 : static PolyPolygon GetPolyPolygon(
1310 : const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape
1311 : );
1312 : static PolyPolygon GetPolyPolygon( const ::com::sun::star::uno::Any& rSource );
1313 : static MSO_SPT GetCustomShapeType(
1314 : const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape,
1315 : sal_uInt32& nMirrorFlags
1316 : );
1317 : static MSO_SPT GetCustomShapeType(
1318 : const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & rXShape,
1319 : sal_uInt32& nMirrorFlags,
1320 : rtl::OUString& rShapeType
1321 : );
1322 :
1323 : // helper functions which are also used in ooxml export
1324 : static sal_Bool GetLineArrow(
1325 : const sal_Bool bLineStart,
1326 : const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet,
1327 : ESCHER_LineEnd& reLineEnd,
1328 : sal_Int32& rnArrowLength,
1329 : sal_Int32& rnArrowWidth
1330 : );
1331 : static sal_Bool IsDefaultObject( SdrObjCustomShape* pCustoShape );
1332 : static void LookForPolarHandles(
1333 : const MSO_SPT eShapeType,
1334 : sal_Int32& nAdjustmentsWhichNeedsToBeConverted
1335 : );
1336 : static sal_Bool GetAdjustmentValue( const com::sun::star::drawing::EnhancedCustomShapeAdjustmentValue & rkProp, sal_Int32 nIndex, sal_Int32 nAdjustmentsWhichNeedsToBeConverted, sal_Int32& nValue );
1337 : };
1338 :
1339 : // ---------------------------------------------------------------------------------------------
1340 :
1341 : typedef ::std::vector< EscherPersistEntry* > EscherPersistTable_impl;
1342 :
1343 : class MSFILTER_DLLPUBLIC EscherPersistTable
1344 : {
1345 :
1346 : public:
1347 : EscherPersistTable_impl maPersistTable;
1348 :
1349 : sal_Bool PtIsID( sal_uInt32 nID );
1350 : void PtInsert( sal_uInt32 nID, sal_uInt32 nOfs );
1351 : sal_uInt32 PtDelete( sal_uInt32 nID );
1352 : sal_uInt32 PtGetOffsetByID( sal_uInt32 nID );
1353 : sal_uInt32 PtReplace( sal_uInt32 nID, sal_uInt32 nOfs );
1354 : sal_uInt32 PtReplaceOrInsert( sal_uInt32 nID, sal_uInt32 nOfs );
1355 : sal_uInt32 PtGetCount() const { return maPersistTable.size(); };
1356 :
1357 : EscherPersistTable();
1358 : virtual ~EscherPersistTable();
1359 : };
1360 :
1361 : // ---------------------------------------------------------------------------------------------
1362 :
1363 : class EscherEx;
1364 :
1365 : /// abstract base class for ESCHER_ClientTextbox, ESCHER_ClientData
1366 : class MSFILTER_DLLPUBLIC EscherExClientRecord_Base
1367 : {
1368 : public:
1369 3 : EscherExClientRecord_Base() {}
1370 : virtual ~EscherExClientRecord_Base();
1371 :
1372 : /// Application writes the record header
1373 : /// using rEx.AddAtom(...) followed by
1374 : /// record data written to rEx.GetStream()
1375 : virtual void WriteData( EscherEx& rEx ) const = 0;
1376 : };
1377 :
1378 :
1379 : /// abstract base class for ESCHER_ClientAnchor
1380 : class MSFILTER_DLLPUBLIC EscherExClientAnchor_Base
1381 : {
1382 : public:
1383 0 : EscherExClientAnchor_Base() {}
1384 : virtual ~EscherExClientAnchor_Base();
1385 :
1386 : /// Application writes the record header
1387 : /// using rEx.AddAtom(...) followed by
1388 : /// record data written to rEx.GetStream()
1389 : virtual void WriteData( EscherEx& rEx,
1390 : const Rectangle& rRect ) = 0;
1391 : };
1392 :
1393 0 : class InteractionInfo
1394 : {
1395 : bool mbHasInteraction;
1396 : SAL_WNODEPRECATED_DECLARATIONS_PUSH
1397 : std::auto_ptr<SvMemoryStream> mpHyperlinkRecord;
1398 : SAL_WNODEPRECATED_DECLARATIONS_POP
1399 : InteractionInfo();
1400 :
1401 : public:
1402 0 : InteractionInfo( SvMemoryStream* pStream, bool bInteraction ) : mbHasInteraction( bInteraction )
1403 : {
1404 0 : mpHyperlinkRecord.reset( pStream );
1405 0 : }
1406 0 : bool hasInteraction() { return mbHasInteraction; }
1407 : SAL_WNODEPRECATED_DECLARATIONS_PUSH
1408 0 : const std::auto_ptr< SvMemoryStream >& getHyperlinkRecord() { return mpHyperlinkRecord; }
1409 : SAL_WNODEPRECATED_DECLARATIONS_POP
1410 : };
1411 :
1412 : class EscherExHostAppData
1413 : {
1414 : private:
1415 : EscherExClientAnchor_Base* pClientAnchor;
1416 : EscherExClientRecord_Base* pClientData;
1417 : EscherExClientRecord_Base* pClientTextbox;
1418 : InteractionInfo* pInteractionInfo;
1419 : // ignore single shape if entire pages are written
1420 : sal_Bool bDontWriteShape;
1421 :
1422 : public:
1423 2 : EscherExHostAppData() : pClientAnchor(0), pClientData(0),
1424 2 : pClientTextbox(0), pInteractionInfo(0), bDontWriteShape(sal_False)
1425 2 : {}
1426 :
1427 0 : void SetInteractionInfo( InteractionInfo* p )
1428 0 : { pInteractionInfo = p; }
1429 0 : void SetClientAnchor( EscherExClientAnchor_Base* p )
1430 0 : { pClientAnchor = p; }
1431 2 : void SetClientData( EscherExClientRecord_Base* p )
1432 2 : { pClientData = p; }
1433 0 : void SetClientTextbox( EscherExClientRecord_Base* p )
1434 0 : { pClientTextbox = p; }
1435 0 : void SetDontWriteShape( sal_Bool b )
1436 0 : { bDontWriteShape = b; }
1437 0 : InteractionInfo* GetInteractionInfo() const
1438 0 : { return pInteractionInfo; }
1439 0 : EscherExClientAnchor_Base* GetClientAnchor() const
1440 0 : { return pClientAnchor; }
1441 : EscherExClientRecord_Base* GetClientData() const
1442 : { return pClientData; }
1443 0 : EscherExClientRecord_Base* GetClientTextbox() const
1444 0 : { return pClientTextbox; }
1445 :
1446 0 : void WriteClientAnchor( EscherEx& rEx, const Rectangle& rRect )
1447 0 : { if( pClientAnchor ) pClientAnchor->WriteData( rEx, rRect ); }
1448 0 : void WriteClientData( EscherEx& rEx )
1449 0 : { if( pClientData ) pClientData->WriteData( rEx ); }
1450 0 : void WriteClientTextbox( EscherEx& rEx )
1451 0 : { if( pClientTextbox ) pClientTextbox->WriteData( rEx ); }
1452 :
1453 0 : sal_Bool DontWriteShape() const { return bDontWriteShape; }
1454 : };
1455 :
1456 :
1457 : // ============================================================================
1458 :
1459 : /** Instance for global DFF data, shared through various instances of EscherEx. */
1460 : class MSFILTER_DLLPUBLIC EscherExGlobal : public EscherGraphicProvider
1461 : {
1462 : public:
1463 : explicit EscherExGlobal( sal_uInt32 nGraphicProvFlags = _E_GRAPH_PROV_DO_NOT_ROTATE_METAFILES );
1464 : virtual ~EscherExGlobal();
1465 :
1466 : /** Returns a new drawing ID for a new drawing container (DGCONTAINER). */
1467 : sal_uInt32 GenerateDrawingId();
1468 : /** Creates and returns a new shape identifier, updates the internal shape
1469 : counters and registers the identifier in the DGG cluster table.
1470 : @param nDrawingId Drawing identifier has to be passed to be able to
1471 : generate shape identifiers for multiple drawings simultaniously. */
1472 : sal_uInt32 GenerateShapeId( sal_uInt32 nDrawingId, bool bIsInSpgr );
1473 : /** Returns the number of shapes in the current drawing, based on number of
1474 : calls to the GenerateShapeId() function. */
1475 : sal_uInt32 GetDrawingShapeCount( sal_uInt32 nDrawingId ) const;
1476 : /** Returns the last shape identifier generated by the GenerateShapeId()
1477 : function. */
1478 : sal_uInt32 GetLastShapeId( sal_uInt32 nDrawingId ) const;
1479 :
1480 : /** Sets the flag indicating that the DGGCONTAINER exists. */
1481 1 : inline void SetDggContainer() { mbHasDggCont = true; }
1482 : /** Sets the flag indicating that the DGGCONTAINER exists. */
1483 2 : inline bool HasDggContainer() const { return mbHasDggCont; }
1484 : /** Returns the total size of the DGG atom (including header). */
1485 : sal_uInt32 GetDggAtomSize() const;
1486 : /** Writes the complete DGG atom to the passed stream (overwrites existing data!). */
1487 : void WriteDggAtom( SvStream& rStrm ) const;
1488 :
1489 : /** Called if a picture shall be written and no picture stream is set at
1490 : class ImplEscherExSdr.
1491 :
1492 : On first invokation, this function calls the virtual member function
1493 : ImplQueryPictureStream(). The return value will be cached internally
1494 : for subsequent calls and for the GetPictureStream() function.
1495 : */
1496 : SvStream* QueryPictureStream();
1497 :
1498 : /** Returns the picture stream if existing (queried), otherwise null. */
1499 3 : inline SvStream* GetPictureStream() { return mpPicStrm; }
1500 :
1501 : private:
1502 : /** Derived classes may implement to create a new stream used to store the
1503 : picture data.
1504 :
1505 : The implementation has to take care about lifetime of the returned
1506 : stream (it will not be destructed automatically). This function is
1507 : called exactly once. The return value will be cached internally for
1508 : repeated calls of the public QueryPictureStream() function.
1509 : */
1510 : virtual SvStream* ImplQueryPictureStream();
1511 :
1512 : private:
1513 : struct ClusterEntry
1514 : {
1515 : sal_uInt32 mnDrawingId; /// Identifier of drawing this cluster belongs to (one-based index into maDrawingInfos).
1516 : sal_uInt32 mnNextShapeId; /// Next free shape identifier in this cluster.
1517 1 : inline explicit ClusterEntry( sal_uInt32 nDrawingId ) : mnDrawingId( nDrawingId ), mnNextShapeId( 0 ) {}
1518 : };
1519 : typedef ::std::vector< ClusterEntry > ClusterTable;
1520 :
1521 : struct DrawingInfo
1522 : {
1523 : sal_uInt32 mnClusterId; /// Currently used cluster (one-based index into maClusterTable).
1524 : sal_uInt32 mnShapeCount; /// Current number of shapes in this drawing.
1525 : sal_uInt32 mnLastShapeId; /// Last shape identifier generated for this drawing.
1526 1 : inline explicit DrawingInfo( sal_uInt32 nClusterId ) : mnClusterId( nClusterId ), mnShapeCount( 0 ), mnLastShapeId( 0 ) {}
1527 : };
1528 : typedef ::std::vector< DrawingInfo > DrawingInfoVector;
1529 :
1530 : ClusterTable maClusterTable; /// List with cluster IDs (used object IDs in drawings).
1531 : DrawingInfoVector maDrawingInfos; /// Data about all used drawings.
1532 : SvStream* mpPicStrm; /// Cached result of ImplQueryPictureStream().
1533 : bool mbHasDggCont; /// True = the DGGCONTAINER has been initialized.
1534 : bool mbPicStrmQueried; /// True = ImplQueryPictureStream() has been called.
1535 : };
1536 :
1537 : typedef ::boost::shared_ptr< EscherExGlobal > EscherExGlobalRef;
1538 :
1539 : // ---------------------------------------------------------------------------------------------
1540 :
1541 : class SdrObject;
1542 : class SdrPage;
1543 : class ImplEscherExSdr;
1544 :
1545 : class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable
1546 : {
1547 : protected:
1548 : typedef ::std::auto_ptr< ImplEscherExSdr > ImplEscherExSdrPtr;
1549 :
1550 : EscherExGlobalRef mxGlobal;
1551 : ImplEscherExSdrPtr mpImplEscherExSdr;
1552 : SvStream* mpOutStrm;
1553 : bool mbOwnsStrm;
1554 : sal_uInt32 mnStrmStartOfs;
1555 : std::vector< sal_uInt32 > mOffsets;
1556 : std::vector< sal_uInt16 > mRecTypes;
1557 :
1558 : sal_uInt32 mnCurrentDg;
1559 : sal_uInt32 mnCountOfs;
1560 :
1561 : sal_uInt32 mnGroupLevel;
1562 : sal_uInt16 mnHellLayerId;
1563 :
1564 : sal_Bool mbEscherSpgr;
1565 : sal_Bool mbEscherDg;
1566 : sal_Bool mbOleEmf; // OLE is EMF instead of WMF
1567 :
1568 :
1569 : virtual sal_Bool DoSeek( sal_uInt32 nKey );
1570 :
1571 : public:
1572 : explicit EscherEx( const EscherExGlobalRef& rxGlobal, SvStream* pOutStrm );
1573 : virtual ~EscherEx();
1574 :
1575 : /** Creates and returns a new shape identifier, updates the internal shape
1576 : counters and registers the identifier in the DGG cluster table. */
1577 6 : inline sal_uInt32 GenerateShapeId() { return mxGlobal->GenerateShapeId( mnCurrentDg, mbEscherSpgr ); }
1578 :
1579 : /** Returns the graphic provider from the global object that has been
1580 : passed to the constructor.
1581 : */
1582 1 : inline EscherGraphicProvider& GetGraphicProvider() { return *mxGlobal; }
1583 :
1584 : /** Called if a picture shall be written and no picture stream is set at
1585 : class ImplEscherExSdr.
1586 : */
1587 3 : inline SvStream* QueryPictureStream() { return mxGlobal->QueryPictureStream(); }
1588 :
1589 : /// Inserts internal data into the EscherStream, this process
1590 : /// may and has to be executed only once
1591 : /// If pPicStreamMergeBSE is known, the BLIPs from this stream are being
1592 : /// merged into the MsofbtBSE Records of the EscherStream like it's
1593 : /// required for Excel (and maybe Word?)
1594 : virtual void Flush( SvStream* pPicStreamMergeBSE = NULL );
1595 :
1596 : /** Inserts the passed number of bytes at the current position of the
1597 : output stream.
1598 :
1599 : Inserts dummy bytes and moves all following stream data, and updates
1600 : all internal stream offsets stored in the PersistTable and the affected
1601 : container sizes, which makes this operation very expensive. (!)
1602 :
1603 : @param nBytes The number of bytes to be inserted into the stream.
1604 :
1605 : @param bExpandEndOfAtom If set to true, an atom that currently ends
1606 : exactly at the current stream position will be expanded to include
1607 : the inserted data. If set to false, an atom that currently ends
1608 : exactly at the current stream position will not be expanded to
1609 : include the inserted data (used to insert e.g. a new atom after an
1610 : existing atom). Note that containers that end exactly at the
1611 : current stream position are always expanded to include the inserted
1612 : data.
1613 : */
1614 : void InsertAtCurrentPos( sal_uInt32 nBytes, bool bExpandEndOfAtom );
1615 :
1616 : void InsertPersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset ); // It is not being checked if this key is already in the PersistantTable
1617 : void ReplacePersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset );
1618 : sal_uInt32 GetPersistOffset( sal_uInt32 nKey );
1619 : sal_Bool SeekToPersistOffset( sal_uInt32 nKey );
1620 : 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
1621 : // current StreamPosition changes
1622 :
1623 15 : SvStream& GetStream() const { return *mpOutStrm; }
1624 1 : sal_uLong GetStreamPos() const { return mpOutStrm->Tell(); }
1625 :
1626 : virtual sal_Bool SeekBehindRecHeader( sal_uInt16 nRecType ); // the stream has to be in front of a valid Record Headeror Atom
1627 :
1628 : // features during the creation of the following Containers:
1629 : //
1630 : // ESCHER_DggContainer: a EscherDgg Atom is automatically being created and managed
1631 : // ESCHER_DgContainer: a EscherDg Atom is automatically being created and managed
1632 : // ESCHER_SpgrContainer:
1633 : // ESCHER_SpContainer:
1634 :
1635 : virtual void OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance = 0 );
1636 : virtual void CloseContainer();
1637 :
1638 : virtual void BeginAtom();
1639 : virtual void EndAtom( sal_uInt16 nRecType, int nRecVersion = 0, int nRecInstance = 0 );
1640 : virtual void AddAtom( sal_uInt32 nAtomSitze, sal_uInt16 nRecType, int nRecVersion = 0, int nRecInstance = 0 );
1641 : virtual void AddChildAnchor( const Rectangle& rRectangle );
1642 : virtual void AddClientAnchor( const Rectangle& rRectangle );
1643 :
1644 : virtual sal_uInt32 EnterGroup( const String& rShapeName, const Rectangle* pBoundRect = 0 );
1645 : sal_uInt32 EnterGroup( const Rectangle* pBoundRect = NULL );
1646 7 : sal_uInt32 GetGroupLevel() const { return mnGroupLevel; };
1647 : virtual sal_Bool SetGroupSnapRect( sal_uInt32 nGroupLevel, const Rectangle& rRect );
1648 : virtual sal_Bool SetGroupLogicRect( sal_uInt32 nGroupLevel, const Rectangle& rRect );
1649 : virtual void LeaveGroup();
1650 :
1651 : // a ESCHER_Sp is being written ( a ESCHER_DgContainer has to be opened for this purpose!)
1652 : virtual void AddShape( sal_uInt32 nShpInstance, sal_uInt32 nFlagIds, sal_uInt32 nShapeID = 0 );
1653 :
1654 : virtual void Commit( EscherPropertyContainer& rProps, const Rectangle& rRect );
1655 :
1656 : sal_uInt32 GetColor( const sal_uInt32 nColor, sal_Bool bSwap = sal_True );
1657 : sal_uInt32 GetColor( const Color& rColor, sal_Bool bSwap = sal_True );
1658 :
1659 : // ...Sdr... implemented in eschesdo.cxx
1660 :
1661 : void AddSdrPage( const SdrPage& rPage );
1662 : void AddUnoShapes( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes );
1663 :
1664 : /// returns the ShapeID
1665 : sal_uInt32 AddSdrObject( const SdrObject& rObj );
1666 :
1667 : /// If objects are written through AddSdrObject the
1668 : /// SolverContainer has to be written, and maybe some
1669 : /// maintenance to be done.
1670 : void EndSdrObjectPage();
1671 :
1672 : /// Called before a shape is written, application supplies
1673 : /// ClientRecords. May set AppData::bDontWriteShape so the
1674 : /// shape is ignored.
1675 : virtual EscherExHostAppData* StartShape(
1676 : const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rShape,
1677 : const Rectangle* pChildAnchor );
1678 :
1679 : /// Called after a shape is written to inform the application
1680 : /// of the resulted shape type and ID.
1681 : virtual void EndShape( sal_uInt16 nShapeType, sal_uInt32 nShapeID );
1682 :
1683 : /// Called before an AdditionalText EnterGroup occurs.
1684 : /// The current shape will be written in three parts:
1685 : /// a group shape, the shape itself, and an extra textbox shape.
1686 : /// The complete flow is:
1687 : /// StartShape sets HostData1.
1688 : /// EnterAdditionalTextGroup sets HostData2, App may modify
1689 : /// HostData1 and keep track of the change.
1690 : /// The group shape is written with HostData2.
1691 : /// Another StartShape with the same (!) object sets HostData3.
1692 : /// The current shape is written with HostData3.
1693 : /// EndShape is called for the current shape.
1694 : /// Another StartShape with the same (!) object sets HostData4.
1695 : /// The textbox shape is written with HostData4.
1696 : /// EndShape is called for the textbox shape.
1697 : /// EndShape is called for the group shape, this provides
1698 : /// the same functionality as an ordinary recursive group.
1699 : virtual EscherExHostAppData* EnterAdditionalTextGroup();
1700 :
1701 : /// Called if an ESCHER_Prop_lTxid shall be written
1702 : virtual sal_uInt32 QueryTextID( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >&, sal_uInt32 nShapeId );
1703 : // add an dummy rectangle shape into the escher stream
1704 : sal_uInt32 AddDummyShape();
1705 :
1706 : static const SdrObject* GetSdrObject( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rXShape );
1707 :
1708 2 : void SetHellLayerId( sal_uInt16 nId ) { mnHellLayerId = nId; }
1709 3 : sal_uInt16 GetHellLayerId() const { return mnHellLayerId; }
1710 :
1711 : private:
1712 : EscherEx( const EscherEx& );
1713 : EscherEx& operator=( const EscherEx& );
1714 :
1715 : // prevent C-style cast to former base class EscherGraphicProvider
1716 : operator EscherGraphicProvider&();
1717 : operator EscherGraphicProvider const&();
1718 : };
1719 :
1720 :
1721 : #endif
1722 :
1723 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|