xref: /aoo41x/main/svx/inc/svx/sdasaitm.hxx (revision cdf0e10c)
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 _SDASAITM_HXX
29 #define _SDASAITM_HXX
30 
31 #include <svl/poolitem.hxx>
32 #include <tools/list.hxx>
33 
34 class SdrCustomShapeAdjustmentValue
35 {
36 	sal_uInt32	nValue;
37 
38 	friend class SdrCustomShapeAdjustmentItem;
39 
40 	public :
41 
42 		void		SetValue( sal_Int32 nVal ) { nValue = nVal; };
43 		sal_Int32	GetValue() const { return nValue; };
44 
45 };
46 
47 class SdrCustomShapeAdjustmentItem : public SfxPoolItem
48 {
49 			List	aAdjustmentValueList;
50 
51 	public :
52 
53 			TYPEINFO();
54 			SVX_DLLPUBLIC SdrCustomShapeAdjustmentItem();
55 			SdrCustomShapeAdjustmentItem( SvStream& rIn, sal_uInt16 nVersion );
56 			SVX_DLLPUBLIC ~SdrCustomShapeAdjustmentItem();
57 
58 			virtual int					operator==( const SfxPoolItem& ) const;
59 			virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePresentation,
60 											SfxMapUnit eCoreMetric, SfxMapUnit ePresentationMetric,
61                                                 String &rText, const IntlWrapper * = 0) const;
62 			virtual SfxPoolItem*		Create( SvStream&, sal_uInt16 nItem ) const;
63 			virtual SvStream&			Store( SvStream&, sal_uInt16 nVersion ) const;
64 			virtual SfxPoolItem*		Clone( SfxItemPool* pPool = NULL ) const;
65 			virtual	sal_uInt16			GetVersion( sal_uInt16 nFileFormatVersion ) const;
66 
67 			virtual	sal_Bool			QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
68 			virtual	sal_Bool			PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
69 
70 
71 #ifdef SDR_ISPOOLABLE
72 			virtual int IsPoolable() const;
73 #endif
74 
75 			sal_uInt32							GetCount() const { return aAdjustmentValueList.Count(); };
76 			SVX_DLLPUBLIC const SdrCustomShapeAdjustmentValue&	GetValue( sal_uInt32 nIndex ) const;
77 			SVX_DLLPUBLIC void								SetValue( sal_uInt32 nIndex,
78 														const SdrCustomShapeAdjustmentValue& rVal );
79 };
80 
81 #endif
82 
83