summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2004-10-22 06:55:57 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2004-10-22 06:55:57 +0000
commit6e43ea7b509b055e1058bac59568f436d0676861 (patch)
tree06cb6a30708c42872e97d1d66b957d62e2a4a991 /xmloff
parent12cf5fe2736514b27fa28213307a44d43d003aff (diff)
INTEGRATION: CWS calc23 (1.35.60); FILE MERGED
2004/10/08 10:32:57 nn 1.35.60.1: #i18114# handle fractions without integer part
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/xmlnumfi.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 1eac87ad42..9759101e85 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlnumfi.cxx,v $
*
- * $Revision: 1.35 $
+ * $Revision: 1.36 $
*
- * last change: $Author: rt $ $Date: 2004-07-13 08:27:49 $
+ * last change: $Author: rt $ $Date: 2004-10-22 07:55:57 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1170,13 +1170,17 @@ void SvXMLNumFmtElementContext::EndElement()
case XML_TOK_STYLE_FRACTION:
{
- aNumInfo.nDecimals = 0;
- rParent.AddNumber( aNumInfo ); // number without decimals
+ if ( aNumInfo.nInteger >= 0 )
+ {
+ // add integer part only if min-integer-digits attribute is there
+ aNumInfo.nDecimals = 0;
+ rParent.AddNumber( aNumInfo ); // number without decimals
+ rParent.AddToCode( OUString::valueOf((sal_Unicode)' ') );
+ }
//! build string and add at once
sal_Int32 i;
- rParent.AddToCode( OUString::valueOf((sal_Unicode)' ') );
for (i=0; i<aNumInfo.nNumerDigits; i++)
rParent.AddToCode( OUString::valueOf((sal_Unicode)'?') );
rParent.AddToCode( OUString::valueOf((sal_Unicode)'/') );