Clean up C-style casts from pointers to void
Change-Id: Idb32372009faf2bc2e223f1f8977cb3fc6b182a3
This commit is contained in:
@@ -291,15 +291,15 @@ public:
|
||||
IMPL_STATIC_LINK_NOINSTANCE( ProcessEventsClass_Impl, CallEvent, void*, pEvent )
|
||||
{
|
||||
// Application events are processed by the Desktop::HandleAppEvent implementation.
|
||||
Desktop::HandleAppEvent( *((ApplicationEvent*)pEvent) );
|
||||
delete (ApplicationEvent*)pEvent;
|
||||
Desktop::HandleAppEvent( *static_cast<ApplicationEvent*>(pEvent) );
|
||||
delete static_cast<ApplicationEvent*>(pEvent);
|
||||
return 0;
|
||||
}
|
||||
|
||||
IMPL_STATIC_LINK_NOINSTANCE( ProcessEventsClass_Impl, ProcessDocumentsEvent, void*, pEvent )
|
||||
{
|
||||
// Documents requests are processed by the OfficeIPCThread implementation
|
||||
ProcessDocumentsRequest* pDocsRequest = (ProcessDocumentsRequest*)pEvent;
|
||||
ProcessDocumentsRequest* pDocsRequest = static_cast<ProcessDocumentsRequest*>(pEvent);
|
||||
|
||||
if ( pDocsRequest )
|
||||
{
|
||||
|
@@ -540,7 +540,7 @@ static char* doc_getPartName(LibreOfficeKitDocument* pThis, int nPart)
|
||||
|
||||
OUString sName = pDoc->getPartName( nPart );
|
||||
OString aString = OUStringToOString(sName, RTL_TEXTENCODING_UTF8);
|
||||
char* pMemory = (char*) malloc(aString.getLength() + 1);
|
||||
char* pMemory = static_cast<char*>(malloc(aString.getLength() + 1));
|
||||
strcpy(pMemory, aString.getStr());
|
||||
return pMemory;
|
||||
|
||||
@@ -768,7 +768,7 @@ static char* lo_getError (LibreOfficeKit *pThis)
|
||||
{
|
||||
LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis);
|
||||
OString aString = OUStringToOString(pLib->maLastExceptionMsg, RTL_TEXTENCODING_UTF8);
|
||||
char* pMemory = (char*) malloc(aString.getLength() + 1);
|
||||
char* pMemory = static_cast<char*>(malloc(aString.getLength() + 1));
|
||||
strcpy(pMemory, aString.getStr());
|
||||
return pMemory;
|
||||
}
|
||||
|
@@ -40,7 +40,7 @@ extern "C" void offacc_workerfunc (void * acc)
|
||||
{
|
||||
osl_setThreadName("URP Acceptor");
|
||||
|
||||
((Acceptor*)acc)->run();
|
||||
static_cast<Acceptor*>(acc)->run();
|
||||
}
|
||||
|
||||
Acceptor::Acceptor( const Reference< XComponentContext >& rxContext )
|
||||
|
Reference in New Issue
Block a user