Kaydet (Commit) 60de6b0f authored tarafından Fridrich Strba's avatar Fridrich Strba Kaydeden (comit) Fridrich Štrba

Fix Windows build of extensions

üst f222b011
...@@ -73,23 +73,21 @@ ...@@ -73,23 +73,21 @@
//http://qa.openoffice.org/issues/show_bug.cgi?id=82545 //http://qa.openoffice.org/issues/show_bug.cgi?id=82545
//https://bugzilla.mozilla.org/show_bug.cgi?id=241262 //https://bugzilla.mozilla.org/show_bug.cgi?id=241262
#ifdef UNIX #ifndef _UINT32
# ifndef _UINT32 # if defined(__alpha) || defined(__LP64__) || defined(AIX) || defined(WNT)
# if defined(__alpha) || defined(__LP64__) || defined(AIX) typedef unsigned int uint32;
typedef unsigned int uint32; # else /* __alpha */
# else /* __alpha */ typedef unsigned long uint32;
typedef unsigned long uint32;
# endif
# define _UINT32
# endif # endif
# ifndef _INT32 # define _UINT32
# if defined(__alpha) || defined(__LP64__) || defined(AIX) #endif
typedef int int32; #ifndef _INT32
# else /* __alpha */ # if defined(__alpha) || defined(__LP64__) || defined(AIX) || defined(WNT)
typedef long int32; typedef int int32;
# endif # else /* __alpha */
# define _INT32 typedef long int32;
# endif # endif
# define _INT32
#endif #endif
#include "npapi.h" #include "npapi.h"
......
...@@ -1085,7 +1085,7 @@ void PluginInputStream::writeBytes( const Sequence<sal_Int8>& Buffer ) throw() ...@@ -1085,7 +1085,7 @@ void PluginInputStream::writeBytes( const Sequence<sal_Int8>& Buffer ) throw()
m_aFileStream.Seek( m_nWritePos ); m_aFileStream.Seek( m_nWritePos );
nBytes = m_aFileStream.Read( pBuffer, nBytes ); nBytes = m_aFileStream.Read( pBuffer, nBytes );
int32 nBytesRead = 0; int32_t nBytesRead = 0;
try try
{ {
nBytesRead = m_pPlugin->getPluginComm()->NPP_Write( nBytesRead = m_pPlugin->getPluginComm()->NPP_Write(
......
...@@ -72,9 +72,9 @@ public: ...@@ -72,9 +72,9 @@ public:
const char* fname ) = 0; const char* fname ) = 0;
virtual void NPP_URLNotify( NPP instance, const char* url, virtual void NPP_URLNotify( NPP instance, const char* url,
NPReason reason, void* notifyData ) = 0; NPReason reason, void* notifyData ) = 0;
virtual int32 NPP_Write( NPP instance, NPStream* stream, int32 offset, virtual int32_t NPP_Write( NPP instance, NPStream* stream, int32_t offset,
int32 len, void* buffer ) = 0; int32_t len, void* buffer ) = 0;
virtual int32 NPP_WriteReady( NPP instance, NPStream* stream ) = 0; virtual int32_t NPP_WriteReady( NPP instance, NPStream* stream ) = 0;
virtual NPError NPP_GetValue( NPP instance, NPPVariable variable, void* value ) = 0; virtual NPError NPP_GetValue( NPP instance, NPPVariable variable, void* value ) = 0;
virtual NPError NPP_SetValue( NPP instance, NPNVariable variable, virtual NPError NPP_SetValue( NPP instance, NPNVariable variable,
void *value) = 0; void *value) = 0;
......
...@@ -87,10 +87,10 @@ public: ...@@ -87,10 +87,10 @@ public:
virtual NPError NPP_DestroyStream( NPP instance, NPStream* stream, NPError reason ); virtual NPError NPP_DestroyStream( NPP instance, NPStream* stream, NPError reason );
virtual void * NPP_GetJavaClass(); virtual void * NPP_GetJavaClass();
virtual NPError NPP_Initialize(); virtual NPError NPP_Initialize();
virtual NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, virtual NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc,
char* argn[], char* argv[], NPSavedData *saved ); char* argn[], char* argv[], NPSavedData *saved );
virtual NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream* stream, virtual NPError NPP_NewStream( NPP instance, NPMIMEType type, NPStream* stream,
NPBool seekable, uint16* stype ); NPBool seekable, uint16_t* stype );
virtual void NPP_Print( NPP instance, NPPrint* platformPrint ); virtual void NPP_Print( NPP instance, NPPrint* platformPrint );
using PluginComm::NPP_SetWindow; using PluginComm::NPP_SetWindow;
...@@ -99,9 +99,9 @@ public: ...@@ -99,9 +99,9 @@ public:
virtual void NPP_StreamAsFile( NPP instance, NPStream* stream, const char* fname ); virtual void NPP_StreamAsFile( NPP instance, NPStream* stream, const char* fname );
virtual void NPP_URLNotify( NPP instance, const char* url, virtual void NPP_URLNotify( NPP instance, const char* url,
NPReason reason, void* notifyData ); NPReason reason, void* notifyData );
virtual int32 NPP_Write( NPP instance, NPStream* stream, int32 offset, virtual int32_t NPP_Write( NPP instance, NPStream* stream, int32_t offset,
int32 len, void* buffer ); int32_t len, void* buffer );
virtual int32 NPP_WriteReady( NPP instance, NPStream* stream ); virtual int32_t NPP_WriteReady( NPP instance, NPStream* stream );
virtual NPError NPP_GetValue( NPP instance, NPPVariable variable, void *ret_alue ); virtual NPError NPP_GetValue( NPP instance, NPPVariable variable, void *ret_alue );
virtual NPError NPP_SetValue( NPP instance, NPNVariable variable, void *ret_alue ); virtual NPError NPP_SetValue( NPP instance, NPNVariable variable, void *ret_alue );
......
...@@ -174,8 +174,8 @@ long PluginComm_Impl::doIt() ...@@ -174,8 +174,8 @@ long PluginComm_Impl::doIt()
? (*_NPPfuncs.newp)( ? (*_NPPfuncs.newp)(
(NPMIMEType)m_aArgs[0], (NPMIMEType)m_aArgs[0],
(NPP)m_aArgs[1], (NPP)m_aArgs[1],
(uint16)(sal_IntPtr)m_aArgs[2], (uint16_t)(sal_IntPtr)m_aArgs[2],
(int16)(sal_IntPtr)m_aArgs[3], (int16_t)(sal_IntPtr)m_aArgs[3],
(char**)m_aArgs[4], (char**)m_aArgs[4],
(char**)m_aArgs[5], (char**)m_aArgs[5],
(NPSavedData*)m_aArgs[6] ) (NPSavedData*)m_aArgs[6] )
...@@ -189,7 +189,7 @@ long PluginComm_Impl::doIt() ...@@ -189,7 +189,7 @@ long PluginComm_Impl::doIt()
(NPMIMEType)m_aArgs[1], (NPMIMEType)m_aArgs[1],
(NPStream*)m_aArgs[2], (NPStream*)m_aArgs[2],
(NPBool)(sal_IntPtr)m_aArgs[3], (NPBool)(sal_IntPtr)m_aArgs[3],
(uint16*)m_aArgs[4] ) (uint16_t*)m_aArgs[4] )
: NPERR_GENERIC_ERROR); : NPERR_GENERIC_ERROR);
break; break;
case eNPP_Print: case eNPP_Print:
...@@ -227,13 +227,13 @@ long PluginComm_Impl::doIt() ...@@ -227,13 +227,13 @@ long PluginComm_Impl::doIt()
m_aArgs[3] ); m_aArgs[3] );
break; break;
case eNPP_Write: case eNPP_Write:
TRACEN( "eNPP_Write n=", (int32)m_aArgs[3] ); TRACEN( "eNPP_Write n=", (int32_t)m_aArgs[3] );
nRet = (_NPPfuncs.write nRet = (_NPPfuncs.write
? (*_NPPfuncs.write)( ? (*_NPPfuncs.write)(
(NPP)m_aArgs[0], (NPP)m_aArgs[0],
(NPStream*)m_aArgs[1], (NPStream*)m_aArgs[1],
(int32)m_aArgs[2], (int32_t)m_aArgs[2],
(int32)m_aArgs[3], (int32_t)m_aArgs[3],
m_aArgs[4] ) m_aArgs[4] )
: 0); : 0);
break; break;
...@@ -305,7 +305,7 @@ NPError PluginComm_Impl::NPP_DestroyStream( NPP instance, NPStream* stream, NPEr ...@@ -305,7 +305,7 @@ NPError PluginComm_Impl::NPP_DestroyStream( NPP instance, NPStream* stream, NPEr
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
NPError PluginComm_Impl::NPP_New( NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, NPError PluginComm_Impl::NPP_New( NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc,
char* argn[], char* argv[], NPSavedData *saved ) char* argn[], char* argv[], NPSavedData *saved )
{ {
DBG_ASSERT( _NPPfuncs.newp, "### NPP_New(): null pointer in NPP functions table!" ); DBG_ASSERT( _NPPfuncs.newp, "### NPP_New(): null pointer in NPP functions table!" );
...@@ -322,7 +322,7 @@ NPError PluginComm_Impl::NPP_New( NPMIMEType pluginType, NPP instance, uint16 mo ...@@ -322,7 +322,7 @@ NPError PluginComm_Impl::NPP_New( NPMIMEType pluginType, NPP instance, uint16 mo
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
NPError PluginComm_Impl::NPP_NewStream( NPP instance, NPMIMEType type, NPStream* stream, NPError PluginComm_Impl::NPP_NewStream( NPP instance, NPMIMEType type, NPStream* stream,
NPBool seekable, uint16* stype ) NPBool seekable, uint16_t* stype )
{ {
DBG_ASSERT( _NPPfuncs.newstream, "### NPP_NewStream(): null pointer in NPP functions table!" ); DBG_ASSERT( _NPPfuncs.newstream, "### NPP_NewStream(): null pointer in NPP functions table!" );
m_eCall = eNPP_NewStream; m_eCall = eNPP_NewStream;
...@@ -378,7 +378,7 @@ void PluginComm_Impl::NPP_URLNotify( NPP instance, const char* url, NPReason rea ...@@ -378,7 +378,7 @@ void PluginComm_Impl::NPP_URLNotify( NPP instance, const char* url, NPReason rea
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
int32 PluginComm_Impl::NPP_Write( NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer ) int32_t PluginComm_Impl::NPP_Write( NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer )
{ {
DBG_ASSERT( _NPPfuncs.write, "### NPP_Write(): null pointer in NPP functions table!" ); DBG_ASSERT( _NPPfuncs.write, "### NPP_Write(): null pointer in NPP functions table!" );
m_eCall = eNPP_Write; m_eCall = eNPP_Write;
...@@ -391,7 +391,7 @@ int32 PluginComm_Impl::NPP_Write( NPP instance, NPStream* stream, int32 offset, ...@@ -391,7 +391,7 @@ int32 PluginComm_Impl::NPP_Write( NPP instance, NPStream* stream, int32 offset,
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
int32 PluginComm_Impl::NPP_WriteReady( NPP instance, NPStream* stream ) int32_t PluginComm_Impl::NPP_WriteReady( NPP instance, NPStream* stream )
{ {
DBG_ASSERT( _NPPfuncs.writeready, "### NPP_WriteReady(): null pointer in NPP functions table!" ); DBG_ASSERT( _NPPfuncs.writeready, "### NPP_WriteReady(): null pointer in NPP functions table!" );
m_eCall = eNPP_WriteReady; m_eCall = eNPP_WriteReady;
......
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