summaryrefslogtreecommitdiff
path: root/setup_native/source/win32/customactions/reg4msdoc/registrar.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:05:45 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:05:45 +0200
commitb6224ecfd043aad64d2224945db3fafb4f0a4064 (patch)
tree273dae3224e0c19fb05209abc612b27803a79cec /setup_native/source/win32/customactions/reg4msdoc/registrar.cxx
parent78f7536260ca5edbf32f31d12a1642cf4b3da234 (diff)
recreated tag OOO_BUILD_3_2_98_1 which had these commits:
commit 797de40c4bb63a0f72a282f14e4704993a872c02 (tag: refs/tags/OOO_BUILD_3_2_98_1) Author: Petr Mladek <pmladek@walk.suse.cz> Date: Wed Sep 15 19:03:24 2010 +0200 Release ooo-build-3.2.98.1, tag OOO_BUILD_3_2_98_1 (3.3-alpha1) commit 47bf9a3750fbccb561961a623b766b901fc3a024 Author: Tor Lillqvist <tlillqvist@novell.com> Date: Wed Sep 15 08:43:41 2010 +0200 Commit missing files in setup_native/source/win32/customactions/sellang/ .../source/win32/customactions/sellang/exports.dxp | 1 + .../source/win32/customactions/sellang/makefile.mk | 79 +++++ .../source/win32/customactions/sellang/sellang.cxx | 347 ++++++++++++++++++++ 3 files changed, 427 insertions(+), 0 deletions(-) commit 0b7ae4e620a78e2b9732f51d4f8dbcf6dff23461 Author: Cédric Bosdonnat <cedricbosdo@openoffice.org> Date: Tue Sep 14 17:21:03 2010 +0200 cjk-default-compatibility.diff: Don't expand spaces with manual breaks i#54320 cui/source/options/optgdlg.cxx | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit 0a6fc538714579edc7c613140ee60c44749c58ff Author: Kalman Szalai - KAMI <kamihir@freemail.hu> Date: Tue Sep 14 16:44:59 2010 +0200 premium-splitted-language-packages.diff: Language dependent definitions. .../source/packinfo/packinfo_office_lang.txt | 104 ++++++++++++++++++++ 1 files changed, 104 insertions(+), 0 deletions(-) commit fc04f6fdba6a3e3a1ac3457cd8c84887447a30ae Author: Kalman Szalai - KAMI <kamihir@freemail.hu> Date: Tue Sep 14 16:41:16 2010 +0200 extensions_packinfo.diff: extension integration, setup_native part. .../source/packinfo/packinfo_extensions.txt | 258 ++++++++++++++++++++ 1 files changed, 258 insertions(+), 0 deletions(-) commit 403e72fe876d9131a3759d49ba3cdff3a5b9454a Author: Cédric Bosdonnat <cedricbosdo@openoffice.org> Date: Tue Sep 14 15:33:58 2010 +0200 metric-field-limits.diff: maximum values were wrong when changing unit cui/source/tabpages/numpages.cxx | 23 ----------------------- 1 files changed, 0 insertions(+), 23 deletions(-) commit de753a15fecd0bf6b80feda4766b0d586e199b07 Author: Tor Lillqvist <tlillqvist@novell.com> Date: Tue Sep 14 14:51:52 2010 +0200 win32-multi-lang-installer.diff: Multi-language installer stuff i#66062, i#88638, i#88639 setup_native/prj/build.lst | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit cbab5dec38efe13dd50455a1a9e50caeb8a6949e Author: Thorsten Behrens <tbehrens@novell.com> Date: Tue Sep 14 13:11:23 2010 +0200 win32-vs2005-compat.diff: Fix build with Visual Studio 2005 .../source/win32/customactions/rebase/rebase.cxx | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit b41159c14ec698e01b43a545e6b93419d0206d5d Author: Amelia Wang <amwang@novell.com> Date: Mon Sep 13 14:45:00 2010 +0200 cjk-character-units-fix-376788.diff: add a new character unit i#376788 cui/source/tabpages/paragrph.cxx | 32 +++++++++++++++++++++++--------- 1 files changed, 23 insertions(+), 9 deletions(-) commit 38d7e2c79e4207d8138a1740e077bf0e83c80856 Author: Amelia Wang <amwang@novell.com> Date: Mon Sep 13 14:37:50 2010 +0200 cjk-character-units-imp.diff: add a new unit 'character unit' cui/source/tabpages/paragrph.cxx | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) commit ecd9e9d1a068915607ed0b4cc97e573839c9fe47 Merge: 5145c71 e8b8fec Author: Jan Holesovsky <kendy@suse.cz> Date: Wed Sep 8 11:34:02 2010 +0200 Merge commit 'ooo/OOO330_m7' commit 5145c719bf38b11435c5562b1ef336ecb59b64ae Merge: b14bcef b221612 Author: Jan Holesovsky <kendy@suse.cz> Date: Tue Sep 7 09:33:01 2010 +0200 Merge commit 'ooo/OOO330_m6' commit e8b8fec48b3ad2464b6ce6744e419190efeb45b3 (tag: refs/tags/ooo/OOO330_m7) Merge: b221612 86d169e Author: Kurt Zenker <kz@openoffice.org> Date: Fri Sep 3 14:31:58 2010 +0200 CWS-TOOLING: integrate CWS fwk155 commit 86d169e89f39d3ddb7bac7f50d2adb1bb7e7d087 Author: Mikhail Voytenko <mav@openoffice.org> Date: Tue Aug 31 09:17:25 2010 +0200 fwk155: #i107615# integrate the patch from CD cui/source/customize/cfg.cxx | 27 +++++++++++++++++---------- 1 files changed, 17 insertions(+), 10 deletions(-) commit b221612dc355d7c219819db42207437eb4fe5fe5 (tag: refs/tags/ooo/OOO330_m6) Merge: 4f48476 622fdb6 Author: Ivo Hinkelmann <ihi@openoffice.org> Date: Thu Aug 26 13:20:55 2010 +0200 CWS-TOOLING: integrate CWS ooo33gsl07 commit 4f48476894efff2739e6e25b7b2633d41904a252 Merge: 5f4ef9b 09e35e8 Author: Ivo Hinkelmann <ihi@openoffice.org> Date: Wed Aug 25 14:19:19 2010 +0200 CWS-TOOLING: integrate CWS sw33bf08 commit 5f4ef9be8671cf2940b83ea83d6ad5315126bd83 Merge: ae0c345 4fd95ed Author: Ivo Hinkelmann <ihi@openoffice.org> Date: Wed Aug 25 12:49:35 2010 +0200 CWS-TOOLING: integrate CWS mib18 commit 622fdb67821d299bd8314cd9196e85c5d3d2ce84 Author: Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> Date: Tue Aug 24 11:00:05 2010 +0200 ooo33gsl07: #i114002# add missing license headers extensions/source/plugin/unx/npnapi.cxx | 31 +++++++++++++++++++++++++------ extensions/source/plugin/unx/nppapi.cxx | 31 +++++++++++++++++++++++++------ 2 files changed, 50 insertions(+), 12 deletions(-) commit 09e35e845fc8941c56e54597ce679b258b97ba1c Author: Thomas Lange [tl] <tl@openoffice.org> Date: Wed Aug 18 13:53:28 2010 +0200 cws sw33bf08: #i113867# removing en-US dictionaries from Ukrainian language pack .../source/packinfo/spellchecker_selection.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 825fb51589a6f29bedae00ee817edfc958597abc Author: Thomas Lange [tl] <tl@openoffice.org> Date: Wed Aug 18 13:50:02 2010 +0200 cws sw33bf08: #i113867# removing en-US dictionaries from Ukrainian language pack .../source/packinfo/spellchecker_selection.txt | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit ae0c34553de6ecabbc6420979a99829c11e472fa (tag: refs/tags/ooo/OOO330_m5) Merge: 19c39d8 d5b054d Author: Kurt Zenker <kz@openoffice.org> Date: Wed Aug 18 13:32:26 2010 +0200 CWS-TOOLING: integrate CWS native324 commit 19c39d8ca1d55ac1cd3349a319669ffd0bee7f18 Merge: ad50c65 e56c03d Author: Kurt Zenker <kz@openoffice.org> Date: Wed Aug 18 12:00:05 2010 +0200 CWS-TOOLING: integrate CWS jl154 commit d5b054dc43970313df80e253c78a424841a4eed4 Author: Ingo Schmidt <is@openoffice.org> Date: Mon Aug 16 12:53:36 2010 +0200 native324 #i113835# preparing rpm installation on debian systems .../openoffice/setup/Installer/LinuxInstaller.java | 130 +++++++++++--------- 1 files changed, 72 insertions(+), 58 deletions(-) commit 4fd95ed4edd92cff6667f6d237b9430d52ee5265 Merge: 329c134 ad50c65 Author: Daniel Rentz <dr@openoffice.org> Date: Fri Aug 13 11:29:46 2010 +0200 mib18: rebase to OOO330m4 commit 9edf45e4490cbf5965cba1b7b80b5c20fab0f5bb Author: Ingo Schmidt <is@openoffice.org> Date: Fri Aug 13 11:15:11 2010 +0200 native324 #i113835# preparing rpm installation on debian systems .../org/openoffice/setup/InstallData.java | 18 ++ .../openoffice/setup/Installer/LinuxInstaller.java | 182 +++++++++++++------- .../setup/InstallerHelper/LinuxHelper.java | 21 +++ setup_native/scripts/install_linux.sh | 16 ++- 4 files changed, 172 insertions(+), 65 deletions(-) commit e56c03da11bea148347bc37cd317af862f083d32 Merge: 64623c6 bd8d6fa Author: Joerg Skottke [jsk] <jsk@openoffice.org> Date: Fri Aug 13 07:28:35 2010 +0200 jl154: Local merge commit bd8d6faa1fdb424a68e50b4ce0dd3f2f72796e78 Merge: 92cc5ae 64623c6 Author: Joerg Skottke [jsk] <jsk@openoffice.org> Date: Wed Aug 11 08:57:13 2010 +0200 jl154: Local merge commit 329c134bc2d01d41a2ab41cbe5a856b764dcf409 Author: Andreas Bregas <ab@openoffice.org> Date: Fri Aug 6 09:35:51 2010 +0200 mib18: #163121# Declare Rework basctl/source/basicide/baside2.cxx | 2 +- basctl/source/basicide/basobj2.cxx | 18 ++++++++++++++---- basctl/source/basicide/macrodlg.cxx | 16 ++++++++++------ 3 files changed, 25 insertions(+), 11 deletions(-) commit 64623c655d414eac4c0e2b266bee913a5456043a Merge: 28d217b c42035a Author: Joachim Lingner <jl@openoffice.org> Date: Mon Aug 2 15:39:29 2010 +0200 jl154 merging with OOO330m2 commit 28d217bc56c559e2439d39fdaa406380f32c9412 Author: Joachim Lingner <jl@openoffice.org> Date: Thu Jul 29 16:18:26 2010 +0200 jl154 #i162868# Copying from prereg/bundled to user/extensions/bundled failed because of file access right of temporary files in the registry data. The scripts run now chmod after unopkg sync .../source/packinfo/shellscripts_extensions.txt | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) commit 6512191685b0f43b0938b44ee95b063de7463387 Author: Ingo Schmidt <is@openoffice.org> Date: Fri Jul 23 18:25:10 2010 +0200 jl154 #162868# solaris postinstall script .../source/packinfo/shellscripts_extensions.txt | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 859ab84fcc0707bd6c895517325f1985e9d91d8c Author: Ingo Schmidt <is@openoffice.org> Date: Fri Jul 23 10:37:24 2010 +0200 jl154 #162868# bundled folder in prereg folder setup_native/scripts/admin.pl | 2 +- .../source/packinfo/shellscripts_extensions.txt | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) commit ee943cf4436ff8adbd9440211c39a5c27768369a Author: Ingo Schmidt <is@openoffice.org> Date: Thu Jul 22 17:43:35 2010 +0200 jl154 #162868# unopkg in shell script with several quotes setup_native/scripts/admin.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 6ef1482d39a33925b245d245fe6127b4744d0dfd Author: Ingo Schmidt <is@openoffice.org> Date: Thu Jul 22 17:26:25 2010 +0200 jl154 #162868# unopkg in shell script with several quotes .../source/packinfo/shellscripts_extensions.txt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit afd1eb5b6c81f59342bd8ee7a1b96429289d98dc Merge: a1e6245 e234443 Author: Joerg Skottke [jsk] <jsk@openoffice.org> Date: Thu Jul 22 10:44:04 2010 +0200 jl154: Local branch merge commit e234443c641e4bc2f5d89b031bbb30f2d560cb95 Author: Joachim Lingner <jl@openoffice.org> Date: Wed Jul 21 14:15:34 2010 +0200 jl154 #i162868# changed RemoveExtensions custom action (windows) to delete brand/share/prereg/bundled .../shellextensions/registerextensions.cxx | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 62729bf5d94eb74bb1ff410cc543d8ffcf4f4bdc Author: Joachim Lingner <jl@openoffice.org> Date: Wed Jul 21 13:29:14 2010 +0200 jl154 #i162868# unopkg sync removes share/prereg/bundled, changing registerExtensions .../shellextensions/registerextensions.cxx | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c803ad8da4a88de0689afee5728f0407ff7d791f Author: Ingo Schmidt <is@openoffice.org> Date: Wed Jul 21 12:04:31 2010 +0200 jl154 #162868# new share/prereg folder setup_native/scripts/admin.pl | 30 +++++++++---------- .../source/packinfo/shellscripts_extensions.txt | 16 +++++----- 2 files changed, 22 insertions(+), 24 deletions(-) commit a1e6245b5e0a359f1f7e707a263ed1e45dd82067 Merge: 3a7ba2a ffa0e25 Author: Joerg Skottke [jsk] <jsk@openoffice.org> Date: Mon Jul 19 14:42:46 2010 +0200 jl154: Local merge commit ffa0e25150cabfc67705e3fc10cc02952b325966 Author: Ingo Schmidt <is@openoffice.org> Date: Mon Jul 19 14:23:27 2010 +0200 jl154 #162868# guarantee existence of extensions folder setup_native/source/packinfo/package.txt | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 3a7ba2ab93b4ec058d92064e7657497d9cbd4794 Merge: 8246234 f6b4bfd Author: Joachim Lingner <jl@openoffice.org> Date: Fri Jul 16 15:45:18 2010 +0200 jl154 merging with OOO300_m1 commit 8246234a96c80f2dcb29126cf8f9e96597aa3e16 Author: Joachim Lingner <jl@openoffice.org> Date: Fri Jul 16 11:52:44 2010 +0200 jl154 #162868# removing the package.txt from the extensions folder. Extensions folder will be created in a different way than installing a dummy file setup_native/source/packinfo/package.txt | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit b8e2cf46d6a073c7fbcd51494a92d6da33181622 Author: Joachim Lingner <jl@openoffice.org> Date: Thu Jul 15 17:22:01 2010 +0200 jl154 #162868# remove basis/presets/bundled/bundled.ini, and create always share/extensions folder setup_native/source/packinfo/package.txt | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 757f1ada9215c698c650eba559e05a70322848b7 Author: Joachim Lingner <jl@openoffice.org> Date: Thu Jul 15 16:28:33 2010 +0200 jl154 #162868# remove basis/presets/bundled/bundled.ini, and create always share/extensions folder setup_native/scripts/admin.pl | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-) commit 0809a24f900b5cf43a70d1f3ab11c681e1906692 Author: Joachim Lingner <jl@openoffice.org> Date: Wed Jul 14 15:17:57 2010 +0200 jl154 #162868# removing registration data folder if the last extension was removed .../shellextensions/registerextensions.cxx | 56 ++++++++++---------- 1 files changed, 28 insertions(+), 28 deletions(-) commit f4230d177ad95e04566dc95859491308b606fdc1 Author: Ingo Schmidt <is@openoffice.org> Date: Wed Jul 14 11:10:14 2010 +0200 jl154 #162868# unopkg is back in packaging and installation .../customactions/shellextensions/exports.dxp | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 5e9dc05754c042aae338c22f91e35d6d19780be7 Author: Joachim Lingner <jl@openoffice.org> Date: Wed Jul 14 09:23:58 2010 +0200 jl154 #162868# windows custom action for running unopkg sync .../win32/customactions/languagepacks/exports.dxp | 3 +- .../source/win32/customactions/patch/exports.dxp | 2 + .../source/win32/customactions/patch/makefile.mk | 1 + .../shellextensions/registerextensions.cxx | 200 +++----------------- 4 files changed, 31 insertions(+), 175 deletions(-) commit f423a7a32a7f0c9dc4740d21b3bfda2504eccd56 Author: Ingo Schmidt <is@openoffice.org> Date: Tue Jul 13 18:57:19 2010 +0200 jl154 #162868# unopkg is back in packaging and installation setup_native/scripts/admin.pl | 7 + setup_native/source/packinfo/packinfo_office.txt | 33 +++++ .../source/packinfo/shellscripts_extensions.txt | 129 +++----------------- 3 files changed, 56 insertions(+), 113 deletions(-) commit 698b3cb962af8618f3e884ccdf9b9edf1df3b97f Author: Ingo Schmidt <is@openoffice.org> Date: Mon Jul 12 18:24:42 2010 +0200 jl154 #162868# unopkg is back in packaging and installation .../win32/customactions/languagepacks/exports.dxp | 3 +++ .../win32/customactions/languagepacks/makefile.mk | 1 + .../customactions/shellextensions/exports.dxp | 3 +++ .../customactions/shellextensions/makefile.mk | 1 + 4 files changed, 8 insertions(+), 0 deletions(-) commit 929f5169397c101ec9fff3fb535376df3de09e2e Author: Ingo Schmidt <is@openoffice.org> Date: Mon Jul 12 18:02:39 2010 +0200 jl154 #162868# unopkg is back in packaging and installation setup_native/scripts/admin.pl | 120 ++++++++++++++++++++++++++++++----------- 1 files changed, 88 insertions(+), 32 deletions(-) commit b5c165ca38d0f3c8417540a6f185462eb11904f6 Author: Ingo Schmidt <is@openoffice.org> Date: Mon Jul 12 16:20:39 2010 +0200 jl154 #162868# unopkg is back in packaging and installation setup_native/scripts/admin.pl | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) commit a5c95fbe4b239c7be2ba0569922bab29d0c21ad3 Merge: 1fad720 c04b382 Author: Joachim Lingner <jl@openoffice.org> Date: Wed Jun 30 17:12:59 2010 +0200 jl154 merge with DEV300_m84
Notes
split repo tag: components_OOO_BUILD_3_2_98_1
Diffstat (limited to 'setup_native/source/win32/customactions/reg4msdoc/registrar.cxx')
-rw-r--r--setup_native/source/win32/customactions/reg4msdoc/registrar.cxx234
1 files changed, 117 insertions, 117 deletions
diff --git a/setup_native/source/win32/customactions/reg4msdoc/registrar.cxx b/setup_native/source/win32/customactions/reg4msdoc/registrar.cxx
index 7919d0fe833d..94be3240c0c8 100644
--- a/setup_native/source/win32/customactions/reg4msdoc/registrar.cxx
+++ b/setup_native/source/win32/customactions/reg4msdoc/registrar.cxx
@@ -36,9 +36,9 @@ static inline void OutputDebugStringFormat( LPCTSTR, ... )
const int MSWORD = 0x1;
const int MSEXCEL = 0x2;
-const int MSPOWERPOINT = 0x4;
-const int DEFAULT_HTML_EDITOR_FOR_IE = 0x8;
-const int HTML_EDITOR = 0x10;
+const int MSPOWERPOINT = 0x4;
+const int DEFAULT_HTML_EDITOR_FOR_IE = 0x8;
+const int HTML_EDITOR = 0x10;
const int DEFAULT_SHELL_HTML_EDITOR = 0x20;
namespace /* private */
@@ -54,7 +54,7 @@ namespace /* private */
const std::wstring MS_IE_DEF_HTML_EDITOR_SHL_EDIT_CMD = L"Software\\Microsoft\\Internet Explorer\\Default HTML Editor\\shell\\edit\\command";
}
-Registrar::Registrar(const RegistrationContextInformation& RegContext) :
+Registrar::Registrar(const RegistrationContextInformation& RegContext) :
m_ContextInformation(RegContext),
FORWARD_KEY_PREFIX(L"OpenOffice.org"),//FORWARD_KEY_PREFIX(L"soffice6"),
DEFAULT_VALUE_NAME(L""),
@@ -70,9 +70,9 @@ Registrar::~Registrar()
}
void Registrar::RegisterForMsWord() const
-{
+{
assert(m_RootKey.get());
-
+
RegisterForMsOfficeApplication(
m_ContextInformation.GetWordDocumentFileExtension(),
m_ContextInformation.GetWordDocumentDisplayName(),
@@ -80,15 +80,15 @@ void Registrar::RegisterForMsWord() const
m_ContextInformation.GetWordDocumentDefaultShellCommand(),
m_ContextInformation.ShellNewCommandDisplayName(),
RegistrationContextInformation::Writer);
-
+
RegisterForMsOfficeApplication(
m_ContextInformation.GetWordTemplateFileExtension(),
m_ContextInformation.GetWordTemplateDisplayName(),
m_ContextInformation.GetWordTemplateDefaultIconEntry(),
m_ContextInformation.GetWordTemplateDefaultShellCommand(),
m_ContextInformation.ShellNewCommandDisplayName(),
- RegistrationContextInformation::Writer);
-
+ RegistrationContextInformation::Writer);
+
RegisterForMsOfficeApplication(
m_ContextInformation.GetRtfDocumentFileExtension(),
m_ContextInformation.GetRtfDocumentDisplayName(),
@@ -96,7 +96,7 @@ void Registrar::RegisterForMsWord() const
m_ContextInformation.GetRtfDocumentDefaultShellCommand(),
m_ContextInformation.ShellNewCommandDisplayName(),
RegistrationContextInformation::Writer);
-
+
SaveRegisteredFor(MSWORD);
}
@@ -115,7 +115,7 @@ void Registrar::UnregisterForMsWord() const
try
{
UnregisterForMsOfficeApplication(
- m_ContextInformation.GetWordTemplateFileExtension());
+ m_ContextInformation.GetWordTemplateFileExtension());
}
catch(RegistryKeyNotFoundException&)
{}
@@ -139,7 +139,7 @@ bool Registrar::QueryPreselectForMsApplication(const std::wstring& file_extensio
// MS Office applications already exist if we are about to
// register in HKCU\Software\Classes
RegistryKey root_key = WindowsRegistry().GetClassesRootKey();
-
+
if (!root_key->HasSubKey(file_extension))
{
preselect = true;
@@ -148,7 +148,7 @@ bool Registrar::QueryPreselectForMsApplication(const std::wstring& file_extensio
else
{
RegistryKey RegKey = root_key->OpenSubKey(file_extension, false);
-
+
if (RegKey->HasValue(DEFAULT_VALUE_NAME))
{
RegistryValue RegVal = RegKey->GetValue(DEFAULT_VALUE_NAME);
@@ -170,12 +170,12 @@ bool Registrar::QueryPreselectForMsApplication(const std::wstring& file_extensio
preselect = true;
OutputDebugStringFormat( TEXT("QueryPreselect: No default found for SubKey (%s), preselected!\n"), file_extension.c_str() );
}
- }
+ }
return preselect;
}
bool Registrar::QueryPreselectMsWordRegistration() const
-{
+{
return QueryPreselectForMsApplication(
m_ContextInformation.GetWordDocumentFileExtension());
}
@@ -183,7 +183,7 @@ bool Registrar::QueryPreselectMsWordRegistration() const
void Registrar::RegisterForMsExcel() const
{
assert(m_RootKey.get());
-
+
RegisterForMsOfficeApplication(
m_ContextInformation.GetExcelSheetFileExtension(),
m_ContextInformation.GetExcelSheetDisplayName(),
@@ -199,14 +199,14 @@ void Registrar::RegisterForMsExcel() const
m_ContextInformation.GetExcelTemplateDefaultShellCommand(),
m_ContextInformation.ShellNewCommandDisplayName(),
RegistrationContextInformation::Calc);
-
+
SaveRegisteredFor(MSEXCEL);
}
void Registrar::UnregisterForMsExcel() const
{
assert(m_RootKey.get());
-
+
try
{
UnregisterForMsOfficeApplication(
@@ -235,7 +235,7 @@ bool Registrar::QueryPreselectMsExcelRegistration() const
void Registrar::RegisterForMsPowerPoint() const
{
assert(m_RootKey.get());
-
+
RegisterForMsOfficeApplication(
m_ContextInformation.GetPowerPointDocumentFileExtension(),
m_ContextInformation.GetPowerPointDocumentDisplayName(),
@@ -243,7 +243,7 @@ void Registrar::RegisterForMsPowerPoint() const
m_ContextInformation.GetPowerPointDocumentDefaultShellCommand(),
m_ContextInformation.ShellNewCommandDisplayName(),
RegistrationContextInformation::Impress);
-
+
RegisterForMsOfficeApplication(
m_ContextInformation.GetPowerPointShowFileExtension(),
m_ContextInformation.GetPowerPointShowDisplayName(),
@@ -251,22 +251,22 @@ void Registrar::RegisterForMsPowerPoint() const
m_ContextInformation.GetPowerPointShowDefaultShellCommand(),
m_ContextInformation.ShellNewCommandDisplayName(),
RegistrationContextInformation::Impress);
-
+
RegisterForMsOfficeApplication(
m_ContextInformation.GetPowerPointTemplateFileExtension(),
m_ContextInformation.GetPowerPointTemplateDisplayName(),
m_ContextInformation.GetPowerPointTemplateDefaultIconEntry(),
m_ContextInformation.GetPowerPointTemplateDefaultShellCommand(),
m_ContextInformation.ShellNewCommandDisplayName(),
- RegistrationContextInformation::Impress);
-
+ RegistrationContextInformation::Impress);
+
SaveRegisteredFor(MSPOWERPOINT);
}
void Registrar::UnregisterForMsPowerPoint() const
{
assert(m_RootKey.get());
-
+
try
{
UnregisterForMsOfficeApplication(
@@ -308,46 +308,46 @@ bool Registrar::QueryPreselectMsPowerPointRegistration() const
make the following entries to register
a html editor for the Internet Explorer
HKCR\.htm\OpenWithList\App Friendly Name\shell\edit\command
- But the reality shows that this works only
- with Internet Explorer 5.x
- Internet Explorer 6.0 wants the follwoing
+ But the reality shows that this works only
+ with Internet Explorer 5.x
+ Internet Explorer 6.0 wants the follwoing
entries:
HKCR\.htm\OpenWithList\App.exe
- HKCR\Applications\App.ex\shell\edit\command
+ HKCR\Applications\App.ex\shell\edit\command
*/
void Registrar::RegisterAsHtmlEditorForInternetExplorer() const
{
assert(m_RootKey.get());
-
+
std::wstring OOFriendlyAppName = m_ContextInformation.GetOpenOfficeFriendlyAppName();
-
+
std::wstring RegKeyName = HTM_OPENWITHLIST + std::wstring(L"\\") + OOFriendlyAppName;
RegistryKey RegKey = m_RootKey->CreateSubKey(RegKeyName);
-
+
RegKey = RegKey->CreateSubKey(SHELL_EDIT_COMMAND);
-
+
RegistryValue RegVal(
new RegistryValueImpl(
- DEFAULT_VALUE_NAME,
+ DEFAULT_VALUE_NAME,
m_ContextInformation.GetOpenOfficeCommandline(RegistrationContextInformation::Open,
RegistrationContextInformation::Writer)));
-
+
RegKey->SetValue(RegVal);
-
+
RegKeyName = APPLICATIONS + std::wstring(L"\\") + OOFriendlyAppName;
RegKey = m_RootKey->CreateSubKey(RegKeyName);
-
+
RegVal->SetName(L"FriendlyAppName");
RegVal->SetValue(OOFriendlyAppName);
RegKey->SetValue(RegVal);
-
+
RegKey = RegKey->CreateSubKey(SHELL_EDIT_COMMAND);
RegVal->SetName(DEFAULT_VALUE_NAME);
RegVal->SetValue(
m_ContextInformation.GetOpenOfficeCommandline(RegistrationContextInformation::Open,
- RegistrationContextInformation::Writer));
+ RegistrationContextInformation::Writer));
RegKey->SetValue(RegVal);
-
+
SaveRegisteredFor(HTML_EDITOR);
}
@@ -376,75 +376,75 @@ void Registrar::UnregisterAsHtmlEditorForInternetExplorer() const
void Registrar::RegisterAsDefaultHtmlEditorForInternetExplorer() const
{
assert(m_RootKey.get());
-
+
RegistryKey RegistrationRootKey = GetRootKeyForDefHtmlEditorForIERegistration();
-
+
RegistryKey RegKey = RegistrationRootKey->CreateSubKey(MS_IE_DEF_HTML_EDITOR_SHL_EDIT_CMD);
-
+
RegistryValue RegVal = RegistryValue(new RegistryValueImpl(DEFAULT_VALUE_NAME, L""));
-
+
if (RegKey->HasValue(DEFAULT_VALUE_NAME))
{
RegVal = RegKey->GetValue(DEFAULT_VALUE_NAME);
-
+
std::wstring CmdLine = RegVal->GetDataAsUniString();
-
+
if (std::wstring::npos == CmdLine.find(m_ContextInformation.GetOpenOfficeExecutableName()))
- {
+ {
RegistryKey BackupRegKey = m_RootKey->CreateSubKey(PRIVATE_BACKUP_KEY_NAME + L"\\" + DEFAULT_HTML_EDITOR);
-
+
if (RegKey->HasValue(DEFAULT_VALUE_NAME))
- BackupRegKey->CopyValue(RegKey, DEFAULT_VALUE_NAME);
-
+ BackupRegKey->CopyValue(RegKey, DEFAULT_VALUE_NAME);
+
RegKey = RegistrationRootKey->OpenSubKey(MS_IE_DEF_HTML_EDITOR);
if (RegKey->HasValue(L"Description"))
BackupRegKey->CopyValue(RegKey, L"Description");
}
}
-
+
RegVal->SetValue(
m_ContextInformation.GetOpenOfficeCommandline(RegistrationContextInformation::Open,
RegistrationContextInformation::Writer));
RegKey = RegistrationRootKey->OpenSubKey(MS_IE_DEF_HTML_EDITOR_SHL_EDIT_CMD);
RegKey->SetValue(RegVal);
-
+
RegVal->SetName(L"Description");
RegVal->SetValue(m_ContextInformation.GetOpenOfficeFriendlyAppName());
RegKey = RegistrationRootKey->OpenSubKey(MS_IE_DEF_HTML_EDITOR);
RegKey->SetValue(RegVal);
-
+
SaveRegisteredFor(DEFAULT_HTML_EDITOR_FOR_IE);
}
void Registrar::UnregisterAsDefaultHtmlEditorForInternetExplorer() const
{
assert(m_RootKey.get());
-
+
RegistryKey RegistrationRootKey = GetRootKeyForDefHtmlEditorForIERegistration();
-
+
RegistryKey RegKey = RegistrationRootKey->OpenSubKey(MS_IE_DEF_HTML_EDITOR_SHL_EDIT_CMD);
-
+
if (RegKey->HasValue(DEFAULT_VALUE_NAME))
{
RegistryValue RegVal = RegKey->GetValue(DEFAULT_VALUE_NAME);
-
+
std::wstring CmdLine = RegVal->GetDataAsUniString();
-
+
if (std::wstring::npos != CmdLine.find(m_ContextInformation.GetOpenOfficeExecutableName()))
- {
+ {
RegistryKey BackupRegKey = m_RootKey->OpenSubKey(PRIVATE_BACKUP_KEY_NAME);
-
+
if (BackupRegKey->HasSubKey(DEFAULT_HTML_EDITOR))
{
BackupRegKey = BackupRegKey->OpenSubKey(DEFAULT_HTML_EDITOR);
-
+
if (BackupRegKey->HasValue(DEFAULT_VALUE_NAME))
RegKey->CopyValue(BackupRegKey, DEFAULT_VALUE_NAME);
else
RegKey->DeleteValue(DEFAULT_VALUE_NAME);
- RegKey = RegistrationRootKey->OpenSubKey(MS_IE_DEF_HTML_EDITOR);
-
+ RegKey = RegistrationRootKey->OpenSubKey(MS_IE_DEF_HTML_EDITOR);
+
if (BackupRegKey->HasValue(L"Description"))
RegKey->CopyValue(BackupRegKey, L"Description");
else
@@ -452,91 +452,91 @@ void Registrar::UnregisterAsDefaultHtmlEditorForInternetExplorer() const
}
else
{
- RegKey->DeleteValue(DEFAULT_VALUE_NAME);
+ RegKey->DeleteValue(DEFAULT_VALUE_NAME);
RegKey = RegistrationRootKey->OpenSubKey(MS_IE_DEF_HTML_EDITOR);
RegKey->DeleteValue(L"Description");
- }
+ }
}
}
-
+
SaveNotRegisteredFor(DEFAULT_HTML_EDITOR_FOR_IE);
}
void Registrar::RegisterAsDefaultShellHtmlEditor() const
{
assert(m_RootKey.get());
-
+
RegistryKey RegKey = m_RootKey->CreateSubKey(L".htm");
-
+
RegistryValue RegVal = RegistryValue(
new RegistryValueImpl(DEFAULT_VALUE_NAME, L""));
-
+
if (RegKey->HasValue(DEFAULT_VALUE_NAME))
RegVal = RegKey->GetValue(DEFAULT_VALUE_NAME);
-
- std::wstring HtmFwdKey = RegVal->GetDataAsUniString();
+
+ std::wstring HtmFwdKey = RegVal->GetDataAsUniString();
if (0 == HtmFwdKey.length() || !m_RootKey->HasSubKey(HtmFwdKey))
HtmFwdKey = L".htm";
-
+
RegKey = m_RootKey->CreateSubKey(HtmFwdKey + L"\\" + SHELL_EDIT_COMMAND);
-
+
if (RegKey->HasValue(DEFAULT_VALUE_NAME))
{
RegVal = RegKey->GetValue(DEFAULT_VALUE_NAME);
-
+
std::wstring CmdLine = RegVal->GetDataAsUniString();
-
+
// backup old values if we are not in place
if (std::wstring::npos == CmdLine.find(m_ContextInformation.GetOpenOfficeExecutableName()))
- {
+ {
RegistryKey BackupRegKey = m_RootKey->CreateSubKey(PRIVATE_BACKUP_KEY_NAME + L"\\" + HTML_EDIT);
BackupRegKey->CopyValue(RegKey, DEFAULT_VALUE_NAME, SHELL_EDIT_COMMAND_BACKUP);
- }
+ }
}
-
+
RegVal->SetValue(
m_ContextInformation.GetOpenOfficeCommandline(RegistrationContextInformation::Open,
RegistrationContextInformation::Writer));
-
+
RegKey->SetValue(RegVal);
-
+
SaveRegisteredFor(DEFAULT_SHELL_HTML_EDITOR);
}
void Registrar::UnregisterAsDefaultShellHtmlEditor() const
{
assert(m_RootKey.get());
-
+
try
{
RegistryKey RegKey = m_RootKey->OpenSubKey(L".htm");
-
+
RegistryValue RegVal = RegistryValue(
new RegistryValueImpl(DEFAULT_VALUE_NAME, L""));
-
+
if (RegKey->HasValue(DEFAULT_VALUE_NAME))
RegVal = RegKey->GetValue(DEFAULT_VALUE_NAME);
-
+
std::wstring HtmFwdKey = RegVal->GetDataAsUniString();
-
+
if (0 == HtmFwdKey.length() || !m_RootKey->HasSubKey(HtmFwdKey))
HtmFwdKey = L".htm";
-
+
RegKey = m_RootKey->OpenSubKey(HtmFwdKey + L"\\" + SHELL_EDIT_COMMAND);
-
+
RegVal = RegKey->GetValue(DEFAULT_VALUE_NAME);
-
+
std::wstring CmdLine = RegVal->GetDataAsUniString();
-
+
if (std::wstring::npos != CmdLine.find(m_ContextInformation.GetOpenOfficeExecutableName()))
- {
+ {
RegistryKey BackupRegKey = m_RootKey->CreateSubKey(PRIVATE_BACKUP_KEY_NAME + L"\\" + HTML_EDIT);
-
+
if (BackupRegKey->HasValue(SHELL_EDIT_COMMAND_BACKUP))
RegKey->CopyValue(BackupRegKey, SHELL_EDIT_COMMAND_BACKUP, DEFAULT_VALUE_NAME);
else
RegKey->DeleteValue(DEFAULT_VALUE_NAME);
- }
+ }
}
catch(RegistryKeyNotFoundException&)
{
@@ -548,7 +548,7 @@ void Registrar::UnregisterAsDefaultShellHtmlEditor() const
void Registrar::SaveRegisteredFor(int State) const
{
assert(m_RootKey.get());
-
+
int NewState = GetRegisterState();
NewState |= State;
SetRegisterState(NewState);
@@ -557,7 +557,7 @@ void Registrar::SaveRegisteredFor(int State) const
void Registrar::SaveNotRegisteredFor(int State) const
{
assert(m_RootKey.get());
-
+
int NewState = GetRegisterState();
NewState &= ~State;
SetRegisterState(NewState);
@@ -566,16 +566,16 @@ void Registrar::SaveNotRegisteredFor(int State) const
int Registrar::GetRegisterState() const
{
int State = 0;
-
+
RegistryKey RegKey = m_RootKey->CreateSubKey(PRIVATE_BACKUP_KEY_NAME);
-
+
if (RegKey->HasValue(REGISTRATION_STATE))
{
RegistryValue RegVal = RegKey->GetValue(REGISTRATION_STATE);
if (REG_DWORD == RegVal->GetType())
State = RegVal->GetDataAsInt();
}
-
+
return State;
}
@@ -585,22 +585,22 @@ void Registrar::SetRegisterState(int NewState) const
RegistryValue RegVal = RegistryValue(new RegistryValueImpl(REGISTRATION_STATE, NewState));
RegKey->SetValue(RegVal);
}
-
+
bool Registrar::IsRegisteredFor(int State) const
{
assert(m_RootKey.get());
-
+
RegistryKey RegKey = m_RootKey->CreateSubKey(PRIVATE_BACKUP_KEY_NAME);
-
+
int SavedState = 0;
-
+
if (RegKey->HasValue(REGISTRATION_STATE))
{
RegistryValue RegVal = RegKey->GetValue(REGISTRATION_STATE);
if (REG_DWORD == RegVal->GetType())
- SavedState = RegVal->GetDataAsInt();
+ SavedState = RegVal->GetDataAsInt();
}
-
+
return ((SavedState & State) == State);
}
@@ -632,7 +632,7 @@ void Registrar::RepairRegistrationState() const
/** Unregisters all and delete all Registry keys we have written */
void Registrar::UnregisterAllAndCleanUpRegistry() const
-{
+{
assert(m_RootKey.get());
if (IsRegisteredFor(MSWORD))
@@ -652,7 +652,7 @@ void Registrar::UnregisterAllAndCleanUpRegistry() const
if (IsRegisteredFor(DEFAULT_SHELL_HTML_EDITOR))
UnregisterAsDefaultShellHtmlEditor();
-
+
if (m_RootKey->HasSubKey(PRIVATE_BACKUP_KEY_NAME))
m_RootKey->DeleteSubKeyTree(PRIVATE_BACKUP_KEY_NAME);
}
@@ -666,7 +666,7 @@ void Registrar::RegisterForMsOfficeApplication(
const RegistrationContextInformation::OFFICE_APPLICATION eOfficeApp) const
{
assert(m_RootKey.get());
-
+
std::wstring ForwardKeyName = FORWARD_KEY_PREFIX + FileExtension;
RegistryKey ForwardKey = m_RootKey->CreateSubKey(ForwardKeyName);
@@ -703,39 +703,39 @@ void Registrar::RegisterForMsOfficeApplication(
// set the new forward key under the appropriate extension
RegKey = m_RootKey->CreateSubKey(FileExtension);
-
+
if (RegKey->HasValue(DEFAULT_VALUE_NAME))
{
RegVal = RegKey->GetValue(DEFAULT_VALUE_NAME);
-
+
if (REG_SZ == RegVal->GetType())
{
std::wstring str = RegVal->GetDataAsUniString();
- if (!IsOpenOfficeRegisteredForMsApplication(str))
+ if (!IsOpenOfficeRegisteredForMsApplication(str))
ForwardKey->CopyValue(RegKey, DEFAULT_VALUE_NAME, BACKUP_VALUE_NAME);
}
}
-
+
RegVal->SetValue(ForwardKeyName);
- RegKey->SetValue(RegVal);
+ RegKey->SetValue(RegVal);
}
void Registrar::UnregisterForMsOfficeApplication(const std::wstring& FileExtension) const
{
std::wstring FwdRegKeyName = FORWARD_KEY_PREFIX + FileExtension;
-
+
if (m_RootKey->HasSubKey(FileExtension))
{
RegistryKey RegKey = m_RootKey->OpenSubKey(FileExtension);
-
+
if (RegKey->HasValue(DEFAULT_VALUE_NAME))
{
RegistryValue RegVal = RegKey->GetValue(DEFAULT_VALUE_NAME);
- if (REG_SZ == RegVal->GetType() &&
+ if (REG_SZ == RegVal->GetType() &&
IsOpenOfficeRegisteredForMsApplication(RegVal->GetDataAsUniString()))
- {
+ {
RegistryKey FwdRegKey = m_RootKey->CreateSubKey(FwdRegKeyName);
-
+
if (FwdRegKey->HasValue(BACKUP_VALUE_NAME))
RegKey->CopyValue(FwdRegKey, BACKUP_VALUE_NAME, DEFAULT_VALUE_NAME);
else
@@ -743,11 +743,11 @@ void Registrar::UnregisterForMsOfficeApplication(const std::wstring& FileExtensi
}
}
}
-
+
if (m_RootKey->HasSubKey(FwdRegKeyName))
m_RootKey->DeleteSubKeyTree(FwdRegKeyName);
}
-
+
RegistryKey Registrar::GetRootKeyForDefHtmlEditorForIERegistration() const
{
return WindowsRegistry().GetLocalMachineKey();