summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2011-12-01 21:03:42 +0100
committerEike Rathke <erack@redhat.com>2011-12-01 21:04:29 +0100
commit86adb5cacb4fe3e7fb869299447da5876f0da30d (patch)
treef7998dd1a12a82ca53a4fa155cdf5536ac25ef62 /forms
parentb20ea84970fb8b3068880a361822941c47f50edd (diff)
get rid of class Date and Time default ctor with system time penalty
Diffstat (limited to 'forms')
-rw-r--r--forms/source/xforms/xpathlib/xpathlib.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx
index 45bde1166461..5168fd7cd705 100644
--- a/forms/source/xforms/xpathlib/xpathlib.cxx
+++ b/forms/source/xforms/xpathlib/xpathlib.cxx
@@ -287,7 +287,7 @@ void xforms_nowFunction(xmlXPathParserContextPtr ctxt, int /*nargs*/)
be omitted or, if present, the time zone must be Coordinated Universal Time (UTC)
indicated by a "Z".
*/
- DateTime aDateTime;
+ DateTime aDateTime( DateTime::SYSTEM );
::rtl::OString aDateTimeString = makeDateTimeString(aDateTime);
xmlChar *pString = static_cast<xmlChar*>(xmlMalloc(aDateTimeString.getLength()+1));
strncpy((char*)pString, (char*)aDateTimeString.getStr(), aDateTimeString.getLength());
@@ -347,7 +347,7 @@ void xforms_daysFromDateFunction(xmlXPathParserContextPtr ctxt, int nargs)
if (xmlXPathCheckError(ctxt)) XP_ERROR(XPATH_INVALID_TYPE);
::rtl::OUString aString((char*)pString, strlen((char*)pString), RTL_TEXTENCODING_UTF8);
- DateTime aDateTime;
+ DateTime aDateTime( DateTime::EMPTY );
if (parseDateTime(aString, aDateTime))
{
Date aReferenceDate(1, 1, 1970);
@@ -370,7 +370,7 @@ void xforms_secondsFromDateTimeFunction(xmlXPathParserContextPtr ctxt, int nargs
if (xmlXPathCheckError(ctxt)) XP_ERROR(XPATH_INVALID_TYPE);
::rtl::OUString aString((char*)pString, strlen((char*)pString), RTL_TEXTENCODING_UTF8);
- DateTime aDateTime;
+ DateTime aDateTime( DateTime::EMPTY );
if (parseDateTime(aString, aDateTime))
{