fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / model / main / FormattedString.hxx
bloba8d95a8f8d09e119ad97c0f16aedee7da6c50534
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_MODEL_MAIN_FORMATTEDSTRING_HXX
20 #define INCLUDED_CHART2_SOURCE_MODEL_MAIN_FORMATTEDSTRING_HXX
22 #include "MutexContainer.hxx"
23 #include "OPropertySet.hxx"
24 #include <cppuhelper/implbase5.hxx>
25 #include <comphelper/uno3.hxx>
26 #include "ModifyListenerHelper.hxx"
27 #include <com/sun/star/lang/XServiceInfo.hpp>
28 #include <com/sun/star/chart2/XFormattedString2.hpp>
29 #include <com/sun/star/util/XCloneable.hpp>
30 #include <com/sun/star/uno/XComponentContext.hpp>
32 namespace chart
35 namespace impl
37 typedef ::cppu::WeakImplHelper5<
38 css::chart2::XFormattedString2,
39 css::lang::XServiceInfo,
40 css::util::XCloneable,
41 css::util::XModifyBroadcaster,
42 css::util::XModifyListener >
43 FormattedString_Base;
46 class FormattedString :
47 public MutexContainer,
48 public impl::FormattedString_Base,
49 public ::property::OPropertySet
51 public:
52 FormattedString( css::uno::Reference<
53 css::uno::XComponentContext > const & xContext );
54 virtual ~FormattedString();
56 /// declare XServiceInfo methods
57 virtual OUString SAL_CALL getImplementationName()
58 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
59 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
60 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
61 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
62 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
64 static OUString getImplementationName_Static();
65 static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
66 /// establish methods for factory instatiation
67 static css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & xContext)
68 throw(css::uno::Exception)
70 return (::cppu::OWeakObject *)new FormattedString( xContext );
73 /// merge XInterface implementations
74 DECLARE_XINTERFACE()
75 /// merge XTypeProvider implementations
76 DECLARE_XTYPEPROVIDER()
78 virtual void SAL_CALL setPropertyValue(const OUString& p1, const css::uno::Any& p2) throw (css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
79 { ::property::OPropertySet::setPropertyValue(p1, p2); }
80 virtual css::uno::Any SAL_CALL getPropertyValue(const OUString& p1) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
81 { return ::property::OPropertySet::getPropertyValue(p1); }
82 virtual void SAL_CALL addPropertyChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XPropertyChangeListener>& p2) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
83 { ::property::OPropertySet::addPropertyChangeListener(p1, p2); }
84 virtual void SAL_CALL removePropertyChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XPropertyChangeListener>& p2) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
85 { ::property::OPropertySet::removePropertyChangeListener(p1, p2); }
86 virtual void SAL_CALL addVetoableChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
87 { ::property::OPropertySet::addVetoableChangeListener(p1, p2); }
88 virtual void SAL_CALL removeVetoableChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
89 { ::property::OPropertySet::removeVetoableChangeListener(p1, p2); }
91 protected:
92 explicit FormattedString( const FormattedString & rOther );
94 // ____ XFormattedString ____
95 virtual OUString SAL_CALL getString()
96 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
97 virtual void SAL_CALL setString( const OUString& String )
98 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
100 // ____ OPropertySet ____
101 virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
102 throw (css::beans::UnknownPropertyException,
103 css::uno::RuntimeException) SAL_OVERRIDE;
105 // ____ OPropertySet ____
106 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() SAL_OVERRIDE;
108 // ____ XPropertySet ____
109 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
110 getPropertySetInfo()
111 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
113 // ____ XCloneable ____
114 virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone()
115 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
117 // ____ XModifyBroadcaster ____
118 virtual void SAL_CALL addModifyListener(
119 const css::uno::Reference< css::util::XModifyListener >& aListener )
120 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
121 virtual void SAL_CALL removeModifyListener(
122 const css::uno::Reference< css::util::XModifyListener >& aListener )
123 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
125 // ____ XModifyListener ____
126 virtual void SAL_CALL modified(
127 const css::lang::EventObject& aEvent )
128 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
130 // ____ XEventListener (base of XModifyListener) ____
131 virtual void SAL_CALL disposing(
132 const css::lang::EventObject& Source )
133 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
135 // ____ OPropertySet ____
136 virtual void firePropertyChangeEvent() SAL_OVERRIDE;
137 using OPropertySet::disposing;
139 void fireModifyEvent();
141 private:
142 OUString m_aString;
144 css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
147 } // namespace chart
149 // INCLUDED_CHART2_SOURCE_MODEL_MAIN_FORMATTEDSTRING_HXX
150 #endif
152 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */