diff options
Diffstat (limited to 'canvas/source/directx')
-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, |