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_SCALE_PROPERTY_HXX
28 #define CHART_WRAPPED_SCALE_PROPERTY_HXX
29 
30 #include "WrappedProperty.hxx"
31 #include "Chart2ModelContact.hxx"
32 
33 #include <boost/shared_ptr.hpp>
34 #include <vector>
35 
36 //.............................................................................
37 namespace chart
38 {
39 namespace wrapper
40 {
41 
42 class WrappedScaleProperty : public WrappedProperty
43 {
44 public:
45     enum tScaleProperty
46     {
47           SCALE_PROP_MAX
48         , SCALE_PROP_MIN
49         , SCALE_PROP_ORIGIN
50         , SCALE_PROP_STEPMAIN
51         , SCALE_PROP_STEPHELP //deprecated property
52         , SCALE_PROP_STEPHELP_COUNT
53         , SCALE_PROP_AUTO_MAX
54         , SCALE_PROP_AUTO_MIN
55         , SCALE_PROP_AUTO_ORIGIN
56         , SCALE_PROP_AUTO_STEPMAIN
57         , SCALE_PROP_AUTO_STEPHELP
58         , SCALE_PROP_AXIS_TYPE
59         , SCALE_PROP_DATE_INCREMENT
60         , SCALE_PROP_EXPLICIT_DATE_INCREMENT
61         , SCALE_PROP_LOGARITHMIC
62         , SCALE_PROP_REVERSEDIRECTION
63     };
64 
65 public:
66     WrappedScaleProperty( tScaleProperty eScaleProperty, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
67     virtual ~WrappedScaleProperty();
68 
69     static void addWrappedProperties( std::vector< WrappedProperty* >& rList, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
70 
71     virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
72                         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);
73 
74     virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
75                         throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
76 
77 protected: //methods
78     void setPropertyValue( tScaleProperty eScaleProperty, const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
79                         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);
80     ::com::sun::star::uno::Any getPropertyValue( tScaleProperty eScaleProperty, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
81                         throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
82 
83 private: //member
84     ::boost::shared_ptr< Chart2ModelContact >   m_spChart2ModelContact;
85     tScaleProperty          m_eScaleProperty;
86 
87     mutable ::com::sun::star::uno::Any m_aOuterValue;
88 };
89 
90 } //  namespace wrapper
91 } //  namespace chart
92 //.............................................................................
93 
94 // CHART_WRAPPED_SCALE_PROPERTY_HXX
95 #endif
96