1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef FORMS_SOURCE_COMPONENT_SCROLLBAR_HXX
24 #define FORMS_SOURCE_COMPONENT_SCROLLBAR_HXX
25 
26 #include "FormComponent.hxx"
27 #include "frm_module.hxx"
28 
29 //........................................................................
30 namespace frm
31 {
32 //........................................................................
33 
34 	//====================================================================
35 	//= OScrollBarModel
36 	//====================================================================
37     class OScrollBarModel   :public OBoundControlModel
38 	{
39     private:
40         // <properties>
41         sal_Int32   m_nDefaultScrollValue;
42         // </properties>
43 
44     protected:
45 	    DECLARE_DEFAULT_LEAF_XTOR( OScrollBarModel );
46 
47 	    // XServiceInfo
48 	    DECLARE_SERVICE_REGISTRATION( OScrollBarModel )
49 
50         // XPersistObject
51         DECLARE_XPERSISTOBJECT()
52 
53         // XCloneable
54     	DECLARE_XCLONEABLE();
55 
56         // XPropertyState
57 	    virtual ::com::sun::star::uno::Any getPropertyDefaultByHandle( sal_Int32 _nHandle ) const;
58 
59         // OControlModel's property handling
60 	    virtual void describeFixedProperties(
61 		    ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps
62         ) const;
63 
64     	// OPropertySetHelper
65         virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& _rValue, sal_Int32 _nHandle ) const;
66 	    virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const ::com::sun::star::uno::Any& _rValue )
67             throw ( ::com::sun::star::uno::Exception );
68 	    virtual sal_Bool SAL_CALL convertFastPropertyValue( ::com::sun::star::uno::Any& _rConvertedValue, ::com::sun::star::uno::Any& _rOldValue, sal_Int32 _nHandle, const ::com::sun::star::uno::Any& _rValue )
69 			throw ( ::com::sun::star::lang::IllegalArgumentException );
70 
71         // OBoundControlModel
72         virtual ::com::sun::star::uno::Any
73                                 translateDbColumnToControlValue( );
74         virtual sal_Bool        commitControlValueToDbColumn( bool _bPostReset );
75         virtual ::com::sun::star::uno::Any
76                                 getDefaultForReset() const;
77 
78         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
79                                 getSupportedBindingTypes();
80         virtual ::com::sun::star::uno::Any
81                                 translateExternalValueToControlValue( const ::com::sun::star::uno::Any& _rExternalValue ) const;
82         virtual ::com::sun::star::uno::Any
83                                 translateControlValueToExternalValue( ) const;
84 
85         // XCoponent and related helpers
86         virtual void SAL_CALL disposing();
87 
88         // prevent method hiding
89         using OBoundControlModel::disposing;
90         using OBoundControlModel::getFastPropertyValue;
91 
92     };
93 //........................................................................
94 } // namespacefrm
95 //........................................................................
96 
97 #endif // FORMS_SOURCE_COMPONENT_SCROLLBAR_HXX
98