update ooo310-m15
[ooovba.git] / svx / source / msfilter / msashape.hxx
blob2331f74e33c95c0172a5766782e7dcded3e15f4b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: msashape.hxx,v $
10 * $Revision: 1.13 $
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 ************************************************************************/
31 #ifndef _MSASHAPE_HXX
32 #define _MSASHAPE_HXX
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
41 class SdrModel;
42 class SfxItemSet;
43 struct SvxMSDffVertPair;
44 struct SvxMSDffCalculationData;
45 struct SvxMSDffTextRectangles;
46 class SvxMSDffAdjustmentHandle;
47 class SvxMSDffCustomShape
49 MSFilterTracer* pTracer;
50 MSO_SPT eSpType;
52 sal_Int32 nCoordWidth;
53 sal_Int32 nCoordHeight;
54 Rectangle aSnapRect;
56 double fXScale;
57 double fYScale;
59 sal_Int32 nFix16Angle;
60 sal_Int32 nXRef;
61 sal_Int32 nYRef;
62 sal_uInt32 nFlags;
64 sal_uInt32 nNumElemVert;
65 sal_uInt32 nNumElemSeg;
67 sal_uInt32 nColorData;
69 SvxMSDffVertPair* pVertData;
70 sal_uInt16* pSegData;
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;
88 sal_Bool bFilled : 1;
89 sal_Bool bFlipH : 1;
90 sal_Bool bFlipV : 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 );
101 public :
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();
115 #endif