diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-11 09:41:13 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-11 10:03:29 +0900 |
commit | 25a0bd7b909fb8c87387d1413060f6c4ba5a51bd (patch) | |
tree | 69d3cdabb9c74ef29dd6e031156e09121e0eba39 /cui/source/dialogs | |
parent | 69e233b75a024de60b677f2226d810cb11fe8f94 (diff) |
refactor TreeListBox to use RenderContext
Change-Id: I901a1f1f9732fb66718dca34c698a851e5b0d87f
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r-- | cui/source/dialogs/thesdlg.cxx | 21 | ||||
-rw-r--r-- | cui/source/dialogs/thesdlg_impl.hxx | 4 |
2 files changed, 12 insertions, 13 deletions
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index a8566ea5e015..781cb1542396 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -146,24 +146,23 @@ AlternativesString::AlternativesString( { } -void AlternativesString::Paint( - const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* /*pView*/, - const SvTreeListEntry* pEntry) +void AlternativesString::Paint(const Point& rPos, SvTreeListBox& /*rDev*/, vcl::RenderContext& rRenderContext, + const SvViewDataEntry* /*pView*/, const SvTreeListEntry* pEntry) { - AlternativesExtraData* pData = m_rControlImpl.GetExtraData( pEntry ); - Point aPos( rPos ); - vcl::Font aOldFont( rDev.GetFont()); + AlternativesExtraData* pData = m_rControlImpl.GetExtraData(pEntry); + Point aPos(rPos); + rRenderContext.Push(PushFlags::FONT); if (pData && pData->IsHeader()) { - vcl::Font aFont( aOldFont ); - aFont.SetWeight( WEIGHT_BOLD ); - rDev.SetFont( aFont ); + vcl::Font aFont(rRenderContext.GetFont()); + aFont.SetWeight(WEIGHT_BOLD); + rRenderContext.SetFont(aFont); aPos.X() = 0; } else aPos.X() += 5; - rDev.DrawText( aPos, GetText() ); - rDev.SetFont( aOldFont ); + rRenderContext.DrawText(aPos, GetText()); + rRenderContext.Pop(); } ThesaurusAlternativesCtrl::ThesaurusAlternativesCtrl(vcl::Window* pParent) diff --git a/cui/source/dialogs/thesdlg_impl.hxx b/cui/source/dialogs/thesdlg_impl.hxx index 8211897ef711..25b09f51d754 100644 --- a/cui/source/dialogs/thesdlg_impl.hxx +++ b/cui/source/dialogs/thesdlg_impl.hxx @@ -53,8 +53,8 @@ public: AlternativesString( ThesaurusAlternativesCtrl &rControl, SvTreeListEntry* pEntry, sal_uInt16 nFlags, const OUString& rStr ); - virtual void Paint( - const Point& rPos, SvTreeListBox& rOutDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry) SAL_OVERRIDE; + virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, vcl::RenderContext& rRenderContext, + const SvViewDataEntry* pView, const SvTreeListEntry* pEntry) SAL_OVERRIDE; }; #endif |