summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-06 13:01:10 +0900
committerJan Holesovsky <kendy@collabora.com>2015-05-07 09:57:50 +0200
commitc299413c6d51280804e1996330a960d02050507d (patch)
tree24da6a99cdb0783a2f74aebc08a2fddce6b07b29 /vcl
parenta6b9d9a19fb8c5c9f166682f52941aee25b89c94 (diff)
refactor "HelpTextWindow" - use RenderContext
Change-Id: I6cfcd86fabb2f568b577bb060cccabfe1aebc537
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/app/help.cxx36
1 files changed, 18 insertions, 18 deletions
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index 1180100ba9a4..a38d475efd11 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -352,49 +352,49 @@ void HelpTextWindow::ImplShow()
Update();
}
-void HelpTextWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& )
+void HelpTextWindow::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
{
// paint native background
bool bNativeOK = false;
- if ( IsNativeControlSupported( CTRL_TOOLTIP, PART_ENTIRE_CONTROL ) )
+ if (rRenderContext.IsNativeControlSupported(CTRL_TOOLTIP, PART_ENTIRE_CONTROL))
{
// #i46472# workaround gcc3.3 temporary problem
- Rectangle aCtrlRegion( Point( 0, 0 ), GetOutputSizePixel() );
- ImplControlValue aControlValue;
- bNativeOK = DrawNativeControl( CTRL_TOOLTIP, PART_ENTIRE_CONTROL, aCtrlRegion,
- ControlState::NONE, aControlValue, OUString() );
+ Rectangle aCtrlRegion(Point(0, 0), GetOutputSizePixel());
+ ImplControlValue aControlValue;
+ bNativeOK = rRenderContext.DrawNativeControl(CTRL_TOOLTIP, PART_ENTIRE_CONTROL, aCtrlRegion,
+ ControlState::NONE, aControlValue, OUString());
}
// paint text
- if ( mnHelpWinStyle == HELPWINSTYLE_QUICK && maHelpText.getLength() < HELPTEXTMAXLEN)
+ if (mnHelpWinStyle == HELPWINSTYLE_QUICK && maHelpText.getLength() < HELPTEXTMAXLEN)
{
if ( mnStyle & QUICKHELP_CTRLTEXT )
- DrawCtrlText( maTextRect.TopLeft(), maHelpText );
+ rRenderContext.DrawCtrlText(maTextRect.TopLeft(), maHelpText);
else
- DrawText( maTextRect.TopLeft(), maHelpText );
+ rRenderContext.DrawText(maTextRect.TopLeft(), maHelpText);
}
else // HELPWINSTYLE_BALLOON
{
sal_uInt16 nDrawFlags = TEXT_DRAW_MULTILINE|TEXT_DRAW_WORDBREAK|
TEXT_DRAW_LEFT|TEXT_DRAW_TOP;
- if ( mnStyle & QUICKHELP_CTRLTEXT )
+ if (mnStyle & QUICKHELP_CTRLTEXT)
nDrawFlags |= TEXT_DRAW_MNEMONIC;
- DrawText( maTextRect, maHelpText, nDrawFlags );
+ rRenderContext.DrawText(maTextRect, maHelpText, nDrawFlags);
}
// border
- if( ! bNativeOK )
+ if (!bNativeOK)
{
Size aSz = GetOutputSizePixel();
- DrawRect( Rectangle( Point(), aSz ) );
- if ( mnHelpWinStyle == HELPWINSTYLE_BALLOON )
+ rRenderContext.DrawRect(Rectangle(Point(), aSz));
+ if (mnHelpWinStyle == HELPWINSTYLE_BALLOON)
{
aSz.Width() -= 2;
aSz.Height() -= 2;
- Color aColor( GetLineColor() );
- SetLineColor( ( COL_GRAY ) );
- DrawRect( Rectangle( Point( 1, 1 ), aSz ) );
- SetLineColor( aColor );
+ Color aColor(rRenderContext.GetLineColor());
+ rRenderContext.SetLineColor(COL_GRAY);
+ rRenderContext.DrawRect(Rectangle(Point(1, 1), aSz));
+ rRenderContext.SetLineColor(aColor);
}
}
}