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

New commits:
commit a03308be5096b95edc77d22837fb6acde2e1b0f3
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Thu Apr 22 10:16:55 2021 +0200
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Mon Apr 26 11:45:32 2021 +0200

    Revert ScInputWindow::setPosSizePixel() early returns
    
    Revert changes that were introduced to fix CollaboraOnline/online#1988
    because it should be fixed in online
    
    The root cause was that online was sending "resizewindow"
    even when size was not changed what was triggering many times
    ScInputWindow::setPosSizePixel(). (before online fix "resizewindow"
    message was sent on every sidebar refresh)
    
    "Fix early return in ScInputWindow::setPosSizePixel"
    reverts commit a9e0bbadb151d6cfe652fad1d49147f559a6d83c.
    
    "Early return from ScInputWindow::setPosSizePixel() if no-op"
    reverts commit 0ad467d9abd27197bc5f7f22db5a25b3246e6808.
    
    Change-Id: Iad1c3d427a5feefdbb2bac912710847addf4ee02
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114474
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tor Lillqvist <t...@collabora.com>

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 219ea73796c7..b718ba7cb7a5 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -170,8 +170,7 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, const 
SfxBindings* pBind ) :
         mpViewShell     ( nullptr ),
         mnMaxY          (0),
         bIsOkCancelMode ( false ),
-        bInResize       ( false ),
-        nOldOutOffYPixel( GetOutOffYPixel() )
+        bInResize       ( false )
 {
     // #i73615# don't rely on SfxViewShell::Current while constructing the 
input line
     // (also for GetInputHdl below)
@@ -491,11 +490,6 @@ void ScInputWindow::SetSizePixel( const Size& rNewSize )
 void ScInputWindow::setPosSizePixel(long nX, long nY, long nWidth, long 
nHeight, PosSizeFlags nFlags)
 {
     ToolBox::setPosSizePixel(nX, nY, nWidth, nHeight, nFlags);
-
-    // send update only when position changed eg. when notebookbar was opened
-    if (nOldOutOffYPixel == GetOutOffYPixel())
-        return;
-
     if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
     {
         std::vector<vcl::LOKPayloadItem> aItems;
@@ -504,8 +498,6 @@ void ScInputWindow::setPosSizePixel(long nX, long nY, long 
nWidth, long nHeight,
         aItems.emplace_back("lines", 
OString::number(aTextWindow.GetNumLines()));
         pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems);
     }
-
-    nOldOutOffYPixel = GetOutOffYPixel();
 }
 
 void ScInputWindow::Resize()
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 1e5df79e761e..c77ecb8d0e59 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -315,7 +315,6 @@ private:
     long            mnMaxY;
     bool            bIsOkCancelMode;
     bool            bInResize;
-    long            nOldOutOffYPixel;
 };
 
 class ScInputWindowWrapper : public SfxChildWindow
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to