diff options
Diffstat (limited to 'i18npool/source/breakiterator/breakiteratorImpl.cxx')
-rw-r--r-- | i18npool/source/breakiterator/breakiteratorImpl.cxx | 47 |
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; |