From a5330f50ea02f82ab7bc0a11df0f1a2b7f18af42 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Thu, 14 May 2015 09:29:53 +0900 Subject: refactor ThesaurusAlternativesCtrl to use RenderContext Change-Id: I65d55c9d57eeb5eb878008885417d1e2118a946d --- cui/source/dialogs/thesdlg.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'cui') 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); -- cgit v1.2.3