Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 :
21 : #include "wizardshell.hxx"
22 :
23 : #include <com/sun/star/lang/XInitialization.hpp>
24 : #include <com/sun/star/beans/XPropertySetInfo.hpp>
25 : #include <com/sun/star/uno/XComponentContext.hpp>
26 : #include <com/sun/star/ucb/AlreadyInitializedException.hpp>
27 : #include <com/sun/star/ui/dialogs/XWizard.hpp>
28 : #include <com/sun/star/ui/dialogs/XWizardController.hpp>
29 : #include <com/sun/star/ui/dialogs/WizardButton.hpp>
30 :
31 : #include <cppuhelper/implbase1.hxx>
32 : #include <svtools/genericunodialog.hxx>
33 : #include <tools/diagnose_ex.h>
34 : #include <rtl/ref.hxx>
35 : #include <rtl/strbuf.hxx>
36 : #include <osl/mutex.hxx>
37 : #include <vcl/svapp.hxx>
38 : #include <tools/urlobj.hxx>
39 :
40 : using namespace ::com::sun::star;
41 : using namespace ::svt::uno;
42 :
43 : namespace {
44 :
45 : using ::com::sun::star::uno::Reference;
46 : using ::com::sun::star::uno::XInterface;
47 : using ::com::sun::star::uno::UNO_QUERY;
48 : using ::com::sun::star::uno::UNO_QUERY_THROW;
49 : using ::com::sun::star::uno::UNO_SET_THROW;
50 : using ::com::sun::star::uno::Exception;
51 : using ::com::sun::star::uno::RuntimeException;
52 : using ::com::sun::star::uno::Any;
53 : using ::com::sun::star::uno::makeAny;
54 : using ::com::sun::star::uno::Sequence;
55 : using ::com::sun::star::uno::Type;
56 : using ::com::sun::star::lang::XServiceInfo;
57 : using ::com::sun::star::ui::dialogs::XWizard;
58 : using ::com::sun::star::lang::XInitialization;
59 : using ::com::sun::star::beans::XPropertySetInfo;
60 : using ::com::sun::star::uno::XComponentContext;
61 : using ::com::sun::star::beans::Property;
62 : using ::com::sun::star::lang::IllegalArgumentException;
63 : using ::com::sun::star::ucb::AlreadyInitializedException;
64 : using ::com::sun::star::ui::dialogs::XWizardController;
65 : using ::com::sun::star::ui::dialogs::XWizardPage;
66 : using ::com::sun::star::container::NoSuchElementException;
67 : using ::com::sun::star::util::InvalidStateException;
68 : using ::com::sun::star::awt::XWindow;
69 :
70 : namespace WizardButton = ::com::sun::star::ui::dialogs::WizardButton;
71 :
72 :
73 : namespace
74 : {
75 0 : WizardButtonFlags lcl_convertWizardButtonToWZB( const sal_Int16 i_nWizardButton )
76 : {
77 0 : switch ( i_nWizardButton )
78 : {
79 0 : case WizardButton::NONE: return WizardButtonFlags::NONE;
80 0 : case WizardButton::NEXT: return WizardButtonFlags::NEXT;
81 0 : case WizardButton::PREVIOUS: return WizardButtonFlags::PREVIOUS;
82 0 : case WizardButton::FINISH: return WizardButtonFlags::FINISH;
83 0 : case WizardButton::CANCEL: return WizardButtonFlags::CANCEL;
84 0 : case WizardButton::HELP: return WizardButtonFlags::HELP;
85 : }
86 : OSL_FAIL( "lcl_convertWizardButtonToWZB: invalid WizardButton constant!" );
87 0 : return WizardButtonFlags::NONE;
88 : }
89 : }
90 :
91 : typedef ::cppu::ImplInheritanceHelper1 < ::svt::OGenericUnoDialog
92 : , ui::dialogs::XWizard
93 : > Wizard_Base;
94 : class Wizard;
95 : typedef ::comphelper::OPropertyArrayUsageHelper< Wizard > Wizard_PBase;
96 : class Wizard : public Wizard_Base
97 : , public Wizard_PBase
98 : {
99 : public:
100 : explicit Wizard( const uno::Reference< uno::XComponentContext >& i_rContext );
101 :
102 : // lang::XServiceInfo
103 : virtual OUString SAL_CALL getImplementationName() throw(uno::RuntimeException, std::exception) SAL_OVERRIDE;
104 : virtual uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(uno::RuntimeException, std::exception) SAL_OVERRIDE;
105 :
106 : // beans::XPropertySet
107 : virtual uno::Reference< beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw(uno::RuntimeException, std::exception) SAL_OVERRIDE;
108 : virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() SAL_OVERRIDE;
109 :
110 : // OPropertyArrayUsageHelper
111 : virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const SAL_OVERRIDE;
112 :
113 : // ui::dialogs::XWizard
114 : virtual OUString SAL_CALL getHelpURL() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE;
115 : virtual void SAL_CALL setHelpURL( const OUString& _helpurl ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE;
116 : virtual uno::Reference< awt::XWindow > SAL_CALL getDialogWindow() throw (uno::RuntimeException, std::exception) SAL_OVERRIDE;
117 : virtual uno::Reference< ui::dialogs::XWizardPage > SAL_CALL getCurrentPage( ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE;
118 : virtual void SAL_CALL enableButton( ::sal_Int16 WizardButton, sal_Bool Enable ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE;
119 : virtual void SAL_CALL setDefaultButton( ::sal_Int16 WizardButton ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE;
120 : virtual sal_Bool SAL_CALL travelNext( ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE;
121 : virtual sal_Bool SAL_CALL travelPrevious( ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE;
122 : virtual void SAL_CALL enablePage( ::sal_Int16 PageID, sal_Bool Enable ) throw (container::NoSuchElementException, util::InvalidStateException, uno::RuntimeException, std::exception) SAL_OVERRIDE;
123 : virtual void SAL_CALL updateTravelUI( ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE;
124 : virtual sal_Bool SAL_CALL advanceTo( ::sal_Int16 PageId ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE;
125 : virtual sal_Bool SAL_CALL goBackTo( ::sal_Int16 PageId ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE;
126 : virtual void SAL_CALL activatePath( ::sal_Int16 PathIndex, sal_Bool Final ) throw (container::NoSuchElementException, util::InvalidStateException, uno::RuntimeException, std::exception) SAL_OVERRIDE;
127 :
128 : // ui::dialogs::XExecutableDialog
129 : virtual void SAL_CALL setTitle( const OUString& aTitle ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE;
130 : virtual ::sal_Int16 SAL_CALL execute( ) throw (uno::RuntimeException, std::exception) SAL_OVERRIDE;
131 :
132 : // lang::XInitialization
133 : virtual void SAL_CALL initialize( const uno::Sequence< uno::Any >& aArguments ) throw (uno::Exception, uno::RuntimeException, std::exception) SAL_OVERRIDE;
134 :
135 : protected:
136 : virtual ~Wizard();
137 :
138 : protected:
139 : virtual VclPtr<Dialog> createDialog( vcl::Window* _pParent ) SAL_OVERRIDE;
140 : virtual void destroyDialog() SAL_OVERRIDE;
141 :
142 : private:
143 : uno::Sequence< uno::Sequence< sal_Int16 > > m_aWizardSteps;
144 : uno::Reference< ui::dialogs::XWizardController > m_xController;
145 : OUString m_sHelpURL;
146 : };
147 :
148 0 : Wizard::Wizard( const Reference< XComponentContext >& _rxContext )
149 0 : :Wizard_Base( _rxContext )
150 : {
151 0 : }
152 :
153 :
154 0 : Wizard::~Wizard()
155 : {
156 : // we do this here cause the base class' call to destroyDialog won't reach us anymore : we're within an dtor,
157 : // so this virtual-method-call the base class does does not work, we're already dead then ...
158 0 : if ( m_pDialog )
159 : {
160 0 : ::osl::MutexGuard aGuard( m_aMutex );
161 0 : if ( m_pDialog )
162 0 : destroyDialog();
163 : }
164 0 : }
165 :
166 :
167 : namespace
168 : {
169 0 : static void lcl_checkPaths( const Sequence< Sequence< sal_Int16 > >& i_rPaths, const Reference< XInterface >& i_rContext )
170 : {
171 : // need at least one path
172 0 : if ( i_rPaths.getLength() == 0 )
173 0 : throw IllegalArgumentException( OUString(), i_rContext, 2 );
174 :
175 : // each path must be of length 1, at least
176 0 : for ( sal_Int32 i = 0; i < i_rPaths.getLength(); ++i )
177 : {
178 0 : if ( i_rPaths[i].getLength() == 0 )
179 0 : throw IllegalArgumentException( OUString(), i_rContext, 2 );
180 :
181 : // page IDs must be in ascending order
182 0 : sal_Int16 nPreviousPageID = i_rPaths[i][0];
183 0 : for ( sal_Int32 j=1; j<i_rPaths[i].getLength(); ++j )
184 : {
185 0 : if ( i_rPaths[i][j] <= nPreviousPageID )
186 : {
187 0 : OStringBuffer message;
188 0 : message.append( "Path " );
189 0 : message.append( i );
190 0 : message.append( ": invalid page ID sequence - each page ID must be greater than the previous one." );
191 : throw IllegalArgumentException(
192 : OStringToOUString( message.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ),
193 0 : i_rContext, 2 );
194 : }
195 0 : nPreviousPageID = i_rPaths[i][j];
196 : }
197 : }
198 :
199 : // if we have one path, that's okay
200 0 : if ( i_rPaths.getLength() == 1 )
201 0 : return;
202 :
203 : // if we have multiple paths, they must start with the same page id
204 0 : const sal_Int16 nFirstPageId = i_rPaths[0][0];
205 0 : for ( sal_Int32 i = 0; i < i_rPaths.getLength(); ++i )
206 : {
207 0 : if ( i_rPaths[i][0] != nFirstPageId )
208 : throw IllegalArgumentException(
209 : "All paths must start with the same page id.",
210 0 : i_rContext, 2 );
211 : }
212 : }
213 : }
214 :
215 :
216 0 : void SAL_CALL Wizard::initialize( const Sequence< Any >& i_Arguments ) throw (Exception, RuntimeException, std::exception)
217 : {
218 0 : ::osl::MutexGuard aGuard( m_aMutex );
219 0 : if ( m_bInitialized )
220 0 : throw AlreadyInitializedException( OUString(), *this );
221 :
222 0 : if ( i_Arguments.getLength() != 2 )
223 0 : throw IllegalArgumentException( OUString(), *this, -1 );
224 :
225 : // the second argument must be a XWizardController, for each constructor
226 0 : m_xController.set( i_Arguments[1], UNO_QUERY );
227 0 : if ( !m_xController.is() )
228 0 : throw IllegalArgumentException( OUString(), *this, 2 );
229 :
230 : // the first arg is either a single path (short[]), or multiple paths (short[][])
231 0 : Sequence< sal_Int16 > aSinglePath;
232 0 : i_Arguments[0] >>= aSinglePath;
233 0 : Sequence< Sequence< sal_Int16 > > aMultiplePaths;
234 0 : i_Arguments[0] >>= aMultiplePaths;
235 :
236 0 : if ( !aMultiplePaths.getLength() )
237 : {
238 0 : aMultiplePaths.realloc(1);
239 0 : aMultiplePaths[0] = aSinglePath;
240 : }
241 0 : lcl_checkPaths( aMultiplePaths, *this );
242 : // if we survived this, the paths are valid, and we're done here ...
243 0 : m_aWizardSteps = aMultiplePaths;
244 :
245 0 : m_bInitialized = true;
246 0 : }
247 :
248 0 : static OString lcl_getHelpId( const OUString& _rHelpURL )
249 : {
250 0 : INetURLObject aHID( _rHelpURL );
251 0 : if ( aHID.GetProtocol() == INetProtocol::Hid )
252 0 : return OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 );
253 : else
254 0 : return OUStringToOString( _rHelpURL, RTL_TEXTENCODING_UTF8 );
255 : }
256 :
257 :
258 0 : static OUString lcl_getHelpURL( const OString& sHelpId )
259 : {
260 0 : OUStringBuffer aBuffer;
261 : OUString aTmp(
262 0 : OStringToOUString( sHelpId, RTL_TEXTENCODING_UTF8 ) );
263 0 : INetURLObject aHID( aTmp );
264 0 : if ( aHID.GetProtocol() == INetProtocol::NotValid )
265 0 : aBuffer.appendAscii( INET_HID_SCHEME );
266 0 : aBuffer.append( aTmp.getStr() );
267 0 : return aBuffer.makeStringAndClear();
268 : }
269 :
270 :
271 0 : VclPtr<Dialog> Wizard::createDialog( vcl::Window* i_pParent )
272 : {
273 0 : VclPtrInstance<WizardShell> pDialog( i_pParent, m_xController, m_aWizardSteps );
274 0 : pDialog->SetHelpId( lcl_getHelpId( m_sHelpURL ) );
275 0 : pDialog->setTitleBase( m_sTitle );
276 0 : return pDialog.get();
277 : }
278 :
279 :
280 0 : void Wizard::destroyDialog()
281 : {
282 0 : if ( m_pDialog )
283 0 : m_sHelpURL = lcl_getHelpURL( m_pDialog->GetHelpId() );
284 :
285 0 : Wizard_Base::destroyDialog();
286 0 : }
287 :
288 :
289 0 : OUString SAL_CALL Wizard::getImplementationName() throw(RuntimeException, std::exception)
290 : {
291 0 : return OUString("com.sun.star.comp.svtools.uno.Wizard");
292 : }
293 :
294 :
295 0 : Sequence< OUString > SAL_CALL Wizard::getSupportedServiceNames() throw(RuntimeException, std::exception)
296 : {
297 0 : Sequence< OUString > aServices(1);
298 0 : aServices[0] = "com.sun.star.ui.dialogs.Wizard";
299 0 : return aServices;
300 : }
301 :
302 :
303 0 : Reference< XPropertySetInfo > SAL_CALL Wizard::getPropertySetInfo() throw(RuntimeException, std::exception)
304 : {
305 0 : return createPropertySetInfo( getInfoHelper() );
306 : }
307 :
308 :
309 0 : ::cppu::IPropertyArrayHelper& SAL_CALL Wizard::getInfoHelper()
310 : {
311 0 : return *getArrayHelper();
312 : }
313 :
314 :
315 0 : ::cppu::IPropertyArrayHelper* Wizard::createArrayHelper( ) const
316 : {
317 0 : Sequence< Property > aProps;
318 0 : describeProperties( aProps );
319 0 : return new ::cppu::OPropertyArrayHelper( aProps );
320 : }
321 :
322 :
323 0 : OUString SAL_CALL Wizard::getHelpURL() throw (RuntimeException, std::exception)
324 : {
325 0 : SolarMutexGuard aSolarGuard;
326 0 : ::osl::MutexGuard aGuard( m_aMutex );
327 :
328 0 : if ( !m_pDialog )
329 0 : return m_sHelpURL;
330 :
331 0 : return lcl_getHelpURL( m_pDialog->GetHelpId() );
332 : }
333 :
334 :
335 0 : void SAL_CALL Wizard::setHelpURL( const OUString& i_HelpURL ) throw (RuntimeException, std::exception)
336 : {
337 0 : SolarMutexGuard aSolarGuard;
338 0 : ::osl::MutexGuard aGuard( m_aMutex );
339 :
340 0 : if ( !m_pDialog )
341 0 : m_sHelpURL = i_HelpURL;
342 : else
343 0 : m_pDialog->SetHelpId( lcl_getHelpId( i_HelpURL ) );
344 0 : }
345 :
346 :
347 0 : Reference< XWindow > SAL_CALL Wizard::getDialogWindow() throw (RuntimeException, std::exception)
348 : {
349 0 : SolarMutexGuard aSolarGuard;
350 0 : ::osl::MutexGuard aGuard( m_aMutex );
351 :
352 0 : ENSURE_OR_RETURN( m_pDialog, "Wizard::getDialogWindow: illegal call (execution did not start, yet)!", NULL );
353 0 : return Reference< XWindow >( m_pDialog->GetComponentInterface(), UNO_QUERY );
354 : }
355 :
356 :
357 0 : void SAL_CALL Wizard::enableButton( ::sal_Int16 i_WizardButton, sal_Bool i_Enable ) throw (RuntimeException, std::exception)
358 : {
359 0 : SolarMutexGuard aSolarGuard;
360 0 : ::osl::MutexGuard aGuard( m_aMutex );
361 :
362 0 : WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
363 0 : ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::enableButtons: invalid dialog implementation!" );
364 :
365 0 : pWizardImpl->enableButtons( lcl_convertWizardButtonToWZB( i_WizardButton ), i_Enable );
366 : }
367 :
368 :
369 0 : void SAL_CALL Wizard::setDefaultButton( ::sal_Int16 i_WizardButton ) throw (RuntimeException, std::exception)
370 : {
371 0 : SolarMutexGuard aSolarGuard;
372 0 : ::osl::MutexGuard aGuard( m_aMutex );
373 :
374 0 : WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
375 0 : ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::setDefaultButton: invalid dialog implementation!" );
376 :
377 0 : pWizardImpl->defaultButton( lcl_convertWizardButtonToWZB( i_WizardButton ) );
378 : }
379 :
380 :
381 0 : sal_Bool SAL_CALL Wizard::travelNext( ) throw (RuntimeException, std::exception)
382 : {
383 0 : SolarMutexGuard aSolarGuard;
384 0 : ::osl::MutexGuard aGuard( m_aMutex );
385 :
386 0 : WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
387 0 : ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::travelNext: invalid dialog implementation!" );
388 :
389 0 : return pWizardImpl->travelNext();
390 : }
391 :
392 :
393 0 : sal_Bool SAL_CALL Wizard::travelPrevious( ) throw (RuntimeException, std::exception)
394 : {
395 0 : SolarMutexGuard aSolarGuard;
396 0 : ::osl::MutexGuard aGuard( m_aMutex );
397 :
398 0 : WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
399 0 : ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::travelPrevious: invalid dialog implementation!" );
400 :
401 0 : return pWizardImpl->travelPrevious();
402 : }
403 :
404 :
405 0 : void SAL_CALL Wizard::enablePage( ::sal_Int16 i_PageID, sal_Bool i_Enable ) throw (NoSuchElementException, InvalidStateException, RuntimeException, std::exception)
406 : {
407 0 : SolarMutexGuard aSolarGuard;
408 0 : ::osl::MutexGuard aGuard( m_aMutex );
409 :
410 0 : WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
411 0 : ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::enablePage: invalid dialog implementation!" );
412 :
413 0 : if ( !pWizardImpl->knowsPage( i_PageID ) )
414 0 : throw NoSuchElementException( OUString(), *this );
415 :
416 0 : if ( i_PageID == pWizardImpl->getCurrentPage() )
417 0 : throw InvalidStateException( OUString(), *this );
418 :
419 0 : pWizardImpl->enablePage( i_PageID, i_Enable );
420 : }
421 :
422 :
423 0 : void SAL_CALL Wizard::updateTravelUI( ) throw (RuntimeException, std::exception)
424 : {
425 0 : SolarMutexGuard aSolarGuard;
426 0 : ::osl::MutexGuard aGuard( m_aMutex );
427 :
428 0 : WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
429 0 : ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::updateTravelUI: invalid dialog implementation!" );
430 :
431 0 : pWizardImpl->updateTravelUI();
432 : }
433 :
434 :
435 0 : sal_Bool SAL_CALL Wizard::advanceTo( ::sal_Int16 i_PageId ) throw (RuntimeException, std::exception)
436 : {
437 0 : SolarMutexGuard aSolarGuard;
438 0 : ::osl::MutexGuard aGuard( m_aMutex );
439 :
440 0 : WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
441 0 : ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::advanceTo: invalid dialog implementation!" );
442 :
443 0 : return pWizardImpl->advanceTo( i_PageId );
444 : }
445 :
446 :
447 0 : sal_Bool SAL_CALL Wizard::goBackTo( ::sal_Int16 i_PageId ) throw (RuntimeException, std::exception)
448 : {
449 0 : SolarMutexGuard aSolarGuard;
450 0 : ::osl::MutexGuard aGuard( m_aMutex );
451 :
452 0 : WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
453 0 : ENSURE_OR_RETURN_FALSE( pWizardImpl, "Wizard::goBackTo: invalid dialog implementation!" );
454 :
455 0 : return pWizardImpl->goBackTo( i_PageId );
456 : }
457 :
458 :
459 0 : Reference< XWizardPage > SAL_CALL Wizard::getCurrentPage( ) throw (RuntimeException, std::exception)
460 : {
461 0 : SolarMutexGuard aSolarGuard;
462 0 : ::osl::MutexGuard aGuard( m_aMutex );
463 :
464 0 : WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
465 0 : ENSURE_OR_RETURN( pWizardImpl, "Wizard::getCurrentPage: invalid dialog implementation!", Reference< XWizardPage >() );
466 :
467 0 : return pWizardImpl->getCurrentWizardPage();
468 : }
469 :
470 :
471 0 : void SAL_CALL Wizard::activatePath( ::sal_Int16 i_PathIndex, sal_Bool i_Final ) throw (NoSuchElementException, InvalidStateException, RuntimeException, std::exception)
472 : {
473 0 : SolarMutexGuard aSolarGuard;
474 0 : ::osl::MutexGuard aGuard( m_aMutex );
475 :
476 0 : if ( ( i_PathIndex < 0 ) || ( i_PathIndex >= m_aWizardSteps.getLength() ) )
477 0 : throw NoSuchElementException( OUString(), *this );
478 :
479 0 : WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog.get() );
480 0 : ENSURE_OR_RETURN_VOID( pWizardImpl, "Wizard::activatePath: invalid dialog implementation!" );
481 :
482 0 : pWizardImpl->activatePath( i_PathIndex, i_Final );
483 : }
484 :
485 :
486 0 : void SAL_CALL Wizard::setTitle( const OUString& i_Title ) throw (RuntimeException, std::exception)
487 : {
488 : // simply disambiguate
489 0 : Wizard_Base::OGenericUnoDialog::setTitle( i_Title );
490 0 : }
491 :
492 :
493 0 : ::sal_Int16 SAL_CALL Wizard::execute( ) throw (RuntimeException, std::exception)
494 : {
495 0 : return Wizard_Base::OGenericUnoDialog::execute();
496 : }
497 :
498 : }
499 :
500 : extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
501 0 : com_sun_star_comp_svtools_uno_Wizard_get_implementation(
502 : css::uno::XComponentContext *context,
503 : css::uno::Sequence<css::uno::Any> const &)
504 : {
505 0 : return cppu::acquire(new Wizard(context));
506 : }
507 :
508 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|