xref: /aoo4110/main/svx/inc/svx/drawitem.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SVX_DRAWITEM_HXX
24 #define _SVX_DRAWITEM_HXX
25 
26 // include ---------------------------------------------------------------
27 
28 #include <svl/poolitem.hxx>
29 #include <com/sun/star/uno/Sequence.hxx>
30 #include <com/sun/star/drawing/LineDash.hpp>
31 #include "svx/svxdllapi.h"
32 #include <boost/shared_ptr.hpp>
33 
34 //==================================================================
35 //	SvxColorTableItem
36 //==================================================================
37 
38 class XColorList;
39 typedef ::boost::shared_ptr< XColorList > XColorListSharedPtr;
40 
41 class SVX_DLLPUBLIC SvxColorTableItem : public SfxPoolItem
42 {
43 	XColorListSharedPtr     maColorTable;
44 
45 public:
46 							TYPEINFO();
47 							SvxColorTableItem();
48 							SvxColorTableItem( XColorListSharedPtr aTable, sal_uInt16 nWhich );
49 							SvxColorTableItem( const SvxColorTableItem& );
50 
51 	virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
52 									SfxMapUnit eCoreMetric,
53 									SfxMapUnit ePresMetric,
54                                     String &rText, const IntlWrapper * = 0 ) const;
55 
56 	virtual int 			operator==( const SfxPoolItem& ) const;
57 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
58 	virtual	sal_Bool        QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
59     virtual sal_Bool        PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId );
60 
GetColorTable() const61     XColorListSharedPtr GetColorTable() const { return maColorTable; }
SetColorTable(XColorListSharedPtr aTable)62     void SetColorTable( XColorListSharedPtr aTable ) { maColorTable = aTable; }
63 };
64 
65 
66 //==================================================================
67 //	SvxGradientListItem
68 //==================================================================
69 
70 
71 class XGradientList;
72 typedef ::boost::shared_ptr< XGradientList > XGradientListSharedPtr;
73 
74 class SVX_DLLPUBLIC SvxGradientListItem : public SfxPoolItem
75 {
76 	XGradientListSharedPtr  maGradientList;
77 
78 public:
79 							TYPEINFO();
80 							SvxGradientListItem();
81 							SvxGradientListItem( XGradientListSharedPtr aList, sal_uInt16 nWhich  );
82 							SvxGradientListItem( const SvxGradientListItem& );
83 
84 	virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
85 									SfxMapUnit eCoreMetric,
86 									SfxMapUnit ePresMetric,
87                                     String &rText, const IntlWrapper * = 0 ) const;
88 
89 	virtual int 			operator==( const SfxPoolItem& ) const;
90 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
91 	virtual	sal_Bool        QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
92     virtual sal_Bool        PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId );
93 
GetGradientList() const94     XGradientListSharedPtr GetGradientList() const { return maGradientList; }
SetGradientList(XGradientListSharedPtr aList)95     void SetGradientList(XGradientListSharedPtr aList ) { maGradientList = aList; }
96 };
97 
98 
99 
100 //==================================================================
101 //	SvxHatchListItem
102 //==================================================================
103 
104 
105 class XHatchList;
106 typedef ::boost::shared_ptr< XHatchList > XHatchListSharedPtr;
107 
108 class SVX_DLLPUBLIC SvxHatchListItem : public SfxPoolItem
109 {
110 	XHatchListSharedPtr     maHatchList;
111 
112 public:
113 							TYPEINFO();
114 							SvxHatchListItem();
115 							SvxHatchListItem( XHatchListSharedPtr aList, sal_uInt16 nWhich  );
116 							SvxHatchListItem( const SvxHatchListItem& );
117 
118 	virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
119 									SfxMapUnit eCoreMetric,
120 									SfxMapUnit ePresMetric,
121                                     String &rText, const IntlWrapper * = 0 ) const;
122 
123 	virtual int 			operator==( const SfxPoolItem& ) const;
124 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
125 	virtual	sal_Bool        QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
126     virtual sal_Bool        PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId );
127 
GetHatchList() const128     XHatchListSharedPtr GetHatchList() const { return maHatchList; }
SetHatchList(XHatchListSharedPtr aList)129     void SetHatchList(XHatchListSharedPtr aList ) { maHatchList = aList; }
130 };
131 
132 
133 
134 //==================================================================
135 //	SvxBitmapListItem
136 //==================================================================
137 
138 
139 class XBitmapList;
140 typedef ::boost::shared_ptr< XBitmapList > XBitmapListSharedPtr;
141 
142 class SVX_DLLPUBLIC SvxBitmapListItem : public SfxPoolItem
143 {
144 	XBitmapListSharedPtr    maBitmapList;
145 
146 public:
147 							TYPEINFO();
148 							SvxBitmapListItem();
149 							SvxBitmapListItem( XBitmapListSharedPtr aBL, sal_uInt16 nWhich  );
150 							SvxBitmapListItem( const SvxBitmapListItem& );
151 
152 	virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
153 									SfxMapUnit eCoreMetric,
154 									SfxMapUnit ePresMetric,
155                                     String &rText, const IntlWrapper * = 0 ) const;
156 
157 	virtual int 			operator==( const SfxPoolItem& ) const;
158 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
159 	virtual	sal_Bool        QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
160     virtual sal_Bool        PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId );
161 
GetBitmapList() const162     XBitmapListSharedPtr GetBitmapList() const { return maBitmapList; }
SetBitmapList(XBitmapListSharedPtr aList)163     void SetBitmapList(XBitmapListSharedPtr aList ) { maBitmapList = aList; }
164 };
165 
166 
167 
168 //==================================================================
169 //	SvxDashListItem
170 //==================================================================
171 
172 
173 class XDashList;
174 typedef ::boost::shared_ptr< XDashList > XDashListSharedPtr;
175 
176 class SVX_DLLPUBLIC SvxDashListItem : public SfxPoolItem
177 {
178 	XDashListSharedPtr      maDashList;
179 
180 public:
181 							TYPEINFO();
182 							SvxDashListItem();
183 							SvxDashListItem( XDashListSharedPtr aList, sal_uInt16 nWhich  );
184 							SvxDashListItem( const SvxDashListItem& );
185 
186 	virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
187 									SfxMapUnit eCoreMetric,
188 									SfxMapUnit ePresMetric,
189                                     String &rText, const IntlWrapper * = 0 ) const;
190 
191 	virtual int 			operator==( const SfxPoolItem& ) const;
192 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
193 	virtual	sal_Bool        QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
194     virtual sal_Bool        PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId );
195 
GetDashList() const196     XDashListSharedPtr GetDashList() const { return maDashList; }
SetDashList(XDashListSharedPtr aList)197     void SetDashList(XDashListSharedPtr aList) { maDashList = aList; }
198 };
199 
200 
201 
202 //==================================================================
203 //	SvxLineEndListItem
204 //==================================================================
205 
206 
207 class XLineEndList;
208 typedef ::boost::shared_ptr< XLineEndList > XLineEndListSharedPtr;
209 
210 class SVX_DLLPUBLIC SvxLineEndListItem : public SfxPoolItem
211 {
212 	XLineEndListSharedPtr   maLineEndList;
213 
214 public:
215 							TYPEINFO();
216 							SvxLineEndListItem();
217 							SvxLineEndListItem( XLineEndListSharedPtr aList, sal_uInt16 nWhich  );
218 							SvxLineEndListItem( const SvxLineEndListItem& );
219 
220 	virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
221 									SfxMapUnit eCoreMetric,
222 									SfxMapUnit ePresMetric,
223                                     String &rText, const IntlWrapper * = 0 ) const;
224 
225 	virtual int 			operator==( const SfxPoolItem& ) const;
226 	virtual SfxPoolItem*	Clone( SfxItemPool *pPool = 0 ) const;
227 	virtual	sal_Bool        QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
228     virtual sal_Bool        PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId );
229 
GetLineEndList() const230     XLineEndListSharedPtr GetLineEndList() const { return maLineEndList; }
SetLineEndList(XLineEndListSharedPtr aList)231     void SetLineEndList(XLineEndListSharedPtr aList ) { maLineEndList = aList; }
232 };
233 
234 
235 
236 
237 #endif
238 
239