diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-10-14 17:48:36 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-10-14 22:13:38 +0200 |
commit | cf0ed4fb4a610a61332a418f12b547648c3a0130 (patch) | |
tree | 8722973e4ae0f3ca82f6372f50e39863c23d62c1 | |
parent | b6d0ca04581eae01817aac18d32a312bc9a2d514 (diff) |
More fixes of uses of now-explicit OUString ctor taking raw sal_Unicode pointer
...in Windows-only code, after c927aab29ebfff1ce3ac0b2f27ae343025a9890c "Make
the OUString ctors taking raw sal_Unicode pointer/non-const array explicit".
Interestingly, these occurrences were accepted by MSVC and only cause errors
with clang-cl, so happened to go unnoticed until now.
Change-Id: I33e7653e28a21541ef793b4b0750abb6037752db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104314
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | connectivity/source/drivers/ado/Aolevariant.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/adodatalinks.cxx | 4 | ||||
-rw-r--r-- | extensions/source/config/WinUserInfo/WinUserInfoBe.cxx | 4 | ||||
-rw-r--r-- | framework/source/uielement/spinfieldtoolbarcontroller.cxx | 2 | ||||
-rw-r--r-- | ucbhelper/source/client/proxydecider.cxx | 2 | ||||
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 2 | ||||
-rw-r--r-- | xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/connectivity/source/drivers/ado/Aolevariant.cxx b/connectivity/source/drivers/ado/Aolevariant.cxx index 7f740e81d7c2..f90a4ecc6ef2 100644 --- a/connectivity/source/drivers/ado/Aolevariant.cxx +++ b/connectivity/source/drivers/ado/Aolevariant.cxx @@ -378,7 +378,7 @@ void OLEVariant::set(double n) OUString OLEVariant::getString() const { if (V_VT(this) == VT_BSTR) - return o3tl::toU(LPCOLESTR(V_BSTR(this))); + return OUString(o3tl::toU(LPCOLESTR(V_BSTR(this)))); if(isNull()) return OUString(); @@ -387,7 +387,7 @@ OUString OLEVariant::getString() const varDest.ChangeType(VT_BSTR, this); - return o3tl::toU(LPCOLESTR(V_BSTR(&varDest))); + return OUString(o3tl::toU(LPCOLESTR(V_BSTR(&varDest)))); } diff --git a/dbaccess/source/ui/dlg/adodatalinks.cxx b/dbaccess/source/ui/dlg/adodatalinks.cxx index 8ba7610fc854..c8bafabf1088 100644 --- a/dbaccess/source/ui/dlg/adodatalinks.cxx +++ b/dbaccess/source/ui/dlg/adodatalinks.cxx @@ -92,7 +92,7 @@ OUString PromptNew(long hWnd) piTmpConnection->Release( ); dlPrompt->Release( ); // Don't we need SysFreeString(_result)? - return o3tl::toU(_result); + return OUString(o3tl::toU(_result)); } OUString PromptEdit(long hWnd, OUString const & connstr) @@ -184,7 +184,7 @@ OUString PromptEdit(long hWnd, OUString const & connstr) dlPrompt->Release( ); CoUninitialize(); // Don't we need SysFreeString(_result)? - return o3tl::toU(_result); + return OUString(o3tl::toU(_result)); } } diff --git a/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx b/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx index 83223d932bb7..7dd5c5463e46 100644 --- a/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx +++ b/extensions/source/config/WinUserInfo/WinUserInfoBe.cxx @@ -185,7 +185,7 @@ private: if (FAILED((pUser->*func)(&sBstr))) return ""; BSTRGuard aBstrGuard(sBstr, SysFreeString); - return o3tl::toU(sBstr); + return OUString(o3tl::toU(sBstr)); } static OUString Str(IADsUser* pUser, const wchar_t* property) { @@ -207,7 +207,7 @@ private: if (FAILED(SafeArrayGetElement(sa, &i, &varItem))) continue; if (varItem.vt == VT_BSTR) - return o3tl::toU(V_BSTR(&varItem)); + return OUString(o3tl::toU(V_BSTR(&varItem))); VariantClear(&varItem); } return ""; diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx index 235fb62675f3..428558e6daba 100644 --- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx +++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx @@ -432,7 +432,7 @@ OUString SpinfieldToolbarController::FormatOutputString( double fValue ) else _snwprintf( o3tl::toW(aBuffer), SAL_N_ELEMENTS(aBuffer), o3tl::toW(m_aOutFormat.getStr()), sal_Int32( fValue )); - return aBuffer; + return OUString(aBuffer); #else // Currently we have no support for a format string using sal_Unicode. wchar_t // is 32 bit on Unix platform! diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx index fa1befd4be0c..8bb610a64335 100644 --- a/ucbhelper/source/client/proxydecider.cxx +++ b/ucbhelper/source/client/proxydecider.cxx @@ -513,7 +513,7 @@ DWORD WINAPI GetPACProxyThread(_In_ LPVOID lpParameter) GlobalFree(ProxyInfo.lpszProxyBypass); if (ProxyInfo.lpszProxy) { - OUString sProxyResult = o3tl::toU(ProxyInfo.lpszProxy); + OUString sProxyResult(o3tl::toU(ProxyInfo.lpszProxy)); GlobalFree(ProxyInfo.lpszProxy); // Get the first of possibly multiple results sProxyResult = sProxyResult.getToken(0, ';'); diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index ea8bccfdd1f4..3f6082a6b92d 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -1019,7 +1019,7 @@ static int CALLBACK SalEnumFontsProcExW( const LOGFONTW* lpelfe, // Ignore vertical fonts if ( pLogFont->elfLogFont.lfFaceName[0] != '@' ) { - OUString aName = o3tl::toU(pLogFont->elfLogFont.lfFaceName); + OUString aName(o3tl::toU(pLogFont->elfLogFont.lfFaceName)); pInfo->mpName = &aName; memcpy(pInfo->mpLogFont->lfFaceName, pLogFont->elfLogFont.lfFaceName, (aName.getLength()+1)*sizeof(wchar_t)); pInfo->mpLogFont->lfCharSet = pLogFont->elfLogFont.lfCharSet; diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx index 01b27fb9756f..c62c96d77328 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx @@ -249,7 +249,7 @@ static OUString get_system_name(const void *pvSystemStore, { ppwszSystemName = static_cast<LPCWSTR>(pvSystemStore); } - return o3tl::toU(ppwszSystemName); + return OUString(o3tl::toU(ppwszSystemName)); } extern "C" { |