xref: /aoo42x/main/sd/source/ui/dlg/present.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_sd.hxx"
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #ifdef SD_DLLIMPLEMENTATION
32*cdf0e10cSrcweir #undef SD_DLLIMPLEMENTATION
33*cdf0e10cSrcweir #endif
34*cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp>
35*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
36*cdf0e10cSrcweir #include <com/sun/star/container/XIndexAccess.hpp>
37*cdf0e10cSrcweir #include <comphelper/processfactory.hxx>
38*cdf0e10cSrcweir #include <svl/itemset.hxx>
39*cdf0e10cSrcweir 
40*cdf0e10cSrcweir #include "sdattr.hxx"
41*cdf0e10cSrcweir #include "present.hxx"
42*cdf0e10cSrcweir #include "present.hrc"
43*cdf0e10cSrcweir #include "sdresid.hxx"
44*cdf0e10cSrcweir #include "cusshow.hxx"
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir using ::rtl::OUString;
47*cdf0e10cSrcweir using namespace ::com::sun::star::uno;
48*cdf0e10cSrcweir using namespace ::com::sun::star::lang;
49*cdf0e10cSrcweir using namespace ::com::sun::star::container;
50*cdf0e10cSrcweir using namespace ::com::sun::star::beans;
51*cdf0e10cSrcweir 
52*cdf0e10cSrcweir /*************************************************************************
53*cdf0e10cSrcweir |* Ctor
54*cdf0e10cSrcweir \************************************************************************/
55*cdf0e10cSrcweir SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow,
56*cdf0e10cSrcweir 								  const SfxItemSet& rInAttrs,
57*cdf0e10cSrcweir 								  List& rPageNames, List* pCSList ) :
58*cdf0e10cSrcweir 				ModalDialog     ( pWindow, SdResId( DLG_START_PRESENTATION ) ),
59*cdf0e10cSrcweir 				aGrpRange               ( this, SdResId( GRP_RANGE ) ),
60*cdf0e10cSrcweir 				aRbtAll                 ( this, SdResId( RBT_ALL ) ),
61*cdf0e10cSrcweir 				aRbtAtDia               ( this, SdResId( RBT_AT_DIA ) ),
62*cdf0e10cSrcweir 				aRbtCustomshow          ( this, SdResId( RBT_CUSTOMSHOW ) ),
63*cdf0e10cSrcweir 				aLbDias                 ( this, SdResId( LB_DIAS ) ),
64*cdf0e10cSrcweir 				aLbCustomshow           ( this, SdResId( LB_CUSTOMSHOW ) ),
65*cdf0e10cSrcweir 
66*cdf0e10cSrcweir 				aGrpKind				( this, SdResId( GRP_KIND ) ),
67*cdf0e10cSrcweir 				aRbtStandard			( this, SdResId( RBT_STANDARD ) ),
68*cdf0e10cSrcweir 				aRbtWindow				( this, SdResId( RBT_WINDOW ) ),
69*cdf0e10cSrcweir 				aRbtAuto				( this, SdResId( RBT_AUTO ) ),
70*cdf0e10cSrcweir 				aTmfPause				( this, SdResId( TMF_PAUSE ) ),
71*cdf0e10cSrcweir 				aCbxAutoLogo			( this, SdResId( CBX_AUTOLOGO ) ),
72*cdf0e10cSrcweir 
73*cdf0e10cSrcweir 				aGrpOptions             ( this, SdResId( GRP_OPTIONS ) ),
74*cdf0e10cSrcweir 				aCbxManuel              ( this, SdResId( CBX_MANUEL ) ),
75*cdf0e10cSrcweir 				aCbxMousepointer        ( this, SdResId( CBX_MOUSEPOINTER ) ),
76*cdf0e10cSrcweir 				aCbxPen                 ( this, SdResId( CBX_PEN ) ),
77*cdf0e10cSrcweir 				aCbxNavigator           ( this, SdResId( CBX_NAVIGATOR ) ),
78*cdf0e10cSrcweir 				aCbxAnimationAllowed    ( this, SdResId( CBX_ANIMATION_ALLOWED ) ),
79*cdf0e10cSrcweir 				aCbxChangePage          ( this, SdResId( CBX_CHANGE_PAGE ) ),
80*cdf0e10cSrcweir 				aCbxAlwaysOnTop         ( this, SdResId( CBX_ALWAYS_ON_TOP ) ),
81*cdf0e10cSrcweir 
82*cdf0e10cSrcweir 				maGrpMonitor			( this, SdResId( GRP_MONITOR ) ),
83*cdf0e10cSrcweir 				maFtMonitor				( this, SdResId( FT_MONITOR ) ),
84*cdf0e10cSrcweir 				maLBMonitor				( this, SdResId( LB_MONITOR ) ),
85*cdf0e10cSrcweir 
86*cdf0e10cSrcweir 				aBtnOK                  ( this, SdResId( BTN_OK ) ),
87*cdf0e10cSrcweir 				aBtnCancel              ( this, SdResId( BTN_CANCEL ) ),
88*cdf0e10cSrcweir 				aBtnHelp                ( this, SdResId( BTN_HELP ) ),
89*cdf0e10cSrcweir 
90*cdf0e10cSrcweir 				pCustomShowList			( pCSList ),
91*cdf0e10cSrcweir 				rOutAttrs               ( rInAttrs ),
92*cdf0e10cSrcweir 				mnMonitors				( 0 ),
93*cdf0e10cSrcweir 
94*cdf0e10cSrcweir 				msPrimaryMonitor( SdResId(STR_PRIMARY_MONITOR ) ),
95*cdf0e10cSrcweir 				msMonitor( SdResId( STR_MONITOR ) ),
96*cdf0e10cSrcweir 				msAllMonitors( SdResId( STR_ALL_MONITORS ) )
97*cdf0e10cSrcweir {
98*cdf0e10cSrcweir 	FreeResource();
99*cdf0e10cSrcweir 
100*cdf0e10cSrcweir 	Link aLink( LINK( this, SdStartPresentationDlg, ChangeRangeHdl ) );
101*cdf0e10cSrcweir 
102*cdf0e10cSrcweir 	aRbtAll.SetClickHdl( aLink );
103*cdf0e10cSrcweir 	aRbtAtDia.SetClickHdl( aLink );
104*cdf0e10cSrcweir 	aRbtCustomshow.SetClickHdl( aLink );
105*cdf0e10cSrcweir 
106*cdf0e10cSrcweir 	aLink = LINK( this, SdStartPresentationDlg, ClickWindowPresentationHdl );
107*cdf0e10cSrcweir 	aRbtStandard.SetClickHdl( aLink );
108*cdf0e10cSrcweir 	aRbtWindow.SetClickHdl( aLink );
109*cdf0e10cSrcweir 	aRbtAuto.SetClickHdl( aLink );
110*cdf0e10cSrcweir 
111*cdf0e10cSrcweir 	aTmfPause.SetModifyHdl( LINK( this, SdStartPresentationDlg, ChangePauseHdl ) );
112*cdf0e10cSrcweir 	aTmfPause.SetFormat( TIMEF_SEC );
113*cdf0e10cSrcweir 
114*cdf0e10cSrcweir 	aLbDias.SetAccessibleRelationLabeledBy( &aRbtAtDia );
115*cdf0e10cSrcweir 	aLbDias.SetAccessibleName(aRbtAtDia.GetText());
116*cdf0e10cSrcweir 	aLbCustomshow.SetAccessibleRelationLabeledBy( &aRbtCustomshow );
117*cdf0e10cSrcweir 	aTmfPause.SetAccessibleRelationLabeledBy( &aRbtAuto );
118*cdf0e10cSrcweir 	aTmfPause.SetAccessibleName(aRbtAuto.GetText());
119*cdf0e10cSrcweir 
120*cdf0e10cSrcweir 	// Listbox mit Seitennamen fuellen
121*cdf0e10cSrcweir 	rPageNames.First();
122*cdf0e10cSrcweir 	for( sal_uInt16 i = 0;
123*cdf0e10cSrcweir 		 i < rPageNames.Count();
124*cdf0e10cSrcweir 		 i++ )
125*cdf0e10cSrcweir 	{
126*cdf0e10cSrcweir 		aLbDias.InsertEntry( *( String* ) rPageNames.GetCurObject() );
127*cdf0e10cSrcweir 		rPageNames.Next();
128*cdf0e10cSrcweir 	}
129*cdf0e10cSrcweir 
130*cdf0e10cSrcweir 	if( pCustomShowList )
131*cdf0e10cSrcweir 	{
132*cdf0e10cSrcweir 		sal_uInt16 nPosToSelect = (sal_uInt16) pCustomShowList->GetCurPos();
133*cdf0e10cSrcweir 		SdCustomShow* pCustomShow;
134*cdf0e10cSrcweir 		// Listbox mit CustomShows fuellen
135*cdf0e10cSrcweir 		for( pCustomShow = (SdCustomShow*) pCustomShowList->First();
136*cdf0e10cSrcweir 			 pCustomShow != NULL;
137*cdf0e10cSrcweir 			 pCustomShow = (SdCustomShow*) pCustomShowList->Next() )
138*cdf0e10cSrcweir 		{
139*cdf0e10cSrcweir 			aLbCustomshow.InsertEntry( pCustomShow->GetName() );
140*cdf0e10cSrcweir 		}
141*cdf0e10cSrcweir 		aLbCustomshow.SelectEntryPos( nPosToSelect );
142*cdf0e10cSrcweir 		pCustomShowList->Seek( nPosToSelect );
143*cdf0e10cSrcweir 	}
144*cdf0e10cSrcweir 	else
145*cdf0e10cSrcweir 		aRbtCustomshow.Disable();
146*cdf0e10cSrcweir 
147*cdf0e10cSrcweir 	if( ( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_CUSTOMSHOW ) ).GetValue() && pCSList )
148*cdf0e10cSrcweir 		aRbtCustomshow.Check();
149*cdf0e10cSrcweir 	else if( ( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_ALL ) ).GetValue() )
150*cdf0e10cSrcweir 		aRbtAll.Check();
151*cdf0e10cSrcweir 	else
152*cdf0e10cSrcweir 		aRbtAtDia.Check();
153*cdf0e10cSrcweir 
154*cdf0e10cSrcweir 	aLbDias.SelectEntry( ( ( const SfxStringItem& ) rOutAttrs.Get( ATTR_PRESENT_DIANAME ) ).GetValue() );
155*cdf0e10cSrcweir 	aCbxManuel.Check( ( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_MANUEL ) ).GetValue() );
156*cdf0e10cSrcweir 	aCbxMousepointer.Check( ( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_MOUSE ) ).GetValue() );
157*cdf0e10cSrcweir 	aCbxPen.Check( ( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_PEN ) ).GetValue() );
158*cdf0e10cSrcweir 	aCbxNavigator.Check( ( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_NAVIGATOR ) ).GetValue() );
159*cdf0e10cSrcweir 	aCbxAnimationAllowed.Check( ( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_ANIMATION_ALLOWED ) ).GetValue() );
160*cdf0e10cSrcweir 	aCbxChangePage.Check( ( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_CHANGE_PAGE ) ).GetValue() );
161*cdf0e10cSrcweir 	aCbxAlwaysOnTop.Check( ( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_ALWAYS_ON_TOP ) ).GetValue() );
162*cdf0e10cSrcweir 
163*cdf0e10cSrcweir 	const sal_Bool	bEndless = ( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_ENDLESS ) ).GetValue();
164*cdf0e10cSrcweir 	const sal_Bool	bWindow = !( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_FULLSCREEN ) ).GetValue();
165*cdf0e10cSrcweir 	const long	nPause = ( ( const SfxUInt32Item& ) rOutAttrs.Get( ATTR_PRESENT_PAUSE_TIMEOUT ) ).GetValue();
166*cdf0e10cSrcweir 
167*cdf0e10cSrcweir 	aTmfPause.SetTime( Time( 0, 0, nPause ) );
168*cdf0e10cSrcweir 	// set cursor in timefield
169*cdf0e10cSrcweir 	Edit *pEdit = aTmfPause.GetField();
170*cdf0e10cSrcweir 	Selection aSel( pEdit->GetMaxTextLen(), pEdit->GetMaxTextLen() );
171*cdf0e10cSrcweir 	pEdit->SetSelection( aSel );
172*cdf0e10cSrcweir 
173*cdf0e10cSrcweir 	aCbxAutoLogo.Check( ( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_SHOW_PAUSELOGO ) ).GetValue() );
174*cdf0e10cSrcweir 
175*cdf0e10cSrcweir 	if( bWindow )
176*cdf0e10cSrcweir 		aRbtWindow.Check( sal_True );
177*cdf0e10cSrcweir 	else if( bEndless )
178*cdf0e10cSrcweir 		aRbtAuto.Check( sal_True );
179*cdf0e10cSrcweir 	else
180*cdf0e10cSrcweir 		aRbtStandard.Check( sal_True );
181*cdf0e10cSrcweir 
182*cdf0e10cSrcweir 	InitMonitorSettings();
183*cdf0e10cSrcweir 
184*cdf0e10cSrcweir 	ChangeRangeHdl( this );
185*cdf0e10cSrcweir 
186*cdf0e10cSrcweir 	ClickWindowPresentationHdl( NULL );
187*cdf0e10cSrcweir 	ChangePauseHdl( NULL );
188*cdf0e10cSrcweir }
189*cdf0e10cSrcweir 
190*cdf0e10cSrcweir void SdStartPresentationDlg::InitMonitorSettings()
191*cdf0e10cSrcweir {
192*cdf0e10cSrcweir 	try
193*cdf0e10cSrcweir 	{
194*cdf0e10cSrcweir         Reference< XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
195*cdf0e10cSrcweir 		Reference< XIndexAccess > xMultiMon( xFactory->createInstance(OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.DisplayAccess" ) ) ), UNO_QUERY_THROW );
196*cdf0e10cSrcweir 		maGrpMonitor.Show( true );
197*cdf0e10cSrcweir 		maFtMonitor.Show( true );
198*cdf0e10cSrcweir 		maLBMonitor.Show( true );
199*cdf0e10cSrcweir 
200*cdf0e10cSrcweir 		mnMonitors = xMultiMon->getCount();
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir 		if( mnMonitors <= 1 )
203*cdf0e10cSrcweir 		{
204*cdf0e10cSrcweir 			maFtMonitor.Enable( false );
205*cdf0e10cSrcweir 			maLBMonitor.Enable( false );
206*cdf0e10cSrcweir 		}
207*cdf0e10cSrcweir 		else
208*cdf0e10cSrcweir 		{
209*cdf0e10cSrcweir 			sal_Bool bMultiscreen = false;
210*cdf0e10cSrcweir 			sal_Int32 nDefaultDisplay (0);
211*cdf0e10cSrcweir 			Reference< XPropertySet > xMonProps( xMultiMon, UNO_QUERY );
212*cdf0e10cSrcweir 			if( xMonProps.is() ) try
213*cdf0e10cSrcweir 			{
214*cdf0e10cSrcweir 				const OUString sPropName1( RTL_CONSTASCII_USTRINGPARAM( "MultiDisplay" ) );
215*cdf0e10cSrcweir 				xMonProps->getPropertyValue( sPropName1 ) >>= bMultiscreen;
216*cdf0e10cSrcweir 				const OUString sPropName2( RTL_CONSTASCII_USTRINGPARAM( "DefaultDisplay" ) );
217*cdf0e10cSrcweir 				xMonProps->getPropertyValue( sPropName2 ) >>= nDefaultDisplay;
218*cdf0e10cSrcweir 			}
219*cdf0e10cSrcweir 			catch( Exception& )
220*cdf0e10cSrcweir 			{
221*cdf0e10cSrcweir 			}
222*cdf0e10cSrcweir 
223*cdf0e10cSrcweir             sal_Int32 nSelectedIndex (-1);
224*cdf0e10cSrcweir             sal_Int32 nDefaultDisplayIndex (-1);
225*cdf0e10cSrcweir 			const sal_Int32 nDefaultSelectedDisplay (
226*cdf0e10cSrcweir                 ( ( const SfxInt32Item& ) rOutAttrs.Get( ATTR_PRESENT_DISPLAY ) ).GetValue());
227*cdf0e10cSrcweir 			const String sPlaceHolder( RTL_CONSTASCII_USTRINGPARAM( "%1" ) );
228*cdf0e10cSrcweir 			for( sal_Int32 nDisplay = 0; nDisplay < mnMonitors; nDisplay++ )
229*cdf0e10cSrcweir 			{
230*cdf0e10cSrcweir 				String aName( nDisplay == nDefaultDisplay ? msPrimaryMonitor : msMonitor );
231*cdf0e10cSrcweir 				const String aNumber( String::CreateFromInt32( nDisplay + 1 ) );
232*cdf0e10cSrcweir 				aName.SearchAndReplace( sPlaceHolder, aNumber );
233*cdf0e10cSrcweir 				maLBMonitor.InsertEntry( aName );
234*cdf0e10cSrcweir 
235*cdf0e10cSrcweir                 // Store display index together with name.
236*cdf0e10cSrcweir                 const sal_uInt32 nEntryIndex (maLBMonitor.GetEntryCount()-1);
237*cdf0e10cSrcweir                 maLBMonitor.SetEntryData(nEntryIndex, (void*)nDisplay);
238*cdf0e10cSrcweir 
239*cdf0e10cSrcweir                 // Remember the index of the default selection.
240*cdf0e10cSrcweir                 if (nDefaultSelectedDisplay == nDisplay)
241*cdf0e10cSrcweir                     nSelectedIndex = nEntryIndex;
242*cdf0e10cSrcweir 
243*cdf0e10cSrcweir                 // Remember index of the default display.
244*cdf0e10cSrcweir                 if (nDisplay == nDefaultDisplay)
245*cdf0e10cSrcweir                     nDefaultDisplayIndex = nEntryIndex;
246*cdf0e10cSrcweir 			}
247*cdf0e10cSrcweir 
248*cdf0e10cSrcweir 			if( !bMultiscreen )
249*cdf0e10cSrcweir             {
250*cdf0e10cSrcweir 				maLBMonitor.InsertEntry( msAllMonitors );
251*cdf0e10cSrcweir                 const sal_uInt32 nEntryIndex (maLBMonitor.GetEntryCount()-1);
252*cdf0e10cSrcweir 				maLBMonitor.SetEntryData(nEntryIndex, (void*)-1);
253*cdf0e10cSrcweir                 if (nDefaultSelectedDisplay == -1)
254*cdf0e10cSrcweir                     nSelectedIndex = nEntryIndex;
255*cdf0e10cSrcweir             }
256*cdf0e10cSrcweir 
257*cdf0e10cSrcweir 			if (nSelectedIndex < 0)
258*cdf0e10cSrcweir                 if (nDefaultSelectedDisplay < 0)
259*cdf0e10cSrcweir                     nSelectedIndex = 0;
260*cdf0e10cSrcweir                 else
261*cdf0e10cSrcweir                     nSelectedIndex = nDefaultDisplayIndex;
262*cdf0e10cSrcweir 
263*cdf0e10cSrcweir 			maLBMonitor.SelectEntryPos((sal_uInt16)nSelectedIndex);
264*cdf0e10cSrcweir 		}
265*cdf0e10cSrcweir 	}
266*cdf0e10cSrcweir 	catch( Exception& )
267*cdf0e10cSrcweir 	{
268*cdf0e10cSrcweir 	}
269*cdf0e10cSrcweir }
270*cdf0e10cSrcweir 
271*cdf0e10cSrcweir /*************************************************************************
272*cdf0e10cSrcweir |* Setzt die ausgewaehlten Attribute des Dialogs
273*cdf0e10cSrcweir \************************************************************************/
274*cdf0e10cSrcweir void SdStartPresentationDlg::GetAttr( SfxItemSet& rAttr )
275*cdf0e10cSrcweir {
276*cdf0e10cSrcweir 	rAttr.Put( SfxBoolItem ( ATTR_PRESENT_ALL, aRbtAll.IsChecked() ) );
277*cdf0e10cSrcweir 	rAttr.Put( SfxBoolItem ( ATTR_PRESENT_CUSTOMSHOW, aRbtCustomshow.IsChecked() ) );
278*cdf0e10cSrcweir 	rAttr.Put( SfxStringItem ( ATTR_PRESENT_DIANAME, aLbDias.GetSelectEntry() ) );
279*cdf0e10cSrcweir 	rAttr.Put( SfxBoolItem ( ATTR_PRESENT_MANUEL, aCbxManuel.IsChecked() ) );
280*cdf0e10cSrcweir 	rAttr.Put( SfxBoolItem ( ATTR_PRESENT_MOUSE, aCbxMousepointer.IsChecked() ) );
281*cdf0e10cSrcweir 	rAttr.Put( SfxBoolItem ( ATTR_PRESENT_PEN, aCbxPen.IsChecked() ) );
282*cdf0e10cSrcweir 	rAttr.Put( SfxBoolItem ( ATTR_PRESENT_NAVIGATOR, aCbxNavigator.IsChecked() ) );
283*cdf0e10cSrcweir 	rAttr.Put( SfxBoolItem ( ATTR_PRESENT_ANIMATION_ALLOWED, aCbxAnimationAllowed.IsChecked() ) );
284*cdf0e10cSrcweir 	rAttr.Put( SfxBoolItem ( ATTR_PRESENT_CHANGE_PAGE, aCbxChangePage.IsChecked() ) );
285*cdf0e10cSrcweir 	rAttr.Put( SfxBoolItem ( ATTR_PRESENT_ALWAYS_ON_TOP, aCbxAlwaysOnTop.IsChecked() ) );
286*cdf0e10cSrcweir 	rAttr.Put( SfxBoolItem ( ATTR_PRESENT_FULLSCREEN, !aRbtWindow.IsChecked() ) );
287*cdf0e10cSrcweir 	rAttr.Put( SfxBoolItem ( ATTR_PRESENT_ENDLESS, aRbtAuto.IsChecked() ) );
288*cdf0e10cSrcweir 	rAttr.Put( SfxUInt32Item ( ATTR_PRESENT_PAUSE_TIMEOUT, aTmfPause.GetTime().GetMSFromTime() / 1000 ) );
289*cdf0e10cSrcweir 	rAttr.Put( SfxBoolItem ( ATTR_PRESENT_SHOW_PAUSELOGO, aCbxAutoLogo.IsChecked() ) );
290*cdf0e10cSrcweir 
291*cdf0e10cSrcweir 	sal_uInt16 nPos = maLBMonitor.GetSelectEntryPos();
292*cdf0e10cSrcweir 	if( nPos != LISTBOX_ENTRY_NOTFOUND )
293*cdf0e10cSrcweir         rAttr.Put( SfxInt32Item ( ATTR_PRESENT_DISPLAY, (sal_Int32)(sal_IntPtr)maLBMonitor.GetEntryData(nPos)) );
294*cdf0e10cSrcweir 
295*cdf0e10cSrcweir 	nPos = aLbCustomshow.GetSelectEntryPos();
296*cdf0e10cSrcweir 	if( nPos != LISTBOX_ENTRY_NOTFOUND )
297*cdf0e10cSrcweir 		pCustomShowList->Seek( nPos );
298*cdf0e10cSrcweir }
299*cdf0e10cSrcweir 
300*cdf0e10cSrcweir /*************************************************************************
301*cdf0e10cSrcweir |*      Handler: Enabled/Disabled Listbox "Dias"
302*cdf0e10cSrcweir \************************************************************************/
303*cdf0e10cSrcweir IMPL_LINK( SdStartPresentationDlg, ChangeRangeHdl, void *, EMPTYARG )
304*cdf0e10cSrcweir {
305*cdf0e10cSrcweir 	aLbDias.Enable( aRbtAtDia.IsChecked() );
306*cdf0e10cSrcweir 	aLbCustomshow.Enable( aRbtCustomshow.IsChecked() );
307*cdf0e10cSrcweir 
308*cdf0e10cSrcweir 	return( 0L );
309*cdf0e10cSrcweir }
310*cdf0e10cSrcweir 
311*cdf0e10cSrcweir /*************************************************************************
312*cdf0e10cSrcweir |*      Handler: Enabled/Disabled Checkbox "AlwaysOnTop"
313*cdf0e10cSrcweir \************************************************************************/
314*cdf0e10cSrcweir IMPL_LINK( SdStartPresentationDlg, ClickWindowPresentationHdl, void *, EMPTYARG )
315*cdf0e10cSrcweir {
316*cdf0e10cSrcweir 	const bool bAuto = aRbtAuto.IsChecked();
317*cdf0e10cSrcweir 	const bool bWindow = aRbtWindow.IsChecked();
318*cdf0e10cSrcweir 
319*cdf0e10cSrcweir 	// aFtPause.Enable( bAuto );
320*cdf0e10cSrcweir 	aTmfPause.Enable( bAuto );
321*cdf0e10cSrcweir 	aCbxAutoLogo.Enable( bAuto && ( aTmfPause.GetTime().GetMSFromTime() > 0 ) );
322*cdf0e10cSrcweir 
323*cdf0e10cSrcweir 	const bool bDisplay = !bWindow && ( mnMonitors > 1 );
324*cdf0e10cSrcweir 	maFtMonitor.Enable( bDisplay );
325*cdf0e10cSrcweir 	maLBMonitor.Enable( bDisplay );
326*cdf0e10cSrcweir 
327*cdf0e10cSrcweir 	if( bWindow )
328*cdf0e10cSrcweir 	{
329*cdf0e10cSrcweir 		aCbxAlwaysOnTop.Enable( sal_False );
330*cdf0e10cSrcweir 		aCbxAlwaysOnTop.Check( sal_False );
331*cdf0e10cSrcweir 	}
332*cdf0e10cSrcweir 	else
333*cdf0e10cSrcweir 		aCbxAlwaysOnTop.Enable();
334*cdf0e10cSrcweir 
335*cdf0e10cSrcweir 	return( 0L );
336*cdf0e10cSrcweir }
337*cdf0e10cSrcweir 
338*cdf0e10cSrcweir /*************************************************************************
339*cdf0e10cSrcweir |*      Handler: Enabled/Disabled Checkbox "AlwaysOnTop"
340*cdf0e10cSrcweir \************************************************************************/
341*cdf0e10cSrcweir IMPL_LINK( SdStartPresentationDlg, ChangePauseHdl, void *, EMPTYARG )
342*cdf0e10cSrcweir {
343*cdf0e10cSrcweir 	aCbxAutoLogo.Enable( aRbtAuto.IsChecked() && ( aTmfPause.GetTime().GetMSFromTime() > 0 ) );
344*cdf0e10cSrcweir 	return( 0L );
345*cdf0e10cSrcweir }
346*cdf0e10cSrcweir 
347*cdf0e10cSrcweir 
348