1 /* This file is part of the Calligra project
2    Copyright (C) 2010, 2011 Matus Uzak <matus.uzak@ixonos.com>
3 
4    This library is free software; you can redistribute it and/or
5    modify it under the terms of the Library GNU General Public
6    version 2 of the License, or (at your option) version 3 or,
7    at the discretion of KDE e.V (which shall act as a proxy as in
8    section 14 of the GPLv3), any later version..
9 
10    This library is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    Library General Public License for more details.
14 
15    You should have received a copy of the GNU Library General Public License
16    along with this library; see the file COPYING.LIB.  If not, write to
17    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18    Boston, MA 02110-1301, USA.
19 */
20 
21 #ifndef MSODRAW_H
22 #define MSODRAW_H
23 
24 /**
25  * The MSOSPT enumeration specifies the preset shapes and preset text shape
26  * geometries that will be used for a shape.  An enumeration of this type is
27  * used so that a custom geometry does not need to be specified but can instead
28  * be automatically constructed by the generating application.
29  * [MS-ODRAW] — v20101219
30  */
31 enum MSOSPT
32 {
33     msosptMin = 0x0, //libmso specific
34     msosptNotPrimitive = 0x0,
35     msosptRectangle = 0x1,
36     msosptRoundRectangle = 0x2,
37     msosptEllipse = 0x3,
38     msosptDiamond = 0x4,
39     msosptIsocelesTriangle = 0x5,
40     msosptRightTriangle = 0x6,
41     msosptParallelogram = 0x7,
42     msosptTrapezoid = 0x8,
43     msosptHexagon = 0x9,
44     msosptOctagon = 0x0a,
45     msosptPlus = 0x0b,
46     msosptStar = 0x0c,
47     msosptArrow = 0x0d,
48     msosptThickArrow = 0x0e,
49     msosptHomePlate = 0x0f,
50 
51     msosptCube = 0x10,
52     msosptBaloon = 0x11,
53     msosptSeal = 0x12,
54     msosptArc = 0x13,
55     msosptLine = 0x14,
56     msosptPlaque = 0x15,
57     msosptCan = 0x16,
58     msosptDonut = 0x17,
59     msosptTextSimple = 0x18,
60     msosptTextOctagon = 0x19,
61     msosptTextHexagon = 0x1a,
62     msosptTextCurve = 0x1b,
63     msosptTextWave = 0x1c,
64     msosptTextRing = 0x1d,
65     msosptTextOnCurve = 0x1e,
66     msosptTextOnRing = 0x1f,
67 
68     msosptStraightConnector1 = 0x20,
69     msosptBentConnector2 = 0x21,
70     msosptBentConnector3 = 0x22,
71     msosptBentConnector4 = 0x23,
72     msosptBentConnector5 = 0x24,
73     msosptCurvedConnector2 = 0x25,
74     msosptCurvedConnector3 = 0x26,
75     msosptCurvedConnector4 = 0x27,
76     msosptCurvedConnector5 = 0x28,
77     msosptCallout1 = 0x29,
78     msosptCallout2 = 0x2a,
79     msosptCallout3 = 0x2b,
80     msosptAccentCallout1 = 0x2c,
81     msosptAccentCallout2 = 0x2d,
82     msosptAccentCallout3 = 0x2e,
83     msosptBorderCallout1 = 0x2f,
84 
85     msosptBorderCallout2 = 0x30,
86     msosptBorderCallout3 = 0x31,
87     msosptAccentBorderCallout1 = 0x32,
88     msosptAccentBorderCallout2 = 0x33,
89     msosptAccentBorderCallout3 = 0x34,
90     msosptRibbon = 0x35,
91     msosptRibbon2 = 0x36,
92     msosptChevron = 0x37,
93     msosptPentagon = 0x38,
94     msosptNoSmoking = 0x39,
95     msosptSeal8 = 0x3a,
96     msosptSeal16 = 0x3b,
97     msosptSeal32 = 0x3c,
98     msosptWedgeRectCallout = 0x3d,
99     msosptWedgeRRectCallout = 0x3e,
100     msosptWedgeEllipseCallout = 0x3f,
101 
102     msosptWave = 0x40,
103     msosptFoldedCorner = 0x41,
104     msosptLeftArrow = 0x42,
105     msosptDownArrow = 0x43,
106     msosptUpArrow = 0x44,
107     msosptLeftRightArrow = 0x45,
108     msosptUpDownArrow = 0x46,
109     msosptIrregularSeal1 = 0x47,
110     msosptIrregularSeal2 = 0x48,
111     msosptLightningBolt = 0x49,
112     msosptHeart = 0x4a,
113     msosptPictureFrame = 0x4b,
114     msosptQuadArrow = 0x4c,
115     msosptLeftArrowCallout = 0x4d,
116     msosptRightArrowCallout = 0x4e,
117     msosptUpArrowCallout = 0x4f,
118 
119     msosptDownArrowCallout = 0x50,
120     msosptLeftRightArrowCallout = 0x51,
121     msosptUpDownArrowCallout = 0x52,
122     msosptQuadArrowCallout = 0x53,
123     msosptBevel = 0x54,
124     msosptLeftBracket = 0x55,
125     msosptRightBracket = 0x56,
126     msosptLeftBrace = 0x57,
127     msosptRightBrace = 0x58,
128     msosptLeftUpArrow = 0x59,
129     msosptBentUpArrow = 0x5a,
130     msosptBentArrow = 0x5b,
131     msosptSeal24 = 0x5c,
132     msosptStripedRightArrow = 0x5d,
133     msosptNotchedRightArrow = 0x5e,
134     msosptBlockArc = 0x5f,
135 
136     msosptSmileyFace = 0x60,
137     msosptVerticalScroll = 0x61,
138     msosptHorizontalScroll = 0x62,
139     msosptCircularArrow = 0x63,
140     msosptNotchedCircularArrow = 0x64,
141     msosptUturnArrow = 0x65,
142     msosptCurvedRightArrow = 0x66,
143     msosptCurvedLeftArrow = 0x67,
144     msosptCurvedUpArrow = 0x68,
145     msosptCurvedDownArrow = 0x69,
146     msosptCloudCallout = 0x6a,
147     msosptEllipseRibbon = 0x6b,
148     msosptEllipseRibbon2 = 0x6c,
149     msosptFlowChartProcess = 0x6d,
150     msosptFlowChartDecision = 0x6e,
151     msosptFlowChartInputOutput = 0x6f,
152 
153     msosptFlowChartPredefinedProcess = 0x70,
154     msosptFlowChartInternalStorage = 0x71,
155     msosptFlowChartDocument = 0x72,
156     msosptFlowChartMultidocument = 0x73,
157     msosptFlowChartTerminator = 0x74,
158     msosptFlowChartPreparation = 0x75,
159     msosptFlowChartManualInput = 0x76,
160     msosptFlowChartManualOperation = 0x77,
161     msosptFlowChartConnector = 0x78,
162     msosptFlowChartPunchedCard = 0x79,
163     msosptFlowChartPunchedTape = 0x7a,
164     msosptFlowChartSummingJunction = 0x7b,
165     msosptFlowChartOr = 0x7c,
166     msosptFlowChartCollate = 0x7d,
167     msosptFlowChartSort = 0x7e,
168     msosptFlowChartExtract = 0x7f,
169 
170     msosptFlowChartMerge = 0x80,
171     msosptFlowChartOfflineStorage = 0x81,
172     msosptFlowChartOnlineStorage = 0x82,
173     msosptFlowChartMagneticTape = 0x83,
174     msosptFlowChartMagneticDisk = 0x84,
175     msosptFlowChartMagneticDrum = 0x85,
176     msosptFlowChartDisplay = 0x86,
177     msosptFlowChartDelay = 0x87,
178     msosptTextPlainText = 0x88,
179     msosptTextStop = 0x89,
180     msosptTextTriangle = 0x8a,
181     msosptTextTriangleInverted = 0x8b,
182     msosptTextChevron = 0x8c,
183     msosptTextChevronInverted = 0x8d,
184     msosptTextRingInside = 0x8e,
185     msosptTextRingOutside = 0x8f,
186 
187     msosptTextArchUpCurve = 0x90,
188     msosptTextArchDownCurve = 0x91,
189     msosptTextCircleCurve = 0x92,
190     msosptTextButtonCurve = 0x93,
191     msosptTextArchUpPour = 0x94,
192     msosptTextArchDownPour = 0x95,
193     msosptTextCirclePour = 0x96,
194     msosptTextButtonPour = 0x97,
195     msosptTextCurveUp = 0x98,
196     msosptTextCurveDown = 0x99,
197     msosptTextCascadeUp = 0x9a,
198     msosptTextCascadeDown = 0x9b,
199     msosptTextWave1 = 0x9c,
200     msosptTextWave2 = 0x9d,
201     msosptTextWave3 = 0x9e,
202     msosptTextWave4 = 0x9f,
203 
204     msosptTextInflate = 0xa0,
205     msosptTextDeflate = 0xa1,
206     msosptTextInflateBottom = 0xa2,
207     msosptTextDeflateBottom = 0xa3,
208     msosptTextInflateTop = 0xa4,
209     msosptTextDeflateTop = 0xa5,
210     msosptTextDeflateInflate = 0xa6,
211     msosptTextDeflateInflateDeflate = 0xa7,
212     msosptTextFadeRight = 0xa8,
213     msosptTextFadeLeft = 0xa9,
214     msosptTextFadeUp = 0xaa,
215     msosptTextFadeDown = 0xab,
216     msosptTextSlantUp = 0xac,
217     msosptTextSlantDown = 0xad,
218     msosptTextCanUp = 0xae,
219     msosptTextCanDown = 0xaf,
220 
221     msosptFlowChartAlternateProcess = 0xb0,
222     msosptFlowChartOffpageConnector = 0xb1,
223     msosptCallout90 = 0xb2,
224     msosptAccentCallout90 = 0xb3,
225     msosptBorderCallout90 = 0xb4,
226     msosptAccentBorderCallout90 = 0xb5,
227     msosptLeftRightUpArrow = 0xb6,
228     msosptSun = 0xb7,
229     msosptMoon = 0xb8,
230     msosptBracketPair = 0xb9,
231     msosptBracePair = 0xba,
232     msosptSeal4 = 0xbb,
233     msosptDoubleWave = 0xbc,
234     msosptActionButtonBlank = 0xbd,
235     msosptActionButtonHome = 0xbe,
236     msosptActionButtonHelp = 0xbf,
237 
238     msosptActionButtonInformation = 0xc0,
239     msosptActionButtonForwardNext = 0xc1,
240     msosptActionButtonBackPrevious = 0xc2,
241     msosptActionButtonEnd = 0xc3,
242     msosptActionButtonBeginning = 0xc4,
243     msosptActionButtonReturn = 0xc5,
244     msosptActionButtonDocument = 0xc6,
245     msosptActionButtonSound = 0xc7,
246     msosptActionButtonMovie = 0xc8,
247     msosptHostControl = 0xc9,
248     msosptTextBox = 0xca,
249     msosptNil = 0x0FFF //libmso specific
250 };
251 
252 /**
253  * The MSOLINESTYLE enumeration specifies the type of line style that will be
254  * used.  [MS-ODRAW] — v20101219
255  */
256 enum MSOLINESTYLE
257 {
258     msolineSimple,      //0x00  A simple line.
259     msolineDouble,      //0x01  A double line.
260     msolineThickThin,   //0x02  A thick line and a thin line.
261     msolineThinThick,   //0x03  A thin line and a thick line.
262     msolineTripl        //0x04  A triple line.
263 };
264 
265 /**
266  * The MSOLINEEND enumeration specifies the line end decorations that
267  * appear at the ends of lines.
268  */
269 enum MSOLINEEND
270 {
271     msolineNoEnd,
272     msolineArrowEnd,
273     msolineArrowStealthEnd,
274     msolineArrowDiamondEnd,
275     msolineArrowOvalEnd,
276     msolineArrowOpenEnd,
277     msolineArrowChevronEnd,
278     msolineArrowDoubleChevronEnd
279 };
280 
281 /**
282  * The MSOLINECAP enumeration specifies ways to cap the ends of lines
283  * in the document.
284  */
285 enum MSOLINECAP
286 {
287     msolineEndCapRound,
288     msolineEndCapSquare,
289     msolineEndCapFlat
290 };
291 
292 /**
293  * The MSOLINEJOIN enumeration specifies the types of join styles that
294  * can be applied to lines in the document.
295  */
296 enum MSOLINEJOIN
297 {
298     msolineJoinBevel,
299     msolineJoinMiter,
300     msolineJoinRound
301 };
302 
303 /**
304  * The MSOLINEDASHING enumeration, as shown in the following table, specifies
305  * preset dashed-line values. Each style corresponds to a precise binary
306  * representation of the repeating dash style. Each 1 corresponds to a line
307  * segment, and each 0 corresponds to a space.  [MS-ODRAW] — v20101219
308  */
309 enum MSOLINEDASHING
310 {
311     msolineSolid,             //0x00  1
312     msolineDashSys,           //0x01  1110
313     msolineDotSys,            //0x02  10
314     msolineDashDotSys,        //0x03  111010
315     msolineDashDotDotSys,     //0x04  11101010
316     msolineDotGEL,            //0x05  1000
317     msolineDashGEL,           //0x06  1111000
318     msolineLongDashGEL,       //0x07  11111111000
319     msolineDashDotGEL,        //0x08  11110001000
320     msolineLongDashDotGEL,    //0x09  111111110001000
321     msolineLongDashDotDotGEL  //0x0A  1111111100010001000
322 };
323 
324 /**
325  * The MSOFILLTYPE enumeration specifies the fill types.
326  * [MS-ODRAW] — v20101219
327  */
328 enum MSOFILLTYPE
329 {
330     msofillSolid = 0x0,
331     msofillPattern = 0x1,
332     msofillTexture = 0x2,
333     msofillPicture = 0x3,
334     msofillShade = 0x4,
335     msofillShadeCenter = 0x5,
336     msofillShadeShape = 0x6,
337     msofillShadeScale = 0x7,
338     msofillShadeTitle = 0x8,
339     msofillBackground = 0x9
340 };
341 
342 /**
343  * The MSOPATHTYPE enumeration specifies how the individual pieces of a path
344  * SHOULD be interpreted.  [MS-ODRAW] — v20101219
345  */
346 enum MSOPATHTYPE
347 {
348     msopathLineTo = 0,
349     msopathCurveTo,
350     msopathMoveTo,
351     msopathClose,
352     msopathEnd,
353     msopathEscape,
354     msopathClientEscape
355 };
356 
357 /**
358  * The MSOWRAPMODE enumeration specifies how text wraps
359  * SHOULD be interpreted.  [MS-ODRAW] — v20101219
360  */
361 enum MSOWRAPMODE
362 {
363     msowrapSquare = 0,
364     msowrapByPoints,
365     msowrapNone
366 };
367 
368 /**
369  * The MSOANCHOR enumeration specifies the suggested placement rule for a body
370  * of text.  These enumeration values are relative to the orientation, text box
371  * area, and margin sizes of the containing shape.  The exact placement of the
372  * text is application dependent and varies to accommodate other languages and
373  * text properties.  These enumeration values MAY be used.
374  * [MS-ODRAW] — v20101219
375  */
376 enum MSOANCHOR
377 {
378     msoanchorTop = 0x0,
379     msoanchorMiddle = 0x1,
380     msoanchorBottom = 0x2,
381     msoanchorTopCentered = 0x3,
382     msoanchorMiddleCentered = 0x4,
383     msoanchorBottomCentered = 0x5,
384     msoanchorTopBaseline = 0x6,
385     msoanchorBottomBaseline = 0x7,
386     msoanchorTopCenteredBaseline = 0x8,
387     msoanchorBottomCenteredBaseline = 0x9
388 };
389 
390 /**
391  * The POSH enumeration specifies the type of horizontal positioning to use for
392  * a shape.  [MS-ODRAW] — v20101219
393  */
394 enum POSH
395 {
396     msophAbs = 0x0,
397     msophLeft = 0x1,
398     msophCenter = 0x2,
399     msophRight = 0x3,
400     msophInside = 0x4,
401     msophOutside = 0x5
402 };
403 
404 /**
405  * The POSRELH enumeration specifies a page element relative to which a shape
406  * is horizontally positioned.  [MS-ODRAW] — v20101219
407  */
408 enum POSRELH
409 {
410 // NOTE: Based on our tests the enumeration should start from ZERO.
411     msoprhMargin = 0x1,
412     msoprhPage = 0x2,
413     msoprhText = 0x3,
414     msoprhChar = 0x4
415 };
416 
417 /**
418  * The POSV enumeration specifies the type of vertical positioning to use for a
419  * shape.  [MS-ODRAW] — v20101219
420  */
421 enum POSV
422 {
423     msopvAbs = 0x0,
424     msopvTop = 0x1,
425     msopvCenter = 0x2,
426     msopvBottom = 0x3,
427     msopvInside = 0x4,
428     msopvOutside = 0x5
429 };
430 
431 /**
432  * The POSRELV enumeration specifies a page element relative to which a shape
433  * is vertically positioned.  [MS-ODRAW] — v20101219
434  */
435 
436 enum POSRELV
437 {
438 // NOTE: Based on our tests the enumeration should start from ZERO.
439     msoprvMargin = 0x1,
440     msoprvPage = 0x2,
441     msoprvText = 0x3,
442     msoprvLine = 0x4
443 };
444 
445 #endif
446