tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / chart2 / source / controller / chartapiwrapper / UpDownBarWrapper.hxx
blob517a2406fe2ccc072d59725a7017232a34fd5013
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 #pragma once
21 #include <comphelper/interfacecontainer4.hxx>
23 #include <cppuhelper/implbase.hxx>
24 #include <com/sun/star/beans/XMultiPropertySet.hpp>
25 #include <com/sun/star/beans/XMultiPropertyStates.hpp>
26 #include <com/sun/star/beans/XPropertyState.hpp>
27 #include <com/sun/star/beans/XPropertySet.hpp>
28 #include <com/sun/star/lang/XComponent.hpp>
29 #include <com/sun/star/lang/XServiceInfo.hpp>
31 #include <memory>
33 namespace chart::wrapper
36 class Chart2ModelContact;
38 class UpDownBarWrapper : public ::cppu::WeakImplHelper
39 < css::lang::XComponent
40 , css::lang::XServiceInfo
41 , css::beans::XPropertySet
42 , css::beans::XMultiPropertySet
43 , css::beans::XPropertyState
44 , css::beans::XMultiPropertyStates
47 public:
48 UpDownBarWrapper(bool bUp, std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
49 virtual ~UpDownBarWrapper() override;
51 /// XServiceInfo declarations
52 virtual OUString SAL_CALL getImplementationName() override;
53 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
54 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
56 // ____ XComponent ____
57 virtual void SAL_CALL dispose() override;
58 virtual void SAL_CALL addEventListener( const css::uno::Reference<
59 css::lang::XEventListener >& xListener ) override;
60 virtual void SAL_CALL removeEventListener( const css::uno::Reference<
61 css::lang::XEventListener >& aListener ) override;
63 //XPropertySet
64 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
66 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
67 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
69 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
70 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
71 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
72 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
74 //XMultiPropertySet
75 //getPropertySetInfo() already declared in XPropertySet
76 virtual void SAL_CALL setPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Sequence< css::uno::Any >& aValues ) override;
77 virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames ) override;
78 virtual void SAL_CALL addPropertiesChangeListener( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener ) override;
79 virtual void SAL_CALL removePropertiesChangeListener( const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener ) override;
80 virtual void SAL_CALL firePropertiesChangeEvent( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener ) override;
82 //XPropertyState
83 virtual css::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) override;
84 virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates( const css::uno::Sequence< OUString >& aPropertyName ) override;
85 virtual void SAL_CALL setPropertyToDefault( const OUString& PropertyName ) override;
86 virtual css::uno::Any SAL_CALL getPropertyDefault( const OUString& aPropertyName ) override;
88 //XMultiPropertyStates
89 //getPropertyStates() already declared in XPropertyState
90 virtual void SAL_CALL setAllPropertiesToDefault( ) override;
91 virtual void SAL_CALL setPropertiesToDefault( const css::uno::Sequence< OUString >& aPropertyNames ) override;
92 virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyDefaults( const css::uno::Sequence< OUString >& aPropertyNames ) override;
94 private: //member
95 std::mutex m_aMutex;
96 std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
97 ::comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> m_aEventListenerContainer;
99 OUString m_aPropertySetName;
102 } // namespace chart::wrapper
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */