summaryrefslogtreecommitdiff
path: root/sfx2
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 /sfx2
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 'sfx2')
-rw-r--r--sfx2/source/dialog/backingwindow.cxx6
-rw-r--r--sfx2/source/dialog/dockwin.cxx3
-rw-r--r--sfx2/source/dialog/titledockwin.cxx2
3 files changed, 5 insertions, 6 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 22d4e803b407..b09bf8fe9e99 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -396,20 +396,20 @@ void BackingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle&)
Resize();
Wallpaper aBack(svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor);
- vcl::Region aClip(Rectangle(Point(0, 0), rRenderContext.GetOutputSizePixel()));
+ vcl::Region aClip(Rectangle(Point(0, 0), GetOutputSizePixel()));
aClip.Exclude(maStartCentButtons);
rRenderContext.Push(PushFlags::CLIPREGION);
rRenderContext.IntersectClipRegion(aClip);
- rRenderContext.DrawWallpaper(Rectangle(Point(0, 0), rRenderContext.GetOutputSizePixel()), aBack);
+ rRenderContext.DrawWallpaper(Rectangle(Point(0, 0), GetOutputSizePixel()), aBack);
rRenderContext.Pop();
ScopedVclPtrInstance<VirtualDevice> pVDev(rRenderContext);
pVDev->EnableRTL(rRenderContext.IsRTLEnabled());
pVDev->SetOutputSizePixel(maStartCentButtons.GetSize());
Point aOffset(Point(0, 0) - maStartCentButtons.TopLeft());
- pVDev->DrawWallpaper(Rectangle(aOffset, rRenderContext.GetOutputSizePixel()), aBack);
+ pVDev->DrawWallpaper(Rectangle(aOffset, GetOutputSizePixel()), aBack);
rRenderContext.DrawOutDev(maStartCentButtons.TopLeft(), maStartCentButtons.GetSize(),
Point(0, 0), maStartCentButtons.GetSize(),
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 6f30d5008270..f376e52761ad 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <svl/eitem.hxx>
#include <vcl/decoview.hxx>
@@ -1673,7 +1672,7 @@ void SfxDockingWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle
if (pImp->bSplitable || IsFloatingMode())
return;
- Rectangle aRect = Rectangle(Point(0, 0), rRenderContext.GetOutputSizePixel());
+ Rectangle aRect(Point(0, 0), GetOutputSizePixel());
switch (GetAlignment())
{
case SfxChildAlignment::TOP:
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index a80d77d6c1c0..b5e9067ad3ea 100644
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -172,7 +172,7 @@ namespace sfx2
rRenderContext.SetFont(aFont);
// Set border values.
- Size aWindowSize(rRenderContext.GetOutputSizePixel());
+ Size aWindowSize(GetOutputSizePixel());
int nOuterLeft = 0;
int nInnerLeft = nOuterLeft + m_aBorder.Left() - 1;
int nOuterRight = aWindowSize.Width() - 1;