diff options
author | Tor Lillqvist <tlillqvist@suse.com> | 2011-09-12 15:24:46 +0300 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2011-09-12 15:30:43 +0300 |
commit | 856b8451f8c94ea118b8ca422bb2bfa9e40fe6a9 (patch) | |
tree | 3ab922e5a63a03590eb8f22007cd93f74e65735b | |
parent | 42c6acee93439e144f820a3ad7a1e68587d47b60 (diff) |
Drop Win9x code
-rw-r--r-- | setup_native/source/win32/customactions/reg4msdoc/registrationcontextinformation.cxx | 49 | ||||
-rw-r--r-- | setup_native/source/win32/customactions/reg4msdoc/registrationcontextinformation.hxx | 3 |
2 files changed, 0 insertions, 52 deletions
diff --git a/setup_native/source/win32/customactions/reg4msdoc/registrationcontextinformation.cxx b/setup_native/source/win32/customactions/reg4msdoc/registrationcontextinformation.cxx index 2f04d319dd80..e301303fade0 100644 --- a/setup_native/source/win32/customactions/reg4msdoc/registrationcontextinformation.cxx +++ b/setup_native/source/win32/customactions/reg4msdoc/registrationcontextinformation.cxx @@ -16,15 +16,8 @@ namespace /* private */ RegistrationContextInformation::RegistrationContextInformation(MSIHANDLE hMsi, const std::wstring& OpenOfficeExecutablePath) : msihandle_(hMsi), - m_IsWin9x(true), m_OOExecPath(OpenOfficeExecutablePath) { - OSVERSIONINFOA osverinfo; - ZeroMemory(&osverinfo, sizeof(osverinfo)); - osverinfo.dwOSVersionInfoSize = sizeof(osverinfo); - GetVersionExA(&osverinfo); - - m_IsWin9x = (osverinfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS); assert(m_OOExecPath.length()); ExtractOpenOfficeExecNameFromPath(); } @@ -33,8 +26,6 @@ std::wstring RegistrationContextInformation::GetWordDocumentDisplayName() const { std::wstring str; GetMsiProp(msihandle_, TEXT("STR_MS_WORD_DOCUMENT"), str); - if (m_IsWin9x && !IsConvertableToAnsi(str)) - str = TEXT("Microsoft Word Document"); return str; } @@ -69,8 +60,6 @@ std::wstring RegistrationContextInformation::GetWordTemplateDisplayName() const { std::wstring str; GetMsiProp(msihandle_, TEXT("STR_MS_WORD_TEMPLATE"), str); - if (m_IsWin9x && !IsConvertableToAnsi(str)) - str = TEXT("Microsoft Word Template"); return str; } @@ -93,8 +82,6 @@ std::wstring RegistrationContextInformation::GetRtfDocumentDisplayName() const { std::wstring str; GetMsiProp(msihandle_, TEXT("STR_RTF_DOCUMENT"), str); - if (m_IsWin9x && !IsConvertableToAnsi(str)) - str = TEXT("Rich Text Document"); return str; } @@ -117,8 +104,6 @@ std::wstring RegistrationContextInformation::GetExcelSheetDisplayName() const { std::wstring str; GetMsiProp(msihandle_, TEXT("STR_MS_EXCEL_WORKSHEET"), str); - if (m_IsWin9x && !IsConvertableToAnsi(str)) - str = TEXT("Microsoft Excel Worksheet"); return str; } @@ -153,8 +138,6 @@ std::wstring RegistrationContextInformation::GetExcelTemplateDisplayName() const { std::wstring str; GetMsiProp(msihandle_, TEXT("STR_MS_EXCEL_TEMPLATE"), str); - if (m_IsWin9x && !IsConvertableToAnsi(str)) - str = TEXT("Microsoft Excel Template"); return str; } @@ -177,8 +160,6 @@ std::wstring RegistrationContextInformation::GetPowerPointDocumentDisplayName() { std::wstring str; GetMsiProp(msihandle_, TEXT("STR_MS_POWERPOINT_PRESENTATION"), str); - if (m_IsWin9x && !IsConvertableToAnsi(str)) - str = TEXT("Microsoft PowerPoint Presentation"); return str; } @@ -213,8 +194,6 @@ std::wstring RegistrationContextInformation::GetPowerPointTemplateDisplayName() { std::wstring str; GetMsiProp(msihandle_, TEXT("STR_MS_POWERPOINT_TEMPLATE"), str); - if (m_IsWin9x && !IsConvertableToAnsi(str)) - str = TEXT("Microsoft PowerPoint Template"); return str; } @@ -237,8 +216,6 @@ std::wstring RegistrationContextInformation::GetPowerPointShowDisplayName() cons { std::wstring str; GetMsiProp(msihandle_, TEXT("STR_MS_POWERPOINT_SHOW"), str); - if (m_IsWin9x && !IsConvertableToAnsi(str)) - str = TEXT("Microsoft PowerPoint Show"); return str; } @@ -271,9 +248,6 @@ std::wstring RegistrationContextInformation::ShellNewCommandDisplayName() const if(std::wstring::npos != idx) str.replace(idx, 1, TEXT("&")); - if (m_IsWin9x && !IsConvertableToAnsi(str)) - str = TEXT("&New"); - return str; } @@ -290,9 +264,6 @@ std::wstring RegistrationContextInformation::ShellEditCommandDisplayName() const if(std::wstring::npos != idx) str.replace(idx, 1, TEXT("&")); - if (m_IsWin9x && !IsConvertableToAnsi(str)) - str = TEXT("&Edit"); - return str; } @@ -358,26 +329,6 @@ std::wstring RegistrationContextInformation::GetOpenOfficeCommandline(SHELL_COMM return cmd_line; } -bool RegistrationContextInformation::IsConvertableToAnsi(const std::wstring& String) const -{ - char buff[MAX_REGKEY_LENGTH_WIN9X]; - BOOL bUsedDefChar = 0; - - if (String.length() > 0) - { - WideCharToMultiByte( - CP_ACP, - WC_COMPOSITECHECK | WC_DEFAULTCHAR, - String.c_str(), - static_cast<int>(String.length()), - buff, - sizeof(buff), - NULL, - &bUsedDefChar); - } - return !bUsedDefChar; -} - void RegistrationContextInformation::ExtractOpenOfficeExecNameFromPath() { std::wstring::size_type idx = m_OOExecPath.find_last_of(TEXT('\\')); diff --git a/setup_native/source/win32/customactions/reg4msdoc/registrationcontextinformation.hxx b/setup_native/source/win32/customactions/reg4msdoc/registrationcontextinformation.hxx index d3297b14775c..c27b2a495a45 100644 --- a/setup_native/source/win32/customactions/reg4msdoc/registrationcontextinformation.hxx +++ b/setup_native/source/win32/customactions/reg4msdoc/registrationcontextinformation.hxx @@ -159,13 +159,10 @@ public: OFFICE_APPLICATION OfficeApp) const; private: - bool IsConvertableToAnsi(const std::wstring& String) const; - void ExtractOpenOfficeExecNameFromPath(); private: MSIHANDLE msihandle_; - bool m_IsWin9x; std::wstring m_OOExecPath; std::wstring m_OOExecName; }; |