[Libreoffice-commits] core.git: include/svl include/vcl include/wntgcci svl/source vcl/inc vcl/source

Fridrich Å trba fridrich.strba at bluewin.ch
Tue Jun 4 07:12:05 PDT 2013


 include/svl/svdde.hxx          |    2 +-
 include/vcl/region.hxx         |    2 +-
 include/wntgcci/sehandler.hxx  |    4 ++--
 svl/source/svdde/ddecli.cxx    |    4 ++--
 svl/source/svdde/ddesvr.cxx    |   18 ++++++------------
 vcl/inc/win/wincomp.hxx        |    2 +-
 vcl/source/window/printdlg.cxx |    2 +-
 7 files changed, 14 insertions(+), 20 deletions(-)

New commits:
commit a96f593b415390f7f218e5772930d127a832eb43
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Tue Jun 4 16:09:58 2013 +0200

    Some more sal_IntPtr dance, but enough for today
    
    Change-Id: Ic772181321e74713244223cc3d4542bd4cd2dc88

diff --git a/include/svl/svdde.hxx b/include/svl/svdde.hxx
index c8a08be..66ec9f0 100644
--- a/include/svl/svdde.hxx
+++ b/include/svl/svdde.hxx
@@ -220,7 +220,7 @@ public:
                     ~DdeConnection();
 
     long            GetError();
-    long            GetConvId();
+    sal_IntPtr      GetConvId();
 
     static const std::vector<DdeConnection*>& GetConnections();
 
diff --git a/include/vcl/region.hxx b/include/vcl/region.hxx
index 02eebc7..88c55ea 100644
--- a/include/vcl/region.hxx
+++ b/include/vcl/region.hxx
@@ -39,7 +39,7 @@ struct ImplRegionInfo;
 enum RegionType { REGION_NULL, REGION_EMPTY, REGION_RECTANGLE, REGION_COMPLEX };
 enum RegionOverlapType { REGION_INSIDE, REGION_OVER, REGION_OUTSIDE };
 
-typedef long RegionHandle;
+typedef sal_IntPtr RegionHandle;
 
 // ----------
 // - Region -
diff --git a/include/wntgcci/sehandler.hxx b/include/wntgcci/sehandler.hxx
index 2fabe48..9218add 100644
--- a/include/wntgcci/sehandler.hxx
+++ b/include/wntgcci/sehandler.hxx
@@ -7,8 +7,8 @@
 #ifndef _SEHANDLER_HXX
 #define _SEHANDLER_HXX
 
-#ifndef __MINGW32__
-#error This file should be included only in a MinGW compilation
+#if !defined( __MINGW32__ ) || defined ( _WIN64 )
+#error This file should be included only in a 32-bit MinGW compilation
 #endif
 
 #include <windows.h>
diff --git a/svl/source/svdde/ddecli.cxx b/svl/source/svdde/ddecli.cxx
index 5928211..1688811 100644
--- a/svl/source/svdde/ddecli.cxx
+++ b/svl/source/svdde/ddecli.cxx
@@ -243,9 +243,9 @@ const String& DdeConnection::GetTopicName()
 
 // --- DdeConnection::GetConvId() ----------------------------------
 
-long DdeConnection::GetConvId()
+sal_IntPtr DdeConnection::GetConvId()
 {
-    return (long)pImp->hConv;
+    return (sal_IntPtr)pImp->hConv;
 }
 
 const std::vector<DdeConnection*>& DdeConnection::GetConnections()
diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx
index 202d26d..d4b8aee 100644
--- a/svl/source/svdde/ddesvr.cxx
+++ b/svl/source/svdde/ddesvr.cxx
@@ -45,12 +45,7 @@ class DdeItemImp : public std::vector<DdeItemImpData> {};
 
 // --- DdeInternat::SvrCallback() ----------------------------------
 
-#ifdef WNT
-HDDEDATA CALLBACK DdeInternal::SvrCallback(
-            WORD nCode, WORD nCbType, HCONV hConv, HSZ hText1, HSZ hText2,
-            HDDEDATA hData, DWORD, DWORD )
-#else
-#if defined( ICC )
+#if defined( WNT ) || defined( ICC )
 HDDEDATA CALLBACK DdeInternal::SvrCallback(
             WORD nCode, WORD nCbType, HCONV hConv, HSZ hText1, HSZ hText2,
             HDDEDATA hData, DWORD, DWORD )
@@ -59,7 +54,6 @@ HDDEDATA CALLBACK _export DdeInternal::SvrCallback(
             WORD nCode, WORD nCbType, HCONV hConv, HSZ hText1, HSZ hText2,
             HDDEDATA hData, DWORD, DWORD )
 #endif
-#endif
 {
     DdeServices&    rAll = DdeService::GetServices();
     DdeService*     pService;
@@ -169,7 +163,7 @@ HDDEDATA CALLBACK _export DdeInternal::SvrCallback(
                 pTopic = FindTopic( *pService, hText1 );
                 if ( pTopic )
                 {
-                    pTopic->Connect( (long) hConv );
+                    pTopic->Connect( (sal_IntPtr) hConv );
                     pC = new Conversation;
                     pC->hConv = hConv;
                     pC->pTopic = pTopic;
@@ -195,7 +189,7 @@ HDDEDATA CALLBACK _export DdeInternal::SvrCallback(
 found:
     if ( nCode == XTYP_DISCONNECT)
     {
-        pC->pTopic->_Disconnect( (long) hConv );
+        pC->pTopic->_Disconnect( (sal_IntPtr) hConv );
         for ( ConvList::iterator it = pService->pConv->begin();
               it != pService->pConv->end();
               ++it
@@ -227,7 +221,7 @@ found:
         pTopic->aItem = OUString();
 
     sal_Bool bRes = sal_False;
-    pInst->hCurConvSvr = (long)hConv;
+    pInst->hCurConvSvr = (sal_IntPtr)hConv;
     switch( nCode )
     {
         case XTYP_REQUEST:
@@ -324,14 +318,14 @@ found:
 
                 if (pItem)
                 {
-                    pItem->IncMonitor( (long)hConv );
+                    pItem->IncMonitor( (sal_IntPtr)hConv );
                     pInst->hCurConvSvr = 0;
                 }
             }
             return (HDDEDATA)sal_True;
 
         case XTYP_ADVSTOP:
-            pItem->DecMonitor( (long)hConv );
+            pItem->DecMonitor( (sal_IntPtr)hConv );
             if( !pItem->pImpData )
                 pTopic->StopAdviseLoop();
             pInst->hCurConvSvr = 0;
diff --git a/vcl/inc/win/wincomp.hxx b/vcl/inc/win/wincomp.hxx
index e6c7fd0..8660c1b 100644
--- a/vcl/inc/win/wincomp.hxx
+++ b/vcl/inc/win/wincomp.hxx
@@ -135,7 +135,7 @@ inline void SetWindowFont( HWND hWnd, HFONT hFont, BOOL bRedraw )
 
 inline HFONT GetWindowFont( HWND hWnd )
 {
-    return (HFONT)(UINT)SendMessage( hWnd, WM_GETFONT, 0, 0 );
+    return (HFONT) SendMessage( hWnd, WM_GETFONT, 0, 0 );
 }
 
 inline void SetClassCursor( HWND hWnd, HCURSOR hCursor )
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index f11044c..89f9a76 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -1336,7 +1336,7 @@ Size PrintDialog::getJobPageSize()
 
 void PrintDialog::updateNupFromPages()
 {
-    long nPages = long(maNUpPage.mpNupPagesBox->GetEntryData(maNUpPage.mpNupPagesBox->GetSelectEntryPos()));
+    sal_IntPtr nPages = sal_IntPtr(maNUpPage.mpNupPagesBox->GetEntryData(maNUpPage.mpNupPagesBox->GetSelectEntryPos()));
     int nRows   = int(maNUpPage.mpNupRowsEdt->GetValue());
     int nCols   = int(maNUpPage.mpNupColEdt->GetValue());
     long nPageMargin  = long(maNUpPage.mpPageMarginEdt->Denormalize(maNUpPage.mpPageMarginEdt->GetValue( FUNIT_100TH_MM )));


More information about the Libreoffice-commits mailing list