This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 09316e0  Fixed typos, removed whitespace
09316e0 is described below

commit 09316e06825712f4b194db859b4b9bb529374218
Author: mseidel <msei...@apache.org>
AuthorDate: Sat Nov 16 17:02:38 2019 +0100

    Fixed typos, removed whitespace
---
 .../win32/customactions/javafilter/jfregca.cxx     | 139 +++++++++++----------
 1 file changed, 70 insertions(+), 69 deletions(-)

diff --git 
a/main/setup_native/source/win32/customactions/javafilter/jfregca.cxx 
b/main/setup_native/source/win32/customactions/javafilter/jfregca.cxx
index 5d009bf..7afa530 100644
--- a/main/setup_native/source/win32/customactions/javafilter/jfregca.cxx
+++ b/main/setup_native/source/win32/customactions/javafilter/jfregca.cxx
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,19 +7,20 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
 
+
 //#include <stdio.h>
 
 #ifdef _MSC_VER
@@ -37,52 +38,52 @@
 #endif
 #include <tchar.h>
 
-//Simple function prototypes
+// Simple function prototypes
 bool update_activesync_regvalues(bool, bool, char** );
 void createKeys(HKEY hKey, char **);
 void deleteKeys(HKEY hKey, char **);
 bool isMulti(MSIHANDLE);
 
-//Simple data arrays for registry values
+// Simple data arrays for registry values
 TCHAR *pxlData[8]= {
-       "{C6AB3E74-9F4F-4370-8120-A8A6FABB7A7C}", //CLSID 1 - key name at 
InstalledFilters Key
-       "{43887C67-4D5D-4127-BAAC-87A288494C7C}", //CLSID 2 - key value for 
Default Export
-       ".pxl",                                                                 
  //Registry key for device type - already there if ActiveSync installerd
-       ".sxc",                                                                 
  //New registry key for SO docs
-       "InstalledFilters",                                               
//Sub-key of device/so doc key
-       "DefaultImport",                                                  //Key 
name added at device/so level key
-       "DefaultExport",                                                  //Key 
name added at device/so level key
-       "Binary Copy",                                                    //Key 
value for DefaultImport
+       "{C6AB3E74-9F4F-4370-8120-A8A6FABB7A7C}", // CLSID 1 - key name at 
InstalledFilters Key
+       "{43887C67-4D5D-4127-BAAC-87A288494C7C}", // CLSID 2 - key value for 
Default Export
+       ".pxl",                                                                 
  // Registry key for device type - already there if ActiveSync installed
+       ".sxc",                                                                 
  // New registry key for SO docs
+       "InstalledFilters",                                               // 
Sub-key of device/so doc key
+       "DefaultImport",                                                  // 
Key name added at device/so level key
+       "DefaultExport",                                                  // 
Key name added at device/so level key
+       "Binary Copy",                                                    // 
Key value for DefaultImport
 };
 
 TCHAR *pswData[8] = {
-       "{BDD611C3-7BAB-460F-8711-5B9AC9EF6020}", //CLSID 1 - key name at 
InstalledFilters Key
-       "{CB43F086-838D-4FA4-B5F6-3406B9A57439}", //CLSID 2 - key value for 
Default Export
-       ".psw",                                                                 
  //Registry key for device type - already there if ActiveSync installe
-       ".sxw",                                                                 
  //New registry key for SO docs
-       "InstalledFilters",                                               
//Sub-key of device/so doc key
-       "DefaultImport",                                                  //Key 
name added at device/so level key
-       "DefaultExport",                                                  //Key 
name added at device/so level key
-       "Binary Copy",                                                    //Key 
value for DefaultImport
+       "{BDD611C3-7BAB-460F-8711-5B9AC9EF6020}", // CLSID 1 - key name at 
InstalledFilters Key
+       "{CB43F086-838D-4FA4-B5F6-3406B9A57439}", // CLSID 2 - key value for 
Default Export
+       ".psw",                                                                 
  // Registry key for device type - already there if ActiveSync installed
+       ".sxw",                                                                 
  // New registry key for SO docs
+       "InstalledFilters",                                               // 
Sub-key of device/so doc key
+       "DefaultImport",                                                  // 
Key name added at device/so level key
+       "DefaultExport",                                                  // 
Key name added at device/so level key
+       "Binary Copy",                                                    // 
Key value for DefaultImport
 };
 
 
-//index into registry value arrays
+// index into registry value arrays
 #define CLSID1 0
 #define CLSID2 1
 #define DEVICE_PATH 2
 #define SO_PATH 3
 #define IF_PATH 4
-#define DEFIMPORT_KEY 5 
+#define DEFIMPORT_KEY 5
 #define DEFEXPORT_KEY 6
 #define BC_VALUE 7
 
-//Constants for Registry buffers
+// Constants for Registry buffers
 const int MAX_KEY_LENGTH=255;
 const int MAX_VALUE_NAME=16383;
 
 BOOL APIENTRY DllMain( HANDLE,
-                       DWORD  ul_reason, 
+                       DWORD  ul_reason,
                        LPVOID
                                         )
 {
@@ -102,8 +103,8 @@ extern "C" UINT install_jf ( MSIHANDLE hModule ) {
 #ifdef _JRGREG_DEBUG
        MessageBox(NULL, bMulti ? "Multi" : "Single", "Install", MB_OK);
 #endif
-       update_activesync_regvalues(bMulti, true, pxlData); 
-       update_activesync_regvalues(bMulti, true, pswData); 
+       update_activesync_regvalues(bMulti, true, pxlData);
+       update_activesync_regvalues(bMulti, true, pswData);
 
     return ERROR_SUCCESS;
 }
@@ -113,8 +114,8 @@ extern "C" UINT uninstall_jf ( MSIHANDLE hModule ) {
 #ifdef _JRGREG_DEBUG
        MessageBox(NULL, bMulti ? "Multi" : "Single", "Uninstall", MB_OK);
 #endif
-       update_activesync_regvalues(false, bMulti, pxlData); 
-       update_activesync_regvalues(false, bMulti, pswData); 
+       update_activesync_regvalues(false, bMulti, pxlData);
+       update_activesync_regvalues(false, bMulti, pswData);
 
     return ERROR_SUCCESS;
 }
@@ -123,9 +124,9 @@ extern "C" UINT uninstall_jf ( MSIHANDLE hModule ) {
        Determines if this is being installed on a per user or a machine wide 
basis
     @param hModule
     [in] a valid msi handle.
-    
-            
-    @returns 
+
+
+    @returns
     <TRUE/>if this is a multi-user install.
 */
 bool isMulti( MSIHANDLE hModule ) {
@@ -162,9 +163,9 @@ bool isMulti( MSIHANDLE hModule ) {
 
        @param data
        [in] an array of string containing names of registry keys and values
-    
-            
-    @returns 
+
+
+    @returns
     <TRUE/>if this is a multi-user install.
 */
 
@@ -178,7 +179,7 @@ bool update_activesync_regvalues(bool bMultiUser, bool 
bInstall, char **data) {
                if (ERROR_SUCCESS != RegOpenKeyEx(HKEY_LOCAL_MACHINE, 
(LPCSTR)MUKey, 0, KEY_ALL_ACCESS, &hKey)) {
                        return false;
                }
-               if (bInstall) { 
+               if (bInstall) {
                        createKeys(hKey, data);
                } else {
                        deleteKeys(hKey, data);
@@ -190,35 +191,35 @@ bool update_activesync_regvalues(bool bMultiUser, bool 
bInstall, char **data) {
                }
 
                CHAR     achKey[MAX_KEY_LENGTH];   // buffer for subkey name
-               DWORD    cbName;                   // size of name string 
-               CHAR     achClass[MAX_PATH] = "";  // buffer for class name 
-               DWORD    cchClassName = MAX_PATH;  // size of class string 
-               DWORD    cSubKeys=0;               // number of subkeys 
-               DWORD    cbMaxSubKey;              // longest subkey size 
-               DWORD    cchMaxClass;              // longest class string 
-               DWORD    cValues;              // number of values for key 
-               DWORD    cchMaxValue;          // longest value name 
-               DWORD    cbMaxValueData;       // longest value data 
-               DWORD    cbSecurityDescriptor; // size of security descriptor 
-               FILETIME ftLastWriteTime;      // last write time 
-               
-               // Get the class name and the value count. 
+               DWORD    cbName;                   // size of name string
+               CHAR     achClass[MAX_PATH] = "";  // buffer for class name
+               DWORD    cchClassName = MAX_PATH;  // size of class string
+               DWORD    cSubKeys=0;               // number of subkeys
+               DWORD    cbMaxSubKey;              // longest subkey size
+               DWORD    cchMaxClass;              // longest class string
+               DWORD    cValues;              // number of values for key
+               DWORD    cchMaxValue;          // longest value name
+               DWORD    cbMaxValueData;       // longest value data
+               DWORD    cbSecurityDescriptor; // size of security descriptor
+               FILETIME ftLastWriteTime;      // last write time
+
+               // Get the class name and the value count.
                if (ERROR_SUCCESS == RegQueryInfoKey(
-                       hKey,                    // key handle 
-                       achClass,                // buffer for class name 
-                       &cchClassName,           // size of class string 
-                       NULL,                    // reserved 
-                       &cSubKeys,               // number of subkeys 
-                       &cbMaxSubKey,            // longest subkey size 
-                       &cchMaxClass,            // longest class string 
-                       &cValues,                // number of values for this 
key 
-                       &cchMaxValue,            // longest value name 
-                       &cbMaxValueData,         // longest value data 
-                       &cbSecurityDescriptor,   // security descriptor 
-                       &ftLastWriteTime)) {       // last write time 
+                       hKey,                    // key handle
+                       achClass,                // buffer for class name
+                       &cchClassName,           // size of class string
+                       NULL,                    // reserved
+                       &cSubKeys,               // number of subkeys
+                       &cbMaxSubKey,            // longest subkey size
+                       &cchMaxClass,            // longest class string
+                       &cValues,                // number of values for this 
key
+                       &cchMaxValue,            // longest value name
+                       &cbMaxValueData,         // longest value data
+                       &cbSecurityDescriptor,   // security descriptor
+                       &ftLastWriteTime)) {     // last write time
 
                        if (cSubKeys) {
-                               for (DWORD i=0; i<cSubKeys; i++) { 
+                               for (DWORD i=0; i<cSubKeys; i++) {
                                        cbName = 1024;
                                        if (ERROR_SUCCESS == 
RegEnumKeyEx(hKey,i,achKey,&cbName,NULL,NULL,NULL,&ftLastWriteTime)) {
                                                HKEY subKey;
@@ -235,7 +236,7 @@ bool update_activesync_regvalues(bool bMultiUser, bool 
bInstall, char **data) {
                                        }
                                }
                        }
-                       
+
                        bReturn = true;
                }
        }
@@ -275,13 +276,13 @@ void createKeys(HKEY hKey, char **data) {
                }
        }
 
-       if (ERROR_SUCCESS == RegCreateKeyEx(hKey, soPath, 0, NULL, 
+       if (ERROR_SUCCESS == RegCreateKeyEx(hKey, soPath, 0, NULL,
                                                        
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &soKey, NULL)) {
                RegSetValueEx(soKey, defExport, 0, REG_SZ, (LPBYTE)binaryCopy, 
strlen(binaryCopy));
                RegSetValueEx(soKey, defImport, 0, REG_SZ, (LPBYTE)clsid2, 
strlen(clsid2));
 
-               
-               if (ERROR_SUCCESS == RegCreateKeyEx(soKey, IFPath, 0, NULL, 
+
+               if (ERROR_SUCCESS == RegCreateKeyEx(soKey, IFPath, 0, NULL,
                                                        
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &soIFKey, NULL)) {
                        RegSetValueEx(soIFKey, clsid2, 0, REG_SZ, NULL, NULL);
                }
@@ -289,7 +290,7 @@ void createKeys(HKEY hKey, char **data) {
 }
 
 /**
-       Delete registry keys 
+       Delete registry keys
 
     @param hKey
     [in] Handle to the parent registry key
@@ -314,7 +315,7 @@ void deleteKeys(HKEY hKey, TCHAR **data) {
        if (ERROR_SUCCESS == RegOpenKeyEx(hKey, soPath, 0, KEY_ALL_ACCESS, 
&soKey)) {
                RegDeleteValue(soKey, defExport);
                RegDeleteValue(soKey, defImport);
-               
+
                if (ERROR_SUCCESS == RegOpenKeyEx(soKey, IFPath, 0, 
KEY_ALL_ACCESS, &soIFKey)) {
                        RegDeleteValue(soIFKey, clsid2);
                        RegCloseKey(soIFKey);

Reply via email to