drawitem.cxx (97e8a929) drawitem.cxx (c7be74b1)
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

--- 41 unchanged lines hidden (view full) ---

50//==================================================================
51
52SvxColorTableItem::SvxColorTableItem()
53{
54}
55
56// -----------------------------------------------------------------------
57
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

--- 41 unchanged lines hidden (view full) ---

50//==================================================================
51
52SvxColorTableItem::SvxColorTableItem()
53{
54}
55
56// -----------------------------------------------------------------------
57
58SvxColorTableItem::SvxColorTableItem( XColorList* pTable, sal_uInt16 nW ) :
58SvxColorTableItem::SvxColorTableItem( XColorListSharedPtr aTable, sal_uInt16 nW ) :
59 SfxPoolItem( nW ),
59 SfxPoolItem( nW ),
60 pColorTable( pTable )
60 maColorTable( aTable )
61{
62}
63
64// -----------------------------------------------------------------------
65
66SvxColorTableItem::SvxColorTableItem( const SvxColorTableItem& rItem ) :
67 SfxPoolItem( rItem ),
61{
62}
63
64// -----------------------------------------------------------------------
65
66SvxColorTableItem::SvxColorTableItem( const SvxColorTableItem& rItem ) :
67 SfxPoolItem( rItem ),
68 pColorTable( rItem.pColorTable )
68 maColorTable( rItem.maColorTable )
69{
70}
71
72//------------------------------------------------------------------------
73
74SfxItemPresentation SvxColorTableItem::GetPresentation
75(
76 SfxItemPresentation /*ePres*/,

--- 6 unchanged lines hidden (view full) ---

83 return SFX_ITEM_PRESENTATION_NONE;
84}
85
86// -----------------------------------------------------------------------
87
88int SvxColorTableItem::operator==( const SfxPoolItem& rItem ) const
89{
90 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
69{
70}
71
72//------------------------------------------------------------------------
73
74SfxItemPresentation SvxColorTableItem::GetPresentation
75(
76 SfxItemPresentation /*ePres*/,

--- 6 unchanged lines hidden (view full) ---

83 return SFX_ITEM_PRESENTATION_NONE;
84}
85
86// -----------------------------------------------------------------------
87
88int SvxColorTableItem::operator==( const SfxPoolItem& rItem ) const
89{
90 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
91 return ( ( SvxColorTableItem& ) rItem).pColorTable == pColorTable;
91 return static_cast< const SvxColorTableItem& >(rItem).maColorTable == maColorTable;
92}
93
94// -----------------------------------------------------------------------
95
96SfxPoolItem* SvxColorTableItem::Clone( SfxItemPool * ) const
97{
98 return new SvxColorTableItem( *this );
99}
100
101// -----------------------------------------------------------------------
102
103sal_Bool SvxColorTableItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
104{
105 // This is only a quick helper to have UI support for these list items. Don't use
106 // this method to query for a valid UNO representation.
107 // Please ask CD if you want to change this.
92}
93
94// -----------------------------------------------------------------------
95
96SfxPoolItem* SvxColorTableItem::Clone( SfxItemPool * ) const
97{
98 return new SvxColorTableItem( *this );
99}
100
101// -----------------------------------------------------------------------
102
103sal_Bool SvxColorTableItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
104{
105 // This is only a quick helper to have UI support for these list items. Don't use
106 // this method to query for a valid UNO representation.
107 // Please ask CD if you want to change this.
108 sal_Int64 aValue = sal_Int64( (sal_uLong)pColorTable );
108 sal_Int64 aValue = sal_Int64((sal_uLong)&maColorTable);
109 rVal = uno::makeAny( aValue );
110 return sal_True;
111}
112
113// -----------------------------------------------------------------------
114
115sal_Bool SvxColorTableItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
116{
117 // This is only a quick helper to have UI support for these list items. Don't use
118 // this method to query for a valid UNO representation.
119 // Please ask CD if you want to change this.
120 sal_Int64 aValue = 0;
121 if ( rVal >>= aValue )
122 {
109 rVal = uno::makeAny( aValue );
110 return sal_True;
111}
112
113// -----------------------------------------------------------------------
114
115sal_Bool SvxColorTableItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
116{
117 // This is only a quick helper to have UI support for these list items. Don't use
118 // this method to query for a valid UNO representation.
119 // Please ask CD if you want to change this.
120 sal_Int64 aValue = 0;
121 if ( rVal >>= aValue )
122 {
123 pColorTable = (XColorList*)(sal_uLong)aValue;
123 if(aValue)
124 maColorTable = *((XColorListSharedPtr*)(sal_uLong)aValue);
124 return sal_True;
125 }
126
127 return sal_False;
128}
129
130//==================================================================
131//
132// SvxGradientListItem
133//
134//==================================================================
135
136SvxGradientListItem::SvxGradientListItem()
137{
138}
139
140// -----------------------------------------------------------------------
141
125 return sal_True;
126 }
127
128 return sal_False;
129}
130
131//==================================================================
132//
133// SvxGradientListItem
134//
135//==================================================================
136
137SvxGradientListItem::SvxGradientListItem()
138{
139}
140
141// -----------------------------------------------------------------------
142
142SvxGradientListItem::SvxGradientListItem( XGradientList* pList, sal_uInt16 nW ) :
143SvxGradientListItem::SvxGradientListItem( XGradientListSharedPtr aList, sal_uInt16 nW ) :
143 SfxPoolItem( nW ),
144 SfxPoolItem( nW ),
144 pGradientList( pList )
145 maGradientList( aList )
145{
146}
147
148// -----------------------------------------------------------------------
149
150SvxGradientListItem::SvxGradientListItem( const SvxGradientListItem& rItem ) :
151 SfxPoolItem( rItem ),
146{
147}
148
149// -----------------------------------------------------------------------
150
151SvxGradientListItem::SvxGradientListItem( const SvxGradientListItem& rItem ) :
152 SfxPoolItem( rItem ),
152 pGradientList( rItem.pGradientList )
153 maGradientList( rItem.maGradientList )
153{
154}
155
156//------------------------------------------------------------------------
157
158SfxItemPresentation SvxGradientListItem::GetPresentation
159(
160 SfxItemPresentation /*ePres*/,

--- 6 unchanged lines hidden (view full) ---

167 return SFX_ITEM_PRESENTATION_NONE;
168}
169
170// -----------------------------------------------------------------------
171
172int SvxGradientListItem::operator==( const SfxPoolItem& rItem ) const
173{
174 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
154{
155}
156
157//------------------------------------------------------------------------
158
159SfxItemPresentation SvxGradientListItem::GetPresentation
160(
161 SfxItemPresentation /*ePres*/,

--- 6 unchanged lines hidden (view full) ---

168 return SFX_ITEM_PRESENTATION_NONE;
169}
170
171// -----------------------------------------------------------------------
172
173int SvxGradientListItem::operator==( const SfxPoolItem& rItem ) const
174{
175 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
175 return ( ( SvxGradientListItem& ) rItem).pGradientList == pGradientList;
176 return static_cast< const SvxGradientListItem& >(rItem).maGradientList == maGradientList;
176}
177
178// -----------------------------------------------------------------------
179
180SfxPoolItem* SvxGradientListItem::Clone( SfxItemPool * ) const
181{
182 return new SvxGradientListItem( *this );
183}
184
185// -----------------------------------------------------------------------
186
187sal_Bool SvxGradientListItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
188{
189 // This is only a quick helper to have UI support for these list items. Don't use
190 // this method to query for a valid UNO representation.
191 // Please ask CD if you want to change this.
177}
178
179// -----------------------------------------------------------------------
180
181SfxPoolItem* SvxGradientListItem::Clone( SfxItemPool * ) const
182{
183 return new SvxGradientListItem( *this );
184}
185
186// -----------------------------------------------------------------------
187
188sal_Bool SvxGradientListItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
189{
190 // This is only a quick helper to have UI support for these list items. Don't use
191 // this method to query for a valid UNO representation.
192 // Please ask CD if you want to change this.
192 sal_Int64 aValue = sal_Int64( (sal_uLong)pGradientList );
193 sal_Int64 aValue = sal_Int64((sal_uLong)&maGradientList);
193 rVal = uno::makeAny( aValue );
194 return sal_True;
195}
196
197// -----------------------------------------------------------------------
198
199sal_Bool SvxGradientListItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
200{
201 // This is only a quick helper to have UI support for these list items. Don't use
202 // this method to query for a valid UNO representation.
203 // Please ask CD if you want to change this.
204 sal_Int64 aValue = 0;
205 if ( rVal >>= aValue )
206 {
194 rVal = uno::makeAny( aValue );
195 return sal_True;
196}
197
198// -----------------------------------------------------------------------
199
200sal_Bool SvxGradientListItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
201{
202 // This is only a quick helper to have UI support for these list items. Don't use
203 // this method to query for a valid UNO representation.
204 // Please ask CD if you want to change this.
205 sal_Int64 aValue = 0;
206 if ( rVal >>= aValue )
207 {
207 pGradientList = (XGradientList *)(sal_uLong)aValue;
208 if(aValue)
209 maGradientList = *((XGradientListSharedPtr*)(sal_uLong)aValue);
208 return sal_True;
209 }
210
211 return sal_False;
212}
213
214//==================================================================
215//
216// SvxHatchListItem
217//
218//==================================================================
219
220SvxHatchListItem::SvxHatchListItem()
221{
222}
223
224// -----------------------------------------------------------------------
225
210 return sal_True;
211 }
212
213 return sal_False;
214}
215
216//==================================================================
217//
218// SvxHatchListItem
219//
220//==================================================================
221
222SvxHatchListItem::SvxHatchListItem()
223{
224}
225
226// -----------------------------------------------------------------------
227
226SvxHatchListItem::SvxHatchListItem( XHatchList* pList, sal_uInt16 nW ) :
228SvxHatchListItem::SvxHatchListItem( XHatchListSharedPtr aList, sal_uInt16 nW ) :
227 SfxPoolItem( nW ),
229 SfxPoolItem( nW ),
228 pHatchList( pList )
230 maHatchList( aList )
229{
230}
231
232// -----------------------------------------------------------------------
233
234SvxHatchListItem::SvxHatchListItem( const SvxHatchListItem& rItem ) :
235 SfxPoolItem( rItem ),
231{
232}
233
234// -----------------------------------------------------------------------
235
236SvxHatchListItem::SvxHatchListItem( const SvxHatchListItem& rItem ) :
237 SfxPoolItem( rItem ),
236 pHatchList( rItem.pHatchList )
238 maHatchList( rItem.maHatchList )
237{
238}
239
240//------------------------------------------------------------------------
241
242SfxItemPresentation SvxHatchListItem::GetPresentation
243(
244 SfxItemPresentation /*ePres*/,

--- 6 unchanged lines hidden (view full) ---

251 return SFX_ITEM_PRESENTATION_NONE;
252}
253
254// -----------------------------------------------------------------------
255
256int SvxHatchListItem::operator==( const SfxPoolItem& rItem ) const
257{
258 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
239{
240}
241
242//------------------------------------------------------------------------
243
244SfxItemPresentation SvxHatchListItem::GetPresentation
245(
246 SfxItemPresentation /*ePres*/,

--- 6 unchanged lines hidden (view full) ---

253 return SFX_ITEM_PRESENTATION_NONE;
254}
255
256// -----------------------------------------------------------------------
257
258int SvxHatchListItem::operator==( const SfxPoolItem& rItem ) const
259{
260 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
259 return ( ( SvxHatchListItem& ) rItem).pHatchList == pHatchList;
261 return static_cast< const SvxHatchListItem& >(rItem).maHatchList == maHatchList;
260}
261
262// -----------------------------------------------------------------------
263
264SfxPoolItem* SvxHatchListItem::Clone( SfxItemPool * ) const
265{
266 return new SvxHatchListItem( *this );
267}
268
269// -----------------------------------------------------------------------
270
271sal_Bool SvxHatchListItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
272{
273 // This is only a quick helper to have UI support for these list items. Don't use
274 // this method to query for a valid UNO representation.
275 // Please ask CD if you want to change this.
262}
263
264// -----------------------------------------------------------------------
265
266SfxPoolItem* SvxHatchListItem::Clone( SfxItemPool * ) const
267{
268 return new SvxHatchListItem( *this );
269}
270
271// -----------------------------------------------------------------------
272
273sal_Bool SvxHatchListItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
274{
275 // This is only a quick helper to have UI support for these list items. Don't use
276 // this method to query for a valid UNO representation.
277 // Please ask CD if you want to change this.
276 sal_Int64 aValue = sal_Int64( (sal_uLong)pHatchList );
278 sal_Int64 aValue = sal_Int64((sal_uLong)&maHatchList );
277 rVal = uno::makeAny( aValue );
278 return sal_True;
279}
280
281// -----------------------------------------------------------------------
282
283sal_Bool SvxHatchListItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
284{
285 // This is only a quick helper to have UI support for these list items. Don't use
286 // this method to query for a valid UNO representation.
287 // Please ask CD if you want to change this.
288 sal_Int64 aValue = 0;
289 if ( rVal >>= aValue )
290 {
279 rVal = uno::makeAny( aValue );
280 return sal_True;
281}
282
283// -----------------------------------------------------------------------
284
285sal_Bool SvxHatchListItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
286{
287 // This is only a quick helper to have UI support for these list items. Don't use
288 // this method to query for a valid UNO representation.
289 // Please ask CD if you want to change this.
290 sal_Int64 aValue = 0;
291 if ( rVal >>= aValue )
292 {
291 pHatchList = (XHatchList *)(sal_uLong)aValue;
293 if(aValue)
294 maHatchList = *((XHatchListSharedPtr*)(sal_uLong)aValue);
292 return sal_True;
293 }
294
295 return sal_False;
296}
297
298//==================================================================
299//
300// SvxBitmapListItem
301//
302//==================================================================
303
304SvxBitmapListItem::SvxBitmapListItem()
305{
306}
307
308// -----------------------------------------------------------------------
309
295 return sal_True;
296 }
297
298 return sal_False;
299}
300
301//==================================================================
302//
303// SvxBitmapListItem
304//
305//==================================================================
306
307SvxBitmapListItem::SvxBitmapListItem()
308{
309}
310
311// -----------------------------------------------------------------------
312
310SvxBitmapListItem::SvxBitmapListItem( XBitmapList* pList, sal_uInt16 nW ) :
313SvxBitmapListItem::SvxBitmapListItem( XBitmapListSharedPtr aList, sal_uInt16 nW ) :
311 SfxPoolItem( nW ),
314 SfxPoolItem( nW ),
312 pBitmapList( pList )
315 maBitmapList( aList )
313{
314}
315
316// -----------------------------------------------------------------------
317
318SvxBitmapListItem::SvxBitmapListItem( const SvxBitmapListItem& rItem ) :
319 SfxPoolItem( rItem ),
316{
317}
318
319// -----------------------------------------------------------------------
320
321SvxBitmapListItem::SvxBitmapListItem( const SvxBitmapListItem& rItem ) :
322 SfxPoolItem( rItem ),
320 pBitmapList( rItem.pBitmapList )
323 maBitmapList( rItem.maBitmapList )
321{
322}
323
324//------------------------------------------------------------------------
325
326SfxItemPresentation SvxBitmapListItem::GetPresentation
327(
328 SfxItemPresentation /*ePres*/,

--- 6 unchanged lines hidden (view full) ---

335 return SFX_ITEM_PRESENTATION_NONE;
336}
337
338// -----------------------------------------------------------------------
339
340int SvxBitmapListItem::operator==( const SfxPoolItem& rItem ) const
341{
342 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
324{
325}
326
327//------------------------------------------------------------------------
328
329SfxItemPresentation SvxBitmapListItem::GetPresentation
330(
331 SfxItemPresentation /*ePres*/,

--- 6 unchanged lines hidden (view full) ---

338 return SFX_ITEM_PRESENTATION_NONE;
339}
340
341// -----------------------------------------------------------------------
342
343int SvxBitmapListItem::operator==( const SfxPoolItem& rItem ) const
344{
345 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
343 return ( ( SvxBitmapListItem& ) rItem).pBitmapList == pBitmapList;
346 return static_cast< const SvxBitmapListItem& >(rItem).maBitmapList == maBitmapList;
344}
345
346// -----------------------------------------------------------------------
347
348SfxPoolItem* SvxBitmapListItem::Clone( SfxItemPool * ) const
349{
350 return new SvxBitmapListItem( *this );
351}
352
353// -----------------------------------------------------------------------
354
355sal_Bool SvxBitmapListItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
356{
357 // This is only a quick helper to have UI support for these list items. Don't use
358 // this method to query for a valid UNO representation.
359 // Please ask CD if you want to change this.
347}
348
349// -----------------------------------------------------------------------
350
351SfxPoolItem* SvxBitmapListItem::Clone( SfxItemPool * ) const
352{
353 return new SvxBitmapListItem( *this );
354}
355
356// -----------------------------------------------------------------------
357
358sal_Bool SvxBitmapListItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
359{
360 // This is only a quick helper to have UI support for these list items. Don't use
361 // this method to query for a valid UNO representation.
362 // Please ask CD if you want to change this.
360 sal_Int64 aValue = sal_Int64( (sal_uLong)pBitmapList );
363 sal_Int64 aValue = sal_Int64((sal_uLong)&maBitmapList );
361 rVal = uno::makeAny( aValue );
362 return sal_True;
363}
364
365// -----------------------------------------------------------------------
366
367sal_Bool SvxBitmapListItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
368{
369 // This is only a quick helper to have UI support for these list items. Don't use
370 // this method to query for a valid UNO representation.
371 // Please ask CD if you want to change this.
372 sal_Int64 aValue = 0;
373 if ( rVal >>= aValue )
374 {
364 rVal = uno::makeAny( aValue );
365 return sal_True;
366}
367
368// -----------------------------------------------------------------------
369
370sal_Bool SvxBitmapListItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
371{
372 // This is only a quick helper to have UI support for these list items. Don't use
373 // this method to query for a valid UNO representation.
374 // Please ask CD if you want to change this.
375 sal_Int64 aValue = 0;
376 if ( rVal >>= aValue )
377 {
375 pBitmapList = (XBitmapList *)(sal_uLong)aValue;
378 if(aValue)
379 maBitmapList = *((XBitmapListSharedPtr*)(sal_uLong)aValue);
376 return sal_True;
377 }
378
379 return sal_False;
380}
381
382
383//==================================================================
384//
385// SvxDashListItem
386//
387//==================================================================
388
389SvxDashListItem::SvxDashListItem() :
380 return sal_True;
381 }
382
383 return sal_False;
384}
385
386
387//==================================================================
388//
389// SvxDashListItem
390//
391//==================================================================
392
393SvxDashListItem::SvxDashListItem() :
390 pDashList( 0 )
394 maDashList()
391{
392}
393
394// -----------------------------------------------------------------------
395
395{
396}
397
398// -----------------------------------------------------------------------
399
396SvxDashListItem::SvxDashListItem( XDashList* pList, sal_uInt16 nW ) :
400SvxDashListItem::SvxDashListItem( XDashListSharedPtr aList, sal_uInt16 nW ) :
397 SfxPoolItem( nW ),
401 SfxPoolItem( nW ),
398 pDashList( pList )
402 maDashList( aList )
399{
400}
401
402// -----------------------------------------------------------------------
403
404SvxDashListItem::SvxDashListItem( const SvxDashListItem& rItem ) :
405 SfxPoolItem( rItem ),
403{
404}
405
406// -----------------------------------------------------------------------
407
408SvxDashListItem::SvxDashListItem( const SvxDashListItem& rItem ) :
409 SfxPoolItem( rItem ),
406 pDashList( rItem.pDashList )
410 maDashList( rItem.maDashList )
407{
408}
409
410//------------------------------------------------------------------------
411
412SfxItemPresentation SvxDashListItem::GetPresentation
413(
414 SfxItemPresentation /*ePres*/,

--- 6 unchanged lines hidden (view full) ---

421 return SFX_ITEM_PRESENTATION_NONE;
422}
423
424// -----------------------------------------------------------------------
425
426int SvxDashListItem::operator==( const SfxPoolItem& rItem ) const
427{
428 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
411{
412}
413
414//------------------------------------------------------------------------
415
416SfxItemPresentation SvxDashListItem::GetPresentation
417(
418 SfxItemPresentation /*ePres*/,

--- 6 unchanged lines hidden (view full) ---

425 return SFX_ITEM_PRESENTATION_NONE;
426}
427
428// -----------------------------------------------------------------------
429
430int SvxDashListItem::operator==( const SfxPoolItem& rItem ) const
431{
432 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
429 return ( ( SvxDashListItem& ) rItem).pDashList == pDashList;
433 return static_cast< const SvxDashListItem& >(rItem).maDashList == maDashList;
430}
431
432// -----------------------------------------------------------------------
433
434SfxPoolItem* SvxDashListItem::Clone( SfxItemPool * ) const
435{
436 return new SvxDashListItem( *this );
437}
438
439// -----------------------------------------------------------------------
440
441sal_Bool SvxDashListItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
442{
443 // This is only a quick helper to have UI support for these list items. Don't use
444 // this method to query for a valid UNO representation.
434}
435
436// -----------------------------------------------------------------------
437
438SfxPoolItem* SvxDashListItem::Clone( SfxItemPool * ) const
439{
440 return new SvxDashListItem( *this );
441}
442
443// -----------------------------------------------------------------------
444
445sal_Bool SvxDashListItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
446{
447 // This is only a quick helper to have UI support for these list items. Don't use
448 // this method to query for a valid UNO representation.
445 sal_Int64 aValue = sal_Int64( (sal_uLong)pDashList );
449 sal_Int64 aValue = sal_Int64((sal_uLong)&maDashList );
446 rVal = uno::makeAny( aValue );
447 return sal_True;
448}
449
450// -----------------------------------------------------------------------
451
452sal_Bool SvxDashListItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
453{
454 // This is only a quick helper to have UI support for these list items. Don't use
455 // this method to query for a valid UNO representation.
456 sal_Int64 aValue = 0;
457 if ( rVal >>= aValue )
458 {
450 rVal = uno::makeAny( aValue );
451 return sal_True;
452}
453
454// -----------------------------------------------------------------------
455
456sal_Bool SvxDashListItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
457{
458 // This is only a quick helper to have UI support for these list items. Don't use
459 // this method to query for a valid UNO representation.
460 sal_Int64 aValue = 0;
461 if ( rVal >>= aValue )
462 {
459 pDashList = (XDashList *)(sal_uLong)aValue;
463 if(aValue)
464 maDashList = *((XDashListSharedPtr*)(sal_uLong)aValue);
460 return sal_True;
461 }
462
463 return sal_False;
464}
465
465 return sal_True;
466 }
467
468 return sal_False;
469}
470
466// -----------------------------------------------------------------------
467
468void SvxDashListItem::SetDashList( XDashList* pList )
469{
470 pDashList = pList;
471}
472
473//==================================================================
474//
475// SvxLineEndListItem
476//
477//==================================================================
478
479SvxLineEndListItem::SvxLineEndListItem()
480{
481}
482
483// -----------------------------------------------------------------------
484
471//==================================================================
472//
473// SvxLineEndListItem
474//
475//==================================================================
476
477SvxLineEndListItem::SvxLineEndListItem()
478{
479}
480
481// -----------------------------------------------------------------------
482
485SvxLineEndListItem::SvxLineEndListItem( XLineEndList* pList, sal_uInt16 nW ) :
483SvxLineEndListItem::SvxLineEndListItem( XLineEndListSharedPtr aList, sal_uInt16 nW ) :
486 SfxPoolItem( nW ),
484 SfxPoolItem( nW ),
487 pLineEndList( pList )
485 maLineEndList( aList )
488{
489}
490
491// -----------------------------------------------------------------------
492
493SvxLineEndListItem::SvxLineEndListItem( const SvxLineEndListItem& rItem ) :
494 SfxPoolItem( rItem ),
486{
487}
488
489// -----------------------------------------------------------------------
490
491SvxLineEndListItem::SvxLineEndListItem( const SvxLineEndListItem& rItem ) :
492 SfxPoolItem( rItem ),
495 pLineEndList( rItem.pLineEndList )
493 maLineEndList( rItem.maLineEndList )
496{
497}
498
499//------------------------------------------------------------------------
500
501SfxItemPresentation SvxLineEndListItem::GetPresentation
502(
503 SfxItemPresentation /*ePres*/,

--- 6 unchanged lines hidden (view full) ---

510 return SFX_ITEM_PRESENTATION_NONE;
511}
512
513// -----------------------------------------------------------------------
514
515int SvxLineEndListItem::operator==( const SfxPoolItem& rItem ) const
516{
517 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
494{
495}
496
497//------------------------------------------------------------------------
498
499SfxItemPresentation SvxLineEndListItem::GetPresentation
500(
501 SfxItemPresentation /*ePres*/,

--- 6 unchanged lines hidden (view full) ---

508 return SFX_ITEM_PRESENTATION_NONE;
509}
510
511// -----------------------------------------------------------------------
512
513int SvxLineEndListItem::operator==( const SfxPoolItem& rItem ) const
514{
515 DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" );
518 return ( ( SvxLineEndListItem& ) rItem).pLineEndList == pLineEndList;
516 return static_cast< const SvxLineEndListItem& >(rItem).maLineEndList == maLineEndList;
519}
520
521// -----------------------------------------------------------------------
522
523SfxPoolItem* SvxLineEndListItem::Clone( SfxItemPool * ) const
524{
525 return new SvxLineEndListItem( *this );
526}
527
528// -----------------------------------------------------------------------
529
530sal_Bool SvxLineEndListItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
531{
532 // This is only a quick helper to have UI support for these list items. Don't use
533 // this method to query for a valid UNO representation.
517}
518
519// -----------------------------------------------------------------------
520
521SfxPoolItem* SvxLineEndListItem::Clone( SfxItemPool * ) const
522{
523 return new SvxLineEndListItem( *this );
524}
525
526// -----------------------------------------------------------------------
527
528sal_Bool SvxLineEndListItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
529{
530 // This is only a quick helper to have UI support for these list items. Don't use
531 // this method to query for a valid UNO representation.
534 sal_Int64 aValue = sal_Int64( (sal_uLong)pLineEndList );
532 sal_Int64 aValue = sal_Int64( (sal_uLong)&maLineEndList );
535 rVal = uno::makeAny( aValue );
536 return sal_True;
537}
538
539// -----------------------------------------------------------------------
540
541sal_Bool SvxLineEndListItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
542{
543 // This is only a quick helper to have UI support for these list items. Don't use
544 // this method to query for a valid UNO representation.
545 sal_Int64 aValue = 0;
546 if ( rVal >>= aValue )
547 {
533 rVal = uno::makeAny( aValue );
534 return sal_True;
535}
536
537// -----------------------------------------------------------------------
538
539sal_Bool SvxLineEndListItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
540{
541 // This is only a quick helper to have UI support for these list items. Don't use
542 // this method to query for a valid UNO representation.
543 sal_Int64 aValue = 0;
544 if ( rVal >>= aValue )
545 {
548 pLineEndList = (XLineEndList *)(sal_uLong)aValue;
546 if(aValue)
547 maLineEndList = *((XLineEndListSharedPtr*)(sal_uLong)aValue);
549 return sal_True;
550 }
551
552 return sal_False;
553}
548 return sal_True;
549 }
550
551 return sal_False;
552}
553
554// eof