1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 CHART_TITLE_HXX
20 #define CHART_TITLE_HXX
22 #include "ServiceMacros.hxx"
23 #include "ModifyListenerHelper.hxx"
24 #include "OPropertySet.hxx"
25 #include "MutexContainer.hxx"
26 #include <cppuhelper/implbase5.hxx>
27 #include <comphelper/uno3.hxx>
28 #include <com/sun/star/chart2/XTitle.hpp>
29 #include <com/sun/star/lang/XServiceInfo.hpp>
30 #include <com/sun/star/uno/XComponentContext.hpp>
31 #include <com/sun/star/util/XCloneable.hpp>
38 typedef ::cppu::WeakImplHelper5
<
39 ::com::sun::star::chart2::XTitle
,
40 ::com::sun::star::lang::XServiceInfo
,
41 ::com::sun::star::util::XCloneable
,
42 ::com::sun::star::util::XModifyBroadcaster
,
43 ::com::sun::star::util::XModifyListener
>
48 public MutexContainer
,
49 public impl::Title_Base
,
50 public ::property::OPropertySet
53 Title( ::com::sun::star::uno::Reference
<
54 ::com::sun::star::uno::XComponentContext
> const & xContext
);
57 /// establish methods for factory instatiation
58 APPHELPER_SERVICE_FACTORY_HELPER( Title
)
60 /// XServiceInfo declarations
61 APPHELPER_XSERVICEINFO_DECL()
63 /// merge XInterface implementations
65 /// merge XTypeProvider implementations
66 DECLARE_XTYPEPROVIDER()
69 explicit Title( const Title
& rOther
);
71 // ____ OPropertySet ____
72 virtual ::com::sun::star::uno::Any
GetDefaultValue( sal_Int32 nHandle
) const
73 throw(::com::sun::star::beans::UnknownPropertyException
);
75 // ____ OPropertySet ____
76 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
78 // ____ XPropertySet ____
79 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
81 throw (::com::sun::star::uno::RuntimeException
);
84 virtual ::com::sun::star::uno::Sequence
<
85 ::com::sun::star::uno::Reference
<
86 ::com::sun::star::chart2::XFormattedString
> > SAL_CALL
getText()
87 throw (::com::sun::star::uno::RuntimeException
);
88 virtual void SAL_CALL
setText( const ::com::sun::star::uno::Sequence
<
89 ::com::sun::star::uno::Reference
<
90 ::com::sun::star::chart2::XFormattedString
> >& Strings
)
91 throw (::com::sun::star::uno::RuntimeException
);
93 // ____ XCloneable ____
94 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone()
95 throw (::com::sun::star::uno::RuntimeException
);
97 // ____ XModifyBroadcaster ____
98 virtual void SAL_CALL
addModifyListener(
99 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
100 throw (::com::sun::star::uno::RuntimeException
);
101 virtual void SAL_CALL
removeModifyListener(
102 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
103 throw (::com::sun::star::uno::RuntimeException
);
105 // ____ XModifyListener ____
106 virtual void SAL_CALL
modified(
107 const ::com::sun::star::lang::EventObject
& aEvent
)
108 throw (::com::sun::star::uno::RuntimeException
);
110 // ____ XEventListener (base of XModifyListener) ____
111 virtual void SAL_CALL
disposing(
112 const ::com::sun::star::lang::EventObject
& Source
)
113 throw (::com::sun::star::uno::RuntimeException
);
115 // ____ OPropertySet ____
116 virtual void firePropertyChangeEvent();
117 using OPropertySet::disposing
;
119 void fireModifyEvent();
122 ::com::sun::star::uno::Sequence
<
123 ::com::sun::star::uno::Reference
<
124 ::com::sun::star::chart2::XFormattedString
> > m_aStrings
;
126 ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
> m_xModifyEventForwarder
;
134 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */