summaryrefslogtreecommitdiffstats
path: root/i18npool/source/collator
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/collator
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/collator')
-rw-r--r--i18npool/source/collator/chaptercollator.cxx10
-rw-r--r--i18npool/source/collator/collatorImpl.cxx20
-rw-r--r--i18npool/source/collator/collator_unicode.cxx11
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;