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 __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.
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.
46 is the format string that is used for formatting.
49 is the value that is formatted.
52 is the locale that is used to interpret the format string.
55 specifies if English language number format strings are accepted
56 in addition to those from the selected locale.
61 @throws com::sun::star::util::MalformedNumberFormatException
62 if the format string is invalid.
65 string convertNumberToPreviewString
( [in] string aFormat
,
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.
75 is the format string that is used for formatting.
78 is the value that is formatted.
81 is the locale that is used to interpret the format string.
84 specifies if English language number format strings are accepted
85 in addition to those from the selected locale.
88 is the color that should be returned if no color is set by
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
,
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
);
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */