summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/dialogs
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-10-20 22:51:02 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-10-21 10:30:58 +0200
commit7e5f69aa33509a359b547b9a4a6569a55cd5d5c9 (patch)
treed5956d0364044238979ef22319259d8c4a97b46f /xmlsecurity/source/dialogs
parent04921e20b4d3d08a4b78dbafe26c983075fe5630 (diff)
Make tools::Time ctor taking sal_Int64 private
This ctor is meant to set the value of nTime directly; and that value is not nanoseconds, but an encoded value, using SEC_/MIN_/HOUR_MASK. But in some places, this ctor was misused for setting of nanoseconds, which would only accidentally work for values less than one second. All places that initialized tools::Time with 0, now use EMPTY. This makes the ctor private; and for the very few cases where really the encoded value of nTime is stored / restored, fromEncodedTime is introduced. Change-Id: I1f1994bd9aab1b51a41b1de637619049fe820da4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175283 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'xmlsecurity/source/dialogs')
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 5ef8449bff08..2cd3e11e8571 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -193,12 +193,12 @@ CertificateViewerDetailsTP::CertificateViewerDetailsTP(weld::Container* pParent,
DateTime aDateTime( DateTime::EMPTY );
utl::typeConvert( xCert->getNotValidBefore(), aDateTime );
- aLBEntry = Application::GetSettings().GetUILocaleDataWrapper().getDate(Date(aDateTime.GetDate())) + " ";
- aLBEntry += Application::GetSettings().GetUILocaleDataWrapper().getTime(tools::Time(aDateTime.GetTime()));
+ aLBEntry = Application::GetSettings().GetUILocaleDataWrapper().getDate(aDateTime) + " ";
+ aLBEntry += Application::GetSettings().GetUILocaleDataWrapper().getTime(aDateTime);
InsertElement( XsResId( STR_VALIDFROM ), aLBEntry, aLBEntry );
utl::typeConvert( xCert->getNotValidAfter(), aDateTime );
- aLBEntry = Application::GetSettings().GetUILocaleDataWrapper().getDate(Date(aDateTime.GetDate()) ) + " ";
- aLBEntry += Application::GetSettings().GetUILocaleDataWrapper().getTime(tools::Time(aDateTime.GetTime()));
+ aLBEntry = Application::GetSettings().GetUILocaleDataWrapper().getDate(aDateTime) + " ";
+ aLBEntry += Application::GetSettings().GetUILocaleDataWrapper().getTime(aDateTime);
InsertElement( XsResId( STR_VALIDTO ), aLBEntry, aLBEntry );
std::pair< OUString, OUString > pairSubject =