Language:

The Free and Open Productivity Suite
Apache OpenOffice 4.1.4 released

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous


:: 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

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache and the Apache feather logo are trademarks of The Apache Software Foundation. OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.