Kaydet (Commit) b6c49c46 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

More loplugin:cstylecast: i18nutil

auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files

Change-Id: Idca83b62766c2de87bf112cf0bb565e953b7dcb0
üst 57bbe564
......@@ -49,13 +49,13 @@ struct PageDesc
};
#define PT2MM100( v ) \
(long)(((v) * 35.27777778) + 0.5)
long(((v) * 35.27777778) + 0.5)
#define IN2MM100( v ) \
((long)(((v) * 2540) + 0.5))
(long(((v) * 2540) + 0.5))
#define MM2MM100( v ) \
((long)((v) * 100))
(long((v) * 100))
//PostScript Printer Description File Format Specification
//http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf
......
......@@ -46,7 +46,7 @@ T getScriptType( const sal_Unicode ch, const L* typeList, T unknownType ) {
}
return (type < UnicodeScript_kScriptCount &&
ch >= UnicodeScriptType[static_cast<int>(typeList[i].from)][(int)UnicodeScriptTypeFrom]) ?
ch >= UnicodeScriptType[static_cast<int>(typeList[i].from)][int(UnicodeScriptTypeFrom)]) ?
typeList[i].value : unknownType;
}
......@@ -74,7 +74,7 @@ unicode::getUnicodeType( const sal_Unicode ch ) {
else c = ch;
sal_Int16 address = UnicodeTypeIndex[ch >> 8];
return r = (sal_Int16)((address < UnicodeTypeNumberBlock) ? UnicodeTypeBlockValue[address] :
return r = static_cast<sal_Int16>((address < UnicodeTypeNumberBlock) ? UnicodeTypeBlockValue[address] :
UnicodeTypeValue[((address - UnicodeTypeNumberBlock) << 8) + (ch & 0xff)]);
}
......
......@@ -59,19 +59,19 @@ enum class TransliterationFlags {
/** The first character of the sentence is put in upper case
*/
SENTENCE_CASE = (int)css::i18n::TransliterationModulesExtra::SENTENCE_CASE,
SENTENCE_CASE = int(css::i18n::TransliterationModulesExtra::SENTENCE_CASE),
/** The first character of the word is put in upper case.
* This one is part
*/
TITLE_CASE = (int)css::i18n::TransliterationModulesExtra::TITLE_CASE,
TITLE_CASE = int(css::i18n::TransliterationModulesExtra::TITLE_CASE),
/** All characters of the word are to change their case from small letters
* to capital letters and vice versa.
*/
TOGGLE_CASE = (int)css::i18n::TransliterationModulesExtra::TOGGLE_CASE,
TOGGLE_CASE = int(css::i18n::TransliterationModulesExtra::TOGGLE_CASE),
NON_IGNORE_MASK = (int)css::i18n::TransliterationModules_NON_IGNORE_MASK,
IGNORE_MASK = 0x7fffff00,
......@@ -119,8 +119,8 @@ enum class TransliterationFlags {
/// transliterate Japanese normal sized character to small sized character
largeToSmall_ja_JP = (int)css::i18n::TransliterationModules_largeToSmall_ja_JP,
IGNORE_DIACRITICS_CTL = (int)css::i18n::TransliterationModulesExtra::IGNORE_DIACRITICS_CTL,
IGNORE_KASHIDA_CTL = (int)css::i18n::TransliterationModulesExtra::IGNORE_KASHIDA_CTL
IGNORE_DIACRITICS_CTL = int(css::i18n::TransliterationModulesExtra::IGNORE_DIACRITICS_CTL),
IGNORE_KASHIDA_CTL = int(css::i18n::TransliterationModulesExtra::IGNORE_KASHIDA_CTL)
};
namespace o3tl {
template<> struct typed_flags<TransliterationFlags> : is_typed_flags<TransliterationFlags, 0x7fffffff> {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment