summaryrefslogtreecommitdiff
path: root/sd/source/ui/animations/CustomAnimationList.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-16 21:50:19 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-16 21:59:42 +0900
commit7de50fd4b37a2280d08ce6e3b0b03c227a5d315e (patch)
tree90a2a60450668a16b5a91289645e38473e45a2bd /sd/source/ui/animations/CustomAnimationList.cxx
parent579b9d92c4451f86469a62a4531b026358dd52c7 (diff)
refactor CustomAnimationList to use RenderContext
Change-Id: I2a9e713ccc2bf4468f86bdcf6efdf91e4e41c8d6
Diffstat (limited to 'sd/source/ui/animations/CustomAnimationList.cxx')
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx25
1 files changed, 13 insertions, 12 deletions
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 0f883707ac0e..6f93769dfc3a 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -202,11 +202,12 @@ static OUString getDescription( const Any& rTarget, bool bWithText = true )
class CustomAnimationListEntryItem : public SvLBoxString
{
public:
- CustomAnimationListEntryItem( SvTreeListEntry*,sal_uInt16 nFlags, const OUString& aDescription, CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent );
- virtual ~CustomAnimationListEntryItem();
- void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* ) SAL_OVERRIDE;
- SvLBoxItem* Create() const SAL_OVERRIDE;
- void Clone( SvLBoxItem* pSource ) SAL_OVERRIDE;
+ CustomAnimationListEntryItem(SvTreeListEntry*, sal_uInt16 nFlags, const OUString& aDescription,
+ CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent);
+ virtual ~CustomAnimationListEntryItem();
+ void InitViewData(SvTreeListBox*,SvTreeListEntry*,SvViewDataItem*) SAL_OVERRIDE;
+ SvLBoxItem* Create() const SAL_OVERRIDE;
+ void Clone(SvLBoxItem* pSource) SAL_OVERRIDE;
virtual void Paint(const Point&, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext,
const SvViewDataEntry* pView,const SvTreeListEntry* pEntry) SAL_OVERRIDE;
@@ -938,21 +939,21 @@ void CustomAnimationList::Paint(vcl::RenderContext& rRenderContext, const Rectan
// draw help text if list box is still empty
if( First() == 0 )
{
- Color aOldColor( GetTextColor() );
- SetTextColor( GetSettings().GetStyleSettings().GetDisableColor() );
- ::Point aOffset( LogicToPixel( Point( 6, 6 ), MAP_APPFONT ) );
+ Color aOldColor(rRenderContext.GetTextColor());
+ rRenderContext.SetTextColor(rRenderContext.GetSettings().GetStyleSettings().GetDisableColor());
+ ::Point aOffset(rRenderContext.LogicToPixel(Point(6, 6), MAP_APPFONT));
- Rectangle aRect( Point( 0,0 ), GetOutputSizePixel() );
+ Rectangle aRect(Point(0,0), rRenderContext.GetOutputSizePixel());
aRect.Left() += aOffset.X();
aRect.Top() += aOffset.Y();
aRect.Right() -= aOffset.X();
aRect.Bottom() -= aOffset.Y();
- DrawText( aRect, SD_RESSTR(STR_CUSTOMANIMATION_LIST_HELPTEXT),
- TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK | TEXT_DRAW_CENTER | TEXT_DRAW_VCENTER );
+ rRenderContext.DrawText(aRect, SD_RESSTR(STR_CUSTOMANIMATION_LIST_HELPTEXT),
+ TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK | TEXT_DRAW_CENTER | TEXT_DRAW_VCENTER );
- SetTextColor( aOldColor );
+ rRenderContext.SetTextColor(aOldColor);
}
}