Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
856b8451
Kaydet (Commit)
856b8451
authored
Eyl 12, 2011
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Drop Win9x code
üst
42c6acee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
52 deletions
+0
-52
registrationcontextinformation.cxx
...ustomactions/reg4msdoc/registrationcontextinformation.cxx
+0
-49
registrationcontextinformation.hxx
...ustomactions/reg4msdoc/registrationcontextinformation.hxx
+0
-3
No files found.
setup_native/source/win32/customactions/reg4msdoc/registrationcontextinformation.cxx
Dosyayı görüntüle @
856b8451
...
...
@@ -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
(
'\\'
));
...
...
setup_native/source/win32/customactions/reg4msdoc/registrationcontextinformation.hxx
Dosyayı görüntüle @
856b8451
...
...
@@ -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
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment