[Libreoffice-commits] core.git: sc/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu May 9 13:15:59 UTC 2019


 sc/source/ui/condformat/condformatdlgentry.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5c0653a4184ebf5353263083bd7b4818f7cd6c2e
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu May 9 12:07:16 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu May 9 15:14:44 2019 +0200

    out by 1, attempt to remove non-existing entry
    
    Change-Id: If442340bd718932ace4f0919ac274d81faa07c60
    Reviewed-on: https://gerrit.libreoffice.org/72037
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index e059f7bef59e..8b1eb6e47c24 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -450,9 +450,9 @@ namespace {
 void UpdateStyleList(ListBox& rLbStyle, const ScDocument* pDoc)
 {
     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);
     rLbStyle.SelectEntry(aSelectedStyle);


More information about the Libreoffice-commits mailing list