Kaydet (Commit) 5c0653a4 authored tarafından Caolán McNamara's avatar Caolán McNamara

out by 1, attempt to remove non-existing entry

Change-Id: If442340bd718932ace4f0919ac274d81faa07c60
Reviewed-on: https://gerrit.libreoffice.org/72037
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 7f6d5dfb
...@@ -450,9 +450,9 @@ namespace { ...@@ -450,9 +450,9 @@ namespace {
void UpdateStyleList(ListBox& rLbStyle, const ScDocument* pDoc) void UpdateStyleList(ListBox& rLbStyle, const ScDocument* pDoc)
{ {
OUString aSelectedStyle = rLbStyle.GetSelectedEntry(); OUString aSelectedStyle = rLbStyle.GetSelectedEntry();
for(sal_Int32 i = rLbStyle.GetEntryCount(); i >= 1; --i) for(sal_Int32 i = rLbStyle.GetEntryCount(); i > 1; --i)
{ {
rLbStyle.RemoveEntry(i); rLbStyle.RemoveEntry(i - 1);
} }
FillStyleListBox(pDoc, rLbStyle); FillStyleListBox(pDoc, rLbStyle);
rLbStyle.SelectEntry(aSelectedStyle); rLbStyle.SelectEntry(aSelectedStyle);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment