1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef CHART_WRAPPED_CHARACTERHEIGHT_PROPERTY_HXX
28 #define CHART_WRAPPED_CHARACTERHEIGHT_PROPERTY_HXX
29 
30 #include "WrappedProperty.hxx"
31 
32 #include <vector>
33 
34 //.............................................................................
35 namespace chart
36 {
37 namespace wrapper
38 {
39 
40 class ReferenceSizePropertyProvider;
41 
42 class WrappedCharacterHeightProperty_Base : public WrappedProperty
43 {
44 public:
45     WrappedCharacterHeightProperty_Base( const ::rtl::OUString& rOuterEqualsInnerName, ReferenceSizePropertyProvider* pRefSizePropProvider );
46     virtual ~WrappedCharacterHeightProperty_Base();
47 
48     virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
49                         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);
50 
51     virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
52                         throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
53 
54     virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
55                         throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
56 
57     virtual ::com::sun::star::beans::PropertyState getPropertyState( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
58                         throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
59 
60 protected:
61     virtual ::com::sun::star::uno::Any convertInnerToOuterValue( const ::com::sun::star::uno::Any& rInnerValue ) const;
62     virtual ::com::sun::star::uno::Any convertOuterToInnerValue( const ::com::sun::star::uno::Any& rOuterValue ) const;
63 
64 protected:
65     ReferenceSizePropertyProvider*  m_pRefSizePropProvider;
66 };
67 
68 //-----------------------------------------------------------------------------
69 
70 class WrappedCharacterHeightProperty : public WrappedCharacterHeightProperty_Base
71 {
72 public:
73     WrappedCharacterHeightProperty( ReferenceSizePropertyProvider* pRefSizePropProvider );
74     virtual ~WrappedCharacterHeightProperty();
75 
76     static void addWrappedProperties( std::vector< WrappedProperty* >& rList, ReferenceSizePropertyProvider* pRefSizePropProvider );
77 };
78 
79 //-----------------------------------------------------------------------------
80 
81 class WrappedAsianCharacterHeightProperty : public WrappedCharacterHeightProperty_Base
82 {
83 public:
84     WrappedAsianCharacterHeightProperty( ReferenceSizePropertyProvider* pRefSizePropProvider );
85     virtual ~WrappedAsianCharacterHeightProperty();
86 };
87 
88 //-----------------------------------------------------------------------------
89 
90 class WrappedComplexCharacterHeightProperty : public WrappedCharacterHeightProperty_Base
91 {
92 public:
93     WrappedComplexCharacterHeightProperty( ReferenceSizePropertyProvider* pRefSizePropProvider );
94     virtual ~WrappedComplexCharacterHeightProperty();
95 };
96 
97 } //namespace wrapper
98 } //namespace chart
99 //.............................................................................
100 
101 // CHART_WRAPPED_CHARACTERHEIGHT_PROPERTY_HXX
102 #endif
103