summaryrefslogtreecommitdiff
path: root/i18npool/source/breakiterator/breakiteratorImpl.cxx
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/breakiterator/breakiteratorImpl.cxx
parent8802ebd5172ec4bc412a59d136c82b77ab452281 (diff)
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/breakiterator/breakiteratorImpl.cxx')
-rw-r--r--i18npool/source/breakiterator/breakiteratorImpl.cxx47
1 files changed, 22 insertions, 25 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index 33ac5864a79c..3a8da9abe49a 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -48,7 +48,6 @@ BreakIteratorImpl::~BreakIteratorImpl()
sal_Int32 SAL_CALL BreakIteratorImpl::nextCharacters( const OUString& Text, sal_Int32 nStartPos,
const Locale &rLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 nCount, sal_Int32& nDone )
- throw(RuntimeException, std::exception)
{
if (nCount < 0) throw RuntimeException();
@@ -57,7 +56,6 @@ sal_Int32 SAL_CALL BreakIteratorImpl::nextCharacters( const OUString& Text, sal_
sal_Int32 SAL_CALL BreakIteratorImpl::previousCharacters( const OUString& Text, sal_Int32 nStartPos,
const Locale& rLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 nCount, sal_Int32& nDone )
- throw(RuntimeException, std::exception)
{
if (nCount < 0) throw RuntimeException();
@@ -96,7 +94,7 @@ static sal_Int32 skipSpace(const OUString& Text, sal_Int32 nPos, sal_Int32 len,
}
Boundary SAL_CALL BreakIteratorImpl::nextWord( const OUString& Text, sal_Int32 nStartPos,
- const Locale& rLocale, sal_Int16 rWordType ) throw(RuntimeException, std::exception)
+ const Locale& rLocale, sal_Int16 rWordType )
{
sal_Int32 len = Text.getLength();
if( nStartPos < 0 || len == 0 )
@@ -126,7 +124,7 @@ static inline bool SAL_CALL isCJK( const Locale& rLocale ) {
}
Boundary SAL_CALL BreakIteratorImpl::previousWord( const OUString& Text, sal_Int32 nStartPos,
- const Locale& rLocale, sal_Int16 rWordType) throw(RuntimeException, std::exception)
+ const Locale& rLocale, sal_Int16 rWordType)
{
sal_Int32 len = Text.getLength();
if( nStartPos <= 0 || len == 0 ) {
@@ -152,7 +150,7 @@ Boundary SAL_CALL BreakIteratorImpl::previousWord( const OUString& Text, sal_Int
Boundary SAL_CALL BreakIteratorImpl::getWordBoundary( const OUString& Text, sal_Int32 nPos, const Locale& rLocale,
- sal_Int16 rWordType, sal_Bool bDirection ) throw(RuntimeException, std::exception)
+ sal_Int16 rWordType, sal_Bool bDirection )
{
sal_Int32 len = Text.getLength();
if( nPos < 0 || len == 0 )
@@ -185,7 +183,7 @@ Boundary SAL_CALL BreakIteratorImpl::getWordBoundary( const OUString& Text, sal_
}
sal_Bool SAL_CALL BreakIteratorImpl::isBeginWord( const OUString& Text, sal_Int32 nPos,
- const Locale& rLocale, sal_Int16 rWordType ) throw(RuntimeException, std::exception)
+ const Locale& rLocale, sal_Int16 rWordType )
{
sal_Int32 len = Text.getLength();
@@ -201,7 +199,7 @@ sal_Bool SAL_CALL BreakIteratorImpl::isBeginWord( const OUString& Text, sal_Int3
}
sal_Bool SAL_CALL BreakIteratorImpl::isEndWord( const OUString& Text, sal_Int32 nPos,
- const Locale& rLocale, sal_Int16 rWordType ) throw(RuntimeException, std::exception)
+ const Locale& rLocale, sal_Int16 rWordType )
{
sal_Int32 len = Text.getLength();
@@ -217,7 +215,7 @@ sal_Bool SAL_CALL BreakIteratorImpl::isEndWord( const OUString& Text, sal_Int32
}
sal_Int32 SAL_CALL BreakIteratorImpl::beginOfSentence( const OUString& Text, sal_Int32 nStartPos,
- const Locale &rLocale ) throw(RuntimeException, std::exception)
+ const Locale &rLocale )
{
if (nStartPos < 0 || nStartPos > Text.getLength())
return -1;
@@ -226,7 +224,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::beginOfSentence( const OUString& Text, sal
}
sal_Int32 SAL_CALL BreakIteratorImpl::endOfSentence( const OUString& Text, sal_Int32 nStartPos,
- const Locale &rLocale ) throw(RuntimeException, std::exception)
+ const Locale &rLocale )
{
if (nStartPos < 0 || nStartPos > Text.getLength())
return -1;
@@ -236,13 +234,12 @@ sal_Int32 SAL_CALL BreakIteratorImpl::endOfSentence( const OUString& Text, sal_I
LineBreakResults SAL_CALL BreakIteratorImpl::getLineBreak( const OUString& Text, sal_Int32 nStartPos,
const Locale& rLocale, sal_Int32 nMinBreakPos, const LineBreakHyphenationOptions& hOptions,
- const LineBreakUserOptions& bOptions ) throw(RuntimeException, std::exception)
+ const LineBreakUserOptions& bOptions )
{
return LBI->getLineBreak(Text, nStartPos, rLocale, nMinBreakPos, hOptions, bOptions);
}
sal_Int16 SAL_CALL BreakIteratorImpl::getScriptType( const OUString& Text, sal_Int32 nPos )
- throw(RuntimeException, std::exception)
{
return (nPos < 0 || nPos >= Text.getLength()) ? ScriptType::WEAK :
getScriptClass(Text.iterateCodePoints(&nPos, 0));
@@ -277,7 +274,7 @@ static sal_Int32 SAL_CALL iterateCodePoints(const OUString& Text, sal_Int32 &nSt
sal_Int32 SAL_CALL BreakIteratorImpl::beginOfScript( const OUString& Text,
- sal_Int32 nStartPos, sal_Int16 ScriptType ) throw(RuntimeException, std::exception)
+ sal_Int32 nStartPos, sal_Int16 ScriptType )
{
if (nStartPos < 0 || nStartPos >= Text.getLength())
return -1;
@@ -295,7 +292,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::beginOfScript( const OUString& Text,
}
sal_Int32 SAL_CALL BreakIteratorImpl::endOfScript( const OUString& Text,
- sal_Int32 nStartPos, sal_Int16 ScriptType ) throw(RuntimeException, std::exception)
+ sal_Int32 nStartPos, sal_Int16 ScriptType )
{
if (nStartPos < 0 || nStartPos >= Text.getLength())
return -1;
@@ -314,7 +311,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::endOfScript( const OUString& Text,
}
sal_Int32 SAL_CALL BreakIteratorImpl::previousScript( const OUString& Text,
- sal_Int32 nStartPos, sal_Int16 ScriptType ) throw(RuntimeException, std::exception)
+ sal_Int32 nStartPos, sal_Int16 ScriptType )
{
if (nStartPos < 0)
return -1;
@@ -335,7 +332,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::previousScript( const OUString& Text,
}
sal_Int32 SAL_CALL BreakIteratorImpl::nextScript( const OUString& Text, sal_Int32 nStartPos,
- sal_Int16 ScriptType ) throw(RuntimeException, std::exception)
+ sal_Int16 ScriptType )
{
if (nStartPos < 0)
@@ -357,7 +354,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::nextScript( const OUString& Text, sal_Int3
}
sal_Int32 SAL_CALL BreakIteratorImpl::beginOfCharBlock( const OUString& Text, sal_Int32 nStartPos,
- const Locale& /*rLocale*/, sal_Int16 CharType ) throw(RuntimeException, std::exception)
+ const Locale& /*rLocale*/, sal_Int16 CharType )
{
if (CharType == CharType::ANY_CHAR) return 0;
if (nStartPos < 0 || nStartPos >= Text.getLength()) return -1;
@@ -369,7 +366,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::beginOfCharBlock( const OUString& Text, sa
}
sal_Int32 SAL_CALL BreakIteratorImpl::endOfCharBlock( const OUString& Text, sal_Int32 nStartPos,
- const Locale& /*rLocale*/, sal_Int16 CharType ) throw(RuntimeException, std::exception)
+ const Locale& /*rLocale*/, sal_Int16 CharType )
{
sal_Int32 strLen = Text.getLength();
@@ -383,7 +380,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::endOfCharBlock( const OUString& Text, sal_
}
sal_Int32 SAL_CALL BreakIteratorImpl::nextCharBlock( const OUString& Text, sal_Int32 nStartPos,
- const Locale& /*rLocale*/, sal_Int16 CharType ) throw(RuntimeException, std::exception)
+ const Locale& /*rLocale*/, sal_Int16 CharType )
{
if (CharType == CharType::ANY_CHAR) return -1;
if (nStartPos < 0 || nStartPos >= Text.getLength()) return -1;
@@ -400,7 +397,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::nextCharBlock( const OUString& Text, sal_I
}
sal_Int32 SAL_CALL BreakIteratorImpl::previousCharBlock( const OUString& Text, sal_Int32 nStartPos,
- const Locale& /*rLocale*/, sal_Int16 CharType ) throw(RuntimeException, std::exception)
+ const Locale& /*rLocale*/, sal_Int16 CharType )
{
if(CharType == CharType::ANY_CHAR) return -1;
if (nStartPos < 0 || nStartPos >= Text.getLength()) return -1;
@@ -421,7 +418,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::previousCharBlock( const OUString& Text, s
sal_Int16 SAL_CALL BreakIteratorImpl::getWordType( const OUString& /*Text*/,
- sal_Int32 /*nPos*/, const Locale& /*rLocale*/ ) throw(RuntimeException, std::exception)
+ sal_Int32 /*nPos*/, const Locale& /*rLocale*/ )
{
return 0;
}
@@ -523,7 +520,7 @@ sal_Int16 BreakIteratorImpl::getScriptClass(sal_uInt32 currentChar)
return nRet;
}
-bool SAL_CALL BreakIteratorImpl::createLocaleSpecificBreakIterator(const OUString& aLocaleName) throw( RuntimeException )
+bool SAL_CALL BreakIteratorImpl::createLocaleSpecificBreakIterator(const OUString& aLocaleName)
{
// to share service between same Language but different Country code, like zh_CN and zh_TW
for (lookupTableItem* listItem : lookupTable) {
@@ -547,7 +544,7 @@ bool SAL_CALL BreakIteratorImpl::createLocaleSpecificBreakIterator(const OUStrin
}
Reference < XBreakIterator > SAL_CALL
-BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale) throw (RuntimeException)
+BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale)
{
if (xBI.is() && rLocale == aLocale)
return xBI;
@@ -593,19 +590,19 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale) throw (
}
OUString SAL_CALL
-BreakIteratorImpl::getImplementationName() throw( RuntimeException, std::exception )
+BreakIteratorImpl::getImplementationName()
{
return OUString("com.sun.star.i18n.BreakIterator");
}
sal_Bool SAL_CALL
-BreakIteratorImpl::supportsService(const OUString& rServiceName) throw( RuntimeException, std::exception )
+BreakIteratorImpl::supportsService(const OUString& rServiceName)
{
return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
-BreakIteratorImpl::getSupportedServiceNames() throw( RuntimeException, std::exception )
+BreakIteratorImpl::getSupportedServiceNames()
{
Sequence< OUString > aRet { "com.sun.star.i18n.BreakIterator" };
return aRet;