[Libreoffice-commits] core.git: include/vcl vcl/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Sat Feb 29 06:28:35 UTC 2020
include/vcl/vclenum.hxx | 5 ++++-
vcl/source/control/field2.cxx | 26 ++++++++++++++++++++++++++
2 files changed, 30 insertions(+), 1 deletion(-)
New commits:
commit 9cb07cdca78e2cb1ecff84b7a8e154b23cc2a46d
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Feb 27 21:11:12 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sat Feb 29 07:27:59 2020 +0100
tdf#130515 Time field in Base form will not display correct format
regression from
commit 65b7b6322b662785bf032e66c76abc36c9a2bb0e
Date: Wed Feb 8 10:40:28 2017 +0200
loplugin:unusedenumconstants read-only constants in vcl
Change-Id: Icf2e385763c8ece34521895331d148a5baacf2d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89706
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx
index 738dca1fc3b0..b5423b46e5de 100644
--- a/include/vcl/vclenum.hxx
+++ b/include/vcl/vclenum.hxx
@@ -147,7 +147,10 @@ enum class TimeFormat
enum class ExtTimeFieldFormat
{
- Short24H, Long24H
+ /** the first 4 of these are only used by base/dbaccess */
+ Short24H, Long24H,
+ Short12H, Long12H,
+ ShortDuration, LongDuration
};
enum class ExtDateFieldFormat
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 8b706b513f41..da400911d0ca 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -2601,6 +2601,32 @@ void TimeField::SetExtFormat( ExtTimeFieldFormat eFormat )
SetFormat( TimeFieldFormat::F_SEC );
}
break;
+ case ExtTimeFieldFormat::Short12H:
+ {
+ SetTimeFormat( TimeFormat::Hour12 );
+ SetDuration( false );
+ SetFormat( TimeFieldFormat::F_NONE );
+ }
+ break;
+ case ExtTimeFieldFormat::Long12H:
+ {
+ SetTimeFormat( TimeFormat::Hour12 );
+ SetDuration( false );
+ SetFormat( TimeFieldFormat::F_SEC );
+ }
+ break;
+ case ExtTimeFieldFormat::ShortDuration:
+ {
+ SetDuration( true );
+ SetFormat( TimeFieldFormat::F_NONE );
+ }
+ break;
+ case ExtTimeFieldFormat::LongDuration:
+ {
+ SetDuration( true );
+ SetFormat( TimeFieldFormat::F_SEC );
+ }
+ break;
default: OSL_FAIL( "ExtTimeFieldFormat unknown!" );
}
More information about the Libreoffice-commits
mailing list