1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: msashape.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
34 #include <svx/msdffdef.hxx>
35 #include <svx/msdffimp.hxx>
37 #define DFF_CUSTOMSHAPE_FLIP_V 1
38 #define DFF_CUSTOMSHAPE_FLIP_H 2
39 #define DFF_CUSTOMSHAPE_EXCH 4
43 struct SvxMSDffVertPair
;
44 struct SvxMSDffCalculationData
;
45 struct SvxMSDffTextRectangles
;
46 class SvxMSDffAdjustmentHandle
;
47 class SvxMSDffCustomShape
49 MSFilterTracer
* pTracer
;
52 sal_Int32 nCoordWidth
;
53 sal_Int32 nCoordHeight
;
59 sal_Int32 nFix16Angle
;
64 sal_uInt32 nNumElemVert
;
65 sal_uInt32 nNumElemSeg
;
67 sal_uInt32 nColorData
;
69 SvxMSDffVertPair
* pVertData
;
72 sal_uInt32 nTextRectData
;
73 SvxMSDffTextRectangles
* pTextRectData
;
74 sal_uInt32 nCalculationData
;
75 SvxMSDffCalculationData
* pCalculationData
;
76 sal_uInt32 nAdjustmentHandles
;
77 SvxMSDffAdjustmentHandle
* pAdjustmentHandles
;
78 sal_uInt32 nGluePoints
;
79 SvxMSDffVertPair
* pGluePoints
;
81 sal_Bool bIsEmpty
: 1;
82 sal_Bool bVertAlloc
: 1;
83 sal_Bool bSegAlloc
: 1;
84 sal_Bool bCalcAlloc
: 1;
85 sal_Bool bTextRectAlloc
: 1;
87 sal_Bool bTextFlow
: 1;
92 sal_Int32
GetAdjustValue( sal_uInt32 nIndex
) const;
93 sal_Int32
GetAdjustValue( sal_uInt32 nIndex
, sal_Int32 nDefault
) const;
94 sal_Int32
Fix16ToAngle( sal_Int32 nAngle
) const;
95 Color
ImplGetColorData( const Color
& rFillColor
, sal_uInt32 nIndex
);
96 double ImplGetValue( sal_uInt16 nIndex
, sal_uInt32
& nGeometryFlags
) const;
97 Point
GetPoint( const SvxMSDffVertPair
&, sal_Bool bScale
= sal_True
) const;
99 static void SwapStartAndEndArrow( SdrObject
* pObj
);
103 SdrObject
* GetObject( SdrModel
* pSdrModel
, SfxItemSet
& rSet
, sal_Bool bSetAdjustmentItem
);
104 sal_Bool
IsEmpty() const;
106 Rectangle
GetTextRect() const;
107 static sal_Bool
HasGluePointList( const MSO_SPT eShapeType
);
108 static MSO_SPT
GetShapeTypeFromSdrObject( const SdrObject
* );
110 SvxMSDffCustomShape( const DffPropertyReader
& rPropReader
, SvStream
&,
111 DffObjData
& rObjDat
, Rectangle
& rSnapRect
, sal_Int32 nFix16Angle
, MSFilterTracer
* pTracer
);
112 ~SvxMSDffCustomShape();