dbaccess/source/ui/dlg/advancedsettings.cxx | 5 desktop/win32/source/guistdio/guistdio.inc | 508 ++++++------- desktop/win32/source/officeloader/officeloader.cxx | 20 embeddedobj/source/msole/olecomponent.cxx | 16 embeddedobj/source/msole/oleembed.cxx | 3 embeddedobj/source/msole/olepersist.cxx | 5 extensions/source/scanner/scanwin.cxx | 4 forms/source/component/ListBox.cxx | 3 fpicker/source/odma/ODMAFilePicker.cxx | 2 fpicker/source/win32/filepicker/FileOpenDlg.cxx | 5 fpicker/source/win32/filepicker/dibpreview.cxx | 7 fpicker/source/win32/filepicker/filepickerstate.cxx | 7 fpicker/source/win32/filepicker/helppopupwindow.cxx | 4 fpicker/source/win32/misc/AutoBuffer.cxx | 4 fpicker/source/win32/misc/AutoBuffer.hxx | 2 hwpfilter/source/hcode.cxx | 2 sc/qa/unit/helper/debughelper.hxx | 2 sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx | 4 sd/source/ui/accessibility/AccessibleSlideSorterView.cxx | 6 sd/source/ui/accessibility/AccessibleTreeNode.cxx | 4 sd/source/ui/table/TableDesignPane.cxx | 13 solenv/inc/prewin.h | 2 svtools/inc/svtools/syntaxhighlight.hxx | 4 ucb/source/ucp/odma/odma_provider.cxx | 2 24 files changed, 330 insertions(+), 304 deletions(-)
New commits: commit 4845405d405164a92792d7fc2ee98bb13394b9e9 Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 19:15:28 2012 +0200 WaE: could not convert ... from 'const char*' to 'const rtl::OUString' diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx index 17e479e..abc0762 100644 --- a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx +++ b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx @@ -535,8 +535,8 @@ uno::Sequence< ::rtl::OUString> SAL_CALL ThrowIfDisposed (); static const OUString sServiceNames[2] = { - "com.sun.star.accessibility.Accessible", - "com.sun.star.accessibility.AccessibleContext" + OUString("com.sun.star.accessibility.Accessible"), + OUString("com.sun.star.accessibility.AccessibleContext") }; return uno::Sequence<OUString> (sServiceNames, 2); } diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx index 31cc1ce..c470c60 100644 --- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx +++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx @@ -761,9 +761,9 @@ uno::Sequence< ::rtl::OUString> SAL_CALL ThrowIfDisposed (); static const OUString sServiceNames[3] = { - "com.sun.star.accessibility.Accessible", - "com.sun.star.accessibility.AccessibleContext", - "com.sun.star.drawing.AccessibleSlideSorterView" + OUString("com.sun.star.accessibility.Accessible"), + OUString("com.sun.star.accessibility.AccessibleContext"), + OUString("com.sun.star.drawing.AccessibleSlideSorterView") }; return uno::Sequence<OUString> (sServiceNames, 3); } diff --git a/sd/source/ui/accessibility/AccessibleTreeNode.cxx b/sd/source/ui/accessibility/AccessibleTreeNode.cxx index 871995e..5a0c014 100644 --- a/sd/source/ui/accessibility/AccessibleTreeNode.cxx +++ b/sd/source/ui/accessibility/AccessibleTreeNode.cxx @@ -602,8 +602,8 @@ uno::Sequence< ::rtl::OUString> SAL_CALL { ThrowIfDisposed (); static const OUString sServiceNames[2] = { - "com.sun.star.accessibility.Accessible", - "com.sun.star.accessibility.AccessibleContext", + OUString("com.sun.star.accessibility.Accessible"), + OUString("com.sun.star.accessibility.AccessibleContext"), }; return uno::Sequence<OUString> (sServiceNames, 2); } diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx index a48aaae..59a41bd 100644 --- a/sd/source/ui/table/TableDesignPane.cxx +++ b/sd/source/ui/table/TableDesignPane.cxx @@ -85,13 +85,12 @@ static const OUString* getPropertyNames() { static const OUString gPropNames[ CB_BANDED_COLUMNS-CB_HEADER_ROW+1 ] = { - - "UseFirstRowStyle" , - "UseLastRowStyle" , - "UseBandingRowStyle" , - "UseFirstColumnStyle" , - "UseLastColumnStyle" , - "UseBandingColumnStyle" + OUString("UseFirstRowStyle") , + OUString("UseLastRowStyle") , + OUString("UseBandingRowStyle") , + OUString("UseFirstColumnStyle") , + OUString("UseLastColumnStyle") , + OUString("UseBandingColumnStyle") }; return &gPropNames[0]; } commit e6c997c96226cb4e8244f7ded91a8a0fde91c93b Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 18:25:48 2012 +0200 mingw: avoid weird build error and -Werror The error message is: "'*((void*)& aBoundColumn +2)' may be used uninitialized in this function" using gcc 4.7.0 in gnu++11 mode and boost 1.48.0 . diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 5dbf8a8..84bf9ff 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -678,7 +678,8 @@ namespace frm return; } - ::boost::optional< sal_Int16 > aBoundColumn; + ::boost::optional< sal_Int16 > aBoundColumn(0); + aBoundColumn.reset(); if ( m_aBoundColumn.getValueType().getTypeClass() == TypeClass_SHORT ) { sal_Int16 nBoundColumn( 0 ); commit 849b02e4462d5c9695d4d61c4a5b8a87a3162fa1 Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 18:18:54 2012 +0200 mingw: avoid weird build error and -Werror The error message is: "'*((void*)& aValue +1)' may be used uninitialized in this function" using gcc 4.7.0 in gnu++11 mode and boost 1.48.0 . diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 0636ff0..e2dc5c8 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -300,7 +300,8 @@ namespace dbaui if ( !*setting->ppControl ) continue; - ::boost::optional< bool > aValue; + ::boost::optional< bool > aValue(false); + aValue.reset(); SFX_ITEMSET_GET( _rSet, pItem, SfxPoolItem, setting->nItemId, sal_True ); if ( pItem->ISA( SfxBoolItem ) ) @@ -320,7 +321,7 @@ namespace dbaui } else { - sal_Bool bValue = *aValue; + bool bValue = *aValue; if ( setting->bInvertedDisplay ) bValue = !bValue; (*setting->ppControl)->Check( bValue ); commit 6fbe6d281d5f61529084c6226cb4bf191849639a Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 18:18:38 2012 +0200 WaE: "NOMINMAX" redefined diff --git a/sc/qa/unit/helper/debughelper.hxx b/sc/qa/unit/helper/debughelper.hxx index 1312e04..ee84f4c 100644 --- a/sc/qa/unit/helper/debughelper.hxx +++ b/sc/qa/unit/helper/debughelper.hxx @@ -36,7 +36,9 @@ #include "document.hxx" #ifdef WNT +#if !defined NOMINMAX #define NOMINMAX +#endif #include <prewin.h> #include <postwin.h> #undef NOMINMAX commit d9943588ace7d622167b9b57236b593ab220cdfa Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 16:41:27 2012 +0200 WaE: declaration of 'size' shadows a member of 'this' diff --git a/fpicker/source/win32/misc/AutoBuffer.cxx b/fpicker/source/win32/misc/AutoBuffer.cxx index 46a8bda..80e1932 100644 --- a/fpicker/source/win32/misc/AutoBuffer.cxx +++ b/fpicker/source/win32/misc/AutoBuffer.cxx @@ -51,8 +51,8 @@ using rtl::OUString; // //------------------------------------------------------------------------ -CAutoUnicodeBuffer::CAutoUnicodeBuffer( size_t size, sal_Bool bLazyCreation ) : - m_buffSize( size ), +CAutoUnicodeBuffer::CAutoUnicodeBuffer( size_t nSize, sal_Bool bLazyCreation ) : + m_buffSize( nSize ), m_pBuff( NULL ) { if ( !bLazyCreation ) diff --git a/fpicker/source/win32/misc/AutoBuffer.hxx b/fpicker/source/win32/misc/AutoBuffer.hxx index 6b287d2..0f1dd87 100644 --- a/fpicker/source/win32/misc/AutoBuffer.hxx +++ b/fpicker/source/win32/misc/AutoBuffer.hxx @@ -49,7 +49,7 @@ public: // if bLazyCreation is true the buffer will be created // when someone wants to fill the buffer - CAutoUnicodeBuffer( size_t size, sal_Bool bLazyCreation = sal_False ); + CAutoUnicodeBuffer( size_t nSize, sal_Bool bLazyCreation = sal_False ); ~CAutoUnicodeBuffer( ); // resizes the buffer commit 3129678c4bd82900a02e82c9a9786de4e26add9c Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 16:39:39 2012 +0200 WaE: passing NULL to non-pointer argument diff --git a/fpicker/source/win32/filepicker/helppopupwindow.cxx b/fpicker/source/win32/filepicker/helppopupwindow.cxx index 8702e14..4edd358 100644 --- a/fpicker/source/win32/filepicker/helppopupwindow.cxx +++ b/fpicker/source/win32/filepicker/helppopupwindow.cxx @@ -147,7 +147,7 @@ void SAL_CALL CHelpPopupWindow::show( sal_Int32 x, sal_Int32 y ) // and the dimensions and resize the window m_hwnd = CreateWindowEx( - NULL, + 0, HELPPOPUPWND_CLASS_NAME, NULL, WS_POPUP, commit 2240640bb5beea258158b6bf03aba1c80615638e Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 16:38:55 2012 +0200 WaE: deprecated conversion from string constant to 'LPTSTR' diff --git a/fpicker/source/win32/filepicker/helppopupwindow.cxx b/fpicker/source/win32/filepicker/helppopupwindow.cxx index 3297dfa..8702e14 100644 --- a/fpicker/source/win32/filepicker/helppopupwindow.cxx +++ b/fpicker/source/win32/filepicker/helppopupwindow.cxx @@ -49,7 +49,7 @@ using osl::Mutex; namespace /* private */ { - const LPTSTR CURRENT_INSTANCE = TEXT("CurrInst"); + const LPCTSTR CURRENT_INSTANCE = TEXT("CurrInst"); }; commit 7eb020a5b9d276e152354f93e6ce38a15e48ebd8 Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 16:38:06 2012 +0200 WaE: 'auto_ptr' is deprecated diff --git a/fpicker/source/win32/filepicker/filepickerstate.cxx b/fpicker/source/win32/filepicker/filepickerstate.cxx index a133ce7..3dde858 100644 --- a/fpicker/source/win32/filepicker/filepickerstate.cxx +++ b/fpicker/source/win32/filepicker/filepickerstate.cxx @@ -30,6 +30,8 @@ //------------------------------------------------------------------------ // includes //------------------------------------------------------------------------ +#include <boost/scoped_ptr.hpp> + #include "filepickerstate.hxx" #include <osl/diagnose.h> #include "controlaccess.hxx" @@ -44,7 +46,6 @@ #include <osl/file.hxx> #include "FileOpenDlg.hxx" -#include <memory> #include "../misc/WinImplHelper.hxx" //--------------------------------------------- // @@ -117,7 +118,7 @@ Any SAL_CALL CNonExecuteFilePickerState::getValue( sal_Int16 aControlId, sal_Int if (m_FirstControlCommand) { // pass the request along the command-chain - std::auto_ptr< CControlCommandResult > result( m_FirstControlCommand->handleRequest( &value_request ) ); + boost::scoped_ptr< CControlCommandResult > result( m_FirstControlCommand->handleRequest( &value_request ) ); OSL_ENSURE( result.get(), "invalid getValue request" ); @@ -181,7 +182,7 @@ OUString SAL_CALL CNonExecuteFilePickerState::getLabel( sal_Int16 aControlId ) CControlCommandRequest label_request( aControlId ); // pass the request along the command-chain - std::auto_ptr< CControlCommandResult > result( m_FirstControlCommand->handleRequest( &label_request ) ); + boost::scoped_ptr< CControlCommandResult > result( m_FirstControlCommand->handleRequest( &label_request ) ); OSL_ENSURE( result->hasResult( ), "invalid getValue request" ); commit 037bb830ea9f40cae2ad0d2d97a6bf2b939e081b Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 16:36:49 2012 +0200 WaE: deprecated conversion from string constant to 'LPTSTR' diff --git a/fpicker/source/win32/filepicker/FileOpenDlg.cxx b/fpicker/source/win32/filepicker/FileOpenDlg.cxx index 8316243..9d88ed4 100644 --- a/fpicker/source/win32/filepicker/FileOpenDlg.cxx +++ b/fpicker/source/win32/filepicker/FileOpenDlg.cxx @@ -61,7 +61,7 @@ namespace /* private */ const size_t MAX_FILETITLE_BUFF_SIZE = 32000; const size_t MAX_FILTER_BUFF_SIZE = 4096; - const LPTSTR CURRENT_INSTANCE = TEXT("CurrInst"); + const LPCTSTR CURRENT_INSTANCE = TEXT("CurrInst"); //------------------------------------------ // find an appropriate parent window commit 27d0dd881bf03836ffe4dd3dae637aed0c10c5c9 Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 16:36:15 2012 +0200 WaE: "_WIN32_WINNT" redefined diff --git a/fpicker/source/win32/filepicker/FileOpenDlg.cxx b/fpicker/source/win32/filepicker/FileOpenDlg.cxx index 97fa27e..8316243 100644 --- a/fpicker/source/win32/filepicker/FileOpenDlg.cxx +++ b/fpicker/source/win32/filepicker/FileOpenDlg.cxx @@ -26,6 +26,9 @@ * ************************************************************************/ +#if defined _WIN32_WINNT +# undef _WIN32_WINNT +#endif #define _WIN32_WINNT 0x0500 commit 91be92c24d31d88a824256684714689ba8531933 Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 16:34:31 2012 +0200 WaE: variable 'GDIError' set but not used diff --git a/fpicker/source/win32/filepicker/dibpreview.cxx b/fpicker/source/win32/filepicker/dibpreview.cxx index af9af47..bf0f2b4 100644 --- a/fpicker/source/win32/filepicker/dibpreview.cxx +++ b/fpicker/source/win32/filepicker/dibpreview.cxx @@ -270,8 +270,11 @@ void SAL_CALL CDIBPreview::onPaint(HWND hWnd, HDC hDC) int nX = abs(nWidth - cxDib) / 2; int nY = abs(nHeight - cyDib) / 2; +#if OSL_DEBUG_LEVEL > 0 int GDIError = GDI_ERROR; - GDIError = StretchDIBits( + GDIError = +#endif + StretchDIBits( hDC, nX, nY, cxDib, cyDib, 0, 0, cxDib, cyDib, pBits, pbmi, DIB_RGB_COLORS, SRCCOPY); commit 2f3fef29bd7717746ce4e2aabdd2bbb4669154e2 Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 16:32:06 2012 +0200 WaE: deprecated conversion from string constant to 'LPTSTR' diff --git a/fpicker/source/win32/filepicker/dibpreview.cxx b/fpicker/source/win32/filepicker/dibpreview.cxx index 939d1d6..af9af47 100644 --- a/fpicker/source/win32/filepicker/dibpreview.cxx +++ b/fpicker/source/win32/filepicker/dibpreview.cxx @@ -58,7 +58,7 @@ using rtl::OUString; namespace /* private */ { - const LPTSTR CURRENT_INSTANCE = TEXT("CurrInst"); + const LPCTSTR CURRENT_INSTANCE = TEXT("CurrInst"); }; //------------------------------------------------------------------------ commit b1b0ddb816c836ac7975aab97f474e9589e8947d Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 16:28:17 2012 +0200 WaE: deprecated conversion from string constant to 'LPSTR' diff --git a/fpicker/source/odma/ODMAFilePicker.cxx b/fpicker/source/odma/ODMAFilePicker.cxx index 2eb29a3..21063f0 100644 --- a/fpicker/source/odma/ODMAFilePicker.cxx +++ b/fpicker/source/odma/ODMAFilePicker.cxx @@ -115,7 +115,7 @@ sal_Int16 SAL_CALL ODMAFilePicker::execute( ) WORD count = 0; DWORD flags; - status = NODMRegisterApp( &handle, ODM_API_VERSION, "sodma", (DWORD) choose_parent_window( ), NULL ); + status = NODMRegisterApp( &handle, ODM_API_VERSION, const_cast<char*>("sodma"), (DWORD) choose_parent_window( ), NULL ); if (status == ODM_SUCCESS) { if (m_nDialogKind == OPEN) commit f133b545321a424530cce8f5b0440b90bc89c5cf Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 16:26:20 2012 +0200 WaE: "isnan" redefined diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx index 9a31e0a..260d564 100644 --- a/hwpfilter/source/hcode.cxx +++ b/hwpfilter/source/hcode.cxx @@ -39,7 +39,7 @@ #include <stdlib.h> #include <string.h> #include <math.h> -#ifdef WIN32 +#if defined WIN32 && defined MSC #include <float.h> #define isnan _isnan #endif commit 0128edc892252ea978791ddfc167851a0ef8461e Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 16:24:59 2012 +0200 WaE: ignoring #pragma warning diff --git a/extensions/source/scanner/scanwin.cxx b/extensions/source/scanner/scanwin.cxx index 9ff5ee1..bca8093 100644 --- a/extensions/source/scanner/scanwin.cxx +++ b/extensions/source/scanner/scanwin.cxx @@ -50,10 +50,14 @@ #include <vcl/salbtype.hxx> #include "scanner.hxx" +#if defined MSC #pragma warning (push,1) #pragma warning (disable:4668) +#endif #include "twain/twain.h" +#if defined MSC #pragma warning (pop) +#endif using namespace ::com::sun::star; commit 4573948159d6329f0552c89c060aa3484e562245 Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 16:21:36 2012 +0200 WaE: declaration of 'argc' shadows a previous local diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx index 0a6e580..92a7c38 100644 --- a/desktop/win32/source/officeloader/officeloader.cxx +++ b/desktop/win32/source/officeloader/officeloader.cxx @@ -274,8 +274,8 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int ) if ( INVALID_HANDLE_VALUE != hPipe ) { DWORD dwBytesWritten; - int argc = 0; - LPWSTR *argv = CommandLineToArgvW( GetCommandLine(), &argc ); + int argc2 = 0; + LPWSTR *argv2 = CommandLineToArgvW( GetCommandLine(), &argc2 ); fSuccess = WriteFile( hPipe, RTL_CONSTASCII_STRINGPARAM("InternalIPC::Arguments"), &dwBytesWritten, NULL ); if (fSuccess) { @@ -287,9 +287,9 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int ) &dwBytesWritten, NULL); } } - for ( int argn = 1; fSuccess && argn < argc; argn++ ) + for ( int argn = 1; fSuccess && argn < argc2; argn++ ) { - fSuccess = writeArgument(hPipe, ',', argv[argn]); + fSuccess = writeArgument(hPipe, ',', argv2[argn]); } if ( fSuccess ) @@ -359,17 +359,17 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int ) // mode as self-destruction of the soffice.bin process can lead to // certain side-effects (log-off can result in data-loss, ".lock" is not deleted. // See 138244 for more information. - int argc; - LPTSTR *argv = GetCommandArgs( &argc ); + int argc2; + LPTSTR *argv2 = GetCommandArgs( &argc2 ); - if ( argc > 1 ) + if ( argc2 > 1 ) { int n; - for ( n = 1; n < argc; n++ ) + for ( n = 1; n < argc2; n++ ) { - if ( 0 == _tcsnicmp( argv[n], _T("-headless"), 9 ) || - 0 == _tcsnicmp( argv[n], _T("--headless"), 9 ) ) + if ( 0 == _tcsnicmp( argv2[n], _T("-headless"), 9 ) || + 0 == _tcsnicmp( argv2[n], _T("--headless"), 9 ) ) { bHeadlessMode = TRUE; } commit cf40c8513a5432a1b6749bfe6d73250266c9be5c Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 16:19:54 2012 +0200 WaE: variable 'dwWaitResult' set but not used diff --git a/desktop/win32/source/guistdio/guistdio.inc b/desktop/win32/source/guistdio/guistdio.inc index 48b3c88..25586f0 100644 --- a/desktop/win32/source/guistdio/guistdio.inc +++ b/desktop/win32/source/guistdio/guistdio.inc @@ -399,7 +399,6 @@ int _tmain( int, _TCHAR ** ) DWORD dwWaitForUIThreadId; HANDLE hWaitForUIThread = CreateThread( NULL, 0, WaitForUIThread, (LPVOID)aProcessInfo.hProcess, 0, &dwWaitForUIThreadId ); - DWORD dwWaitResult; HANDLE hObjects[] = { hTargetProcess, @@ -409,13 +408,13 @@ int _tmain( int, _TCHAR ** ) }; #ifdef UNOPKG - dwWaitResult = WaitForMultipleObjects( SAL_N_ELEMENTS(hObjects), hObjects, TRUE, INFINITE ); + WaitForMultipleObjects( SAL_N_ELEMENTS(hObjects), hObjects, TRUE, INFINITE ); #else bool bDetach = false; int nOpenPipes = 2; do { - dwWaitResult = WaitForMultipleObjects( SAL_N_ELEMENTS(hObjects), hObjects, FALSE, INFINITE ); + DWORD dwWaitResult = WaitForMultipleObjects( SAL_N_ELEMENTS(hObjects), hObjects, FALSE, INFINITE ); switch ( dwWaitResult ) { commit cc138ca9637ce6325b52ad7473e4568422602564 Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 16:18:01 2012 +0200 WaE: unused variable 'hProcess' diff --git a/desktop/win32/source/guistdio/guistdio.inc b/desktop/win32/source/guistdio/guistdio.inc index 58b5bff..48b3c88 100644 --- a/desktop/win32/source/guistdio/guistdio.inc +++ b/desktop/win32/source/guistdio/guistdio.inc @@ -256,11 +256,13 @@ DWORD WINAPI InputThread( LPVOID pParam ) DWORD WINAPI WaitForUIThread( LPVOID pParam ) { +#ifndef UNOPKG HANDLE hProcess = (HANDLE)pParam; -#ifndef UNOPKG if ( !_tgetenv( TEXT("UNOPKG") ) ) WaitForInputIdle( hProcess, INFINITE ); +#else + (void) pParam; #endif return 0; commit df02932ed3fd6f15b2886e6e69ec04ee5b3ad72f Author: David Tardon <dtar...@redhat.com> Date: Mon Apr 16 16:15:41 2012 +0200 convert tabs to spaces diff --git a/desktop/win32/source/guistdio/guistdio.inc b/desktop/win32/source/guistdio/guistdio.inc index a62a0a6..58b5bff 100644 --- a/desktop/win32/source/guistdio/guistdio.inc +++ b/desktop/win32/source/guistdio/guistdio.inc @@ -1,7 +1,8 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,60 +50,60 @@ DWORD passOutputToConsole(HANDLE readPipe, HANDLE console) { - BYTE aBuffer[1024]; - DWORD dwRead = 0; - HANDLE hReadPipe = readPipe; - DWORD dwWritten; - - //Indicates that we read an odd number of bytes. That is, we only read half of the last - //wchar_t - bool bIncompleteWchar = false; - //fprintf, fwprintf will both send char data without the terminating zero. - //fwprintf converts the unicode string first. - //We expect here to receive unicode without the terminating zero. - //unopkg and the extension manager code MUST - //use dp_misc::writeConsole instead of using fprintf, etc. - - DWORD dwToRead = sizeof(aBuffer); - BYTE * pBuffer = aBuffer; - while ( ReadFile( hReadPipe, pBuffer, dwToRead, &dwRead, NULL ) ) - { - //If the previous ReadFile call read an odd number of bytes, then the last one was - //put at the front of the buffer. We increase the number of read bytes by one to reflect - //that one byte. - if (bIncompleteWchar) - dwRead++; - //We must make sure that only complete wchar_t|s are written. WriteConsolse takes - //the number of wchar_t|s as argument. ReadFile, however, reads bytes. - bIncompleteWchar = dwRead % 2 ? true : false; - if (bIncompleteWchar) - { - //To test this case, give aBuffer a small odd size, e.g. aBuffer[3] - //The last byte, which is the incomplete wchar_t (half of it), will not be written. - (void) WriteConsoleW( console, aBuffer, - (dwRead - 1) / 2, &dwWritten, NULL ); - - //Move the last byte to the front of the buffer, so that it is the start of the - //next string - aBuffer[0] = aBuffer[dwRead - 1]; - - //Make sure that ReadFile does not overwrite the first byte the next time - dwToRead = sizeof(aBuffer) - 1; - pBuffer = aBuffer + 1; - - } - else - { //We have read an even number of bytes. Therefore, we do not put the last incomplete - //wchar_t at the front of the buffer. We will use the complete buffer the next time - //when ReadFile is called. - dwToRead = sizeof(aBuffer); - pBuffer = aBuffer; - (void) WriteConsoleW( console, - aBuffer, dwRead / 2, &dwWritten, NULL ); - } - } - - return 0; + BYTE aBuffer[1024]; + DWORD dwRead = 0; + HANDLE hReadPipe = readPipe; + DWORD dwWritten; + + //Indicates that we read an odd number of bytes. That is, we only read half of the last + //wchar_t + bool bIncompleteWchar = false; + //fprintf, fwprintf will both send char data without the terminating zero. + //fwprintf converts the unicode string first. + //We expect here to receive unicode without the terminating zero. + //unopkg and the extension manager code MUST + //use dp_misc::writeConsole instead of using fprintf, etc. + + DWORD dwToRead = sizeof(aBuffer); + BYTE * pBuffer = aBuffer; + while ( ReadFile( hReadPipe, pBuffer, dwToRead, &dwRead, NULL ) ) + { + //If the previous ReadFile call read an odd number of bytes, then the last one was + //put at the front of the buffer. We increase the number of read bytes by one to reflect + //that one byte. + if (bIncompleteWchar) + dwRead++; + //We must make sure that only complete wchar_t|s are written. WriteConsolse takes + //the number of wchar_t|s as argument. ReadFile, however, reads bytes. + bIncompleteWchar = dwRead % 2 ? true : false; + if (bIncompleteWchar) + { + //To test this case, give aBuffer a small odd size, e.g. aBuffer[3] + //The last byte, which is the incomplete wchar_t (half of it), will not be written. + (void) WriteConsoleW( console, aBuffer, + (dwRead - 1) / 2, &dwWritten, NULL ); + + //Move the last byte to the front of the buffer, so that it is the start of the + //next string + aBuffer[0] = aBuffer[dwRead - 1]; + + //Make sure that ReadFile does not overwrite the first byte the next time + dwToRead = sizeof(aBuffer) - 1; + pBuffer = aBuffer + 1; + + } + else + { //We have read an even number of bytes. Therefore, we do not put the last incomplete + //wchar_t at the front of the buffer. We will use the complete buffer the next time + //when ReadFile is called. + dwToRead = sizeof(aBuffer); + pBuffer = aBuffer; + (void) WriteConsoleW( console, + aBuffer, dwRead / 2, &dwWritten, NULL ); + } + } + + return 0; } #endif @@ -110,23 +111,23 @@ DWORD passOutputToConsole(HANDLE readPipe, HANDLE console) #ifdef UNOPKG DWORD WINAPI OutputThread( LPVOID pParam ) { - return passOutputToConsole((HANDLE)pParam, GetStdHandle( STD_OUTPUT_HANDLE )); + return passOutputToConsole((HANDLE)pParam, GetStdHandle( STD_OUTPUT_HANDLE )); } #else DWORD WINAPI OutputThread( LPVOID pParam ) { - BYTE aBuffer[256]; - DWORD dwRead = 0; - HANDLE hReadPipe = (HANDLE)pParam; - while ( ReadFile( hReadPipe, &aBuffer, sizeof(aBuffer), &dwRead, NULL ) ) - { - DWORD dwWritten; + BYTE aBuffer[256]; + DWORD dwRead = 0; + HANDLE hReadPipe = (HANDLE)pParam; + while ( ReadFile( hReadPipe, &aBuffer, sizeof(aBuffer), &dwRead, NULL ) ) + { + DWORD dwWritten; - (void) WriteFile( GetStdHandle( STD_OUTPUT_HANDLE ), aBuffer, dwRead, &dwWritten, NULL ); - } + (void) WriteFile( GetStdHandle( STD_OUTPUT_HANDLE ), aBuffer, dwRead, &dwWritten, NULL ); + } - return 0; + return 0; } #endif //--------------------------------------------------------------------------- @@ -136,24 +137,24 @@ DWORD WINAPI OutputThread( LPVOID pParam ) #ifdef UNOPKG DWORD WINAPI ErrorThread( LPVOID pParam ) { - return passOutputToConsole((HANDLE)pParam, GetStdHandle( STD_ERROR_HANDLE )); + return passOutputToConsole((HANDLE)pParam, GetStdHandle( STD_ERROR_HANDLE )); } #else DWORD WINAPI ErrorThread( LPVOID pParam ) { - BYTE aBuffer[256]; - DWORD dwRead = 0; - HANDLE hReadPipe = (HANDLE)pParam; + BYTE aBuffer[256]; + DWORD dwRead = 0; + HANDLE hReadPipe = (HANDLE)pParam; - while ( ReadFile( hReadPipe, &aBuffer, sizeof(aBuffer), &dwRead, NULL ) ) - { - DWORD dwWritten; + while ( ReadFile( hReadPipe, &aBuffer, sizeof(aBuffer), &dwRead, NULL ) ) + { + DWORD dwWritten; - (void) WriteFile( GetStdHandle( STD_ERROR_HANDLE ), aBuffer, dwRead, &dwWritten, NULL ); - } + (void) WriteFile( GetStdHandle( STD_ERROR_HANDLE ), aBuffer, dwRead, &dwWritten, NULL ); + } - return 0; + return 0; } #endif //--------------------------------------------------------------------------- @@ -163,8 +164,8 @@ DWORD WINAPI ErrorThread( LPVOID pParam ) DWORD WINAPI InputThread( LPVOID pParam ) { - DWORD dwRead = 0; - HANDLE hWritePipe = (HANDLE)pParam; + DWORD dwRead = 0; + HANDLE hWritePipe = (HANDLE)pParam; //We need to read in the complete input until we encounter a new line before //converting to Unicode. This is necessary because the input string can use @@ -179,16 +180,16 @@ DWORD WINAPI InputThread( LPVOID pParam ) char * mbBuff = new char[cNewLine]; WideCharToMultiByte( GetConsoleCP(), 0, L"\r\n", 2, mbBuff, cNewLine, NULL, NULL); - + const size_t dwBufferSize = 256; char* readBuf = (char*) malloc(dwBufferSize); int readAll = 0; size_t curBufSize = dwBufferSize; - + while ( ReadFile( GetStdHandle( STD_INPUT_HANDLE ), readBuf + readAll, curBufSize - readAll, &dwRead, NULL ) ) - { + { readAll += dwRead; int lastBufSize = curBufSize; //Grow the buffer if necessary @@ -197,8 +198,8 @@ DWORD WINAPI InputThread( LPVOID pParam ) curBufSize *= 2; readBuf = (char *) realloc(readBuf, curBufSize); } - - //If the buffer was filled completely then + + //If the buffer was filled completely then //there could be more input coming. But if we read from the console //and the console input fits exactly in the buffer, then the next //ReadFile would block until the users presses return, etc. @@ -222,30 +223,30 @@ DWORD WINAPI InputThread( LPVOID pParam ) MultiByteToWideChar( GetConsoleCP(), MB_PRECOMPOSED, readBuf, readAll, wideBuf, sizeWBuf); - DWORD dwWritten; + DWORD dwWritten; (void)WriteFile( hWritePipe, wideBuf, sizeWBuf * 2, &dwWritten, NULL ); delete[] wideBuf; readAll = 0; - } + } delete[] mbBuff; free(readBuf); - return 0; + return 0; } #else DWORD WINAPI InputThread( LPVOID pParam ) { - BYTE aBuffer[256]; - DWORD dwRead = 0; - HANDLE hWritePipe = (HANDLE)pParam; + BYTE aBuffer[256]; + DWORD dwRead = 0; + HANDLE hWritePipe = (HANDLE)pParam; - while ( ReadFile( GetStdHandle( STD_INPUT_HANDLE ), &aBuffer, sizeof(aBuffer), &dwRead, NULL ) ) - { - DWORD dwWritten; - (void) WriteFile( hWritePipe, aBuffer, dwRead, &dwWritten, NULL ); - } + while ( ReadFile( GetStdHandle( STD_INPUT_HANDLE ), &aBuffer, sizeof(aBuffer), &dwRead, NULL ) ) + { + DWORD dwWritten; + (void) WriteFile( hWritePipe, aBuffer, dwRead, &dwWritten, NULL ); + } - return 0; + return 0; } #endif @@ -255,14 +256,14 @@ DWORD WINAPI InputThread( LPVOID pParam ) DWORD WINAPI WaitForUIThread( LPVOID pParam ) { - HANDLE hProcess = (HANDLE)pParam; + HANDLE hProcess = (HANDLE)pParam; #ifndef UNOPKG - if ( !_tgetenv( TEXT("UNOPKG") ) ) - WaitForInputIdle( hProcess, INFINITE ); + if ( !_tgetenv( TEXT("UNOPKG") ) ) + WaitForInputIdle( hProcess, INFINITE ); #endif - return 0; + return 0; } @@ -270,14 +271,14 @@ DWORD WINAPI WaitForUIThread( LPVOID pParam ) // Ctrl-Break handler that terminates the child process if Ctrl-C was pressed //--------------------------------------------------------------------------- -HANDLE hTargetProcess = INVALID_HANDLE_VALUE; +HANDLE hTargetProcess = INVALID_HANDLE_VALUE; BOOL WINAPI CtrlBreakHandler( DWORD // control signal type ) { - TerminateProcess( hTargetProcess, 255 ); - return TRUE; + TerminateProcess( hTargetProcess, 255 ); + return TRUE; } @@ -291,159 +292,161 @@ int main( int, char ** ) int _tmain( int, _TCHAR ** ) #endif { - TCHAR szTargetFileName[MAX_PATH] = TEXT(""); - STARTUPINFO aStartupInfo; - PROCESS_INFORMATION aProcessInfo; + TCHAR szTargetFileName[MAX_PATH] = TEXT(""); + STARTUPINFO aStartupInfo; + PROCESS_INFORMATION aProcessInfo; + + ZeroMemory( &aStartupInfo, sizeof(aStartupInfo) ); + aStartupInfo.cb = sizeof(aStartupInfo); + aStartupInfo.dwFlags = STARTF_USESTDHANDLES; - ZeroMemory( &aStartupInfo, sizeof(aStartupInfo) ); - aStartupInfo.cb = sizeof(aStartupInfo); - aStartupInfo.dwFlags = STARTF_USESTDHANDLES; + // Create an output pipe where the write end is inheritable - // Create an output pipe where the write end is inheritable + HANDLE hOutputRead, hOutputWrite; - HANDLE hOutputRead, hOutputWrite; - - if ( CreatePipe( &hOutputRead, &hOutputWrite, NULL, 0 ) ) - { - HANDLE hTemp; + if ( CreatePipe( &hOutputRead, &hOutputWrite, NULL, 0 ) ) + { + HANDLE hTemp; - DuplicateHandle( GetCurrentProcess(), hOutputWrite, GetCurrentProcess(), &hTemp, 0, TRUE, DUPLICATE_SAME_ACCESS ); - CloseHandle( hOutputWrite ); - hOutputWrite = hTemp; + DuplicateHandle( GetCurrentProcess(), hOutputWrite, GetCurrentProcess(), &hTemp, 0, TRUE, DUPLICATE_SAME_ACCESS ); + CloseHandle( hOutputWrite ); + hOutputWrite = hTemp; - aStartupInfo.hStdOutput = hOutputWrite; - } + aStartupInfo.hStdOutput = hOutputWrite; + } - // Create an error pipe where the write end is inheritable + // Create an error pipe where the write end is inheritable - HANDLE hErrorRead, hErrorWrite; - - if ( CreatePipe( &hErrorRead, &hErrorWrite, NULL, 0 ) ) - { - HANDLE hTemp; + HANDLE hErrorRead, hErrorWrite; - DuplicateHandle( GetCurrentProcess(), hErrorWrite, GetCurrentProcess(), &hTemp, 0, TRUE, DUPLICATE_SAME_ACCESS ); - CloseHandle( hErrorWrite ); - hErrorWrite = hTemp; + if ( CreatePipe( &hErrorRead, &hErrorWrite, NULL, 0 ) ) + { + HANDLE hTemp; - aStartupInfo.hStdError = hErrorWrite; - } + DuplicateHandle( GetCurrentProcess(), hErrorWrite, GetCurrentProcess(), &hTemp, 0, TRUE, DUPLICATE_SAME_ACCESS ); + CloseHandle( hErrorWrite ); + hErrorWrite = hTemp; - // Create an input pipe where the read end is inheritable + aStartupInfo.hStdError = hErrorWrite; + } - HANDLE hInputRead, hInputWrite; + // Create an input pipe where the read end is inheritable - if ( CreatePipe( &hInputRead, &hInputWrite, NULL, 0 ) ) - { - HANDLE hTemp; + HANDLE hInputRead, hInputWrite; - DuplicateHandle( GetCurrentProcess(), hInputRead, GetCurrentProcess(), &hTemp, 0, TRUE, DUPLICATE_SAME_ACCESS ); - CloseHandle( hInputRead ); - hInputRead = hTemp; + if ( CreatePipe( &hInputRead, &hInputWrite, NULL, 0 ) ) + { + HANDLE hTemp; - aStartupInfo.hStdInput = hInputRead; - } + DuplicateHandle( GetCurrentProcess(), hInputRead, GetCurrentProcess(), &hTemp, 0, TRUE, DUPLICATE_SAME_ACCESS ); + CloseHandle( hInputRead ); + hInputRead = hTemp; - // Get image path with same name but with .exe extension + aStartupInfo.hStdInput = hInputRead; + } - TCHAR szModuleFileName[MAX_PATH]; + // Get image path with same name but with .exe extension - GetModuleFileName( NULL, szModuleFileName, MAX_PATH ); - _TCHAR *lpLastDot = _tcsrchr( szModuleFileName, '.' ); - if ( lpLastDot && 0 == _tcsicmp( lpLastDot, _T(".COM") ) ) - { - size_t len = lpLastDot - szModuleFileName; - _tcsncpy( szTargetFileName, szModuleFileName, len ); - _tcsncpy( szTargetFileName + len, _T(".EXE"), SAL_N_ELEMENTS(szTargetFileName) - len ); - } + TCHAR szModuleFileName[MAX_PATH]; - // Create process with same command line, environment and stdio handles which - // are directed to the created pipes + GetModuleFileName( NULL, szModuleFileName, MAX_PATH ); + _TCHAR *lpLastDot = _tcsrchr( szModuleFileName, '.' ); + if ( lpLastDot && 0 == _tcsicmp( lpLastDot, _T(".COM") ) ) + { + size_t len = lpLastDot - szModuleFileName; + _tcsncpy( szTargetFileName, szModuleFileName, len ); + _tcsncpy( szTargetFileName + len, _T(".EXE"), SAL_N_ELEMENTS(szTargetFileName) - len ); + } - BOOL fSuccess = CreateProcess( - szTargetFileName, - GetCommandLine(), - NULL, - NULL, - TRUE, - 0, - NULL, - NULL, - &aStartupInfo, - &aProcessInfo ); + // Create process with same command line, environment and stdio handles which + // are directed to the created pipes - if ( fSuccess ) - { - // These pipe ends are inherited by the child process and no longer used - CloseHandle( hOutputWrite ); - CloseHandle( hErrorWrite ); - CloseHandle( hInputRead ); + BOOL fSuccess = CreateProcess( + szTargetFileName, + GetCommandLine(), + NULL, + NULL, + TRUE, + 0, + NULL, + NULL, + &aStartupInfo, + &aProcessInfo ); - // Set the Ctrl-Break handler - hTargetProcess = aProcessInfo.hProcess; - SetConsoleCtrlHandler( CtrlBreakHandler, TRUE ); + if ( fSuccess ) + { + // These pipe ends are inherited by the child process and no longer used + CloseHandle( hOutputWrite ); + CloseHandle( hErrorWrite ); + CloseHandle( hInputRead ); - // Create threads that redirect remote pipe io to current process's console stdio + // Set the Ctrl-Break handler + hTargetProcess = aProcessInfo.hProcess; + SetConsoleCtrlHandler( CtrlBreakHandler, TRUE ); - DWORD dwOutputThreadId, dwErrorThreadId, dwInputThreadId; + // Create threads that redirect remote pipe io to current process's console stdio - HANDLE hOutputThread = CreateThread( NULL, 0, OutputThread, (LPVOID)hOutputRead, 0, &dwOutputThreadId ); - HANDLE hErrorThread = CreateThread( NULL, 0, OutputThread, (LPVOID)hErrorRead, 0, &dwErrorThreadId ); - HANDLE hInputThread = CreateThread( NULL, 0, InputThread, (LPVOID)hInputWrite, 0, &dwInputThreadId ); + DWORD dwOutputThreadId, dwErrorThreadId, dwInputThreadId; - // Create thread that wait until child process entered input idle + HANDLE hOutputThread = CreateThread( NULL, 0, OutputThread, (LPVOID)hOutputRead, 0, &dwOutputThreadId ); + HANDLE hErrorThread = CreateThread( NULL, 0, OutputThread, (LPVOID)hErrorRead, 0, &dwErrorThreadId ); + HANDLE hInputThread = CreateThread( NULL, 0, InputThread, (LPVOID)hInputWrite, 0, &dwInputThreadId ); - DWORD dwWaitForUIThreadId; - HANDLE hWaitForUIThread = CreateThread( NULL, 0, WaitForUIThread, (LPVOID)aProcessInfo.hProcess, 0, &dwWaitForUIThreadId ); + // Create thread that wait until child process entered input idle - DWORD dwWaitResult; - HANDLE hObjects[] = - { - hTargetProcess, - hWaitForUIThread, - hOutputThread, - hErrorThread - }; + DWORD dwWaitForUIThreadId; + HANDLE hWaitForUIThread = CreateThread( NULL, 0, WaitForUIThread, (LPVOID)aProcessInfo.hProcess, 0, &dwWaitForUIThreadId ); - #ifdef UNOPKG + DWORD dwWaitResult; + HANDLE hObjects[] = + { + hTargetProcess, + hWaitForUIThread, + hOutputThread, + hErrorThread + }; + + #ifdef UNOPKG dwWaitResult = WaitForMultipleObjects( SAL_N_ELEMENTS(hObjects), hObjects, TRUE, INFINITE ); - #else - bool bDetach = false; - int nOpenPipes = 2; - do - { - dwWaitResult = WaitForMultipleObjects( SAL_N_ELEMENTS(hObjects), hObjects, FALSE, INFINITE ); - - switch ( dwWaitResult ) - { - case WAIT_OBJECT_0: // The child process has terminated - case WAIT_OBJECT_0 + 1: // The child process entered input idle - bDetach = true; - break; - case WAIT_OBJECT_0 + 2: // The remote end of stdout pipe was closed - case WAIT_OBJECT_0 + 3: // The remote end of stderr pipe was closed - bDetach = --nOpenPipes <= 0; - break; - default: // Something went wrong - bDetach = true; - break; - } - } while( !bDetach ); - + #else + bool bDetach = false; + int nOpenPipes = 2; + do + { + dwWaitResult = WaitForMultipleObjects( SAL_N_ELEMENTS(hObjects), hObjects, FALSE, INFINITE ); + + switch ( dwWaitResult ) + { + case WAIT_OBJECT_0: // The child process has terminated + case WAIT_OBJECT_0 + 1: // The child process entered input idle + bDetach = true; + break; + case WAIT_OBJECT_0 + 2: // The remote end of stdout pipe was closed + case WAIT_OBJECT_0 + 3: // The remote end of stderr pipe was closed + bDetach = --nOpenPipes <= 0; + break; + default: // Something went wrong + bDetach = true; + break; + } + } while( !bDetach ); + #endif - CloseHandle( hOutputThread ); - CloseHandle( hErrorThread ); - CloseHandle( hInputThread ); - CloseHandle( hWaitForUIThread ); + CloseHandle( hOutputThread ); + CloseHandle( hErrorThread ); + CloseHandle( hInputThread ); + CloseHandle( hWaitForUIThread ); - DWORD dwExitCode = 0; - GetExitCodeProcess( aProcessInfo.hProcess, &dwExitCode ); - CloseHandle( aProcessInfo.hProcess ); - CloseHandle( aProcessInfo.hThread ); + DWORD dwExitCode = 0; + GetExitCodeProcess( aProcessInfo.hProcess, &dwExitCode ); + CloseHandle( aProcessInfo.hProcess ); + CloseHandle( aProcessInfo.hThread ); - return dwExitCode; - } + return dwExitCode; + } - return -1; + return -1; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit f039cd3e484cda1b4d2fa6d6f3c3efb97d26d4da Author: David Tardon <dtar...@redhat.com> Date: Sun Apr 15 15:52:16 2012 +0200 WaE: unused parameter diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 7b03cdf..b44d789 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -748,6 +748,9 @@ namespace xNativeTempFile->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveFile")), uno::makeAny(sal_True)); } +#else + (void) xFactory; + (void) xObjectStream; #endif return sUrl; } commit a6fd4d1d8b57ee43b3b262638ecb2b27132c6d33 Author: David Tardon <dtar...@redhat.com> Date: Sun Apr 15 15:49:00 2012 +0200 WaE: initialization order diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx index 8f30291..623811c 100644 --- a/embeddedobj/source/msole/olecomponent.cxx +++ b/embeddedobj/source/msole/olecomponent.cxx @@ -435,12 +435,12 @@ OleComponent::OleComponent( const uno::Reference< lang::XMultiServiceFactory >& , m_bDisposed( sal_False ) , m_bModified( sal_False ) , m_pNativeImpl( new OleComponentNative_Impl() ) -, m_xFactory( xFactory ) +, m_pUnoOleObject( pUnoOleObject ) , m_pOleWrapClientSite( NULL ) , m_pImplAdviseSink( NULL ) -, m_pUnoOleObject( pUnoOleObject ) , m_nOLEMiscFlags( 0 ) , m_nAdvConn( 0 ) +, m_xFactory( xFactory ) , m_bOleInitialized( sal_False ) , m_bWorkaroundActive( sal_False ) { commit 7e6e16ba6de2d3ef2b130d1ad5ffeabfdb37918e Author: David Tardon <dtar...@redhat.com> Date: Sun Apr 15 15:47:23 2012 +0200 WaE: declaration of 'nInd' shadows a previous local diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx index 6840fe6..efb51d3 100644 --- a/embeddedobj/source/msole/olepersist.cxx +++ b/embeddedobj/source/msole/olepersist.cxx @@ -1389,8 +1389,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( sal_Bool bElExists = xNameAccess->hasByName( sEntName ); m_bReadOnly = sal_False; - sal_Int32 nInd = 0; - for ( nInd = 0; nInd < lArguments.getLength(); nInd++ ) + for ( sal_Int32 nInd = 0; nInd < lArguments.getLength(); nInd++ ) if ( lArguments[nInd].Name == "ReadOnly" ) lArguments[nInd].Value >>= m_bReadOnly; @@ -1400,7 +1399,7 @@ void SAL_CALL OleEmbeddedObject::setPersistentEntry( SwitchOwnPersistence( xStorage, sEntName ); - for ( nInd = 0; nInd < lObjArgs.getLength(); nInd++ ) + for ( sal_Int32 nInd = 0; nInd < lObjArgs.getLength(); nInd++ ) if ( lObjArgs[nInd].Name == "StoreVisualReplacement" ) lObjArgs[nInd].Value >>= m_bStoreVisRepl; commit bd51998c2f0cd3d73aaa218b1e7db0cdcee97df3 Author: David Tardon <dtar...@redhat.com> Date: Sun Apr 15 15:46:46 2012 +0200 WaE: declaration of 'hr' shadows a previous local diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx index f7d04e8..8f30291 100644 --- a/embeddedobj/source/msole/olecomponent.cxx +++ b/embeddedobj/source/msole/olecomponent.cxx @@ -631,8 +631,8 @@ void OleComponent::RetrieveObjectDataFlavors_Impl() sal_uInt32 nSupportedAspects = 0; do { - HRESULT hr = pFormatEnum->Next( MAX_ENUM_ELE, pElem, &nNum ); - if( hr == S_OK || hr == S_FALSE ) + HRESULT hr2 = pFormatEnum->Next( MAX_ENUM_ELE, pElem, &nNum ); + if( hr2 == S_OK || hr2 == S_FALSE ) { for( sal_uInt32 nInd = 0; nInd < FORMATS_NUM; nInd++ ) { @@ -684,21 +684,21 @@ sal_Bool OleComponent::InitializeObject_Impl() if ( SUCCEEDED( m_pNativeImpl->m_pObj->QueryInterface( IID_IOleCache, (void**)&pIOleCache ) ) && pIOleCache ) { IEnumSTATDATA* pEnumSD = NULL; - HRESULT hr = pIOleCache->EnumCache( &pEnumSD ); + HRESULT hr2 = pIOleCache->EnumCache( &pEnumSD ); - if ( SUCCEEDED( hr ) && pEnumSD ) + if ( SUCCEEDED( hr2 ) && pEnumSD ) { pEnumSD->Reset(); STATDATA aSD; DWORD nNum; while( SUCCEEDED( pEnumSD->Next( 1, &aSD, &nNum ) ) && nNum == 1 ) - hr = pIOleCache->Uncache( aSD.dwConnection ); + hr2 = pIOleCache->Uncache( aSD.dwConnection ); } // No IDataObject implementation, caching must be used instead DWORD nConn; FORMATETC aFormat = { 0, 0, DVASPECT_CONTENT, -1, TYMED_MFPICT }; - hr = pIOleCache->Cache( &aFormat, ADVFCACHE_ONSAVE, &nConn ); + hr2 = pIOleCache->Cache( &aFormat, ADVFCACHE_ONSAVE, &nConn ); pIOleCache->Release(); pIOleCache = NULL; commit bc9229aa0cbd0c9d47c4f4c54790f3b9de76f2b8 Author: David Tardon <dtar...@redhat.com> Date: Sun Apr 15 15:41:58 2012 +0200 WaE: deprecated conversion from string constant to 'LPSTR' diff --git a/ucb/source/ucp/odma/odma_provider.cxx b/ucb/source/ucp/odma/odma_provider.cxx index da09d11..f65f619 100644 --- a/ucb/source/ucp/odma/odma_provider.cxx +++ b/ucb/source/ucp/odma/odma_provider.cxx @@ -97,7 +97,7 @@ ODMHANDLE ContentProvider::getHandle() { if(!m_aOdmHandle) { - ODMSTATUS odm = NODMRegisterApp(&m_aOdmHandle,ODM_API_VERSION,ODMA_ODMA_REGNAME,(DWORD) choose_parent_window( ),NULL); + ODMSTATUS odm = NODMRegisterApp(&m_aOdmHandle,ODM_API_VERSION,const_cast<char*>(ODMA_ODMA_REGNAME),(DWORD) choose_parent_window( ),NULL); switch(odm) { case ODM_SUCCESS: commit 46880d2860a0943baee8524bf70c832a802c1612 Author: David Tardon <dtar...@redhat.com> Date: Sun Apr 15 15:25:11 2012 +0200 WaE: "CDECL" redefined diff --git a/svtools/inc/svtools/syntaxhighlight.hxx b/svtools/inc/svtools/syntaxhighlight.hxx index f4bcca1..2df2580 100644 --- a/svtools/inc/svtools/syntaxhighlight.hxx +++ b/svtools/inc/svtools/syntaxhighlight.hxx @@ -41,6 +41,10 @@ #include <svtools/svtdllapi.h> +#if defined CDECL +#undef CDECL +#endif + // for the bsearch #ifdef WNT #define CDECL _cdecl commit f62686942b28c559ac044d452df03dd28179dddf Author: David Tardon <dtar...@redhat.com> Date: Sat Mar 24 18:27:43 2012 +0100 WaE: "STRICT" redefined diff --git a/solenv/inc/prewin.h b/solenv/inc/prewin.h index 0eedfe1..c7041b0 100644 --- a/solenv/inc/prewin.h +++ b/solenv/inc/prewin.h @@ -41,7 +41,9 @@ extern "C" { #endif +#if !defined STRICT #define STRICT +#endif #ifdef _MSC_VER #pragma warning(push, 1) #endif _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits