diff options
Diffstat (limited to 'i18npool/source/collator')
-rw-r--r-- | i18npool/source/collator/chaptercollator.cxx | 10 | ||||
-rw-r--r-- | i18npool/source/collator/collatorImpl.cxx | 20 | ||||
-rw-r--r-- | i18npool/source/collator/collator_unicode.cxx | 11 |
3 files changed, 18 insertions, 23 deletions
diff --git a/i18npool/source/collator/chaptercollator.cxx b/i18npool/source/collator/chaptercollator.cxx index 68315bfb9c81..253404266976 100644 --- a/i18npool/source/collator/chaptercollator.cxx +++ b/i18npool/source/collator/chaptercollator.cxx @@ -40,7 +40,7 @@ ChapterCollator::~ChapterCollator() } sal_Int32 SAL_CALL -ChapterCollator::compareString( const OUString& s1, const OUString& s2) throw(RuntimeException, std::exception) +ChapterCollator::compareString( const OUString& s1, const OUString& s2) { return compareSubstring(s1, 0, s1.getLength(), s2, 0, s2.getLength()); } @@ -49,7 +49,7 @@ ChapterCollator::compareString( const OUString& s1, const OUString& s2) throw(Ru sal_Int32 SAL_CALL ChapterCollator::compareSubstring( const OUString& str1, sal_Int32 off1, sal_Int32 len1, - const OUString& str2, sal_Int32 off2, sal_Int32 len2) throw(RuntimeException, std::exception) + const OUString& str2, sal_Int32 off2, sal_Int32 len2) { if( len1 <= 1 || len2 <= 1 || ! cclass.is() ) return CollatorImpl::compareSubstring( str1, off1, len1, str2, off2, len2 ); @@ -76,19 +76,19 @@ ChapterCollator::compareSubstring( const OUString& str1, sal_Int32 off1, sal_Int const sal_Char cChapCollator[] = "com.sun.star.i18n.ChapterCollator"; OUString SAL_CALL -ChapterCollator::getImplementationName() throw( RuntimeException, std::exception ) +ChapterCollator::getImplementationName() { return OUString(cChapCollator); } sal_Bool SAL_CALL -ChapterCollator::supportsService(const OUString& rServiceName) throw( RuntimeException, std::exception ) +ChapterCollator::supportsService(const OUString& rServiceName) { return cppu::supportsService(this, rServiceName); } Sequence< OUString > SAL_CALL -ChapterCollator::getSupportedServiceNames() throw( RuntimeException, std::exception ) +ChapterCollator::getSupportedServiceNames() { Sequence< OUString > aRet { cChapCollator }; return aRet; diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx index 8b4919a68400..245e9ff3771b 100644 --- a/i18npool/source/collator/collatorImpl.cxx +++ b/i18npool/source/collator/collatorImpl.cxx @@ -47,7 +47,7 @@ CollatorImpl::~CollatorImpl() sal_Int32 SAL_CALL CollatorImpl::compareSubstring( const OUString& str1, sal_Int32 off1, sal_Int32 len1, - const OUString& str2, sal_Int32 off2, sal_Int32 len2) throw(RuntimeException, std::exception) + const OUString& str2, sal_Int32 off2, sal_Int32 len2) { if (cachedItem) return cachedItem->xC->compareSubstring(str1, off1, len1, str2, off2, len2); @@ -61,7 +61,7 @@ CollatorImpl::compareSubstring( const OUString& str1, sal_Int32 off1, sal_Int32 } sal_Int32 SAL_CALL -CollatorImpl::compareString( const OUString& in_str1, const OUString& in_str2) throw(RuntimeException, std::exception) +CollatorImpl::compareString( const OUString& in_str1, const OUString& in_str2) { if (cachedItem) return cachedItem->xC->compareString(in_str1, in_str2); @@ -71,7 +71,7 @@ CollatorImpl::compareString( const OUString& in_str1, const OUString& in_str2) t sal_Int32 SAL_CALL -CollatorImpl::loadDefaultCollator(const lang::Locale& rLocale, sal_Int32 collatorOptions) throw(RuntimeException, std::exception) +CollatorImpl::loadDefaultCollator(const lang::Locale& rLocale, sal_Int32 collatorOptions) { const Sequence< Implementation > &imp = mxLocaleData->getCollatorImplementations(rLocale); for (sal_Int32 i = 0; i < imp.getLength(); i++) @@ -84,7 +84,6 @@ CollatorImpl::loadDefaultCollator(const lang::Locale& rLocale, sal_Int32 collato sal_Int32 SAL_CALL CollatorImpl::loadCollatorAlgorithm(const OUString& impl, const lang::Locale& rLocale, sal_Int32 collatorOptions) - throw(RuntimeException, std::exception) { if (! cachedItem || ! cachedItem->equals(rLocale, impl)) loadCachedCollator(rLocale, impl); @@ -99,7 +98,7 @@ CollatorImpl::loadCollatorAlgorithm(const OUString& impl, const lang::Locale& rL void SAL_CALL CollatorImpl::loadCollatorAlgorithmWithEndUserOption(const OUString& impl, const lang::Locale& rLocale, - const Sequence< sal_Int32 >& collatorOptions) throw(RuntimeException, std::exception) + const Sequence< sal_Int32 >& collatorOptions) { sal_Int32 options = 0; for (sal_Int32 i = 0; i < collatorOptions.getLength(); i++) @@ -108,7 +107,7 @@ CollatorImpl::loadCollatorAlgorithmWithEndUserOption(const OUString& impl, const } Sequence< OUString > SAL_CALL -CollatorImpl::listCollatorAlgorithms( const lang::Locale& rLocale ) throw(RuntimeException, std::exception) +CollatorImpl::listCollatorAlgorithms( const lang::Locale& rLocale ) { nLocale = rLocale; const Sequence< Implementation > &imp = mxLocaleData->getCollatorImplementations(rLocale); @@ -127,7 +126,7 @@ CollatorImpl::listCollatorAlgorithms( const lang::Locale& rLocale ) throw(Runtim } Sequence< sal_Int32 > SAL_CALL -CollatorImpl::listCollatorOptions( const OUString& /*collatorAlgorithmName*/ ) throw(RuntimeException, std::exception) +CollatorImpl::listCollatorOptions( const OUString& /*collatorAlgorithmName*/ ) { Sequence< OUString > option_str = mxLocaleData->getCollationOptions(nLocale); Sequence< sal_Int32 > option_int(option_str.getLength()); @@ -143,7 +142,6 @@ CollatorImpl::listCollatorOptions( const OUString& /*collatorAlgorithmName*/ ) t bool SAL_CALL CollatorImpl::createCollator(const lang::Locale& rLocale, const OUString& serviceName, const OUString& rSortAlgorithm) - throw(RuntimeException) { for (size_t l = 0; l < lookupTable.size(); l++) { cachedItem = lookupTable[l]; @@ -168,7 +166,6 @@ CollatorImpl::createCollator(const lang::Locale& rLocale, const OUString& servic void SAL_CALL CollatorImpl::loadCachedCollator(const lang::Locale& rLocale, const OUString& rSortAlgorithm) - throw(RuntimeException) { for (lookupTableItem* i : lookupTable) { cachedItem = i; @@ -212,19 +209,18 @@ CollatorImpl::loadCachedCollator(const lang::Locale& rLocale, const OUString& rS } } -OUString SAL_CALL CollatorImpl::getImplementationName() throw( RuntimeException, std::exception ) +OUString SAL_CALL CollatorImpl::getImplementationName() { return OUString("com.sun.star.i18n.Collator"); } sal_Bool SAL_CALL CollatorImpl::supportsService(const OUString& rServiceName) - throw( RuntimeException, std::exception ) { return cppu::supportsService(this, rServiceName); } Sequence< OUString > SAL_CALL -CollatorImpl::getSupportedServiceNames() throw( RuntimeException, std::exception ) +CollatorImpl::getSupportedServiceNames() { Sequence< OUString > aRet { "com.sun.star.i18n.Collator" }; return aRet; diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx index a1022e49473c..dfba7ac57b1e 100644 --- a/i18npool/source/collator/collator_unicode.cxx +++ b/i18npool/source/collator/collator_unicode.cxx @@ -113,13 +113,13 @@ size_t get_collator_data_zh_zhuyin_length(); sal_Int32 SAL_CALL Collator_Unicode::compareSubstring( const OUString& str1, sal_Int32 off1, sal_Int32 len1, - const OUString& str2, sal_Int32 off2, sal_Int32 len2) throw(RuntimeException, std::exception) + const OUString& str2, sal_Int32 off2, sal_Int32 len2) { return collator->compare(reinterpret_cast<const UChar *>(str1.getStr()) + off1, len1, reinterpret_cast<const UChar *>(str2.getStr()) + off2, len2); // UChar != sal_Unicode in MinGW } sal_Int32 SAL_CALL -Collator_Unicode::compareString( const OUString& str1, const OUString& str2) throw(RuntimeException, std::exception) +Collator_Unicode::compareString( const OUString& str1, const OUString& str2) { return collator->compare(reinterpret_cast<const UChar *>(str1.getStr()), reinterpret_cast<const UChar *>(str2.getStr())); // UChar != sal_Unicode in MinGW } @@ -132,7 +132,6 @@ extern "C" { static void SAL_CALL thisModule() {} } sal_Int32 SAL_CALL Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::Locale& rLocale, sal_Int32 options) - throw(RuntimeException, std::exception) { if (!collator) { UErrorCode status = U_ZERO_ERROR; @@ -389,19 +388,19 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: OUString SAL_CALL -Collator_Unicode::getImplementationName() throw( RuntimeException, std::exception ) +Collator_Unicode::getImplementationName() { return OUString::createFromAscii(implementationName); } sal_Bool SAL_CALL -Collator_Unicode::supportsService(const OUString& rServiceName) throw( RuntimeException, std::exception ) +Collator_Unicode::supportsService(const OUString& rServiceName) { return cppu::supportsService(this, rServiceName); } Sequence< OUString > SAL_CALL -Collator_Unicode::getSupportedServiceNames() throw( RuntimeException, std::exception ) +Collator_Unicode::getSupportedServiceNames() { Sequence< OUString > aRet { OUString::createFromAscii(implementationName) }; return aRet; |