sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx | 5 +++-- sc/source/ui/dbgui/PivotLayoutTreeListData.cxx | 10 ++++++---- sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx | 10 ++++++---- 3 files changed, 15 insertions(+), 10 deletions(-)
New commits: commit b195fc7549dd17fb659795ea9e916af99f9909b5 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Feb 2 21:04:28 2015 +0000 Related: fdo#88455 crash using delete in available fields Change-Id: I4ac5fe6f42b425ee96124b2dde39ff397a081638 (cherry picked from commit 1746c886362b8525b04365dd6b7203b8098b99ba) Reviewed-on: https://gerrit.libreoffice.org/14290 Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx index 2d53653..a2c78e9 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx @@ -253,12 +253,14 @@ void ScPivotLayoutTreeListData::KeyInput(const KeyEvent& rKeyEvent) KeyCode aCode = rKeyEvent.GetKeyCode(); sal_uInt16 nCode = aCode.GetCode(); - switch (nCode) + if (nCode == KEY_DELETE) { - case KEY_DELETE: - GetModel()->Remove(GetCurEntry()); - return; + const SvTreeListEntry* pEntry = GetCurEntry(); + if (pEntry) + GetModel()->Remove(pEntry); + return; } + SvTreeListBox::KeyInput(rKeyEvent); } diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx index 6617b0b..013ce2c 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx @@ -78,12 +78,14 @@ void ScPivotLayoutTreeListLabel::KeyInput(const KeyEvent& rKeyEvent) KeyCode aCode = rKeyEvent.GetKeyCode(); sal_uInt16 nCode = aCode.GetCode(); - switch (nCode) + if (nCode == KEY_DELETE) { - case KEY_DELETE: - GetModel()->Remove(GetCurEntry()); - return; + const SvTreeListEntry* pEntry = GetCurEntry(); + if (pEntry) + GetModel()->Remove(pEntry); + return; } + SvTreeListBox::KeyInput(rKeyEvent); } commit 86ea9493fda77e6aa5e6ebd666b2d8306057d6cc Author: Caolán McNamara <caol...@redhat.com> Date: Sat Jan 24 20:59:27 2015 +0000 Resolves: rhbz#1179642 crash in GetFocus with empty mpPreviouslyFocusedListBox Change-Id: I7559067c00617482d34e7cbdd177202868cbfc76 (cherry picked from commit dae7d2089516d9cf014b9fad0adb484f19282a29) Reviewed-on: https://gerrit.libreoffice.org/14161 Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx index f4201dc..9dd08ce 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx @@ -122,9 +122,10 @@ void ScPivotLayoutTreeListBase::GetFocus() if( GetGetFocusFlags() & GETFOCUS_MNEMONIC ) { SvTreeListEntry* pEntry = mpParent->mpPreviouslyFocusedListBox->GetCurEntry(); - InsertEntryForSourceTarget(pEntry, NULL); + if (pEntry) + InsertEntryForSourceTarget(pEntry, NULL); - if(mpParent->mpPreviouslyFocusedListBox != NULL) + if (mpParent->mpPreviouslyFocusedListBox != NULL) mpParent->mpPreviouslyFocusedListBox->GrabFocus(); }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits