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 19f732c Removed whitespace, fixed typo 19f732c is described below commit 19f732cbc26742d4e48bf464b01118d7625d57f7 Author: mseidel <msei...@apache.org> AuthorDate: Sun Mar 22 00:11:34 2020 +0100 Removed whitespace, fixed typo --- .../source/win32/shlxthandler/util/registry.cxx | 56 +++++++++++----------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/main/shell/source/win32/shlxthandler/util/registry.cxx b/main/shell/source/win32/shlxthandler/util/registry.cxx index 3610022..925bbf2 100644 --- a/main/shell/source/win32/shlxthandler/util/registry.cxx +++ b/main/shell/source/win32/shlxthandler/util/registry.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,16 +7,16 @@ * 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. - * + * *************************************************************/ @@ -30,7 +30,7 @@ #include <windows.h> #if defined _MSC_VER #pragma warning(pop) -#endif +#endif #include <malloc.h> #include "internal/dbgmacros.hxx" #include "internal/registry.hxx" @@ -41,7 +41,7 @@ #include <objbase.h> #if defined _MSC_VER #pragma warning(pop) -#endif +#endif //--------------------------------------- // @@ -61,7 +61,7 @@ bool SetRegistryKey(HKEY RootKey, const char* KeyName, const char* ValueName, co // open or create the desired key int rc = RegCreateKeyExA( RootKey, KeyName, 0, "", REG_OPTION_NON_VOLATILE, KEY_WRITE, 0, &hSubKey, 0); - + if (ERROR_SUCCESS == rc) { rc = RegSetValueExA( @@ -90,9 +90,9 @@ bool DeleteRegistryKey(HKEY RootKey, const char* KeyName) if ( rc == ERROR_FILE_NOT_FOUND ) return true; - + if (ERROR_SUCCESS == rc) - { + { char* SubKey; DWORD nMaxSubKeyLen; @@ -100,36 +100,36 @@ bool DeleteRegistryKey(HKEY RootKey, const char* KeyName) hKey, 0, 0, 0, 0, &nMaxSubKeyLen, 0, 0, 0, 0, 0, 0); - + nMaxSubKeyLen++; // space for trailing '\0' SubKey = reinterpret_cast<char*>( _alloca(nMaxSubKeyLen*sizeof(char))); while (ERROR_SUCCESS == rc) - { + { DWORD nLen = nMaxSubKeyLen; rc = RegEnumKeyExA( hKey, - 0, // always index zero - SubKey, - &nLen, - 0, 0, 0, 0); + 0, // always index zero + SubKey, + &nLen, + 0, 0, 0, 0); - if (ERROR_NO_MORE_ITEMS == rc) - { + if (ERROR_NO_MORE_ITEMS == rc) + { rc = RegDeleteKeyA(RootKey, KeyName); - break; - } - else if (rc == ERROR_SUCCESS) + break; + } + else if (rc == ERROR_SUCCESS) { DeleteRegistryKey(hKey, SubKey); } } // while - RegCloseKey(hKey); + RegCloseKey(hKey); } // if @@ -144,11 +144,11 @@ bool HasSubkeysRegistryKey(HKEY RootKey, const char* KeyName, /* out */ bool& bR HKEY hKey; LONG rc = RegOpenKeyExA(RootKey, KeyName, 0, KEY_READ, &hKey); - + if (ERROR_SUCCESS == rc) { DWORD nSubKeys = 0; - + rc = RegQueryInfoKeyA(hKey, 0, 0, 0, &nSubKeys, 0, 0, 0, 0, 0, 0, 0); bResult = (nSubKeys > 0); @@ -159,13 +159,13 @@ bool HasSubkeysRegistryKey(HKEY RootKey, const char* KeyName, /* out */ bool& bR // Convert a CLSID to a char string. std::string ClsidToString(const CLSID& clsid) -{ +{ // Get CLSID LPOLESTR wszCLSID = NULL; StringFromCLSID(clsid, &wszCLSID); char buff[39]; - // Covert from wide characters to non-wide. + // Convert from wide characters to non-wide. wcstombs(buff, wszCLSID, sizeof(buff)); // Free memory. @@ -188,13 +188,13 @@ bool QueryRegistryKey(HKEY RootKey, const char* KeyName, const char* ValueName, 0, KEY_READ, &hKey); - + if (ERROR_SUCCESS == rc) - { + { rc = RegQueryValueExA( hKey, ValueName, NULL, NULL, (LPBYTE)pszData,&dwBufLen); - RegCloseKey(hKey); + RegCloseKey(hKey); } return (ERROR_SUCCESS == rc);