Overview | Module | Use | Devguide | Index

Methods' Summary | Attributes' Summary | Methods' Details | Attributes' Details

:: com :: sun :: star :: util ::
interface XNumberFormatPreviewer
Description represents a number formatter which can preview number formats without inserting them. See also NumberFormatter Developers Guide OfficeDev - Number Formats

Methods' Summary
convertNumberToPreviewString | formats a value using a format string, without inserting a number format into the list.
queryPreviewColorForNumber | returns the color which is to be used for a number.

Methods' Details
convertNumberToPreviewString
string
convertNumberToPreviewString( | [in] string | aFormat,
| [in] double | fValue,
| [in] ::com::sun::star::lang::Locale | nLocale,
| [in] boolean | bAllowEnglish )
raises( | MalformedNumberFormatException );
Description formats a value using a format string, without inserting a number format into the list. Parameter aFormat is the format string that is used for formatting. Parameter fValue is the value that is formatted. Parameter nLocale is the locale that is used to interpret the format string. Parameter bAllowEnglish specifies if English language number format strings are accepted in addition to those from the selected locale. Returns the formatted string. Throws com::sun::star::util::MalformedNumberFormatException if the format string is invalid.
queryPreviewColorForNumber
Color
queryPreviewColorForNumber( | [in] string | aFormat,
| [in] double | fValue,
| [in] ::com::sun::star::lang::Locale | nLocale,
| [in] boolean | bAllowEnglish,
| [in] Color | aDefaultColor )
raises( | MalformedNumberFormatException );
Description returns the color which is to be used for a number. Parameter aFormat is the format string that is used for formatting. Parameter fValue is the value that is formatted. Parameter nLocale is the locale that is used to interpret the format string. Parameter bAllowEnglish specifies if English language number format strings are accepted in addition to those from the selected locale. Parameter aDefaultColor is the color that should be returned if no color is set by the number format. Returns the color that should used to output the formatted string. Throws com::sun::star::util::MalformedNumberFormatException if the format string is invalid.

Top of Page

Copyright © 2000, 2014 LibreOffice contributors and/or their affiliates. All rights reserved.

LibreOffice was created by The Document Foundation, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.

The Document Foundation acknowledges all community members, please find more info at our website.

Privacy Policy | Impressum (Legal Info) | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (LGPLv3). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.