summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalte Timmermann <mt@openoffice.org>2001-07-20 13:10:33 +0000
committerMalte Timmermann <mt@openoffice.org>2001-07-20 13:10:33 +0000
commit88328822ded74eb5b58b5284adac12f7a0321187 (patch)
treefc1668a820061a51f88e3fa5dbfd8bd304687644
parent653da09ca5ce42c6d28edf443e3d009a653545c3 (diff)
#87799# SetShowTrailingZeros
-rw-r--r--vcl/source/control/field.cxx18
1 files changed, 15 insertions, 3 deletions
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index fe470c1c703b..a99b37e4a64f 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: field.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: mt $ $Date: 2001-07-20 13:19:24 $
+ * last change: $Author: mt $ $Date: 2001-07-20 14:10:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -477,6 +477,7 @@ void NumericFormatter::ImplInit()
mnDecimalDigits = 2;
mnType = FORMAT_NUMERIC;
mbThousandSep = TRUE;
+ mbShowTrailingZeros = TRUE;
// Fuer Felder...
mnSpinSize = 1;
@@ -573,6 +574,17 @@ void NumericFormatter::SetDecimalDigits( USHORT nDigits )
// -----------------------------------------------------------------------
+void NumericFormatter::SetShowTrailingZeros( BOOL bShowTrailingZeros )
+{
+ if ( mbShowTrailingZeros != bShowTrailingZeros )
+ {
+ mbShowTrailingZeros = bShowTrailingZeros;
+ ReformatAll();
+ }
+}
+
+// -----------------------------------------------------------------------
+
USHORT NumericFormatter::GetDecimalDigits() const
{
return mnDecimalDigits;
@@ -591,7 +603,7 @@ void NumericFormatter::SetValue( long nNewValue )
XubString NumericFormatter::CreateFieldText( long nValue ) const
{
- return ImplGetLocaleDataWrapper().getNum( nValue, GetDecimalDigits(), IsUseThousandSep() );
+ return ImplGetLocaleDataWrapper().getNum( nValue, GetDecimalDigits(), IsUseThousandSep(), IsShowTrailingZeros() );
}
// -----------------------------------------------------------------------