1*b1cdbd2cSJim Jagielski /************************************************************** 2*b1cdbd2cSJim Jagielski * 3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one 4*b1cdbd2cSJim Jagielski * or more contributor license agreements. See the NOTICE file 5*b1cdbd2cSJim Jagielski * distributed with this work for additional information 6*b1cdbd2cSJim Jagielski * regarding copyright ownership. The ASF licenses this file 7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the 8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance 9*b1cdbd2cSJim Jagielski * with the License. You may obtain a copy of the License at 10*b1cdbd2cSJim Jagielski * 11*b1cdbd2cSJim Jagielski * http://www.apache.org/licenses/LICENSE-2.0 12*b1cdbd2cSJim Jagielski * 13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing, 14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an 15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*b1cdbd2cSJim Jagielski * KIND, either express or implied. See the License for the 17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations 18*b1cdbd2cSJim Jagielski * under the License. 19*b1cdbd2cSJim Jagielski * 20*b1cdbd2cSJim Jagielski *************************************************************/ 21*b1cdbd2cSJim Jagielski 22*b1cdbd2cSJim Jagielski 23*b1cdbd2cSJim Jagielski 24*b1cdbd2cSJim Jagielski #ifndef _CHART2_CREATION_WIZARD_UNO_HXX 25*b1cdbd2cSJim Jagielski #define _CHART2_CREATION_WIZARD_UNO_HXX 26*b1cdbd2cSJim Jagielski 27*b1cdbd2cSJim Jagielski #include "ServiceMacros.hxx" 28*b1cdbd2cSJim Jagielski #include "MutexContainer.hxx" 29*b1cdbd2cSJim Jagielski #include <cppuhelper/component.hxx> 30*b1cdbd2cSJim Jagielski #include <com/sun/star/awt/XWindow.hpp> 31*b1cdbd2cSJim Jagielski #include <com/sun/star/beans/XPropertySet.hpp> 32*b1cdbd2cSJim Jagielski #include <com/sun/star/frame/XModel.hpp> 33*b1cdbd2cSJim Jagielski #include <com/sun/star/frame/XTerminateListener.hpp> 34*b1cdbd2cSJim Jagielski #include <com/sun/star/lang/XInitialization.hpp> 35*b1cdbd2cSJim Jagielski #include <com/sun/star/lang/XServiceInfo.hpp> 36*b1cdbd2cSJim Jagielski #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> 37*b1cdbd2cSJim Jagielski #include <com/sun/star/uno/XComponentContext.hpp> 38*b1cdbd2cSJim Jagielski 39*b1cdbd2cSJim Jagielski // header for define DECL_LINK 40*b1cdbd2cSJim Jagielski #include <tools/link.hxx> 41*b1cdbd2cSJim Jagielski #include <vcl/vclevent.hxx> 42*b1cdbd2cSJim Jagielski 43*b1cdbd2cSJim Jagielski //............................................................................. 44*b1cdbd2cSJim Jagielski namespace chart 45*b1cdbd2cSJim Jagielski { 46*b1cdbd2cSJim Jagielski //............................................................................. 47*b1cdbd2cSJim Jagielski 48*b1cdbd2cSJim Jagielski class CreationWizard; 49*b1cdbd2cSJim Jagielski class CreationWizardUnoDlg : public MutexContainer 50*b1cdbd2cSJim Jagielski , public ::cppu::OComponentHelper 51*b1cdbd2cSJim Jagielski , public ::com::sun::star::ui::dialogs::XExecutableDialog 52*b1cdbd2cSJim Jagielski , public ::com::sun::star::lang::XServiceInfo 53*b1cdbd2cSJim Jagielski , public ::com::sun::star::lang::XInitialization 54*b1cdbd2cSJim Jagielski , public ::com::sun::star::frame::XTerminateListener 55*b1cdbd2cSJim Jagielski , public ::com::sun::star::beans::XPropertySet 56*b1cdbd2cSJim Jagielski { 57*b1cdbd2cSJim Jagielski public: 58*b1cdbd2cSJim Jagielski CreationWizardUnoDlg( const ::com::sun::star::uno::Reference< 59*b1cdbd2cSJim Jagielski ::com::sun::star::uno::XComponentContext >& xContext ); 60*b1cdbd2cSJim Jagielski virtual ~CreationWizardUnoDlg(); 61*b1cdbd2cSJim Jagielski 62*b1cdbd2cSJim Jagielski // XInterface 63*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException); 64*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException); 65*b1cdbd2cSJim Jagielski virtual void SAL_CALL acquire() throw (); 66*b1cdbd2cSJim Jagielski virtual void SAL_CALL release() throw (); 67*b1cdbd2cSJim Jagielski 68*b1cdbd2cSJim Jagielski // XTypeProvider 69*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException); 70*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException); 71*b1cdbd2cSJim Jagielski 72*b1cdbd2cSJim Jagielski // XServiceInfo 73*b1cdbd2cSJim Jagielski APPHELPER_XSERVICEINFO_DECL() 74*b1cdbd2cSJim Jagielski APPHELPER_SERVICE_FACTORY_HELPER(CreationWizardUnoDlg) 75*b1cdbd2cSJim Jagielski 76*b1cdbd2cSJim Jagielski // XExecutableDialog 77*b1cdbd2cSJim Jagielski virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) throw (::com::sun::star::uno::RuntimeException); 78*b1cdbd2cSJim Jagielski virtual sal_Int16 SAL_CALL execute( ) throw (::com::sun::star::uno::RuntimeException); 79*b1cdbd2cSJim Jagielski 80*b1cdbd2cSJim Jagielski // XInitialization 81*b1cdbd2cSJim Jagielski 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); 82*b1cdbd2cSJim Jagielski 83*b1cdbd2cSJim Jagielski // XTerminateListener 84*b1cdbd2cSJim Jagielski virtual void SAL_CALL queryTermination( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::frame::TerminationVetoException, ::com::sun::star::uno::RuntimeException); 85*b1cdbd2cSJim Jagielski virtual void SAL_CALL notifyTermination( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException); 86*b1cdbd2cSJim Jagielski 87*b1cdbd2cSJim Jagielski virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException); 88*b1cdbd2cSJim Jagielski 89*b1cdbd2cSJim Jagielski //XPropertySet 90*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException); 91*b1cdbd2cSJim Jagielski virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 92*b1cdbd2cSJim Jagielski virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 93*b1cdbd2cSJim Jagielski virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 94*b1cdbd2cSJim Jagielski virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 95*b1cdbd2cSJim Jagielski virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 96*b1cdbd2cSJim Jagielski virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); 97*b1cdbd2cSJim Jagielski 98*b1cdbd2cSJim Jagielski DECL_LINK( DialogEventHdl, VclWindowEvent* ); 99*b1cdbd2cSJim Jagielski 100*b1cdbd2cSJim Jagielski protected: 101*b1cdbd2cSJim Jagielski // ____ OComponentHelper ____ 102*b1cdbd2cSJim Jagielski /// Called in dispose method after the listeners were notified. 103*b1cdbd2cSJim Jagielski virtual void SAL_CALL disposing(); 104*b1cdbd2cSJim Jagielski 105*b1cdbd2cSJim Jagielski private: 106*b1cdbd2cSJim Jagielski //no default constructor 107*b1cdbd2cSJim Jagielski CreationWizardUnoDlg(); 108*b1cdbd2cSJim Jagielski void createDialogOnDemand(); 109*b1cdbd2cSJim Jagielski 110*b1cdbd2cSJim Jagielski private: 111*b1cdbd2cSJim Jagielski ::com::sun::star::uno::Reference< 112*b1cdbd2cSJim Jagielski ::com::sun::star::frame::XModel > m_xChartModel; 113*b1cdbd2cSJim Jagielski ::com::sun::star::uno::Reference< 114*b1cdbd2cSJim Jagielski ::com::sun::star::uno::XComponentContext> m_xCC; 115*b1cdbd2cSJim Jagielski com::sun::star::uno::Reference< 116*b1cdbd2cSJim Jagielski com::sun::star::awt::XWindow > m_xParentWindow; 117*b1cdbd2cSJim Jagielski 118*b1cdbd2cSJim Jagielski CreationWizard* m_pDialog; 119*b1cdbd2cSJim Jagielski sal_Bool m_bUnlockControllersOnExecute; 120*b1cdbd2cSJim Jagielski }; 121*b1cdbd2cSJim Jagielski 122*b1cdbd2cSJim Jagielski //............................................................................. 123*b1cdbd2cSJim Jagielski } //namespace chart 124*b1cdbd2cSJim Jagielski //............................................................................. 125*b1cdbd2cSJim Jagielski #endif 126