diff options
Diffstat (limited to 'scaddins/source/datefunc/datefunc.cxx')
-rw-r--r-- | scaddins/source/datefunc/datefunc.cxx | 50 |
1 files changed, 24 insertions, 26 deletions
diff --git a/scaddins/source/datefunc/datefunc.cxx b/scaddins/source/datefunc/datefunc.cxx index 1c8f481b4813..d5e0d9aac320 100644 --- a/scaddins/source/datefunc/datefunc.cxx +++ b/scaddins/source/datefunc/datefunc.cxx @@ -172,7 +172,7 @@ const lang::Locale& ScaDateAddIn::GetLocale( sal_uInt32 nIndex ) return (nIndex < sizeof( pLang )) ? pDefLocales[ nIndex ] : aFuncLoc; } -ResMgr& ScaDateAddIn::GetResMgr() throw( uno::RuntimeException, std::exception ) +ResMgr& ScaDateAddIn::GetResMgr() { if( !pResMgr ) { @@ -200,7 +200,7 @@ void ScaDateAddIn::InitData() } } -OUString ScaDateAddIn::GetFuncDescrStr( sal_uInt16 nResId, sal_uInt16 nStrIndex ) throw( uno::RuntimeException, std::exception ) +OUString ScaDateAddIn::GetFuncDescrStr( sal_uInt16 nResId, sal_uInt16 nStrIndex ) { OUString aRet; @@ -230,48 +230,48 @@ uno::Sequence< OUString > ScaDateAddIn::getSupportedServiceNames_Static() } // XServiceName -OUString SAL_CALL ScaDateAddIn::getServiceName() throw( uno::RuntimeException, std::exception ) +OUString SAL_CALL ScaDateAddIn::getServiceName() { // name of specific AddIn service return OUString( MY_SERVICE ); } // XServiceInfo -OUString SAL_CALL ScaDateAddIn::getImplementationName() throw( uno::RuntimeException, std::exception ) +OUString SAL_CALL ScaDateAddIn::getImplementationName() { return getImplementationName_Static(); } -sal_Bool SAL_CALL ScaDateAddIn::supportsService( const OUString& aServiceName ) throw( uno::RuntimeException, std::exception ) +sal_Bool SAL_CALL ScaDateAddIn::supportsService( const OUString& aServiceName ) { return cppu::supportsService(this, aServiceName); } -uno::Sequence< OUString > SAL_CALL ScaDateAddIn::getSupportedServiceNames() throw( uno::RuntimeException, std::exception ) +uno::Sequence< OUString > SAL_CALL ScaDateAddIn::getSupportedServiceNames() { return getSupportedServiceNames_Static(); } // XLocalizable -void SAL_CALL ScaDateAddIn::setLocale( const lang::Locale& eLocale ) throw( uno::RuntimeException, std::exception ) +void SAL_CALL ScaDateAddIn::setLocale( const lang::Locale& eLocale ) { aFuncLoc = eLocale; InitData(); // change of locale invalidates resources! } -lang::Locale SAL_CALL ScaDateAddIn::getLocale() throw( uno::RuntimeException, std::exception ) +lang::Locale SAL_CALL ScaDateAddIn::getLocale() { return aFuncLoc; } -OUString SAL_CALL ScaDateAddIn::getProgrammaticFuntionName( const OUString& ) throw( uno::RuntimeException, std::exception ) +OUString SAL_CALL ScaDateAddIn::getProgrammaticFuntionName( const OUString& ) { // not used by calc // (but should be implemented for other uses of the AddIn service) return OUString(); } -OUString SAL_CALL ScaDateAddIn::getDisplayFunctionName( const OUString& aProgrammaticName ) throw( uno::RuntimeException, std::exception ) +OUString SAL_CALL ScaDateAddIn::getDisplayFunctionName( const OUString& aProgrammaticName ) { OUString aRet; @@ -292,7 +292,7 @@ OUString SAL_CALL ScaDateAddIn::getDisplayFunctionName( const OUString& aProgram return aRet; } -OUString SAL_CALL ScaDateAddIn::getFunctionDescription( const OUString& aProgrammaticName ) throw( uno::RuntimeException, std::exception ) +OUString SAL_CALL ScaDateAddIn::getFunctionDescription( const OUString& aProgrammaticName ) { OUString aRet; @@ -305,7 +305,7 @@ OUString SAL_CALL ScaDateAddIn::getFunctionDescription( const OUString& aProgram } OUString SAL_CALL ScaDateAddIn::getDisplayArgumentName( - const OUString& aProgrammaticName, sal_Int32 nArgument ) throw( uno::RuntimeException, std::exception ) + const OUString& aProgrammaticName, sal_Int32 nArgument ) { OUString aRet; @@ -324,7 +324,7 @@ OUString SAL_CALL ScaDateAddIn::getDisplayArgumentName( } OUString SAL_CALL ScaDateAddIn::getArgumentDescription( - const OUString& aProgrammaticName, sal_Int32 nArgument ) throw( uno::RuntimeException, std::exception ) + const OUString& aProgrammaticName, sal_Int32 nArgument ) { OUString aRet; @@ -343,7 +343,7 @@ OUString SAL_CALL ScaDateAddIn::getArgumentDescription( } OUString SAL_CALL ScaDateAddIn::getProgrammaticCategoryName( - const OUString& aProgrammaticName ) throw( uno::RuntimeException, std::exception ) + const OUString& aProgrammaticName ) { OUString aRet; @@ -371,14 +371,14 @@ OUString SAL_CALL ScaDateAddIn::getProgrammaticCategoryName( } OUString SAL_CALL ScaDateAddIn::getDisplayCategoryName( - const OUString& aProgrammaticName ) throw( uno::RuntimeException, std::exception ) + const OUString& aProgrammaticName ) { return getProgrammaticCategoryName( aProgrammaticName ); } // XCompatibilityNames uno::Sequence< sheet::LocalizedName > SAL_CALL ScaDateAddIn::getCompatibilityNames( - const OUString& aProgrammaticName ) throw( uno::RuntimeException, std::exception ) + const OUString& aProgrammaticName ) { auto fDataIt = std::find_if(pFuncDataList->begin(), pFuncDataList->end(), FindScaFuncData( aProgrammaticName ) ); @@ -455,7 +455,6 @@ sal_Int32 DateToDays( sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear ) void DaysToDate( sal_Int32 nDays, sal_uInt16& rDay, sal_uInt16& rMonth, sal_uInt16& rYear ) - throw( lang::IllegalArgumentException ) { if( nDays < 0 ) throw lang::IllegalArgumentException(); @@ -509,7 +508,6 @@ void DaysToDate( sal_Int32 nDays, * @throws uno::RuntimeException */ sal_Int32 GetNullDate( const uno::Reference< beans::XPropertySet >& xOptions ) - throw( uno::RuntimeException ) { if (xOptions.is()) { @@ -587,7 +585,7 @@ sal_Int32 GetNullDate( const uno::Reference< beans::XPropertySet >& xOptions ) sal_Int32 SAL_CALL ScaDateAddIn::getDiffWeeks( const uno::Reference< beans::XPropertySet >& xOptions, sal_Int32 nStartDate, sal_Int32 nEndDate, - sal_Int32 nMode ) throw( uno::RuntimeException, lang::IllegalArgumentException, std::exception ) + sal_Int32 nMode ) { if (nMode != 0 && nMode != 1) throw lang::IllegalArgumentException(); @@ -627,7 +625,7 @@ sal_Int32 SAL_CALL ScaDateAddIn::getDiffWeeks( sal_Int32 SAL_CALL ScaDateAddIn::getDiffMonths( const uno::Reference< beans::XPropertySet >& xOptions, sal_Int32 nStartDate, sal_Int32 nEndDate, - sal_Int32 nMode ) throw( uno::RuntimeException, lang::IllegalArgumentException, std::exception ) + sal_Int32 nMode ) { if (nMode != 0 && nMode != 1) throw lang::IllegalArgumentException(); @@ -675,7 +673,7 @@ sal_Int32 SAL_CALL ScaDateAddIn::getDiffMonths( sal_Int32 SAL_CALL ScaDateAddIn::getDiffYears( const uno::Reference< beans::XPropertySet >& xOptions, sal_Int32 nStartDate, sal_Int32 nEndDate, - sal_Int32 nMode ) throw( uno::RuntimeException, lang::IllegalArgumentException, std::exception ) + sal_Int32 nMode ) { if (nMode != 0 && nMode != 1) throw lang::IllegalArgumentException(); @@ -701,7 +699,7 @@ sal_Int32 SAL_CALL ScaDateAddIn::getDiffYears( */ sal_Int32 SAL_CALL ScaDateAddIn::getIsLeapYear( const uno::Reference< beans::XPropertySet >& xOptions, - sal_Int32 nDate ) throw( uno::RuntimeException, lang::IllegalArgumentException, std::exception ) + sal_Int32 nDate ) { sal_Int32 nNullDate = GetNullDate( xOptions ); sal_Int32 nDays = nDate + nNullDate; @@ -717,7 +715,7 @@ sal_Int32 SAL_CALL ScaDateAddIn::getIsLeapYear( */ sal_Int32 SAL_CALL ScaDateAddIn::getDaysInMonth( const uno::Reference<beans::XPropertySet>& xOptions, - sal_Int32 nDate ) throw( uno::RuntimeException, lang::IllegalArgumentException, std::exception ) + sal_Int32 nDate ) { sal_Int32 nNullDate = GetNullDate( xOptions ); sal_Int32 nDays = nDate + nNullDate; @@ -733,7 +731,7 @@ sal_Int32 SAL_CALL ScaDateAddIn::getDaysInMonth( */ sal_Int32 SAL_CALL ScaDateAddIn::getDaysInYear( const uno::Reference< beans::XPropertySet >& xOptions, - sal_Int32 nDate ) throw( uno::RuntimeException, lang::IllegalArgumentException, std::exception ) + sal_Int32 nDate ) { sal_Int32 nNullDate = GetNullDate( xOptions ); sal_Int32 nDays = nDate + nNullDate; @@ -761,7 +759,7 @@ sal_Int32 SAL_CALL ScaDateAddIn::getDaysInYear( */ sal_Int32 SAL_CALL ScaDateAddIn::getWeeksInYear( const uno::Reference< beans::XPropertySet >& xOptions, - sal_Int32 nDate ) throw( uno::RuntimeException, lang::IllegalArgumentException, std::exception ) + sal_Int32 nDate ) { sal_Int32 nNullDate = GetNullDate( xOptions ); sal_Int32 nDays = nDate + nNullDate; @@ -788,7 +786,7 @@ sal_Int32 SAL_CALL ScaDateAddIn::getWeeksInYear( * This function rotates each character by 13 in the alphabet. * Only the characters 'a' ... 'z' and 'A' ... 'Z' are modified. */ -OUString SAL_CALL ScaDateAddIn::getRot13( const OUString& aSrcString ) throw( uno::RuntimeException, lang::IllegalArgumentException, std::exception ) +OUString SAL_CALL ScaDateAddIn::getRot13( const OUString& aSrcString ) { OUStringBuffer aBuffer( aSrcString ); for( sal_Int32 nIndex = 0; nIndex < aBuffer.getLength(); nIndex++ ) |