include/unotools/localedatawrapper.hxx | 11 ------- unotools/source/i18n/localedatawrapper.cxx | 40 ----------------------------- 2 files changed, 51 deletions(-)
New commits: commit fb938255c57bb1951ed44a7518ce29849e4f170a Author: Eike Rathke <er...@redhat.com> AuthorDate: Tue Jul 6 12:25:05 2021 +0200 Commit: Eike Rathke <er...@redhat.com> CommitDate: Tue Jul 6 21:20:17 2021 +0200 Remove now unused LocaleDataWrapper::getLongDate() Change-Id: I8e9614a4d77aa8b0c0e68a248ea57f921e3ed424 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118476 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Jenkins (cherry picked from commit 6e0b7d2aad6f1a041dd9e0e28aa4bf27eb3fc077) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118519 diff --git a/include/unotools/localedatawrapper.hxx b/include/unotools/localedatawrapper.hxx index 1ec554a38b90..70108f8af86a 100644 --- a/include/unotools/localedatawrapper.hxx +++ b/include/unotools/localedatawrapper.hxx @@ -307,17 +307,6 @@ public: OUString getDuration( const tools::Time& rTime, bool bSec = true, bool b100Sec = false ) const; - /** The CalendarWrapper already <b>MUST</b> - have loaded a calendar. - @param bTwoDigitYear - <FALSE/> := full year - <TRUE/> := year % 100 - */ - OUString getLongDate( const Date& rDate, - CalendarWrapper& rCal, - bool bTwoDigitYear - ) const; - /** Simple number formatting @param nNumber value * 10**nDecimals diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx index 2bb6769c51ed..9765cec1062a 100644 --- a/unotools/source/i18n/localedatawrapper.cxx +++ b/unotools/source/i18n/localedatawrapper.cxx @@ -1160,46 +1160,6 @@ OUString LocaleDataWrapper::getTime( const tools::Time& rTime, bool bSec, bool b return aBuf.makeStringAndClear(); } -OUString LocaleDataWrapper::getLongDate( const Date& rDate, CalendarWrapper& rCal, - bool bTwoDigitYear ) const -{ - OUStringBuffer aBuf(20); - OUStringBuffer aStr(120); // complete guess - sal_Int16 nVal; - rCal.setGregorianDateTime( rDate ); - // day of week - nVal = rCal.getValue( CalendarFieldIndex::DAY_OF_WEEK ); - aStr.append(rCal.getDisplayName( CalendarDisplayIndex::DAY, nVal, 1 )); - aStr.append(aLocaleDataItem.LongDateDayOfWeekSeparator); - // day of month - nVal = rCal.getValue( CalendarFieldIndex::DAY_OF_MONTH ); - ImplAdd2UNum( aBuf, nVal, false/*bDayOfMonthWithLeadingZero*/ ); - OUString aDay = aBuf.makeStringAndClear(); - // month of year - nVal = rCal.getValue( CalendarFieldIndex::MONTH ); - OUString aMonth( rCal.getDisplayName( CalendarDisplayIndex::MONTH, nVal, 1 ) ); - // year - nVal = rCal.getValue( CalendarFieldIndex::YEAR ); - if ( bTwoDigitYear ) - ImplAddUNum( aBuf, nVal % 100, 2 ); - else - ImplAddUNum( aBuf, nVal ); - OUString aYear = aBuf.makeStringAndClear(); - // concatenate - switch ( getLongDateOrder() ) - { - case DateOrder::DMY : - aStr.append(aDay + aLocaleDataItem.LongDateDaySeparator + aMonth + aLocaleDataItem.LongDateMonthSeparator + aYear); - break; - case DateOrder::MDY : - aStr.append(aMonth + aLocaleDataItem.LongDateMonthSeparator + aDay + aLocaleDataItem.LongDateDaySeparator + aYear); - break; - default: // YMD - aStr.append(aYear + aLocaleDataItem.LongDateYearSeparator + aMonth + aLocaleDataItem.LongDateMonthSeparator + aDay); - } - return aStr.makeStringAndClear(); -} - OUString LocaleDataWrapper::getDuration( const tools::Time& rTime, bool bSec, bool b100Sec ) const { OUStringBuffer aBuf(128); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits