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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Feb 13 07:37:05 UTC 2019


 sc/source/ui/cctrl/checklistmenu.cxx |   36 +++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 16780939141031632d04603a148859dc8a1ef3e1
Author:     heiko tietze <tietze.heiko at gmail.com>
AuthorDate: Tue Feb 12 10:38:09 2019 +0100
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Wed Feb 13 08:36:41 2019 +0100

    Resolves tdf#122998 - Position of all/none checkboxes in Autofilter
    
    Checkboxes moved above the listbox
    
    Change-Id: I8f4ef437815741e26032f47c952c32d3e5d7db56
    Reviewed-on: https://gerrit.libreoffice.org/67712
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 0ff9e37cc615..772dd2e94858 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -951,7 +951,7 @@ void ScCheckListMenuWindow::getSectionPosSize(
     const long nListBoxHeight = maWndSize.Height() - nTopMargin - nMenuHeight -
         nMenuListMargin - nSearchBoxHeight - nSearchBoxMargin - nSingleItemBtnAreaHeight - nBottomBtnAreaHeight;
 
-    const long nSingleBtnAreaY = nTopMargin + nMenuHeight + nListBoxHeight + nMenuListMargin + nSearchBoxHeight + nSearchBoxMargin - 1;
+    const long nSingleBtnAreaY = nTopMargin + nMenuHeight + nMenuListMargin + nSearchBoxHeight + nSearchBoxMargin;
 
     switch (eType)
     {
@@ -967,23 +967,6 @@ void ScCheckListMenuWindow::getSectionPosSize(
             rSize = Size(maWndSize.Width() - 2*nSearchBoxMargin, nSearchBoxHeight);
         }
         break;
-        case LISTBOX_AREA_OUTER:
-        {
-            rPos = Point(nListBoxMargin, nTopMargin + nMenuHeight + nMenuListMargin + nSearchBoxHeight + nSearchBoxMargin);
-            rSize = Size(nListBoxWidth, nListBoxHeight);
-        }
-        break;
-        case LISTBOX_AREA_INNER:
-        {
-            rPos = Point(nListBoxMargin, nTopMargin + nMenuHeight + nMenuListMargin + nSearchBoxHeight + nSearchBoxMargin);
-            rPos.AdjustX(nListBoxInnerPadding );
-            rPos.AdjustY(nListBoxInnerPadding );
-
-            rSize = Size(nListBoxWidth, nListBoxHeight);
-            rSize.AdjustWidth( -(nListBoxInnerPadding*2) );
-            rSize.AdjustHeight( -(nListBoxInnerPadding*2) );
-        }
-        break;
         case SINGLE_BTN_AREA:
         {
             rPos = Point(nListBoxMargin, nSingleBtnAreaY);
@@ -1017,6 +1000,23 @@ void ScCheckListMenuWindow::getSectionPosSize(
             rSize = Size(h, h);
         }
         break;
+        case LISTBOX_AREA_OUTER:
+        {
+            rPos = Point(nListBoxMargin, nSingleBtnAreaY + nSingleItemBtnAreaHeight-1);
+            rSize = Size(nListBoxWidth, nListBoxHeight);
+        }
+        break;
+        case LISTBOX_AREA_INNER:
+        {
+            rPos = Point(nListBoxMargin, nSingleBtnAreaY + nSingleItemBtnAreaHeight-1);
+            rPos.AdjustX(nListBoxInnerPadding );
+            rPos.AdjustY(nListBoxInnerPadding );
+
+            rSize = Size(nListBoxWidth, nListBoxHeight);
+            rSize.AdjustWidth( -(nListBoxInnerPadding*2) );
+            rSize.AdjustHeight( -(nListBoxInnerPadding*2) );
+        }
+        break;
         case BTN_OK:
         {
             long x = (maWndSize.Width() - nBtnWidth*2)/3;


More information about the Libreoffice-commits mailing list