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