summaryrefslogtreecommitdiff
path: root/setup_native/source/win32/customactions/reg4msdoc/userregistrar.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:06:53 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:06:53 +0200
commit6e4894c2019dc9c442dce738d3f0423d8d74973f (patch)
treee3734a287f4c02ecb120e54aa32141f95f484236 /setup_native/source/win32/customactions/reg4msdoc/userregistrar.cxx
parentb84e1626f6fcb29fe784933dee51079c3447a50c (diff)
recreated tag libreoffice-3.3.3.1 which had these commits:
commit d7e53cee633ec1c583c72e6d9c01122195c4383c (tag: refs/tags/libreoffice-3.3.3.1) Author: Petr Mladek <pmladek@suse.cz> Date: Tue May 31 17:39:04 2011 +0200 Version 3.3.3.1, tag libreoffice-3.3.3.1 (3.3.3-rc1)
Notes
Notes: split repo tag: components_libreoffice-3.3.3.1 split repo tag: components_libreoffice-3.3.4.1
Diffstat (limited to 'setup_native/source/win32/customactions/reg4msdoc/userregistrar.cxx')
-rw-r--r--setup_native/source/win32/customactions/reg4msdoc/userregistrar.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/setup_native/source/win32/customactions/reg4msdoc/userregistrar.cxx b/setup_native/source/win32/customactions/reg4msdoc/userregistrar.cxx
index 986bf0d28cb6..03a19523d171 100644
--- a/setup_native/source/win32/customactions/reg4msdoc/userregistrar.cxx
+++ b/setup_native/source/win32/customactions/reg4msdoc/userregistrar.cxx
@@ -23,7 +23,7 @@ UserRegistrar::UserRegistrar(const RegistrationContextInformation& RegContext) :
}
//###################################
-// Command
+// Command
//###################################
//--------------------------------------
@@ -32,9 +32,9 @@ UserRegistrar::UserRegistrar(const RegistrationContextInformation& RegContext) :
void UserRegistrar::UnregisterAsHtmlEditorForInternetExplorer() const
{
Registrar::UnregisterAsHtmlEditorForInternetExplorer();
-
+
DeleteHtmFileAssociationKeys();
-
+
try
{
RegistryKey RegKey = m_RootKey->OpenSubKey(L"Applications");
@@ -55,30 +55,30 @@ void UserRegistrar::UnregisterAsHtmlEditorForInternetExplorer() const
void UserRegistrar::RegisterAsDefaultShellHtmlEditor() const
{
RegistryKey LocalHtmKey = m_RootKey->CreateSubKey(L".htm");
-
+
if (!LocalHtmKey->HasValue(DEFAULT_VALUE_NAME))
{
RegistryKey HKCRKey = WindowsRegistry().GetClassesRootKey();
-
+
if (HKCRKey->HasSubKey(L".htm"))
{
RegistryKey RootHtmKey = HKCRKey->OpenSubKey(L".htm", false);
-
+
if (RootHtmKey->HasValue(DEFAULT_VALUE_NAME))
{
RegistryValue RegVal = RootHtmKey->GetValue(DEFAULT_VALUE_NAME);
-
+
std::wstring RootHtmFwdKey = RegVal->GetDataAsUniString();
-
+
if (HKCRKey->HasSubKey(RootHtmFwdKey))
- {
+ {
m_RootKey->CreateSubKey(RootHtmFwdKey);
LocalHtmKey->CopyValue(RootHtmKey, DEFAULT_VALUE_NAME);
}
}
}
}
-
+
// calling base class method
Registrar::RegisterAsDefaultShellHtmlEditor();
}
@@ -92,7 +92,7 @@ void UserRegistrar::UnregisterAsDefaultShellHtmlEditor() const
Registrar::UnregisterAsDefaultShellHtmlEditor();
DeleteHtmFileAssociationKeys();
}
-
+
//--------------------------------------
/**
*/
@@ -101,11 +101,11 @@ void UserRegistrar::UnregisterForMsOfficeApplication(
{
/// calling base class method
Registrar::UnregisterForMsOfficeApplication(FileExtension);
-
+
if (m_RootKey->HasSubKey(FileExtension))
{
RegistryKey RegKey = m_RootKey->OpenSubKey(FileExtension);
-
+
if ((0 == RegKey->GetSubKeyCount()) && (0 == RegKey->GetSubValueCount()))
{
RegKey->Close();
@@ -123,14 +123,14 @@ RegistryKey UserRegistrar::GetRootKeyForDefHtmlEditorForIERegistration() const
}
//--------------------------------------
-/**
+/**
*/
void UserRegistrar::DeleteHtmFileAssociationKeys() const
{
// Later delete the created keys if they are empty and have not changed meanwhile.
// Remeber: if we create a new registry key in the user part of the
// registry, changes to that key via the merged key HKEY_CLASSES_ROOT
- // go into the user branch HKEY_CURRENT_USER and are not visible for other users.
+ // go into the user branch HKEY_CURRENT_USER and are not visible for other users.
// so we must carefully detect if the keys have not changed in order to prevent accidentally
// deleting a key and so destroying existing associations
// See MSDN: "Merged View of HKEY_CLASSES_ROOT"