sc/source/ui/app/inputwin.cxx | 12 ++++++++---- sc/source/ui/inc/inputwin.hxx | 1 + 2 files changed, 9 insertions(+), 4 deletions(-)
New commits: commit a9e0bbadb151d6cfe652fad1d49147f559a6d83c Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Tue Apr 20 09:08:33 2021 +0200 Commit: Tor Lillqvist <t...@collabora.com> CommitDate: Tue Apr 20 13:15:39 2021 +0200 Fix early return in ScInputWindow::setPosSizePixel change: Early return from ScInputWindow::setPosSizePixel() if no-op 0ad467d9abd27197bc5f7f22db5a25b3246e6808 was too agressive optimization causing input bar not showing in the online and blocking the fix: online: update calc inputbar position on change 09afa34955d76419ebe8f4d15780d801f95256ca Sending message was originally introduced to update information about position in the online when notebookbar become visible (what causes input bar position change). Send it only when vertical position changed. Change-Id: Id7a231dabd20efe38094f31156f4f17f7d5a478e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114318 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 b22c30c42a58..219ea73796c7 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -170,7 +170,8 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, const SfxBindings* pBind ) : mpViewShell ( nullptr ), mnMaxY (0), bIsOkCancelMode ( false ), - bInResize ( false ) + bInResize ( false ), + nOldOutOffYPixel( GetOutOffYPixel() ) { // #i73615# don't rely on SfxViewShell::Current while constructing the input line // (also for GetInputHdl below) @@ -489,11 +490,12 @@ void ScInputWindow::SetSizePixel( const Size& rNewSize ) void ScInputWindow::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags) { - if ((!(nFlags & PosSizeFlags::Size) || GetSizePixel() == Size(nWidth, nHeight)) && - (!(nFlags & PosSizeFlags::Pos) || GetPosPixel() == Point(nX, nY))) + ToolBox::setPosSizePixel(nX, nY, nWidth, nHeight, nFlags); + + // send update only when position changed eg. when notebookbar was opened + if (nOldOutOffYPixel == GetOutOffYPixel()) return; - ToolBox::setPosSizePixel(nX, nY, nWidth, nHeight, nFlags); if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) { std::vector<vcl::LOKPayloadItem> aItems; @@ -502,6 +504,8 @@ 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 c77ecb8d0e59..1e5df79e761e 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -315,6 +315,7 @@ 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