Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / chart2 / source / controller / chartapiwrapper / UpDownBarWrapper.hxx
bloba1b455bcc888da28a308dbcf72dc009f33a83e22
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 .
19 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_CHARTAPIWRAPPER_UPDOWNBARWRAPPER_HXX
20 #define INCLUDED_CHART2_SOURCE_CONTROLLER_CHARTAPIWRAPPER_UPDOWNBARWRAPPER_HXX
22 #include <MutexContainer.hxx>
23 #include <comphelper/interfacecontainer2.hxx>
25 #include <cppuhelper/implbase.hxx>
26 #include <com/sun/star/beans/XMultiPropertySet.hpp>
27 #include <com/sun/star/beans/XMultiPropertyStates.hpp>
28 #include <com/sun/star/beans/XPropertyState.hpp>
29 #include <com/sun/star/beans/XPropertySet.hpp>
30 #include <com/sun/star/lang/XComponent.hpp>
31 #include <com/sun/star/lang/XServiceInfo.hpp>
33 #include <memory>
35 namespace chart
38 namespace wrapper
41 class Chart2ModelContact;
43 class UpDownBarWrapper : public MutexContainer
44 , public ::cppu::WeakImplHelper
45 < css::lang::XComponent
46 , css::lang::XServiceInfo
47 , css::beans::XPropertySet
48 , css::beans::XMultiPropertySet
49 , css::beans::XPropertyState
50 , css::beans::XMultiPropertyStates
53 public:
54 UpDownBarWrapper(bool bUp, const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact);
55 virtual ~UpDownBarWrapper() override;
57 /// XServiceInfo declarations
58 virtual OUString SAL_CALL getImplementationName() override;
59 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
60 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
62 // ____ XComponent ____
63 virtual void SAL_CALL dispose() override;
64 virtual void SAL_CALL addEventListener( const css::uno::Reference<
65 css::lang::XEventListener >& xListener ) override;
66 virtual void SAL_CALL removeEventListener( const css::uno::Reference<
67 css::lang::XEventListener >& aListener ) override;
69 //XPropertySet
70 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
72 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
73 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
75 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
76 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
77 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
78 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
80 //XMultiPropertySet
81 //getPropertySetInfo() already declared in XPropertySet
82 virtual void SAL_CALL setPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Sequence< css::uno::Any >& aValues ) override;
83 virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames ) override;
84 virtual void SAL_CALL addPropertiesChangeListener( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener ) override;
85 virtual void SAL_CALL removePropertiesChangeListener( const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener ) override;
86 virtual void SAL_CALL firePropertiesChangeEvent( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener ) override;
88 //XPropertyState
89 virtual css::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) override;
90 virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates( const css::uno::Sequence< OUString >& aPropertyName ) override;
91 virtual void SAL_CALL setPropertyToDefault( const OUString& PropertyName ) override;
92 virtual css::uno::Any SAL_CALL getPropertyDefault( const OUString& aPropertyName ) override;
94 //XMultiPropertyStates
95 //getPropertyStates() already declared in XPropertyState
96 virtual void SAL_CALL setAllPropertiesToDefault( ) override;
97 virtual void SAL_CALL setPropertiesToDefault( const css::uno::Sequence< OUString >& aPropertyNames ) override;
98 virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyDefaults( const css::uno::Sequence< OUString >& aPropertyNames ) override;
100 private: //member
101 std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
102 ::comphelper::OInterfaceContainerHelper2 m_aEventListenerContainer;
104 OUString m_aPropertySetName;
107 } // namespace wrapper
108 } // namespace chart
110 // INCLUDED_CHART2_SOURCE_CONTROLLER_CHARTAPIWRAPPER_UPDOWNBARWRAPPER_HXX
111 #endif
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */