summaryrefslogtreecommitdiff
path: root/xmloff/source/style/xmlnumfi.cxx
diff options
context:
space:
mode:
authorNiklas Nebel <nn@openoffice.org>2002-05-22 09:46:12 +0000
committerNiklas Nebel <nn@openoffice.org>2002-05-22 09:46:12 +0000
commit517872a73f37155153460c52da5bba4469d695f0 (patch)
tree643724148a9bbef3c12a43f2b01fdae5892f6730 /xmloff/source/style/xmlnumfi.cxx
parente302f3bc5751dd45814d2be5c2940954cd6f684c (diff)
#99391# dont use standard formats for automatic elements with conditions or colors
Diffstat (limited to 'xmloff/source/style/xmlnumfi.cxx')
-rw-r--r--xmloff/source/style/xmlnumfi.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 68d0d43f903a..7c504607c41b 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlnumfi.cxx,v $
*
- * $Revision: 1.23 $
+ * $Revision: 1.24 $
*
- * last change: $Author: sab $ $Date: 2002-05-08 12:38:21 $
+ * last change: $Author: nn $ $Date: 2002-05-22 10:46:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1418,14 +1418,19 @@ void SvXMLNumFormatContext::CreateAndInsert(sal_Bool bOverwrite)
if ( bAutoDec ) // automatic decimal places
{
- if ( nType == XML_TOK_STYLES_NUMBER_STYLE && !bHasExtraText )
+ // #99391# adjust only if the format contains no text elements, no conditions
+ // and no color definition (detected by the '[' at the start)
+
+ if ( nType == XML_TOK_STYLES_NUMBER_STYLE && !bHasExtraText &&
+ aMyConditions.size() == 0 && sFormat.toChar() != (sal_Unicode)'[' )
nIndex = pFormatter->GetStandardIndex( nFormatLang );
}
if ( bAutoInt ) // automatic integer digits
{
//! only if two decimal places was set?
- if ( nType == XML_TOK_STYLES_NUMBER_STYLE && !bHasExtraText )
+ if ( nType == XML_TOK_STYLES_NUMBER_STYLE && !bHasExtraText &&
+ aMyConditions.size() == 0 && sFormat.toChar() != (sal_Unicode)'[' )
nIndex = pFormatter->GetFormatIndex( NF_NUMBER_SYSTEM, nFormatLang );
}