diff options
Diffstat (limited to 'svl/inc')
-rw-r--r-- | svl/inc/svl/zforlist.hxx | 13 | ||||
-rw-r--r-- | svl/inc/svl/zformat.hxx | 7 |
2 files changed, 19 insertions, 1 deletions
diff --git a/svl/inc/svl/zforlist.hxx b/svl/inc/svl/zforlist.hxx index 00f2dbe92b4c..598295797ea6 100644 --- a/svl/inc/svl/zforlist.hxx +++ b/svl/inc/svl/zforlist.hxx @@ -333,6 +333,17 @@ class SvNumberFormatterRegistry_Impl; class SVL_DLLPUBLIC SvNumberFormatter { public: + /** + * We can't technically have an "infinite" value, so we use an arbitrary + * upper precision threshold to represent the "unlimited" precision. + */ + static const sal_uInt16 UNLIMITED_PRECISION; + + /** + * Precision suitable for numbers displayed in input bar, for instance + * Calc's formula input bar. + */ + static const sal_uInt16 INPUTSTRING_PRECISION; /// Preferred ctor with service manager and language/country enum SvNumberFormatter( @@ -583,7 +594,7 @@ public: /// Return the reference date Date* GetNullDate(); /// Return the standard decimal precision - short GetStandardPrec(); + sal_uInt16 GetStandardPrec(); /// Return whether zero suppression is switched on BOOL GetNoZero() { return bNoZero; } /** Get the type of a format (or NUMBERFORMAT_UNDEFINED if no entry), diff --git a/svl/inc/svl/zformat.hxx b/svl/inc/svl/zformat.hxx index 7cdcf4db518d..7c361382796a 100644 --- a/svl/inc/svl/zformat.hxx +++ b/svl/inc/svl/zformat.hxx @@ -236,6 +236,12 @@ public: // in fact that could be any string used in number formats. static void LoadString( SvStream& rStream, String& rStr ); + /** + * Get output string from a numeric value that fits the number of + * characters specified. + */ + bool GetOutputString( double fNumber, sal_uInt16 nCharCount, String& rOutString ) const; + BOOL GetOutputString( double fNumber, String& OutString, Color** ppColor ); BOOL GetOutputString( String& sString, String& OutString, Color** ppColor ); @@ -487,6 +493,7 @@ private: // standard number output SVL_DLLPRIVATE void ImpGetOutputStandard( double& fNumber, String& OutString ); + SVL_DLLPRIVATE void ImpGetOutputStdToPrecision( double& rNumber, String& rOutString, sal_uInt16 nPrecision ) const; // numbers in input line SVL_DLLPRIVATE void ImpGetOutputInputLine( double fNumber, String& OutString ); |