summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-11-09 16:42:16 +0100
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2018-11-12 14:52:09 +0100
commit9c5d3e5c59a9d0ffcb5fd99f5d4c98b0f6b5560e (patch)
tree21e1f2cd8b791414812a484f7df8691ac4e2e594 /unotools
parent3d885f20269dd4b7485fbe09c70014646e799366 (diff)
tdf#118581 Correctly display issuer name in signature line
Move the xmlsec helper methods to comphelper so that we can use them in cui Change-Id: If9b10cfff5f5abd6b16e48f043af7959edbb1142 Reviewed-on: https://gerrit.libreoffice.org/63198 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/misc/datetime.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/unotools/source/misc/datetime.cxx b/unotools/source/misc/datetime.cxx
index 55c61988c8c8..979db79e13cd 100644
--- a/unotools/source/misc/datetime.cxx
+++ b/unotools/source/misc/datetime.cxx
@@ -18,12 +18,14 @@
*/
#include <unotools/datetime.hxx>
+#include <unotools/syslocale.hxx>
#include <tools/date.hxx>
#include <tools/time.hxx>
#include <tools/datetime.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
#include <osl/diagnose.h>
+#include <vcl/svapp.hxx>
#include <sstream>
namespace
@@ -193,6 +195,27 @@ namespace
namespace utl
{
+const LocaleDataWrapper& GetLocaleData()
+{
+ static SvtSysLocale ourSysLocale;
+ return ourSysLocale.GetLocaleData();
+}
+
+DateTime GetDateTime(const css::util::DateTime& _rDT) { return DateTime(_rDT); }
+
+OUString GetDateTimeString(const css::util::DateTime& _rDT)
+{
+ // String with date and time information (#i20172#)
+ DateTime aDT(GetDateTime(_rDT));
+ const LocaleDataWrapper& rLoDa = GetLocaleData();
+
+ return rLoDa.getDate(aDT) + " " + rLoDa.getTime(aDT);
+}
+
+OUString GetDateString(const css::util::DateTime& _rDT)
+{
+ return GetLocaleData().getDate(GetDateTime(_rDT));
+}
void typeConvert(const Date& _rDate, css::util::Date& _rOut)
{