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@collabora.com>
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 0ff9e37..772dd2e 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;