loplugin:cstylecast
Change-Id: I8bb20f4ce9c8cca3b70057cd8c4fb23819fa3b23
This commit is contained in:
parent
da1d01a432
commit
9e53fbd9a6
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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(";");
|
||||
|
Loading…
x
Reference in New Issue
Block a user