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: XNumberFormatPreviewer.idl,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 __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
>
37 #ifndef __com_sun_star_util_Color_idl__
38 #include
<com
/sun
/star
/util
/Color.idl
>
41 #ifndef __com_sun_star_lang_Locale_idl__
42 #include
<com
/sun
/star
/lang
/Locale.idl
>
45 #ifndef __com_sun_star_util_MalformedNumberFormatException_idl__
46 #include
<com
/sun
/star
/util
/MalformedNumberFormatException.idl
>
49 #ifndef __com_sun_star_util_Color_idl__
50 #include
<com
/sun
/star
/util
/Color.idl
>
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.
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.
73 is the format string that is used for formatting.
76 is the value that is formatted.
79 is the locale that is used to interpret the format string.
82 specifies if English language number format strings are accepted
83 in addition to those from the selected locale.
88 @throws com::sun::star::util::MalformedNumberFormatException
89 if the format string is invalid.
92 string convertNumberToPreviewString
( [in] string aFormat
,
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.
103 is the format string that is used for formatting.
106 is the value that is formatted.
109 is the locale that is used to interpret the format string.
112 specifies if English language number format strings are accepted
113 in addition to those from the selected locale.
116 is the color that should be returned if no color is set by
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
,
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 //=============================================================================