summaryrefslogtreecommitdiff
path: root/winaccessibility/source/UAccCOM/MAccessible.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'winaccessibility/source/UAccCOM/MAccessible.cxx')
-rw-r--r--winaccessibility/source/UAccCOM/MAccessible.cxx20
1 files changed, 7 insertions, 13 deletions
diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx
index f0a72faa2d15..4a713760c21c 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -737,8 +737,7 @@ STDMETHODIMP CMAccessible::get_accKeyboardShortcut(VARIANT varChild, BSTR *pszKe
}
SAFE_SYSFREESTRING(*pszKeyboardShortcut);
- *pszKeyboardShortcut = SysAllocString(
- reinterpret_cast<wchar_t const *>(wString.getStr()));
+ *pszKeyboardShortcut = SysAllocString(SAL_W(wString.getStr()));
return S_OK;
}
@@ -2959,8 +2958,7 @@ void CMAccessible::ConvertAnyToVariant(const css::uno::Any &rAnyVal, VARIANT *pv
pvData->vt = VT_BSTR;
::rtl::OUString val;
rAnyVal >>= val;
- pvData->bstrVal = SysAllocString(
- reinterpret_cast<wchar_t const *>(val.getStr()));
+ pvData->bstrVal = SysAllocString(SAL_W(val.getStr()));
break;
}
@@ -3013,7 +3011,7 @@ void CMAccessible::ConvertAnyToVariant(const css::uno::Any &rAnyVal, VARIANT *pv
case TypeClass::TypeClass_MAKE_FIXED_SIZE:
// Output the type string, if there is other uno value type.
pvData->vt = VT_BSTR;
- pvData->bstrVal = SysAllocString(reinterpret_cast<wchar_t const *>(rAnyVal.getValueTypeName().getStr()));
+ pvData->bstrVal = SysAllocString(SAL_W(rAnyVal.getValueTypeName().getStr()));
break;
default:
@@ -3127,12 +3125,9 @@ STDMETHODIMP CMAccessible:: get_locale( IA2Locale __RPC_FAR *locale )
return E_FAIL;
css::lang::Locale unoLoc = m_xContext.get()->getLocale();
- locale->language = SysAllocString(
- reinterpret_cast<wchar_t const *>(unoLoc.Language.getStr()));
- locale->country = SysAllocString(
- reinterpret_cast<wchar_t const *>(unoLoc.Country.getStr()));
- locale->variant = SysAllocString(
- reinterpret_cast<wchar_t const *>(unoLoc.Variant.getStr()));
+ locale->language = SysAllocString(SAL_W(unoLoc.Language.getStr()));
+ locale->country = SysAllocString(SAL_W(unoLoc.Country.getStr()));
+ locale->variant = SysAllocString(SAL_W(unoLoc.Variant.getStr()));
return S_OK;
@@ -3219,8 +3214,7 @@ STDMETHODIMP CMAccessible::get_attributes(/*[out]*/ BSTR *pAttr)
if(*pAttr)
SAFE_SYSFREESTRING(*pAttr);
- *pAttr = SysAllocString(
- reinterpret_cast<wchar_t const *>(val.getStr()));
+ *pAttr = SysAllocString(SAL_W(val.getStr()));
return S_OK;
}