Fix hungarian prefix for calendars

Change-Id: I78b3c0a8d32610e86e09ab5ad6da6cc4e0395926
Reviewed-on: https://gerrit.libreoffice.org/9566
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
This commit is contained in:
Isamu Mogi 2014-05-30 20:18:49 +09:00 committed by Thomas Arnhold
parent c84c2e4aba
commit 4452ac2322
8 changed files with 25 additions and 25 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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 ;
}

View file

@ -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.

View file

@ -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;

View file

@ -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

View file

@ -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);

View file

@ -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)