Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / chart2 / source / controller / inc / dlg_CreationWizard_UNO.hxx
blob85ac6ca87a77286009a57061437fbf0fc4b93a1a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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>
37 namespace chart
40 class CreationWizard;
41 class CreationWizardUnoDlg : public MutexContainer
42 , public ::cppu::OComponentHelper
43 , public css::ui::dialogs::XExecutableDialog
44 , public css::lang::XServiceInfo
45 , public css::lang::XInitialization
46 , public css::frame::XTerminateListener
47 , public css::beans::XPropertySet
49 public:
50 CreationWizardUnoDlg() = delete;
52 CreationWizardUnoDlg( const css::uno::Reference< css::uno::XComponentContext >& xContext );
53 virtual ~CreationWizardUnoDlg() override;
55 // XInterface
56 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
57 virtual css::uno::Any SAL_CALL queryAggregation( css::uno::Type const & rType ) override;
58 virtual void SAL_CALL acquire() throw () override;
59 virtual void SAL_CALL release() throw () override;
61 // XTypeProvider
62 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
63 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
65 // XServiceInfo
66 virtual OUString SAL_CALL getImplementationName() override;
67 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
68 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
70 // XExecutableDialog
71 virtual void SAL_CALL setTitle( const OUString& aTitle ) override;
72 virtual sal_Int16 SAL_CALL execute( ) override;
74 // XInitialization
75 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
77 // XTerminateListener
78 virtual void SAL_CALL queryTermination( const css::lang::EventObject& Event ) override;
79 virtual void SAL_CALL notifyTermination( const css::lang::EventObject& Event ) override;
81 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
83 //XPropertySet
84 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
85 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
86 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
87 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
88 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
89 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
90 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
92 DECL_LINK( DialogEventHdl, VclWindowEvent&, void );
94 protected:
95 // ____ OComponentHelper ____
96 /// Called in dispose method after the listeners were notified.
97 virtual void SAL_CALL disposing() override;
99 private:
100 void createDialogOnDemand();
102 private:
103 css::uno::Reference< css::frame::XModel > m_xChartModel;
104 css::uno::Reference< css::uno::XComponentContext> m_xCC;
105 css::uno::Reference< css::awt::XWindow > m_xParentWindow;
107 VclPtr<CreationWizard> m_pDialog;
108 bool m_bUnlockControllersOnExecute;
111 } //namespace chart
112 #endif
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */