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