LibreOffice Module svx (master)  1
chinese_translation_unodialog.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #pragma once
21 
22 #include <sal/config.h>
23 
24 #include <memory>
25 
26 #include <com/sun/star/awt/XWindow.hpp>
27 #include <com/sun/star/beans/XPropertySet.hpp>
28 #include <com/sun/star/lang/XInitialization.hpp>
29 #include <com/sun/star/lang/XServiceInfo.hpp>
30 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
31 #include <cppuhelper/implbase.hxx>
33 
34 
35 namespace textconversiondlgs
36 {
37 
38 
59 class ChineseTranslationDialog;
60 
61 class ChineseTranslation_UnoDialog : public ::cppu::WeakImplHelper <
62  css::ui::dialogs::XExecutableDialog
63  , css::lang::XInitialization
64  , css::beans::XPropertySet
65  , css::lang::XComponent
66  , css::lang::XServiceInfo
67  >
68 {
69 public:
71  virtual ~ChineseTranslation_UnoDialog() override;
72 
73  // lang::XServiceInfo
74  virtual OUString SAL_CALL getImplementationName() override;
75  virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
76  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
77 
78  // lang::XInitialization
79  virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
80 
81  // ui::dialogs::XExecutableDialog
82  virtual void SAL_CALL setTitle( const OUString& aTitle ) override;
83  virtual sal_Int16 SAL_CALL execute( ) override;
84 
85  // beans::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;
93 
94  // lang::XComponent
95  virtual void SAL_CALL dispose() override;
96  virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener > & xListener ) override;
97  virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener > & xListener ) override;
98 
99 private:
100 
101  void impl_DeleteDialog();
102 
103 private:
104  css::uno::Reference<
105  css::awt::XWindow > m_xParentWindow;
106 
107  std::unique_ptr<ChineseTranslationDialog> m_xDialog;
108 
109  bool m_bDisposed;
111  osl::Mutex m_aContainerMutex;
113 };
114 
115 
116 } //end namespace
117 
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
comphelper::OInterfaceContainerHelper2 m_aDisposeEventListeners
virtual void SAL_CALL setTitle(const OUString &aTitle) override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
Sequence< PropertyValue > aArguments
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
unsigned char sal_Bool
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
std::unique_ptr< ChineseTranslationDialog > m_xDialog
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
css::uno::Reference< css::awt::XWindow > m_xParentWindow