summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-06-23 10:29:48 +0200
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2015-06-23 14:30:37 +0000
commit9a809eedf7327f925cd6be56545b8ed300ef28f4 (patch)
tree27127b185096162438a20b490b82f16f217ebe50 /sd
parentfead68bbf107ca9f2632bdaf1d8407921a0320f2 (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.cxx4
-rw-r--r--sd/source/ui/dlg/RemoteDialogClientBox.cxx2
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();