Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / util / XNumberFormatPreviewer.idl
blob00db87678bb66fdba98bbdab371fd522d48b7234
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 __com_sun_star_util_XNumberFormatPreviewer_idl__
20 #define __com_sun_star_util_XNumberFormatPreviewer_idl__
22 #include <com/sun/star/uno/XInterface.idl>
24 #include <com/sun/star/util/Color.idl>
25 #include <com/sun/star/lang/Locale.idl>
27 #include <com/sun/star/util/MalformedNumberFormatException.idl>
31 module com { module sun { module star { module util {
34 /** represents a number formatter which can preview number
35 formats without inserting them.
37 @see NumberFormatter
39 published interface XNumberFormatPreviewer: com::sun::star::uno::XInterface
42 /** formats a value using a format string, without inserting a
43 number format into the list.
45 @param aFormat
46 is the format string that is used for formatting.
48 @param fValue
49 is the value that is formatted.
51 @param nLocale
52 is the locale that is used to interpret the format string.
54 @param bAllowEnglish
55 specifies if English language number format strings are accepted
56 in addition to those from the selected locale.
58 @returns
59 the formatted string.
61 @throws com::sun::star::util::MalformedNumberFormatException
62 if the format string is invalid.
65 string convertNumberToPreviewString( [in] string aFormat,
66 [in] double fValue,
67 [in] com::sun::star::lang::Locale nLocale,
68 [in] boolean bAllowEnglish )
69 raises( com::sun::star::util::MalformedNumberFormatException );
72 /** returns the color which is to be used for a number.
74 @param aFormat
75 is the format string that is used for formatting.
77 @param fValue
78 is the value that is formatted.
80 @param nLocale
81 is the locale that is used to interpret the format string.
83 @param bAllowEnglish
84 specifies if English language number format strings are accepted
85 in addition to those from the selected locale.
87 @param aDefaultColor
88 is the color that should be returned if no color is set by
89 the number format.
91 @returns
92 the color that should used to output the formatted string.
94 @throws com::sun::star::util::MalformedNumberFormatException
95 if the format string is invalid.
98 com::sun::star::util::Color queryPreviewColorForNumber( [in] string aFormat,
99 [in] double fValue,
100 [in] com::sun::star::lang::Locale nLocale,
101 [in] boolean bAllowEnglish,
102 [in] com::sun::star::util::Color aDefaultColor )
103 raises( com::sun::star::util::MalformedNumberFormatException );
108 }; }; }; };
110 #endif
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */