1 /************************************************************************* 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * 4 * Copyright 2000, 2010 Oracle and/or its affiliates. 5 * 6 * OpenOffice.org - a multi-platform office productivity suite 7 * 8 * This file is part of OpenOffice.org. 9 * 10 * OpenOffice.org is free software: you can redistribute it and/or modify 11 * it under the terms of the GNU Lesser General Public License version 3 12 * only, as published by the Free Software Foundation. 13 * 14 * OpenOffice.org is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU Lesser General Public License version 3 for more details 18 * (a copy is included in the LICENSE file that accompanied this code). 19 * 20 * You should have received a copy of the GNU Lesser General Public License 21 * version 3 along with OpenOffice.org. If not, see 22 * <http://www.openoffice.org/license.html> 23 * for a copy of the LGPLv3 License. 24 * 25 ************************************************************************/ 26 27 #ifndef SVT_UNO_WIZARD_HXX 28 #define SVT_UNO_WIZARD_HXX 29 30 #include "svtools/genericunodialog.hxx" 31 32 /** === begin UNO includes === **/ 33 #include <com/sun/star/ui/dialogs/XWizard.hpp> 34 #include <com/sun/star/uno/XComponentContext.hpp> 35 #include <com/sun/star/ui/dialogs/XWizardController.hpp> 36 /** === end UNO includes === **/ 37 38 #include <cppuhelper/implbase1.hxx> 39 #include <comphelper/componentcontext.hxx> 40 41 //...................................................................................................................... 42 namespace svt { namespace uno 43 { 44 //...................................................................................................................... 45 46 //================================================================================================================== 47 //= Wizard - declaration 48 //================================================================================================================== 49 typedef ::cppu::ImplInheritanceHelper1 < ::svt::OGenericUnoDialog 50 , ::com::sun::star::ui::dialogs::XWizard 51 > Wizard_Base; 52 class Wizard; 53 typedef ::comphelper::OPropertyArrayUsageHelper< Wizard > Wizard_PBase; 54 class Wizard : public Wizard_Base 55 , public Wizard_PBase 56 { 57 public: 58 Wizard( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext ); 59 60 // ::com::sun::star::lang::XServiceInfo - static version 61 static ::rtl::OUString SAL_CALL getImplementationName_static() throw(::com::sun::star::uno::RuntimeException); 62 static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static() throw(::com::sun::star::uno::RuntimeException); 63 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext ); 64 65 protected: 66 // ::com::sun::star::lang::XServiceInfo 67 virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); 68 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); 69 70 // ::com::sun::star::beans::XPropertySet 71 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException); 72 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); 73 74 // OPropertyArrayUsageHelper 75 virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; 76 77 // ::com::sun::star::ui::dialogs::XWizard 78 virtual ::rtl::OUString SAL_CALL getHelpURL() throw (::com::sun::star::uno::RuntimeException); 79 virtual void SAL_CALL setHelpURL( const ::rtl::OUString& _helpurl ) throw (::com::sun::star::uno::RuntimeException); 80 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getDialogWindow() throw (::com::sun::star::uno::RuntimeException); 81 virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardPage > SAL_CALL getCurrentPage( ) throw (::com::sun::star::uno::RuntimeException); 82 virtual void SAL_CALL enableButton( ::sal_Int16 WizardButton, ::sal_Bool Enable ) throw (::com::sun::star::uno::RuntimeException); 83 virtual void SAL_CALL setDefaultButton( ::sal_Int16 WizardButton ) throw (::com::sun::star::uno::RuntimeException); 84 virtual ::sal_Bool SAL_CALL travelNext( ) throw (::com::sun::star::uno::RuntimeException); 85 virtual ::sal_Bool SAL_CALL travelPrevious( ) throw (::com::sun::star::uno::RuntimeException); 86 virtual void SAL_CALL enablePage( ::sal_Int16 PageID, ::sal_Bool Enable ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::util::InvalidStateException, ::com::sun::star::uno::RuntimeException); 87 virtual void SAL_CALL updateTravelUI( ) throw (::com::sun::star::uno::RuntimeException); 88 virtual ::sal_Bool SAL_CALL advanceTo( ::sal_Int16 PageId ) throw (::com::sun::star::uno::RuntimeException); 89 virtual ::sal_Bool SAL_CALL goBackTo( ::sal_Int16 PageId ) throw (::com::sun::star::uno::RuntimeException); 90 virtual void SAL_CALL activatePath( ::sal_Int16 PathIndex, ::sal_Bool Final ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::util::InvalidStateException, ::com::sun::star::uno::RuntimeException); 91 92 // ::com::sun::star::ui::dialogs::XExecutableDialog 93 virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) throw (::com::sun::star::uno::RuntimeException); 94 virtual ::sal_Int16 SAL_CALL execute( ) throw (::com::sun::star::uno::RuntimeException); 95 96 // ::com::sun::star::lang::XInitialization 97 virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); 98 99 protected: 100 ~Wizard(); 101 102 protected: 103 virtual Dialog* createDialog( Window* _pParent ); 104 virtual void destroyDialog(); 105 106 private: 107 ::comphelper::ComponentContext m_aContext; 108 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< sal_Int16 > > m_aWizardSteps; 109 ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XWizardController > m_xController; 110 ::rtl::OUString m_sHelpURL; 111 }; 112 113 //...................................................................................................................... 114 } } // namespace svt::uno 115 //...................................................................................................................... 116 117 #endif // SVT_UNO_WIZARD_HXX 118