fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / controller / chartapiwrapper / TitleWrapper.hxx
blobe8cf9e8b55c5d361205de0f78f4f23ec0dfa2bb3
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_CONTROLLER_CHARTAPIWRAPPER_TITLEWRAPPER_HXX
20 #define INCLUDED_CHART2_SOURCE_CONTROLLER_CHARTAPIWRAPPER_TITLEWRAPPER_HXX
22 #include "WrappedPropertySet.hxx"
23 #include "ReferenceSizePropertyProvider.hxx"
24 #include "Chart2ModelContact.hxx"
25 #include "TitleHelper.hxx"
26 #include <cppuhelper/implbase3.hxx>
27 #include <comphelper/uno3.hxx>
28 #include <cppuhelper/interfacecontainer.hxx>
29 #include <com/sun/star/drawing/XShape.hpp>
30 #include <com/sun/star/lang/XComponent.hpp>
31 #include <com/sun/star/lang/XServiceInfo.hpp>
32 #include <com/sun/star/chart2/XTitle.hpp>
33 #include <com/sun/star/uno/XComponentContext.hpp>
35 #include <boost/shared_ptr.hpp>
37 namespace chart
39 namespace wrapper
42 class TitleWrapper : public ::cppu::ImplInheritanceHelper3<
43 WrappedPropertySet
44 , com::sun::star::drawing::XShape
45 , com::sun::star::lang::XComponent
46 , com::sun::star::lang::XServiceInfo
48 , public ReferenceSizePropertyProvider
50 public:
51 TitleWrapper( ::chart::TitleHelper::eTitleType eTitleType,
52 ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
53 virtual ~TitleWrapper();
55 /// XServiceInfo declarations
56 virtual OUString SAL_CALL getImplementationName()
57 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
58 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
59 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
60 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
61 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
63 static OUString getImplementationName_Static();
64 static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
66 //ReferenceSizePropertyProvider
67 virtual void updateReferenceSize() SAL_OVERRIDE;
68 virtual ::com::sun::star::uno::Any getReferenceSize() SAL_OVERRIDE;
69 virtual ::com::sun::star::awt::Size getCurrentSizeForReference() SAL_OVERRIDE;
71 protected:
72 // ____ XShape ____
73 virtual ::com::sun::star::awt::Point SAL_CALL getPosition()
74 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
75 virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition )
76 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
77 virtual ::com::sun::star::awt::Size SAL_CALL getSize()
78 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
79 virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize )
80 throw (::com::sun::star::beans::PropertyVetoException,
81 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
83 // ____ XShapeDescriptor (base of XShape) ____
84 virtual OUString SAL_CALL getShapeType()
85 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
87 // ____ XComponent ____
88 virtual void SAL_CALL dispose()
89 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
90 virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference<
91 ::com::sun::star::lang::XEventListener >& xListener )
92 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
93 virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference<
94 ::com::sun::star::lang::XEventListener >& aListener )
95 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
97 // character properties have to be handled differently (via the XFormattedString elements)
98 void getFastCharacterPropertyValue( sal_Int32 nHandle, ::com::sun::star::uno::Any& rValue );
99 void setFastCharacterPropertyValue( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue )
100 throw (::com::sun::star::uno::Exception);
102 // ____ WrappedPropertySet ____
103 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
104 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
106 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
107 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
109 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
111 virtual void SAL_CALL setPropertyToDefault( const OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
112 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const OUString& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
114 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getInnerPropertySet() SAL_OVERRIDE;
116 virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& getPropertySequence() SAL_OVERRIDE;
117 virtual const std::vector< WrappedProperty* > createWrappedProperties() SAL_OVERRIDE;
119 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getFirstCharacterPropertySet();
121 private:
122 ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle > getTitleObject();
124 private:
125 ::boost::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
126 ::cppu::OInterfaceContainerHelper m_aEventListenerContainer;
128 ::chart::TitleHelper::eTitleType m_eTitleType;
131 } // namespace wrapper
132 } // namespace chart
134 // INCLUDED_CHART2_SOURCE_CONTROLLER_CHARTAPIWRAPPER_TITLEWRAPPER_HXX
135 #endif
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */