diff options
author | Eike Rathke <erack@redhat.com> | 2019-08-19 17:05:15 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2019-08-19 18:31:08 +0200 |
commit | 4ffb036fd5858c1acee9930e8f03d8b8a0d88730 (patch) | |
tree | dce1e0a0f3cecb8d5799aa4c7450a896f2d42105 /svx | |
parent | cc4084cf6da45c358e88d88fdb340de3ae713039 (diff) |
Resolves: tdf#72040 add predefined ISO 8601 date+time format with "T"
Still missing is selecting the format if such input is detected,
but if applied it is preserved as edit format when editing the
value.
Change-Id: Ic36a643bb90ac897a303d5d59782aa4b297a56ea
Reviewed-on: https://gerrit.libreoffice.org/77732
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/items/numfmtsh.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx index 85c051fbc226..8f39c009351f 100644 --- a/svx/source/items/numfmtsh.cxx +++ b/svx/source/items/numfmtsh.cxx @@ -688,7 +688,8 @@ short SvxNumberFormatShell::FillEListWithDateTime_Impl(std::vector<OUString>& rL // Ugly hack to suppress an ISO date+time format that is the // default date+time format of the locale and identical to the // internally generated one to be added below. - if (!bSuppressDuplicates || aNewFormNInfo != "YYYY-MM-DD HH:MM:SS") + if (!bSuppressDuplicates || (aNewFormNInfo != "YYYY-MM-DD HH:MM:SS" + && aNewFormNInfo != "YYYY-MM-DD\"T\"HH:MM:SS")) { rList.push_back(aNewFormNInfo); aCurEntryList.push_back(nNFEntry); @@ -697,9 +698,9 @@ short SvxNumberFormatShell::FillEListWithDateTime_Impl(std::vector<OUString>& rL } } - // Always add the internally generated ISO format. + // Always add the internally generated ISO formats. nSelPos = FillEListWithFormats_Impl(rList, nSelPos, NF_DATETIME_ISO_YYYYMMDD_HHMMSS, - NF_DATETIME_ISO_YYYYMMDD_HHMMSS, false); + NF_DATETIME_ISO_YYYYMMDDTHHMMSS, false); return nSelPos; } @@ -720,6 +721,7 @@ bool SvxNumberFormatShell::IsEssentialFormat_Impl(SvNumFormatType eType, sal_uIn case NF_TIME_HH_MMSS00: case NF_DATETIME_SYS_DDMMYYYY_HHMMSS: case NF_DATETIME_ISO_YYYYMMDD_HHMMSS: + case NF_DATETIME_ISO_YYYYMMDDTHHMMSS: return true; default: break; |