Resolves: rhbz#1086714 overlarge pixmap

f41
Caolán McNamara 11 years ago
parent 0bd0c44201
commit 0459ed3143

@ -22,26 +22,3 @@ index a5cbf3b..eb3133a 100644
{
sal_Int32 nScrollerHeight = pMgr->GetSidebarScrollerHeight();
const Rectangle &aVisRect = _pViewShell->VisArea().SVRect();
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
index ef6d4d3..ac6cf3a 100644
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
@@ -269,13 +269,13 @@ void SwSidebarWin::Draw(OutputDevice* pDev, const Point& rPt, const Size& rSz, s
mpSidebarTxtControl->Draw(pDev, rPt, rSz, nInFlags);
- const drawinglayer::primitive2d::Primitive2DSequence& rSequence = mpAnchor->getOverlayObjectPrimitive2DSequence();
const drawinglayer::geometry::ViewInformation2D aNewViewInfos;
drawinglayer::processor2d::BaseProcessor2D * pProcessor =
drawinglayer::processor2d::createBaseProcessor2DFromOutputDevice(
*pDev, aNewViewInfos );
- pProcessor->process(rSequence);
+ pProcessor->process(mpAnchor->getOverlayObjectPrimitive2DSequence());
+ pProcessor->process(mpTextRangeOverlay->getOverlayObjectPrimitive2DSequence());
delete pProcessor;
}
--
1.9.0

@ -0,0 +1,71 @@
From f31ac2405bbd0755fb14daa6cb84d7bb7d84c492 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 17 Apr 2014 11:56:17 +0100
Subject: [PATCH] Resolves: rhbz#1086714 overlarge pixmap
Change-Id: I015308406a43e6b039059a5e35316d59745d0a48
---
canvas/source/cairo/cairo_canvasbitmap.cxx | 2 +-
canvas/source/cairo/cairo_xlib_cairo.cxx | 7 ++++---
vcl/unx/x11/xlimits.cxx | 11 +++++------
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/canvas/source/cairo/cairo_canvasbitmap.cxx b/canvas/source/cairo/cairo_canvasbitmap.cxx
index 32c9167..eae1319 100644
--- a/canvas/source/cairo/cairo_canvasbitmap.cxx
+++ b/canvas/source/cairo/cairo_canvasbitmap.cxx
@@ -159,7 +159,7 @@ namespace cairocanvas
pPixels = cairo_image_surface_create( CAIRO_FORMAT_ARGB32,
aSize.Width(), aSize.Height() );
cairo_t *pCairo = cairo_create( pPixels );
- if( !pPixels || !pCairo )
+ if( !pPixels || !pCairo || cairo_status(pCairo) != CAIRO_STATUS_SUCCESS )
break;
// suck ourselves from the X server to this buffer so then we can fiddle with
diff --git a/canvas/source/cairo/cairo_xlib_cairo.cxx b/canvas/source/cairo/cairo_xlib_cairo.cxx
index f52a8e7..e5bb189 100644
--- a/canvas/source/cairo/cairo_xlib_cairo.cxx
+++ b/canvas/source/cairo/cairo_xlib_cairo.cxx
@@ -36,11 +36,12 @@ namespace
Pixmap limitXCreatePixmap(Display *display, Drawable d, unsigned int width, unsigned int height, unsigned int depth)
{
// The X protocol request CreatePixmap puts an upper bound
- // of 16 bit to the size.
+ // of 16 bit to the size. And in practice some drivers
+ // fall over with values close to the max.
- // see, e.g. moz#424333, fdo#48961
+ // see, e.g. moz#424333, fdo#48961, rhbz#1086714
// we've a duplicate of this in vcl :-(
- if (width > SAL_MAX_INT16 || height > SAL_MAX_INT16)
+ if (width > SAL_MAX_INT16-10 || height > SAL_MAX_INT16-10)
{
SAL_WARN("canvas", "overlarge pixmap: " << width << " x " << height);
return None;
diff --git a/vcl/unx/x11/xlimits.cxx b/vcl/unx/x11/xlimits.cxx
index 2d3606d..b8509cb 100644
--- a/vcl/unx/x11/xlimits.cxx
+++ b/vcl/unx/x11/xlimits.cxx
@@ -13,13 +13,12 @@
Pixmap limitXCreatePixmap(Display *display, Drawable d, unsigned int width, unsigned int height, unsigned int depth)
{
// The X protocol request CreatePixmap puts an upper bound
- // of 16 bit to the size. Beyond that there may be implementation
- // limits of the Xserver; which we should catch by a failed XCreatePixmap
- // call. However extra large values should be caught here since we'd run into
- // 16 bit truncation here without noticing.
+ // of 16 bit to the size. And in practice some drivers
+ // fall over with values close to the max.
- // see, e.g. moz#424333
- if (width > SAL_MAX_INT16 || height > SAL_MAX_INT16)
+ // see, e.g. moz#424333, fdo#48961, rhbz#1086714
+ // we've a duplicate of this in canvas :-(
+ if (width > SAL_MAX_INT16-10 || height > SAL_MAX_INT16-10)
{
SAL_WARN("vcl", "overlarge pixmap: " << width << " x " << height);
return None;
--
1.9.0

@ -297,6 +297,7 @@ Patch32: 0001-fix-libetonyek-build.patch
%endif
Patch33: 0001-Resolves-fdo-36815-enable-printing-WYSIWYG-sidewindo.patch
Patch34: 0001-Related-fdo-36815-print-the-text-highlight-range-as-.patch
Patch35: 0001-Resolves-rhbz-1086714-overlarge-pixmap.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice
@ -2290,6 +2291,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%changelog
* Wed Apr 16 2014 David Tardon <dtardon@redhat.com> - 1:4.2.3.3-6
- install man pages
- Resolves: rhbz#1086714 overlarge pixmap
* Wed Apr 16 2014 Caolán McNamara <caolanm@redhat.com> - 1:4.2.3.3-5
- Resolves: fdo#36815 enable printing WYSIWYG sidewindow comments

Loading…
Cancel
Save