From 668284400187d5ee432dcd340e0778d2e7415aad Mon Sep 17 00:00:00 2001 From: Tobias Krause Date: Wed, 25 Nov 2009 11:44:28 +0100 Subject: tkr32: #i106189,i106190# get rid of stlport for windows shell extensions --- shell/prj/build.lst | 1 - shell/source/all/makefile.mk | 4 + shell/source/all/ooofilereader/makefile.mk | 4 + shell/source/all/zipfile/makefile.mk | 6 +- shell/source/win32/makefile.mk | 2 + .../win32/shlxthandler/columninfo/makefile.mk | 2 + .../source/win32/shlxthandler/infotips/makefile.mk | 3 + shell/source/win32/shlxthandler/makefile.mk | 5 +- .../source/win32/shlxthandler/ooofilt/makefile.mk | 7 +- .../source/win32/shlxthandler/ooofilt/ooofilt.cxx | 400 ++++++++++----------- .../win32/shlxthandler/ooofilt/proxy/exports.dxp | 4 - .../win32/shlxthandler/ooofilt/proxy/makefile.mk | 92 ----- .../shlxthandler/ooofilt/proxy/ooofiltproxy.cxx | 164 --------- .../win32/shlxthandler/propsheets/makefile.mk | 2 + .../win32/shlxthandler/thumbviewer/makefile.mk | 2 + .../win32/shlxthandler/util/iso8601_converter.cxx | 4 +- shell/source/win32/shlxthandler/util/makefile.mk | 2 + 17 files changed, 238 insertions(+), 466 deletions(-) delete mode 100644 shell/source/win32/shlxthandler/ooofilt/proxy/exports.dxp delete mode 100644 shell/source/win32/shlxthandler/ooofilt/proxy/makefile.mk delete mode 100644 shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx (limited to 'shell') diff --git a/shell/prj/build.lst b/shell/prj/build.lst index ed4fbca7e3f5..864ff49b3211 100644 --- a/shell/prj/build.lst +++ b/shell/prj/build.lst @@ -31,4 +31,3 @@ sl shell\source\backends\kdebe nmake - u sl_backends_k sl shell\source\backends\kde4be nmake - u sl_backends_kde4be sl_inc NULL sl shell\source\backends\desktopbe nmake - u sl_backends_desktopbe sl_inc NULL sl shell\source\win32\shlxthandler\ooofilt nmake - w sl_win32_shlxthandler_ooofilt sl_all_zipfile.w sl_all_ooofilereader.w sl_win32_shlxthandler_util.w sl_all sl_inc NULL -sl shell\source\win32\shlxthandler\ooofilt\proxy nmake - w sl_win32_ooofiltproxy sl_inc NULL diff --git a/shell/source/all/makefile.mk b/shell/source/all/makefile.mk index 623aad6d69c1..dd72f8e1c061 100755 --- a/shell/source/all/makefile.mk +++ b/shell/source/all/makefile.mk @@ -69,5 +69,9 @@ SLOFILES_X64=$(SLO_X64)$/xml_parser.obj .INCLUDE : set_wntx64.mk .INCLUDE : target.mk +.IF "$(OS)" == "WNT" +INCLUDE!:=$(subst,/stl, $(INCLUDE)) +.EXPORT : INCLUDE +.ENDIF .INCLUDE : tg_wntx64.mk diff --git a/shell/source/all/ooofilereader/makefile.mk b/shell/source/all/ooofilereader/makefile.mk index b893db45d849..cfdf53523634 100644 --- a/shell/source/all/ooofilereader/makefile.mk +++ b/shell/source/all/ooofilereader/makefile.mk @@ -85,5 +85,9 @@ LIB1FILES_X64=$(SLB_X64)$/zipfile.lib\ .INCLUDE : set_wntx64.mk .INCLUDE : target.mk +.IF "$(OS)" == "WNT" +INCLUDE!:=$(subst,/stl, $(INCLUDE)) +.EXPORT : INCLUDE +.ENDIF .INCLUDE : tg_wntx64.mk diff --git a/shell/source/all/zipfile/makefile.mk b/shell/source/all/zipfile/makefile.mk index 9f294ce7aad0..8a7aadb6c4ac 100644 --- a/shell/source/all/zipfile/makefile.mk +++ b/shell/source/all/zipfile/makefile.mk @@ -33,7 +33,7 @@ PRJ=..$/..$/.. PRJNAME=shell TARGET=zipfile ENABLE_EXCEPTIONS=TRUE -EXTERNAL_WARNINGS_NOT_ERRORS := TRUE +EXTERNAL_WARNINGS_NOT_ERRORS := TRUE @@ -54,5 +54,9 @@ SLOFILES_X64=$(SLO_X64)$/zipfile.obj\ .INCLUDE : set_wntx64.mk .INCLUDE : target.mk +.IF "$(OS)" == "WNT" +INCLUDE!:=$(subst,/stl, $(INCLUDE)) +.EXPORT : INCLUDE +.ENDIF .INCLUDE : tg_wntx64.mk diff --git a/shell/source/win32/makefile.mk b/shell/source/win32/makefile.mk index 04cc45d89bc3..cf9e9dc9f600 100644 --- a/shell/source/win32/makefile.mk +++ b/shell/source/win32/makefile.mk @@ -68,4 +68,6 @@ DEF1EXPORTFILE= exports.dxp # --- Targets ------------------------------------------------------ .INCLUDE : target.mk +INCLUDE!:=$(subst,/stl, $(INCLUDE)) +.EXPORT : INCLUDE diff --git a/shell/source/win32/shlxthandler/columninfo/makefile.mk b/shell/source/win32/shlxthandler/columninfo/makefile.mk index 0b25d470aa7b..98adab6b7573 100644 --- a/shell/source/win32/shlxthandler/columninfo/makefile.mk +++ b/shell/source/win32/shlxthandler/columninfo/makefile.mk @@ -58,4 +58,6 @@ SLOFILES_X64=$(SLO_X64)$/$(TARGET).obj # --- Targets ------------------------------------------------------ .INCLUDE : set_wntx64.mk .INCLUDE : target.mk +INCLUDE!:=$(subst,/stl, $(INCLUDE)) +.EXPORT : INCLUDE .INCLUDE : tg_wntx64.mk \ No newline at end of file diff --git a/shell/source/win32/shlxthandler/infotips/makefile.mk b/shell/source/win32/shlxthandler/infotips/makefile.mk index cf489f323278..3533b9718565 100644 --- a/shell/source/win32/shlxthandler/infotips/makefile.mk +++ b/shell/source/win32/shlxthandler/infotips/makefile.mk @@ -34,6 +34,7 @@ PRJNAME=shell TARGET=infotips LIBTARGET=NO ENABLE_EXCEPTIONS=TRUE +EXTERNAL_WARNINGS_NOT_ERRORS := TRUE # --- Settings ----------------------------------------------------- @@ -58,4 +59,6 @@ SLOFILES_X64=$(SLO_X64)$/$(TARGET).obj .INCLUDE : set_wntx64.mk .INCLUDE : target.mk +INCLUDE!:=$(subst,/stl, $(INCLUDE)) +.EXPORT : INCLUDE .INCLUDE : tg_wntx64.mk \ No newline at end of file diff --git a/shell/source/win32/shlxthandler/makefile.mk b/shell/source/win32/shlxthandler/makefile.mk index 07eea87f0263..481dbe654a7f 100644 --- a/shell/source/win32/shlxthandler/makefile.mk +++ b/shell/source/win32/shlxthandler/makefile.mk @@ -79,7 +79,8 @@ SHL1STDLIBS+=\ $(SHELL32LIB)\ $(KERNEL32LIB)\ $(GDI32LIB)\ - $(GDIPLUSLIB) + $(GDIPLUSLIB)\ + msvcprt.lib SHL1LIBS+=$(SLB)$/util.lib\ $(SLB)$/ooofilereader.lib @@ -143,4 +144,6 @@ DEF1EXPORTFILE_X64=exports.dxp .INCLUDE : set_wntx64.mk .INCLUDE : target.mk +INCLUDE!:=$(subst,/stl, $(INCLUDE)) +.EXPORT : INCLUDE .INCLUDE : tg_wntx64.mk diff --git a/shell/source/win32/shlxthandler/ooofilt/makefile.mk b/shell/source/win32/shlxthandler/ooofilt/makefile.mk index 22127bc8ddac..f8e53d030b69 100644 --- a/shell/source/win32/shlxthandler/ooofilt/makefile.mk +++ b/shell/source/win32/shlxthandler/ooofilt/makefile.mk @@ -37,7 +37,7 @@ ENABLE_EXCEPTIONS=TRUE USE_DEFFILE=TRUE # Do not use the dynamic STLport library. -# NO_DEFAULT_STL=YES +NO_DEFAULT_STL=YES # Do not use the uwinapi library UWINAPILIB= @@ -76,7 +76,8 @@ SHL1STDLIBS+=$(OLE32LIB)\ $(UUIDLIB)\ $(SHELL32LIB)\ $(KERNEL32LIB)\ - $(OLDNAMESLIB) + $(OLDNAMESLIB)\ + msvcprt.lib # $(LIBSTLPORTST) @@ -129,4 +130,6 @@ DEF1EXPORTFILE_X64=exports.dxp .INCLUDE : set_wntx64.mk .INCLUDE : target.mk +INCLUDE!:=$(subst,/stl, $(INCLUDE)) +.EXPORT : INCLUDE .INCLUDE : tg_wntx64.mk \ No newline at end of file diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx index ac8dd676c3b1..9ba8542f33d4 100644 --- a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx +++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx @@ -78,8 +78,8 @@ #include #include "assert.h" #include "ooofilt.hxx" -#include -#include +#include +#include #include "propspec.hxx" #ifdef __MINGW32__ #include @@ -120,7 +120,7 @@ COooFilter::COooFilter() : m_ChunkPosition(0), m_cAttributes(0), m_pAttributes(0), - m_pStream(NULL) + m_pStream(NULL) { InterlockedIncrement( &g_lInstances ); @@ -176,8 +176,8 @@ SCODE STDMETHODCALLTYPE COooFilter::QueryInterface( pUnkTemp = (IUnknown *)(IPersistFile *)this; else if ( IID_IPersist == riid ) pUnkTemp = (IUnknown *)(IPersist *)(IPersistFile *)this; - else if (IID_IPersistStream == riid) - pUnkTemp = (IUnknown *)(IPersistStream *)this; + else if (IID_IPersistStream == riid) + pUnkTemp = (IUnknown *)(IPersistStream *)this; else if ( IID_IUnknown == riid ) pUnkTemp = (IUnknown *)(IPersist *)(IPersistFile *)this; else @@ -720,99 +720,99 @@ SCODE STDMETHODCALLTYPE COooFilter::SaveCompleted(LPCWSTR /*pszFileName*/) return S_OK; } -//M------------------------------------------------------------------------- -// -// Method: COooFilter::Load (IPersistStream::Load) -// -// Summary: Initializes an object from the stream where it was previously saved -// -// Arguments: pStm -// [in] Pointer to stream from which object should be loaded -// -// -// Returns: S_OK -// E_OUTOFMEMORY -// E_FAIL -// -// -//-------------------------------------------------------------------------- -SCODE STDMETHODCALLTYPE COooFilter::Load(IStream *pStm) -{ - - // These next few lines work around the "Seek pointer" bug found on Vista. - - char buf[20]; - unsigned long count; - HRESULT hr; - ULARGE_INTEGER NewPosition; - LARGE_INTEGER Move; - Move.QuadPart = 0; - hr = pStm->Seek (Move, STREAM_SEEK_SET, &NewPosition); - hr = pStm->Read (buf, 20, &count); - - zlib_filefunc_def z_filefunc; - fill_stream_filefunc (&z_filefunc); - z_filefunc.opaque = (void*)pStm; - - m_pStream = pStm; - - try - { - if (m_pMetaInfoReader) - delete m_pMetaInfoReader; - m_pMetaInfoReader = new CMetaInfoReader((void*)m_pStream, &z_filefunc); - - if (m_pContentReader) - delete m_pContentReader; - m_pContentReader = new CContentReader((void*)m_pStream, m_pMetaInfoReader->getDefaultLocale(), &z_filefunc); - } - catch (const std::exception&) - { - return E_FAIL; - } - return S_OK; -} - -//M------------------------------------------------------------------------- -// -// Method: COooFilter::GetSizeMax (IPersistStream::GetSizeMax) -// -// Summary: Returns the size in bytes of the stream neede to save the object. -// -// Arguments: pcbSize -// [out] Pointer to a 64 bit unsigned int indicating the size needed -// -// Returns: E_NOTIMPL -// -// -//-------------------------------------------------------------------------- -SCODE STDMETHODCALLTYPE COooFilter::GetSizeMax(ULARGE_INTEGER * /*pcbSize*/) -{ - // - return E_NOTIMPL; -} - -//M------------------------------------------------------------------------- -// -// Method: COooFilter::Save (IPersistStream::Save) -// -// Summary: Save object to specified stream -// -// Arguments: pStm -// [in] Pointer to stream -// -// fClearDirty -// [in] Indicates whether to clear dirty flag -// -// Returns: E_NOTIMPL -// -// -//-------------------------------------------------------------------------- -SCODE STDMETHODCALLTYPE COooFilter::Save(IStream * /*pStm*/, BOOL ) -{ - // - return E_NOTIMPL; -} +//M------------------------------------------------------------------------- +// +// Method: COooFilter::Load (IPersistStream::Load) +// +// Summary: Initializes an object from the stream where it was previously saved +// +// Arguments: pStm +// [in] Pointer to stream from which object should be loaded +// +// +// Returns: S_OK +// E_OUTOFMEMORY +// E_FAIL +// +// +//-------------------------------------------------------------------------- +SCODE STDMETHODCALLTYPE COooFilter::Load(IStream *pStm) +{ + + // These next few lines work around the "Seek pointer" bug found on Vista. + + char buf[20]; + unsigned long count; + HRESULT hr; + ULARGE_INTEGER NewPosition; + LARGE_INTEGER Move; + Move.QuadPart = 0; + hr = pStm->Seek (Move, STREAM_SEEK_SET, &NewPosition); + hr = pStm->Read (buf, 20, &count); + + zlib_filefunc_def z_filefunc; + fill_stream_filefunc (&z_filefunc); + z_filefunc.opaque = (void*)pStm; + + m_pStream = pStm; + + try + { + if (m_pMetaInfoReader) + delete m_pMetaInfoReader; + m_pMetaInfoReader = new CMetaInfoReader((void*)m_pStream, &z_filefunc); + + if (m_pContentReader) + delete m_pContentReader; + m_pContentReader = new CContentReader((void*)m_pStream, m_pMetaInfoReader->getDefaultLocale(), &z_filefunc); + } + catch (const std::exception&) + { + return E_FAIL; + } + return S_OK; +} + +//M------------------------------------------------------------------------- +// +// Method: COooFilter::GetSizeMax (IPersistStream::GetSizeMax) +// +// Summary: Returns the size in bytes of the stream neede to save the object. +// +// Arguments: pcbSize +// [out] Pointer to a 64 bit unsigned int indicating the size needed +// +// Returns: E_NOTIMPL +// +// +//-------------------------------------------------------------------------- +SCODE STDMETHODCALLTYPE COooFilter::GetSizeMax(ULARGE_INTEGER * /*pcbSize*/) +{ + // + return E_NOTIMPL; +} + +//M------------------------------------------------------------------------- +// +// Method: COooFilter::Save (IPersistStream::Save) +// +// Summary: Save object to specified stream +// +// Arguments: pStm +// [in] Pointer to stream +// +// fClearDirty +// [in] Indicates whether to clear dirty flag +// +// Returns: E_NOTIMPL +// +// +//-------------------------------------------------------------------------- +SCODE STDMETHODCALLTYPE COooFilter::Save(IStream * /*pStm*/, BOOL ) +{ + // + return E_NOTIMPL; +} //M------------------------------------------------------------------------- // @@ -1247,14 +1247,14 @@ namespace /* private */ if (!SetRegistryKey(HKEY_CLASSES_ROOT, ClsidEntry_Persist.c_str(), "", "OpenOffice.org Persistent Handler")) return E_FAIL; - // Add missing entry - std::string ClsidEntry_Persist_Entry = CLSID_PERSIST_ENTRY; - SubstitutePlaceholder(ClsidEntry_Persist_Entry, - GUID_PLACEHOLDER, - ClsidToString(PersistentGuid)); - - if (!SetRegistryKey(HKEY_CLASSES_ROOT, ClsidEntry_Persist_Entry.c_str(), "", ClsidToString(PersistentGuid).c_str())); + // Add missing entry + std::string ClsidEntry_Persist_Entry = CLSID_PERSIST_ENTRY; + SubstitutePlaceholder(ClsidEntry_Persist_Entry, + GUID_PLACEHOLDER, + ClsidToString(PersistentGuid)); + if (!SetRegistryKey(HKEY_CLASSES_ROOT, ClsidEntry_Persist_Entry.c_str(), "", ClsidToString(PersistentGuid).c_str())) + return E_FAIL; std::string ClsidEntry_Persist_Addin = CLSID_GUID_PERSIST_ADDIN_ENTRY; SubstitutePlaceholder(ClsidEntry_Persist_Addin, @@ -1505,99 +1505,99 @@ STDAPI DllUnregisterServer() return S_OK; } -extern "C" { - - // IStream callback - voidpf ZCALLBACK cb_sopen (voidpf opaque, const char* filename, int mode) { - return opaque; - } - - uLong ZCALLBACK cb_sread (voidpf opaque, voidpf stream, void* buf, uLong size) { - unsigned long newsize; - HRESULT hr; - - hr = ((IStream *)stream)->Read (buf, size, &newsize); - if (hr == S_OK){ - return (unsigned long)newsize; - } - else { - return (uLong)0; - } - } - - long ZCALLBACK cb_sseek (voidpf opaque, voidpf stream, uLong offset, int origin) { - // IStream::Seek parameters - HRESULT hr; - LARGE_INTEGER Move; - DWORD dwOrigin; - Move.QuadPart = (__int64)offset; - - switch (origin) { - case SEEK_CUR: - dwOrigin = STREAM_SEEK_CUR; - break; - case SEEK_END: - dwOrigin = STREAM_SEEK_END; - break; - case SEEK_SET: - dwOrigin = STREAM_SEEK_SET; - break; - default: - return -1; - } - - hr = ((IStream*)stream)->Seek (Move, dwOrigin, NULL); - if (hr == S_OK){ - return 0; - } - else { - return -1; - } - } - - long ZCALLBACK cb_stell (voidpf opaque, voidpf stream) { - // IStream::Seek parameters - HRESULT hr; - LARGE_INTEGER Move; - ULARGE_INTEGER NewPosition; - Move.QuadPart = 0; - NewPosition.QuadPart = 0; - - hr = ((IStream*)stream)->Seek (Move, STREAM_SEEK_CUR, &NewPosition); - if (hr == S_OK){ - return (long) NewPosition.QuadPart; - } - else { - return -1; - } - } - - int ZCALLBACK cb_sclose (voidpf opaque, voidpf stream) { - return 0; - } - - int ZCALLBACK cb_serror (voidpf opaque, voidpf stream) { - return 0; //RJK - for now - } - - uLong ZCALLBACK cb_swrite (voidpf opaque, voidpf stream, const void* buf, uLong size) { - HRESULT hr; - unsigned long writecount; - hr = ((IStream*)stream)->Write (buf, size, &writecount); - if (hr == S_OK) - return (unsigned int)writecount; - else - return (uLong)0; - } - - void fill_stream_filefunc (zlib_filefunc_def* pzlib_filefunc_def) { - pzlib_filefunc_def->zopen_file = cb_sopen; - pzlib_filefunc_def->zread_file = cb_sread; - pzlib_filefunc_def->zwrite_file = cb_swrite; - pzlib_filefunc_def->ztell_file = cb_stell; - pzlib_filefunc_def->zseek_file = cb_sseek; - pzlib_filefunc_def->zclose_file = cb_sclose; - pzlib_filefunc_def->zerror_file = cb_serror; - } -} +extern "C" { + + // IStream callback + voidpf ZCALLBACK cb_sopen (voidpf opaque, const char* /*filename*/, int /*mode*/) { + return opaque; + } + + uLong ZCALLBACK cb_sread (voidpf /*opaque*/, voidpf stream, void* buf, uLong size) { + unsigned long newsize; + HRESULT hr; + + hr = ((IStream *)stream)->Read (buf, size, &newsize); + if (hr == S_OK){ + return (unsigned long)newsize; + } + else { + return (uLong)0; + } + } + + long ZCALLBACK cb_sseek (voidpf /*opaque*/, voidpf stream, uLong offset, int origin) { + // IStream::Seek parameters + HRESULT hr; + LARGE_INTEGER Move; + DWORD dwOrigin; + Move.QuadPart = (__int64)offset; + + switch (origin) { + case SEEK_CUR: + dwOrigin = STREAM_SEEK_CUR; + break; + case SEEK_END: + dwOrigin = STREAM_SEEK_END; + break; + case SEEK_SET: + dwOrigin = STREAM_SEEK_SET; + break; + default: + return -1; + } + + hr = ((IStream*)stream)->Seek (Move, dwOrigin, NULL); + if (hr == S_OK){ + return 0; + } + else { + return -1; + } + } + + long ZCALLBACK cb_stell (voidpf /*opaque*/, voidpf stream) { + // IStream::Seek parameters + HRESULT hr; + LARGE_INTEGER Move; + ULARGE_INTEGER NewPosition; + Move.QuadPart = 0; + NewPosition.QuadPart = 0; + + hr = ((IStream*)stream)->Seek (Move, STREAM_SEEK_CUR, &NewPosition); + if (hr == S_OK){ + return (long) NewPosition.QuadPart; + } + else { + return -1; + } + } + + int ZCALLBACK cb_sclose (voidpf /*opaque*/, voidpf /*stream*/) { + return 0; + } + + int ZCALLBACK cb_serror (voidpf /*opaque*/, voidpf /*stream*/) { + return 0; //RJK - for now + } + + uLong ZCALLBACK cb_swrite (voidpf /*opaque*/, voidpf stream, const void* buf, uLong size) { + HRESULT hr; + unsigned long writecount; + hr = ((IStream*)stream)->Write (buf, size, &writecount); + if (hr == S_OK) + return (unsigned int)writecount; + else + return (uLong)0; + } + + void fill_stream_filefunc (zlib_filefunc_def* pzlib_filefunc_def) { + pzlib_filefunc_def->zopen_file = cb_sopen; + pzlib_filefunc_def->zread_file = cb_sread; + pzlib_filefunc_def->zwrite_file = cb_swrite; + pzlib_filefunc_def->ztell_file = cb_stell; + pzlib_filefunc_def->zseek_file = cb_sseek; + pzlib_filefunc_def->zclose_file = cb_sclose; + pzlib_filefunc_def->zerror_file = cb_serror; + } +} diff --git a/shell/source/win32/shlxthandler/ooofilt/proxy/exports.dxp b/shell/source/win32/shlxthandler/ooofilt/proxy/exports.dxp deleted file mode 100644 index 953039ccc957..000000000000 --- a/shell/source/win32/shlxthandler/ooofilt/proxy/exports.dxp +++ /dev/null @@ -1,4 +0,0 @@ -DllRegisterServer PRIVATE -DllUnregisterServer PRIVATE -DllGetClassObject PRIVATE -DllCanUnloadNow PRIVATE \ No newline at end of file diff --git a/shell/source/win32/shlxthandler/ooofilt/proxy/makefile.mk b/shell/source/win32/shlxthandler/ooofilt/proxy/makefile.mk deleted file mode 100644 index 54dc3d59a734..000000000000 --- a/shell/source/win32/shlxthandler/ooofilt/proxy/makefile.mk +++ /dev/null @@ -1,92 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.7 $ -# -# 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. -# -#************************************************************************* - -PRJ=..$/..$/..$/..$/.. -PRJNAME=shell -TARGET=ooofiltproxy -LIBTARGET=NO -ENABLE_EXCEPTIONS=TRUE -USE_DEFFILE=TRUE -DYNAMIC_CRT= -UWINAPILIB= - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -CFLAGS+=-DWIN32_LEAN_AND_MEAN -D_NTSDK -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501 -CDEFS+=-D_WIN32_IE=0x501 - -# --- Files -------------------------------------------------------- - -SLOFILES=$(SLO)$/ooofiltproxy.obj -SHL1TARGET=$(TARGET) -SHL1STDLIBS=$(OLE32LIB)\ - $(ADVAPO32LIB)\ - $(COMCTL32LIB)\ - $(UUIDLIB)\ - $(SHELL32LIB)\ - $(KERNEL32LIB) - -SHL1DEPN= -SHL1OBJS=$(SLOFILES) -SHL1DEF=$(MISC)$/$(SHL1TARGET).def -DEF1NAME=$(SHL1TARGET) -DEF1EXPORTFILE=exports.dxp - -.IF "$(BUILD_X64)"!="" -#------------- x64 stuff ---------------- -USE_DEFFILE_X64=TRUE -CFLAGS_X64+=-DWIN32_LEAN_AND_MEAN -D_NTSDK -DUNICODE -D_UNICODE -D_WIN32_WINNT=0x0501 -CDEFS_X64+=-D_WIN32_IE=0x501 - -SLOFILES_X64=$(SLO_X64)$/ooofiltproxy.obj -SHL1TARGET_X64=$(TARGET) -SHL1STDLIBS_X64=$(OLE32LIB_X64)\ - $(ADVAPO32LIB_X64)\ - $(COMCTL32LIB_X64)\ - $(UUIDLIB_X64)\ - $(SHELL32LIB_X64)\ - $(KERNEL32LIB_X64)\ - $(MSVCRT_X64) - -SHL1DEPN_X64= -SHL1OBJS_X64=$(SLO_X64)$/ooofiltproxy.obj -SHL1DEF_X64=$(MISC_X64)$/$(TARGET).def -DEF1NAME_X64=$(TARGET) -DEF1EXPORTFILE_X64=exports.dxp -.ENDIF # "$(BUILD_X64)"!="" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : set_wntx64.mk -.INCLUDE : target.mk -.INCLUDE : tg_wntx64.mk diff --git a/shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx b/shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx deleted file mode 100644 index 879cf8c0115b..000000000000 --- a/shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx +++ /dev/null @@ -1,164 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: ooofiltproxy.cxx,v $ - * $Revision: 1.8 $ - * - * 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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_shell.hxx" - -#if defined _MSC_VER -#pragma warning(push, 1) -#endif -#include -#if defined _MSC_VER -#pragma warning(pop) -#endif -#include -#ifdef __MINGW32__ -#include -#endif - - -/* - The indexing filter library ooofilt.dll is linked against a couple - of libaries (e.g. stlport, uwinapi, ...) which are not standard on - a windows system. Unfortunately the library will be loaded by the - indexing service via LoadLibrary so that the libraries ooofilt.dll - depends on need to be in one of the standard search directories or - the directory need to be added to the PATH - environment variable. In order to prevent failures while loading - the ooofilt.dll we're installing and registering this proxy library - which will load ooofilt.dll using LoadLibraryEx with the flag - LOAD_WITH_ALTERED_SEARCH_PATH (see MSDN for details). This approach - ensures that all libraries ooofilt.dll depends on will be found. -*/ - -typedef HRESULT (__stdcall * Forward_DllGetClassObject_t)(REFCLSID cid, REFIID iid, void** ppvObj); -typedef HRESULT (__stdcall * Forward_DllCanUnloadNow_t)(); -typedef HRESULT (__stdcall * Forward_DllRegisterServer_t)(); -typedef HRESULT (__stdcall * Forward_DllUnregisterServer_t)(); - -Forward_DllGetClassObject_t Forward_DllGetClassObject = NULL; -Forward_DllCanUnloadNow_t Forward_DllCanUnloadNow = NULL; -Forward_DllRegisterServer_t Forward_DllRegisterServer = NULL; -Forward_DllUnregisterServer_t Forward_DllUnregisterServer = NULL; - -HMODULE hOoofilt = NULL; -HMODULE hThisLibrary = NULL; - -/* Truncates the file name from an absolute path but - leaves the final '\' */ -void PathTruncateFileName(TCHAR* path) -{ - TCHAR* p = path + lstrlen(path); - while (*p != _T('\\')) p--; - p++; - *p = 0; -} - -void Init() -{ - if (Forward_DllGetClassObject == NULL) - { - TCHAR buff[MAX_PATH]; - GetModuleFileName(hThisLibrary, buff, (sizeof(buff)/sizeof(TCHAR))); - PathTruncateFileName(buff); - lstrcat(buff, TEXT("ooofilt.dll")); - - hOoofilt = LoadLibraryEx(buff, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); - - if (hOoofilt) - { - Forward_DllGetClassObject = reinterpret_cast( - GetProcAddress(hOoofilt, "DllGetClassObject")); - Forward_DllCanUnloadNow = reinterpret_cast( - GetProcAddress(hOoofilt, "DllCanUnloadNow")); - Forward_DllRegisterServer = reinterpret_cast( - GetProcAddress(hOoofilt, "DllRegisterServer")); - Forward_DllUnregisterServer = reinterpret_cast( - GetProcAddress(hOoofilt, "DllUnregisterServer")); - } - } -} - -extern "C" BOOL WINAPI DllMain(HMODULE hInstance, DWORD fdwReason, LPVOID /*lpvReserved*/) -{ - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls( hInstance ); - hThisLibrary = hInstance; - break; - case DLL_PROCESS_DETACH: - if (hOoofilt) - FreeLibrary(hOoofilt); - break; - default: - break; - } - return TRUE; -} - -extern "C" HRESULT __stdcall DllGetClassObject(REFCLSID cid, REFIID iid, void** ppvObj) -{ - Init(); - - if (Forward_DllGetClassObject) - return Forward_DllGetClassObject(cid, iid, ppvObj); - else - return E_FAIL; -} - -extern "C" HRESULT __stdcall DllCanUnloadNow() -{ - Init(); - - if (Forward_DllCanUnloadNow) - return Forward_DllCanUnloadNow(); - else - return E_FAIL; -} - -extern "C" HRESULT __stdcall DllRegisterServer() -{ - Init(); - if (Forward_DllRegisterServer) - return Forward_DllRegisterServer(); - else - return E_FAIL; -} - -extern "C" HRESULT __stdcall DllUnregisterServer() -{ - Init(); - - if (Forward_DllUnregisterServer) - return Forward_DllUnregisterServer(); - else - return E_FAIL; -} diff --git a/shell/source/win32/shlxthandler/propsheets/makefile.mk b/shell/source/win32/shlxthandler/propsheets/makefile.mk index ac12795cf37f..22df3b376c00 100644 --- a/shell/source/win32/shlxthandler/propsheets/makefile.mk +++ b/shell/source/win32/shlxthandler/propsheets/makefile.mk @@ -63,4 +63,6 @@ SLOFILES_X64=$(SLO_X64)$/propsheets.obj\ .INCLUDE : set_wntx64.mk .INCLUDE : target.mk +INCLUDE!:=$(subst,/stl, $(INCLUDE)) +.EXPORT : INCLUDE .INCLUDE : tg_wntx64.mk \ No newline at end of file diff --git a/shell/source/win32/shlxthandler/thumbviewer/makefile.mk b/shell/source/win32/shlxthandler/thumbviewer/makefile.mk index a7b0b40032dd..808a529df329 100644 --- a/shell/source/win32/shlxthandler/thumbviewer/makefile.mk +++ b/shell/source/win32/shlxthandler/thumbviewer/makefile.mk @@ -60,5 +60,7 @@ SLOFILES_X64=$(SLO_X64)$/$(TARGET).obj .INCLUDE : set_wntx64.mk .INCLUDE : target.mk +INCLUDE!:=$(subst,/stl, $(INCLUDE)) +.EXPORT : INCLUDE .INCLUDE : tg_wntx64.mk diff --git a/shell/source/win32/shlxthandler/util/iso8601_converter.cxx b/shell/source/win32/shlxthandler/util/iso8601_converter.cxx index ff7fe963413f..e104f810e813 100644 --- a/shell/source/win32/shlxthandler/util/iso8601_converter.cxx +++ b/shell/source/win32/shlxthandler/util/iso8601_converter.cxx @@ -149,7 +149,7 @@ std::wstring iso8601_duration_to_local_duration(const std::wstring& iso8601durat hours = buff; } -#if defined(_MSC_VER) && defined(_M_X64) +#if defined(_MSC_VER) //&& defined(_M_X64) std::wostringstream oss; oss << std::setw(2) << std::setfill(wchar_t('0')) << hours << L":" << std::setw(2) << std::setfill(wchar_t('0')) << minutes << L":" << @@ -172,12 +172,14 @@ std::wstring iso8601_duration_to_local_duration(const std::wstring& iso8601durat return result; #undef ADD_AS_PREFILLED +/* #else std::wostringstream oss; oss << std::setw(2) << std::setfill('0') << hours << L":" << std::setw(2) << std::setfill('0') << minutes << L":" << std::setw(2) << std::setfill('0') << seconds; return oss.str(); +*/ #endif } diff --git a/shell/source/win32/shlxthandler/util/makefile.mk b/shell/source/win32/shlxthandler/util/makefile.mk index c0bec9c36d3b..75afe53b614d 100644 --- a/shell/source/win32/shlxthandler/util/makefile.mk +++ b/shell/source/win32/shlxthandler/util/makefile.mk @@ -66,5 +66,7 @@ SLOFILES_X64=$(SLO_X64)$/dbgmacros.obj\ .INCLUDE : set_wntx64.mk .INCLUDE : target.mk +INCLUDE!:=$(subst,/stl, $(INCLUDE)) +.EXPORT : INCLUDE .INCLUDE : tg_wntx64.mk -- cgit From 46e81a69d5a3791742997fefd96a9ea3cf1302f3 Mon Sep 17 00:00:00 2001 From: Tobias Krause Date: Wed, 27 Jan 2010 08:42:12 +0100 Subject: tkr32: #i106190# remove ooofiltproxy --- .../shlxthandler/ooofilt/proxy/ooofiltproxy.cxx | 166 --------------------- 1 file changed, 166 deletions(-) delete mode 100644 shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx (limited to 'shell') diff --git a/shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx b/shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx deleted file mode 100644 index 218ba500d368..000000000000 --- a/shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx +++ /dev/null @@ -1,166 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: ooofiltproxy.cxx,v $ - * $Revision: 1.8 $ - * - * 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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_shell.hxx" - -#if defined _MSC_VER -#pragma warning(push, 1) -#endif -#include -#if defined _MSC_VER -#pragma warning(pop) -#endif -#include -#ifdef __MINGW32__ -#include -#endif -#include "internal/config.hxx" - - -/* - The indexing filter library ooofilt.dll is linked against a couple - of libaries (e.g. stlport, uwinapi, ...) which are not standard on - a windows system. Unfortunately the library will be loaded by the - indexing service via LoadLibrary so that the libraries ooofilt.dll - depends on need to be in one of the standard search directories or - the directory need to be added to the PATH - environment variable. In order to prevent failures while loading - the ooofilt.dll we're installing and registering this proxy library - which will load ooofilt.dll using LoadLibraryEx with the flag - LOAD_WITH_ALTERED_SEARCH_PATH (see MSDN for details). This approach - ensures that all libraries ooofilt.dll depends on will be found. -*/ - -typedef HRESULT (__stdcall * Forward_DllGetClassObject_t)(REFCLSID cid, REFIID iid, void** ppvObj); -typedef HRESULT (__stdcall * Forward_DllCanUnloadNow_t)(); -typedef HRESULT (__stdcall * Forward_DllRegisterServer_t)(); -typedef HRESULT (__stdcall * Forward_DllUnregisterServer_t)(); - -Forward_DllGetClassObject_t Forward_DllGetClassObject = NULL; -Forward_DllCanUnloadNow_t Forward_DllCanUnloadNow = NULL; -Forward_DllRegisterServer_t Forward_DllRegisterServer = NULL; -Forward_DllUnregisterServer_t Forward_DllUnregisterServer = NULL; - -HMODULE hOoofilt = NULL; -HMODULE hThisLibrary = NULL; - -/* Truncates the file name from an absolute path but - leaves the final '\' */ -void PathTruncateFileName(TCHAR* path) -{ - TCHAR* p = path + lstrlen(path); - while (*p != _T('\\')) p--; - p++; - *p = 0; -} - -void Init() -{ - if (Forward_DllGetClassObject == NULL) - { - TCHAR buff[MAX_PATH]; - GetModuleFileName(hThisLibrary, buff, (sizeof(buff)/sizeof(TCHAR))); - PathTruncateFileName(buff); - - lstrcat(buff, MODULE_NAME_FILTER); - - hOoofilt = LoadLibraryEx(buff, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); - - if (hOoofilt) - { - Forward_DllGetClassObject = reinterpret_cast( - GetProcAddress(hOoofilt, "DllGetClassObject")); - Forward_DllCanUnloadNow = reinterpret_cast( - GetProcAddress(hOoofilt, "DllCanUnloadNow")); - Forward_DllRegisterServer = reinterpret_cast( - GetProcAddress(hOoofilt, "DllRegisterServer")); - Forward_DllUnregisterServer = reinterpret_cast( - GetProcAddress(hOoofilt, "DllUnregisterServer")); - } - } -} - -extern "C" BOOL WINAPI DllMain(HMODULE hInstance, DWORD fdwReason, LPVOID /*lpvReserved*/) -{ - switch (fdwReason) - { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls( hInstance ); - hThisLibrary = hInstance; - break; - case DLL_PROCESS_DETACH: - if (hOoofilt) - FreeLibrary(hOoofilt); - break; - default: - break; - } - return TRUE; -} - -extern "C" HRESULT __stdcall DllGetClassObject(REFCLSID cid, REFIID iid, void** ppvObj) -{ - Init(); - - if (Forward_DllGetClassObject) - return Forward_DllGetClassObject(cid, iid, ppvObj); - else - return E_FAIL; -} - -extern "C" HRESULT __stdcall DllCanUnloadNow() -{ - Init(); - - if (Forward_DllCanUnloadNow) - return Forward_DllCanUnloadNow(); - else - return E_FAIL; -} - -extern "C" HRESULT __stdcall DllRegisterServer() -{ - Init(); - if (Forward_DllRegisterServer) - return Forward_DllRegisterServer(); - else - return E_FAIL; -} - -extern "C" HRESULT __stdcall DllUnregisterServer() -{ - Init(); - - if (Forward_DllUnregisterServer) - return Forward_DllUnregisterServer(); - else - return E_FAIL; -} -- cgit