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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Nov 20 15:29:41 UTC 2018


 cui/source/tabpages/numfmt.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit c03a70770e667290e3766e639300c7ecef5eea1f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Nov 20 11:53:03 2018 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Nov 20 16:29:15 2018 +0100

    tdf#121538 index 1 never existed
    
    Change-Id: I8493685ceab81a2bd07a3fc75b371a0f679695fb
    Reviewed-on: https://gerrit.libreoffice.org/63651
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index a13403059b88..69b25330c98e 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1612,7 +1612,9 @@ IMPL_LINK_NOARG(SvxNumberFormatTabPage, LostFocusHdl_Impl, weld::Widget&, void)
     {
         sal_uInt16 nSelPos = m_xLbFormat->get_selected_index();
         pNumFmtShell->SetComment4Entry(nSelPos, m_xEdComment->get_text());
-        m_xEdComment->set_text(m_xLbCategory->get_text(1));    // String for user defined
+        // String for user defined, if present
+        OUString sEntry = m_xLbCategory->n_children() > 1 ? m_xLbCategory->get_text(1) : OUString();
+        m_xEdComment->set_text(sEntry);
     }
 }
 


More information about the Libreoffice-commits mailing list