From c3609f107b16eb888edf284f4637be6cb09234eb Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Fri, 29 Sep 2017 17:33:15 +0300 Subject: 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 Reviewed-by: Mike Kaganski --- winaccessibility/source/UAccCOM/AccEditableText.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'winaccessibility') 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(*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(*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(*attributes)); + ::rtl::OUString ouStr(SAL_U(*attributes)); sal_Int32 nIndex = 0; vector< ::rtl::OUString > vecAttr; -- cgit