From 4452ac23224cc6fc9c575f1b128dd71f79e12d88 Mon Sep 17 00:00:00 2001 From: Isamu Mogi Date: Fri, 30 May 2014 20:18:49 +0900 Subject: [PATCH] Fix hungarian prefix for calendars Change-Id: I78b3c0a8d32610e86e09ab5ad6da6cc4e0395926 Reviewed-on: https://gerrit.libreoffice.org/9566 Reviewed-by: Thomas Arnhold Tested-by: Thomas Arnhold --- i18npool/inc/calendarImpl.hxx | 2 +- i18npool/inc/calendar_gregorian.hxx | 2 +- i18npool/source/calendar/calendarImpl.cxx | 4 +-- .../source/calendar/calendar_gregorian.cxx | 8 +++--- include/unotools/calendarwrapper.hxx | 4 +-- offapi/com/sun/star/i18n/XCalendar.idl | 2 +- offapi/type_reference/offapi.idl | 2 +- unotools/source/i18n/calendarwrapper.cxx | 26 +++++++++---------- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/i18npool/inc/calendarImpl.hxx b/i18npool/inc/calendarImpl.hxx index 9fd6dc31bdba..7ec10debd5ad 100644 --- a/i18npool/inc/calendarImpl.hxx +++ b/i18npool/inc/calendarImpl.hxx @@ -58,7 +58,7 @@ public: virtual Calendar SAL_CALL getLoadedCalendar() throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual com::sun::star::uno::Sequence < OUString > SAL_CALL getAllCalendars(const com::sun::star::lang::Locale& rLocale) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual OUString SAL_CALL getUniqueID() throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL setDateTime(double nTimeInDays) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setDateTime(double fTimeInDays) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual double SAL_CALL getDateTime() throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setValue( sal_Int16 nFieldIndex, sal_Int16 nValue ) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int16 SAL_CALL getValue(sal_Int16 nFieldIndex) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/i18npool/inc/calendar_gregorian.hxx b/i18npool/inc/calendar_gregorian.hxx index 43bc4612e423..bd99d187b8f3 100644 --- a/i18npool/inc/calendar_gregorian.hxx +++ b/i18npool/inc/calendar_gregorian.hxx @@ -57,7 +57,7 @@ public: // Methods in XCalendar virtual void SAL_CALL loadCalendar(const OUString& uniqueID, const com::sun::star::lang::Locale& rLocale) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual void SAL_CALL setDateTime(double nTimeInDays) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual void SAL_CALL setDateTime(double fTimeInDays) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual double SAL_CALL getDateTime() throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual void SAL_CALL setValue( sal_Int16 nFieldIndex, sal_Int16 nValue ) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Int16 SAL_CALL getValue(sal_Int16 nFieldIndex) throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/i18npool/source/calendar/calendarImpl.cxx b/i18npool/source/calendar/calendarImpl.cxx index b0f897705eee..e6bf29fb3f28 100644 --- a/i18npool/source/calendar/calendarImpl.cxx +++ b/i18npool/source/calendar/calendarImpl.cxx @@ -138,10 +138,10 @@ CalendarImpl::getAllCalendars( const Locale& rLocale ) throw(RuntimeException, s } void SAL_CALL -CalendarImpl::setDateTime( double timeInDays ) throw(RuntimeException, std::exception) +CalendarImpl::setDateTime( double fTimeInDays ) throw(RuntimeException, std::exception) { if (xCalendar.is()) - xCalendar->setDateTime( timeInDays ); + xCalendar->setDateTime( fTimeInDays ); else throw ERROR ; } diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx index e5f6fc82fd0f..35e01e2d5ff4 100644 --- a/i18npool/source/calendar/calendar_gregorian.cxx +++ b/i18npool/source/calendar/calendar_gregorian.cxx @@ -282,7 +282,7 @@ Calendar_gregorian::getUniqueID() throw(RuntimeException, std::exception) } void SAL_CALL -Calendar_gregorian::setDateTime( double timeInDays ) throw(RuntimeException, std::exception) +Calendar_gregorian::setDateTime( double fTimeInDays ) throw(RuntimeException, std::exception) { // ICU handles dates in milliseconds as double values and uses floor() // to obtain integer values, which may yield a date decremented by one @@ -291,7 +291,7 @@ Calendar_gregorian::setDateTime( double timeInDays ) throw(RuntimeException, std // pass a value without fraction here. If not, that may lead to // fdo#44286 or fdo#52619 and the like, e.g. when passing // -2136315212000.000244 instead of -2136315212000.000000 - double fM = timeInDays * U_MILLIS_PER_DAY; + double fM = fTimeInDays * U_MILLIS_PER_DAY; double fR = rtl::math::round( fM ); SAL_INFO_IF( fM != fR, "i18npool", "Calendar_gregorian::setDateTime: " << std::fixed << fM << " rounded to " << fR); @@ -309,9 +309,9 @@ Calendar_gregorian::getDateTime() throw(RuntimeException, std::exception) getValue(); } UErrorCode status; - double r = body->getTime(status = U_ZERO_ERROR); + double fR = body->getTime(status = U_ZERO_ERROR); if ( !U_SUCCESS(status) ) throw ERROR; - return r / U_MILLIS_PER_DAY; + return fR / U_MILLIS_PER_DAY; } // map field value from gregorian calendar to other calendar, it can be overwritten by derived class. diff --git a/include/unotools/calendarwrapper.hxx b/include/unotools/calendarwrapper.hxx index 389f13805c45..a03f9068b282 100644 --- a/include/unotools/calendarwrapper.hxx +++ b/include/unotools/calendarwrapper.hxx @@ -58,11 +58,11 @@ public: ::com::sun::star::uno::Sequence< OUString > getAllCalendars( const ::com::sun::star::lang::Locale& rLocale ) const; OUString getUniqueID() const; /// set UTC date/time - void setDateTime( double nTimeInDays ); + void setDateTime( double fTimeInDays ); /// get UTC date/time double getDateTime() const; /// convenience method to set local date/time - void setLocalDateTime( double nTimeInDays ); + void setLocalDateTime( double fTimeInDays ); /// convenience method to get local date/time double getLocalDateTime() const; diff --git a/offapi/com/sun/star/i18n/XCalendar.idl b/offapi/com/sun/star/i18n/XCalendar.idl index 4dd5ddacb12c..de00fad03536 100644 --- a/offapi/com/sun/star/i18n/XCalendar.idl +++ b/offapi/com/sun/star/i18n/XCalendar.idl @@ -58,7 +58,7 @@ published interface XCalendar : com::sun::star::uno::XInterface passed since start date. The fractional part represents fractions of a day, thus 0.5 means 12 hours. */ - void setDateTime( [in] double nTimeInDays ); + void setDateTime( [in] double fTimeInDays ); /** Get the date/time as an offset to the start of the calendar at diff --git a/offapi/type_reference/offapi.idl b/offapi/type_reference/offapi.idl index fc5b7953095f..43289937f122 100644 --- a/offapi/type_reference/offapi.idl +++ b/offapi/type_reference/offapi.idl @@ -8194,7 +8194,7 @@ module com { ::com::sun::star::i18n::Calendar getLoadedCalendar(); sequence< string > getAllCalendars([in] ::com::sun::star::lang::Locale rLocale); string getUniqueID(); - void setDateTime([in] double nTimeInDays); + void setDateTime([in] double fTimeInDays); double getDateTime(); void setValue([in] short nCalendarFieldIndex, [in] short nValue); short getValue([in] short nCalendarFieldIndex); diff --git a/unotools/source/i18n/calendarwrapper.cxx b/unotools/source/i18n/calendarwrapper.cxx index 5ca9ad966aff..fc11ee756d77 100644 --- a/unotools/source/i18n/calendarwrapper.cxx +++ b/unotools/source/i18n/calendarwrapper.cxx @@ -98,12 +98,12 @@ OUString CalendarWrapper::getUniqueID() const return OUString(); } -void CalendarWrapper::setDateTime( double nTimeInDays ) +void CalendarWrapper::setDateTime( double fTimeInDays ) { try { if ( xC.is() ) - xC->setDateTime( nTimeInDays ); + xC->setDateTime( fTimeInDays ); } catch (const Exception& e) { @@ -160,7 +160,7 @@ sal_Int32 CalendarWrapper::getDSTOffsetInMillis() const CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS); } -void CalendarWrapper::setLocalDateTime( double nTimeInDays ) +void CalendarWrapper::setLocalDateTime( double fTimeInDays ) { try { @@ -173,11 +173,11 @@ void CalendarWrapper::setLocalDateTime( double nTimeInDays ) // dates! (Which was the cause for #i76623# when the timezone of a // previously set date was used.) Timezone may also include // seconds, so use milliseconds field as well. - xC->setDateTime( nTimeInDays ); + xC->setDateTime( fTimeInDays ); sal_Int32 nZone1 = getZoneOffsetInMillis(); sal_Int32 nDST1 = getDSTOffsetInMillis(); - double nLoc = nTimeInDays - (double)(nZone1 + nDST1) / MILLISECONDS_PER_DAY; - xC->setDateTime( nLoc ); + double fLoc = fTimeInDays - (double)(nZone1 + nDST1) / MILLISECONDS_PER_DAY; + xC->setDateTime( fLoc ); sal_Int32 nZone2 = getZoneOffsetInMillis(); sal_Int32 nDST2 = getDSTOffsetInMillis(); // If DSTs differ after calculation, we crossed boundaries. Do it @@ -187,8 +187,8 @@ void CalendarWrapper::setLocalDateTime( double nTimeInDays ) // http://www.erack.de/download/timetest.c if ( nDST1 != nDST2 ) { - nLoc = nTimeInDays - (double)(nZone2 + nDST2) / MILLISECONDS_PER_DAY; - xC->setDateTime( nLoc ); + fLoc = fTimeInDays - (double)(nZone2 + nDST2) / MILLISECONDS_PER_DAY; + xC->setDateTime( fLoc ); // #i17222# If the DST onset rule says to switch from 00:00 to // 01:00 and we tried to set onsetDay 00:00 with DST, the // result was onsetDay-1 23:00 and no DST, which is not what we @@ -198,8 +198,8 @@ void CalendarWrapper::setLocalDateTime( double nTimeInDays ) sal_Int32 nDST3 = getDSTOffsetInMillis(); if ( nDST2 != nDST3 && !nDST3 ) { - nLoc = nTimeInDays - (double)(nZone2 + nDST3) / MILLISECONDS_PER_DAY; - xC->setDateTime( nLoc ); + fLoc = fTimeInDays - (double)(nZone2 + nDST3) / MILLISECONDS_PER_DAY; + xC->setDateTime( fLoc ); } } } @@ -216,11 +216,11 @@ double CalendarWrapper::getLocalDateTime() const { if ( xC.is() ) { - double nTimeInDays = xC->getDateTime(); + double fTimeInDays = xC->getDateTime(); sal_Int32 nZone = getZoneOffsetInMillis(); sal_Int32 nDST = getDSTOffsetInMillis(); - nTimeInDays += (double)(nZone + nDST) / MILLISECONDS_PER_DAY; - return nTimeInDays; + fTimeInDays += (double)(nZone + nDST) / MILLISECONDS_PER_DAY; + return fTimeInDays; } } catch (const Exception& e)