fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / model / main / Title.hxx
blob5d55dfe5935bc12390c516745e12f26c0168a549
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_TITLE_HXX
20 #define INCLUDED_CHART2_SOURCE_MODEL_MAIN_TITLE_HXX
22 #include "ModifyListenerHelper.hxx"
23 #include "OPropertySet.hxx"
24 #include "MutexContainer.hxx"
25 #include <cppuhelper/implbase5.hxx>
26 #include <comphelper/uno3.hxx>
27 #include <com/sun/star/chart2/XTitle.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <com/sun/star/uno/XComponentContext.hpp>
30 #include <com/sun/star/util/XCloneable.hpp>
32 namespace chart
35 namespace impl
37 typedef ::cppu::WeakImplHelper5<
38 ::com::sun::star::chart2::XTitle,
39 ::com::sun::star::lang::XServiceInfo,
40 ::com::sun::star::util::XCloneable,
41 ::com::sun::star::util::XModifyBroadcaster,
42 ::com::sun::star::util::XModifyListener >
43 Title_Base;
46 class Title :
47 public MutexContainer,
48 public impl::Title_Base,
49 public ::property::OPropertySet
51 public:
52 Title( ::com::sun::star::uno::Reference<
53 ::com::sun::star::uno::XComponentContext > const & xContext );
54 virtual ~Title();
56 /// establish methods for factory instatiation
57 static css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & xContext)
58 throw(css::uno::Exception)
60 return (::cppu::OWeakObject *)new Title( xContext );
63 /// XServiceInfo declarations
64 virtual OUString SAL_CALL getImplementationName()
65 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
66 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
67 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
68 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
69 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
71 static OUString getImplementationName_Static();
72 static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
74 /// merge XInterface implementations
75 DECLARE_XINTERFACE()
76 /// merge XTypeProvider implementations
77 DECLARE_XTYPEPROVIDER()
79 protected:
80 explicit Title( const Title & rOther );
82 // ____ OPropertySet ____
83 virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
84 throw(::com::sun::star::beans::UnknownPropertyException) SAL_OVERRIDE;
86 // ____ OPropertySet ____
87 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() SAL_OVERRIDE;
89 // ____ XPropertySet ____
90 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
91 getPropertySetInfo()
92 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
94 // ____ XTitle ____
95 virtual ::com::sun::star::uno::Sequence<
96 ::com::sun::star::uno::Reference<
97 ::com::sun::star::chart2::XFormattedString > > SAL_CALL getText()
98 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
99 virtual void SAL_CALL setText( const ::com::sun::star::uno::Sequence<
100 ::com::sun::star::uno::Reference<
101 ::com::sun::star::chart2::XFormattedString > >& Strings )
102 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
104 // ____ XCloneable ____
105 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
106 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
108 // ____ XModifyBroadcaster ____
109 virtual void SAL_CALL addModifyListener(
110 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
111 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
112 virtual void SAL_CALL removeModifyListener(
113 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
114 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
116 // ____ XModifyListener ____
117 virtual void SAL_CALL modified(
118 const ::com::sun::star::lang::EventObject& aEvent )
119 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
121 // ____ XEventListener (base of XModifyListener) ____
122 virtual void SAL_CALL disposing(
123 const ::com::sun::star::lang::EventObject& Source )
124 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
126 // ____ OPropertySet ____
127 virtual void firePropertyChangeEvent() SAL_OVERRIDE;
128 using OPropertySet::disposing;
130 void fireModifyEvent();
132 private:
133 ::com::sun::star::uno::Sequence<
134 ::com::sun::star::uno::Reference<
135 ::com::sun::star::chart2::XFormattedString > > m_aStrings;
137 ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
140 } // namespace chart
142 // INCLUDED_CHART2_SOURCE_MODEL_MAIN_TITLE_HXX
143 #endif
145 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */