New loplugin:dynexcspec: Add @throws documentation, i18npool

Change-Id: Ie1304a081a8c26cb3204ca7fb3edfa7e2dfae386
This commit is contained in:
Stephan Bergmann 2017-01-19 17:56:23 +01:00
parent 25df36cf04
commit 18f40d26ec
23 changed files with 70 additions and 2 deletions

View File

@ -125,8 +125,10 @@ private:
css::uno::Reference < XBreakIterator > xBI;
css::uno::Reference < css::uno::XComponentContext > m_xContext;
/// @throws css::uno::RuntimeException
bool SAL_CALL createLocaleSpecificBreakIterator( const OUString& aLocaleName )
throw( css::uno::RuntimeException );
/// @throws css::uno::RuntimeException
css::uno::Reference < XBreakIterator > SAL_CALL getLocaleSpecificBreakIterator( const css::lang::Locale& rLocale )
throw( css::uno::RuntimeException );

View File

@ -48,6 +48,7 @@ protected:
sal_Int32* previousCellIndex;
sal_Int32 cellIndexSize;
/// @throws css::uno::RuntimeException
virtual void SAL_CALL makeIndex(const OUString& text, sal_Int32 pos) throw(css::uno::RuntimeException);
};

View File

@ -92,6 +92,7 @@ protected:
} character, sentence, line, *icuBI;
BI_Data words[4]; // 4 is css::i18n::WordType enumeration size
/// @throws css::uno::RuntimeException
void SAL_CALL loadICUBreakIterator(const css::lang::Locale& rLocale,
sal_Int16 rBreakType, sal_Int16 rWordType, const sal_Char* name, const OUString& rText) throw(css::uno::RuntimeException);
};

View File

@ -107,18 +107,28 @@ protected:
sal_Int16 fieldValue[FIELD_INDEX_COUNT];
sal_Int16 fieldSetValue[FIELD_INDEX_COUNT];
/// @throws css::uno::RuntimeException
virtual void mapToGregorian() throw(css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
virtual void mapFromGregorian() throw(css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
void getValue() throw(css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
OUString getDisplayStringImpl( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode, bool bEraMode ) throw (css::uno::RuntimeException);
private:
Calendar2 aCalendar;
/** Submit fieldSetValue array according to fieldSet. */
/** Submit fieldSetValue array according to fieldSet.
@throws css::uno::RuntimeException
*/
void submitFields() throw(css::uno::RuntimeException);
/** Set fields internally. */
/** Set fields internally.
@throws css::uno::RuntimeException
*/
void setValue() throw(css::uno::RuntimeException);
/** Obtain combined field values for timezone offset (minutes+secondmillis)
in milliseconds and whether fields were set. */

View File

@ -99,6 +99,7 @@ private:
css::uno::Reference < css::uno::XComponentContext > m_xContext;
css::uno::Reference < XCharacterClassification > xUCI;
/// @throws css::uno::RuntimeException
css::uno::Reference < XCharacterClassification > const & SAL_CALL getLocaleSpecificCharacterClassification(const css::lang::Locale& rLocale)
throw(css::uno::RuntimeException);
bool SAL_CALL createLocaleSpecificCharacterClassification(const OUString& serviceName, const css::lang::Locale& rLocale);

View File

@ -98,8 +98,10 @@ private:
// lang::Locale Data
css::uno::Reference < XLocaleData4 > mxLocaleData;
/// @throws css::uno::RuntimeException
bool SAL_CALL createCollator(const lang::Locale& rLocale, const OUString& serviceName,
const OUString& rSortAlgorithm) throw(css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
void SAL_CALL loadCachedCollator(const lang::Locale& rLocale, const OUString& rSortAlgorithm)
throw(css::uno::RuntimeException);
};

View File

@ -86,8 +86,10 @@ private:
css::uno::Reference < css::uno::XComponentContext > m_xContext;
css::uno::Reference < css::container::XHierarchicalNameAccess > xHierarchicalNameAccess;
std::unique_ptr<TransliterationImpl> translit;
/// @throws css::uno::RuntimeException
OUString SAL_CALL makeNumberingIdentifier( sal_Int16 index )
throw(css::uno::RuntimeException, std::exception);
/// @throws css::uno::RuntimeException
bool SAL_CALL isScriptFlagEnabled(const OUString& aName )
throw(css::uno::RuntimeException);
};

View File

@ -88,7 +88,9 @@ public:
private:
css::uno::Reference < css::i18n::XExtendedIndexEntrySupplier > xIES;
css::uno::Reference < css::uno::XComponentContext > m_xContext;
/// @throws css::uno::RuntimeException
bool SAL_CALL createLocaleSpecificIndexEntrySupplier(const OUString& name) throw( css::uno::RuntimeException );
/// @throws css::uno::RuntimeException
css::uno::Reference < css::i18n::XExtendedIndexEntrySupplier > const & SAL_CALL getLocaleSpecificIndexEntrySupplier(
const css::lang::Locale& rLocale, const OUString& rSortAlgorithm) throw (css::uno::RuntimeException);

View File

@ -97,6 +97,7 @@ protected:
css::lang::Locale aLocale;
OUString aAlgorithm;
/// @throws css::uno::RuntimeException
const OUString& SAL_CALL getEntry( const OUString& IndexEntry,
const OUString& PhoneticEntry, const css::lang::Locale& rLocale )
throw (css::uno::RuntimeException);

View File

@ -86,8 +86,10 @@ public:
Index(const css::uno::Reference < css::uno::XComponentContext >& rxContext);
~Index();
/// @throws css::uno::RuntimeException
void init(const css::lang::Locale& rLocale, const OUString& algorithm) throw (css::uno::RuntimeException, std::exception);
/// @throws css::uno::RuntimeException
void makeIndexKeys(const css::lang::Locale &rLocale, const OUString &algorithm) throw (css::uno::RuntimeException, std::exception);
sal_Int16 getIndexWeight(const OUString& rIndexEntry);
OUString getIndexDescription(const OUString& rIndexEntry);

View File

@ -70,6 +70,7 @@ private:
css::uno::Reference < css::uno::XComponentContext > m_xContext;
/// @throws css::uno::RuntimeException
css::uno::Reference< css::i18n::XExtendedInputSequenceChecker >& SAL_CALL getInputSequenceChecker(sal_Char* rLanguage)
throw (css::uno::RuntimeException);
static sal_Char* SAL_CALL getLanguageByScripType(sal_Unicode cChar, sal_Unicode nChar);

View File

@ -89,30 +89,43 @@ public:
virtual css::uno::Sequence< Currency2 > SAL_CALL getAllCurrencies2( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override;
virtual css::uno::Sequence< FormatElement > SAL_CALL getAllFormats( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override;
virtual css::uno::Sequence< Implementation > SAL_CALL getCollatorImplementations( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override;
/// @throws css::uno::RuntimeException
OUString SAL_CALL getCollatorRuleByAlgorithm( const css::lang::Locale& rLocale, const OUString& algorithm ) throw(css::uno::RuntimeException, std::exception);
virtual css::uno::Sequence< OUString > SAL_CALL getTransliterations( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override;
virtual ForbiddenCharacters SAL_CALL getForbiddenCharacters( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override;
virtual css::uno::Sequence< OUString > SAL_CALL getReservedWord( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override ;
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > SAL_CALL getBreakIteratorRules( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) ;
virtual css::uno::Sequence< css::lang::Locale > SAL_CALL getAllInstalledLocaleNames() throw(css::uno::RuntimeException, std::exception) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSearchOptions( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override;
virtual css::uno::Sequence< OUString > SAL_CALL getCollationOptions( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override;
/// @throws css::uno::RuntimeException
css::uno::Sequence< css::uno::Sequence< beans::PropertyValue > > SAL_CALL getContinuousNumberingLevels( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception);
/// @throws css::uno::RuntimeException
css::uno::Sequence< css::uno::Reference< container::XIndexAccess > > SAL_CALL getOutlineNumberingLevels( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception);
// XLocaleData4
virtual css::uno::Sequence< OUString > SAL_CALL getDateAcceptancePatterns( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception) override;
// following methods are used by indexentry service
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > SAL_CALL getIndexAlgorithm( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
OUString SAL_CALL getDefaultIndexAlgorithm( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
OUString SAL_CALL getIndexKeysByAlgorithm( const css::lang::Locale& rLocale, const OUString& algorithm ) throw(css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
OUString SAL_CALL getIndexModuleByAlgorithm( const css::lang::Locale& rLocale, const OUString& algorithm ) throw(css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
css::uno::Sequence< UnicodeScript > SAL_CALL getUnicodeScripts( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception);
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > SAL_CALL getFollowPageWords( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception);
/// @throws css::uno::RuntimeException
bool SAL_CALL hasPhonetic( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
bool SAL_CALL isPhonetic( const css::lang::Locale& rLocale, const OUString& algorithm ) throw(css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
OUString SAL_CALL getHangingCharacters( const css::lang::Locale& rLocale ) throw(css::uno::RuntimeException, std::exception);
//XServiceInfo
@ -125,9 +138,11 @@ private:
css::i18n::Calendar2 ref_cal;
OUString ref_name;
/// @throws css::uno::RuntimeException
oslGenericFunction SAL_CALL getFunctionSymbol( const css::lang::Locale& rLocale, const sal_Char* pFunction ) throw( css::uno::RuntimeException, std::exception );
sal_Unicode ** SAL_CALL getIndexArray(const css::lang::Locale& rLocale, sal_Int16& indexCount);
sal_Unicode ** SAL_CALL getIndexArrayForAlgorithm(const css::lang::Locale& rLocale, const OUString& rAlgorithm);
/// @throws css::uno::RuntimeException
css::uno::Sequence< css::i18n::CalendarItem2 > &
getCalendarItemByName(const OUString& name,
const css::lang::Locale& rLocale,
@ -135,6 +150,8 @@ private:
sal_Int16 item) throw( css::uno::RuntimeException, std::exception );
/// Helper to obtain a sequence of days, months, gmonths or eras.
///
/// @throws css::uno::RuntimeException
css::uno::Sequence< css::i18n::CalendarItem2 > getCalendarItems(
sal_Unicode const * const * const allCalendars,
sal_Int16 & rnOffset,

View File

@ -65,10 +65,12 @@ public:
throw( css::uno::RuntimeException, std::exception ) override;
// following methods are not for XNativeNumberSupplier, they are for calling from transliterations
/// @throws css::uno::RuntimeException
OUString SAL_CALL getNativeNumberString( const OUString& aNumberString,
const css::lang::Locale& aLocale, sal_Int16 nNativeNumberMode,
css::uno::Sequence< sal_Int32 >& offset )
throw (css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
sal_Unicode SAL_CALL getNativeNumberChar( const sal_Unicode inChar,
const css::lang::Locale& aLocale, sal_Int16 nNativeNumberMode )
throw(css::uno::RuntimeException) ;

View File

@ -83,6 +83,7 @@ private:
css::uno::Reference < css::i18n::XExtendedTextConversion > xTC;
css::uno::Reference < css::uno::XComponentContext > m_xContext;
/// @throws css::lang::NoSupportException
void SAL_CALL getLocaleSpecificTextConversion( const css::lang::Locale& rLocale )
throw( css::lang::NoSupportException );
};

View File

@ -100,16 +100,19 @@ private:
css::uno::Reference< XLocaleData4 > mxLocaledata;
css::uno::Reference< css::i18n::XExtendedTransliteration > caseignore;
/// @throws css::uno::RuntimeException
bool SAL_CALL loadModuleByName( const OUString& implName,
css::uno::Reference<css::i18n::XExtendedTransliteration> & body, const css::lang::Locale& rLocale)
throw(css::uno::RuntimeException);
void clear();
/// @throws css::uno::RuntimeException
void loadBody( OUString &implName,
css::uno::Reference< css::i18n::XExtendedTransliteration >& body )
throw (css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
css::uno::Sequence< OUString > SAL_CALL getRange(
const css::uno::Sequence< OUString > &inStrs,
sal_Int32 length, const sal_Int16 _nCascade)

View File

@ -58,6 +58,7 @@ public:
throw(css::uno::RuntimeException,
css::i18n::MultipleCharsOutputException, std::exception) override;
/// @throws css::uno::RuntimeException
static css::uno::Sequence< OUString > SAL_CALL
transliterateRange( const OUString& str1, const OUString& str2, XTransliteration& t1, XTransliteration& t2 )
throw(css::uno::RuntimeException);

View File

@ -54,6 +54,7 @@ protected:
const sal_Unicode* table;
bool recycleSymbol;
private:
/// @throws css::uno::RuntimeException
OUString SAL_CALL
transliterateBullet( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
css::uno::Sequence< sal_Int32 >& offset )

View File

@ -56,6 +56,7 @@ public:
protected:
TransliterationModules moduleLoaded;
private:
/// @throws css::uno::RuntimeException
sal_Int32 SAL_CALL compare(
const OUString& str1, sal_Int32 pos1, sal_Int32 nCount1, sal_Int32& nMatch1,
const OUString& str2, sal_Int32 pos2, sal_Int32 nCount2, sal_Int32& nMatch2)

View File

@ -397,6 +397,7 @@ void Calendar_gregorian::mapToGregorian() throw(RuntimeException)
}
}
/// @throws RuntimeException
static UCalendarDateFields fieldNameConverter(sal_Int16 fieldIndex) throw(RuntimeException)
{
UCalendarDateFields f;

View File

@ -388,6 +388,9 @@ void lcl_formatChars3( const sal_Unicode table_capital[], const sal_Unicode tabl
/** Returns number's representation in persian words up to 999999999999
respectively limited by sal_Int32 >=0.
The caller assures that nNumber is not negative.
@throws IllegalArgumentException
@throws RuntimeException
*/
static
void lcl_formatPersianWord( sal_Int32 nNumber, OUString& rsResult )

View File

@ -61,6 +61,7 @@ OUString SAL_CALL getHebrewNativeNumberString(const OUString& aNumberString, boo
OUString SAL_CALL getCyrillicNativeNumberString(const OUString& aNumberString);
/// @throws RuntimeException
OUString SAL_CALL AsciiToNativeChar( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
Sequence< sal_Int32 >& offset, bool useOffset, sal_Int16 number ) throw(RuntimeException)
{
@ -161,6 +162,7 @@ bool SAL_CALL AsciiToNative_numberMaker(const sal_Unicode *str, sal_Int32 begin,
}
}
/// @throws RuntimeException
OUString SAL_CALL AsciiToNative( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
Sequence< sal_Int32 >& offset, bool useOffset, const Number* number ) throw(RuntimeException)
{
@ -297,6 +299,7 @@ static void SAL_CALL NativeToAscii_numberMaker(sal_Int16 max, sal_Int16 prev, co
}
}
/// @throws RuntimeException
static OUString SAL_CALL NativeToAscii(const OUString& inStr,
sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset, bool useOffset ) throw(RuntimeException)
{

View File

@ -72,10 +72,12 @@ class TextSearch: public cppu::WeakImplHelper
void MakeBackwardTab();
void MakeBackwardTab2();
sal_Int32 GetDiff( const sal_Unicode ) const;
/// @throws css::uno::RuntimeException
css::util::SearchResult SAL_CALL
NSrchFrwrd( const OUString& searchStr,
sal_Int32 startPos, sal_Int32 endPos )
throw(css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
css::util::SearchResult SAL_CALL
NSrchBkwrd( const OUString& searchStr,
sal_Int32 startPos, sal_Int32 endPos )
@ -83,10 +85,12 @@ class TextSearch: public cppu::WeakImplHelper
// Members and methods for the regular expression search
RegexMatcher* pRegexMatcher;
/// @throws css::uno::RuntimeException
css::util::SearchResult SAL_CALL
RESrchFrwrd( const OUString& searchStr,
sal_Int32 startPos, sal_Int32 endPos )
throw(css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
css::util::SearchResult SAL_CALL
RESrchBkwrd( const OUString& searchStr,
sal_Int32 startPos, sal_Int32 endPos )
@ -97,10 +101,12 @@ class TextSearch: public cppu::WeakImplHelper
int nLimit;
WLevDistance* pWLD;
css::uno::Reference < css::i18n::XBreakIterator > xBreak;
/// @throws css::uno::RuntimeException
css::util::SearchResult SAL_CALL
ApproxSrchFrwrd( const OUString& searchStr,
sal_Int32 startPos, sal_Int32 endPos )
throw(css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
css::util::SearchResult SAL_CALL
ApproxSrchBkwrd( const OUString& searchStr,
sal_Int32 startPos, sal_Int32 endPos )
@ -111,10 +117,12 @@ class TextSearch: public cppu::WeakImplHelper
OUString maWildcardReversePattern2;
sal_uInt32 mcWildcardEscapeChar;
bool mbWildcardAllowSubstring;
/// @throws css::uno::RuntimeException
css::util::SearchResult SAL_CALL
WildcardSrchFrwrd( const OUString& searchStr,
sal_Int32 startPos, sal_Int32 endPos )
throw(css::uno::RuntimeException);
/// @throws css::uno::RuntimeException
css::util::SearchResult SAL_CALL
WildcardSrchBkwrd( const OUString& searchStr,
sal_Int32 startPos, sal_Int32 endPos )
@ -123,6 +131,7 @@ class TextSearch: public cppu::WeakImplHelper
bool IsDelimiter( const OUString& rStr, sal_Int32 nPos ) const;
bool checkCTLStart, checkCTLEnd;
/// @throws css::uno::RuntimeException
bool SAL_CALL isCellStart(const OUString& searchStr, sal_Int32 nPos)
throw(css::uno::RuntimeException);

View File

@ -258,6 +258,7 @@ Transliteration_titlecase::Transliteration_titlecase()
implementationName = "com.sun.star.i18n.Transliteration.Transliteration_titlecase";
}
/// @throws RuntimeException
static OUString transliterate_titlecase_Impl(
const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
const Locale &rLocale,