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