summaryrefslogtreecommitdiff
path: root/configmgr/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-04-04 14:57:45 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-04-04 16:12:11 +0000
commit9ac98e6e3488e434bf4864ecfb13a121784f640b (patch)
treeb3c9cbf52126fee5864be12e9109f7413e7a0878 /configmgr/source
parent6f995da5a652d993ab253b3363188cd18e289728 (diff)
Finally switch MSVC to sal_Unicode = char16_t, too
There is lots of (Windows-only) code that relied on sal_Unicode being the same as wchar_t, and the best change may be different in each case (and doing the changes may be somewhat error prone). So for now add SAL_U/SAL_W scaffolding functions to sal/types.h, remove their uses one by one again, and finally drop those functions again. Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea Reviewed-on: https://gerrit.libreoffice.org/36077 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'configmgr/source')
-rw-r--r--configmgr/source/winreg.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/configmgr/source/winreg.cxx b/configmgr/source/winreg.cxx
index 00b6656d4047..c48a85e70e26 100644
--- a/configmgr/source/winreg.cxx
+++ b/configmgr/source/winreg.cxx
@@ -85,7 +85,7 @@ void dumpWindowsRegistryKey(HKEY hKey, OUString const & aKeyName, TempFile &aFil
{
HKEY hCurKey;
- if(RegOpenKeyExW(hKey, aKeyName.getStr(), 0, KEY_READ, &hCurKey) == ERROR_SUCCESS)
+ if(RegOpenKeyExW(hKey, SAL_W(aKeyName.getStr()), 0, KEY_READ, &hCurKey) == ERROR_SUCCESS)
{
DWORD nSubKeys = 0;
DWORD nValues = 0;
@@ -106,9 +106,9 @@ void dumpWindowsRegistryKey(HKEY hKey, OUString const & aKeyName, TempFile &aFil
//Make up full key name
if(aKeyName.isEmpty())
- aSubkeyName = aKeyName + OUString(buffKeyName);
+ aSubkeyName = aKeyName + OUString(SAL_U(buffKeyName));
else
- aSubkeyName = aKeyName + "\\" + OUString(buffKeyName);
+ aSubkeyName = aKeyName + "\\" + OUString(SAL_U(buffKeyName));
//Recursion, until no more subkeys are found
dumpWindowsRegistryKey(hKey, aSubkeyName, aFileHandle);
@@ -137,9 +137,9 @@ void dumpWindowsRegistryKey(HKEY hKey, OUString const & aKeyName, TempFile &aFil
const wchar_t wsType[] = L"Type";
if(!wcscmp(pValueName.get(), wsValue))
- aValue = OUString(pValue.get());
+ aValue = OUString(SAL_U(pValue.get()));
if (!wcscmp(pValueName.get(), wsType))
- aType = OUString(pValue.get());
+ aType = OUString(SAL_U(pValue.get()));
if(!wcscmp(pValueName.get(), wsFinal) && *reinterpret_cast<DWORD*>(pValue.get()) == 1)
bFinal = true;
}