1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: spinbutton.hxx,v $
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 //........................................................................
39 //........................................................................
41 //====================================================================
43 //====================================================================
44 class OSpinButtonModel
:public OBoundControlModel
48 sal_Int32 m_nDefaultSpinValue
;
52 DECLARE_DEFAULT_LEAF_XTOR( OSpinButtonModel
);
55 DECLARE_SERVICE_REGISTRATION( OSpinButtonModel
)
58 DECLARE_XPERSISTOBJECT()
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
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
);
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 //........................................................................
102 //........................................................................
104 #endif // FORMS_SOURCE_COMPONENT_SPINBUTTON_HXX