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 // MARKER(update_precomp.py): autogen include statement, do not remove 29 #include "precompiled_sd.hxx" 30 31 32 #include "sdattr.hxx" 33 34 using namespace ::com::sun::star; 35 36 /************************************************************************* 37 |* 38 |* DiaEffectItem 39 |* 40 *************************************************************************/ 41 TYPEINIT1_AUTOFACTORY( DiaEffectItem, SfxEnumItem ); 42 43 44 DiaEffectItem::DiaEffectItem( presentation::FadeEffect eFE ) : 45 SfxEnumItem( ATTR_DIA_EFFECT, (sal_uInt16)eFE ) 46 { 47 } 48 49 50 DiaEffectItem::DiaEffectItem( SvStream& rIn ) : 51 SfxEnumItem( ATTR_DIA_EFFECT, rIn ) 52 { 53 } 54 55 56 SfxPoolItem* DiaEffectItem::Clone( SfxItemPool* ) const 57 { 58 return new DiaEffectItem( *this ); 59 } 60 61 62 SfxPoolItem* DiaEffectItem::Create( SvStream& rIn, sal_uInt16 ) const 63 { 64 return new DiaEffectItem( rIn ); 65 } 66 67 /************************************************************************* 68 |* 69 |* DiaSpeedItem 70 |* 71 *************************************************************************/ 72 TYPEINIT1_AUTOFACTORY( DiaSpeedItem, SfxEnumItem ); 73 74 75 DiaSpeedItem::DiaSpeedItem( FadeSpeed eFS ) : 76 SfxEnumItem( ATTR_DIA_SPEED, (sal_uInt16)eFS ) 77 { 78 } 79 80 81 DiaSpeedItem::DiaSpeedItem( SvStream& rIn ) : 82 SfxEnumItem( ATTR_DIA_SPEED, rIn ) 83 { 84 } 85 86 87 SfxPoolItem* DiaSpeedItem::Clone( SfxItemPool* ) const 88 { 89 return new DiaSpeedItem( *this ); 90 } 91 92 93 SfxPoolItem* DiaSpeedItem::Create( SvStream& rIn, sal_uInt16 ) const 94 { 95 return new DiaSpeedItem( rIn ); 96 } 97 98 /************************************************************************* 99 |* 100 |* DiaAutoItem 101 |* 102 *************************************************************************/ 103 TYPEINIT1_AUTOFACTORY( DiaAutoItem, SfxEnumItem ); 104 105 DiaAutoItem::DiaAutoItem( PresChange eChange ) : 106 SfxEnumItem( ATTR_DIA_AUTO, (sal_uInt16)eChange ) 107 { 108 } 109 110 111 DiaAutoItem::DiaAutoItem( SvStream& rIn ) : 112 SfxEnumItem( ATTR_DIA_AUTO, rIn ) 113 { 114 } 115 116 117 SfxPoolItem* DiaAutoItem::Clone( SfxItemPool* ) const 118 { 119 return new DiaAutoItem( *this ); 120 } 121 122 123 SfxPoolItem* DiaAutoItem::Create( SvStream& rIn, sal_uInt16 ) const 124 { 125 return new DiaAutoItem( rIn ); 126 } 127 128 /************************************************************************* 129 |* 130 |* DiaTimeItem 131 |* 132 *************************************************************************/ 133 TYPEINIT1_AUTOFACTORY( DiaTimeItem, SfxUInt32Item ); 134 135 136 DiaTimeItem::DiaTimeItem( sal_uInt32 nValue ) : 137 SfxUInt32Item( ATTR_DIA_TIME, nValue ) 138 { 139 } 140 141 142 SfxPoolItem* DiaTimeItem::Clone( SfxItemPool* ) const 143 { 144 return new DiaTimeItem( *this ); 145 } 146 147 148 int DiaTimeItem::operator==( const SfxPoolItem& rItem ) const 149 { 150 return( ( (DiaTimeItem&) rItem ).GetValue() == GetValue() ); 151 } 152 153 154 155