diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-06-23 10:29:48 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-06-23 10:32:28 +0200 |
commit | 5ca1936975148ae3bdc87edb69f812347f1ecb92 (patch) | |
tree | 408758d75ef07d02ffa9f2781ccb83dd614cf53d /sd | |
parent | 4ec27ad35f00fbf5f5bc903cabe0692dc257f1e2 (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
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 ff249d6a5f45..670895acbad4 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& /*rEntry*/) { - 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 7a052ad845cb..7ecfae4f181c 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx @@ -492,7 +492,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(); |