diff options
author | Niklas Nebel <nn@openoffice.org> | 2001-03-19 13:52:15 +0000 |
---|---|---|
committer | Niklas Nebel <nn@openoffice.org> | 2001-03-19 13:52:15 +0000 |
commit | 375a281f2b847dfcd2a104a909232036bf4f1725 (patch) | |
tree | c7c78bfbef8115805a30c825e0a1d5d3ea78eac9 /xmloff | |
parent | bd0622ef0fe1392f8149ec60d4c556f588a77a4c (diff) |
#85109# ExportPart: for AutoOrder and SystemDate, check format type
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/xmlnumfe.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 35252b8ed24c..e511ddc4326e 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmlnumfe.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: er $ $Date: 2001-01-26 17:22:23 $ + * last change: $Author: nn $ $Date: 2001-03-19 14:52:15 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1094,8 +1094,12 @@ void SvXMLNumFmtExport::ExportPart_Impl( SvNumberformat& rFormat, sal_uInt32 nKe eBuiltIn == NF_DATE_SYS_DMMMYY || eBuiltIn == NF_DATE_SYS_DMMMYYYY || eBuiltIn == NF_DATE_SYS_DMMMMYYYY || eBuiltIn == NF_DATE_SYS_NNDMMMYY || eBuiltIn == NF_DATE_SYS_NNDMMMMYYYY || eBuiltIn == NF_DATE_SYS_NNNNDMMMMYYYY ); - if ( bAutoOrder ) + if ( bAutoOrder && + ( nFmtType == NUMBERFORMAT_CURRENCY || nFmtType == NUMBERFORMAT_DATE || nFmtType == NUMBERFORMAT_DATETIME ) ) { + // #85109# format type must be checked to avoid dtd errors if + // locale data contains other format types at the built-in positions + sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER, OUString::createFromAscii( sXML_automatic_order ) ); sAttrValue = OUString::createFromAscii( sXML_true ); @@ -1111,8 +1115,12 @@ void SvXMLNumFmtExport::ExportPart_Impl( SvNumberformat& rFormat, sal_uInt32 nKe // test if all date elements match the system settings if ( bSystemDate && !lcl_MatchesSystemDate( rFormat, nPart, bLongSysDate ) ) bSystemDate = sal_False; - if ( bSystemDate ) + if ( bSystemDate && + ( nFmtType == NUMBERFORMAT_DATE || nFmtType == NUMBERFORMAT_DATETIME ) ) { + // #85109# format type must be checked to avoid dtd errors if + // locale data contains other format types at the built-in positions + sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_NUMBER, OUString::createFromAscii( sXML_format_source ) ); sAttrValue = OUString::createFromAscii( sXML_language ); |