diff options
author | Tamás Zolnai <tamas.zolnai@collabora.com> | 2019-03-11 10:21:29 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-03-18 10:03:12 +0100 |
commit | 4479eac3ce1a154c538b04165746ba993e981ed9 (patch) | |
tree | 95e0ef1364f80a3ecfe3a31d877f06014350565c /sw | |
parent | 0b2d434106c50785b1c0317d49368c0dc6d084b0 (diff) |
MSForms: Fix removal of all items on the drop-down form field dialog
Reviewed-on: https://gerrit.libreoffice.org/69038
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
(cherry picked from commit 31f1789c810970fda7b300b2943f20e10761a5e0)
Change-Id: I37ffbbe48a8b08cc10c83d4bb68946908475776d
Reviewed-on: https://gerrit.libreoffice.org/69201
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/fldui/DropDownFormFieldDialog.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/ui/fldui/DropDownFormFieldDialog.cxx b/sw/source/ui/fldui/DropDownFormFieldDialog.cxx index 0a80eae05300..5ad97b85978c 100644 --- a/sw/source/ui/fldui/DropDownFormFieldDialog.cxx +++ b/sw/source/ui/fldui/DropDownFormFieldDialog.cxx @@ -68,7 +68,8 @@ IMPL_LINK(DropDownFormFieldDialog, ButtonPushedHdl, Button*, pButton, void) if (pButton == m_xListRemoveButton) { m_xListItemsTreeView->RemoveEntry(nSelPos); - m_xListItemsTreeView->SelectEntryPos(nSelPos > 0 ? nSelPos - 1 : 0); + if (m_xListItemsTreeView->GetEntryCount() > 0) + m_xListItemsTreeView->SelectEntryPos(nSelPos > 0 ? nSelPos - 1 : 0); } else if (pButton == m_xListUpButton) { |