--- a/main/RepositoryFixes.mk +++ a/main/RepositoryFixes.mk @@ -94,7 +94,6 @@ gb_Library_FILENAMES += $(foreach lib,$(gb_Library_NOILIBFILENAMES),$(lib):$(lib gb_Library_ILIBFILENAMES:=\ gdiplus \ - unicows \ uuid \ gb_Library_DLLFILENAMES := $(filter-out $(foreach lib,$(gb_Library_ILIBFILENAMES),$(lib):%),$(gb_Library_DLLFILENAMES)) @@ -151,7 +150,6 @@ gb_Library_NOILIBFILENAMES:=\ oleaut32 \ shell32 \ sot \ - unicows \ user32 \ uuid \ uwinapi \ --- a/main/configure.in +++ a/main/configure.in @@ -5653,22 +5653,6 @@ fi AC_SUBST(ZIP_HOME) dnl =================================================================== -dnl Windows builds need unicows.dll in external/unicows/ -dnl =================================================================== -if test "$_os" = "WINNT"; then - AC_MSG_CHECKING([for unicows.dll]) - if test -x ./external/unicows/unicows.dll ; then - AC_MSG_RESULT([found and executable]) - else - AC_MSG_ERROR([The Microsoft Layer for Unicode (unicows.dll) is missing in external/unicows/. -Get it from the Microsoft site and put it into external/unicows. -(Note: Microsoft seems to enjoy changing the exact location of this file. You -may have to search Microsoft's website.) Last time it was seen at: -.]) - fi -fi - -dnl =================================================================== dnl Windows builds need dbghelp.dll in external/dbghelp/ dnl =================================================================== if test "$_os" = "WINNT"; then --- a/main/cpputools/source/unoexe/makefile.mk +++ a/main/cpputools/source/unoexe/makefile.mk @@ -83,9 +83,6 @@ APP1STDLIBS= \ $(CPPULIB) \ $(CPPUHELPERLIB)\ $(LIBXML2LIB) -.IF "$(OS)" == "WNT" -APP1STDLIBS += $(UNICOWSLIB) -.ENDIF .INCLUDE : target.mk --- a/main/external/prj/d.lst +++ a/main/external/prj/d.lst @@ -46,8 +46,6 @@ mkdir: %_DEST%\inc%_EXT%\external\mingw\include\sys ..\msvcp90\Microsoft.VC90.DebugCRT.manifest %_DEST%\bin%_EXT%\Microsoft.VC90.DebugCRT.manifest ..\msm90\*.msm %_DEST%\bin%_EXT% -..\unicows\unicows.dll %_DEST%\bin%_EXT%\unicows.dll - ..\unowinreg\unowinreg.dll %_DEST%\bin%_EXT%\unowinreg.dll ..\%__SRC%\bin\mingwm10.dll %_DEST%\bin%_EXT%\mingwm10.dll --- a/main/external/unicows/README_unicows.dll +++ a/main/external/unicows/README_unicows.dll @@ -1, +0,0 @@ -Put the unicows.dll in this directory for Windows builds. --- a/main/postprocess/rebase/no_rebase.txt +++ a/main/postprocess/rebase/no_rebase.txt @@ -8,7 +8,6 @@ policy.1.0.cli_oootypes.dll policy.1.0.cli_ure.dll policy.1.0.cli_cppuhelper.dll policy.1.0.cli_basetypes.dll -unicows.dll gdiplus.dll mingwm10.dll msvcm80d.dll --- a/main/postprocess/signing/no_signing.txt +++ a/main/postprocess/signing/no_signing.txt @@ -8,6 +8,5 @@ policy.1.0.cli_oootypes.dll policy.1.0.cli_ure.dll policy.1.0.cli_cppuhelper.dll policy.1.0.cli_basetypes.dll -unicows.dll gdiplus.dll mingwm10.dll --- a/main/sal/osl/w32/process.cxx +++ a/main/sal/osl/w32/process.cxx @@ -392,13 +392,6 @@ void SAL_CALL osl_setCommandArgs (int argc, char ** argv) /*************************************************************************** * Environment ***************************************************************************/ -/* - #109941# because of a bug in the M$ unicows library we have to - allocate a buffer large enough to hold the requested environment - variable instead of testing for the required size. This wastes - some stack space, maybe we should revoke this work around if - unicows library is fixed. -*/ #define ENV_BUFFER_SIZE (32*1024-1) oslProcessError SAL_CALL osl_getEnvironment(rtl_uString *ustrVar, rtl_uString **ustrValue) --- a/main/sal/systools/win32/onlineupdate/makefile.mk +++ a/main/sal/systools/win32/onlineupdate/makefile.mk @@ -70,7 +70,6 @@ SHL1OBJS=$(SLOFILES) #STDSHL= SHL1STDLIBS=\ - $(UNICOWSLIB)\ $(KERNEL32LIB)\ $(LIBCMT)\ $(WININETLIB) --- a/main/sal/systools/win32/uwinapi/DllGetVersion.cpp +++ a/main/sal/systools/win32/uwinapi/DllGetVersion.cpp @@ -1,73 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#define WIN32_LEAN_AND_MEAN -#ifdef _MSC_VER -#pragma warning(push,1) -#endif -#include -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif -#include - -extern HMODULE UWINAPI_BaseAddress; - -// This function should be exported by every DLL that wants to provide it's version number. -// This code automaticly generates the information from the version resource - -extern "C" HRESULT CALLBACK DllGetVersion( DLLVERSIONINFO *pdvi ) -{ - TCHAR szModulePath[MAX_PATH]; - BOOL fSuccess = FALSE; - - if ( UWINAPI_BaseAddress && GetModuleFileName( UWINAPI_BaseAddress, szModulePath, MAX_PATH ) ) - { - DWORD dwHandle = 0; - DWORD dwSize = GetFileVersionInfoSize( szModulePath, &dwHandle ); - LPVOID lpData = _alloca( dwSize ); - - if ( GetFileVersionInfo( szModulePath, dwHandle, dwSize, lpData ) ) - { - VS_FIXEDFILEINFO *lpBuffer = NULL; - UINT uLen = 0; - - if ( VerQueryValue( lpData, TEXT("\\"), (LPVOID *)&lpBuffer, &uLen ) ) - { - pdvi->dwMajorVersion = HIWORD( lpBuffer->dwFileVersionMS ); - pdvi->dwMinorVersion = LOWORD( lpBuffer->dwFileVersionMS ); - pdvi->dwBuildNumber = HIWORD( lpBuffer->dwFileVersionLS ); - pdvi->dwPlatformID = (DWORD) ((lpBuffer->dwFileOS & VOS_NT) ? DLLVER_PLATFORM_NT : DLLVER_PLATFORM_WINDOWS); - - fSuccess = TRUE; - } - } - } - - return fSuccess ? HRESULT_FROM_WIN32( GetLastError() ) : HRESULT_FROM_WIN32( NO_ERROR ); -} --- a/main/sal/systools/win32/uwinapi/DllMain.cpp +++ a/main/sal/systools/win32/uwinapi/DllMain.cpp @@ -1,235 +0,0 @@ -/************************************************************************* - * - * 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 - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#define WIN32_LEAN_AND_MEAN -#ifdef _MSC_VER -#pragma warning(push,1) // disable warnings within system headers -#endif -#include -#ifdef _MSC_VER -#pragma warning(pop) -#endif -#include -#define _MBCS -#include - - -HMODULE UWINAPI_BaseAddress = NULL; -const CHAR szUnicowsModuleName[] = "UNICOWS.DLL"; - -static HMODULE WINAPI _LoadUnicowsLibrary(VOID) -{ - CHAR szModulePath[MAX_PATH]; - HMODULE hModuleUnicows = NULL; - - // First search in the same directory as UWINAPI.DLL was loaded from. This is because - // UWINAPI.DLL not always resides in the same directory as the actual application. - - if ( UWINAPI_BaseAddress && GetModuleFileNameA( UWINAPI_BaseAddress, szModulePath, MAX_PATH ) ) - { - char *lpLastBkSlash = _tcsrchr( szModulePath, '\\' ); - - if ( lpLastBkSlash ) - { - size_t nParentDirSize = (size_t) (_tcsinc( lpLastBkSlash ) - szModulePath); - LPSTR lpUnicowsModulePath = (LPTSTR)_alloca( nParentDirSize + sizeof(szUnicowsModuleName) ); - - if ( lpUnicowsModulePath ) - { - _tcsncpy( lpUnicowsModulePath, szModulePath, nParentDirSize ); - _tcscpy( lpUnicowsModulePath + nParentDirSize, szUnicowsModuleName ); - - hModuleUnicows = LoadLibraryA( lpUnicowsModulePath ); - } - } - } - - // Search at the common places - - if ( !hModuleUnicows ) - hModuleUnicows = LoadLibraryA(szUnicowsModuleName); - - return hModuleUnicows; -} - -static HMODULE WINAPI LoadUnicowsLibrary(VOID) -{ - HMODULE hModuleUnicows; - int idMsg = IDOK; - - do - { - hModuleUnicows = _LoadUnicowsLibrary(); - - if ( !hModuleUnicows ) - { - LPVOID lpMsgBuf; - - FormatMessageA( - FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - ERROR_DLL_NOT_FOUND /* GetLastError() */, - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language - (LPSTR)&lpMsgBuf, - 0, - NULL - ); - // Process any inserts in lpMsgBuf. - CHAR szModuleFileName[MAX_PATH]; - - GetModuleFileNameA( NULL, szModuleFileName, sizeof(szModuleFileName) ); - LPSTR lpMessage = (LPSTR)_alloca( strlen( (LPCSTR)lpMsgBuf ) + sizeof(szUnicowsModuleName) + 1 ); - strcpy( lpMessage, (LPCSTR)lpMsgBuf ); - strcat( lpMessage, "\n" ); - strcat( lpMessage, szUnicowsModuleName ); - // Free the buffer. - LocalFree( lpMsgBuf ); - // Display the string. - idMsg = MessageBoxA( NULL, lpMessage, - szModuleFileName, MB_ABORTRETRYIGNORE | MB_ICONERROR | MB_TASKMODAL ); - - if ( IDABORT == idMsg ) - TerminateProcess( GetCurrentProcess(), 255 ); - } - } while ( !hModuleUnicows && IDRETRY == idMsg ); - - return hModuleUnicows; -} - -extern "C" { -FARPROC _PfnLoadUnicows = (FARPROC)LoadUnicowsLibrary; -} - -#ifdef __MINGW32__ - -extern "C" { - -typedef void (*func_ptr) (void); -extern func_ptr __CTOR_LIST__[]; -extern func_ptr __DTOR_LIST__[]; - -static void do_startup(void); -static void do_cleanup(void); - -HMODULE hModuleUnicowsDLL; - -void -__do_global_dtors (void) -{ - static func_ptr *p = __DTOR_LIST__ + 1; - - /* - * Call each destructor in the destructor list until a null pointer - * is encountered. - */ - while (*p) - { - (*(p)) (); - p++; - } -} - -void -__do_global_ctors (void) -{ - unsigned long nptrs = (unsigned long) __CTOR_LIST__[0]; - unsigned i; - - /* - * If the first entry in the constructor list is -1 then the list - * is terminated with a null entry. Otherwise the first entry was - * the number of pointers in the list. - */ - if (nptrs == static_cast(-1)) - { - for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++) - ; - } - - /* - * Go through the list backwards calling constructors. - */ - for (i = nptrs; i >= 1; i--) - { - __CTOR_LIST__[i] (); - } - - /* - * Register the destructors for processing on exit. - */ - atexit (__do_global_dtors); -} - -static int initialized = 0; - -void -__main (void) -{ - if (!initialized) - { - initialized = 1; - do_startup(); - __do_global_ctors (); - } -} - -static void do_startup( void ) -{ - if (((LONG)GetVersion()&0x800000ff) == 0x80000004) - { - hModuleUnicowsDLL = LoadUnicowsLibrary(); - if (hModuleUnicowsDLL) - atexit(do_cleanup); - } -} - -void do_cleanup( void ) -{ - FreeLibrary(hModuleUnicowsDLL); -} -} - -#endif - -extern "C" BOOL WINAPI DllMain( HMODULE hModule, DWORD dwReason, LPVOID ) -{ - switch ( dwReason ) - { - case DLL_PROCESS_ATTACH: - UWINAPI_BaseAddress = hModule; -#ifdef __MINGW32__ - return TRUE; -#else - return DisableThreadLibraryCalls( hModule ); -#endif - default: - return TRUE; - } - -} --- a/main/sal/systools/win32/uwinapi/Uwinapi.def +++ a/main/sal/systools/win32/uwinapi/Uwinapi.def @@ -14,7 +14,6 @@ EXPORTS MoveFileExW MoveFileW GetVersion - DllGetVersion lstrrchrA lstrrchrW lstrchrA --- a/main/sal/systools/win32/uwinapi/makefile.mk +++ a/main/sal/systools/win32/uwinapi/makefile.mk @@ -75,8 +75,6 @@ SLOFILES=\ $(SLO)$/MoveFileExA.obj\ $(SLO)$/MoveFileExW.obj\ $(SLO)$/toolhelp.obj\ - $(SLO)$/DllGetVersion.obj\ - $(SLO)$/DllMain.obj\ $(SLO)$/ResolveThunk.obj\ $(SLO)$/ResolveUnicows.obj\ $(SLO)$/snprintf.obj\ --- a/main/sal/systools/win32/uwinapi/uwinapi.dxp +++ a/main/sal/systools/win32/uwinapi/uwinapi.dxp @@ -25,7 +25,7 @@ ; ;************************************************************************* -DllGetVersion +;DllGetVersion ;CheckTokenMembership CommandLineToArgvW CopyFileExA --- a/main/sal/systools/win32/uwinapi/uwinapi_mingw.dxp +++ a/main/sal/systools/win32/uwinapi/uwinapi_mingw.dxp @@ -25,7 +25,7 @@ ; ;************************************************************************* -DllGetVersion@4 +;DllGetVersion@4 CommandLineToArgvW@8 CopyFileExA@24 CopyFileExW@24 --- a/main/scp2/source/ooo/ure.scp +++ a/main/scp2/source/ooo/ure.scp @@ -946,16 +946,6 @@ End #endif #if defined WNT -File gid_File_Dl_Unicows - TXT_FILE_BODY; - Dir = SCP2_URE_DL_DIR; - Name = SCP2_URE_DL_NORMAL("unicows"); - Styles = (PACKED, VERSION_INDEPENDENT_COMP_ID); - // CompID = "F05005FA-5B2C-43B1-83EF-988EFFF1D7BD"; -End -#endif - -#if defined WNT File gid_File_Dl_Uwinapi TXT_FILE_BODY; Dir = SCP2_URE_DL_DIR; @@ -1148,7 +1138,6 @@ Module gid_Module_Root_Ure_Hidden gid_File_Lib_Mingwm10_Ure, gid_File_Dl_Msvcr71, gid_File_Dl_Msvcp71, - gid_File_Dl_Unicows, gid_File_Dl_Uwinapi, gid_File_Lib_Msvcr80_Ure, gid_File_Lib_Msvcp80_Ure, --- a/main/solenv/gbuild/platform/windows.mk +++ a/main/solenv/gbuild/platform/windows.mk @@ -461,7 +461,6 @@ gb_Library_PLAINLIBS_NONE += \ ole32 \ oleaut32 \ shell32 \ - unicows \ user32 \ uuid \ uwinapi \ --- a/main/solenv/gbuild/platform/winmingw.mk +++ a/main/solenv/gbuild/platform/winmingw.mk @@ -485,7 +485,6 @@ gb_Library_PLAINLIBS_NONE += \ ole32 \ oleaut32 \ shell32 \ - unicows \ user32 \ uuid \ uwinapi \ --- a/main/solenv/inc/set_wntx64.mk +++ a/main/solenv/inc/set_wntx64.mk @@ -142,7 +142,6 @@ MSILIB_X64=$(LIBPATH_X64)/msi.lib DDRAWLIB_X64=$(LIBPATH_X64)/ddraw.lib SHLWAPILIB_X64=$(LIBPATH_X64)/shlwapi.lib URLMONLIB_X64=$(LIBPATH_X64)/urlmon.lib -UNICOWSLIB_X64=$(LIBPATH_X64)/unicows.lib WININETLIB_X64=$(LIBPATH_X64)/wininet.lib OLDNAMESLIB_X64=$(LIBPATH_VC_X64)/oldnames.lib MSIMG32LIB_X64=$(LIBPATH_X64)/msimg32.lib --- a/main/solenv/inc/wntgcci.mk +++ a/main/solenv/inc/wntgcci.mk @@ -210,7 +210,6 @@ MSILIB=$(PSDK_HOME)$/lib$/msi.lib DDRAWLIB=$(DIRECTXSDK_LIB)/ddraw.lib SHLWAPILIB=$(PSDK_HOME)$/lib$/shlwapi.lib URLMONLIB=$(PSDK_HOME)$/lib$/urlmon.lib -UNICOWSLIB=$(PSDK_HOME)$/lib$/unicows.lib WININETLIB=-lwininet OLDNAMESLIB=-lmoldname MSIMG32LIB=$(PSDK_HOME)$/lib$/msimg32.lib --- a/main/solenv/inc/wntmsci10.mk +++ a/main/solenv/inc/wntmsci10.mk @@ -336,7 +336,6 @@ MSILIB=msi.lib DDRAWLIB=ddraw.lib SHLWAPILIB=shlwapi.lib URLMONLIB=urlmon.lib -UNICOWSLIB=unicows.lib WININETLIB=wininet.lib OLDNAMESLIB=oldnames.lib MSIMG32LIB=msimg32.lib --- a/main/solenv/inc/wntmsci11.mk +++ a/main/solenv/inc/wntmsci11.mk @@ -382,7 +382,6 @@ MSILIB=msi.lib DDRAWLIB=ddraw.lib SHLWAPILIB=shlwapi.lib URLMONLIB=urlmon.lib -UNICOWSLIB=unicows.lib WININETLIB=wininet.lib OLDNAMESLIB=oldnames.lib MSIMG32LIB=msimg32.lib --- a/main/ure/source/README +++ a/main/ure/source/README @@ -158,7 +158,6 @@ Program Files\URE\bin\textinstream.uno.dll [private] Program Files\URE\bin\textoutstream.uno.dll [private] Program Files\URE\bin\stocservices.uno.dll [private] Program Files\URE\bin\uuresolver.uno.dll [private] -Program Files\URE\bin\unicows.dll [private] Program Files\URE\bin\uwinapi.dll [private] Program Files\URE\java\java_uno.jar [private] Program Files\URE\misc\javavendors.xml [private] --- a/main/vcl/win/source/app/salinfo.cxx +++ a/main/vcl/win/source/app/salinfo.cxx @@ -28,12 +28,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -// rely on unicows on for multimon functions for older versions -#if WINVER < 0x0500 -#undef WINVER -#define WINVER 0x0500 -#endif - #include "svsys.h" #include "rtl/ustrbuf.hxx" --- a/main/vcl/win/source/window/salframe.cxx +++ a/main/vcl/win/source/window/salframe.cxx @@ -2531,8 +2531,6 @@ static void ImplGetKeyNameText( LONG lParam, sal_Unicode* pBuf, if ( true/*aSalShlData.mbWNT*/ ) { nKeyLen = GetKeyNameTextW( lParam, aKeyBuf, nMaxKeyLen ); - // #i12401# the current unicows.dll has a bug in CharUpperBuffW, which corrupts the stack - // fall back to the ANSI version instead DBG_ASSERT( nKeyLen <= nMaxKeyLen, "Invalid key name length!" ); if( nKeyLen > nMaxKeyLen ) nKeyLen = 0;