LibreOffice
LibreOffice 24.2 SDK API Reference
Public Member Functions | List of all members
XNumberFormatPreviewer Interface Referencepublished

represents a number formatter which can preview number formats without inserting them. More...

import"XNumberFormatPreviewer.idl";

Inheritance diagram for XNumberFormatPreviewer:
XInterface XNumberFormatter2 NumberFormatter

Public Member Functions

string convertNumberToPreviewString ([in] string aFormat, [in] double fValue, [in] com::sun::star::lang::Locale nLocale, [in] boolean bAllowEnglish) raises ( com::sun::star::util::MalformedNumberFormatException )
 formats a value using a format string, without inserting a number format into the list. More...
 
com::sun::star::util::Color queryPreviewColorForNumber ([in] string aFormat, [in] double fValue, [in] com::sun::star::lang::Locale nLocale, [in] boolean bAllowEnglish, [in] com::sun::star::util::Color aDefaultColor) raises ( com::sun::star::util::MalformedNumberFormatException )
 returns the color which is to be used for a number. More...
 
- Public Member Functions inherited from XInterface
any queryInterface ([in] type aType)
 queries for a new interface to an existing UNO object. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 

Detailed Description

represents a number formatter which can preview number formats without inserting them.

See also
NumberFormatter
Developers Guide
Office Development - Number Formats

Member Function Documentation

◆ convertNumberToPreviewString()

string convertNumberToPreviewString ( [in] string  aFormat,
[in] double  fValue,
[in] com::sun::star::lang::Locale  nLocale,
[in] boolean  bAllowEnglish 
)
raises (com::sun::star::util::MalformedNumberFormatException
)

formats a value using a format string, without inserting a number format into the list.

Parameters
aFormatis the format string that is used for formatting.
fValueis the value that is formatted.
nLocaleis the locale that is used to interpret the format string.
bAllowEnglishspecifies if English language number format strings are accepted in addition to those from the selected locale.
Returns
the formatted string.
Exceptions
com::sun::star::util::MalformedNumberFormatExceptionif the format string is invalid.

◆ queryPreviewColorForNumber()

com::sun::star::util::Color queryPreviewColorForNumber ( [in] string  aFormat,
[in] double  fValue,
[in] com::sun::star::lang::Locale  nLocale,
[in] boolean  bAllowEnglish,
[in] com::sun::star::util::Color  aDefaultColor 
)
raises (com::sun::star::util::MalformedNumberFormatException
)

returns the color which is to be used for a number.

Parameters
aFormatis the format string that is used for formatting.
fValueis the value that is formatted.
nLocaleis the locale that is used to interpret the format string.
bAllowEnglishspecifies if English language number format strings are accepted in addition to those from the selected locale.
aDefaultColoris 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.
Exceptions
com::sun::star::util::MalformedNumberFormatExceptionif the format string is invalid.

The documentation for this interface was generated from the following file: