1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_CREATIONWIZARD_UNO_HXX
21 #define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_CREATIONWIZARD_UNO_HXX
23 #include "MutexContainer.hxx"
24 #include <cppuhelper/component.hxx>
25 #include <com/sun/star/awt/XWindow.hpp>
26 #include <com/sun/star/beans/XPropertySet.hpp>
27 #include <com/sun/star/frame/XModel.hpp>
28 #include <com/sun/star/frame/XTerminateListener.hpp>
29 #include <com/sun/star/lang/XInitialization.hpp>
30 #include <com/sun/star/lang/XServiceInfo.hpp>
31 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
32 #include <com/sun/star/uno/XComponentContext.hpp>
34 #include <tools/link.hxx>
35 #include <vcl/vclevent.hxx>
41 class CreationWizardUnoDlg
: public MutexContainer
42 , public ::cppu::OComponentHelper
43 , public ::com::sun::star::ui::dialogs::XExecutableDialog
44 , public ::com::sun::star::lang::XServiceInfo
45 , public ::com::sun::star::lang::XInitialization
46 , public ::com::sun::star::frame::XTerminateListener
47 , public ::com::sun::star::beans::XPropertySet
50 CreationWizardUnoDlg( const ::com::sun::star::uno::Reference
<
51 ::com::sun::star::uno::XComponentContext
>& xContext
);
52 virtual ~CreationWizardUnoDlg();
55 virtual ::com::sun::star::uno::Any SAL_CALL
queryInterface( const ::com::sun::star::uno::Type
& aType
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
56 virtual ::com::sun::star::uno::Any SAL_CALL
queryAggregation( ::com::sun::star::uno::Type
const & rType
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
57 virtual void SAL_CALL
acquire() throw () SAL_OVERRIDE
;
58 virtual void SAL_CALL
release() throw () SAL_OVERRIDE
;
61 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
getTypes( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
62 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
65 virtual OUString SAL_CALL
getImplementationName()
66 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
67 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
68 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
69 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
70 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
72 static OUString
getImplementationName_Static();
73 static css::uno::Sequence
< OUString
> getSupportedServiceNames_Static();
74 static css::uno::Reference
< css::uno::XInterface
> SAL_CALL
create( css::uno::Reference
< css::uno::XComponentContext
> const & xContext
)
75 throw(css::uno::Exception
)
77 return (::cppu::OWeakObject
*)new CreationWizardUnoDlg( xContext
);
81 virtual void SAL_CALL
setTitle( const OUString
& aTitle
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
82 virtual sal_Int16 SAL_CALL
execute( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
85 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
, std::exception
) SAL_OVERRIDE
;
88 virtual void SAL_CALL
queryTermination( const ::com::sun::star::lang::EventObject
& Event
) throw (::com::sun::star::frame::TerminationVetoException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
89 virtual void SAL_CALL
notifyTermination( const ::com::sun::star::lang::EventObject
& Event
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
91 virtual void SAL_CALL
disposing( const ::com::sun::star::lang::EventObject
& Source
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
94 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
95 virtual void SAL_CALL
setPropertyValue( const 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
, std::exception
) SAL_OVERRIDE
;
96 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) throw (::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
97 virtual void SAL_CALL
addPropertyChangeListener( const 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
, std::exception
) SAL_OVERRIDE
;
98 virtual void SAL_CALL
removePropertyChangeListener( const 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
, std::exception
) SAL_OVERRIDE
;
99 virtual void SAL_CALL
addVetoableChangeListener( const 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
, std::exception
) SAL_OVERRIDE
;
100 virtual void SAL_CALL
removeVetoableChangeListener( const 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
, std::exception
) SAL_OVERRIDE
;
102 DECL_LINK( DialogEventHdl
, VclWindowEvent
* );
105 // ____ OComponentHelper ____
106 /// Called in dispose method after the listeners were notified.
107 virtual void SAL_CALL
disposing() SAL_OVERRIDE
;
110 //no default constructor
111 CreationWizardUnoDlg();
112 void createDialogOnDemand();
115 ::com::sun::star::uno::Reference
<
116 ::com::sun::star::frame::XModel
> m_xChartModel
;
117 ::com::sun::star::uno::Reference
<
118 ::com::sun::star::uno::XComponentContext
> m_xCC
;
119 com::sun::star::uno::Reference
<
120 com::sun::star::awt::XWindow
> m_xParentWindow
;
122 VclPtr
<CreationWizard
> m_pDialog
;
123 bool m_bUnlockControllersOnExecute
;
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */