1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dlg_CreationWizard_UNO.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _CHART2_CREATION_WIZARD_UNO_HXX
32 #define _CHART2_CREATION_WIZARD_UNO_HXX
34 #include "ServiceMacros.hxx"
35 #include "MutexContainer.hxx"
36 #include <cppuhelper/component.hxx>
37 #include <com/sun/star/awt/XWindow.hpp>
38 #include <com/sun/star/beans/XPropertySet.hpp>
39 #include <com/sun/star/frame/XModel.hpp>
40 #include <com/sun/star/frame/XTerminateListener.hpp>
41 #include <com/sun/star/lang/XInitialization.hpp>
42 #include <com/sun/star/lang/XServiceInfo.hpp>
43 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
44 #include <com/sun/star/uno/XComponentContext.hpp>
46 // header for define DECL_LINK
47 #include <tools/link.hxx>
48 #include <vcl/vclevent.hxx>
50 //.............................................................................
53 //.............................................................................
56 class CreationWizardUnoDlg
: public MutexContainer
57 , public ::cppu::OComponentHelper
58 , public ::com::sun::star::ui::dialogs::XExecutableDialog
59 , public ::com::sun::star::lang::XServiceInfo
60 , public ::com::sun::star::lang::XInitialization
61 , public ::com::sun::star::frame::XTerminateListener
62 , public ::com::sun::star::beans::XPropertySet
65 CreationWizardUnoDlg( const ::com::sun::star::uno::Reference
<
66 ::com::sun::star::uno::XComponentContext
>& xContext
);
67 virtual ~CreationWizardUnoDlg();
70 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& aType
) throw (::com::sun::star::uno::RuntimeException
);
71 virtual ::com::sun::star::uno::Any SAL_CALL
queryAggregation( ::com::sun::star::uno::Type
const & rType
) throw (::com::sun::star::uno::RuntimeException
);
72 virtual void SAL_CALL
acquire() throw ();
73 virtual void SAL_CALL
release() throw ();
76 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw (::com::sun::star::uno::RuntimeException
);
77 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) throw (::com::sun::star::uno::RuntimeException
);
80 APPHELPER_XSERVICEINFO_DECL()
81 APPHELPER_SERVICE_FACTORY_HELPER(CreationWizardUnoDlg
)
84 virtual void SAL_CALL
setTitle( const ::rtl::OUString
& aTitle
) throw (::com::sun::star::uno::RuntimeException
);
85 virtual sal_Int16 SAL_CALL
execute( ) throw (::com::sun::star::uno::RuntimeException
);
88 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
);
91 virtual void SAL_CALL
queryTermination( const ::com::sun::star::lang::EventObject
& Event
) throw (::com::sun::star::frame::TerminationVetoException
, ::com::sun::star::uno::RuntimeException
);
92 virtual void SAL_CALL
notifyTermination( const ::com::sun::star::lang::EventObject
& Event
) throw (::com::sun::star::uno::RuntimeException
);
94 virtual void SAL_CALL
disposing( const ::com::sun::star::lang::EventObject
& Source
) throw (::com::sun::star::uno::RuntimeException
);
97 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException
);
98 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
);
99 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
);
100 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
);
101 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
);
102 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
);
103 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
);
105 DECL_LINK( DialogEventHdl
, VclWindowEvent
* );
108 // ____ OComponentHelper ____
109 /// Called in dispose method after the listeners were notified.
110 virtual void SAL_CALL
disposing();
113 //no default constructor
114 CreationWizardUnoDlg();
115 void createDialogOnDemand();
118 ::com::sun::star::uno::Reference
<
119 ::com::sun::star::frame::XModel
> m_xChartModel
;
120 ::com::sun::star::uno::Reference
<
121 ::com::sun::star::uno::XComponentContext
> m_xCC
;
122 com::sun::star::uno::Reference
<
123 com::sun::star::awt::XWindow
> m_xParentWindow
;
125 CreationWizard
* m_pDialog
;
126 sal_Bool m_bUnlockControllersOnExecute
;
129 //.............................................................................
131 //.............................................................................