diff options
Diffstat (limited to 'xmloff/source/text/txtflde.cxx')
-rw-r--r-- | xmloff/source/text/txtflde.cxx | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx index 4c5ebb43d7ad..cc9ca75cfc8a 100644 --- a/xmloff/source/text/txtflde.cxx +++ b/xmloff/source/text/txtflde.cxx @@ -1261,17 +1261,17 @@ void XMLTextFieldExport::ExportFieldHelper( if (xPropSetInfo->hasPropertyByName(sPropertyDateTimeValue)) { // no value -> current time - ProcessDateTime(XML_TIME_VALUE, + ProcessTimeOrDateTime(XML_TIME_VALUE, GetDateTimeProperty(sPropertyDateTimeValue, rPropSet), - sal_False ); + XML_NAMESPACE_TEXT); } if (xPropSetInfo->hasPropertyByName(sPropertyDateTime)) { // no value -> current time - ProcessDateTime(XML_TIME_VALUE, + ProcessTimeOrDateTime(XML_TIME_VALUE, GetDateTimeProperty(sPropertyDateTime,rPropSet), - sal_False ); + XML_NAMESPACE_TEXT); } if (xPropSetInfo->hasPropertyByName(sPropertyIsFixed)) { @@ -2674,6 +2674,20 @@ void XMLTextFieldExport::ProcessDateTime(enum XMLTokenEnum eName, } } +/// export a time or dateTime +void XMLTextFieldExport::ProcessTimeOrDateTime(enum XMLTokenEnum eName, + const util::DateTime& rTime, + sal_uInt16 nPrefix) +{ + OUStringBuffer aBuffer; + + // date/time value + ::sax::Converter::convertTimeOrDateTime(aBuffer, rTime, 0); + + // output attribute + ProcessString(eName, aBuffer.makeStringAndClear(), sal_True, nPrefix); +} + SvXMLEnumMapEntry const aBibliographyDataTypeMap[] = { |