summaryrefslogtreecommitdiffstats
path: root/cui
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-14 09:29:53 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-14 10:00:15 +0900
commita5330f50ea02f82ab7bc0a11df0f1a2b7f18af42 (patch)
treed1e5a6a51b45d58c3cfeee133d4b272a90d197d4 /cui
parentrefactor SvxHlmarkTreeLBox to use RenderContext (diff)
downloadcore-a5330f50ea02f82ab7bc0a11df0f1a2b7f18af42.tar.gz
core-a5330f50ea02f82ab7bc0a11df0f1a2b7f18af42.zip
refactor ThesaurusAlternativesCtrl to use RenderContext
Change-Id: I65d55c9d57eeb5eb878008885417d1e2118a946d
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/thesdlg.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index 781cb1542396..d6a375922d51 100644
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -260,14 +260,13 @@ void ThesaurusAlternativesCtrl::Paint(vcl::RenderContext& rRenderContext, const
{
if (!m_pDialog->WordFound())
{
- Size aTextSize( GetTextWidth( m_pDialog->getErrStr() ), GetTextHeight() );
- aTextSize = LogicToPixel( aTextSize );
+ Size aTextSize(rRenderContext.GetTextWidth(m_pDialog->getErrStr()), rRenderContext.GetTextHeight());
+ aTextSize = rRenderContext.LogicToPixel(aTextSize);
Point aPos;
aPos.X() += GetSizePixel().Width() / 2 - aTextSize.Width() / 2;
aPos.Y() += GetSizePixel().Height() / 2;
- aPos = PixelToLogic( aPos );
- DrawText( aPos, m_pDialog->getErrStr() );
-
+ aPos = rRenderContext.PixelToLogic(aPos);
+ rRenderContext.DrawText(aPos, m_pDialog->getErrStr());
}
else
SvxCheckListBox::Paint(rRenderContext, rRect);