[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Jul 31 00:22:03 PDT 2015
vcl/source/window/cursor.cxx | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
New commits:
commit c618e888ca92afa2a301eebc5ce8de77f318d00a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Jul 29 18:09:32 2015 +0200
tdf#92982 vcl::Cursor: handle rendercontext
With this, vcl::Cursor does not paint on the vcl::Window directly, and
in case the output should be something other than pRenderContext, it
should be a one-liner change to do that.
(cherry picked from commit 79c9598d0a586f44757954556661ce6eda1f997e)
Conflicts:
vcl/source/window/cursor.cxx
Change-Id: I57833f6f8589286260d96f412f1fcc681e6c5c8c
Reviewed-on: https://gerrit.libreoffice.org/17433
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index bd96802..0bcad80 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -44,8 +44,9 @@ struct ImplCursorData
static void ImplCursorInvert( ImplCursorData* pData )
{
vcl::Window* pWindow = pData->mpWindow;
- bool bMapMode = pWindow->IsMapModeEnabled();
- pWindow->EnableMapMode( false );
+ vcl::RenderContext* pRenderContext = pWindow->GetOutDev();
+ bool bMapMode = pRenderContext->IsMapModeEnabled();
+ pRenderContext->EnableMapMode( false );
sal_uInt16 nInvertStyle;
if ( pData->mnStyle & CURSOR_SHADOW )
nInvertStyle = INVERT_50;
@@ -107,12 +108,12 @@ static void ImplCursorInvert( ImplCursorData* pData )
if ( pData->mnOrientation )
aPoly.Rotate( pData->maPixRotOff, pData->mnOrientation );
- pWindow->Invert( aPoly, nInvertStyle );
+ pRenderContext->Invert( aPoly, nInvertStyle );
}
}
else
- pWindow->Invert( aRect, nInvertStyle );
- pWindow->EnableMapMode( bMapMode );
+ pRenderContext->Invert( aRect, nInvertStyle );
+ pRenderContext->EnableMapMode( bMapMode );
}
void vcl::Cursor::ImplDraw()
More information about the Libreoffice-commits
mailing list