Resolves: rhbz#1006850 crash in SwCommentRuler

f41
Caolán McNamara 11 years ago
parent 3e5e35abe9
commit 61a49a8b1e

@ -0,0 +1,32 @@
From b73dec8a06ef762098e642b2c37e4baad780b11a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 12 Sep 2013 10:56:37 +0100
Subject: [PATCH] Resolves: rhbz#1006850 crash in
SwCommentRuler::GetCommentControlRegion
Change-Id: Ic846da3b22391d724da6f8df94dd771e89d2efb4
---
sw/source/ui/misc/swruler.cxx | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sw/source/ui/misc/swruler.cxx b/sw/source/ui/misc/swruler.cxx
index a41fc0b..76fb8be 100644
--- a/sw/source/ui/misc/swruler.cxx
+++ b/sw/source/ui/misc/swruler.cxx
@@ -247,6 +247,13 @@ void SwCommentRuler::UpdateCommentHelpText()
Rectangle SwCommentRuler::GetCommentControlRegion()
{
SwPostItMgr *pPostItMgr = mpViewShell->GetPostItMgr();
+
+ //rhbz#1006850 When the SwPostItMgr ctor is called from SwView::SwView it
+ //triggers an update of the uiview, but the result of the ctor hasn't been
+ //set into the mpViewShell yet, so GetPostItMgr is temporarily still NULL
+ if (!pPostItMgr)
+ return Rectangle();
+
//FIXME When the page width is larger then screen, the ruler is misplaced by one pixel
long nLeft = GetWinOffset() + GetPageOffset() + mpSwWin->LogicToPixel(Size(GetPageWidth(), 0)).Width();
long nTop = 0 + 4; // Ruler::ImplDraw uses RULER_OFF (value: 3px) as offset, and Ruler::ImplFormat adds one extra pixel
--
1.8.3.1

@ -43,7 +43,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice
Epoch: 1
Version: %{libo_version}.1
Release: 1%{?libo_prerelease}%{?dist}
Release: 2%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0
Group: Applications/Productivity
URL: http://www.libreoffice.org/default/
@ -255,6 +255,7 @@ Patch14: 0001-Related-rhbz-968892-discard-impossible-languages-for.patch
Patch15: 0002-Related-rhbz-968892-discard-impossible-languages-for.patch
Patch16: 0001-Resolves-fdo-48835-application-menu-for-LibreOffice.patch
Patch17: 0001-Make-charmap.cxx-compile-with-icu-4.4.patch
Patch18: 0001-Resolves-rhbz-1006850-crash-in-SwCommentRuler-GetCom.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice
@ -1004,6 +1005,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch15 -p1 -b .rhbz-968892-discard-impossible-languages-for.patch
%patch16 -p1 -b .fdo-48835-application-menu-for-LibreOffice.patch
%patch17 -p1 -b .Make-charmap.cxx-compile-with-icu-4.4.patch
%patch18 -p1 -b .rhbz-1006850-crash-in-SwCommentRuler-GetCom.patch
# TODO: check this
# these are horribly incomplete--empty translations and copied english
@ -2094,6 +2096,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%changelog
* Thu Sep 12 2013 Caolán McNamara <caolanm@redhat.com> - 1:4.1.2.1-2
- Resolves: rhbz#1006850 crash in SwCommentRuler
* Thu Sep 05 2013 David Tardon <dtardon@redhat.com> - 1:4.1.2.1-1
- 4.1.2 rc1

Loading…
Cancel
Save