diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:16:03 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:16:03 +0100 |
commit | 5e7e3c3bd7bd10a9f7216d4d9fa8f2c61bf2db3e (patch) | |
tree | c7b8733633b819ebd4c0682b0cc8c14a34838db9 /shell | |
parent | 16fd3dd3e0976c16b31eeb88ca61f83301626cdf (diff) |
More loplugin:cstylecast: shell
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: Ifb1f116ca0af7d0a8a6bdc6a16f6cc5e1c9e3a6a
Diffstat (limited to 'shell')
-rw-r--r-- | shell/source/backends/desktopbe/desktopbackend.cxx | 2 | ||||
-rw-r--r-- | shell/source/backends/kde4be/kde4access.cxx | 2 | ||||
-rw-r--r-- | shell/source/tools/lngconvex/lngconvex.cxx | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/shell/source/backends/desktopbe/desktopbackend.cxx b/shell/source/backends/desktopbe/desktopbackend.cxx index 1ce27ebbc8fb..b641d00456e8 100644 --- a/shell/source/backends/desktopbe/desktopbackend.cxx +++ b/shell/source/backends/desktopbe/desktopbackend.cxx @@ -207,7 +207,7 @@ OUString xdg_user_dir_lookup (const char *type) { if ((*p == '\\') && (*(p+1) != 0)) p++; - aUserDirBuf.append((sal_Unicode)*p++); + aUserDirBuf.append(static_cast<sal_Unicode>(*p++)); } }//end of while osl_closeFile(handle); diff --git a/shell/source/backends/kde4be/kde4access.cxx b/shell/source/backends/kde4be/kde4access.cxx index 93c7cbb327d6..fc27054cd895 100644 --- a/shell/source/backends/kde4be/kde4access.cxx +++ b/shell/source/backends/kde4be/kde4access.cxx @@ -288,7 +288,7 @@ css::beans::Optional< css::uno::Any > getValue(OUString const & id) { nProxyType = 0; } return css::beans::Optional< css::uno::Any >( - true, uno::makeAny( (sal_Int32) nProxyType ) ); + true, uno::makeAny( static_cast<sal_Int32>(nProxyType) ) ); } else { OSL_ASSERT(false); // this cannot happen } diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx index 6e7caad356bf..9146f6e46be5 100644 --- a/shell/source/tools/lngconvex/lngconvex.cxx +++ b/shell/source/tools/lngconvex/lngconvex.cxx @@ -28,8 +28,8 @@ #else // From MinGW typedef unsigned short WORD; -#define PRIMARYLANGID(lgid) ((WORD)(lgid) & 0x3ff) -#define SUBLANGID(lgid) ((WORD)(lgid) >> 10) +#define PRIMARYLANGID(lgid) (static_cast<WORD>(lgid) & 0x3ff) +#define SUBLANGID(lgid) (static_cast<WORD>(lgid) >> 10) #define LANG_SPANISH 0x0a #define SUBLANG_NEUTRAL 0x00 #define SUBLANG_SPANISH 0x01 @@ -183,7 +183,7 @@ std::string make_winrc_unicode_string(const OUString& str) const sal_Unicode* pchr = str.getStr(); for (size_t i = 0; i < length; i++) - oss << "\\x" << std::hex << (int)*pchr++; + oss << "\\x" << std::hex << static_cast<int>(*pchr++); oss << "\""; return oss.str(); @@ -297,7 +297,7 @@ void add_group_entries( OString key_value_utf8 = aConfig.ReadKey(sal::static_int_cast<sal_uInt16>(i)); iso_lang_identifier myiso_lang( iso_lang ); LanguageType ltype = LanguageTag( myiso_lang.make_OUString()).makeFallback().getLanguageType(); - if( ( (sal_uInt16)ltype & 0x0200 ) == 0 && map[ ltype ].empty() ) + if( ( static_cast<sal_uInt16>(ltype) & 0x0200 ) == 0 && map[ ltype ].empty() ) { Substitutor.set_language(iso_lang_identifier(iso_lang)); @@ -314,7 +314,7 @@ void add_group_entries( { if( !map[ ltype ].empty() ) { - printf("ERROR: Duplicated ms id %d found for the languages %s and %s !!!! This does not work in microsoft resources\nPlease remove one!\n", (sal_uInt16)ltype , map[ ltype ].c_str() , iso_lang.getStr()); + printf("ERROR: Duplicated ms id %d found for the languages %s and %s !!!! This does not work in microsoft resources\nPlease remove one!\n", static_cast<sal_uInt16>(ltype) , map[ ltype ].c_str() , iso_lang.getStr()); exit( -1 ); } } |