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 .
22 module com
{ module sun
{ module star
{ module util
{
25 /** represents a number formatter which can preview number
26 formats without inserting them.
30 published
interface XNumberFormatPreviewer
: com
::sun
::star
::uno
::XInterface
33 /** formats a value using a format string, without inserting a
34 number format into the list.
37 is the format string that is used for formatting.
40 is the value that is formatted.
43 is the locale that is used to interpret the format string.
46 specifies if English language number format strings are accepted
47 in addition to those from the selected locale.
52 @throws com::sun::star::util::MalformedNumberFormatException
53 if the format string is invalid.
56 string convertNumberToPreviewString
( [in] string aFormat
,
58 [in] com
::sun
::star
::lang
::Locale nLocale
,
59 [in] boolean bAllowEnglish
)
60 raises
( com
::sun
::star
::util
::MalformedNumberFormatException
);
63 /** returns the color which is to be used for a number.
66 is the format string that is used for formatting.
69 is the value that is formatted.
72 is the locale that is used to interpret the format string.
75 specifies if English language number format strings are accepted
76 in addition to those from the selected locale.
79 is the color that should be returned if no color is set by
83 the color that should used to output the formatted string.
85 @throws com::sun::star::util::MalformedNumberFormatException
86 if the format string is invalid.
89 com
::sun
::star
::util
::Color queryPreviewColorForNumber
( [in] string aFormat
,
91 [in] com
::sun
::star
::lang
::Locale nLocale
,
92 [in] boolean bAllowEnglish
,
93 [in] com
::sun
::star
::util
::Color aDefaultColor
)
94 raises
( com
::sun
::star
::util
::MalformedNumberFormatException
);
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */