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

Dennis Francis (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 29 17:55:51 UTC 2020


 sc/source/ui/view/gridwin.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 7e841c7e6546a6a3861c2d45ffc28fd427d0c597
Author:     Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Sun Apr 26 05:38:01 2020 +0530
Commit:     Dennis Francis <dennis.francis at collabora.com>
CommitDate: Wed Apr 29 19:55:15 2020 +0200

    lokit: trim validation dropdown height to content
    
    The validation dropdown looks ugly for lists with small number of
    items as its height is hardcoded to
    
    SC_FILTERLISTBOX_LINES(=12) * TextHeight
    
    Instead lets use the number of entries in the list to determine
    the height if this count is less than SC_FILTERLISTBOX_LINES
    
    Change-Id: If026140044e6665159cd616c13a2eb57356ae53f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92914
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Dennis Francis <dennis.francis at collabora.com>
    (cherry picked from commit adf10bae8aecd8b765a21660b31056292276bdb2)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93066
    Tested-by: Jenkins

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index b14ffb1f9a43..98b025f6cf61 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1138,9 +1138,13 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow )
 
         // minimum width in pixel
         const long nMinLOKWinWidth = static_cast<long>(1.3 * STD_COL_WIDTH * pViewData->GetPPTX());
-        if (comphelper::LibreOfficeKit::isActive() && nSizeX < nMinLOKWinWidth)
+        bool bLOKActive = comphelper::LibreOfficeKit::isActive();
+        if (bLOKActive && nSizeX < nMinLOKWinWidth)
             nSizeX = nMinLOKWinWidth;
 
+        if (bLOKActive && aStrings.size() < SC_FILTERLISTBOX_LINES)
+            nHeight = nHeight * (aStrings.size() + 1) / SC_FILTERLISTBOX_LINES;
+
         Size aParentSize = GetParent()->GetOutputSizePixel();
         Size aSize( nSizeX, nHeight );
 


More information about the Libreoffice-commits mailing list