summaryrefslogtreecommitdiffstats
path: root/i18npool/source/calendar
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-01-26 12:28:58 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-01-26 12:54:43 +0000
commite57ca02849c3d87142ff5ff9099a212e72b8139c (patch)
treebcce66b27261553c308779f3e8663a269ed3a671 /i18npool/source/calendar
parentMoved About dialog to DialogFragment (diff)
downloadcore-e57ca02849c3d87142ff5ff9099a212e72b8139c.tar.gz
core-e57ca02849c3d87142ff5ff9099a212e72b8139c.zip
Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'i18npool/source/calendar')
-rw-r--r--i18npool/source/calendar/calendarImpl.cxx60
-rw-r--r--i18npool/source/calendar/calendar_gregorian.cxx74
-rw-r--r--i18npool/source/calendar/calendar_hijri.cxx4
-rw-r--r--i18npool/source/calendar/calendar_jewish.cxx5
4 files changed, 68 insertions, 75 deletions
diff --git a/i18npool/source/calendar/calendarImpl.cxx b/i18npool/source/calendar/calendarImpl.cxx
index 89432a433cfa..94b72e2bf70d 100644
--- a/i18npool/source/calendar/calendarImpl.cxx
+++ b/i18npool/source/calendar/calendarImpl.cxx
@@ -42,7 +42,7 @@ CalendarImpl::~CalendarImpl()
}
void SAL_CALL
-CalendarImpl::loadDefaultCalendar( const Locale& rLocale ) throw(RuntimeException, std::exception)
+CalendarImpl::loadDefaultCalendar( const Locale& rLocale )
{
Sequence< Calendar2 > xC = LocaleDataImpl::get()->getAllCalendars2(rLocale);
for (sal_Int32 i = 0; i < xC.getLength(); i++) {
@@ -55,7 +55,7 @@ CalendarImpl::loadDefaultCalendar( const Locale& rLocale ) throw(RuntimeExceptio
}
void SAL_CALL
-CalendarImpl::loadCalendar(const OUString& uniqueID, const Locale& rLocale ) throw (RuntimeException, std::exception)
+CalendarImpl::loadCalendar(const OUString& uniqueID, const Locale& rLocale )
{
Reference < XCalendar4 > xOldCalendar( xCalendar ); // backup
sal_Int32 i;
@@ -109,7 +109,7 @@ CalendarImpl::loadCalendar(const OUString& uniqueID, const Locale& rLocale ) thr
}
Calendar2 SAL_CALL
-CalendarImpl::getLoadedCalendar2() throw(RuntimeException, std::exception)
+CalendarImpl::getLoadedCalendar2()
{
if (xCalendar.is())
return xCalendar->getLoadedCalendar2();
@@ -118,7 +118,7 @@ CalendarImpl::getLoadedCalendar2() throw(RuntimeException, std::exception)
}
Calendar SAL_CALL
-CalendarImpl::getLoadedCalendar() throw(RuntimeException, std::exception)
+CalendarImpl::getLoadedCalendar()
{
if (xCalendar.is())
return xCalendar->getLoadedCalendar();
@@ -127,7 +127,7 @@ CalendarImpl::getLoadedCalendar() throw(RuntimeException, std::exception)
}
Sequence< OUString > SAL_CALL
-CalendarImpl::getAllCalendars( const Locale& rLocale ) throw(RuntimeException, std::exception)
+CalendarImpl::getAllCalendars( const Locale& rLocale )
{
Sequence< Calendar2 > xC = LocaleDataImpl::get()->getAllCalendars2(rLocale);
sal_Int32 nLen = xC.getLength();
@@ -138,7 +138,7 @@ CalendarImpl::getAllCalendars( const Locale& rLocale ) throw(RuntimeException, s
}
void SAL_CALL
-CalendarImpl::setDateTime( double fTimeInDays ) throw(RuntimeException, std::exception)
+CalendarImpl::setDateTime( double fTimeInDays )
{
if (xCalendar.is())
xCalendar->setDateTime( fTimeInDays );
@@ -147,7 +147,7 @@ CalendarImpl::setDateTime( double fTimeInDays ) throw(RuntimeException, std::exc
}
double SAL_CALL
-CalendarImpl::getDateTime() throw(RuntimeException, std::exception)
+CalendarImpl::getDateTime()
{
if (xCalendar.is())
return xCalendar->getDateTime();
@@ -156,7 +156,7 @@ CalendarImpl::getDateTime() throw(RuntimeException, std::exception)
}
void SAL_CALL
-CalendarImpl::setLocalDateTime( double fTimeInDays ) throw(RuntimeException, std::exception)
+CalendarImpl::setLocalDateTime( double fTimeInDays )
{
if (xCalendar.is())
xCalendar->setLocalDateTime( fTimeInDays );
@@ -165,7 +165,7 @@ CalendarImpl::setLocalDateTime( double fTimeInDays ) throw(RuntimeException, std
}
double SAL_CALL
-CalendarImpl::getLocalDateTime() throw(RuntimeException, std::exception)
+CalendarImpl::getLocalDateTime()
{
if (xCalendar.is())
return xCalendar->getLocalDateTime();
@@ -174,7 +174,7 @@ CalendarImpl::getLocalDateTime() throw(RuntimeException, std::exception)
}
OUString SAL_CALL
-CalendarImpl::getUniqueID() throw(RuntimeException, std::exception)
+CalendarImpl::getUniqueID()
{
if (xCalendar.is())
return xCalendar->getUniqueID();
@@ -183,7 +183,7 @@ CalendarImpl::getUniqueID() throw(RuntimeException, std::exception)
}
void SAL_CALL
-CalendarImpl::setValue( sal_Int16 fieldIndex, sal_Int16 value ) throw(RuntimeException, std::exception)
+CalendarImpl::setValue( sal_Int16 fieldIndex, sal_Int16 value )
{
if (xCalendar.is())
xCalendar->setValue( fieldIndex, value );
@@ -192,7 +192,7 @@ CalendarImpl::setValue( sal_Int16 fieldIndex, sal_Int16 value ) throw(RuntimeExc
}
sal_Int16 SAL_CALL
-CalendarImpl::getValue( sal_Int16 fieldIndex ) throw(RuntimeException, std::exception)
+CalendarImpl::getValue( sal_Int16 fieldIndex )
{
if (xCalendar.is())
return xCalendar->getValue( fieldIndex );
@@ -201,7 +201,7 @@ CalendarImpl::getValue( sal_Int16 fieldIndex ) throw(RuntimeException, std::exce
}
void SAL_CALL
-CalendarImpl::addValue( sal_Int16 fieldIndex, sal_Int32 amount ) throw(RuntimeException, std::exception)
+CalendarImpl::addValue( sal_Int16 fieldIndex, sal_Int32 amount )
{
if (xCalendar.is())
xCalendar->addValue( fieldIndex, amount);
@@ -210,7 +210,7 @@ CalendarImpl::addValue( sal_Int16 fieldIndex, sal_Int32 amount ) throw(RuntimeEx
}
sal_Int16 SAL_CALL
-CalendarImpl::getFirstDayOfWeek() throw(RuntimeException, std::exception)
+CalendarImpl::getFirstDayOfWeek()
{
if (xCalendar.is())
return xCalendar->getFirstDayOfWeek();
@@ -220,7 +220,6 @@ CalendarImpl::getFirstDayOfWeek() throw(RuntimeException, std::exception)
void SAL_CALL
CalendarImpl::setFirstDayOfWeek( sal_Int16 day )
-throw(RuntimeException, std::exception)
{
if (xCalendar.is())
xCalendar->setFirstDayOfWeek(day);
@@ -229,7 +228,7 @@ throw(RuntimeException, std::exception)
}
void SAL_CALL
-CalendarImpl::setMinimumNumberOfDaysForFirstWeek( sal_Int16 days ) throw(RuntimeException, std::exception)
+CalendarImpl::setMinimumNumberOfDaysForFirstWeek( sal_Int16 days )
{
if (xCalendar.is())
xCalendar->setMinimumNumberOfDaysForFirstWeek(days);
@@ -238,7 +237,7 @@ CalendarImpl::setMinimumNumberOfDaysForFirstWeek( sal_Int16 days ) throw(Runtime
}
sal_Int16 SAL_CALL
-CalendarImpl::getMinimumNumberOfDaysForFirstWeek() throw(RuntimeException, std::exception)
+CalendarImpl::getMinimumNumberOfDaysForFirstWeek()
{
if (xCalendar.is())
return xCalendar->getMinimumNumberOfDaysForFirstWeek();
@@ -248,7 +247,7 @@ CalendarImpl::getMinimumNumberOfDaysForFirstWeek() throw(RuntimeException, std::
OUString SAL_CALL
-CalendarImpl::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_Int16 nameType ) throw(RuntimeException, std::exception)
+CalendarImpl::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_Int16 nameType )
{
if (xCalendar.is())
return xCalendar->getDisplayName( displayIndex, idx, nameType );
@@ -257,7 +256,7 @@ CalendarImpl::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_Int16 n
}
sal_Int16 SAL_CALL
-CalendarImpl::getNumberOfMonthsInYear() throw(RuntimeException, std::exception)
+CalendarImpl::getNumberOfMonthsInYear()
{
if (xCalendar.is())
return xCalendar->getNumberOfMonthsInYear();
@@ -267,7 +266,7 @@ CalendarImpl::getNumberOfMonthsInYear() throw(RuntimeException, std::exception)
sal_Int16 SAL_CALL
-CalendarImpl::getNumberOfDaysInWeek() throw(RuntimeException, std::exception)
+CalendarImpl::getNumberOfDaysInWeek()
{
if (xCalendar.is())
return xCalendar->getNumberOfDaysInWeek();
@@ -277,7 +276,7 @@ CalendarImpl::getNumberOfDaysInWeek() throw(RuntimeException, std::exception)
Sequence< CalendarItem > SAL_CALL
-CalendarImpl::getDays() throw(RuntimeException, std::exception)
+CalendarImpl::getDays()
{
if (xCalendar.is())
return xCalendar->getDays();
@@ -287,7 +286,7 @@ CalendarImpl::getDays() throw(RuntimeException, std::exception)
Sequence< CalendarItem > SAL_CALL
-CalendarImpl::getMonths() throw(RuntimeException, std::exception)
+CalendarImpl::getMonths()
{
if (xCalendar.is())
return xCalendar->getMonths();
@@ -297,7 +296,7 @@ CalendarImpl::getMonths() throw(RuntimeException, std::exception)
Sequence< CalendarItem2 > SAL_CALL
-CalendarImpl::getDays2() throw(RuntimeException, std::exception)
+CalendarImpl::getDays2()
{
if (xCalendar.is())
return xCalendar->getDays2();
@@ -307,7 +306,7 @@ CalendarImpl::getDays2() throw(RuntimeException, std::exception)
Sequence< CalendarItem2 > SAL_CALL
-CalendarImpl::getMonths2() throw(RuntimeException, std::exception)
+CalendarImpl::getMonths2()
{
if (xCalendar.is())
return xCalendar->getMonths2();
@@ -317,7 +316,7 @@ CalendarImpl::getMonths2() throw(RuntimeException, std::exception)
Sequence< CalendarItem2 > SAL_CALL
-CalendarImpl::getGenitiveMonths2() throw(RuntimeException, std::exception)
+CalendarImpl::getGenitiveMonths2()
{
if (xCalendar.is())
return xCalendar->getGenitiveMonths2();
@@ -327,7 +326,7 @@ CalendarImpl::getGenitiveMonths2() throw(RuntimeException, std::exception)
Sequence< CalendarItem2 > SAL_CALL
-CalendarImpl::getPartitiveMonths2() throw(RuntimeException, std::exception)
+CalendarImpl::getPartitiveMonths2()
{
if (xCalendar.is())
return xCalendar->getPartitiveMonths2();
@@ -337,7 +336,7 @@ CalendarImpl::getPartitiveMonths2() throw(RuntimeException, std::exception)
sal_Bool SAL_CALL
-CalendarImpl::isValid() throw(RuntimeException, std::exception)
+CalendarImpl::isValid()
{
if (xCalendar.is())
return xCalendar->isValid();
@@ -347,7 +346,6 @@ CalendarImpl::isValid() throw(RuntimeException, std::exception)
OUString SAL_CALL
CalendarImpl::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode )
- throw (RuntimeException, std::exception)
{
if (xCalendar.is())
return xCalendar->getDisplayString(nCalendarDisplayCode, nNativeNumberMode);
@@ -356,19 +354,19 @@ CalendarImpl::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativ
}
OUString SAL_CALL
-CalendarImpl::getImplementationName() throw( RuntimeException, std::exception )
+CalendarImpl::getImplementationName()
{
return OUString("com.sun.star.i18n.CalendarImpl");
}
sal_Bool SAL_CALL
-CalendarImpl::supportsService(const OUString& rServiceName) throw( RuntimeException, std::exception )
+CalendarImpl::supportsService(const OUString& rServiceName)
{
return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
-CalendarImpl::getSupportedServiceNames() throw( RuntimeException, std::exception )
+CalendarImpl::getSupportedServiceNames()
{
Sequence< OUString > aRet(2);
aRet[0] = "com.sun.star.i18n.LocaleCalendar";
diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx
index d7c6bad1d7be..a95c8676dda5 100644
--- a/i18npool/source/calendar/calendar_gregorian.cxx
+++ b/i18npool/source/calendar/calendar_gregorian.cxx
@@ -183,7 +183,7 @@ Calendar_hanja::Calendar_hanja()
}
OUString SAL_CALL
-Calendar_hanja::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_Int16 nameType ) throw(RuntimeException, std::exception)
+Calendar_hanja::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_Int16 nameType )
{
if ( displayIndex == CalendarDisplayIndex::AM_PM ) {
// Am/Pm string for Korean Hanja calendar will refer to Japanese locale
@@ -197,7 +197,7 @@ Calendar_hanja::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_Int16
}
void SAL_CALL
-Calendar_hanja::loadCalendar( const OUString& /*uniqueID*/, const css::lang::Locale& rLocale ) throw(RuntimeException, std::exception)
+Calendar_hanja::loadCalendar( const OUString& /*uniqueID*/, const css::lang::Locale& rLocale )
{
// Since this class could be called by service name 'hanja_yoil', we have to
// rename uniqueID to get right calendar defined in locale data.
@@ -235,7 +235,7 @@ Calendar_buddhist::Calendar_buddhist() : Calendar_gregorian(buddhist_eraArray)
}
void SAL_CALL
-Calendar_gregorian::loadCalendar( const OUString& uniqueID, const css::lang::Locale& rLocale ) throw(RuntimeException, std::exception)
+Calendar_gregorian::loadCalendar( const OUString& uniqueID, const css::lang::Locale& rLocale )
{
// init. fieldValue[]
getValue();
@@ -268,25 +268,25 @@ Calendar_gregorian::loadCalendar( const OUString& uniqueID, const css::lang::Loc
css::i18n::Calendar2 SAL_CALL
-Calendar_gregorian::getLoadedCalendar2() throw(RuntimeException, std::exception)
+Calendar_gregorian::getLoadedCalendar2()
{
return aCalendar;
}
css::i18n::Calendar SAL_CALL
-Calendar_gregorian::getLoadedCalendar() throw(RuntimeException, std::exception)
+Calendar_gregorian::getLoadedCalendar()
{
return LocaleDataImpl::downcastCalendar( aCalendar);
}
OUString SAL_CALL
-Calendar_gregorian::getUniqueID() throw(RuntimeException, std::exception)
+Calendar_gregorian::getUniqueID()
{
return aCalendar.Name;
}
void SAL_CALL
-Calendar_gregorian::setDateTime( double fTimeInDays ) throw(RuntimeException, std::exception)
+Calendar_gregorian::setDateTime( double fTimeInDays )
{
// ICU handles dates in milliseconds as double values and uses floor()
// to obtain integer values, which may yield a date decremented by one
@@ -306,7 +306,7 @@ Calendar_gregorian::setDateTime( double fTimeInDays ) throw(RuntimeException, st
}
double SAL_CALL
-Calendar_gregorian::getDateTime() throw(RuntimeException, std::exception)
+Calendar_gregorian::getDateTime()
{
if (fieldSet) {
setValue();
@@ -319,7 +319,7 @@ Calendar_gregorian::getDateTime() throw(RuntimeException, std::exception)
}
void SAL_CALL
-Calendar_gregorian::setLocalDateTime( double fTimeInDays ) throw(RuntimeException, std::exception)
+Calendar_gregorian::setLocalDateTime( double fTimeInDays )
{
// See setDateTime() for why the rounding.
double fM = fTimeInDays * U_MILLIS_PER_DAY;
@@ -336,7 +336,7 @@ Calendar_gregorian::setLocalDateTime( double fTimeInDays ) throw(RuntimeExceptio
}
double SAL_CALL
-Calendar_gregorian::getLocalDateTime() throw(RuntimeException, std::exception)
+Calendar_gregorian::getLocalDateTime()
{
if (fieldSet) {
setValue();
@@ -354,7 +354,7 @@ Calendar_gregorian::getLocalDateTime() throw(RuntimeException, std::exception)
// map field value from gregorian calendar to other calendar, it can be overwritten by derived class.
// By using eraArray, it can take care Japanese and Taiwan ROC calendar.
-void Calendar_gregorian::mapFromGregorian() throw(RuntimeException)
+void Calendar_gregorian::mapFromGregorian()
{
if (eraArray) {
sal_Int16 e, y, m, d;
@@ -382,7 +382,7 @@ void Calendar_gregorian::mapFromGregorian() throw(RuntimeException)
#define FIELDS ((1 << CalendarFieldIndex::ERA) | (1 << CalendarFieldIndex::YEAR))
// map field value from other calendar to gregorian calendar, it can be overwritten by derived class.
// By using eraArray, it can take care Japanese and Taiwan ROC calendar.
-void Calendar_gregorian::mapToGregorian() throw(RuntimeException)
+void Calendar_gregorian::mapToGregorian()
{
if (eraArray && (fieldSet & FIELDS)) {
sal_Int16 y, e = fieldValue[CalendarFieldIndex::ERA];
@@ -398,7 +398,7 @@ void Calendar_gregorian::mapToGregorian() throw(RuntimeException)
}
/// @throws RuntimeException
-static UCalendarDateFields fieldNameConverter(sal_Int16 fieldIndex) throw(RuntimeException)
+static UCalendarDateFields fieldNameConverter(sal_Int16 fieldIndex)
{
UCalendarDateFields f;
@@ -424,7 +424,7 @@ static UCalendarDateFields fieldNameConverter(sal_Int16 fieldIndex) throw(Runtim
}
void SAL_CALL
-Calendar_gregorian::setValue( sal_Int16 fieldIndex, sal_Int16 value ) throw(RuntimeException, std::exception)
+Calendar_gregorian::setValue( sal_Int16 fieldIndex, sal_Int16 value )
{
if (fieldIndex < 0 || FIELD_INDEX_COUNT <= fieldIndex)
throw ERROR;
@@ -465,7 +465,7 @@ bool Calendar_gregorian::getDSTOffset( sal_Int32 & o_nOffset ) const
CalendarFieldIndex::DST_OFFSET_SECOND_MILLIS);
}
-void Calendar_gregorian::submitFields() throw(css::uno::RuntimeException)
+void Calendar_gregorian::submitFields()
{
for (sal_Int16 fieldIndex = 0; fieldIndex < FIELD_INDEX_COUNT; fieldIndex++)
{
@@ -491,7 +491,7 @@ void Calendar_gregorian::submitFields() throw(css::uno::RuntimeException)
body->set( fieldNameConverter( CalendarFieldIndex::DST_OFFSET), nDSTOffset);
}
-void Calendar_gregorian::setValue() throw(RuntimeException)
+void Calendar_gregorian::setValue()
{
// Copy fields before calling submitFields() directly or indirectly below.
memcpy(fieldSetValue, fieldValue, sizeof(fieldSetValue));
@@ -517,7 +517,7 @@ void Calendar_gregorian::setValue() throw(RuntimeException)
#endif
}
-void Calendar_gregorian::getValue() throw(RuntimeException)
+void Calendar_gregorian::getValue()
{
DUMP_ICU_CAL_MSG(("%s\n","getValue()"));
DUMP_I18N_CAL_MSG(("%s\n","getValue()"));
@@ -561,7 +561,7 @@ void Calendar_gregorian::getValue() throw(RuntimeException)
}
sal_Int16 SAL_CALL
-Calendar_gregorian::getValue( sal_Int16 fieldIndex ) throw(RuntimeException, std::exception)
+Calendar_gregorian::getValue( sal_Int16 fieldIndex )
{
if (fieldIndex < 0 || FIELD_INDEX_COUNT <= fieldIndex)
throw ERROR;
@@ -575,7 +575,7 @@ Calendar_gregorian::getValue( sal_Int16 fieldIndex ) throw(RuntimeException, std
}
void SAL_CALL
-Calendar_gregorian::addValue( sal_Int16 fieldIndex, sal_Int32 value ) throw(RuntimeException, std::exception)
+Calendar_gregorian::addValue( sal_Int16 fieldIndex, sal_Int32 value )
{
// since ZONE and DST could not be add, we don't need to convert value here
UErrorCode status;
@@ -585,7 +585,7 @@ Calendar_gregorian::addValue( sal_Int16 fieldIndex, sal_Int32 value ) throw(Runt
}
sal_Bool SAL_CALL
-Calendar_gregorian::isValid() throw(RuntimeException, std::exception)
+Calendar_gregorian::isValid()
{
if (fieldSet) {
sal_Int32 tmp = fieldSet;
@@ -683,7 +683,7 @@ static sal_Int32 SAL_CALL DisplayCode2FieldIndex(sal_Int32 nCalendarDisplayCode)
}
sal_Int16 SAL_CALL
-Calendar_gregorian::getFirstDayOfWeek() throw(RuntimeException, std::exception)
+Calendar_gregorian::getFirstDayOfWeek()
{
// UCAL_SUNDAY == 1, Weekdays::SUNDAY == 0 => offset -1
// Check for underflow just in case we're called "out of sync".
@@ -694,83 +694,82 @@ Calendar_gregorian::getFirstDayOfWeek() throw(RuntimeException, std::exception)
void SAL_CALL
Calendar_gregorian::setFirstDayOfWeek( sal_Int16 day )
-throw(RuntimeException, std::exception)
{
// Weekdays::SUNDAY == 0, UCAL_SUNDAY == 1 => offset +1
body->setFirstDayOfWeek( static_cast<UCalendarDaysOfWeek>( day + 1));
}
void SAL_CALL
-Calendar_gregorian::setMinimumNumberOfDaysForFirstWeek( sal_Int16 days ) throw(RuntimeException, std::exception)
+Calendar_gregorian::setMinimumNumberOfDaysForFirstWeek( sal_Int16 days )
{
aCalendar.MinimumNumberOfDaysForFirstWeek = days;
body->setMinimalDaysInFirstWeek( static_cast<uint8_t>( days));
}
sal_Int16 SAL_CALL
-Calendar_gregorian::getMinimumNumberOfDaysForFirstWeek() throw(RuntimeException, std::exception)
+Calendar_gregorian::getMinimumNumberOfDaysForFirstWeek()
{
return aCalendar.MinimumNumberOfDaysForFirstWeek;
}
sal_Int16 SAL_CALL
-Calendar_gregorian::getNumberOfMonthsInYear() throw(RuntimeException, std::exception)
+Calendar_gregorian::getNumberOfMonthsInYear()
{
return (sal_Int16) aCalendar.Months.getLength();
}
sal_Int16 SAL_CALL
-Calendar_gregorian::getNumberOfDaysInWeek() throw(RuntimeException, std::exception)
+Calendar_gregorian::getNumberOfDaysInWeek()
{
return (sal_Int16) aCalendar.Days.getLength();
}
Sequence< CalendarItem > SAL_CALL
-Calendar_gregorian::getDays() throw(RuntimeException, std::exception)
+Calendar_gregorian::getDays()
{
return LocaleDataImpl::downcastCalendarItems( aCalendar.Days);
}
Sequence< CalendarItem > SAL_CALL
-Calendar_gregorian::getMonths() throw(RuntimeException, std::exception)
+Calendar_gregorian::getMonths()
{
return LocaleDataImpl::downcastCalendarItems( aCalendar.Months);
}
Sequence< CalendarItem2 > SAL_CALL
-Calendar_gregorian::getDays2() throw(RuntimeException, std::exception)
+Calendar_gregorian::getDays2()
{
return aCalendar.Days;
}
Sequence< CalendarItem2 > SAL_CALL
-Calendar_gregorian::getMonths2() throw(RuntimeException, std::exception)
+Calendar_gregorian::getMonths2()
{
return aCalendar.Months;
}
Sequence< CalendarItem2 > SAL_CALL
-Calendar_gregorian::getGenitiveMonths2() throw(RuntimeException, std::exception)
+Calendar_gregorian::getGenitiveMonths2()
{
return aCalendar.GenitiveMonths;
}
Sequence< CalendarItem2 > SAL_CALL
-Calendar_gregorian::getPartitiveMonths2() throw(RuntimeException, std::exception)
+Calendar_gregorian::getPartitiveMonths2()
{
return aCalendar.PartitiveMonths;
}
OUString SAL_CALL
-Calendar_gregorian::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_Int16 nameType ) throw(RuntimeException, std::exception)
+Calendar_gregorian::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_Int16 nameType )
{
OUString aStr;
@@ -825,14 +824,12 @@ Calendar_gregorian::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_I
// Methods in XExtendedCalendar
OUString SAL_CALL
Calendar_gregorian::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode )
- throw (RuntimeException, std::exception)
{
return getDisplayStringImpl( nCalendarDisplayCode, nNativeNumberMode, false);
}
OUString
Calendar_gregorian::getDisplayStringImpl( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode, bool bEraMode )
- throw (RuntimeException)
{
sal_Int16 value = getValue(sal::static_int_cast<sal_Int16>( DisplayCode2FieldIndex(nCalendarDisplayCode) ));
OUString aOUStr;
@@ -958,7 +955,6 @@ Calendar_gregorian::getDisplayStringImpl( sal_Int32 nCalendarDisplayCode, sal_In
// Methods in XExtendedCalendar
OUString SAL_CALL
Calendar_buddhist::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode )
- throw (RuntimeException, std::exception)
{
// make year and era in different order for year before and after 0.
if ((nCalendarDisplayCode == CalendarDisplayCode::LONG_YEAR_AND_ERA ||
@@ -975,19 +971,19 @@ Calendar_buddhist::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 n
}
OUString SAL_CALL
-Calendar_gregorian::getImplementationName() throw( RuntimeException, std::exception )
+Calendar_gregorian::getImplementationName()
{
return OUString::createFromAscii(cCalendar);
}
sal_Bool SAL_CALL
-Calendar_gregorian::supportsService(const OUString& rServiceName) throw( RuntimeException, std::exception )
+Calendar_gregorian::supportsService(const OUString& rServiceName)
{
return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
-Calendar_gregorian::getSupportedServiceNames() throw( RuntimeException, std::exception )
+Calendar_gregorian::getSupportedServiceNames()
{
Sequence< OUString > aRet { OUString::createFromAscii(cCalendar) };
return aRet;
diff --git a/i18npool/source/calendar/calendar_hijri.cxx b/i18npool/source/calendar/calendar_hijri.cxx
index 1908ac492e11..11046f8e9cbf 100644
--- a/i18npool/source/calendar/calendar_hijri.cxx
+++ b/i18npool/source/calendar/calendar_hijri.cxx
@@ -64,7 +64,7 @@ Calendar_hijri::Calendar_hijri()
#define FIELDS ((1 << CalendarFieldIndex::ERA) | (1 << CalendarFieldIndex::YEAR) | (1 << CalendarFieldIndex::MONTH) | (1 << CalendarFieldIndex::DAY_OF_MONTH))
// map field value from hijri calendar to gregorian calendar
-void Calendar_hijri::mapToGregorian() throw(RuntimeException)
+void Calendar_hijri::mapToGregorian()
{
if (fieldSet & FIELDS) {
sal_Int32 day = (sal_Int32)fieldSetValue[CalendarFieldIndex::DAY_OF_MONTH];
@@ -84,7 +84,7 @@ void Calendar_hijri::mapToGregorian() throw(RuntimeException)
}
// map field value from gregorian calendar to hijri calendar
-void Calendar_hijri::mapFromGregorian() throw(RuntimeException)
+void Calendar_hijri::mapFromGregorian()
{
sal_Int32 month, day, year;
diff --git a/i18npool/source/calendar/calendar_jewish.cxx b/i18npool/source/calendar/calendar_jewish.cxx
index a060aa9d5bf6..f9130450895e 100644
--- a/i18npool/source/calendar/calendar_jewish.cxx
+++ b/i18npool/source/calendar/calendar_jewish.cxx
@@ -245,7 +245,7 @@ public:
};
// map field value from gregorian calendar to other calendar, it can be overwritten by derived class.
-void Calendar_jewish::mapFromGregorian() throw(RuntimeException)
+void Calendar_jewish::mapFromGregorian()
{
int y = fieldValue[CalendarFieldIndex::YEAR];
if (fieldValue[CalendarFieldIndex::ERA] == 0)
@@ -261,7 +261,7 @@ void Calendar_jewish::mapFromGregorian() throw(RuntimeException)
#define FIELDS ((1 << CalendarFieldIndex::ERA) | (1 << CalendarFieldIndex::YEAR) | (1 << CalendarFieldIndex::MONTH) | (1 << CalendarFieldIndex::DAY_OF_MONTH))
// map field value from other calendar to gregorian calendar, it should be implemented.
-void Calendar_jewish::mapToGregorian() throw(RuntimeException)
+void Calendar_jewish::mapToGregorian()
{
if (fieldSet & FIELDS) {
sal_Int16 y = fieldSetValue[CalendarFieldIndex::YEAR];
@@ -281,7 +281,6 @@ void Calendar_jewish::mapToGregorian() throw(RuntimeException)
// Methods in XExtendedCalendar
OUString SAL_CALL
Calendar_jewish::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode )
- throw (RuntimeException, std::exception)
{
nNativeNumberMode = NativeNumberMode::NATNUM2; // make Hebrew number for Jewish calendar