xref: /trunk/main/sd/inc/sdattr.hxx (revision 67e470da)
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 _SDATTR_HXX
25 #define _SDATTR_HXX
26 
27 #include <com/sun/star/presentation/FadeEffect.hpp>
28 #include <svl/intitem.hxx>
29 #include <svl/eitem.hxx>
30 #include <svl/stritem.hxx>
31 #include <sfx2/sfx.hrc>
32 
33 #ifndef _SDATTR_HRC
34 #include "sdattr.hrc"
35 #endif
36 #include "glob.hxx"
37 #include "fadedef.h"
38 #include "diadef.h"
39 
40 //------------------------------------------------------------------
41 
42 
43 //==================================================================
44 //	Layer-Attribute
45 //==================================================================
46 
47 class SdAttrLayerName : public SfxStringItem
48 {
49 public:
SdAttrLayerName()50 	SdAttrLayerName() :
51 		SfxStringItem( ATTR_LAYER_NAME, String( RTL_CONSTASCII_USTRINGPARAM( "neue Ebene" ))) {}
SdAttrLayerName(const String & aStr)52 	SdAttrLayerName( const String& aStr ) :
53 		SfxStringItem( ATTR_LAYER_NAME, aStr ) {}
54 };
55 
56 //------------------------------------------------------------------
57 
58 class SdAttrLayerTitle : public SfxStringItem
59 {
60 public:
SdAttrLayerTitle()61 	SdAttrLayerTitle() : SfxStringItem( ATTR_LAYER_TITLE, XubString()) {}
SdAttrLayerTitle(const String & aStr)62 	SdAttrLayerTitle( const String& aStr ) : SfxStringItem( ATTR_LAYER_TITLE, aStr ) {}
63 };
64 
65 //------------------------------------------------------------------
66 
67 class SdAttrLayerDesc : public SfxStringItem
68 {
69 public:
SdAttrLayerDesc()70 	SdAttrLayerDesc() : SfxStringItem( ATTR_LAYER_DESC, XubString()) {}
SdAttrLayerDesc(const String & aStr)71 	SdAttrLayerDesc( const String& aStr ) : SfxStringItem( ATTR_LAYER_DESC, aStr ) {}
72 };
73 
74 //------------------------------------------------------------------
75 
76 class SdAttrLayerVisible : public SfxBoolItem
77 {
78 public:
SdAttrLayerVisible(sal_Bool bValue=sal_True)79 	SdAttrLayerVisible( sal_Bool bValue = sal_True ) :
80 		SfxBoolItem( ATTR_LAYER_VISIBLE, bValue ) {}
81 };
82 
83 //------------------------------------------------------------------
84 
85 class SdAttrLayerPrintable : public SfxBoolItem
86 {
87 public:
SdAttrLayerPrintable(sal_Bool bValue=sal_True)88 	SdAttrLayerPrintable( sal_Bool bValue = sal_True ) :
89 		SfxBoolItem( ATTR_LAYER_PRINTABLE, bValue ) {}
90 };
91 
92 //------------------------------------------------------------------
93 
94 class SdAttrLayerLocked : public SfxBoolItem
95 {
96 public:
SdAttrLayerLocked(sal_Bool bValue=sal_False)97 	SdAttrLayerLocked( sal_Bool bValue = sal_False ) :
98 		SfxBoolItem( ATTR_LAYER_LOCKED, bValue ) {}
99 };
100 
101 //------------------------------------------------------------------
102 
103 class SdAttrLayerThisPage : public SfxBoolItem
104 {
105 public:
SdAttrLayerThisPage(sal_Bool bValue=sal_False)106 	SdAttrLayerThisPage( sal_Bool bValue = sal_False ) :
107 		SfxBoolItem( ATTR_LAYER_THISPAGE, bValue ) {}
108 };
109 
110 //------------------------------------------------------------------
111 
112 class DiaEffectItem : public SfxEnumItem
113 {
114 public:
115 			TYPEINFO();
116 			DiaEffectItem( ::com::sun::star::presentation::FadeEffect eFade = com::sun::star::presentation::FadeEffect_NONE );
117 			DiaEffectItem( SvStream& rIn );
118 
119 	virtual SfxPoolItem*	Clone( SfxItemPool* pPool = 0 ) const;
120 	virtual SfxPoolItem*	Create( SvStream& rIn, sal_uInt16 nVer ) const;
GetValueCount() const121 			sal_uInt16			GetValueCount() const { return FADE_EFFECT_COUNT; }
GetValue() const122 			::com::sun::star::presentation::FadeEffect		GetValue() const
123 							{ return (::com::sun::star::presentation::FadeEffect) SfxEnumItem::GetValue(); }
124 };
125 
126 //------------------------------------------------------------------
127 
128 class DiaSpeedItem : public SfxEnumItem
129 {
130 public:
131 			TYPEINFO();
132 			DiaSpeedItem( FadeSpeed = FADE_SPEED_MEDIUM );
133 			DiaSpeedItem( SvStream& rIn );
134 
135 	virtual SfxPoolItem*	Clone( SfxItemPool* pPool = 0 ) const;
136 	virtual SfxPoolItem*	Create( SvStream& rIn, sal_uInt16 nVer ) const;
GetValueCount() const137 			sal_uInt16			GetValueCount() const { return FADE_SPEED_COUNT; }
GetValue() const138 			FadeSpeed		GetValue() const
139 							{ return (FadeSpeed) SfxEnumItem::GetValue(); }
140 };
141 
142 //------------------------------------------------------------------
143 
144 class DiaAutoItem : public SfxEnumItem
145 {
146 public:
147 			TYPEINFO();
148 			DiaAutoItem( PresChange = PRESCHANGE_MANUAL );
149 			DiaAutoItem( SvStream& rIn );
150 
151 	virtual SfxPoolItem*	Clone( SfxItemPool* pPool = 0 ) const;
152 	virtual SfxPoolItem*	Create( SvStream& rIn, sal_uInt16 nVer ) const;
GetValueCount() const153 			sal_uInt16			GetValueCount() const { return PRESCHANGE_COUNT; }
GetValue() const154 			PresChange		GetValue() const { return (PresChange) SfxEnumItem::GetValue(); }
155 };
156 
157 //------------------------------------------------------------------
158 
159 class DiaTimeItem : public SfxUInt32Item
160 {
161 public:
162 			TYPEINFO();
163 			DiaTimeItem( sal_uInt32 nValue = 0L );
164 
165 	virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
166 	virtual int 		 operator==( const SfxPoolItem& ) const;
167 };
168 
169 #endif // _SDATTR_HXX
170 
171 
172