diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-29 21:36:54 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-29 22:26:59 +0200 |
commit | 9e53fbd9a67bbfc35aa6b96dc034df9f6ecf5643 (patch) | |
tree | 14f6fda345339eccd648b8e78f029bedc19cde0b /shell/source/backends | |
parent | da1d01a432e160031abbf445b4efe879a664bbfa (diff) |
loplugin:cstylecast
Change-Id: I8bb20f4ce9c8cca3b70057cd8c4fb23819fa3b23
Diffstat (limited to 'shell/source/backends')
-rw-r--r-- | shell/source/backends/localebe/localebackend.cxx | 6 | ||||
-rw-r--r-- | shell/source/backends/macbe/macbackend.mm | 16 |
2 files changed, 11 insertions, 11 deletions
diff --git a/shell/source/backends/localebe/localebackend.cxx b/shell/source/backends/localebe/localebackend.cxx index 1a8da7bf2fcd..f2190d17fbfa 100644 --- a/shell/source/backends/localebe/localebackend.cxx +++ b/shell/source/backends/localebe/localebackend.cxx @@ -106,7 +106,7 @@ namespace /* private */ if (ref == NULL) return NULL; - CFStringRef sref = (CFGetTypeID(ref) == CFArrayGetTypeID()) ? (CFStringRef)CFArrayGetValueAtIndex((CFArrayRef)ref, 0) : (CFStringRef)ref; + CFStringRef sref = (CFGetTypeID(ref) == CFArrayGetTypeID()) ? static_cast<CFStringRef>(CFArrayGetValueAtIndex(static_cast<CFArrayRef>(ref), 0)) : static_cast<CFStringRef>(ref); // NOTE: this API is only available with Mac OS X >=10.3. We need to use it because // Apple used non-ISO values on systems <10.2 like "German" for instance but didn't @@ -133,7 +133,7 @@ namespace /* private */ { aLocaleBuffer.setLength(0); // clear buffer which still contains fallback value - CFStringRef lang = (CFStringRef)CFArrayGetValueAtIndex(subs, 0); + CFStringRef lang = static_cast<CFStringRef>(CFArrayGetValueAtIndex(subs, 0)); OUStringBufferAppendCFString(aLocaleBuffer, lang); // country also available? Assumption: if the array contains more than one @@ -141,7 +141,7 @@ namespace /* private */ if (CFArrayGetCount(subs) > 1) { aLocaleBuffer.appendAscii("-"); - CFStringRef country = (CFStringRef)CFArrayGetValueAtIndex(subs, 1); + CFStringRef country = static_cast<CFStringRef>(CFArrayGetValueAtIndex(subs, 1)); OUStringBufferAppendCFString(aLocaleBuffer, country); } } diff --git a/shell/source/backends/macbe/macbackend.mm b/shell/source/backends/macbe/macbackend.mm index cd1466575d3e..57b0a21c735b 100644 --- a/shell/source/backends/macbe/macbackend.mm +++ b/shell/source/backends/macbe/macbackend.mm @@ -97,8 +97,8 @@ bool GetProxySetting(ServiceType sType, char *host, size_t hostSize, UInt16 *por break; } // Proxy enabled? - enableNum = (CFNumberRef) CFDictionaryGetValue( proxyDict, - proxiesEnable ); + enableNum = static_cast<CFNumberRef>(CFDictionaryGetValue( proxyDict, + proxiesEnable )); result = (enableNum != NULL) && (CFGetTypeID(enableNum) == CFNumberGetTypeID()); @@ -108,8 +108,8 @@ bool GetProxySetting(ServiceType sType, char *host, size_t hostSize, UInt16 *por // Proxy enabled -> get hostname if (result) { - hostStr = (CFStringRef) CFDictionaryGetValue( proxyDict, - proxiesProxy ); + hostStr = static_cast<CFStringRef>(CFDictionaryGetValue( proxyDict, + proxiesProxy )); result = (hostStr != NULL) && (CFGetTypeID(hostStr) == CFStringGetTypeID()); } @@ -120,8 +120,8 @@ bool GetProxySetting(ServiceType sType, char *host, size_t hostSize, UInt16 *por // Get proxy port if (result) { - portNum = (CFNumberRef) CFDictionaryGetValue( proxyDict, - proxiesPort ); + portNum = static_cast<CFNumberRef>(CFDictionaryGetValue( proxyDict, + proxiesPort )); result = (portNum != NULL) && (CFGetTypeID(portNum) == CFNumberGetTypeID()); } @@ -401,13 +401,13 @@ css::uno::Any MacOSXBackend::getPropertyValue( if (!rProxyDict) rExceptionsList = 0; else - rExceptionsList = (CFArrayRef) CFDictionaryGetValue(rProxyDict, kSCPropNetProxiesExceptionsList); + rExceptionsList = static_cast<CFArrayRef>(CFDictionaryGetValue(rProxyDict, kSCPropNetProxiesExceptionsList)); if (rExceptionsList) { for (CFIndex idx = 0; idx < CFArrayGetCount(rExceptionsList); idx++) { - CFStringRef rException = (CFStringRef) CFArrayGetValueAtIndex(rExceptionsList, idx); + CFStringRef rException = static_cast<CFStringRef>(CFArrayGetValueAtIndex(rExceptionsList, idx)); if (idx>0) aProxyBypassList += rtl::OUString(";"); |