merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / util / XNumberFormatPreviewer.idl
blob4ef7251ded30e037ef861bbb35290a09fc11b66d
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: XNumberFormatPreviewer.idl,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 __com_sun_star_util_XNumberFormatPreviewer_idl__
31 #define __com_sun_star_util_XNumberFormatPreviewer_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
37 #ifndef __com_sun_star_util_Color_idl__
38 #include <com/sun/star/util/Color.idl>
39 #endif
41 #ifndef __com_sun_star_lang_Locale_idl__
42 #include <com/sun/star/lang/Locale.idl>
43 #endif
45 #ifndef __com_sun_star_util_MalformedNumberFormatException_idl__
46 #include <com/sun/star/util/MalformedNumberFormatException.idl>
47 #endif
49 #ifndef __com_sun_star_util_Color_idl__
50 #include <com/sun/star/util/Color.idl>
51 #endif
54 //=============================================================================
56 module com { module sun { module star { module util {
58 //=============================================================================
60 /** represents a number formatter which can preview number
61 formats without inserting them.
63 @see NumberFormatter
65 published interface XNumberFormatPreviewer: com::sun::star::uno::XInterface
67 //-------------------------------------------------------------------------
69 /** formats a value using a format string, without inserting a
70 number format into the list.
72 @param aFormat
73 is the format string that is used for formatting.
75 @param fValue
76 is the value that is formatted.
78 @param nLocale
79 is the locale that is used to interpret the format string.
81 @param bAllowEnglish
82 specifies if English language number format strings are accepted
83 in addition to those from the selected locale.
85 @returns
86 the formatted string.
88 @throws com::sun::star::util::MalformedNumberFormatException
89 if the format string is invalid.
92 string convertNumberToPreviewString( [in] string aFormat,
93 [in] double fValue,
94 [in] com::sun::star::lang::Locale nLocale,
95 [in] boolean bAllowEnglish )
96 raises( com::sun::star::util::MalformedNumberFormatException );
98 //-------------------------------------------------------------------------
100 /** returns the color which is to be used for a number.
102 @param aFormat
103 is the format string that is used for formatting.
105 @param fValue
106 is the value that is formatted.
108 @param nLocale
109 is the locale that is used to interpret the format string.
111 @param bAllowEnglish
112 specifies if English language number format strings are accepted
113 in addition to those from the selected locale.
115 @param aDefaultColor
116 is the color that should be returned if no color is set by
117 the number format.
119 @returns
120 the color that should used to output the formatted string.
122 @throws com::sun::star::util::MalformedNumberFormatException
123 if the format string is invalid.
126 com::sun::star::util::Color queryPreviewColorForNumber( [in] string aFormat,
127 [in] double fValue,
128 [in] com::sun::star::lang::Locale nLocale,
129 [in] boolean bAllowEnglish,
130 [in] com::sun::star::util::Color aDefaultColor )
131 raises( com::sun::star::util::MalformedNumberFormatException );
135 //=============================================================================
137 }; }; }; };
139 #endif