[libreoffice] Resolves: rhbz#1096486 avoid access to nonexisting parent

Caolán McNamara caolanm at fedoraproject.org
Mon May 12 09:05:54 UTC 2014


commit b1512062a0eb23cc6d12c01723ed9388cff6d053
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon May 12 10:05:42 2014 +0100

    Resolves: rhbz#1096486 avoid access to nonexisting parent

 ...bz-1096486-avoid-access-to-nonexisting-pa.patch |   74 ++++++++++++++++++++
 libreoffice.spec                                   |    6 ++-
 2 files changed, 79 insertions(+), 1 deletions(-)
---
diff --git a/0001-Resolves-rhbz-1096486-avoid-access-to-nonexisting-pa.patch b/0001-Resolves-rhbz-1096486-avoid-access-to-nonexisting-pa.patch
new file mode 100644
index 0000000..a3d5969
--- /dev/null
+++ b/0001-Resolves-rhbz-1096486-avoid-access-to-nonexisting-pa.patch
@@ -0,0 +1,74 @@
+From caa42a739923aa35734b6a840de7c1b8f039e9a0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Wed, 8 Jan 2014 11:22:25 +0000
+Subject: [PATCH] Resolves: rhbz#1096486 avoid access to nonexisting parent
+ dialog
+
+was Related: rhbz#1047174
+
+(cherry picked from commit 794f5af121906668870a58700aed25b660381240)
+
+Change-Id: I0bf9116d088adde838993ac5e909a6f3481f883e
+---
+ svx/source/dialog/graphctl.cxx | 19 +++++++++----------
+ 1 file changed, 9 insertions(+), 10 deletions(-)
+
+diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
+index 4fc18b7..d70bb3d 100644
+--- a/svx/source/dialog/graphctl.cxx
++++ b/svx/source/dialog/graphctl.cxx
+@@ -309,6 +309,8 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
+     KeyCode aCode( rKEvt.GetKeyCode() );
+     bool    bProc = false;
+ 
++    Dialog* pDialog = GetParentDialog();
++
+     switch ( aCode.GetCode() )
+     {
+         case KEY_DELETE:
+@@ -318,8 +320,8 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
+             {
+                 pView->DeleteMarked();
+                 bProc = true;
+-                if( !pView->AreObjectsMarked() )
+-                    GetParentDialog()->GrabFocusToFirstControl();
++                if (!pView->AreObjectsMarked() && pDialog)
++                    pDialog->GrabFocusToFirstControl();
+             }
+         }
+         break;
+@@ -328,9 +330,11 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
+         {
+             if ( bSdrMode )
+             {
++                bool bGrabFocusToFirstControl = true;
+                 if ( pView->IsAction() )
+                 {
+                     pView->BrkAction();
++                    bGrabFocusToFirstControl = false;
+                 }
+                 else if ( pView->AreObjectsMarked() )
+                 {
+@@ -340,16 +344,11 @@ void GraphCtrl::KeyInput( const KeyEvent& rKEvt )
+                     if(pHdl)
+                     {
+                         ((SdrHdlList&)rHdlList).ResetFocusHdl();
++                        bGrabFocusToFirstControl = false;
+                     }
+-                    else
+-                    {
+-                        GetParentDialog()->GrabFocusToFirstControl();
+-                    }
+-                }
+-                else
+-                {
+-                    GetParentDialog()->GrabFocusToFirstControl();
+                 }
++                if (bGrabFocusToFirstControl && pDialog)
++                    pDialog->GrabFocusToFirstControl();
+                 bProc = true;
+             }
+         }
+-- 
+1.9.0
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 281582d..6f1fb1c 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -37,7 +37,7 @@ Summary:        Free Software Productivity Suite
 Name:           libreoffice
 Epoch:          1
 Version:        %{libo_version}.2
-Release:        8%{?libo_prerelease}%{?dist}
+Release:        9%{?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/
@@ -305,6 +305,7 @@ Patch44: 0001-Related-fdo-50697-reset-the-cache-timeout-on-GetGrap.patch
 Patch45: 0001-resolve-fdo-77509-memory-corruption-crash-in-Consoli.patch
 Patch46: 0001-rhbz-1071604-don-t-crash-if-slide-layout-configs-are.patch
 Patch47: 0001-Related-rhbz-1071604-don-t-paint-anim.-effect-icon.patch
+Patch48: 0001-Resolves-rhbz-1096486-avoid-access-to-nonexisting-pa.patch
 
 %define instdir %{_libdir}
 %define baseinstdir %{instdir}/libreoffice
@@ -2268,6 +2269,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 %endif
 
 %changelog
+* Mon May 12 2014 Caolán McNamara <caolanm at redhat.com> - 1:4.2.4.2-9
+- Resolves: rhbz#1096486 avoid access to nonexisting parent
+
 * Fri May 09 2014 David Tardon <dtardon at redhat.com> - 1:4.2.4.2-8
 - Resolves: rhbz#1071604 Draw depends on files from libreoffice-impress, crashes
   without them


More information about the scm-commits mailing list