1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_FORMS_SOURCE_COMPONENT_SPINBUTTON_HXX
20 #define INCLUDED_FORMS_SOURCE_COMPONENT_SPINBUTTON_HXX
22 #include "FormComponent.hxx"
28 class OSpinButtonModel
:public OBoundControlModel
32 sal_Int32 m_nDefaultSpinValue
;
36 DECLARE_DEFAULT_LEAF_XTOR( OSpinButtonModel
);
40 virtual OUString SAL_CALL
getImplementationName( ) throw (::css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
41 virtual ::css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames( ) throw (::css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
44 DECLARE_XPERSISTOBJECT()
47 virtual css::uno::Reference
< css::util::XCloneable
> SAL_CALL
createClone( ) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
50 virtual ::com::sun::star::uno::Any
getPropertyDefaultByHandle( sal_Int32 _nHandle
) const SAL_OVERRIDE
;
52 // OControlModel's property handling
53 virtual void describeFixedProperties(
54 ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::Property
>& /* [out] */ _rProps
58 virtual void SAL_CALL
getFastPropertyValue( ::com::sun::star::uno::Any
& _rValue
, sal_Int32 _nHandle
) const SAL_OVERRIDE
;
59 virtual void SAL_CALL
setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle
, const ::com::sun::star::uno::Any
& _rValue
)
60 throw ( ::com::sun::star::uno::Exception
, std::exception
) SAL_OVERRIDE
;
61 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
)
62 throw ( ::com::sun::star::lang::IllegalArgumentException
) SAL_OVERRIDE
;
65 virtual ::com::sun::star::uno::Any
66 translateDbColumnToControlValue( ) SAL_OVERRIDE
;
67 virtual bool commitControlValueToDbColumn( bool _bPostReset
) SAL_OVERRIDE
;
68 virtual ::com::sun::star::uno::Any
69 getDefaultForReset() const SAL_OVERRIDE
;
71 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
>
72 getSupportedBindingTypes() SAL_OVERRIDE
;
73 virtual ::com::sun::star::uno::Any
74 translateExternalValueToControlValue( const ::com::sun::star::uno::Any
& _rExternalValue
) const SAL_OVERRIDE
;
75 virtual ::com::sun::star::uno::Any
76 translateControlValueToExternalValue( ) const SAL_OVERRIDE
;
78 // XCoponent and related helpers
79 virtual void SAL_CALL
disposing() SAL_OVERRIDE
;
81 // prevent method hiding
82 using OBoundControlModel::disposing
;
83 using OBoundControlModel::getFastPropertyValue
;
90 #endif // INCLUDED_FORMS_SOURCE_COMPONENT_SPINBUTTON_HXX
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */