diff options
author | Jacobo Aragunde Pérez <jaragunde@igalia.com> | 2014-03-07 18:04:09 +0100 |
---|---|---|
committer | Jacobo Aragunde Pérez <jaragunde@igalia.com> | 2014-03-08 17:50:59 +0100 |
commit | b2385830711ec700956869ace7670edd845a50df (patch) | |
tree | 3ecc5b0eb28f5511aaf864639494273ba418cea6 /include | |
parent | 4dcad28a5e2415c81d018bf38b4e8ed10f42da79 (diff) |
ooxml: export date controls properly
Export date controls as ooxml Standard Document Tags (SDT) instead
of replacing them with plain text.
SDT date controls contain the date in ISO format as an attribute of
<date> tag, a custom date format that can be specified by the user
in the <dateFormat> tag and the date formatted in that custom format
in the <w:sdtContent> tag.
The unit test testFormControl from ooxmlexport suite was removed,
it only checked if the date control was exported as text and it
obviously fails now. A new test that checks the values of the
exported control was written instead.
A pair of date format functions were added to datetimeutils.hxx.
TODO: to avoid supporting all the posible custom formats that can be
specified in the <dateFormat> tag, it is forced to dd/mm/yyyy on
export.
Change-Id: I9d1b6f840ee9e133831fdb04ad399fe31bcb2063
Diffstat (limited to 'include')
-rw-r--r-- | include/tools/datetimeutils.hxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/tools/datetimeutils.hxx b/include/tools/datetimeutils.hxx index 840403bf002d..28766ee8a968 100644 --- a/include/tools/datetimeutils.hxx +++ b/include/tools/datetimeutils.hxx @@ -15,6 +15,12 @@ // This function converts a 'DateTime' object to an 'OString' object TOOLS_DLLPUBLIC OString DateTimeToOString( const DateTime& rDateTime ); +// This function converts a 'Date' object to an 'OString' object in ISO-8601 representation +TOOLS_DLLPUBLIC OString DateToOString( const Date& rDate ); + +// This function converts a 'Date' object to an 'OString' object in DD/MM/YYYY format +TOOLS_DLLPUBLIC OString DateToDDMMYYYYOString( const Date& rDate ); + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |