diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-09-18 10:37:17 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-09-18 11:34:22 +0200 |
commit | 80363950fda5eeef9830f61e57899d1805c91751 (patch) | |
tree | 3674af04b0c4dd9847b423fc472b66a5ce754f6b /vcl/win | |
parent | ac1081170c5bc2234b14ce99b7ea8e583bac82b5 (diff) |
Acknowledge that WinSalGraphicsImpl::drawPolyLine modifies pPtAry
Change-Id: Idde44857f8ace883cc759321c71e2ca7a4359334
Reviewed-on: https://gerrit.libreoffice.org/42406
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/gdi/gdiimpl.cxx | 4 | ||||
-rw-r--r-- | vcl/win/gdi/gdiimpl.hxx | 2 | ||||
-rw-r--r-- | vcl/win/gdi/salgdi.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx index 30a9c3488b98..6eb6782c9154 100644 --- a/vcl/win/gdi/gdiimpl.cxx +++ b/vcl/win/gdi/gdiimpl.cxx @@ -1663,12 +1663,12 @@ void WinSalGraphicsImpl::drawRect( long nX, long nY, long nWidth, long nHeight ) Rectangle( mrParent.getHDC(), (int)nX, (int)nY, (int)(nX+nWidth), (int)(nY+nHeight) ); } -void WinSalGraphicsImpl::drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) +void WinSalGraphicsImpl::drawPolyLine( sal_uInt32 nPoints, SalPoint* pPtAry ) { // for NT, we can handover the array directly static_assert( sizeof( POINT ) == sizeof( SalPoint ), "must be the same size" ); - POINT* pWinPtAry = reinterpret_cast<POINT*>(const_cast<SalPoint *>(pPtAry)); + POINT* pWinPtAry = reinterpret_cast<POINT*>(pPtAry); // we assume there are at least 2 points (Polyline requires at least 2 point, see MSDN) // we must paint the endpoint for last line diff --git a/vcl/win/gdi/gdiimpl.hxx b/vcl/win/gdi/gdiimpl.hxx index 962ce09fabc9..5eb63a21d1ae 100644 --- a/vcl/win/gdi/gdiimpl.hxx +++ b/vcl/win/gdi/gdiimpl.hxx @@ -100,7 +100,7 @@ public: virtual void drawRect( long nX, long nY, long nWidth, long nHeight ) override; - virtual void drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) override; + virtual void drawPolyLine( sal_uInt32 nPoints, SalPoint* pPtAry ) override; virtual void drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry ) override; diff --git a/vcl/win/gdi/salgdi.cxx b/vcl/win/gdi/salgdi.cxx index ef9732c7f9fc..587b3c62bd3e 100644 --- a/vcl/win/gdi/salgdi.cxx +++ b/vcl/win/gdi/salgdi.cxx @@ -780,7 +780,7 @@ void WinSalGraphics::drawRect( long nX, long nY, long nWidth, long nHeight ) mpImpl->drawRect( nX, nY, nWidth, nHeight ); } -void WinSalGraphics::drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry ) +void WinSalGraphics::drawPolyLine( sal_uInt32 nPoints, SalPoint* pPtAry ) { mpImpl->drawPolyLine( nPoints, pPtAry ); } |