diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-02 21:04:28 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-02 21:07:56 +0000 |
commit | 1746c886362b8525b04365dd6b7203b8098b99ba (patch) | |
tree | 7835e48aa9b5d6d037faa626c9d3c895b17507d1 /sc | |
parent | 7ca0d2d8e174225d93a8b9d91d45192c75d1f56c (diff) |
Related: fdo#88455 crash using delete in available fields
Change-Id: I4ac5fe6f42b425ee96124b2dde39ff397a081638
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/dbgui/PivotLayoutTreeListData.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx index 3b9b4f1cd4c4..3e65370ae89e 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) vcl::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 1780161bd6ac..3644f8444040 100644 --- a/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx +++ b/sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx @@ -80,12 +80,14 @@ void ScPivotLayoutTreeListLabel::KeyInput(const KeyEvent& rKeyEvent) vcl::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); } |