Methods' Details |
getByKey
|
queryKeys
sequence< long > |
queryKeys( |
[in] short |
nType, |
| [in] ::com::sun::star::lang::Locale |
nLocale, |
| [in] 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 nLocale
- the locale 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
long |
queryKey( |
[in] string |
aFormat, |
| [in] ::com::sun::star::lang::Locale |
nLocale, |
| [in] boolean |
bScan ); |
- Description
- finds a number format by its format string and returns its key.
- Returns
- the key for the format if found, otherwise -1.
- Parameter aFormat
- the string representation of the number format
- Parameter nLocale
- the locale for number formats to find
- Parameter bScan
- reserved for future use and should be set to false
|
|
addNew
- Description
- adds a new number format to the list, using a format string.
- Returns
- the key for new number format
- Parameter aFormat
- the string representation of the number format
- Parameter nLocale
- the locale for the number format
- Throws
- com::sun::star::util::MalformedNumberFormatException
if incorrect number format is specified
|
|
addNewConverted
- 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.
- Returns
- the key for added number format
- Parameter aFormat
- the key for the number format
- Parameter nLocale
- the original locale for the number format
- Parameter nNewLocale
- the new locale for the number format to be converted
- Throws
- com::sun::star::util::MalformedNumberFormatException
if incorrect number format is specified
|
|
removeByKey
void |
removeByKey( |
[in] long |
nKey ); |
- Description
- removes a number format from the list.
- Parameter nKey
- the key for the numberformat
|
|
generateFormat
string |
generateFormat( |
[in] long |
nBaseKey, |
| [in] ::com::sun::star::lang::Locale |
nLocale, |
| [in] boolean |
bThousands, |
| [in] boolean |
bRed, |
| [in] short |
nDecimals, |
| [in] short |
nLeading ); |
- Description
- generates a format string from several parameters without
creating an actual number format.
- Returns
- the string representation for the number format
- Parameter nBaseKey
- the key for the number format to be used as base format
- Parameter nLocale
- the locale for the number format
- Parameter bThousands
- the thousands separator is shown or not
- Parameter bRed
- show negative number in red colored if true
- Parameter nDecimals
- how many digits are shown after the decimal point
- Parameter nLeading
- how many number of leading zeros are shown
|
|
Copyright © 2024, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.