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 <com/sun/star/awt/XWindow.hpp>
23 #include <com/sun/star/beans/XPropertySet.hpp>
24 #include <com/sun/star/lang/XInitialization.hpp>
25 #include <com/sun/star/lang/XServiceInfo.hpp>
26 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
27 #include <com/sun/star/uno/XComponentContext.hpp>
28 #include <cppuhelper/implbase.hxx>
30 
31 
32 namespace textconversiondlgs
33 {
34 
35 
56 class ChineseTranslationDialog;
57 
58 class ChineseTranslation_UnoDialog : public ::cppu::WeakImplHelper <
59  css::ui::dialogs::XExecutableDialog
60  , css::lang::XInitialization
61  , css::beans::XPropertySet
62  , css::lang::XComponent
63  , css::lang::XServiceInfo
64  >
65 {
66 public:
68  virtual ~ChineseTranslation_UnoDialog() override;
69 
70  // lang::XServiceInfo
71  virtual OUString SAL_CALL getImplementationName() override;
72  virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
73  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
74 
75  // lang::XInitialization
76  virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
77 
78  // ui::dialogs::XExecutableDialog
79  virtual void SAL_CALL setTitle( const OUString& aTitle ) override;
80  virtual sal_Int16 SAL_CALL execute( ) override;
81 
82  // beans::XPropertySet
83  virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
84  virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
85  virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
86  virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
87  virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
88  virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
89  virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
90 
91  // lang::XComponent
92  virtual void SAL_CALL dispose() override;
93  virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener > & xListener ) override;
94  virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener > & xListener ) override;
95 
96 private:
97 
98  void impl_DeleteDialog();
99 
100 private:
101  css::uno::Reference<
102  css::awt::XWindow > m_xParentWindow;
103 
104  std::unique_ptr<ChineseTranslationDialog> m_xDialog;
105 
106  bool m_bDisposed;
108  osl::Mutex m_aContainerMutex;
110 };
111 
112 
113 } //end namespace
114 
115 /* 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