diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-09-29 17:33:15 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-09-30 19:08:28 +0200 |
commit | c3609f107b16eb888edf284f4637be6cb09234eb (patch) | |
tree | da52e05b5cdf26d5d3a57f510f8b32d8af10a026 /winaccessibility | |
parent | 8a4df9376bf299beb49fe116882ffdbd10b5e02b (diff) |
Use SAL_W/SAL_U instead of reinterpret_cast btwn wchar_t* and sal_Unicode*
This is type-safe, and allows to catch cases where a source type
is changed for some reason, but reinterpret_cast masks that
Change-Id: Ib64b6fa2e22d94a6bba890f0ccc3e20325c6f0a1
Reviewed-on: https://gerrit.libreoffice.org/42961
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'winaccessibility')
-rw-r--r-- | winaccessibility/source/UAccCOM/AccEditableText.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/winaccessibility/source/UAccCOM/AccEditableText.cxx b/winaccessibility/source/UAccCOM/AccEditableText.cxx index 14eaeea32f61..a2141605867f 100644 --- a/winaccessibility/source/UAccCOM/AccEditableText.cxx +++ b/winaccessibility/source/UAccCOM/AccEditableText.cxx @@ -119,7 +119,7 @@ STDMETHODIMP CAccEditableText::insertText(long offset, BSTR * text) if( !pRXEdtTxt.is() ) return E_FAIL; - ::rtl::OUString ouStr(reinterpret_cast<sal_Unicode const *>(*text)); + ::rtl::OUString ouStr(SAL_U(*text)); if( GetXInterface()->insertText( ouStr, offset ) ) return S_OK; @@ -196,7 +196,7 @@ STDMETHODIMP CAccEditableText::replaceText(long startOffset, long endOffset, BST if( !pRXEdtTxt.is() ) return E_FAIL; - ::rtl::OUString ouStr(reinterpret_cast<sal_Unicode const *>(*text)); + ::rtl::OUString ouStr(SAL_U(*text)); if( GetXInterface()->replaceText( startOffset,endOffset, ouStr) ) return S_OK; @@ -225,7 +225,7 @@ STDMETHODIMP CAccEditableText::setAttributes(long startOffset, long endOffset, B if( !pRXEdtTxt.is() ) return E_FAIL; - ::rtl::OUString ouStr(reinterpret_cast<sal_Unicode const *>(*attributes)); + ::rtl::OUString ouStr(SAL_U(*attributes)); sal_Int32 nIndex = 0; vector< ::rtl::OUString > vecAttr; |