[Libreoffice-commits] core.git: sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 25 17:30:59 UTC 2020
sc/source/ui/view/gridwin.cxx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 4bf172040dd2bd301b42269abf690188a2f9d698
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon May 25 09:24:57 2020 +0100
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Mon May 25 19:30:27 2020 +0200
if the scenario button is at the bottom of the range place the menu below it
and not over it
Change-Id: I7f6e803fccbac00a22cb049c428a09d07b29bf04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94772
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 8581772eca92..0e2c81780afd 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -925,6 +925,8 @@ void ScGridWindow::LaunchDPFieldMenu( SCCOL nCol, SCROW nRow )
void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
{
+ bool bMenuAtTop = true;
+
ScDocument* pDoc = pViewData->GetDocument();
mpFilterBox.disposeAndClear();
mpFilterFloat.disposeAndClear();
@@ -935,7 +937,7 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
{
nRow = rScenRange.aEnd.Row() + 1; // Range at very the top -> Button below
if (nRow>pDoc->MaxRow()) nRow = pDoc->MaxRow();
- //! Add text height (if it is stored in the View...)
+ bMenuAtTop = false;
}
SCTAB nTab = pViewData->GetTabNo();
@@ -953,6 +955,12 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
tools::Rectangle aCellRect( OutputToScreenPixel(aPos), Size(nSizeX,nSizeY) );
aCellRect.AdjustTop( -nSizeY );
aCellRect.AdjustBottom( -(nSizeY - 1) );
+ if (!bMenuAtTop)
+ {
+ Size aButSize = pViewData->GetScenButSize();
+ aCellRect.AdjustBottom(aButSize.Height());
+ }
+
// Place the ListBox directly below the black line of the cell grid
// (It looks odd if the line gets hidden...)
More information about the Libreoffice-commits
mailing list