diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-04-17 09:23:19 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-04-17 15:45:48 +0200 |
commit | 3b58e91c8a25917a2cf6c747f3d6ace27879f92a (patch) | |
tree | 390aa13616bc9b096726929ef00fe2af6a42aa3d /vcl | |
parent | 1b7ced8e77910e7f44d726f48185f16bc2fb087d (diff) |
loplugin:stringadd
Change-Id: Ic44ff2f812fd74ae2cb1467ca0d420317b63a445
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150480
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/opengl/OpenGLHelper.cxx | 4 | ||||
-rw-r--r-- | vcl/win/gdi/salgdi.cxx | 38 |
2 files changed, 14 insertions, 28 deletions
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index b04afad288f3..d63be4c3f9a7 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -180,8 +180,8 @@ namespace sal_uInt8 val = pData[i]; if( val != 0 ) bIsZero = false; - aHexStr.append( pHexData[ val & 0xf ] ); - aHexStr.append( pHexData[ val >> 4 ] ); + aHexStr.append( + OStringChar(pHexData[ val & 0xf ]) + OStringChar(pHexData[ val >> 4 ]) ); } if( bIsZero ) return OString(); diff --git a/vcl/win/gdi/salgdi.cxx b/vcl/win/gdi/salgdi.cxx index cb3cad6508ed..cb4b500a4a43 100644 --- a/vcl/win/gdi/salgdi.cxx +++ b/vcl/win/gdi/salgdi.cxx @@ -1059,23 +1059,15 @@ bool WinSalGraphics::drawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth { RECT* pRect = &(mpClipRgnData->rdh.rcBound); - aBuf.append( "\nnewpath\n" ); - aBuf.append( pRect->left ); - aBuf.append( " " ); - aBuf.append( pRect->top ); - aBuf.append( " moveto\n" ); - aBuf.append( pRect->right ); - aBuf.append( " " ); - aBuf.append( pRect->top ); - aBuf.append( " lineto\n" ); - aBuf.append( pRect->right ); - aBuf.append( " " ); - aBuf.append( pRect->bottom ); - aBuf.append( " lineto\n" ); - aBuf.append( pRect->left ); - aBuf.append( " " ); - aBuf.append( pRect->bottom ); - aBuf.append( " lineto\n" + aBuf.append( "\nnewpath\n" + + OString::number(pRect->left) + " " + OString::number(pRect->top) + + " moveto\n" + + OString::number(pRect->right) + " " + OString::number(pRect->top) + + " lineto\n" + + OString::number(pRect->right) + " " + + OString::number(pRect->bottom) + " lineto\n" + + OString::number(pRect->left) + " " + + OString::number(pRect->bottom) + " lineto\n" "closepath\n" "clip\n" "newpath\n" ); @@ -1092,15 +1084,9 @@ bool WinSalGraphics::drawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth double dM22 = nHeight / (nBoundingBox[1] - nBoundingBox[3] ); // reserve a sal_uInt16 again aBuf.setLength( 2 ); - aBuf.append( "\n\n[" ); - aBuf.append( dM11 ); - aBuf.append( " 0 0 " ); - aBuf.append( dM22 ); - aBuf.append( ' ' ); - aBuf.append( nX - ( dM11 * nBoundingBox[0] ) ); - aBuf.append( ' ' ); - aBuf.append( nY - ( dM22 * nBoundingBox[3] ) ); - aBuf.append( "] concat\n" + aBuf.append( "\n\n[" + OString::number(dM11) + " 0 0 " + OString::number(dM22) + " " + + OString::number(nX - ( dM11 * nBoundingBox[0] )) + " " + + OString::number(nY - ( dM22 * nBoundingBox[3] )) + "] concat\n" "%%BeginDocument:\n" ); *reinterpret_cast<sal_uInt16*>(const_cast<char *>(aBuf.getStr())) = static_cast<sal_uInt16>( aBuf.getLength() - 2 ); Escape ( getHDC(), nEscape, aBuf.getLength(), aBuf.getStr(), nullptr ); |