summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-06-10 13:10:54 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-06-10 14:03:38 +0200
commit0986d0d55881271e0c784399cf321e986df41fae (patch)
tree0fb74a323c852560f6ee4a1eb387c76e83dfdd36
parent3e7eb8bcad60d12328198684287c59d6b8ebc84e (diff)
mingw64: cast to pointer from integer of different size in extensions
Change-Id: Ie2162b71e4e9de9fe24ce54815e5139774bb2ec0
-rw-r--r--extensions/source/plugin/win/sysplug.cxx4
-rw-r--r--extensions/source/scanner/scanwin.cxx16
2 files changed, 10 insertions, 10 deletions
diff --git a/extensions/source/plugin/win/sysplug.cxx b/extensions/source/plugin/win/sysplug.cxx
index d75c54a87bdb..4f41e5289322 100644
--- a/extensions/source/plugin/win/sysplug.cxx
+++ b/extensions/source/plugin/win/sysplug.cxx
@@ -389,8 +389,8 @@ int32_t PluginComm_Impl::NPP_Write( NPP instance, NPStream* stream, int32_t offs
m_eCall = eNPP_Write;
m_aArgs[0] = (void*)instance;
m_aArgs[1] = (void*)stream;
- m_aArgs[2] = (void*)offset;
- m_aArgs[3] = (void*)len;
+ m_aArgs[2] = (void*)(sal_IntPtr)offset;
+ m_aArgs[3] = (void*)(sal_IntPtr)len;
m_aArgs[4] = buffer;
return (NPError)execute();
}
diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx
index d8e01600f069..58b262789c2a 100644
--- a/extensions/source/scanner/scanwin.cxx
+++ b/extensions/source/scanner/scanwin.cxx
@@ -87,7 +87,7 @@ class ImpTwain : public ::cppu::WeakImplHelper1< util::XCloseListener >
Link aNotifyLink;
DSMENTRYPROC pDSM;
osl::Module* pMod;
- ULONG nCurState;
+ ULONG_PTR nCurState;
HWND hTwainWnd;
HHOOK hTwainHook;
bool mbCloseFrameOnExit;
@@ -98,7 +98,7 @@ class ImpTwain : public ::cppu::WeakImplHelper1< util::XCloseListener >
void ImplOpenSource();
bool ImplEnableSource();
void ImplXfer();
- void ImplFallback( ULONG nEvent );
+ void ImplFallback( ULONG_PTR nEvent );
void ImplSendCloseEvent();
void ImplDeregisterCloseListener();
void ImplRegisterCloseListener();
@@ -332,7 +332,7 @@ bool ImpTwain::ImplHandleMsg( void* pMsg )
{
case MSG_XFERREADY:
{
- ULONG nEvent = TWAIN_EVENT_QUIT;
+ ULONG_PTR nEvent = TWAIN_EVENT_QUIT;
if( 5 == nCurState )
{
@@ -392,19 +392,19 @@ void ImpTwain::ImplXfer()
if( ( nXRes != -1 ) && ( nYRes != - 1 ) && ( nWidth != - 1 ) && ( nHeight != - 1 ) )
{
// set resolution of bitmap
- BITMAPINFOHEADER* pBIH = (BITMAPINFOHEADER*) GlobalLock( (HGLOBAL) hDIB );
+ BITMAPINFOHEADER* pBIH = (BITMAPINFOHEADER*) GlobalLock( (HGLOBAL) (sal_IntPtr) hDIB );
static const double fFactor = 100.0 / 2.54;
pBIH->biXPelsPerMeter = FRound( fFactor * nXRes );
pBIH->biYPelsPerMeter = FRound( fFactor * nYRes );
- GlobalUnlock( (HGLOBAL) hDIB );
+ GlobalUnlock( (HGLOBAL) (sal_IntPtr) hDIB );
}
- mrMgr.SetData( (void*)(long) hDIB );
+ mrMgr.SetData( (void*) (sal_IntPtr) hDIB );
}
else
- GlobalFree( (HGLOBAL) hDIB );
+ GlobalFree( (HGLOBAL) (sal_IntPtr) hDIB );
nCurState = 7;
}
@@ -416,7 +416,7 @@ void ImpTwain::ImplXfer()
}
}
-void ImpTwain::ImplFallback( ULONG nEvent )
+void ImpTwain::ImplFallback( ULONG_PTR nEvent )
{
Application::PostUserEvent( LINK( this, ImpTwain, ImplFallbackHdl ), (void*) nEvent );
}