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