diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-12-05 19:29:07 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-12-05 19:29:07 +0100 |
commit | 8d669bc21b9d1976842ba8252d2f0fb953160bdd (patch) | |
tree | 63e5a53c8ff9c4cdff33070e177eda653922f28a /shell | |
parent | f232b25c1eceb8e1c32cfd917d666b3a16b14405 (diff) | |
parent | 875ac20478f16e5107acb222c0b851b99d2e0f27 (diff) |
merge to m67
Diffstat (limited to 'shell')
-rw-r--r-- | shell/inc/internal/config.hxx | 5 | ||||
-rw-r--r-- | shell/inc/internal/utilities.hxx | 20 | ||||
-rwxr-xr-x | shell/prj/d.lst | 3 | ||||
-rw-r--r-- | shell/source/tools/lngconvex/lngconvex.cxx | 31 | ||||
-rw-r--r-- | shell/source/win32/shlxthandler/infotips/infotips.cxx | 2 | ||||
-rw-r--r-- | shell/source/win32/shlxthandler/makefile.mk | 13 | ||||
-rw-r--r-- | shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx | 4 | ||||
-rw-r--r-- | shell/source/win32/shlxthandler/propsheets/propsheets.cxx | 3 | ||||
-rw-r--r-- | shell/source/win32/shlxthandler/res/makefile.mk | 10 | ||||
-rw-r--r-- | shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx | 18 | ||||
-rw-r--r-- | shell/source/win32/shlxthandler/util/utilities.cxx | 15 |
11 files changed, 88 insertions, 36 deletions
diff --git a/shell/inc/internal/config.hxx b/shell/inc/internal/config.hxx index 47394730c761..e9b3e0fd59ac 100644 --- a/shell/inc/internal/config.hxx +++ b/shell/inc/internal/config.hxx @@ -39,8 +39,13 @@ #include <tchar.h> #endif +#ifdef _AMD64_ +#define MODULE_NAME TEXT("shlxthdl_x64.dll") +#define MODULE_NAME_FILTER TEXT("ooofilt_x64.dll") +#else #define MODULE_NAME TEXT("shlxthdl.dll") #define MODULE_NAME_FILTER TEXT("ooofilt.dll") +#endif #define COLUMN_HANDLER_DESCRIPTIVE_NAME TEXT("OpenOffice.org Column Handler") #define INFOTIP_HANDLER_DESCRIPTIVE_NAME TEXT("OpenOffice.org Infotip Handler") diff --git a/shell/inc/internal/utilities.hxx b/shell/inc/internal/utilities.hxx index a552516400bc..f0f7022dc02c 100644 --- a/shell/inc/internal/utilities.hxx +++ b/shell/inc/internal/utilities.hxx @@ -47,6 +47,7 @@ #include "internal/types.hxx" #include <string> +#include <strsafe.h> //--------------------------------- /** Convert a string to a wstring @@ -89,4 +90,23 @@ bool HasOnlySpaces(const std::wstring& String); LCID LocaleSetToLCID( const LocaleSet_t & Locale ); #endif +//---------------------------------------------------------- +#ifdef DEBUG +inline void OutputDebugStringFormat( LPCSTR pFormat, ... ) +{ + CHAR buffer[1024]; + va_list args; + + va_start( args, pFormat ); + StringCchVPrintfA( buffer, sizeof(buffer), pFormat, args ); + OutputDebugStringA( buffer ); +} +#else +static inline void OutputDebugStringFormat( LPCSTR, ... ) +{ +} +#endif +//---------------------------------------------------------- + + #endif diff --git a/shell/prj/d.lst b/shell/prj/d.lst index 82cac298367e..eee13ef34fe9 100755 --- a/shell/prj/d.lst +++ b/shell/prj/d.lst @@ -4,6 +4,9 @@ ..\%__SRC%\lib\*.uno.so %_DEST%\lib%_EXT%\*.uno.so ..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\*.dll ..\%__SRC%\bin\*.exe %_DEST%\bin%_EXT%\*.exe +..\%__SRC%\bin\x64\shlxthdl.dll %_DEST%\bin%_EXT%\shlxthdl_x64.dll +..\%__SRC%\bin\x64\ooofiltproxy.dll %_DEST%\bin%_EXT%\ooofiltproxy_x64.dll +..\%__SRC%\bin\x64\ooofilt.dll %_DEST%\bin%_EXT%\ooofilt_x64.dll ..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib ..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx index 807d65f6700b..f605d6f340d9 100644 --- a/shell/source/tools/lngconvex/lngconvex.cxx +++ b/shell/source/tools/lngconvex/lngconvex.cxx @@ -58,6 +58,7 @@ #include <sstream> #include <iterator> #include <algorithm> +#include <string> namespace /* private */ { @@ -317,6 +318,8 @@ private: iso_lang_identifier active_iso_lang_; }; +typedef std::map< unsigned short , std::string , std::less< unsigned short > > shortmap; + //########################################### void add_group_entries( Config& aConfig, @@ -327,21 +330,35 @@ void add_group_entries( aConfig.SetGroup(GroupName); size_t key_count = aConfig.GetKeyCount(); + shortmap map; for (size_t i = 0; i < key_count; i++) { ByteString iso_lang = aConfig.GetKeyName(sal::static_int_cast<USHORT>(i)); ByteString key_value_utf8 = aConfig.ReadKey(sal::static_int_cast<USHORT>(i)); + iso_lang_identifier myiso_lang( iso_lang ); + LanguageType ltype = MsLangId::convertIsoNamesToLanguage(myiso_lang.language(), myiso_lang.country()); + if( ( ltype & 0x0200 ) == 0 && map[ ltype ].empty() ) + { + Substitutor.set_language(iso_lang_identifier(iso_lang)); - Substitutor.set_language(iso_lang_identifier(iso_lang)); - - key_value_utf8.EraseLeadingAndTrailingChars('\"'); + key_value_utf8.EraseLeadingAndTrailingChars('\"'); - OUString key_value_utf16 = - rtl::OStringToOUString(key_value_utf8, RTL_TEXTENCODING_UTF8); + OUString key_value_utf16 = + rtl::OStringToOUString(key_value_utf8, RTL_TEXTENCODING_UTF8); - Substitutor.add_substitution( - GroupName.GetBuffer(), make_winrc_unicode_string(key_value_utf16)); + Substitutor.add_substitution( + GroupName.GetBuffer(), make_winrc_unicode_string(key_value_utf16)); + map[ static_cast<unsigned short>(ltype) ] = std::string( iso_lang.GetBuffer() ); + } + else + { + if( !map[ ltype ].empty() ) + { + printf("ERROR: Duplicated ms id %d found for the languages %s and %s !!!! This does not work in microsoft resources\nPlease remove one!\n", ltype , map[ ltype ].c_str() , iso_lang.GetBuffer()); + exit( -1 ); + } + } } } diff --git a/shell/source/win32/shlxthandler/infotips/infotips.cxx b/shell/source/win32/shlxthandler/infotips/infotips.cxx index 304bff841dbd..da6974d4399d 100644 --- a/shell/source/win32/shlxthandler/infotips/infotips.cxx +++ b/shell/source/win32/shlxthandler/infotips/infotips.cxx @@ -45,6 +45,8 @@ #include <stdio.h> #include <utility> #include <stdlib.h> + + #define MAX_STRING 80 #define KB 1024.0 const std::wstring WSPACE = std::wstring(SPACE); diff --git a/shell/source/win32/shlxthandler/makefile.mk b/shell/source/win32/shlxthandler/makefile.mk index 07eea87f0263..479f8c0b6cd9 100644 --- a/shell/source/win32/shlxthandler/makefile.mk +++ b/shell/source/win32/shlxthandler/makefile.mk @@ -1,7 +1,7 @@ #************************************************************************* # # 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 @@ -123,17 +123,17 @@ SHL1STDLIBS_X64+=\ $(SHELL32LIB_X64)\ $(KERNEL32LIB_X64)\ $(GDI32LIB_X64)\ - $(MSVCRT_X64) \ - $(MSVCPRT_X64) \ $(USER32LIB_X64) \ - $(OLDNAMESLIB_X64) \ - $(GDIPLUSLIB_X64) + $(GDIPLUSLIB_X64) \ + $(MSVCRT_X64) \ + $(MSVCPRT_X64) \ + $(OLDNAMESLIB_X64) SHL1LIBS_X64+=$(SLB_X64)$/util.lib\ $(SLB_X64)$/ooofilereader.lib SHL1OBJS_X64=$(SLOFILES_X64) SHL1DEF_X64=$(MISC_X64)$/$(SHL1TARGET).def -SHL1RES_X64=$(RES_X64)$/$(TARGET)_x64.res +SHL1RES_X64=$(RES_X64)$/$(TARGET).res DEF1NAME_X64=$(SHL1TARGET_X64) DEF1EXPORTFILE_X64=exports.dxp @@ -144,3 +144,4 @@ DEF1EXPORTFILE_X64=exports.dxp .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 index 879cf8c0115b..218ba500d368 100644 --- a/shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx +++ b/shell/source/win32/shlxthandler/ooofilt/proxy/ooofiltproxy.cxx @@ -42,6 +42,7 @@ #ifdef __MINGW32__ #include <basetyps.h> #endif +#include "internal/config.hxx" /* @@ -88,7 +89,8 @@ void Init() TCHAR buff[MAX_PATH]; GetModuleFileName(hThisLibrary, buff, (sizeof(buff)/sizeof(TCHAR))); PathTruncateFileName(buff); - lstrcat(buff, TEXT("ooofilt.dll")); + + lstrcat(buff, MODULE_NAME_FILTER); hOoofilt = LoadLibraryEx(buff, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); diff --git a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx index 171bc287715f..d854694d8394 100644 --- a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx +++ b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx @@ -177,7 +177,6 @@ HRESULT STDMETHODCALLTYPE CPropertySheet::Initialize( HRESULT STDMETHODCALLTYPE CPropertySheet::AddPages(LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam) { - PROPSHEETPAGE psp; // add the summary property page @@ -309,7 +308,6 @@ BOOL CALLBACK CPropertySheet::PropPageStatisticsProc(HWND hwnd, UINT uiMsg, WPAR //################################## void CPropertySheet::InitPropPageSummary(HWND hwnd, LPPROPSHEETPAGE /*lppsp*/) { - CMetaInfoReader metaInfo(m_szFileName); SetWindowText(GetDlgItem(hwnd,IDC_TITLE), metaInfo.getTagData( META_INFO_TITLE ).c_str() ); @@ -335,7 +333,6 @@ void CPropertySheet::InitPropPageSummary(HWND hwnd, LPPROPSHEETPAGE /*lppsp*/) */ void CPropertySheet::InitPropPageStatistics(HWND hwnd, LPPROPSHEETPAGE /*lppsp*/) { - CMetaInfoReader metaInfo(m_szFileName); document_statistic_reader_ptr doc_stat_reader = create_document_statistic_reader(m_szFileName, &metaInfo); diff --git a/shell/source/win32/shlxthandler/res/makefile.mk b/shell/source/win32/shlxthandler/res/makefile.mk index 08893506b2d2..8f8c77638387 100644 --- a/shell/source/win32/shlxthandler/res/makefile.mk +++ b/shell/source/win32/shlxthandler/res/makefile.mk @@ -53,9 +53,19 @@ ULFDIR:=$(COMMONMISC)$/$(TARGET) .ELSE # "$(WITH_LANG)"!="" ULFDIR:=. .ENDIF # "$(WITH_LANG)"!="" + # --- Targets ------------------------------------------------------ +.IF "$(BUILD_X64)"!="" +$(RES)$/x64$/$(TARGET).res : $(RES)$/$(TARGET).res + -$(MKDIR) $(RES)$/x64 + @@cp $< $@ +.ENDIF # "$(BUILD_X64)"!="" + +.INCLUDE : set_wntx64.mk .INCLUDE : target.mk +.INCLUDE : tg_wntx64.mk + # Generate the native Windows resource file diff --git a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx index 35d155b6c22d..6315a719a62e 100644 --- a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx +++ b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx @@ -30,19 +30,21 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_shell.hxx" + #include "internal/global.hxx" #ifndef INFOTIPS_HXX_INCLUDED #include "internal/thumbviewer.hxx" #endif #include "internal/shlxthdl.hxx" -#include "internal/utilities.hxx" #include "internal/registry.hxx" #include "internal/fileextensions.hxx" #include "internal/config.hxx" #include "internal/zipfile.hxx" +#include "internal/utilities.hxx" #include "internal/resource.h" + #include <stdio.h> #include <utility> #include <stdlib.h> @@ -212,15 +214,15 @@ HRESULT STDMETHODCALLTYPE StreamOnZipBuffer::Read(void *pv, ULONG cb, ULONG *pcb HRESULT STDMETHODCALLTYPE StreamOnZipBuffer::Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *) { - size_t size = ref_zip_buffer_.size(); - size_t p = 0; + __int64 size = (__int64) ref_zip_buffer_.size(); + __int64 p = 0; switch (dwOrigin) { case STREAM_SEEK_SET: break; case STREAM_SEEK_CUR: - p = pos_; + p = (__int64) pos_; break; case STREAM_SEEK_END: p = size - 1; @@ -229,10 +231,11 @@ HRESULT STDMETHODCALLTYPE StreamOnZipBuffer::Seek(LARGE_INTEGER dlibMove, DWORD HRESULT hr = STG_E_INVALIDFUNCTION; - p += dlibMove.LowPart; - if (p < size) + p += dlibMove.QuadPart; + + if ( ( p >= 0 ) && (p < size) ) { - pos_ = p; + pos_ = (size_t) p; hr = S_OK; } return hr; @@ -468,6 +471,7 @@ HRESULT STDMETHODCALLTYPE CThumbviewer::Extract(HBITMAP *phBmpImage) } catch(std::exception&) { + OutputDebugStringFormat( "CThumbviewer Extract ERROR!\n" ); hr = E_FAIL; } return hr; diff --git a/shell/source/win32/shlxthandler/util/utilities.cxx b/shell/source/win32/shlxthandler/util/utilities.cxx index 36c19dd0c500..f2ae6238715a 100644 --- a/shell/source/win32/shlxthandler/util/utilities.cxx +++ b/shell/source/win32/shlxthandler/util/utilities.cxx @@ -32,12 +32,9 @@ #include "precompiled_shell.hxx" -#include "internal/utilities.hxx" #include "internal/config.hxx" #include "internal/dbgmacros.hxx" - - - +#include "internal/utilities.hxx" //----------------------------- // constants @@ -87,15 +84,9 @@ std::wstring GetResString(int ResId) { wchar_t szResStr[MAX_RES_STRING]; - #if OSL_DEBUG_LEVEL > 0 - int rc = - #endif - LoadStringW( - GetModuleHandleW(MODULE_NAME), - ResId, - szResStr, - sizeof(szResStr)); + int rc = LoadStringW( GetModuleHandleW(MODULE_NAME), ResId, szResStr, sizeof(szResStr) ); + OutputDebugStringFormat( "GetResString: read %d chars\n", rc ); ENSURE(rc, "String resource not found"); return std::wstring(szResStr); |