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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 16 20:35:14 UTC 2020


 sc/source/ui/cctrl/checklistmenu.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f51ea6c297d17299c93e0560a9b4f90ebc2446d4
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jun 16 16:19:23 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jun 16 22:34:23 2020 +0200

    tdf#134038 use mnCheckWidthReq to avoid text width calculation
    
    when mnCheckWidthReq is available
    
    Change-Id: I9964b1df9e025ab737d0d306148930c34b7d7148
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96474
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index f095e66c2e6d..37d63fba77a8 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1180,6 +1180,7 @@ size_t ScCheckListMenuControl::initMembers()
 
     if (!mxChecks->n_children() && !mbHasDates)
     {
+        std::vector<int> aFixedWidths { mnCheckWidthReq };
         // tdf#134038 insert in the fastest order, this might be backwards so only do it for
         // the !mbHasDates case where no entry depends on another to exist before getting
         // inserted. We cannot retain pre-existing treeview content, only clear and fill it.
@@ -1188,7 +1189,7 @@ size_t ScCheckListMenuControl::initMembers()
             insertMember(*mxChecks, rIter, maMembers[i]);
             if (maMembers[i].mbVisible)
                 ++nVisMemCount;
-        });
+        }, mnCheckWidthReq != -1 ? &aFixedWidths : nullptr);
     }
     else
     {


More information about the Libreoffice-commits mailing list