xref: /aoo41x/main/cui/source/tabpages/textanim.cxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_cui.hxx"
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir // include ---------------------------------------------------------------
32*cdf0e10cSrcweir #include <sfx2/app.hxx>
33*cdf0e10cSrcweir #include <sfx2/module.hxx>
34*cdf0e10cSrcweir #include <tools/shl.hxx>
35*cdf0e10cSrcweir 
36*cdf0e10cSrcweir #include <cuires.hrc>
37*cdf0e10cSrcweir #include <svx/dialogs.hrc>
38*cdf0e10cSrcweir 
39*cdf0e10cSrcweir #ifndef _SVX_TEXTANIM_CXX
40*cdf0e10cSrcweir #define _SVX_TEXTANIM_CXX
41*cdf0e10cSrcweir #endif
42*cdf0e10cSrcweir #include "textanim.hxx"
43*cdf0e10cSrcweir #include "textanim.hrc"
44*cdf0e10cSrcweir #include "textattr.hxx"
45*cdf0e10cSrcweir #include <dialmgr.hxx>
46*cdf0e10cSrcweir #include "svx/dlgutil.hxx"
47*cdf0e10cSrcweir 
48*cdf0e10cSrcweir static sal_uInt16 pRanges[] =
49*cdf0e10cSrcweir {
50*cdf0e10cSrcweir 	SDRATTR_TEXT_ANIKIND,
51*cdf0e10cSrcweir 	SDRATTR_TEXT_ANIAMOUNT,
52*cdf0e10cSrcweir 	0
53*cdf0e10cSrcweir };
54*cdf0e10cSrcweir 
55*cdf0e10cSrcweir /*************************************************************************
56*cdf0e10cSrcweir |*
57*cdf0e10cSrcweir |* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu
58*cdf0e10cSrcweir |*
59*cdf0e10cSrcweir \************************************************************************/
60*cdf0e10cSrcweir 
61*cdf0e10cSrcweir __EXPORT SvxTextTabDialog::SvxTextTabDialog( Window* pParent,
62*cdf0e10cSrcweir 								const SfxItemSet* pAttr,
63*cdf0e10cSrcweir 								const SdrView* pSdrView ) :
64*cdf0e10cSrcweir 		SfxTabDialog        ( pParent, CUI_RES( RID_SVXDLG_TEXT ), pAttr ),
65*cdf0e10cSrcweir 		rOutAttrs			( *pAttr ),
66*cdf0e10cSrcweir 		pView				( pSdrView )
67*cdf0e10cSrcweir {
68*cdf0e10cSrcweir 	FreeResource();
69*cdf0e10cSrcweir 
70*cdf0e10cSrcweir 	AddTabPage( RID_SVXPAGE_TEXTATTR, SvxTextAttrPage::Create, 0);
71*cdf0e10cSrcweir 	AddTabPage( RID_SVXPAGE_TEXTANIMATION, SvxTextAnimationPage::Create, 0);
72*cdf0e10cSrcweir }
73*cdf0e10cSrcweir 
74*cdf0e10cSrcweir /*************************************************************************
75*cdf0e10cSrcweir |*
76*cdf0e10cSrcweir |* PageCreated()
77*cdf0e10cSrcweir |*
78*cdf0e10cSrcweir \************************************************************************/
79*cdf0e10cSrcweir 
80*cdf0e10cSrcweir void __EXPORT SvxTextTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
81*cdf0e10cSrcweir {
82*cdf0e10cSrcweir 	switch( nId )
83*cdf0e10cSrcweir 	{
84*cdf0e10cSrcweir 		case RID_SVXPAGE_TEXTATTR:
85*cdf0e10cSrcweir 		{
86*cdf0e10cSrcweir 			( (SvxTextAttrPage&) rPage ).SetView( pView );
87*cdf0e10cSrcweir 			( (SvxTextAttrPage&) rPage ).Construct();
88*cdf0e10cSrcweir 		}
89*cdf0e10cSrcweir 		break;
90*cdf0e10cSrcweir 
91*cdf0e10cSrcweir 		case RID_SVXPAGE_TEXTANIMATION:
92*cdf0e10cSrcweir 		break;
93*cdf0e10cSrcweir 
94*cdf0e10cSrcweir 		default:
95*cdf0e10cSrcweir 		break;
96*cdf0e10cSrcweir 	}
97*cdf0e10cSrcweir }
98*cdf0e10cSrcweir 
99*cdf0e10cSrcweir 
100*cdf0e10cSrcweir /*************************************************************************
101*cdf0e10cSrcweir |*
102*cdf0e10cSrcweir |* Page
103*cdf0e10cSrcweir |*
104*cdf0e10cSrcweir \************************************************************************/
105*cdf0e10cSrcweir 
106*cdf0e10cSrcweir SvxTextAnimationPage::SvxTextAnimationPage( Window* pWindow, const SfxItemSet& rInAttrs ) :
107*cdf0e10cSrcweir 				SfxTabPage		( pWindow, CUI_RES( RID_SVXPAGE_TEXTANIMATION ),
108*cdf0e10cSrcweir 								  rInAttrs ),
109*cdf0e10cSrcweir 				aFlEffect		( this, CUI_RES(FL_EFFECT)),
110*cdf0e10cSrcweir 				aFtEffects		( this, CUI_RES(FT_EFFECTS)),
111*cdf0e10cSrcweir 				aLbEffect		( this, CUI_RES( LB_EFFECT ) ),
112*cdf0e10cSrcweir 				//aCtlEffect		( this, CUI_RES( CTL_EFFECT ) ),
113*cdf0e10cSrcweir 				aFtDirection	( this, CUI_RES(FT_DIRECTION) ),
114*cdf0e10cSrcweir 				aBtnUp   		( this, CUI_RES( BTN_UP ) ),
115*cdf0e10cSrcweir 				aBtnLeft  		( this, CUI_RES( BTN_LEFT ) ),
116*cdf0e10cSrcweir 				aBtnRight 		( this, CUI_RES( BTN_RIGHT ) ),
117*cdf0e10cSrcweir 				aBtnDown		( this, CUI_RES( BTN_DOWN ) ),
118*cdf0e10cSrcweir 
119*cdf0e10cSrcweir 				aFlProperties   ( this, CUI_RES(FL_PROPERTIES)),
120*cdf0e10cSrcweir 				aTsbStartInside	( this, CUI_RES( TSB_START_INSIDE ) ),
121*cdf0e10cSrcweir 				aTsbStopInside	( this, CUI_RES( TSB_STOP_INSIDE ) ),
122*cdf0e10cSrcweir 
123*cdf0e10cSrcweir 				aFtCount		( this, CUI_RES(FT_COUNT)),
124*cdf0e10cSrcweir 				aTsbEndless		( this, CUI_RES( TSB_ENDLESS ) ),
125*cdf0e10cSrcweir 				aNumFldCount	( this, CUI_RES( NUM_FLD_COUNT ) ),
126*cdf0e10cSrcweir 
127*cdf0e10cSrcweir 				aFtAmount		( this, CUI_RES(FT_AMOUNT)),
128*cdf0e10cSrcweir 				aTsbPixel		( this, CUI_RES( TSB_PIXEL ) ),
129*cdf0e10cSrcweir 				aMtrFldAmount	( this, CUI_RES( MTR_FLD_AMOUNT ) ),
130*cdf0e10cSrcweir 
131*cdf0e10cSrcweir 				aFtDelay		( this, CUI_RES(FT_DELAY)),
132*cdf0e10cSrcweir 				aTsbAuto   		( this, CUI_RES( TSB_AUTO ) ),
133*cdf0e10cSrcweir 				aMtrFldDelay	( this, CUI_RES( MTR_FLD_DELAY ) ),
134*cdf0e10cSrcweir 
135*cdf0e10cSrcweir 				rOutAttrs		( rInAttrs ),
136*cdf0e10cSrcweir 				eAniKind		( SDRTEXTANI_NONE )
137*cdf0e10cSrcweir {
138*cdf0e10cSrcweir 	FreeResource();
139*cdf0e10cSrcweir 
140*cdf0e10cSrcweir 	eFUnit = GetModuleFieldUnit( rInAttrs );
141*cdf0e10cSrcweir 	SfxItemPool* pPool = rOutAttrs.GetPool();
142*cdf0e10cSrcweir 	DBG_ASSERT( pPool, "Wo ist der Pool" );
143*cdf0e10cSrcweir 	eUnit = pPool->GetMetric( SDRATTR_TEXT_LEFTDIST );
144*cdf0e10cSrcweir 
145*cdf0e10cSrcweir 	Construct();
146*cdf0e10cSrcweir 
147*cdf0e10cSrcweir 	aLbEffect.SetSelectHdl(
148*cdf0e10cSrcweir 		LINK( this, SvxTextAnimationPage, SelectEffectHdl_Impl ) );
149*cdf0e10cSrcweir 	aTsbEndless.SetClickHdl(
150*cdf0e10cSrcweir 		LINK( this, SvxTextAnimationPage, ClickEndlessHdl_Impl ) );
151*cdf0e10cSrcweir 	aTsbAuto.SetClickHdl(
152*cdf0e10cSrcweir 		LINK( this, SvxTextAnimationPage, ClickAutoHdl_Impl ) );
153*cdf0e10cSrcweir 	aTsbPixel.SetClickHdl(
154*cdf0e10cSrcweir 		LINK( this, SvxTextAnimationPage, ClickPixelHdl_Impl ) );
155*cdf0e10cSrcweir 
156*cdf0e10cSrcweir 	Link aLink( LINK( this, SvxTextAnimationPage, ClickDirectionHdl_Impl ) );
157*cdf0e10cSrcweir 	aBtnUp.SetClickHdl( aLink );
158*cdf0e10cSrcweir 	aBtnLeft.SetClickHdl( aLink );
159*cdf0e10cSrcweir 	aBtnRight.SetClickHdl( aLink );
160*cdf0e10cSrcweir 	aBtnDown.SetClickHdl( aLink );
161*cdf0e10cSrcweir 
162*cdf0e10cSrcweir 	aNumFldCount.SetAccessibleRelationLabeledBy( &aTsbEndless );
163*cdf0e10cSrcweir 	aMtrFldAmount.SetAccessibleRelationLabeledBy( &aTsbPixel );
164*cdf0e10cSrcweir 	aMtrFldDelay.SetAccessibleRelationLabeledBy( &aTsbAuto );
165*cdf0e10cSrcweir 
166*cdf0e10cSrcweir 	aBtnUp.SetAccessibleRelationLabeledBy( &aFtDirection );
167*cdf0e10cSrcweir 	aBtnLeft.SetAccessibleRelationLabeledBy( &aFtDirection );
168*cdf0e10cSrcweir 	aBtnRight.SetAccessibleRelationLabeledBy( &aFtDirection );
169*cdf0e10cSrcweir 	aBtnDown.SetAccessibleRelationLabeledBy( &aFtDirection );
170*cdf0e10cSrcweir 
171*cdf0e10cSrcweir 	aBtnUp.SetAccessibleRelationMemberOf( &aFlEffect );
172*cdf0e10cSrcweir 	aBtnLeft.SetAccessibleRelationMemberOf( &aFlEffect );
173*cdf0e10cSrcweir 	aBtnRight.SetAccessibleRelationMemberOf( &aFlEffect );
174*cdf0e10cSrcweir 	aBtnDown.SetAccessibleRelationMemberOf( &aFlEffect );
175*cdf0e10cSrcweir 
176*cdf0e10cSrcweir 	aTsbEndless.SetAccessibleRelationLabeledBy( &aFtCount );
177*cdf0e10cSrcweir 	aTsbPixel.SetAccessibleRelationLabeledBy( &aFtAmount );
178*cdf0e10cSrcweir 	aTsbAuto.SetAccessibleRelationLabeledBy( &aFtDelay );
179*cdf0e10cSrcweir }
180*cdf0e10cSrcweir 
181*cdf0e10cSrcweir /*************************************************************************
182*cdf0e10cSrcweir |*
183*cdf0e10cSrcweir |* Dtor
184*cdf0e10cSrcweir |*
185*cdf0e10cSrcweir \************************************************************************/
186*cdf0e10cSrcweir 
187*cdf0e10cSrcweir SvxTextAnimationPage::~SvxTextAnimationPage()
188*cdf0e10cSrcweir {
189*cdf0e10cSrcweir }
190*cdf0e10cSrcweir 
191*cdf0e10cSrcweir /*************************************************************************
192*cdf0e10cSrcweir |*
193*cdf0e10cSrcweir |* Liest uebergebenen Item-Set
194*cdf0e10cSrcweir |*
195*cdf0e10cSrcweir \************************************************************************/
196*cdf0e10cSrcweir 
197*cdf0e10cSrcweir void __EXPORT SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs )
198*cdf0e10cSrcweir {
199*cdf0e10cSrcweir 	const SfxItemPool* pPool = rAttrs.GetPool();
200*cdf0e10cSrcweir 
201*cdf0e10cSrcweir 	// Animationstyp
202*cdf0e10cSrcweir 	const SfxPoolItem* pItem = GetItem( rAttrs, SDRATTR_TEXT_ANIKIND );
203*cdf0e10cSrcweir 
204*cdf0e10cSrcweir 	if( !pItem )
205*cdf0e10cSrcweir 		pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIKIND );
206*cdf0e10cSrcweir 	if( pItem )
207*cdf0e10cSrcweir 	{
208*cdf0e10cSrcweir 		eAniKind = ( ( const SdrTextAniKindItem* )pItem )->GetValue();
209*cdf0e10cSrcweir 		aLbEffect.SelectEntryPos( sal::static_int_cast< sal_uInt16 >(eAniKind) );
210*cdf0e10cSrcweir 	}
211*cdf0e10cSrcweir 	else
212*cdf0e10cSrcweir 		aLbEffect.SetNoSelection();
213*cdf0e10cSrcweir 	aLbEffect.SaveValue();
214*cdf0e10cSrcweir 
215*cdf0e10cSrcweir 	// Animationsrichtung
216*cdf0e10cSrcweir 	pItem = GetItem( rAttrs, SDRATTR_TEXT_ANIDIRECTION );
217*cdf0e10cSrcweir 	if( !pItem )
218*cdf0e10cSrcweir 		pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIDIRECTION );
219*cdf0e10cSrcweir 	if( pItem )
220*cdf0e10cSrcweir 	{
221*cdf0e10cSrcweir 		SdrTextAniDirection eValue = ( ( const SdrTextAniDirectionItem* )pItem )->GetValue();
222*cdf0e10cSrcweir 		SelectDirection( eValue );
223*cdf0e10cSrcweir 	}
224*cdf0e10cSrcweir 	else
225*cdf0e10cSrcweir 	{
226*cdf0e10cSrcweir 		aBtnUp.Check( sal_False );
227*cdf0e10cSrcweir 		aBtnLeft.Check( sal_False );
228*cdf0e10cSrcweir 		aBtnRight.Check( sal_False );
229*cdf0e10cSrcweir 		aBtnDown.Check( sal_False );
230*cdf0e10cSrcweir 	}
231*cdf0e10cSrcweir 	aBtnUp.SaveValue();
232*cdf0e10cSrcweir 	aBtnLeft.SaveValue();
233*cdf0e10cSrcweir 	aBtnRight.SaveValue();
234*cdf0e10cSrcweir 	aBtnDown.SaveValue();
235*cdf0e10cSrcweir 
236*cdf0e10cSrcweir 	// Start inside
237*cdf0e10cSrcweir 	pItem = GetItem( rAttrs, SDRATTR_TEXT_ANISTARTINSIDE );
238*cdf0e10cSrcweir 	if( !pItem )
239*cdf0e10cSrcweir 		pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANISTARTINSIDE );
240*cdf0e10cSrcweir 	if( pItem )
241*cdf0e10cSrcweir 	{
242*cdf0e10cSrcweir 		aTsbStartInside.EnableTriState( sal_False );
243*cdf0e10cSrcweir 		sal_Bool bValue = ( ( const SdrTextAniStartInsideItem* )pItem )->GetValue();
244*cdf0e10cSrcweir 		if( bValue )
245*cdf0e10cSrcweir 			aTsbStartInside.SetState( STATE_CHECK );
246*cdf0e10cSrcweir 		else
247*cdf0e10cSrcweir 			aTsbStartInside.SetState( STATE_NOCHECK );
248*cdf0e10cSrcweir 	}
249*cdf0e10cSrcweir 	else
250*cdf0e10cSrcweir 		aTsbStartInside.SetState( STATE_DONTKNOW );
251*cdf0e10cSrcweir 	aTsbStartInside.SaveValue();
252*cdf0e10cSrcweir 
253*cdf0e10cSrcweir 	// Stop inside
254*cdf0e10cSrcweir 	pItem = GetItem( rAttrs, SDRATTR_TEXT_ANISTOPINSIDE );
255*cdf0e10cSrcweir 	if( !pItem )
256*cdf0e10cSrcweir 		pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANISTOPINSIDE );
257*cdf0e10cSrcweir 	if( pItem )
258*cdf0e10cSrcweir 	{
259*cdf0e10cSrcweir 		aTsbStopInside.EnableTriState( sal_False );
260*cdf0e10cSrcweir 		sal_Bool bValue = ( ( const SdrTextAniStopInsideItem* )pItem )->GetValue();
261*cdf0e10cSrcweir 		if( bValue )
262*cdf0e10cSrcweir 			aTsbStopInside.SetState( STATE_CHECK );
263*cdf0e10cSrcweir 		else
264*cdf0e10cSrcweir 			aTsbStopInside.SetState( STATE_NOCHECK );
265*cdf0e10cSrcweir 	}
266*cdf0e10cSrcweir 	else
267*cdf0e10cSrcweir 		aTsbStopInside.SetState( STATE_DONTKNOW );
268*cdf0e10cSrcweir 	aTsbStopInside.SaveValue();
269*cdf0e10cSrcweir 
270*cdf0e10cSrcweir 	// Anzahl
271*cdf0e10cSrcweir 	pItem = GetItem( rAttrs, SDRATTR_TEXT_ANICOUNT );
272*cdf0e10cSrcweir 	if( !pItem )
273*cdf0e10cSrcweir 		pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANICOUNT );
274*cdf0e10cSrcweir 	if( pItem )
275*cdf0e10cSrcweir 	{
276*cdf0e10cSrcweir 		aTsbEndless.EnableTriState( sal_False );
277*cdf0e10cSrcweir 		long nValue = (long) ( ( const SdrTextAniCountItem* )pItem )->GetValue();
278*cdf0e10cSrcweir 		aNumFldCount.SetValue( nValue );
279*cdf0e10cSrcweir 		if( nValue == 0 )
280*cdf0e10cSrcweir 		{
281*cdf0e10cSrcweir 			if( eAniKind == SDRTEXTANI_SLIDE )
282*cdf0e10cSrcweir 			{
283*cdf0e10cSrcweir 				aTsbEndless.SetState( STATE_NOCHECK );
284*cdf0e10cSrcweir 				aTsbEndless.Enable( sal_False );
285*cdf0e10cSrcweir 			}
286*cdf0e10cSrcweir 			else
287*cdf0e10cSrcweir 			{
288*cdf0e10cSrcweir 				aTsbEndless.SetState( STATE_CHECK );
289*cdf0e10cSrcweir 				aNumFldCount.SetEmptyFieldValue();
290*cdf0e10cSrcweir 			}
291*cdf0e10cSrcweir 		}
292*cdf0e10cSrcweir 		else
293*cdf0e10cSrcweir 			aTsbEndless.SetState( STATE_NOCHECK );
294*cdf0e10cSrcweir 	}
295*cdf0e10cSrcweir 	else
296*cdf0e10cSrcweir 	{
297*cdf0e10cSrcweir 		aNumFldCount.SetEmptyFieldValue();
298*cdf0e10cSrcweir 		aTsbEndless.SetState( STATE_DONTKNOW );
299*cdf0e10cSrcweir 	}
300*cdf0e10cSrcweir 	aTsbEndless.SaveValue();
301*cdf0e10cSrcweir 	aNumFldCount.SaveValue();
302*cdf0e10cSrcweir 
303*cdf0e10cSrcweir 	// Verzoegerung
304*cdf0e10cSrcweir 	pItem = GetItem( rAttrs, SDRATTR_TEXT_ANIDELAY );
305*cdf0e10cSrcweir 	if( !pItem )
306*cdf0e10cSrcweir 		pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIDELAY );
307*cdf0e10cSrcweir 	if( pItem )
308*cdf0e10cSrcweir 	{
309*cdf0e10cSrcweir 		aTsbAuto.EnableTriState( sal_False );
310*cdf0e10cSrcweir 		long nValue = (long) ( ( const SdrTextAniDelayItem* )pItem )->GetValue();
311*cdf0e10cSrcweir 		aMtrFldDelay.SetValue( nValue );
312*cdf0e10cSrcweir 		if( nValue == 0 )
313*cdf0e10cSrcweir 		{
314*cdf0e10cSrcweir 			aTsbAuto.SetState( STATE_CHECK );
315*cdf0e10cSrcweir 			aMtrFldDelay.SetEmptyFieldValue();
316*cdf0e10cSrcweir 		}
317*cdf0e10cSrcweir 		else
318*cdf0e10cSrcweir 			aTsbAuto.SetState( STATE_NOCHECK );
319*cdf0e10cSrcweir 	}
320*cdf0e10cSrcweir 	else
321*cdf0e10cSrcweir 	{
322*cdf0e10cSrcweir 		aMtrFldDelay.SetEmptyFieldValue();
323*cdf0e10cSrcweir 		aTsbAuto.SetState( STATE_DONTKNOW );
324*cdf0e10cSrcweir 	}
325*cdf0e10cSrcweir 	aTsbAuto.SaveValue();
326*cdf0e10cSrcweir 	aMtrFldDelay.SaveValue();
327*cdf0e10cSrcweir 
328*cdf0e10cSrcweir 	// Schrittweite
329*cdf0e10cSrcweir 	pItem = GetItem( rAttrs, SDRATTR_TEXT_ANIAMOUNT );
330*cdf0e10cSrcweir 	if( !pItem )
331*cdf0e10cSrcweir 		pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIAMOUNT );
332*cdf0e10cSrcweir 	if( pItem )
333*cdf0e10cSrcweir 	{
334*cdf0e10cSrcweir 		aTsbPixel.EnableTriState( sal_False );
335*cdf0e10cSrcweir 		long nValue = (long) ( ( const SdrTextAniAmountItem* )pItem )->GetValue();
336*cdf0e10cSrcweir 		if( nValue <= 0 )
337*cdf0e10cSrcweir 		{
338*cdf0e10cSrcweir 			aTsbPixel.SetState( STATE_CHECK );
339*cdf0e10cSrcweir 			nValue = -nValue;
340*cdf0e10cSrcweir 			if( nValue == 0 )
341*cdf0e10cSrcweir 				nValue++;
342*cdf0e10cSrcweir 			aMtrFldAmount.SetUnit( FUNIT_CUSTOM );
343*cdf0e10cSrcweir 			aMtrFldAmount.SetDecimalDigits( 0 );
344*cdf0e10cSrcweir 
345*cdf0e10cSrcweir 			aMtrFldAmount.SetSpinSize( 1 );
346*cdf0e10cSrcweir             aMtrFldAmount.SetMin( 1 );
347*cdf0e10cSrcweir 			aMtrFldAmount.SetFirst( 1 );
348*cdf0e10cSrcweir             aMtrFldAmount.SetMax( 100 );
349*cdf0e10cSrcweir 			aMtrFldAmount.SetLast( 100 );
350*cdf0e10cSrcweir 
351*cdf0e10cSrcweir 			aMtrFldAmount.SetValue( nValue );
352*cdf0e10cSrcweir 		}
353*cdf0e10cSrcweir 		else
354*cdf0e10cSrcweir 		{
355*cdf0e10cSrcweir 			aTsbPixel.SetState( STATE_NOCHECK );
356*cdf0e10cSrcweir 			aMtrFldAmount.SetUnit( eFUnit );
357*cdf0e10cSrcweir 			aMtrFldAmount.SetDecimalDigits( 2 );
358*cdf0e10cSrcweir 
359*cdf0e10cSrcweir 			aMtrFldAmount.SetSpinSize( 10 );
360*cdf0e10cSrcweir             aMtrFldAmount.SetMin( 1 );
361*cdf0e10cSrcweir 			aMtrFldAmount.SetFirst( 1 );
362*cdf0e10cSrcweir             aMtrFldAmount.SetMax( 10000 );
363*cdf0e10cSrcweir 			aMtrFldAmount.SetLast( 10000 );
364*cdf0e10cSrcweir 
365*cdf0e10cSrcweir 			SetMetricValue( aMtrFldAmount, nValue, eUnit );
366*cdf0e10cSrcweir 		}
367*cdf0e10cSrcweir 	}
368*cdf0e10cSrcweir 	else
369*cdf0e10cSrcweir 	{
370*cdf0e10cSrcweir 		aMtrFldAmount.Disable();
371*cdf0e10cSrcweir 		aMtrFldAmount.SetEmptyFieldValue();
372*cdf0e10cSrcweir 		aTsbPixel.SetState( STATE_DONTKNOW );
373*cdf0e10cSrcweir 	}
374*cdf0e10cSrcweir 	aTsbPixel.SaveValue();
375*cdf0e10cSrcweir 	aMtrFldAmount.SaveValue();
376*cdf0e10cSrcweir 
377*cdf0e10cSrcweir 
378*cdf0e10cSrcweir 	SelectEffectHdl_Impl( NULL );
379*cdf0e10cSrcweir 	ClickEndlessHdl_Impl( NULL );
380*cdf0e10cSrcweir 	ClickAutoHdl_Impl( NULL );
381*cdf0e10cSrcweir 	//ClickPixelHdl_Impl( NULL );
382*cdf0e10cSrcweir }
383*cdf0e10cSrcweir 
384*cdf0e10cSrcweir /*************************************************************************
385*cdf0e10cSrcweir |*
386*cdf0e10cSrcweir |* Fuellt uebergebenen Item-Set mit Dialogbox-Attributen
387*cdf0e10cSrcweir |*
388*cdf0e10cSrcweir \************************************************************************/
389*cdf0e10cSrcweir 
390*cdf0e10cSrcweir sal_Bool SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs)
391*cdf0e10cSrcweir {
392*cdf0e10cSrcweir 	sal_Bool bModified = sal_False;
393*cdf0e10cSrcweir 	sal_uInt16 nPos;
394*cdf0e10cSrcweir 	TriState eState;
395*cdf0e10cSrcweir 
396*cdf0e10cSrcweir 	// Animationstyp
397*cdf0e10cSrcweir 	nPos = aLbEffect.GetSelectEntryPos();
398*cdf0e10cSrcweir 	if( nPos != LISTBOX_ENTRY_NOTFOUND &&
399*cdf0e10cSrcweir 		nPos != aLbEffect.GetSavedValue() )
400*cdf0e10cSrcweir 	{
401*cdf0e10cSrcweir 		rAttrs.Put( SdrTextAniKindItem( (SdrTextAniKind) nPos ) );
402*cdf0e10cSrcweir 		bModified = sal_True;
403*cdf0e10cSrcweir 	}
404*cdf0e10cSrcweir 
405*cdf0e10cSrcweir 	// Animationsrichtung
406*cdf0e10cSrcweir 	if( aBtnUp.GetSavedValue() != aBtnUp.IsChecked() ||
407*cdf0e10cSrcweir 		aBtnLeft.GetSavedValue() != aBtnLeft.IsChecked() ||
408*cdf0e10cSrcweir 		aBtnRight.GetSavedValue() != aBtnRight.IsChecked() ||
409*cdf0e10cSrcweir 		aBtnDown.GetSavedValue() != aBtnDown.IsChecked() )
410*cdf0e10cSrcweir 	{
411*cdf0e10cSrcweir 		SdrTextAniDirection eValue = (SdrTextAniDirection) GetSelectedDirection();
412*cdf0e10cSrcweir 		rAttrs.Put( SdrTextAniDirectionItem( eValue ) );
413*cdf0e10cSrcweir 		bModified = sal_True;
414*cdf0e10cSrcweir 	}
415*cdf0e10cSrcweir 
416*cdf0e10cSrcweir 	// Start inside
417*cdf0e10cSrcweir 	eState = aTsbStartInside.GetState();
418*cdf0e10cSrcweir 	if( eState != aTsbStartInside.GetSavedValue() )
419*cdf0e10cSrcweir 	{
420*cdf0e10cSrcweir 		rAttrs.Put( SdrTextAniStartInsideItem( (sal_Bool) STATE_CHECK == eState ) );
421*cdf0e10cSrcweir 		bModified = sal_True;
422*cdf0e10cSrcweir 	}
423*cdf0e10cSrcweir 
424*cdf0e10cSrcweir 	// Stop inside
425*cdf0e10cSrcweir 	eState = aTsbStopInside.GetState();
426*cdf0e10cSrcweir 	if( eState != aTsbStopInside.GetSavedValue() )
427*cdf0e10cSrcweir 	{
428*cdf0e10cSrcweir 		rAttrs.Put( SdrTextAniStopInsideItem( (sal_Bool) STATE_CHECK == eState ) );
429*cdf0e10cSrcweir 		bModified = sal_True;
430*cdf0e10cSrcweir 	}
431*cdf0e10cSrcweir 
432*cdf0e10cSrcweir 	// Anzahl
433*cdf0e10cSrcweir 	eState = aTsbEndless.GetState();
434*cdf0e10cSrcweir 	String aStr = aNumFldCount.GetText();
435*cdf0e10cSrcweir 	if( eState != aTsbEndless.GetSavedValue() ||
436*cdf0e10cSrcweir 		aStr != aNumFldCount.GetSavedValue() )
437*cdf0e10cSrcweir 	{
438*cdf0e10cSrcweir 		sal_Int64 nValue = 0;
439*cdf0e10cSrcweir 		if( eState == STATE_CHECK /*#89844#*/ && aTsbEndless.IsEnabled())
440*cdf0e10cSrcweir 			bModified = sal_True;
441*cdf0e10cSrcweir 		else
442*cdf0e10cSrcweir 		{
443*cdf0e10cSrcweir 			if( aStr != aNumFldCount.GetSavedValue() )
444*cdf0e10cSrcweir 			{
445*cdf0e10cSrcweir 				nValue = aNumFldCount.GetValue();
446*cdf0e10cSrcweir 				bModified = sal_True;
447*cdf0e10cSrcweir 			}
448*cdf0e10cSrcweir 		}
449*cdf0e10cSrcweir 		if( bModified )
450*cdf0e10cSrcweir 			rAttrs.Put( SdrTextAniCountItem( (sal_uInt16) nValue ) );
451*cdf0e10cSrcweir 	}
452*cdf0e10cSrcweir 
453*cdf0e10cSrcweir 	// Verzoegerung
454*cdf0e10cSrcweir 	eState = aTsbAuto.GetState();
455*cdf0e10cSrcweir 	aStr = aMtrFldDelay.GetText();
456*cdf0e10cSrcweir 	if( eState != aTsbAuto.GetSavedValue() ||
457*cdf0e10cSrcweir 		aStr != aMtrFldDelay.GetSavedValue() )
458*cdf0e10cSrcweir 	{
459*cdf0e10cSrcweir 		sal_Int64 nValue = 0;
460*cdf0e10cSrcweir 		if( eState == STATE_CHECK )
461*cdf0e10cSrcweir 			bModified = sal_True;
462*cdf0e10cSrcweir 		else
463*cdf0e10cSrcweir 		{
464*cdf0e10cSrcweir 			if( aStr != aMtrFldDelay.GetSavedValue() )
465*cdf0e10cSrcweir 			{
466*cdf0e10cSrcweir 				nValue = aMtrFldDelay.GetValue();
467*cdf0e10cSrcweir 				bModified = sal_True;
468*cdf0e10cSrcweir 			}
469*cdf0e10cSrcweir 		}
470*cdf0e10cSrcweir 		if( bModified )
471*cdf0e10cSrcweir 			rAttrs.Put( SdrTextAniDelayItem( (sal_uInt16) nValue ) );
472*cdf0e10cSrcweir 	}
473*cdf0e10cSrcweir 
474*cdf0e10cSrcweir 	// Schrittweite
475*cdf0e10cSrcweir 	eState = aTsbPixel.GetState();
476*cdf0e10cSrcweir 	aStr = aMtrFldAmount.GetText();
477*cdf0e10cSrcweir 	if( eState != aTsbPixel.GetSavedValue() ||
478*cdf0e10cSrcweir 		aStr != aMtrFldAmount.GetSavedValue() )
479*cdf0e10cSrcweir 	{
480*cdf0e10cSrcweir 		sal_Int64 nValue = 0;
481*cdf0e10cSrcweir 		if( eState == STATE_CHECK )
482*cdf0e10cSrcweir 		{
483*cdf0e10cSrcweir 			nValue = aMtrFldAmount.GetValue();
484*cdf0e10cSrcweir 			nValue = -nValue;
485*cdf0e10cSrcweir 		}
486*cdf0e10cSrcweir 		else
487*cdf0e10cSrcweir 		{
488*cdf0e10cSrcweir 			nValue = GetCoreValue( aMtrFldAmount, eUnit );
489*cdf0e10cSrcweir 		}
490*cdf0e10cSrcweir 		rAttrs.Put( SdrTextAniAmountItem( (sal_Int16) nValue ) );
491*cdf0e10cSrcweir 
492*cdf0e10cSrcweir 		bModified = sal_True;
493*cdf0e10cSrcweir 	}
494*cdf0e10cSrcweir 
495*cdf0e10cSrcweir 	return( bModified );
496*cdf0e10cSrcweir }
497*cdf0e10cSrcweir 
498*cdf0e10cSrcweir /*************************************************************************
499*cdf0e10cSrcweir |*
500*cdf0e10cSrcweir |*
501*cdf0e10cSrcweir |*
502*cdf0e10cSrcweir \************************************************************************/
503*cdf0e10cSrcweir 
504*cdf0e10cSrcweir void SvxTextAnimationPage::Construct()
505*cdf0e10cSrcweir {
506*cdf0e10cSrcweir }
507*cdf0e10cSrcweir 
508*cdf0e10cSrcweir /*************************************************************************
509*cdf0e10cSrcweir |*
510*cdf0e10cSrcweir |*
511*cdf0e10cSrcweir |*
512*cdf0e10cSrcweir \************************************************************************/
513*cdf0e10cSrcweir 
514*cdf0e10cSrcweir sal_uInt16*	SvxTextAnimationPage::GetRanges()
515*cdf0e10cSrcweir {
516*cdf0e10cSrcweir 	return( pRanges );
517*cdf0e10cSrcweir }
518*cdf0e10cSrcweir 
519*cdf0e10cSrcweir /*************************************************************************
520*cdf0e10cSrcweir |*
521*cdf0e10cSrcweir |* Erzeugt die Seite
522*cdf0e10cSrcweir |*
523*cdf0e10cSrcweir \************************************************************************/
524*cdf0e10cSrcweir 
525*cdf0e10cSrcweir SfxTabPage* SvxTextAnimationPage::Create( Window* pWindow,
526*cdf0e10cSrcweir 				const SfxItemSet& rAttrs )
527*cdf0e10cSrcweir {
528*cdf0e10cSrcweir 	return( new SvxTextAnimationPage( pWindow, rAttrs ) );
529*cdf0e10cSrcweir }
530*cdf0e10cSrcweir 
531*cdf0e10cSrcweir /*************************************************************************
532*cdf0e10cSrcweir |*
533*cdf0e10cSrcweir |*
534*cdf0e10cSrcweir |*
535*cdf0e10cSrcweir \************************************************************************/
536*cdf0e10cSrcweir 
537*cdf0e10cSrcweir IMPL_LINK( SvxTextAnimationPage, SelectEffectHdl_Impl, void *, EMPTYARG )
538*cdf0e10cSrcweir {
539*cdf0e10cSrcweir 	sal_uInt16 nPos = aLbEffect.GetSelectEntryPos();
540*cdf0e10cSrcweir 	if( nPos != LISTBOX_ENTRY_NOTFOUND )
541*cdf0e10cSrcweir 	{
542*cdf0e10cSrcweir 		eAniKind = (SdrTextAniKind) nPos;
543*cdf0e10cSrcweir 		switch( eAniKind )
544*cdf0e10cSrcweir 		{
545*cdf0e10cSrcweir 			case SDRTEXTANI_NONE:
546*cdf0e10cSrcweir 			{
547*cdf0e10cSrcweir                 aFtDirection.Disable();
548*cdf0e10cSrcweir                 aBtnUp.Disable();
549*cdf0e10cSrcweir 				aBtnLeft.Disable();
550*cdf0e10cSrcweir 				aBtnRight.Disable();
551*cdf0e10cSrcweir 				aBtnDown.Disable();
552*cdf0e10cSrcweir 				aTsbStartInside.Disable();
553*cdf0e10cSrcweir 				aTsbStopInside.Disable();
554*cdf0e10cSrcweir 
555*cdf0e10cSrcweir 				aTsbEndless.Disable();
556*cdf0e10cSrcweir 				aNumFldCount.Disable();
557*cdf0e10cSrcweir 				aFtCount.Disable();
558*cdf0e10cSrcweir 
559*cdf0e10cSrcweir 				aTsbAuto.Disable();
560*cdf0e10cSrcweir 				aMtrFldDelay.Disable();
561*cdf0e10cSrcweir 				aFtDelay.Disable();
562*cdf0e10cSrcweir 
563*cdf0e10cSrcweir 				aTsbPixel.Disable();
564*cdf0e10cSrcweir 				aMtrFldAmount.Disable();
565*cdf0e10cSrcweir 				aFtAmount.Disable();
566*cdf0e10cSrcweir 			}
567*cdf0e10cSrcweir 			break;
568*cdf0e10cSrcweir 
569*cdf0e10cSrcweir 			case SDRTEXTANI_BLINK:
570*cdf0e10cSrcweir 			case SDRTEXTANI_SCROLL:
571*cdf0e10cSrcweir 			case SDRTEXTANI_ALTERNATE:
572*cdf0e10cSrcweir 			case SDRTEXTANI_SLIDE:
573*cdf0e10cSrcweir 			{
574*cdf0e10cSrcweir 				if( eAniKind == SDRTEXTANI_SLIDE )
575*cdf0e10cSrcweir 				{
576*cdf0e10cSrcweir 					aTsbStartInside.Disable();
577*cdf0e10cSrcweir 					aTsbStopInside.Disable();
578*cdf0e10cSrcweir 
579*cdf0e10cSrcweir 					aTsbEndless.Disable();
580*cdf0e10cSrcweir 					aNumFldCount.Enable();
581*cdf0e10cSrcweir 					aNumFldCount.SetValue( aNumFldCount.GetValue() );
582*cdf0e10cSrcweir 				}
583*cdf0e10cSrcweir 				else
584*cdf0e10cSrcweir 				{
585*cdf0e10cSrcweir 					aTsbStartInside.Enable();
586*cdf0e10cSrcweir 					aTsbStopInside.Enable();
587*cdf0e10cSrcweir 
588*cdf0e10cSrcweir 					aTsbEndless.Enable();
589*cdf0e10cSrcweir 					ClickEndlessHdl_Impl( NULL );
590*cdf0e10cSrcweir 				}
591*cdf0e10cSrcweir 				aFtCount.Enable();
592*cdf0e10cSrcweir 
593*cdf0e10cSrcweir 				aTsbAuto.Enable();
594*cdf0e10cSrcweir 				aFtDelay.Enable();
595*cdf0e10cSrcweir 				ClickAutoHdl_Impl( NULL );
596*cdf0e10cSrcweir 
597*cdf0e10cSrcweir 				if( eAniKind == SDRTEXTANI_BLINK )
598*cdf0e10cSrcweir 				{
599*cdf0e10cSrcweir                     aFtDirection.Disable();
600*cdf0e10cSrcweir                     aBtnUp.Disable();
601*cdf0e10cSrcweir 					aBtnLeft.Disable();
602*cdf0e10cSrcweir 					aBtnRight.Disable();
603*cdf0e10cSrcweir 					aBtnDown.Disable();
604*cdf0e10cSrcweir 
605*cdf0e10cSrcweir 					aTsbPixel.Disable();
606*cdf0e10cSrcweir 					aMtrFldAmount.Disable();
607*cdf0e10cSrcweir 					aFtAmount.Disable();
608*cdf0e10cSrcweir 				}
609*cdf0e10cSrcweir 				else
610*cdf0e10cSrcweir 				{
611*cdf0e10cSrcweir                     aFtDirection.Enable();
612*cdf0e10cSrcweir                     aBtnUp.Enable();
613*cdf0e10cSrcweir 					aBtnLeft.Enable();
614*cdf0e10cSrcweir 					aBtnRight.Enable();
615*cdf0e10cSrcweir 					aBtnDown.Enable();
616*cdf0e10cSrcweir 
617*cdf0e10cSrcweir 					aTsbPixel.Enable();
618*cdf0e10cSrcweir 					aMtrFldAmount.Enable();
619*cdf0e10cSrcweir 					aFtAmount.Enable();
620*cdf0e10cSrcweir 				}
621*cdf0e10cSrcweir 			}
622*cdf0e10cSrcweir 			break;
623*cdf0e10cSrcweir 		}
624*cdf0e10cSrcweir 
625*cdf0e10cSrcweir 	}
626*cdf0e10cSrcweir 	return( 0L );
627*cdf0e10cSrcweir }
628*cdf0e10cSrcweir 
629*cdf0e10cSrcweir /*************************************************************************
630*cdf0e10cSrcweir |*
631*cdf0e10cSrcweir |*
632*cdf0e10cSrcweir |*
633*cdf0e10cSrcweir \************************************************************************/
634*cdf0e10cSrcweir 
635*cdf0e10cSrcweir IMPL_LINK( SvxTextAnimationPage, ClickEndlessHdl_Impl, void *, EMPTYARG )
636*cdf0e10cSrcweir {
637*cdf0e10cSrcweir 
638*cdf0e10cSrcweir 	if( eAniKind != SDRTEXTANI_SLIDE )
639*cdf0e10cSrcweir 	{
640*cdf0e10cSrcweir 		TriState eState = aTsbEndless.GetState();
641*cdf0e10cSrcweir 		if( eState != STATE_NOCHECK )
642*cdf0e10cSrcweir 		{
643*cdf0e10cSrcweir 			aNumFldCount.Disable();
644*cdf0e10cSrcweir 			aNumFldCount.SetEmptyFieldValue();
645*cdf0e10cSrcweir 		}
646*cdf0e10cSrcweir 		else
647*cdf0e10cSrcweir 		{
648*cdf0e10cSrcweir 			aNumFldCount.Enable();
649*cdf0e10cSrcweir 			aNumFldCount.SetValue( aNumFldCount.GetValue() );
650*cdf0e10cSrcweir 		}
651*cdf0e10cSrcweir 	}
652*cdf0e10cSrcweir 	return( 0L );
653*cdf0e10cSrcweir }
654*cdf0e10cSrcweir 
655*cdf0e10cSrcweir /*************************************************************************
656*cdf0e10cSrcweir |*
657*cdf0e10cSrcweir |*
658*cdf0e10cSrcweir |*
659*cdf0e10cSrcweir \************************************************************************/
660*cdf0e10cSrcweir 
661*cdf0e10cSrcweir IMPL_LINK( SvxTextAnimationPage, ClickAutoHdl_Impl, void *, EMPTYARG )
662*cdf0e10cSrcweir {
663*cdf0e10cSrcweir 	TriState eState = aTsbAuto.GetState();
664*cdf0e10cSrcweir 	if( eState != STATE_NOCHECK )
665*cdf0e10cSrcweir 	{
666*cdf0e10cSrcweir 		aMtrFldDelay.Disable();
667*cdf0e10cSrcweir 		aMtrFldDelay.SetEmptyFieldValue();
668*cdf0e10cSrcweir 	}
669*cdf0e10cSrcweir 	else
670*cdf0e10cSrcweir 	{
671*cdf0e10cSrcweir 		aMtrFldDelay.Enable();
672*cdf0e10cSrcweir 		aMtrFldDelay.SetValue( aMtrFldDelay.GetValue() );
673*cdf0e10cSrcweir 	}
674*cdf0e10cSrcweir 
675*cdf0e10cSrcweir 	return( 0L );
676*cdf0e10cSrcweir }
677*cdf0e10cSrcweir 
678*cdf0e10cSrcweir /*************************************************************************
679*cdf0e10cSrcweir |*
680*cdf0e10cSrcweir |*
681*cdf0e10cSrcweir |*
682*cdf0e10cSrcweir \************************************************************************/
683*cdf0e10cSrcweir 
684*cdf0e10cSrcweir IMPL_LINK( SvxTextAnimationPage, ClickPixelHdl_Impl, void *, EMPTYARG )
685*cdf0e10cSrcweir {
686*cdf0e10cSrcweir 	TriState eState = aTsbPixel.GetState();
687*cdf0e10cSrcweir 	if( eState == STATE_CHECK )
688*cdf0e10cSrcweir 	{
689*cdf0e10cSrcweir 		sal_Int64 nValue = aMtrFldAmount.GetValue() / 10;
690*cdf0e10cSrcweir 		aMtrFldAmount.Enable();
691*cdf0e10cSrcweir 		aMtrFldAmount.SetUnit( FUNIT_CUSTOM );
692*cdf0e10cSrcweir 		//SetFieldUnit( aMtrFldAmount, FUNIT_CUSTOM );
693*cdf0e10cSrcweir 		aMtrFldAmount.SetDecimalDigits( 0 );
694*cdf0e10cSrcweir 
695*cdf0e10cSrcweir 		aMtrFldAmount.SetSpinSize( 1 );
696*cdf0e10cSrcweir         aMtrFldAmount.SetMin( 1 );
697*cdf0e10cSrcweir 		aMtrFldAmount.SetFirst( 1 );
698*cdf0e10cSrcweir         aMtrFldAmount.SetMax( 100 );
699*cdf0e10cSrcweir 		aMtrFldAmount.SetLast( 100 );
700*cdf0e10cSrcweir 
701*cdf0e10cSrcweir 		aMtrFldAmount.SetValue( nValue );
702*cdf0e10cSrcweir 	}
703*cdf0e10cSrcweir 	else if( eState == STATE_NOCHECK )
704*cdf0e10cSrcweir 	{
705*cdf0e10cSrcweir 		sal_Int64 nValue = aMtrFldAmount.GetValue() * 10;
706*cdf0e10cSrcweir 		aMtrFldAmount.Enable();
707*cdf0e10cSrcweir 		aMtrFldAmount.SetUnit( eFUnit );
708*cdf0e10cSrcweir 		//SetFieldUnit( aMtrFldAmount, eFUnit );
709*cdf0e10cSrcweir 		aMtrFldAmount.SetDecimalDigits( 2 );
710*cdf0e10cSrcweir 
711*cdf0e10cSrcweir 		aMtrFldAmount.SetSpinSize( 10 );
712*cdf0e10cSrcweir         aMtrFldAmount.SetMin( 1 );
713*cdf0e10cSrcweir 		aMtrFldAmount.SetFirst( 1 );
714*cdf0e10cSrcweir         aMtrFldAmount.SetMax( 10000 );
715*cdf0e10cSrcweir 		aMtrFldAmount.SetLast( 10000 );
716*cdf0e10cSrcweir 
717*cdf0e10cSrcweir 		aMtrFldAmount.SetValue( nValue );
718*cdf0e10cSrcweir 	}
719*cdf0e10cSrcweir 
720*cdf0e10cSrcweir 	return( 0L );
721*cdf0e10cSrcweir }
722*cdf0e10cSrcweir 
723*cdf0e10cSrcweir /*************************************************************************
724*cdf0e10cSrcweir |*
725*cdf0e10cSrcweir |*
726*cdf0e10cSrcweir |*
727*cdf0e10cSrcweir \************************************************************************/
728*cdf0e10cSrcweir 
729*cdf0e10cSrcweir IMPL_LINK( SvxTextAnimationPage, ClickDirectionHdl_Impl, ImageButton *, pBtn )
730*cdf0e10cSrcweir {
731*cdf0e10cSrcweir 	aBtnUp.Check( pBtn == &aBtnUp );
732*cdf0e10cSrcweir 	aBtnLeft.Check( pBtn == &aBtnLeft );
733*cdf0e10cSrcweir 	aBtnRight.Check( pBtn == &aBtnRight );
734*cdf0e10cSrcweir 	aBtnDown.Check( pBtn == &aBtnDown );
735*cdf0e10cSrcweir 
736*cdf0e10cSrcweir 	return( 0L );
737*cdf0e10cSrcweir }
738*cdf0e10cSrcweir 
739*cdf0e10cSrcweir /*************************************************************************
740*cdf0e10cSrcweir |*
741*cdf0e10cSrcweir |*
742*cdf0e10cSrcweir |*
743*cdf0e10cSrcweir \************************************************************************/
744*cdf0e10cSrcweir 
745*cdf0e10cSrcweir void SvxTextAnimationPage::SelectDirection( SdrTextAniDirection nValue )
746*cdf0e10cSrcweir {
747*cdf0e10cSrcweir 	aBtnUp.Check( nValue == SDRTEXTANI_UP );
748*cdf0e10cSrcweir 	aBtnLeft.Check( nValue == SDRTEXTANI_LEFT );
749*cdf0e10cSrcweir 	aBtnRight.Check( nValue == SDRTEXTANI_RIGHT );
750*cdf0e10cSrcweir 	aBtnDown.Check( nValue == SDRTEXTANI_DOWN );
751*cdf0e10cSrcweir }
752*cdf0e10cSrcweir 
753*cdf0e10cSrcweir /*************************************************************************
754*cdf0e10cSrcweir |*
755*cdf0e10cSrcweir |*
756*cdf0e10cSrcweir |*
757*cdf0e10cSrcweir \************************************************************************/
758*cdf0e10cSrcweir 
759*cdf0e10cSrcweir sal_uInt16 SvxTextAnimationPage::GetSelectedDirection()
760*cdf0e10cSrcweir {
761*cdf0e10cSrcweir 	sal_uInt16 nValue = 0;
762*cdf0e10cSrcweir 
763*cdf0e10cSrcweir 	if( aBtnUp.IsChecked() )
764*cdf0e10cSrcweir 		nValue = SDRTEXTANI_UP;
765*cdf0e10cSrcweir 	else if( aBtnLeft.IsChecked() )
766*cdf0e10cSrcweir 		nValue = SDRTEXTANI_LEFT;
767*cdf0e10cSrcweir 	else if( aBtnRight.IsChecked() )
768*cdf0e10cSrcweir 		nValue = SDRTEXTANI_RIGHT;
769*cdf0e10cSrcweir 	else if( aBtnDown.IsChecked() )
770*cdf0e10cSrcweir 		nValue = SDRTEXTANI_DOWN;
771*cdf0e10cSrcweir 
772*cdf0e10cSrcweir 	return( nValue );
773*cdf0e10cSrcweir }
774*cdf0e10cSrcweir 
775*cdf0e10cSrcweir 
776