dtrans/source/inc/MtaOleClipb.hxx | 6 +++--- dtrans/source/win32/mtaole/MtaOleClipb.cxx | 16 ++++++++-------- rsc/source/rscpp/cpp3.c | 10 +++------- 3 files changed, 14 insertions(+), 18 deletions(-)
New commits: commit 7595a809d2a4aea9299633546ca95f709133dee8 Author: Damjan Jovanovic <dam...@apache.org> AuthorDate: Tue Feb 5 18:51:13 2019 +0000 Commit: Damjan Jovanovic <dam...@apache.org> CommitDate: Tue Feb 5 18:51:13 2019 +0000 Win64 fixes for dtrans. Patch by: me diff --git a/dtrans/source/inc/MtaOleClipb.hxx b/dtrans/source/inc/MtaOleClipb.hxx index ea7f06506083..58400388cf6f 100644 --- a/dtrans/source/inc/MtaOleClipb.hxx +++ b/dtrans/source/inc/MtaOleClipb.hxx @@ -81,9 +81,9 @@ private: // from a different thread context! //--------------------------------------------------------------- - LRESULT onSetClipboard( IDataObject* pIDataObject ); - LRESULT onGetClipboard( LPSTREAM* ppStream ); - LRESULT onFlushClipboard( ); + HRESULT onSetClipboard( IDataObject* pIDataObject ); + HRESULT onGetClipboard( LPSTREAM* ppStream ); + HRESULT onFlushClipboard( ); sal_Bool onRegisterClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfncClipViewerCallback ); // win32 clipboard-viewer support diff --git a/dtrans/source/win32/mtaole/MtaOleClipb.cxx b/dtrans/source/win32/mtaole/MtaOleClipb.cxx index 9a8f6557bb0d..c9214cbbdea9 100644 --- a/dtrans/source/win32/mtaole/MtaOleClipb.cxx +++ b/dtrans/source/win32/mtaole/MtaOleClipb.cxx @@ -540,16 +540,16 @@ sal_Bool CMtaOleClipboard::onRegisterClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfn // //-------------------------------------------------------------------- -LRESULT CMtaOleClipboard::onSetClipboard( IDataObject* pIDataObject ) +HRESULT CMtaOleClipboard::onSetClipboard( IDataObject* pIDataObject ) { - return static_cast<LRESULT>( OleSetClipboard( pIDataObject ) ); + return OleSetClipboard( pIDataObject ); } //-------------------------------------------------------------------- // //-------------------------------------------------------------------- -LRESULT CMtaOleClipboard::onGetClipboard( LPSTREAM* ppStream ) +HRESULT CMtaOleClipboard::onGetClipboard( LPSTREAM* ppStream ) { OSL_ASSERT(NULL != ppStream); @@ -562,16 +562,16 @@ LRESULT CMtaOleClipboard::onGetClipboard( LPSTREAM* ppStream ) hr = MarshalIDataObjectInStream(pIDataObject.get(), ppStream); OSL_ENSURE(SUCCEEDED(hr), "marshalling cliboard data object failed"); } - return static_cast<LRESULT>(hr); + return hr; } //-------------------------------------------------------------------- // flush the ole-clipboard //-------------------------------------------------------------------- -LRESULT CMtaOleClipboard::onFlushClipboard( ) +HRESULT CMtaOleClipboard::onFlushClipboard( ) { - return static_cast<LRESULT>( OleFlushClipboard( ) ); + return OleFlushClipboard( ); } //-------------------------------------------------------------------- @@ -585,7 +585,7 @@ LRESULT CMtaOleClipboard::onChangeCBChain( HWND hWndRemove, HWND hWndNext ) else if ( IsWindow( m_hwndNextClipViewer ) ) { // forward the message to the next one - DWORD dwResult; + DWORD_PTR dwResult; SendMessageTimeoutA( m_hwndNextClipViewer, WM_CHANGECBCHAIN, @@ -620,7 +620,7 @@ LRESULT CMtaOleClipboard::onDrawClipboard( ) // forward the message to the next viewer in the chain if ( IsWindow( m_hwndNextClipViewer ) ) { - DWORD dwResult; + DWORD_PTR dwResult; SendMessageTimeoutA( m_hwndNextClipViewer, WM_DRAWCLIPBOARD, commit 66620d1521b9d9a31ab5c552c268b2c55c4639c4 Author: Damjan Jovanovic <dam...@apache.org> AuthorDate: Tue Feb 5 18:08:21 2019 +0000 Commit: Damjan Jovanovic <dam...@apache.org> CommitDate: Tue Feb 5 18:08:21 2019 +0000 Use native time_t instead of a 32-bit-capped long, which breaks on Win64. From source/rscpp/cppdef.h: * OK_DATE Predefines the compilation date if set TRUE. * Not permitted by the Nov. 12, 1984 Draft Standard. In 1984 there might have been reason to doubt whether time_t will exist on various systems, but in 2019 we can be certain that it does. Patch by: me diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c index b7294d022ff5..1ee7b267ae91 100644 --- a/rsc/source/rscpp/cpp3.c +++ b/rsc/source/rscpp/cpp3.c @@ -20,10 +20,6 @@ *************************************************************/ -#if defined(_MSC_VER) && (_MSC_VER > 1310) -#define _USE_32BIT_TIME_T -#endif - #include <stdio.h> #ifdef UNX #include <stdlib.h> @@ -462,7 +458,7 @@ void initdefines() register char *tp; register DEFBUF *dp; int i; - long tvec; + time_t tvec; #if !defined( ZTC ) && !defined( WNT ) && !defined(BLC) && !defined(G3) extern char *ctime(); @@ -500,9 +496,9 @@ void initdefines() dp = defendel("__DATE__", FALSE); dp->repl = tp = getmem(27); dp->nargs = DEF_NOARGS; - time( (time_t*)&tvec); + time(&tvec); *tp++ = '"'; - strcpy(tp, ctime((const time_t*)&tvec)); + strcpy(tp, ctime(&tvec)); tp[24] = '"'; /* Overwrite newline */ #endif } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits