summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-04-22 10:16:55 +0200
committerTor Lillqvist <tml@collabora.com>2021-04-26 11:45:32 +0200
commita03308be5096b95edc77d22837fb6acde2e1b0f3 (patch)
tree3a1eaed8a3a69b633b4e5a407e31bce7ce934bc4
parenta31145dee7908dd1dc800cdc0aea26b5fd17645d (diff)
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 <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r--sc/source/ui/app/inputwin.cxx10
-rw-r--r--sc/source/ui/inc/inputwin.hxx1
2 files changed, 1 insertions, 10 deletions
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