Top   Module   Use   Manual   Index 
 EXPORTING SERVICES | METHODS' SUMMARY | METHODS' DETAILS 

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

interface XNumberFormatter

Base Interface
com::sun::star::uno::XInterface

Description
represents a number formatter.


Known Services which Export this Interface

com::sun::star::util::NumberFormatter specifies an object which can format numbers and strings.

Methods' Summary

attachNumberFormatsSupplier attaches an XNumberFormatsSupplier to this NumberFormatter .
getNumberFormatsSupplier
detectNumberFormat detects the number format in a string which contains a formatted number.
convertStringToNumber converts a string which contains a formatted number into a number.
convertNumberToString converts a number into a string.
queryColorForNumber
formatString converts a string into another string.
queryColorForString
getInputString converts a number into a string with the specified format.

Methods' Details

attachNumberFormatsSupplier
 
void
attachNumberFormatsSupplier(
[ in ] com::sun::star::util::XNumberFormatsSupplier xSupplier );

Description
attaches an XNumberFormatsSupplier to this NumberFormatter .

This NumberFormatter will only use the NumberFormats specified in the attached XNumberFormatsSupplier . Without an attached XNumberFormatsSupplier , no formatting is possible.

getNumberFormatsSupplier
 
com::sun::star::util::XNumberFormatsSupplier
getNumberFormatsSupplier();
Returns
the attached NumberFormatsSupplier .
detectNumberFormat
 
long
detectNumberFormat(
[ in ] long nKey,
[ in ] string aString )
raises ( com::sun::star::util::NotNumericException );

Description
detects the number format in a string which contains a formatted number.
convertStringToNumber
 
double
convertStringToNumber(
[ in ] long nKey,
[ in ] string aString )
raises ( com::sun::star::util::NotNumericException );

Description
converts a string which contains a formatted number into a number.

If this is a text format, the string will not be converted.

convertNumberToString
 
string
convertNumberToString(
[ in ] long nKey,
[ in ] double fValue );

Description
converts a number into a string.
queryColorForNumber
 
com::sun::star::util::color
queryColorForNumber(
[ in ] long nKey,
[ in ] double fValue,
[ in ] com::sun::star::util::color aDefaultColor );

Returns
the color which is specified for the given value in the number format, which is otherwise the value of aDefaultColor .
formatString
 
string
formatString(
[ in ] long nKey,
[ in ] string aString );

Description
converts a string into another string.
queryColorForString
 
com::sun::star::util::color
queryColorForString(
[ in ] long nKey,
[ in ] string aString,
[ in ] com::sun::star::util::color aDefaultColor );

Returns
the color which is specified for the given string in the number format, which is otherwise the value of aDefaultColor .
getInputString
 
string
getInputString(
[ in ] long nKey,
[ in ] double fValue );

Description
converts a number into a string with the specified format.

This string can always be converted back to a number using the same format.


Top of Page