nss: upgrade to release 3.73
[LibreOffice.git] / chart2 / source / controller / inc / dlg_CreationWizard_UNO.hxx
blob645d4bbec09494da930e9d7ab6e44409093dd073
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 #pragma once
22 #include <MutexContainer.hxx>
23 #include <cppuhelper/component.hxx>
24 #include <com/sun/star/beans/XPropertySet.hpp>
25 #include <com/sun/star/frame/XTerminateListener.hpp>
26 #include <com/sun/star/lang/XInitialization.hpp>
27 #include <com/sun/star/lang/XServiceInfo.hpp>
28 #include <com/sun/star/uno/XComponentContext.hpp>
29 #include <com/sun/star/ui/dialogs/XAsynchronousExecutableDialog.hpp>
31 #include "dlg_CreationWizard.hxx"
32 #include <tools/link.hxx>
34 namespace com::sun::star::awt { class XWindow; }
35 namespace com::sun::star::frame { class XModel; }
36 namespace com::sun::star::uno { class XComponentContext; }
38 class VclWindowEvent;
40 namespace chart
43 class CreationWizardUnoDlg : public MutexContainer
44 , public ::cppu::OComponentHelper
45 , public css::ui::dialogs::XAsynchronousExecutableDialog
46 , public css::lang::XServiceInfo
47 , public css::lang::XInitialization
48 , public css::frame::XTerminateListener
49 , public css::beans::XPropertySet
51 public:
52 CreationWizardUnoDlg() = delete;
54 CreationWizardUnoDlg( const css::uno::Reference< css::uno::XComponentContext >& xContext );
55 virtual ~CreationWizardUnoDlg() override;
57 // XInterface
58 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
59 virtual css::uno::Any SAL_CALL queryAggregation( css::uno::Type const & rType ) override;
60 virtual void SAL_CALL acquire() throw () override;
61 virtual void SAL_CALL release() throw () override;
63 // XTypeProvider
64 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
65 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
67 // XServiceInfo
68 virtual OUString SAL_CALL getImplementationName() override;
69 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
70 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
72 // XAsynchronousExecutableDialog
73 virtual void SAL_CALL setDialogTitle( const OUString& aTitle ) override;
74 virtual void SAL_CALL startExecuteModal( const css::uno::Reference<css::ui::dialogs::XDialogClosedListener>& xListener ) override;
76 // XInitialization
77 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
79 // XTerminateListener
80 virtual void SAL_CALL queryTermination( const css::lang::EventObject& Event ) override;
81 virtual void SAL_CALL notifyTermination( const css::lang::EventObject& Event ) override;
83 virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
85 //XPropertySet
86 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
87 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
88 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
89 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
90 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
91 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
92 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
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();
101 DECL_STATIC_LINK(CreationWizardUnoDlg, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*);
103 private:
104 css::uno::Reference< css::frame::XModel > m_xChartModel;
105 css::uno::Reference< css::uno::XComponentContext> m_xCC;
106 css::uno::Reference< css::awt::XWindow > m_xParentWindow;
108 std::shared_ptr<CreationWizard> m_xDialog;
109 bool m_bUnlockControllersOnExecute;
112 } //namespace chart
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */