1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _ENHANCEDCUSTOMSHAPEGEOMETRY_HXX
29 #define _ENHANCEDCUSTOMSHAPEGEOMETRY_HXX
30 
31 #include <sal/types.h>
32 #include <svx/msdffdef.hxx>
33 
34 struct SvxMSDffVertPair
35 {
36 	sal_Int32	nValA;
37 	sal_Int32	nValB;
38 };
39 struct SvxMSDffCalculationData
40 {
41 	sal_uInt16	nFlags;
42 	sal_Int16	nVal[ 3 ];
43 };
44 struct SvxMSDffTextRectangles
45 {
46 	SvxMSDffVertPair	nPairA;
47 	SvxMSDffVertPair	nPairB;
48 };
49 
50 #define MSDFF_HANDLE_FLAGS_MIRRORED_X					0x0001
51 #define MSDFF_HANDLE_FLAGS_MIRRORED_Y					0x0002
52 #define MSDFF_HANDLE_FLAGS_SWITCHED						0x0004
53 #define MSDFF_HANDLE_FLAGS_POLAR						0x0008
54 #define MSDFF_HANDLE_FLAGS_MAP							0x0010
55 #define MSDFF_HANDLE_FLAGS_RANGE						0x0020
56 #define MSDFF_HANDLE_FLAGS_RANGE_X_MIN_IS_SPECIAL		0x0080
57 #define MSDFF_HANDLE_FLAGS_RANGE_X_MAX_IS_SPECIAL		0x0100
58 #define MSDFF_HANDLE_FLAGS_RANGE_Y_MIN_IS_SPECIAL		0x0200
59 #define MSDFF_HANDLE_FLAGS_RANGE_Y_MAX_IS_SPECIAL		0x0400
60 #define MSDFF_HANDLE_FLAGS_CENTER_X_IS_SPECIAL			0x0800
61 #define MSDFF_HANDLE_FLAGS_CENTER_Y_IS_SPECIAL			0x1000
62 #define MSDFF_HANDLE_FLAGS_RADIUS_RANGE					0x2000
63 
64 struct SvxMSDffHandle
65 {
66 	sal_uInt32	nFlags;
67 	sal_Int32	nPositionX, nPositionY, nCenterX, nCenterY, nRangeXMin, nRangeXMax, nRangeYMin, nRangeYMax;
68 };
69 struct mso_CustomShape
70 {
71 	SvxMSDffVertPair*						pVertices;
72 	sal_uInt32								nVertices;
73 	sal_uInt16*								pElements;
74 	sal_uInt32								nElements;
75 	SvxMSDffCalculationData*				pCalculation;
76 	sal_uInt32								nCalculation;
77 	sal_Int32*								pDefData;
78 	SvxMSDffTextRectangles*					pTextRect;
79 	sal_uInt32								nTextRect;
80 	sal_Int32								nCoordWidth;
81 	sal_Int32								nCoordHeight;
82 	sal_Int32								nXRef;
83 	sal_Int32								nYRef;
84 	SvxMSDffVertPair*						pGluePoints;
85 	sal_uInt32								nGluePoints;
86 	SvxMSDffHandle*							pHandles;
87 	sal_uInt32								nHandles;
88 };
89 
90 #define MSO_I | (sal_Int32)0x80000000
91 
92 sal_Bool			SortFilledObjectsToBackByDefault( MSO_SPT eSpType );
93 SVX_DLLPUBLIC sal_Bool			IsCustomShapeFilledByDefault( MSO_SPT eSpType );
94 SVX_DLLPUBLIC sal_Int16			GetCustomShapeConnectionTypeDefault( MSO_SPT eSpType );
95 
96 // #i28269#
97 SVX_DLLPUBLIC sal_Bool			IsCustomShapeStrokedByDefault( MSO_SPT eSpType );
98 
99 SVX_DLLPUBLIC const mso_CustomShape*	GetCustomShapeContent( MSO_SPT eSpType );
100 
101 #endif
102