diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-06-14 22:00:07 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-07-12 03:16:57 +0200 |
commit | 1df055ba2a01a4c83d90c7c64998e7950ca8d795 (patch) | |
tree | 7d2df53d6320712054160c8c4242bed721911001 /sw/source/ui/dialog | |
parent | 836d688476afc22288c4f032af07c7d65d553c68 (diff) |
MSForms: Implement calculation of the displayed text in date form field
* Change ODF_FORMDATE_DATEFORMAT to store the date format in
a standard way (e.g. "MM.DD.YY")
* Also add a new attribute called ODF_FORMDATE_DATEFORMAT_LANGUAGE
to store the language for the date format.
* Set a default date format and language by insertion.
* Display the date in the field using the set format.
* Store the current date in a specific format, which will make
import / export easier (MSO DOCX format).
Change-Id: I852975bbf81556f0e21f8f85d1c293707fdf672e
Reviewed-on: https://gerrit.libreoffice.org/75444
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'sw/source/ui/dialog')
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.hxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index c94c75b1f428..8df610df64d7 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -878,9 +878,9 @@ VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateDropDownFormFieldD return VclPtr<AbstractDropDownFormFieldDialog_Impl>::Create(std::make_unique<sw::DropDownFormFieldDialog>(pParent, pDropDownField)); } -VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateDateFormFieldDialog(weld::Widget *pParent, sw::mark::IFieldmark* pDateField) +VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateDateFormFieldDialog(weld::Widget *pParent, sw::mark::IFieldmark* pDateField, SwDoc* pDoc) { - return VclPtr<AbstractDateFormFieldDialog_Impl>::Create(std::make_unique<sw::DateFormFieldDialog>(pParent, pDateField)); + return VclPtr<AbstractDateFormFieldDialog_Impl>::Create(std::make_unique<sw::DateFormFieldDialog>(pParent, pDateField, pDoc)); } VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwEnvDlg(weld::Window* pParent, const SfxItemSet& rSet, diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 8c70da33a556..7638f7d150fd 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -652,7 +652,7 @@ public: virtual VclPtr<AbstractDropDownFieldDialog> CreateDropDownFieldDialog(weld::Widget* pParent, SwWrtShell &rSh, SwField* pField, bool bPrevButton, bool bNextButton) override; virtual VclPtr<VclAbstractDialog> CreateDropDownFormFieldDialog(weld::Widget* pParent, sw::mark::IFieldmark* pDropDownField) override; - virtual VclPtr<VclAbstractDialog> CreateDateFormFieldDialog(weld::Widget* pParent, sw::mark::IFieldmark* pDateField) override; + virtual VclPtr<VclAbstractDialog> CreateDateFormFieldDialog(weld::Widget* pParent, sw::mark::IFieldmark* pDateField, SwDoc* pDoc) override; virtual VclPtr<SfxAbstractTabDialog> CreateSwEnvDlg(weld::Window* pParent, const SfxItemSet& rSet, SwWrtShell* pWrtSh, Printer* pPrt, bool bInsert) override; virtual VclPtr<AbstractSwLabDlg> CreateSwLabDlg(weld::Window* pParent, const SfxItemSet& rSet, |