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

Fix types of functions called via pointer (-fsanitze=function)

Change-Id: Ife0151a04477ce30bb132e6dfae9f4d3a74bf4b0
üst b6ee5cf7
......@@ -19,8 +19,6 @@
#include "cppuhelper/implementationentry.hxx"
#include <osl/diagnose.h>
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/registry/XRegistryKey.hpp"
#include <service.hxx>
......@@ -49,8 +47,8 @@ using namespace ::com::sun::star::uno;
extern "C"
{
SAL_DLLPUBLIC_EXPORT void * SAL_CALL vbaevents_component_getFactory(
const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager,
registry::XRegistryKey * pRegistryKey )
const sal_Char * pImplName, void * pServiceManager,
void * pRegistryKey )
{
OSL_TRACE("In component_getFactory");
return ::cppu::component_getFactoryHelper(
......
......@@ -1448,7 +1448,7 @@ bool PPTWriter::ImplWriteAtomEnding()
// - exported function -
extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL ExportPPT( const std::vector< com::sun::star::beans::PropertyValue >& rMediaData, SvStorageRef& rSvStorage,
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL ExportPPT( const std::vector< com::sun::star::beans::PropertyValue >& rMediaData, SvStorageRef& rSvStorage,
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rXModel,
::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > & rXStatInd,
SvMemoryStream* pVBA, sal_uInt32 nCnvrtFlags )
......@@ -1467,7 +1467,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL ExportPPT( const std::vector< com:
return bStatus;
}
extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL SaveVBA( SfxObjectShell& rDocShell, SvMemoryStream*& pBas )
extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL SaveVBA( SfxObjectShell& rDocShell, SvMemoryStream*& pBas )
{
SvStorageRef xDest( new SvStorage( new SvMemoryStream(), true ) );
SvxImportMSVBasic aMSVBas( rDocShell, *xDest );
......
......@@ -139,6 +139,12 @@ static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = fals
#if !defined(ANDROID)
namespace {
extern "C" typedef DesktopType Fn_get_desktop_environment();
}
static DesktopType get_desktop_environment()
{
OUString aModule(DESKTOP_DETECTOR_DLL_NAME);
......@@ -148,8 +154,9 @@ static DesktopType get_desktop_environment()
DesktopType ret = DESKTOP_UNKNOWN;
if( aMod )
{
DesktopType (*pSym)() = reinterpret_cast<DesktopType(*)()>(
osl_getAsciiFunctionSymbol( aMod, "get_desktop_environment" ));
Fn_get_desktop_environment * pSym
= reinterpret_cast<Fn_get_desktop_environment *>(
osl_getAsciiFunctionSymbol(aMod, "get_desktop_environment"));
if( pSym )
ret = pSym();
}
......
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