From 532a4dcba6ec6fe1bd88f3c2db77f05868167886 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 3 Oct 2017 12:44:07 +0300 Subject: Replace more reinterpret_cast with SAL_W/SAL_U Change-Id: Ia632e4083222ad9e7f17c2ad0d0825f189c700cc Reviewed-on: https://gerrit.libreoffice.org/43071 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- canvas/source/directx/dx_canvasfont.cxx | 2 +- canvas/source/directx/dx_canvashelper.cxx | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'canvas/source/directx') diff --git a/canvas/source/directx/dx_canvasfont.cxx b/canvas/source/directx/dx_canvasfont.cxx index e780634223e3..0fa32688ea6f 100644 --- a/canvas/source/directx/dx_canvasfont.cxx +++ b/canvas/source/directx/dx_canvasfont.cxx @@ -61,7 +61,7 @@ namespace dxcanvas std::vector< sal_Unicode > pStrBuf(nLen+1,0); std::copy(pStr,pStr+nLen,&pStrBuf[0]); - mpFontFamily.reset( new Gdiplus::FontFamily(reinterpret_cast(&pStrBuf[0]),nullptr) ); + mpFontFamily.reset( new Gdiplus::FontFamily(SAL_W(&pStrBuf[0]),nullptr) ); if( !mpFontFamily->IsAvailable() ) mpFontFamily.reset( new Gdiplus::FontFamily(L"Arial",nullptr) ); diff --git a/canvas/source/directx/dx_canvashelper.cxx b/canvas/source/directx/dx_canvashelper.cxx index f266ce86db0c..87b9066fc08f 100644 --- a/canvas/source/directx/dx_canvashelper.cxx +++ b/canvas/source/directx/dx_canvashelper.cxx @@ -521,9 +521,8 @@ namespace dxcanvas // TODO(F2): Proper layout (BiDi, CTL)! IMHO must use // DrawDriverString here, and perform layouting myself... ENSURE_OR_THROW( - Gdiplus::Ok == pGraphics->DrawString( reinterpret_cast( - text.Text.copy( text.StartPosition, - text.Length ).getStr()), + Gdiplus::Ok == pGraphics->DrawString( SAL_W(text.Text.copy( text.StartPosition, + text.Length ).getStr()), text.Length, pFont->getFont().get(), aPoint, -- cgit