diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-06-23 10:29:48 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-08-06 12:51:38 +0200 |
commit | d6615bd592bdfe2095aca77e4d38b2cd6fdd1b0b (patch) | |
tree | 08f84f3e6daaf33626c34989bd06caea376377d2 /sd | |
parent | d672048a4b622ef6f19f6ed02e512dfe3b99cdd3 (diff) |
rendercontext: Mass fix of using the wrong size.
In the paints, we must use the size of the Window for the computations, not of
the RenderContext - the RenderContext can be much bigger than the Window in
the double-buffering case.
Fixes for example the list boxes, and many others.
Change-Id: I4c7607569f88b2d097587140858d0862e54b5ea6
Reviewed-on: https://gerrit.libreoffice.org/16421
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/animations/CustomAnimationList.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/dlg/RemoteDialogClientBox.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 90735cd40a6f..bda406e72078 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -377,7 +377,7 @@ void CustomAnimationTriggerEntryItem::InitViewData( SvTreeListBox* pView, SvTree void CustomAnimationTriggerEntryItem::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, const SvViewDataEntry* /*pView*/, const SvTreeListEntry* /*pEntry*/) { - Size aSize(rRenderContext.GetOutputSizePixel().Width(), static_cast<SvTreeListBox*>(&rDev)->GetEntryHeight()); + Size aSize(rDev.GetOutputSizePixel().Width(), rDev.GetEntryHeight()); Point aPos(0, rPos.Y()); @@ -943,7 +943,7 @@ void CustomAnimationList::Paint(vcl::RenderContext& rRenderContext, const Rectan rRenderContext.SetTextColor(rRenderContext.GetSettings().GetStyleSettings().GetDisableColor()); ::Point aOffset(rRenderContext.LogicToPixel(Point(6, 6), MAP_APPFONT)); - Rectangle aRect(Point(0,0), rRenderContext.GetOutputSizePixel()); + Rectangle aRect(Point(0,0), GetOutputSizePixel()); aRect.Left() += aOffset.X(); aRect.Top() += aOffset.Y(); diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx index 06ac9c383441..028501a8b33a 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx @@ -493,7 +493,7 @@ void ClientBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle &/*rPa RecalcAll(); Point aStart(0, -m_nTopIndex); - Size aSize(rRenderContext.GetOutputSizePixel()); + Size aSize(GetOutputSizePixel()); if (m_bHasScrollBar) aSize.Width() -= m_aScrollBar->GetSizePixel().Width(); |