| Index: src/plugin/PluginUserSettings.cpp |
| =================================================================== |
| --- a/src/plugin/PluginUserSettings.cpp |
| +++ b/src/plugin/PluginUserSettings.cpp |
| @@ -1,6 +1,7 @@ |
| #include "PluginStdAfx.h" |
| #include "PluginUserSettings.h" |
| #include <algorithm> |
| +#include "COM_Value.h" |
| #include "PluginSettings.h" |
| #include "PluginClient.h" |
| #include "../shared/Dictionary.h" |
| @@ -142,9 +143,9 @@ |
| if (pVarResult) |
| { |
| - CComBSTR key = pDispparams->rgvarg[0].bstrVal; |
| - CComBSTR section = pDispparams->rgvarg[1].bstrVal; |
| - CStringW message = sGetMessage((BSTR)section, (BSTR)key); |
| + AdblockPlus::COM::Incoming_Param key(pDispparams->rgvarg[0].bstrVal); |
| + AdblockPlus::COM::Incoming_Param section(pDispparams->rgvarg[1].bstrVal); |
| + CStringW message = sGetMessage(to_CString(section), to_CString(key)); |
| pVarResult->vt = VT_BSTR; |
| pVarResult->bstrVal = SysAllocString(message); |
| @@ -241,9 +242,8 @@ |
| if (VT_BSTR != pDispparams->rgvarg[0].vt) |
| return DISP_E_TYPEMISMATCH; |
| - CComBSTR url = pDispparams->rgvarg[0].bstrVal; |
| - |
| - settings->SetSubscription((BSTR)url); |
| + AdblockPlus::COM::Incoming_Param url(pDispparams->rgvarg[0].bstrVal); |
| + settings->SetSubscription(url); |
| } |
| else if (s_GetLanguage == method) |
| { |
| @@ -288,10 +288,10 @@ |
| if (VT_BSTR != pDispparams->rgvarg[0].vt) |
| return DISP_E_TYPEMISMATCH; |
| - CComBSTR domain = pDispparams->rgvarg[0].bstrVal; |
| - if (domain.Length()) |
| + AdblockPlus::COM::Incoming_Param domain(pDispparams->rgvarg[0].bstrVal); |
| + if (!domain.empty()) |
| { |
| - settings->AddWhiteListedDomain((BSTR)domain); |
| + settings->AddWhiteListedDomain(to_CString(domain)); |
| } |
| } |
| else if (s_RemoveWhitelistDomain == method) |
| @@ -302,10 +302,10 @@ |
| if (VT_BSTR != pDispparams->rgvarg[0].vt) |
| return DISP_E_TYPEMISMATCH; |
| - CComBSTR domain = pDispparams->rgvarg[0].bstrVal; |
| - if (domain.Length()) |
| + AdblockPlus::COM::Incoming_Param domain(pDispparams->rgvarg[0].bstrVal); |
| + if (!domain.empty()) |
| { |
| - settings->RemoveWhiteListedDomain((BSTR)domain); |
| + settings->RemoveWhiteListedDomain(to_CString(domain)); |
| } |
| } |
| else if (s_GetAppLocale == method) |