diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-07-11 15:40:26 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-07-12 00:59:54 +0200 |
commit | bbf795bf546f6510a8cf972d8f023b0cae178a72 (patch) | |
tree | 455d1bff0d3704d4690011e37410de397b874846 /tools | |
parent | 21e8f4d54d6042d7d472aa28aba958cc70705629 (diff) |
callcatcher: remove unused INetRFC822Message::GenerateDateField
Diffstat (limited to 'tools')
-rw-r--r-- | tools/inc/tools/inetmsg.hxx | 2 | ||||
-rw-r--r-- | tools/source/inet/inetmsg.cxx | 69 |
2 files changed, 1 insertions, 70 deletions
diff --git a/tools/inc/tools/inetmsg.hxx b/tools/inc/tools/inetmsg.hxx index d988ad9758d2..cfdd78153e47 100644 --- a/tools/inc/tools/inetmsg.hxx +++ b/tools/inc/tools/inetmsg.hxx @@ -282,8 +282,6 @@ public: INetRFC822Message& operator= (const INetRFC822Message& rMsg); - static sal_Bool GenerateDateField ( - const DateTime& rDateTime, UniString& rDateField); static sal_Bool ParseDateField ( const UniString& rDateField, DateTime& rDateTime); diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx index f7d83d9cf238..235d6fd4d20b 100644 --- a/tools/source/inet/inetmsg.cxx +++ b/tools/source/inet/inetmsg.cxx @@ -296,13 +296,8 @@ INetRFC822Message::~INetRFC822Message (void) } /* - * <Generate|Parse>DateField and local helper functions. - * - * GenerateDateField. - * Generates a String from Date and Time objects in format: - * Wkd, 00 Mon 0000 00:00:00 [GMT] (rfc822, rfc1123) + * ParseDateField and local helper functions. * - * ParseDateField. * Parses a String in (implied) GMT format into class Date and Time objects. * Four formats are accepted: * @@ -321,68 +316,6 @@ static const sal_Char *months[12] = "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; -static const sal_Char *wkdays[7] = -{ - "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun" -}; - -/* - * GenerateDateField. - */ -sal_Bool INetRFC822Message::GenerateDateField ( - const DateTime& rDateTime, UniString& rDateFieldW) -{ - // Check arguments. - if (!rDateTime.IsValid() || - (rDateTime.GetSec() > 59) || - (rDateTime.GetMin() > 59) || - (rDateTime.GetHour() > 23) ) return sal_False; - - // Prepare output string. - rtl::OStringBuffer aDateField; - - // Insert Date. - aDateField.append(wkdays[(sal_uInt16)(rDateTime.GetDayOfWeek())]); - aDateField.append(RTL_CONSTASCII_STRINGPARAM(", ")); - - sal_uInt16 nNum = rDateTime.GetDay(); - if (nNum < 10) - aDateField.append('0'); - aDateField.append(static_cast<sal_Int32>(nNum)); - aDateField.append(' '); - - aDateField.append(months[(sal_uInt16)(rDateTime.GetMonth() - 1)]); - aDateField.append(' '); - - aDateField.append(static_cast<sal_Int32>(rDateTime.GetYear())); - aDateField.append(' '); - - // Insert Time. - nNum = rDateTime.GetHour(); - if (nNum < 10) - aDateField.append('0'); - aDateField.append(static_cast<sal_Int32>(nNum)); - aDateField.append(':'); - - nNum = rDateTime.GetMin(); - if (nNum < 10) - aDateField.append('0'); - aDateField.append(static_cast<sal_Int32>(nNum)); - aDateField.append(':'); - - nNum = rDateTime.GetSec(); - if (nNum < 10) - aDateField.append('0'); - aDateField.append(static_cast<sal_Int32>(nNum)); - aDateField.append(RTL_CONSTASCII_STRINGPARAM(" GMT")); - - // Done. - rDateFieldW = rtl::OStringToOUString(aDateField.makeStringAndClear(), - RTL_TEXTENCODING_ASCII_US); - - return sal_True; -} - /* * ParseDateField and local helper functions. */ |