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 FORMS_SOURCE_COMPONENT_SCROLLBAR_HXX
28 #define FORMS_SOURCE_COMPONENT_SCROLLBAR_HXX
29 
30 #include "FormComponent.hxx"
31 #include "frm_module.hxx"
32 
33 //........................................................................
34 namespace frm
35 {
36 //........................................................................
37 
38 	//====================================================================
39 	//= OScrollBarModel
40 	//====================================================================
41     class OScrollBarModel   :public OBoundControlModel
42 	{
43     private:
44         // <properties>
45         sal_Int32   m_nDefaultScrollValue;
46         // </properties>
47 
48     protected:
49 	    DECLARE_DEFAULT_LEAF_XTOR( OScrollBarModel );
50 
51 	    // XServiceInfo
52 	    DECLARE_SERVICE_REGISTRATION( OScrollBarModel )
53 
54         // XPersistObject
55         DECLARE_XPERSISTOBJECT()
56 
57         // XCloneable
58     	DECLARE_XCLONEABLE();
59 
60         // XPropertyState
61 	    virtual ::com::sun::star::uno::Any getPropertyDefaultByHandle( sal_Int32 _nHandle ) const;
62 
63         // OControlModel's property handling
64 	    virtual void describeFixedProperties(
65 		    ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps
66         ) const;
67 
68     	// OPropertySetHelper
69         virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& _rValue, sal_Int32 _nHandle ) const;
70 	    virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const ::com::sun::star::uno::Any& _rValue )
71             throw ( ::com::sun::star::uno::Exception );
72 	    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 )
73 			throw ( ::com::sun::star::lang::IllegalArgumentException );
74 
75         // OBoundControlModel
76         virtual ::com::sun::star::uno::Any
77                                 translateDbColumnToControlValue( );
78         virtual sal_Bool        commitControlValueToDbColumn( bool _bPostReset );
79         virtual ::com::sun::star::uno::Any
80                                 getDefaultForReset() const;
81 
82         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
83                                 getSupportedBindingTypes();
84         virtual ::com::sun::star::uno::Any
85                                 translateExternalValueToControlValue( const ::com::sun::star::uno::Any& _rExternalValue ) const;
86         virtual ::com::sun::star::uno::Any
87                                 translateControlValueToExternalValue( ) const;
88 
89         // XCoponent and related helpers
90         virtual void SAL_CALL disposing();
91 
92         // prevent method hiding
93         using OBoundControlModel::disposing;
94         using OBoundControlModel::getFastPropertyValue;
95 
96     };
97 //........................................................................
98 } // namespacefrm
99 //........................................................................
100 
101 #endif // FORMS_SOURCE_COMPONENT_SCROLLBAR_HXX
102