diff options
Diffstat (limited to 'sd/source/ui/animations/CustomAnimationList.cxx')
-rw-r--r-- | sd/source/ui/animations/CustomAnimationList.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index e6cfb0c1d98f..c0b2086abac7 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -270,7 +270,8 @@ void CustomAnimationListEntryItem::InitViewData( SvTreeListBox* pView, SvTreeLis Size aSize( width, pView->GetTextHeight() ); if( aSize.Height() < nItemMinHeight ) aSize.setHeight( nItemMinHeight ); - pViewData->maSize = aSize; + pViewData->mnWidth = aSize.Width(); + pViewData->mnHeight = aSize.Height(); } void CustomAnimationListEntryItem::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, @@ -280,7 +281,7 @@ void CustomAnimationListEntryItem::Paint(const Point& rPos, SvTreeListBox& rDev, const SvViewDataItem* pViewData = mpParent->GetViewDataItem(&rEntry, this); Point aPos(rPos); - Size aSize(pViewData->maSize); + int nItemHeight = pViewData->mnHeight; sal_Int16 nNodeType = mpEffect->getNodeType(); if (nNodeType == EffectNodeType::ON_CLICK ) @@ -336,12 +337,12 @@ void CustomAnimationListEntryItem::Paint(const Point& rPos, SvTreeListBox& rDev, { Image aImage(StockImage::Yes, sImage); Point aImagePos(aPos); - aImagePos.AdjustY((aSize.Height()/2 - aImage.GetSizePixel().Height()) >> 1 ); + aImagePos.AdjustY((nItemHeight/2 - aImage.GetSizePixel().Height()) >> 1 ); rRenderContext.DrawImage(aImagePos, aImage); } aPos.AdjustX(nIconWidth ); - aPos.AdjustY((aSize.Height()/2 - rDev.GetTextHeight()) >> 1 ); + aPos.AdjustY((nItemHeight/2 - rDev.GetTextHeight()) >> 1 ); rRenderContext.DrawText(aPos, rRenderContext.GetEllipsisString(msEffectName, rDev.GetOutputSizePixel().Width() - aPos.X())); } @@ -400,7 +401,8 @@ void CustomAnimationTriggerEntryItem::InitViewData( SvTreeListBox* pView, SvTree Size aSize(pView->GetTextWidth( msDescription ) + 2 * nIconWidth, pView->GetTextHeight() ); if( aSize.Height() < nIconWidth ) aSize.setHeight( nIconWidth ); - pViewData->maSize = aSize; + pViewData->mnWidth = aSize.Width(); + pViewData->mnHeight = aSize.Height(); } void CustomAnimationTriggerEntryItem::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, |