summaryrefslogtreecommitdiff
path: root/svx/source/dialog/fontlb.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/dialog/fontlb.cxx')
-rw-r--r--svx/source/dialog/fontlb.cxx27
1 files changed, 13 insertions, 14 deletions
diff --git a/svx/source/dialog/fontlb.cxx b/svx/source/dialog/fontlb.cxx
index d36bc4291d44..6b7d1ada0859 100644
--- a/svx/source/dialog/fontlb.cxx
+++ b/svx/source/dialog/fontlb.cxx
@@ -37,36 +37,35 @@ SvLBoxFontString::SvLBoxFontString(
maFont( rFont ),
mbUseColor( pColor != NULL )
{
- SetText( rString );
- if( pColor )
- maFont.SetColor( *pColor );
+ SetText(rString);
+ if(pColor)
+ maFont.SetColor(*pColor);
}
SvLBoxFontString::~SvLBoxFontString()
{
}
-
SvLBoxItem* SvLBoxFontString::Create() const
{
return new SvLBoxFontString;
}
-void SvLBoxFontString::Paint(
- const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry)
+void SvLBoxFontString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext,
+ const SvViewDataEntry* pView, const SvTreeListEntry* pEntry)
{
- vcl::Font aOldFont( rDev.GetFont() );
- vcl::Font aNewFont( maFont );
+ rRenderContext.Push(PushFlags::FONT);
+ vcl::Font aNewFont(maFont);
bool bSel = pView->IsSelected();
- if( !mbUseColor || bSel ) // selection always gets highlight color
+ if (!mbUseColor || bSel) // selection always gets highlight color
{
- const StyleSettings& rSett = Application::GetSettings().GetStyleSettings();
- aNewFont.SetColor( bSel ? rSett.GetHighlightTextColor() : rSett.GetFieldTextColor() );
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+ aNewFont.SetColor(bSel ? rStyleSettings.GetHighlightTextColor() : rStyleSettings.GetFieldTextColor());
}
- rDev.SetFont( aNewFont );
- SvLBoxString::Paint(rPos, rDev, pView, pEntry);
- rDev.SetFont( aOldFont );
+ rRenderContext.SetFont(aNewFont);
+ SvLBoxString::Paint(rPos, rDev, rRenderContext, pView, pEntry);
+ rRenderContext.Pop();
}
void SvLBoxFontString::InitViewData( SvTreeListBox* pView, SvTreeListEntry* pEntry, SvViewDataItem* pViewData )