| 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 |
#pragma once |
| 20 |
|
| 21 |
#include <WrappedIgnoreProperty.hxx> |
| 22 |
#include <comphelper/interfacecontainer4.hxx> |
| 23 |
|
| 24 |
#include <cppuhelper/implbase.hxx> |
| 25 |
#include <com/sun/star/beans/XMultiPropertySet.hpp> |
| 26 |
#include <com/sun/star/beans/XMultiPropertyStates.hpp> |
| 27 |
#include <com/sun/star/beans/XPropertyState.hpp> |
| 28 |
#include <com/sun/star/beans/XPropertySet.hpp> |
| 29 |
#include <com/sun/star/lang/XComponent.hpp> |
| 30 |
#include <com/sun/star/lang/XServiceInfo.hpp> |
| 31 |
|
| 32 |
#include <memory> |
| 33 |
|
| 34 |
namespace chart::wrapper |
| 35 |
{ |
| 36 |
|
| 37 |
class Chart2ModelContact; |
| 38 |
|
| 39 |
class MinMaxLineWrapper : public ::cppu::WeakImplHelper |
| 40 |
< css::lang::XComponent |
| 41 |
, css::lang::XServiceInfo |
| 42 |
, css::beans::XPropertySet |
| 43 |
, css::beans::XMultiPropertySet |
| 44 |
, css::beans::XPropertyState |
| 45 |
, css::beans::XMultiPropertyStates |
| 46 |
> |
| 47 |
{ |
| 48 |
public: |
| 49 |
explicit MinMaxLineWrapper(std::shared_ptr<Chart2ModelContact> spChart2ModelContact); |
| 50 |
virtual ~MinMaxLineWrapper() override; |
| 51 |
|
| 52 |
/// XServiceInfo declarations |
| 53 |
virtual OUString SAL_CALL getImplementationName() override; |
| 54 |
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; |
| 55 |
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override; |
| 56 |
|
| 57 |
// ____ XComponent ____ |
| 58 |
virtual void SAL_CALL dispose() override; |
| 59 |
virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) override; |
| 60 |
virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) override; |
| 61 |
|
| 62 |
//XPropertySet |
| 63 |
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override; |
| 64 |
|
| 65 |
virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override; |
| 66 |
virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override; |
| 67 |
|
| 68 |
virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override; |
| 69 |
virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override; |
| 70 |
virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override; |
| 71 |
virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override; |
| 72 |
|
| 73 |
//XMultiPropertySet |
| 74 |
//getPropertySetInfo() already declared in XPropertySet |
| 75 |
virtual void SAL_CALL setPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Sequence< css::uno::Any >& aValues ) override; |
| 76 |
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames ) override; |
| 77 |
virtual void SAL_CALL addPropertiesChangeListener( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener ) override; |
| 78 |
virtual void SAL_CALL removePropertiesChangeListener( const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener ) override; |
| 79 |
virtual void SAL_CALL firePropertiesChangeEvent( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener >& xListener ) override; |
| 80 |
|
| 81 |
//XPropertyState |
| 82 |
virtual css::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) override; |
| 83 |
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates( const css::uno::Sequence< OUString >& aPropertyName ) override; |
| 84 |
virtual void SAL_CALL setPropertyToDefault( const OUString& PropertyName ) override; |
| 85 |
virtual css::uno::Any SAL_CALL getPropertyDefault( const OUString& aPropertyName ) override; |
| 86 |
|
| 87 |
//XMultiPropertyStates |
| 88 |
//getPropertyStates() already declared in XPropertyState |
| 89 |
virtual void SAL_CALL setAllPropertiesToDefault( ) override; |
| 90 |
virtual void SAL_CALL setPropertiesToDefault( const css::uno::Sequence< OUString >& aPropertyNames ) override; |
| 91 |
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyDefaults( const css::uno::Sequence< OUString >& aPropertyNames ) override; |
| 92 |
|
| 93 |
private: //member |
| 94 |
std::mutex m_aMutex; |
| 95 |
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact; |
| 96 |
::comphelper::OInterfaceContainerHelper4<css::lang::XEventListener> m_aEventListenerContainer; |
| 97 |
|
| 98 |
WrappedIgnoreProperty m_aWrappedLineJointProperty; |
| 99 |
}; |
| 100 |
|
| 101 |
} // namespace chart::wrapper |
| 102 |
|
| 103 |
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |