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