merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / inspection / XNumericControl.idl
blob13e4631a3959cafb67d30c84f48ad00e55ff670b
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef __com_sun_star_inspection_XNumericControl_idl__
29 #define __com_sun_star_inspection_XNumericControl_idl__
31 #ifndef __com_sun_star_inspection_XPropertyControl_idl__
32 #include <com/sun/star/inspection/XPropertyControl.idl>
33 #endif
34 #ifndef __com_sun_star_beans_Optional_idl__
35 #include <com/sun/star/beans/Optional.idl>
36 #endif
37 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
38 #include <com/sun/star/lang/IllegalArgumentException.idl>
39 #endif
41 //=============================================================================
42 module com { module sun { module star { module inspection {
44 //-----------------------------------------------------------------------------
45 /** defines the interface for an <type>XPropertyControl</type> which supports
46 displaying and entering numerical values.
48 @since OOo 2.0.3
50 interface XNumericControl : XPropertyControl
52 /** describes the number of decimal digits to use for the value
54 [attribute] short DecimalDigits;
56 /** describes the minimum value which is allowed to be entered in the control
58 [attribute] com::sun::star::beans::Optional<double> MinValue;
60 /** describes the maximum value which is allowed to be entered in the control
62 [attribute] com::sun::star::beans::Optional<double> MaxValue;
64 /** describes a <type scope="com::sun::star::util">MeasureUnit</type> to be applied
65 for displaying values.
67 <p>Only a certain set of <type scope="com::sun::star::util">MeasureUnit</type> values is
68 supported. In particular, every value which denotes a fraction of another
69 unit (like 100th millimiters) cannot be used as DisplayUnit.</p>
71 @throws com::sun::star::lang::IllegalArgumentException
72 if the caller attempts to set an unsupported <type scope="com::sun::star::util">MeasureUnit</type>
74 [attribute] short DisplayUnit
76 set raises (com::sun::star::lang::IllegalArgumentException);
79 /** describes a <type scope="com::sun::star::util">MeasureUnit</type> to be
80 applied for transfering values.
82 <p>The core measurement unit for a property value might differ from the unit which
83 is used by the control to display it. For instance, your property value might require
84 that your values denote 100th millimeters, but to the user, you want to present the
85 value as, say, inches. In this case, a numeric control can automatically handle the
86 value conversion for you, if you give it a ValueUnit different from the DisplayUnit.</p>
88 @see XPropertyControl::Value
90 [attribute] short ValueUnit;
93 //=============================================================================
95 }; }; }; };
97 #endif