diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-10-03 12:44:07 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-10-03 16:30:36 +0200 |
commit | 532a4dcba6ec6fe1bd88f3c2db77f05868167886 (patch) | |
tree | 82857bab5b8914677e0d17a4b668dfcb97b0467e /canvas | |
parent | 372d2d78906aac32ddaf7eaa3c2037ea3d5af1ae (diff) |
Replace more reinterpret_cast with SAL_W/SAL_U
Change-Id: Ia632e4083222ad9e7f17c2ad0d0825f189c700cc
Reviewed-on: https://gerrit.libreoffice.org/43071
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/directx/dx_canvasfont.cxx | 2 | ||||
-rw-r--r-- | canvas/source/directx/dx_canvashelper.cxx | 5 |
2 files changed, 3 insertions, 4 deletions
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<LPCWSTR>(&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<LPCWSTR>( - 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, |