diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2015-02-15 11:58:31 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2015-02-15 12:02:05 +0100 |
commit | 836481e35999c3722f1c4fdef8c86c8c098a2492 (patch) | |
tree | 0c10e16ea6d96a22959758751b84944466185302 | |
parent | a0956d3960422c6804a749ababc58964522f8d66 (diff) |
unusedcode.easy
Remove getZoneOffsetInMillis, getDSTOffsetInMillis
+ getCombinedOffsetInMillis
Change-Id: I7bf5b3e9e2e84c2f0add263083d6e7e9057db8ac
-rw-r--r-- | include/unotools/calendarwrapper.hxx | 15 | ||||
-rw-r--r-- | unotools/source/i18n/calendarwrapper.cxx | 35 | ||||
-rw-r--r-- | unusedcode.easy | 2 |
3 files changed, 0 insertions, 52 deletions
diff --git a/include/unotools/calendarwrapper.hxx b/include/unotools/calendarwrapper.hxx index de7443bd3dd5..68ee61c59f4f 100644 --- a/include/unotools/calendarwrapper.hxx +++ b/include/unotools/calendarwrapper.hxx @@ -76,13 +76,6 @@ public: sal_Int16 getNumberOfDaysInWeek() 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 OUString getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) const; @@ -115,14 +108,6 @@ public: /// get the DateTime as a local (!) Gregorian DateTime inline DateTime getGregorianDateTime() const { 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 diff --git a/unotools/source/i18n/calendarwrapper.cxx b/unotools/source/i18n/calendarwrapper.cxx index 2f861fb1ee1a..56695abf01bc 100644 --- a/unotools/source/i18n/calendarwrapper.cxx +++ b/unotools/source/i18n/calendarwrapper.cxx @@ -122,41 +122,6 @@ double CalendarWrapper::getDateTime() const 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 ) { try diff --git a/unusedcode.easy b/unusedcode.easy index 089c5e44e1ba..7a6932e678f5 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -1,6 +1,4 @@ BigInt::BigInt(unsigned int) -CalendarWrapper::getDSTOffsetInMillis() const -CalendarWrapper::getZoneOffsetInMillis() const FontCharMap::GetDefaultMap(bool) LineListBox::Clear() LineListBox::InsertEntry(rtl::OUString const&, int) |