Kaydet (Commit) 836481e3 authored tarafından Julien Nabet's avatar Julien Nabet

unusedcode.easy

Remove getZoneOffsetInMillis, getDSTOffsetInMillis
+ getCombinedOffsetInMillis

Change-Id: I7bf5b3e9e2e84c2f0add263083d6e7e9057db8ac
üst a0956d39
...@@ -76,13 +76,6 @@ public: ...@@ -76,13 +76,6 @@ public:
sal_Int16 getNumberOfDaysInWeek() const; sal_Int16 getNumberOfDaysInWeek() const;
OUString getDisplayName( sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType ) const; OUString getDisplayName( sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType ) const;
/** Convenience method to get timezone offset in milliseconds, taking both
fields ZONE_OFFSET and ZONE_OFFSET_SECOND_MILLIS into account. */
sal_Int32 getZoneOffsetInMillis() const;
/** Convenience method to get DST offset in milliseconds, taking both
fields DST_OFFSET and DST_OFFSET_SECOND_MILLIS into account. */
sal_Int32 getDSTOffsetInMillis() const;
// wrapper implementations of XExtendedCalendar // wrapper implementations of XExtendedCalendar
OUString getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) const; OUString getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) const;
...@@ -115,14 +108,6 @@ public: ...@@ -115,14 +108,6 @@ public:
/// get the DateTime as a local (!) Gregorian DateTime /// get the DateTime as a local (!) Gregorian DateTime
inline DateTime getGregorianDateTime() const inline DateTime getGregorianDateTime() const
{ return aEpochStart + getLocalDateTime(); } { return aEpochStart + getLocalDateTime(); }
private:
/** get timezone or DST offset in milliseconds, fields are
CalendarFieldIndex ZONE_OFFSET and ZONE_OFFSET_SECOND_MILLIS
respectively DST_OFFSET and DST_OFFSET_SECOND_MILLIS.
*/
sal_Int32 getCombinedOffsetInMillis( sal_Int16 nParentFieldIndex, sal_Int16 nChildFieldIndex ) const;
}; };
#endif #endif
......
...@@ -122,41 +122,6 @@ double CalendarWrapper::getDateTime() const ...@@ -122,41 +122,6 @@ double CalendarWrapper::getDateTime() const
return 0.0; return 0.0;
} }
sal_Int32 CalendarWrapper::getCombinedOffsetInMillis(
sal_Int16 nParentFieldIndex, sal_Int16 nChildFieldIndex ) const
{
sal_Int32 nOffset = 0;
try
{
if ( xC.is() )
{
nOffset = static_cast<sal_Int32>( xC->getValue( nParentFieldIndex )) * 60000;
sal_Int16 nSecondMillis = xC->getValue( nChildFieldIndex );
if (nOffset < 0)
nOffset -= static_cast<sal_uInt16>( nSecondMillis);
else
nOffset += static_cast<sal_uInt16>( nSecondMillis);
}
}
catch (const Exception& e)
{
SAL_WARN( "unotools.i18n", "getCombinedOffsetInMillis: Exception caught " << e.Message );
}
return nOffset;
}
sal_Int32 CalendarWrapper::getZoneOffsetInMillis() const
{
return getCombinedOffsetInMillis( CalendarFieldIndex::ZONE_OFFSET,
CalendarFieldIndex::ZONE_OFFSET_SECOND_MILLIS);
}
sal_Int32 CalendarWrapper::getDSTOffsetInMillis() const
{
return getCombinedOffsetInMillis( CalendarFieldIndex::DST_OFFSET,
CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS);
}
void CalendarWrapper::setLocalDateTime( double fTimeInDays ) void CalendarWrapper::setLocalDateTime( double fTimeInDays )
{ {
try try
......
BigInt::BigInt(unsigned int) BigInt::BigInt(unsigned int)
CalendarWrapper::getDSTOffsetInMillis() const
CalendarWrapper::getZoneOffsetInMillis() const
FontCharMap::GetDefaultMap(bool) FontCharMap::GetDefaultMap(bool)
LineListBox::Clear() LineListBox::Clear()
LineListBox::InsertEntry(rtl::OUString const&, int) LineListBox::InsertEntry(rtl::OUString const&, int)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment