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_SCROLLBAR_HXX
20 #define INCLUDED_FORMS_SOURCE_COMPONENT_SCROLLBAR_HXX
22 #include "FormComponent.hxx"
27 class OScrollBarModel
:public OBoundControlModel
31 sal_Int32 m_nDefaultScrollValue
;
35 DECLARE_DEFAULT_LEAF_XTOR( OScrollBarModel
);
39 virtual OUString SAL_CALL
getImplementationName() throw (::css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
40 virtual ::css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() throw (::css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
43 DECLARE_XPERSISTOBJECT()
46 virtual css::uno::Reference
< css::util::XCloneable
> SAL_CALL
createClone( ) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
49 virtual ::com::sun::star::uno::Any
getPropertyDefaultByHandle( sal_Int32 _nHandle
) const SAL_OVERRIDE
;
51 // OControlModel's property handling
52 virtual void describeFixedProperties(
53 ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::Property
>& /* [out] */ _rProps
57 virtual void SAL_CALL
getFastPropertyValue( ::com::sun::star::uno::Any
& _rValue
, sal_Int32 _nHandle
) const SAL_OVERRIDE
;
58 virtual void SAL_CALL
setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle
, const ::com::sun::star::uno::Any
& _rValue
)
59 throw ( ::com::sun::star::uno::Exception
, std::exception
) SAL_OVERRIDE
;
60 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
)
61 throw ( ::com::sun::star::lang::IllegalArgumentException
) SAL_OVERRIDE
;
64 virtual ::com::sun::star::uno::Any
65 translateDbColumnToControlValue( ) SAL_OVERRIDE
;
66 virtual bool commitControlValueToDbColumn( bool _bPostReset
) SAL_OVERRIDE
;
67 virtual ::com::sun::star::uno::Any
68 getDefaultForReset() const SAL_OVERRIDE
;
70 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
>
71 getSupportedBindingTypes() SAL_OVERRIDE
;
72 virtual ::com::sun::star::uno::Any
73 translateExternalValueToControlValue( const ::com::sun::star::uno::Any
& _rExternalValue
) const SAL_OVERRIDE
;
74 virtual ::com::sun::star::uno::Any
75 translateControlValueToExternalValue( ) const SAL_OVERRIDE
;
77 // XCoponent and related helpers
78 virtual void SAL_CALL
disposing() SAL_OVERRIDE
;
80 // prevent method hiding
81 using OBoundControlModel::disposing
;
82 using OBoundControlModel::getFastPropertyValue
;
86 css::uno::Any
translateExternalDoubleToControlIntValue(
87 const css::uno::Any
& _rExternalValue
, const css::uno::Reference
< css::beans::XPropertySet
>& _rxProperties
,
88 const OUString
& _rMinValueName
, const OUString
& _rMaxValueName
);
90 css::uno::Any
translateControlIntToExternalDoubleValue( const css::uno::Any
& _rControlIntValue
);
94 #endif // INCLUDED_FORMS_SOURCE_COMPONENT_SCROLLBAR_HXX
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */