sw content controls, date: add current date handling

Desktop / LibreOffice - Miklos Vajna [collabora.com] - 27 May 2022 10:11 UTC

While working on the DOCX import for dates, it turns out there is a need to store the selected date in machine-readable format as well. This is useful, because once the timestamp is formatted, the user is allowed to hand-edit the result, so otherwise the selected date would be lost.

This commit adds:

- doc model & UNO API

- click handler (store the selected date, default to the current date in the date picker if possible)

- ODT filter

- DOCX export

And tests for all these.

Change-Id: I00f4e87ebfe0e8a19486367c32d472ccd2ff16a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135035

79baafccf3d3 sw content controls, date: add current date handling
.../OpenDocument-v1.3+libreoffice-schema.rng | 5 ++
sw/inc/formatcontentcontrol.hxx | 13 +++++
sw/inc/unoprnms.hxx | 1 +
sw/qa/core/unocore/unocore.cxx | 3 ++
sw/qa/uibase/wrtsh/wrtsh.cxx | 2 +
sw/source/core/crsr/datecontentcontrolbutton.cxx | 12 +++++
sw/source/core/txtnode/attrcontentcontrol.cxx | 63 +++++++++++++++++++++-
sw/source/core/unocore/unocontentcontrol.cxx | 28 ++++++++++
sw/source/core/unocore/unomap1.cxx | 2 +-
sw/source/filter/ww8/docxattributeoutput.cxx | 10 +++-
sw/source/uibase/wrtsh/wrtsh3.cxx | 5 +-
xmloff/qa/unit/data/content-control-date.fodt | 2 +-
xmloff/qa/unit/text.cxx | 6 +++
xmloff/source/text/txtparae.cxx | 6 +++
xmloff/source/text/xmlcontentcontrolcontext.cxx | 9 ++++
xmloff/source/text/xmlcontentcontrolcontext.hxx | 1 +
16 files changed, 163 insertions(+), 5 deletions(-)

Upstream: cgit.freedesktop.org


  • Share