update dev300-m58
[ooovba.git] / forms / source / component / spinbutton.hxx
blob9db7a3ead7752a246fe5ccbb54598b6ff925a5b6
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: spinbutton.hxx,v $
10 * $Revision: 1.10 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef FORMS_SOURCE_COMPONENT_SPINBUTTON_HXX
31 #define FORMS_SOURCE_COMPONENT_SPINBUTTON_HXX
33 #include "FormComponent.hxx"
34 #include "frm_module.hxx"
36 //........................................................................
37 namespace frm
39 //........................................................................
41 //====================================================================
42 //= OSpinButtonModel
43 //====================================================================
44 class OSpinButtonModel :public OBoundControlModel
46 private:
47 // <properties>
48 sal_Int32 m_nDefaultSpinValue;
49 // </properties>
51 protected:
52 DECLARE_DEFAULT_LEAF_XTOR( OSpinButtonModel );
54 // XServiceInfo
55 DECLARE_SERVICE_REGISTRATION( OSpinButtonModel )
57 // XPersistObject
58 DECLARE_XPERSISTOBJECT()
60 // XCloneable
61 DECLARE_XCLONEABLE();
63 // XPropertyState
64 virtual ::com::sun::star::uno::Any getPropertyDefaultByHandle( sal_Int32 _nHandle ) const;
66 // OControlModel's property handling
67 virtual void describeFixedProperties(
68 ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps
69 ) const;
71 // OPropertySetHelper
72 virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& _rValue, sal_Int32 _nHandle ) const;
73 virtual void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const ::com::sun::star::uno::Any& _rValue )
74 throw ( ::com::sun::star::uno::Exception );
75 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 )
76 throw ( ::com::sun::star::lang::IllegalArgumentException );
78 // OBoundControlModel
79 virtual ::com::sun::star::uno::Any
80 translateDbColumnToControlValue( );
81 virtual sal_Bool commitControlValueToDbColumn( bool _bPostReset );
82 virtual ::com::sun::star::uno::Any
83 getDefaultForReset() const;
85 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >
86 getSupportedBindingTypes();
87 virtual ::com::sun::star::uno::Any
88 translateExternalValueToControlValue( const ::com::sun::star::uno::Any& _rExternalValue ) const;
89 virtual ::com::sun::star::uno::Any
90 translateControlValueToExternalValue( ) const;
92 // XCoponent and related helpers
93 virtual void SAL_CALL disposing();
95 // prevent method hiding
96 using OBoundControlModel::disposing;
97 using OBoundControlModel::getFastPropertyValue;
100 //........................................................................
101 } // namespacefrm
102 //........................................................................
104 #endif // FORMS_SOURCE_COMPONENT_SPINBUTTON_HXX