interface XNumberFormats in module com::sun::star::util::

(Global Index)

Syntax

interface XNumberFormats : com::sun::star::uno::XInterface ;

Description

provides access to multiple NumberFormat s.

Method Summary

getByKey

queryKeys

queryKey finds a number format by its format string and returns its key.

addNew adds a new number format to the list, using a format string.

addNewConverted adds a new number format to the list, using a format string in a different locale than the desired locale of the resulting number format.

removeByKey removes a number format from the list.

generateFormat generates a format string from several parameters without creating an actual number format.

Known Services Which Export this Interface

com::sun::star::util::NumberFormats

Method Details



getByKey

Syntax

com::sun::star::beans::XPropertySet getByKey (
long nKey );

Returns

a readonly NumberFormatProperties .

queryKeys

Syntax

sequence< long > queryKeys (
short nType,
com::sun::star::lang::Locale nLocale,
boolean bCreate );

Returns

a sequence of the keys of all number formats with the specified type and language.

Parameter nType

the type of number formats to return. Must be one of the NumberFormat constants.

Parameter nLanguage

the language of number formats to return.

Parameter bCreate

true : create new entries if no formats for the selected language exist
false : return an empty list if no formats for the selected language exist

queryKey

Syntax

long queryKey (
string aFormat,
com::sun::star::lang::Locale nLocale,
boolean bScan );

Description

finds a number format by its format string and returns its key.


addNew

Syntax

long addNew (
string aFormat,
com::sun::star::lang::Locale nLocale )
raises ( com::sun::star::util::MalformedNumberFormatException );

Description

adds a new number format to the list, using a format string.


addNewConverted

Syntax

long addNewConverted (
string aFormat,
com::sun::star::lang::Locale nLocale,
com::sun::star::lang::Locale nNewLocale )
raises ( com::sun::star::util::MalformedNumberFormatException );

Description

adds a new number format to the list, using a format string in a different locale than the desired locale of the resulting number format.


removeByKey

Syntax

void removeByKey (
long nKey );

Description

removes a number format from the list.


generateFormat

Syntax

string generateFormat (
long nBaseKey,
com::sun::star::lang::Locale nLocale,
boolean bThousands,
boolean bRed,
short nDecimals,
short nLeading );

Description

generates a format string from several parameters without creating an actual number format.

Top of Page