[Libreoffice-commits] core.git: 27 commits - basic/source bean/native dbaccess/source dbaccess/win32 desktop/source dtrans/source editeng/source extensions/source fpicker/source framework/source include/sal include/svl include/svtools include/systools include/tools pyuno/zipcore sal/osl sal/rtl sc/source sd/source sfx2/source store/source svl/source svtools/source svx/source sw/source tools/source ucb/source vcl/source vcl/win
Fridrich Å trba
fridrich.strba at bluewin.ch
Mon Jun 10 05:04:03 PDT 2013
basic/source/runtime/dllmgr-x64.cxx | 3 +
bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c | 2
dbaccess/source/ui/dlg/ConnectionHelper.cxx | 2
dbaccess/source/ui/querydesign/querydlg.cxx | 8 +--
dbaccess/win32/source/odbcconfig/odbcconfig.cxx | 2
desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 2
desktop/source/deployment/misc/dp_misc.cxx | 1
dtrans/source/win32/misc/ImplHelper.cxx | 2
editeng/source/editeng/editview.cxx | 2
extensions/source/nsplugin/source/nsp_windows.cxx | 23 +++-------
extensions/source/nsplugin/source/nsp_windows.hxx | 19 ++++++--
extensions/source/nsplugin/source/so_main.cxx | 4 -
extensions/source/plugin/win/sysplug.cxx | 4 -
extensions/source/scanner/scanwin.cxx | 16 +++---
fpicker/source/generic/fpicker.cxx | 2
fpicker/source/win32/filepicker/PreviewCtrl.cxx | 2
fpicker/source/win32/filepicker/dibpreview.cxx | 8 ---
fpicker/source/win32/filepicker/helppopupwindow.cxx | 2
fpicker/source/win32/folderpicker/MtaFop.cxx | 2
framework/source/uielement/fontsizemenucontroller.cxx | 4 -
include/sal/types.h | 18 ++++---
include/svl/svdde.hxx | 10 ++--
include/svtools/ctrltool.hxx | 8 +--
include/systools/win32/uwinapi.h | 2
include/tools/link.hxx | 4 -
include/tools/resary.hxx | 8 +--
pyuno/zipcore/python.cxx | 4 -
sal/osl/w32/dllentry.c | 8 +--
sal/osl/w32/thread.c | 8 +--
sal/rtl/alloc_arena.cxx | 2
sal/rtl/alloc_global.cxx | 2
sc/source/filter/xml/XMLStylesExportHelper.cxx | 4 -
sd/source/ui/remotecontrol/BluetoothServer.cxx | 4 -
sfx2/source/dialog/mgetempl.cxx | 2
store/source/storbase.cxx | 2
svl/source/svdde/ddeimp.hxx | 2
svl/source/svdde/ddesvr.cxx | 8 +--
svtools/source/control/ctrlbox.cxx | 4 -
svtools/source/control/ctrltool.cxx | 8 +--
svtools/source/control/stdmenu.cxx | 4 -
svx/source/gengal/gengal.cxx | 6 ++
sw/source/core/docnode/nodedump.cxx | 14 +++---
sw/source/core/text/xmldump.cxx | 6 ++
tools/source/rc/resary.cxx | 2
ucb/source/ucp/webdav-neon/DAVSession.hxx | 2
vcl/source/gdi/impvect.cxx | 2
vcl/win/source/app/salinst.cxx | 6 +-
vcl/win/source/gdi/salgdi3.cxx | 2
vcl/win/source/window/salframe.cxx | 6 +-
49 files changed, 140 insertions(+), 128 deletions(-)
New commits:
commit 4e41227dd6af52ec562d10efcb365defba6bd36e
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 13:19:14 2013 +0200
mingw64: change Link class to use sal_IntPtr instead of long
Change-Id: I2b78c7b714ff064f2f1b8a8eb161e5e2ae121eee
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index d7616d1..e5f45e7 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1348,7 +1348,7 @@ bool EditView::ChangeFontSize( bool bGrow, SfxItemSet& rSet, const FontList* pFo
nHeight = OutputDevice::LogicToLogic( nHeight * 10, (MapUnit)eUnit, MAP_POINT );
FontInfo aFontInfo = pFontList->Get( pFontItem->GetFamilyName(), pFontItem->GetStyleName() );
- const long* pAry = pFontList->GetSizeAry( aFontInfo );
+ const sal_IntPtr* pAry = pFontList->GetSizeAry( aFontInfo );
if( bGrow )
{
diff --git a/include/svl/svdde.hxx b/include/svl/svdde.hxx
index 66ec9f0..0a1d22b 100644
--- a/include/svl/svdde.hxx
+++ b/include/svl/svdde.hxx
@@ -96,8 +96,8 @@ protected:
DdeData aDdeData;
DdeString* pName;
short nType;
- long nId;
- long nTime;
+ sal_IntPtr nId;
+ sal_IntPtr nTime;
Link aData;
Link aDone;
bool bBusy;
@@ -285,11 +285,11 @@ public:
class SVL_DLLPUBLIC DdeTopic
{
- SVL_DLLPRIVATE void _Disconnect( long );
+ SVL_DLLPRIVATE void _Disconnect( sal_IntPtr );
public:
- virtual void Connect( long );
- virtual void Disconnect( long );
+ virtual void Connect( sal_IntPtr );
+ virtual void Disconnect( sal_IntPtr );
virtual DdeData* Get( sal_uLong );
virtual sal_Bool Put( const DdeData* );
virtual sal_Bool Execute( const String* );
diff --git a/include/tools/link.hxx b/include/tools/link.hxx
index c325b67..a06e8b9 100644
--- a/include/tools/link.hxx
+++ b/include/tools/link.hxx
@@ -94,7 +94,7 @@ public:
Link();
Link( void* pLinkHdl, PSTUB pMemFunc );
- long Call( void* pCaller ) const;
+ sal_IntPtr Call( void* pCaller ) const;
sal_Bool IsSet() const;
sal_Bool operator !() const;
@@ -118,7 +118,7 @@ inline Link::Link( void* pLinkHdl, PSTUB pMemFunc )
pFunc = pMemFunc;
}
-inline long Link::Call(void *pCaller) const
+inline sal_IntPtr Link::Call(void *pCaller) const
{
return pFunc ? (*pFunc)(pInst, pCaller) : 0;
}
diff --git a/svl/source/svdde/ddeimp.hxx b/svl/source/svdde/ddeimp.hxx
index aea1b89..21307ff 100644
--- a/svl/source/svdde/ddeimp.hxx
+++ b/svl/source/svdde/ddeimp.hxx
@@ -119,7 +119,7 @@ public:
sal_uInt16 nRefCount;
std::vector<DdeConnection*> aConnections;
// Server
- long hCurConvSvr;
+ sal_IntPtr hCurConvSvr;
DWORD hDdeInstSvr;
short nInstanceSvr;
DdeServices* pServicesSvr;
diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx
index d4b8aee..eaafebb 100644
--- a/svl/source/svdde/ddesvr.cxx
+++ b/svl/source/svdde/ddesvr.cxx
@@ -707,21 +707,21 @@ void DdeTopic::NotifyClient( const String& rItem )
// --- DdeTopic::Connect() -----------------------------------------
-void DdeTopic::Connect( long nId )
+void DdeTopic::Connect( sal_IntPtr nId )
{
aConnectLink.Call( (void*)nId );
}
// --- DdeTopic::Disconnect() --------------------------------------
-void DdeTopic::Disconnect( long nId )
+void DdeTopic::Disconnect( sal_IntPtr nId )
{
aDisconnectLink.Call( (void*)nId );
}
// --- DdeTopic::_Disconnect() --------------------------------------
-void DdeTopic::_Disconnect( long nId )
+void DdeTopic::_Disconnect( sal_IntPtr nId )
{
std::vector<DdeItem*>::iterator iter;
for (iter = aItems.begin(); iter != aItems.end(); ++iter)
@@ -732,7 +732,7 @@ void DdeTopic::_Disconnect( long nId )
// --- DdeTopic::Get() ---------------------------------------------
-DdeData* DdeTopic::Get( sal_uLong nFmt )
+DdeData* DdeTopic::Get( sal_uIntPtr nFmt )
{
if ( aGetLink.IsSet() )
return (DdeData*)aGetLink.Call( (void*)nFmt );
commit e9289dbde26cd89b7e5bf54afccd06fc01dabdde
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 13:17:58 2013 +0200
mingw64: Don't cast to pointers from narrower integers
Change-Id: Ica7bd2d6b395d42d575660991ec74ecb2b744473
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 9e011a4..c69664b 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -41,7 +41,7 @@
#define VECT_MAP( _def_pIn, _def_pOut, _def_nVal ) _def_pOut[_def_nVal]=(_def_pIn[_def_nVal]=((_def_nVal)*4L)+1L)+5L;
#define BACK_MAP( _def_nVal ) ((((_def_nVal)+2)>>2)-1)
-#define VECT_PROGRESS( _def_pProgress, _def_nVal ) if(_def_pProgress&&_def_pProgress->IsSet())(_def_pProgress->Call((void*)_def_nVal));
+#define VECT_PROGRESS( _def_pProgress, _def_nVal ) if(_def_pProgress&&_def_pProgress->IsSet())(_def_pProgress->Call((void*)(sal_IntPtr)_def_nVal));
struct ChainMove { long nDX; long nDY; };
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index b8fe478..57e6414 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -972,7 +972,7 @@ void SalTimer::Start( sal_uLong nMS )
SalFrame* WinSalInstance::CreateChildFrame( SystemParentData* pSystemParentData, sal_uLong nSalFrameStyle )
{
// to switch to Main-Thread
- return (SalFrame*)ImplSendMessage( mhComWnd, SAL_MSG_CREATEFRAME, nSalFrameStyle, (LPARAM)pSystemParentData->hWnd );
+ return (SalFrame*)(sal_IntPtr)ImplSendMessage( mhComWnd, SAL_MSG_CREATEFRAME, nSalFrameStyle, (LPARAM)pSystemParentData->hWnd );
}
// -----------------------------------------------------------------------
@@ -985,7 +985,7 @@ SalFrame* WinSalInstance::CreateFrame( SalFrame* pParent, sal_uLong nSalFrameSty
hWndParent = static_cast<WinSalFrame*>(pParent)->mhWnd;
else
hWndParent = 0;
- return (SalFrame*)ImplSendMessage( mhComWnd, SAL_MSG_CREATEFRAME, nSalFrameStyle, (LPARAM)hWndParent );
+ return (SalFrame*)(sal_IntPtr)ImplSendMessage( mhComWnd, SAL_MSG_CREATEFRAME, nSalFrameStyle, (LPARAM)hWndParent );
}
// -----------------------------------------------------------------------
@@ -1002,7 +1002,7 @@ SalObject* WinSalInstance::CreateObject( SalFrame* pParent,
sal_Bool /*bShow*/ )
{
// to switch to Main-Thread
- return (SalObject*)ImplSendMessage( mhComWnd, SAL_MSG_CREATEOBJECT, 0, (LPARAM)static_cast<WinSalFrame*>(pParent) );
+ return (SalObject*)(sal_IntPtr)ImplSendMessage( mhComWnd, SAL_MSG_CREATEOBJECT, 0, (LPARAM)static_cast<WinSalFrame*>(pParent) );
}
// -----------------------------------------------------------------------
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 59fb0e6..625ee1a 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -2239,7 +2239,7 @@ void WinSalGraphics::GetDevFontList( ImplDevFontList* pFontList )
aInfo.mnPreferedCharSet = DEFAULT_CHARSET;
DWORD nCP = GetACP();
CHARSETINFO aCharSetInfo;
- if ( TranslateCharsetInfo( (DWORD*)nCP, &aCharSetInfo, TCI_SRCCODEPAGE ) )
+ if ( TranslateCharsetInfo( (DWORD*)(sal_IntPtr)nCP, &aCharSetInfo, TCI_SRCCODEPAGE ) )
aInfo.mnPreferedCharSet = aCharSetInfo.ciCharset;
LOGFONTW aLogFont;
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 86c3a7b..072dd3c 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -1012,7 +1012,7 @@ SalGraphics* WinSalFrame::GetGraphics()
mpGraphics2->mbScreen = TRUE;
}
- HDC hDC = (HDC)ImplSendMessage( pSalData->mpFirstInstance->mhComWnd,
+ HDC hDC = (HDC)(sal_IntPtr)ImplSendMessage( pSalData->mpFirstInstance->mhComWnd,
SAL_MSG_GETDC,
(WPARAM)mhWnd, 0 );
if ( hDC )
@@ -1564,7 +1564,7 @@ static void ImplSetParentFrame( WinSalFrame* pThis, HWND hNewParentWnd, sal_Bool
// create a new hwnd with the same styles
HWND hWndParent = hNewParentWnd;
// forward to main thread
- HWND hWnd = (HWND) ImplSendMessage( pSalData->mpFirstInstance->mhComWnd,
+ HWND hWnd = (HWND) (sal_IntPtr) ImplSendMessage( pSalData->mpFirstInstance->mhComWnd,
bAsChild ? SAL_MSG_RECREATECHILDHWND : SAL_MSG_RECREATEHWND,
(WPARAM) hWndParent, (LPARAM)pThis->mhWnd );
@@ -1581,7 +1581,7 @@ static void ImplSetParentFrame( WinSalFrame* pThis, HWND hNewParentWnd, sal_Bool
if( bNeedCacheDC )
{
// re-create cached DC
- HDC hDC = (HDC)ImplSendMessage( pSalData->mpFirstInstance->mhComWnd,
+ HDC hDC = (HDC)(sal_IntPtr)ImplSendMessage( pSalData->mpFirstInstance->mhComWnd,
SAL_MSG_GETDC,
(WPARAM) hWnd, 0 );
if ( hDC )
commit cd3b1847a5549e6348aa5b9b0ed1f59f679c6cf0
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 13:15:46 2013 +0200
Deprecated conversion to char* from string litteral
Change-Id: I64fc36b38be59c909aa96a9faf876232caaac182
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index f5426d8..ce8bc3c 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -829,8 +829,8 @@ void SAL_CALL BluetoothServer::run()
WSAQUERYSET aRecord;
memset( &aRecord, 0, sizeof(aRecord));
aRecord.dwSize = sizeof(aRecord);
- aRecord.lpszServiceInstanceName = "LibreOffice Impress Remote Control";
- aRecord.lpszComment = "Remote control of presentations over bluetooth.";
+ aRecord.lpszServiceInstanceName = (char *)"LibreOffice Impress Remote Control";
+ aRecord.lpszComment = (char *)"Remote control of presentations over bluetooth.";
aRecord.lpServiceClassId = (LPGUID) &SerialPortServiceClass_UUID;
aRecord.dwNameSpace = NS_BTH;
aRecord.dwNumberOfCsAddrs = 1;
commit afba998a9a4a9759768c09722c31ca2b78204a82
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 13:15:13 2013 +0200
mingw64: sal_Int32 cannot hold pointer
Change-Id: Ib2578cd94c74f171b58f3478d758221593ee5523
diff --git a/dtrans/source/win32/misc/ImplHelper.cxx b/dtrans/source/win32/misc/ImplHelper.cxx
index ccc81d8..982d33f 100644
--- a/dtrans/source/win32/misc/ImplHelper.cxx
+++ b/dtrans/source/win32/misc/ImplHelper.cxx
@@ -63,7 +63,7 @@ sal_uInt32 SAL_CALL getWinCPFromMimeCharset( const OUString& charset )
rtl_TextEncoding txtEnc =
rtl_getTextEncodingFromMimeCharset( osCharset.getStr( ) );
- sal_uInt32 winChrs = rtl_getBestWindowsCharsetFromTextEncoding( txtEnc );
+ sal_uIntPtr winChrs = rtl_getBestWindowsCharsetFromTextEncoding( txtEnc );
CHARSETINFO chrsInf;
sal_Bool bRet = TranslateCharsetInfo( (DWORD*)winChrs, &chrsInf, TCI_SRCCHARSET ) ?
commit e862e147391d09681b0419f1d41335eb6c97cf99
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 13:14:16 2013 +0200
_UNICODE macro unused
Change-Id: I4820830f24c8a9a6d9ec3ad79df51bb2ac4f1e4d
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index 5a1bd22..dadfe23 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -44,7 +44,6 @@
#ifdef WNT
#define UNICODE
-#define _UNICODE
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
commit 2340939198113cf10e693356aa3897f97e3e6ad4
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 13:13:42 2013 +0200
Macro reported as unused
Change-Id: Iaf7c4bc438147a283e6493598d250c9b53dd6fc0
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index df0e417..c9bdf06 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -85,7 +85,6 @@
#include <boost/scoped_ptr.hpp>
#ifdef WNT
-#define GradientStyle_RECT BLA_GradientStyle_RECT
#if defined _MSC_VER
#pragma warning (push, 1)
#pragma warning (disable: 4005)
@@ -95,7 +94,6 @@
#pragma warning (pop)
#endif
#include <objbase.h>
-#undef GradientStyle_RECT
#endif
commit 08fc4dc88bce87cc4cd235d92a8a909a9fb122ed
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 13:12:02 2013 +0200
mingw64: long -> sal_IntPtr in sfx2
Change-Id: If995a2cf00e2ced618ad1a1a68d093eb163ee27a
diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx
index 0d6755d..12cb90e 100644
--- a/sfx2/source/dialog/mgetempl.cxx
+++ b/sfx2/source/dialog/mgetempl.cxx
@@ -191,7 +191,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage(Window* pParent, const SfxItemS
pTupel->nFlags != SFXSTYLEBIT_ALL )
{
m_pFilterLb->InsertEntry( pTupel->aName, nIdx );
- m_pFilterLb->SetEntryData(nIdx, (void*)(long)i);
+ m_pFilterLb->SetEntryData(nIdx, (void*)(sal_IntPtr)i);
if ( ( pTupel->nFlags & nMask ) == nMask )
nStyleFilterIdx = nIdx;
commit 5eaa60143c8fec08ce996b3e9e0c3e67a06a834f
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 13:11:24 2013 +0200
Possibly uninitialized variables
Change-Id: Ie2b52f66c02f395d45fe24bbd2c3d897c7335add
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 9020d38..6f87529 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -1278,8 +1278,8 @@ sal_Int32 ScRowStyles::GetStyleNameIndex(const sal_Int32 nTable, const sal_Int32
StylesType& r = aTables[nTable];
if (!r.is_tree_valid())
r.build_tree();
- sal_Int32 nStyle;
- sal_Int32 nStart, nEnd;
+ sal_Int32 nStyle(0);
+ sal_Int32 nStart(0), nEnd(0);
if (r.search_tree(nField, nStyle, &nStart, &nEnd).second)
{
// Cache this value for better performance.
commit 0986d0d55881271e0c784399cf321e986df41fae
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 13:10:54 2013 +0200
mingw64: cast to pointer from integer of different size in extensions
Change-Id: Ie2162b71e4e9de9fe24ce54815e5139774bb2ec0
diff --git a/extensions/source/plugin/win/sysplug.cxx b/extensions/source/plugin/win/sysplug.cxx
index d75c54a..4f41e52 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 d8e0160..58b2627 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 );
}
commit 3e7eb8bcad60d12328198684287c59d6b8ebc84e
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 13:09:25 2013 +0200
mingw64: Use the *LongPtr Windows api
Change-Id: I00c753f71460bee9f2bce3af35b352a25a3b8484
diff --git a/extensions/source/nsplugin/source/nsp_windows.cxx b/extensions/source/nsplugin/source/nsp_windows.cxx
index e143a69..3315ec1 100644
--- a/extensions/source/nsplugin/source/nsp_windows.cxx
+++ b/extensions/source/nsplugin/source/nsp_windows.cxx
@@ -27,28 +27,19 @@
************************************************************************/
-#ifdef WNT
-#ifdef _MSC_VER
- #pragma warning (push,1)
- #pragma warning (disable:4668)
-#endif
- #include <windows.h>
-#ifdef _MSC_VER
- #pragma warning (pop)
-#endif
-#endif
+#include "nsp_windows.hxx"
-int NSP_ResetWinStyl(long hParent)
+int NSP_ResetWinStyl(LONG_PTR hParent)
{
int ret = 0;
#ifdef WNT
- LONG dOldStyl = GetWindowLong( (HWND)hParent, GWL_STYLE);
+ LONG_PTR dOldStyl = GetWindowLongPtr( (HWND)hParent, GWL_STYLE);
ret = dOldStyl;
if(ret != 0)
{
- LONG dNewStyl = dOldStyl|WS_CLIPCHILDREN;
- if(0 == SetWindowLong((HWND)hParent, GWL_STYLE, dNewStyl))
+ LONG_PTR dNewStyl = dOldStyl|WS_CLIPCHILDREN;
+ if(0 == SetWindowLongPtr((HWND)hParent, GWL_STYLE, dNewStyl))
ret = 0;
}
#endif
@@ -56,11 +47,11 @@ int NSP_ResetWinStyl(long hParent)
}
-int NSP_RestoreWinStyl(long hParent, long dOldStyle)
+int NSP_RestoreWinStyl(LONG_PTR hParent, LONG_PTR dOldStyle)
{
int ret = 0;
#ifdef WNT
- ret = SetWindowLong((HWND)hParent, GWL_STYLE, dOldStyle);
+ ret = SetWindowLongPtr((HWND)hParent, GWL_STYLE, dOldStyle);
#endif
return ret;
}
diff --git a/extensions/source/nsplugin/source/nsp_windows.hxx b/extensions/source/nsplugin/source/nsp_windows.hxx
index 1a2d497..cd08c93 100644
--- a/extensions/source/nsplugin/source/nsp_windows.hxx
+++ b/extensions/source/nsplugin/source/nsp_windows.hxx
@@ -28,10 +28,23 @@
#ifndef __NSP_WINDOWS_HXX__
#define __NSP_WINDOWS_HXX__
+#ifdef WNT
+#ifdef _MSC_VER
+ #pragma warning (push,1)
+ #pragma warning (disable:4668)
+#endif
+ #include <windows.h>
+#ifdef _MSC_VER
+ #pragma warning (pop)
+#endif
+#else
+#ifndef LONG_PTR
+ #define LONG_PTR long
+#endif
+#endif
-
-int NSP_ResetWinStyl(long hParent);
-int NSP_RestoreWinStyl(long hParent, long dOldStyle);
+int NSP_ResetWinStyl(LONG_PTR hParent);
+int NSP_RestoreWinStyl(LONG_PTR hParent, LONG_PTR dOldStyle);
#endif
diff --git a/extensions/source/nsplugin/source/so_main.cxx b/extensions/source/nsplugin/source/so_main.cxx
index ba6ee2c..35af67f 100644
--- a/extensions/source/nsplugin/source/so_main.cxx
+++ b/extensions/source/nsplugin/source/so_main.cxx
@@ -449,8 +449,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
iPipe[1] = atoi(argv[2]);
// fd_pipe[0]: read, fd_pipe[0]: write
- fd_pipe[0] = (NSP_PIPE_FD) iPipe[0] ;
- fd_pipe[1] = (NSP_PIPE_FD) iPipe[1] ;
+ fd_pipe[0] = (NSP_PIPE_FD) (sal_IntPtr) iPipe[0] ;
+ fd_pipe[1] = (NSP_PIPE_FD) (sal_IntPtr) iPipe[1] ;
NSP_Close_Pipe(fd_pipe[1]);
if(iPipe[0] < 0)
commit 90e16066593047915b7007bb7a6846eabeeca567
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 13:07:59 2013 +0200
mingw64: long -> sal_IntPtr in dbaccess
Change-Id: Ic9e049b6b79a8ae3777d8b2a6e918289445c21da
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index cd284de..964fb6b 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -272,7 +272,7 @@ DBG_NAME(OConnectionHelper)
OUString sOldDataSource=getURLNoPrefix();
OUString sNewDataSource;
HWND hWnd = GetParent()->GetSystemData()->hWnd;
- sNewDataSource = getAdoDatalink((long)hWnd,sOldDataSource);
+ sNewDataSource = getAdoDatalink((LONG_PTR)hWnd,sOldDataSource);
if ( !sNewDataSource.isEmpty() )
{
setURLNoPrefix(sNewDataSource);
diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx
index 90adc94..e382fda 100644
--- a/dbaccess/source/ui/querydesign/querydlg.cxx
+++ b/dbaccess/source/ui/querydesign/querydlg.cxx
@@ -146,7 +146,7 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent,
const sal_uInt16 nCount = m_pJoinControl->aLB_JoinType.GetEntryCount();
for (sal_uInt16 i = 0; i < nCount; ++i)
{
- const long nJoinTyp = reinterpret_cast<long>(m_pJoinControl->aLB_JoinType.GetEntryData(i));
+ const sal_IntPtr nJoinTyp = reinterpret_cast<sal_IntPtr>(m_pJoinControl->aLB_JoinType.GetEntryData(i));
if ( !bSupportFullJoin && nJoinTyp == ID_FULL_JOIN )
m_pJoinControl->aLB_JoinType.RemoveEntry(i);
else if ( !bSupportOuterJoin && (nJoinTyp == ID_LEFT_JOIN || nJoinTyp == ID_RIGHT_JOIN) )
@@ -184,7 +184,7 @@ IMPL_LINK( DlgQryJoin, LBChangeHdl, ListBox*, /*pListBox*/ )
const EJoinType eOldJoinType = eJoinType;
sal_uInt16 nResId = 0;
const sal_uInt16 nPos = m_pJoinControl->aLB_JoinType.GetSelectEntryPos();
- const long nJoinType = reinterpret_cast<long>(m_pJoinControl->aLB_JoinType.GetEntryData(nPos));
+ const sal_IntPtr nJoinType = reinterpret_cast<sal_IntPtr>(m_pJoinControl->aLB_JoinType.GetEntryData(nPos));
sal_Bool bAddHint = sal_True;
switch ( nJoinType )
{
@@ -324,7 +324,7 @@ void DlgQryJoin::setJoinType(EJoinType _eNewJoinType)
eJoinType = _eNewJoinType;
m_pJoinControl->m_aCBNatural.Enable(eJoinType != CROSS_JOIN);
- long nJoinType = 0;
+ sal_IntPtr nJoinType = 0;
switch ( eJoinType )
{
default:
@@ -348,7 +348,7 @@ void DlgQryJoin::setJoinType(EJoinType _eNewJoinType)
const sal_uInt16 nCount = m_pJoinControl->aLB_JoinType.GetEntryCount();
for (sal_uInt16 i = 0; i < nCount; ++i)
{
- if ( nJoinType == reinterpret_cast<long>(m_pJoinControl->aLB_JoinType.GetEntryData(i)) )
+ if ( nJoinType == reinterpret_cast<sal_IntPtr>(m_pJoinControl->aLB_JoinType.GetEntryData(i)) )
{
m_pJoinControl->aLB_JoinType.SelectEntryPos(i);
break;
commit 7c2c48953e0afafe524866d18be5ada4fdd37049
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 13:06:32 2013 +0200
mingw64: NULL used in arithmetic
Change-Id: I87bf28e1d6db2afe5ffa095cbf9181602ec9fc3f
diff --git a/dbaccess/win32/source/odbcconfig/odbcconfig.cxx b/dbaccess/win32/source/odbcconfig/odbcconfig.cxx
index 85d37c4..47f83eb 100644
--- a/dbaccess/win32/source/odbcconfig/odbcconfig.cxx
+++ b/dbaccess/win32/source/odbcconfig/odbcconfig.cxx
@@ -90,7 +90,7 @@ BOOL registerWindowClass( HINSTANCE _hAppInstance )
wcx.lpszClassName = L"ODBCConfigMainClass"; // name of window class
wcx.hIconSm = NULL; // small class icon
- return ( NULL != RegisterClassEx( &wcx ) );
+ return ( !!RegisterClassEx( &wcx ) );
}
/// initializes the application instances
commit b1a82bd284275335b89a859ddaa577d682209678
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 13:02:20 2013 +0200
mingw64: use integers of teh right size in framework
Change-Id: Id10f827ef70a19a6261abea5c1b6c835b8bee701
diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx
index 95b8de6..c39d87a 100644
--- a/framework/source/uielement/fontsizemenucontroller.cxx
+++ b/framework/source/uielement/fontsizemenucontroller.cxx
@@ -159,8 +159,8 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
if ( m_pHeightArray )
delete m_pHeightArray;
- const long* pTempAry;
- const long* pAry = pFontList->GetSizeAry( aFntInfo );
+ const sal_IntPtr* pTempAry;
+ const sal_IntPtr* pAry = pFontList->GetSizeAry( aFntInfo );
sal_uInt16 nSizeCount = 0;
while ( pAry[nSizeCount] )
nSizeCount++;
commit 1af337fc9201a22d5beaac3452b8441c458b52e4
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 13:01:16 2013 +0200
mingw64: include sal/types.h to be sure we are using C99 formatting strings
Change-Id: Idb78cb18ed7718996628233dfb546eb1f6f345c1
diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx
index 0f68d83..9a888af 100644
--- a/svx/source/gengal/gengal.cxx
+++ b/svx/source/gengal/gengal.cxx
@@ -7,6 +7,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+
+// Include this before stdio.h for the __MINGW32__ sake.
+// This header contails a define that modifies the way
+// formating strings work for the mingw platforms.
+#include <sal/types.h>
+
#include <stdio.h>
#ifndef _WIN32
#include <unistd.h>
commit c74a6e6bce9bfcae74e1a264557197176bba75e7
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 13:00:14 2013 +0200
mingw64: use the right format for writing out pointer-sized integers
Change-Id: I7961ffd978cb02c62be176a0afe931959b7d8f1f
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 20c13f2..96e787a 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -93,6 +93,10 @@ void WriterHelper::writeFormatAttribute( const char* attribute, const char* form
va_end( va );
}
+// Hack: somehow conversion from "..." to va_list does
+// bomb on two string litterals in the format.
+static const char* TMP_FORMAT = "%" SAL_PRIuUINTPTR;
+
}
void SwDoc::dumpAsXml( xmlTextWriterPtr w )
@@ -117,9 +121,9 @@ void MarkManager::dumpAsXml( xmlTextWriterPtr w )
{
pMark_t pMark = *it;
writer.startElement("fieldmark");
- writer.writeFormatAttribute("startNode", "%lu", pMark->GetMarkStart().nNode.GetIndex());
+ writer.writeFormatAttribute("startNode", TMP_FORMAT, pMark->GetMarkStart().nNode.GetIndex());
writer.writeFormatAttribute("startOffset", "%d", pMark->GetMarkStart().nContent.GetIndex());
- writer.writeFormatAttribute("endNode", "%lu", pMark->GetMarkEnd().nNode.GetIndex());
+ writer.writeFormatAttribute("endNode", TMP_FORMAT, pMark->GetMarkEnd().nNode.GetIndex());
writer.writeFormatAttribute("endOffset", "%d", pMark->GetMarkEnd().nContent.GetIndex());
OString txt8 = OUStringToOString(pMark->GetName(), RTL_TEXTENCODING_UTF8);
writer.writeFormatAttribute("name", "%s", BAD_CAST( txt8.getStr()));
@@ -206,7 +210,7 @@ void SwNode::dumpAsXml( xmlTextWriterPtr w )
}
writer.startElement( name );
writer.writeFormatAttribute( "ptr", "%p", this );
- writer.writeFormatAttribute( "index", "%lu", GetIndex() );
+ writer.writeFormatAttribute( "index", TMP_FORMAT, GetIndex() );
writer.endElement();
if( GetNodeType() == ND_ENDNODE )
writer.endElement(); // end start node
@@ -239,7 +243,7 @@ void SwStartNode::dumpAsXml( xmlTextWriterPtr w )
}
writer.startElement( name );
writer.writeFormatAttribute( "ptr", "%p", this );
- writer.writeFormatAttribute( "index", "%lu", GetIndex() );
+ writer.writeFormatAttribute( "index", TMP_FORMAT, GetIndex() );
// writer.endElement(); - it is a start node, so don't end, will make xml better nested
}
@@ -248,7 +252,7 @@ void SwTxtNode::dumpAsXml( xmlTextWriterPtr w )
WriterHelper writer( w );
writer.startElement( "text" );
writer.writeFormatAttribute( "ptr", "%p", this );
- writer.writeFormatAttribute( "index", "%lu", GetIndex() );
+ writer.writeFormatAttribute( "index", TMP_FORMAT, GetIndex() );
OUString txt = GetTxt();
for( int i = 0; i < 32; ++i )
txt = txt.replace( i, '*' );
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index ff410f8..069ff53 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -348,6 +348,10 @@ void SwFrm::dumpInfosAsXml( xmlTextWriterPtr writer )
xmlTextWriterEndElement( writer );
}
+// Hack: somehow conversion from "..." to va_list does
+// bomb on two string litterals in the format.
+static const char* TMP_FORMAT = "%" SAL_PRIuUINTPTR;
+
void SwFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
{
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "ptr" ), "%p", this );
@@ -365,7 +369,7 @@ void SwFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
{
SwTxtFrm *pTxtFrm = ( SwTxtFrm * ) this;
SwTxtNode *pTxtNode = pTxtFrm->GetTxtNode();
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "txtNodeIndex" ), "%lu", pTxtNode->GetIndex() );
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "txtNodeIndex" ), TMP_FORMAT, pTxtNode->GetIndex() );
}
if (IsHeaderFrm() || IsFooterFrm())
{
commit a2a342495361726c7d085910a5ac127d8cf522c9
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 12:58:40 2013 +0200
Deprecated conversion from const wchar_t* to wchar_t*
Change-Id: I8c0a97372f0855543d6207adb0abaa4cc820aabd
diff --git a/pyuno/zipcore/python.cxx b/pyuno/zipcore/python.cxx
index 34ff2e2..9ef7183 100644
--- a/pyuno/zipcore/python.cxx
+++ b/pyuno/zipcore/python.cxx
@@ -183,7 +183,7 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) {
if (GetLastError() != ERROR_ENVVAR_NOT_FOUND) {
exit(EXIT_FAILURE);
}
- orig = L"";
+ orig = (wchar_t *)L"";
} else {
orig = new wchar_t[n];
if (orig == NULL ||
@@ -208,7 +208,7 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) {
if (GetLastError() != ERROR_ENVVAR_NOT_FOUND) {
exit(EXIT_FAILURE);
}
- orig = L"";
+ orig = (wchar_t *)L"";
} else {
orig = new wchar_t[n];
if (orig == NULL ||
commit 956c775c54fd60647fbd936402269db3fea88059
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 12:57:30 2013 +0200
mingw64: Don't cast from MAKELONG to pointer directly
Change-Id: Ia0ff071a5676f27d39175e30d7c5f472e32c99b3
diff --git a/fpicker/source/win32/filepicker/PreviewCtrl.cxx b/fpicker/source/win32/filepicker/PreviewCtrl.cxx
index bc37fba..e061a63 100644
--- a/fpicker/source/win32/filepicker/PreviewCtrl.cxx
+++ b/fpicker/source/win32/filepicker/PreviewCtrl.cxx
@@ -280,7 +280,7 @@ CFilePreview::~CFilePreview( )
{
// unregister preview window class
sal_Bool bRet = UnregisterClass(
- (LPCTSTR)MAKELONG( m_atomPrevWndClass, 0 ),
+ (LPCTSTR)(DWORD_PTR)MAKELONG( m_atomPrevWndClass, 0 ),
m_hInstance );
OSL_POSTCOND( bRet, "Unregister preview window class failed" );
}
diff --git a/fpicker/source/win32/filepicker/dibpreview.cxx b/fpicker/source/win32/filepicker/dibpreview.cxx
index e3b437d..1bfb21d 100644
--- a/fpicker/source/win32/filepicker/dibpreview.cxx
+++ b/fpicker/source/win32/filepicker/dibpreview.cxx
@@ -48,12 +48,6 @@ namespace /* private */
#define PREVIEWWND_CLASS_NAME TEXT("DIBPreviewWnd###")
-// means 3 pixel left and 3 pixel right
-#define HORZ_BODER_SPACE 6
-
-// means 3 pixel top and 3 pixel bottom
-#define VERT_BORDER_SPACE 6
-
//---------------------------------------------------
// static member initialization
//---------------------------------------------------
@@ -445,7 +439,7 @@ void SAL_CALL CDIBPreview::UnregisterDibPreviewWindowClass()
if (0 == s_RegisterDibPreviewWndCount)
{
- UnregisterClass((LPCTSTR)MAKELONG(s_ClassAtom,0),m_Instance);
+ UnregisterClass((LPCTSTR)(DWORD_PTR)MAKELONG(s_ClassAtom,0),m_Instance);
s_ClassAtom = 0;
}
}
diff --git a/fpicker/source/win32/filepicker/helppopupwindow.cxx b/fpicker/source/win32/filepicker/helppopupwindow.cxx
index 732d3e0..63be556 100644
--- a/fpicker/source/win32/filepicker/helppopupwindow.cxx
+++ b/fpicker/source/win32/filepicker/helppopupwindow.cxx
@@ -585,7 +585,7 @@ void SAL_CALL CHelpPopupWindow::UnregisterWindowClass( )
if ( 0 == s_RegisterWndClassCount )
{
if ( !UnregisterClass(
- (LPCTSTR)MAKELONG( s_ClassAtom, 0 ), m_hInstance ) )
+ (LPCTSTR)(DWORD_PTR)MAKELONG( s_ClassAtom, 0 ), m_hInstance ) )
{
OSL_FAIL( "unregister window class failed" );
}
diff --git a/fpicker/source/win32/folderpicker/MtaFop.cxx b/fpicker/source/win32/folderpicker/MtaFop.cxx
index 10705cd..c455190 100644
--- a/fpicker/source/win32/folderpicker/MtaFop.cxx
+++ b/fpicker/source/win32/folderpicker/MtaFop.cxx
@@ -815,7 +815,7 @@ void SAL_CALL CMtaFolderPicker::UnregisterStaRequestWindowClass( )
if ( 0 == s_StaRequestWndRegisterCount )
{
UnregisterClass(
- (LPCTSTR)MAKELONG( s_ClassAtom, 0 ), m_hInstance );
+ (LPCTSTR)(DWORD_PTR)MAKELONG( s_ClassAtom, 0 ), m_hInstance );
s_ClassAtom = 0;
}
commit 008147e8056f31bcc71da0158e2593e088ffec6d
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 12:56:17 2013 +0200
mingw64: use the sal formatting strings in store
Change-Id: Id6b8f4ed6df14bd80a7937001ec1cfb98acd7f52
diff --git a/store/source/storbase.cxx b/store/source/storbase.cxx
index ef3353f..1c5b22b 100644
--- a/store/source/storbase.cxx
+++ b/store/source/storbase.cxx
@@ -127,7 +127,7 @@ PageData::Allocator_Impl::initialize (sal_uInt16 nPageSize)
{
char name[RTL_CACHE_NAME_LENGTH + 1];
sal_Size size = sal::static_int_cast< sal_Size >(nPageSize);
- (void) snprintf (name, sizeof(name), "store_page_alloc_%lu", size);
+ (void) snprintf (name, sizeof(name), "store_page_alloc_%" SAL_PRIuUINTPTR, size);
m_page_cache = rtl_cache_create (name, size, 0, 0, 0, 0, 0, 0, 0);
if (!m_page_cache)
commit 583a5c090aa8b7aab6b8afbe2e8dc632d13a9678
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 12:55:36 2013 +0200
This macro is supposingly unused
Change-Id: I9edf21919322af22e323b48009e934d70766353e
diff --git a/fpicker/source/generic/fpicker.cxx b/fpicker/source/generic/fpicker.cxx
index 4bc8d9d..6b7743e 100644
--- a/fpicker/source/generic/fpicker.cxx
+++ b/fpicker/source/generic/fpicker.cxx
@@ -29,9 +29,7 @@
#include "vcl/svapp.hxx"
#ifdef WNT
-#define GradientStyle_RECT BLA_GradientStyle_RECT
#include <windows.h>
-#undef GradientStyle_RECT
#endif
using css::uno::Reference;
commit 1b8cc40601e54d445db5f7c5d2580f76c811b4d5
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 12:53:06 2013 +0200
Don't warn about undefined macro any more
Change-Id: I403cad8ce1953d2c8e8948a94a688519525bbbc4
diff --git a/ucb/source/ucp/webdav-neon/DAVSession.hxx b/ucb/source/ucp/webdav-neon/DAVSession.hxx
index 72e0197..4b384e8 100644
--- a/ucb/source/ucp/webdav-neon/DAVSession.hxx
+++ b/ucb/source/ucp/webdav-neon/DAVSession.hxx
@@ -211,7 +211,7 @@ private:
oslInterlockedCount m_nRefCount;
friend class DAVSessionFactory;
-#if defined WNT && _MSC_VER < 1310
+#if defined ( _MSC_VER ) && _MSC_VER < 1310
friend struct std::auto_ptr< DAVSession >;
// work around compiler bug...
#else // WNT
commit ce959ab7ce4c9577ac23953919781d842e6c32e5
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 12:52:10 2013 +0200
mingw64: use the right integer sizes on win64
Change-Id: Idb263ad369d2dad4fe4de924f2b2404a0fcf62d3
diff --git a/include/tools/resary.hxx b/include/tools/resary.hxx
index 515dd77..7337c348 100644
--- a/include/tools/resary.hxx
+++ b/include/tools/resary.hxx
@@ -33,7 +33,7 @@ private:
struct ImplResStringItem
{
OUString m_aStr;
- long m_nValue;
+ sal_IntPtr m_nValue;
ImplResStringItem( const OUString& rStr, long nValue = 0 ) :
m_aStr( rStr ),
@@ -47,13 +47,13 @@ public:
ResStringArray( const ResId& rResId );
~ResStringArray();
- const OUString GetString( sal_uInt32 nIndex ) const
+ const OUString GetString( sal_uInt32 nIndex ) const
{ return (nIndex < m_aStrings.size()) ? m_aStrings[nIndex].m_aStr : OUString(); }
- long GetValue( sal_uInt32 nIndex ) const
+ sal_IntPtr GetValue( sal_uInt32 nIndex ) const
{ return (nIndex < m_aStrings.size()) ? m_aStrings[nIndex].m_nValue : -1; }
sal_uInt32 Count() const { return sal_uInt32(m_aStrings.size()); }
- sal_uInt32 FindIndex( long nValue ) const;
+ sal_uInt32 FindIndex( sal_IntPtr nValue ) const;
};
#endif
diff --git a/tools/source/rc/resary.cxx b/tools/source/rc/resary.cxx
index f3d49f0..77f3ee7 100644
--- a/tools/source/rc/resary.cxx
+++ b/tools/source/rc/resary.cxx
@@ -49,7 +49,7 @@ ResStringArray::~ResStringArray()
{
}
-sal_uInt32 ResStringArray::FindIndex( long nValue ) const
+sal_uInt32 ResStringArray::FindIndex( sal_IntPtr nValue ) const
{
const sal_uInt32 nItems = m_aStrings.size();
for ( sal_uInt32 i = 0; i < nItems; i++ )
commit 43135665bf9093c52f424069bcf83d50a93bdc0c
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 12:49:33 2013 +0200
mingw64: use integers able to contain a size in svtools
Change-Id: Id5505f75a2331be682b74d085a7959fc4bf07df8
diff --git a/include/svtools/ctrltool.hxx b/include/svtools/ctrltool.hxx
index efe7b53..66de4f8 100644
--- a/include/svtools/ctrltool.hxx
+++ b/include/svtools/ctrltool.hxx
@@ -121,7 +121,7 @@ FontList::GetStyleName()
--------------------------------------------------------------------------
-const long* FontList::GetSizeAry( const FontInfo& rInfo ) const;
+const sal_IntPtr* FontList::GetSizeAry( const FontInfo& rInfo ) const;
Diese Methode liefert zum uebergebenen Font die vorhandenen Groessen.
Falls es sich dabei um einen skalierbaren Font handelt, werden Standard-
@@ -158,7 +158,7 @@ private:
OUString maBoldItalic;
OUString maBlack;
OUString maBlackItalic;
- long* mpSizeAry;
+ sal_IntPtr* mpSizeAry;
OutputDevice* mpDev;
OutputDevice* mpDev2;
boost::ptr_vector<ImplFontListNameInfo> maEntries;
@@ -203,8 +203,8 @@ public:
sal_Handle GetNextFontInfo( sal_Handle hFontInfo ) const;
const FontInfo& GetFontInfo( sal_Handle hFontInfo ) const;
- const long* GetSizeAry( const FontInfo& rInfo ) const;
- static const long* GetStdSizeAry();
+ const sal_IntPtr* GetSizeAry( const FontInfo& rInfo ) const;
+ static const sal_IntPtr* GetStdSizeAry();
private:
FontList( const FontList& );
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 556840f..a071cb2 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -1809,8 +1809,8 @@ void FontSizeBox::Fill( const FontInfo* pInfo, const FontList* pList )
return;
// query font sizes
- const long* pTempAry;
- const long* pAry = 0;
+ const sal_IntPtr* pTempAry;
+ const sal_IntPtr* pAry = 0;
if( pInfo )
{
diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx
index e4e6dd2..9119102 100644
--- a/svtools/source/control/ctrltool.cxx
+++ b/svtools/source/control/ctrltool.cxx
@@ -33,7 +33,7 @@
// =======================================================================
// Standard Fontgroessen fuer scalierbare Fonts
-static const long aStdSizeAry[] =
+static const sal_IntPtr aStdSizeAry[] =
{
60,
70,
@@ -770,7 +770,7 @@ const FontInfo& FontList::GetFontInfo( sal_Handle hFontInfo ) const
// -----------------------------------------------------------------------
-const long* FontList::GetSizeAry( const FontInfo& rInfo ) const
+const sal_IntPtr* FontList::GetSizeAry( const FontInfo& rInfo ) const
{
// Size-Array vorher loeschen
if ( mpSizeAry )
@@ -802,7 +802,7 @@ const long* FontList::GetSizeAry( const FontInfo& rInfo ) const
sal_uInt16 i;
sal_uInt16 nRealCount = 0;
long nOldHeight = 0;
- ((FontList*)this)->mpSizeAry = new long[nDevSizeCount+1];
+ ((FontList*)this)->mpSizeAry = new sal_IntPtr[nDevSizeCount+1];
for ( i = 0; i < nDevSizeCount; i++ )
{
Size aSize = pDevice->GetDevFontSize( rInfo, i );
@@ -821,7 +821,7 @@ const long* FontList::GetSizeAry( const FontInfo& rInfo ) const
// -----------------------------------------------------------------------
-const long* FontList::GetStdSizeAry()
+const sal_IntPtr* FontList::GetStdSizeAry()
{
return aStdSizeAry;
}
diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx
index f5f0cf7..1608004 100644
--- a/svtools/source/control/stdmenu.cxx
+++ b/svtools/source/control/stdmenu.cxx
@@ -167,8 +167,8 @@ void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList )
if ( mpHeightAry )
delete[] mpHeightAry;
- const long* pTempAry;
- const long* pAry = pList->GetSizeAry( rInfo );
+ const sal_IntPtr* pTempAry;
+ const sal_IntPtr* pAry = pList->GetSizeAry( rInfo );
sal_uInt16 nSizeCount = 0;
while ( pAry[nSizeCount] )
nSizeCount++;
commit 378b2522b40004ca5f5b6de0b4eda0ac13d4153d
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 12:46:41 2013 +0200
mingw64: use integer able to contain pointer
Change-Id: Id37c488531add53fd8d7514cde9ac37e61f67c38
diff --git a/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c b/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c
index c666f8a..b4c4162 100644
--- a/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c
+++ b/bean/native/win32/com_sun_star_comp_beans_LocalOfficeWindow.c
@@ -111,7 +111,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_star_comp_beans_LocalOfficeWindow_getNative
JAWT_DrawingSurfaceInfo* dsi;
JAWT_Win32DrawingSurfaceInfo* dsi_win;
HWND hWnd;
- LONG hFuncPtr;
+ LONG_PTR hFuncPtr;
/* Get the AWT */
awt.version = JAWT_VERSION_1_3;
commit a5d26f86e8b30028de2acc9ca0950c30fdaa2dae
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 12:45:52 2013 +0200
Werror: labels ... not handled in switch
Change-Id: Ib73d757ffb313ce365caa3f70c472f662f6d9719
diff --git a/basic/source/runtime/dllmgr-x64.cxx b/basic/source/runtime/dllmgr-x64.cxx
index 1575226..7d3e291 100644
--- a/basic/source/runtime/dllmgr-x64.cxx
+++ b/basic/source/runtime/dllmgr-x64.cxx
@@ -550,6 +550,9 @@ SbError call(
*(sal_uInt64 *)&stack[17*8],
*(sal_uInt64 *)&stack[18*8],
*(sal_uInt64 *)&stack[19*8]);
+ break;
+ default:
+ break;
}
switch (result.GetType()) {
commit 094560c29fed9b0b58505717c4e6694ad9ff8a69
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 12:44:57 2013 +0200
mingw64: casting to pointer from narrower integer fixes in sal
Change-Id: I63321e33f92223be47c7ee25dbf03fe3032991d6
diff --git a/sal/osl/w32/dllentry.c b/sal/osl/w32/dllentry.c
index 4071356..39c6c61 100644
--- a/sal/osl/w32/dllentry.c
+++ b/sal/osl/w32/dllentry.c
@@ -98,7 +98,7 @@ __do_global_dtors (void)
void
__do_global_ctors (void)
{
- unsigned long nptrs = (unsigned long) __CTOR_LIST__[0];
+ sal_uIntPtr nptrs = (sal_uIntPtr) __CTOR_LIST__[0];
unsigned i;
/*
@@ -106,7 +106,7 @@ __do_global_ctors (void)
* is terminated with a null entry. Otherwise the first entry was
* the number of pointers in the list.
*/
- if (nptrs == (unsigned long)-1)
+ if (nptrs == (sal_uIntPtr)-1)
{
for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++)
;
@@ -264,7 +264,7 @@ static DWORD GetParentProcessId()
static DWORD WINAPI ParentMonitorThreadProc( LPVOID lpParam )
{
- DWORD dwParentProcessId = (DWORD)lpParam;
+ DWORD_PTR dwParentProcessId = (DWORD_PTR)lpParam;
HANDLE hParentProcess = OpenProcess( SYNCHRONIZE, FALSE, dwParentProcessId );
if ( IsValidHandle( hParentProcess ) )
@@ -300,7 +300,7 @@ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
{
DWORD dwThreadId = 0;
- DWORD dwParentProcessId = (DWORD)atol( szBuffer );
+ DWORD_PTR dwParentProcessId = (DWORD_PTR)atol( szBuffer );
if ( dwParentProcessId && GetParentProcessId() == dwParentProcessId )
{
diff --git a/sal/osl/w32/thread.c b/sal/osl/w32/thread.c
index 8763285..d4dbc7f 100644
--- a/sal/osl/w32/thread.c
+++ b/sal/osl/w32/thread.c
@@ -565,14 +565,14 @@ DWORD g_dwTLSTextEncodingIndex = (DWORD)-1;
rtl_TextEncoding SAL_CALL osl_getThreadTextEncoding(void)
{
- DWORD dwEncoding;
+ DWORD_PTR dwEncoding;
rtl_TextEncoding _encoding;
BOOL gotACP;
if ( (DWORD)-1 == g_dwTLSTextEncodingIndex )
g_dwTLSTextEncodingIndex = TlsAlloc();
- dwEncoding = (DWORD)TlsGetValue( g_dwTLSTextEncodingIndex );
+ dwEncoding = (DWORD_PTR)TlsGetValue( g_dwTLSTextEncodingIndex );
_encoding = LOWORD(dwEncoding);
gotACP = HIWORD(dwEncoding);
@@ -586,7 +586,7 @@ rtl_TextEncoding SAL_CALL osl_getThreadTextEncoding(void)
else
_encoding = rtl_getTextEncodingFromWindowsCodePage( GetACP() );
- TlsSetValue( g_dwTLSTextEncodingIndex, (LPVOID)MAKELONG( _encoding, TRUE ) );
+ TlsSetValue( g_dwTLSTextEncodingIndex, (LPVOID)(DWORD_PTR)MAKELONG( _encoding, TRUE ) );
}
return _encoding;
@@ -599,7 +599,7 @@ rtl_TextEncoding SAL_CALL osl_setThreadTextEncoding( rtl_TextEncoding Encoding )
{
rtl_TextEncoding oldEncoding = osl_getThreadTextEncoding();
- TlsSetValue( g_dwTLSTextEncodingIndex, (LPVOID)MAKELONG( Encoding, TRUE) );
+ TlsSetValue( g_dwTLSTextEncodingIndex, (LPVOID)(DWORD_PTR)MAKELONG( Encoding, TRUE) );
return oldEncoding;
}
diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx
index d35ba1f..9017a5a 100644
--- a/sal/rtl/alloc_arena.cxx
+++ b/sal/rtl/alloc_arena.cxx
@@ -721,7 +721,7 @@ rtl_arena_activate (
for (i = 1; i <= n; i++)
{
size = i * arena->m_quantum;
- (void) snprintf (namebuf, sizeof(namebuf), "%s_%lu", arena->m_name, size);
+ (void) snprintf (namebuf, sizeof(namebuf), "%s_%" SAL_PRIuUINTPTR, arena->m_name, size);
arena->m_qcache_ptr[i - 1] = rtl_cache_create(namebuf, size, 0, NULL, NULL, NULL, NULL, arena, RTL_CACHE_FLAG_QUANTUMCACHE);
}
}
diff --git a/sal/rtl/alloc_global.cxx b/sal/rtl/alloc_global.cxx
index ab571c6..8194b13 100644
--- a/sal/rtl/alloc_global.cxx
+++ b/sal/rtl/alloc_global.cxx
@@ -210,7 +210,7 @@ void rtl_memory_init()
for (i = 0; i < n; i++)
{
char name[RTL_CACHE_NAME_LENGTH + 1];
- (void) snprintf (name, sizeof(name), "rtl_alloc_%lu", g_alloc_sizes[i]);
+ (void) snprintf (name, sizeof(name), "rtl_alloc_%" SAL_PRIuUINTPTR, g_alloc_sizes[i]);
g_alloc_caches[i] = rtl_cache_create (name, g_alloc_sizes[i], 0, NULL, NULL, NULL, NULL, NULL, 0);
}
commit 44feea1957f6f3ff28917625223e610fe2807c49
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 12:40:41 2013 +0200
mingw64: don't cast handle to 32-bit int in a macro
Change-Id: I06063d3c171256c54151be04c810b79bd2d194e1
diff --git a/include/systools/win32/uwinapi.h b/include/systools/win32/uwinapi.h
index 5c4c88c..4aa6997 100644
--- a/include/systools/win32/uwinapi.h
+++ b/include/systools/win32/uwinapi.h
@@ -51,7 +51,7 @@ inline bool IsValidHandle(HANDLE handle)
#else /* __cplusplus */
-#define IsValidHandle(Handle) ((DWORD)(Handle) + 1 > 1)
+#define IsValidHandle(Handle) ((DWORD_PTR)(Handle) + 1 > 1)
#endif /* __cplusplus */
commit 9a33bfdacd9f74aefad545141c896a8bc23c1ffc
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 10 12:38:52 2013 +0200
mingw64: force C99 formating strings for consistency
Change-Id: I1399596a3edc3324ae4aa04e3866ae2f5e673985
diff --git a/include/sal/types.h b/include/sal/types.h
index 55f2e72..070a3f29 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -29,6 +29,15 @@
extern "C" {
#endif
+#if defined ( __MINGW32__ ) && !defined ( __USE_MINGW_ANSI_STDIO )
+/* Define to use the C99 formating string for coherence reasons.
+ * In mingw-w64 some functions are ported to the ms formating string
+ * some are not yet. This is the only way to make the formatting
+ * strings work all the time
+ */
+#define __USE_MINGW_ANSI_STDIO 1
+#endif
+
/********************************************************************************/
/* Data types
*/
@@ -101,17 +110,10 @@ typedef unsigned char sal_uInt8;
#define SAL_CONST_INT64(x) x##ll
#define SAL_CONST_UINT64(x) x##ull
- #ifdef __MINGW32__
- #define SAL_PRIdINT64 "I64d"
- #define SAL_PRIuUINT64 "I64u"
- #define SAL_PRIxUINT64 "I64x"
- #define SAL_PRIXUINT64 "I64X"
- #else
#define SAL_PRIdINT64 "lld"
#define SAL_PRIuUINT64 "llu"
#define SAL_PRIxUINT64 "llx"
#define SAL_PRIXUINT64 "llX"
- #endif
#else
#error "Could not find 64-bit type, add support for your architecture"
#endif
@@ -158,7 +160,7 @@ typedef void * sal_Handle;
/* printf-style conversion specification length modifiers for size_t and
ptrdiff_t (most platforms support C99, MSC has its own extension) */
-#if defined(_MSC_VER) || defined(__MINGW32__)
+#if defined(_MSC_VER)
#define SAL_PRI_SIZET "I"
#define SAL_PRI_PTRDIFFT "I"
#else
More information about the Libreoffice-commits
mailing list