sc/source/ui/app/inputwin.cxx |    9 +--------
 sc/source/ui/inc/inputwin.hxx |    2 --
 2 files changed, 1 insertion(+), 10 deletions(-)

New commits:
commit 9739a874b64e770728d62713b070f37de4ec8328
Author:     Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
AuthorDate: Thu Jan 26 16:52:32 2023 +0100
Commit:     Kohei Yoshida <ko...@libreoffice.org>
CommitDate: Fri Feb 3 02:06:13 2023 +0000

    tdf#151682 Fix gap above input bar
    
    Remove vertical offset, looks like it's not needed anymore.
    
    Change-Id: If0f7f7dce7a7e4249036930b60fe353890b495fc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146179
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
    (cherry picked from commit f7544650cc4e31da67873898e2d587afa846b9b4)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146199
    Reviewed-by: Kohei Yoshida <ko...@libreoffice.org>

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 14ef498976ba..14249fe2eb04 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -495,7 +495,7 @@ void ScInputWindow::Resize()
         if (pGroupBar->GetNumLines() > 1)
         {
             Size aGroupBarSize = pGroupBar->GetSizePixel();
-            aSize.setHeight(aGroupBarSize.Height() + 2 * 
(pGroupBar->GetVertOffset() + 1));
+            aSize.setHeight(aGroupBarSize.Height());
         }
     }
     SetSizePixel(aSize);
@@ -847,7 +847,6 @@ ScInputBarGroup::ScInputBarGroup(vcl::Window* pParent, 
ScTabViewShell* pViewSh)
     , mxTextWndGroup(new ScTextWndGroup(*this, pViewSh))
     , mxButtonUp(m_xBuilder->weld_button("up"))
     , mxButtonDown(m_xBuilder->weld_button("down"))
-    , mnVertOffset(0)
 {
     InitControlBase(m_xContainer.get());
 
@@ -1083,12 +1082,6 @@ void ScInputBarGroup::TriggerToolboxLayout()
     ScInputWindow &rParent = dynamic_cast<ScInputWindow&>(*w);
     SfxViewFrame* pViewFrm = SfxViewFrame::Current();
 
-    // Capture the vertical position of this window in the toolbar, when we 
increase
-    // the size of the toolbar to accommodate expanded line input we need to 
take this
-    // into account
-    if ( !mnVertOffset )
-        mnVertOffset = rParent.GetItemPosRect( rParent.GetItemCount() - 1 
).Top();
-
     if ( !pViewFrm )
         return;
 
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 12bc461f2836..ac96062af137 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -262,7 +262,6 @@ public:
     void                    DecrementVerticalSize();
     void                    NumLinesChanged();
     virtual tools::Long            GetNumLines() const override { return 
mxTextWndGroup->GetNumLines(); }
-    tools::Long                    GetVertOffset() const { return  
mnVertOffset; }
 
     int GetPixelHeightForLines() const
     {
@@ -278,7 +277,6 @@ private:
     std::unique_ptr<ScTextWndGroup> mxTextWndGroup;
     std::unique_ptr<weld::Button> mxButtonUp;
     std::unique_ptr<weld::Button> mxButtonDown;
-    tools::Long                   mnVertOffset;
 
     DECL_LINK(ClickHdl, weld::Button&, void);
 };

Reply via email to