nss: upgrade to release 3.73
[LibreOffice.git] / chart2 / source / model / main / FormattedString.hxx
bloba7f9e36bb13477ad63d97280f59dc5b5ffc0be8a
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 <MutexContainer.hxx>
22 #include <OPropertySet.hxx>
23 #include <cppuhelper/implbase.hxx>
24 #include <comphelper/uno3.hxx>
25 #include <com/sun/star/lang/XServiceInfo.hpp>
26 #include <com/sun/star/chart2/XDataPointCustomLabelField.hpp>
27 #include <com/sun/star/util/XCloneable.hpp>
28 #include <com/sun/star/util/XModifyBroadcaster.hpp>
29 #include <com/sun/star/util/XModifyListener.hpp>
31 namespace chart
34 namespace impl
36 typedef ::cppu::WeakImplHelper<
37 css::chart2::XDataPointCustomLabelField, // inherits from XFormattedString2
38 css::lang::XServiceInfo,
39 css::util::XCloneable,
40 css::util::XModifyBroadcaster,
41 css::util::XModifyListener >
42 FormattedString_Base;
45 class FormattedString final :
46 public MutexContainer,
47 public impl::FormattedString_Base,
48 public ::property::OPropertySet
50 public:
51 explicit FormattedString();
52 virtual ~FormattedString() override;
54 /// declare XServiceInfo methods
55 virtual OUString SAL_CALL getImplementationName() override;
56 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
57 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
59 /// merge XInterface implementations
60 DECLARE_XINTERFACE()
61 /// merge XTypeProvider implementations
62 DECLARE_XTYPEPROVIDER()
64 virtual void SAL_CALL setPropertyValue(const OUString& p1, const css::uno::Any& p2) override
65 { ::property::OPropertySet::setPropertyValue(p1, p2); }
66 virtual css::uno::Any SAL_CALL getPropertyValue(const OUString& p1) override
67 { return ::property::OPropertySet::getPropertyValue(p1); }
68 virtual void SAL_CALL addPropertyChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XPropertyChangeListener>& p2) override
69 { ::property::OPropertySet::addPropertyChangeListener(p1, p2); }
70 virtual void SAL_CALL removePropertyChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XPropertyChangeListener>& p2) override
71 { ::property::OPropertySet::removePropertyChangeListener(p1, p2); }
72 virtual void SAL_CALL addVetoableChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) override
73 { ::property::OPropertySet::addVetoableChangeListener(p1, p2); }
74 virtual void SAL_CALL removeVetoableChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) override
75 { ::property::OPropertySet::removeVetoableChangeListener(p1, p2); }
77 private:
78 explicit FormattedString( const FormattedString & rOther );
80 // ____ XFormattedString ____
81 virtual OUString SAL_CALL getString() override;
82 virtual void SAL_CALL setString( const OUString& String ) override;
84 // ____ XDataPointCustomLabelField ____
85 virtual css::chart2::DataPointCustomLabelFieldType SAL_CALL getFieldType() override;
86 virtual void SAL_CALL
87 setFieldType( const css::chart2::DataPointCustomLabelFieldType FieldType ) override;
88 virtual OUString SAL_CALL getGuid() override;
89 void SAL_CALL setGuid( const OUString& guid ) override;
91 // ____ OPropertySet ____
92 virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
94 // ____ OPropertySet ____
95 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
97 // ____ XPropertySet ____
98 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
99 getPropertySetInfo() override;
101 // ____ XCloneable ____
102 virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
104 // ____ XModifyBroadcaster ____
105 virtual void SAL_CALL addModifyListener(
106 const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
107 virtual void SAL_CALL removeModifyListener(
108 const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
110 // ____ XModifyListener ____
111 virtual void SAL_CALL modified(
112 const css::lang::EventObject& aEvent ) override;
114 // ____ XEventListener (base of XModifyListener) ____
115 virtual void SAL_CALL disposing(
116 const css::lang::EventObject& Source ) override;
118 // ____ OPropertySet ____
119 virtual void firePropertyChangeEvent() override;
120 using OPropertySet::disposing;
122 void fireModifyEvent();
124 // ____ XFormattedString ____
125 OUString m_aString;
127 // ____ XDataPointCustomLabelField ____
128 css::chart2::DataPointCustomLabelFieldType m_aType;
129 OUString m_aGuid;
131 css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
134 } // namespace chart
136 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */