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