From 4620d64546aa381e4ac445e1b2adc9c31494d0ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 2 Dec 2014 17:55:48 +0000 Subject: [PATCH] Fix slow updates with annotations --- ...expensive-Invalidate-on-scrollbar-to.patch | 57 +++++++++++++++++++ libreoffice.spec | 1 + 2 files changed, 58 insertions(+) create mode 100644 0001-Only-call-super-expensive-Invalidate-on-scrollbar-to.patch diff --git a/0001-Only-call-super-expensive-Invalidate-on-scrollbar-to.patch b/0001-Only-call-super-expensive-Invalidate-on-scrollbar-to.patch new file mode 100644 index 0000000..6f9d7e9 --- /dev/null +++ b/0001-Only-call-super-expensive-Invalidate-on-scrollbar-to.patch @@ -0,0 +1,57 @@ +From 19839b479acd5637a08cb00ea6146bdb7fc8128b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Tue, 2 Dec 2014 17:42:55 +0000 +Subject: [PATCH] Only call super-expensive Invalidate on scrollbar toggling + +otherwise even using backspace in an annotated area will cause super slow +behaviour as each keystroke causes a full page render + +This became a problem after + +commit 0761f81643a6890457e9ef7d913ab5c88c2593a4 +Date: Thu Dec 19 18:50:58 2013 +0000 + 123792: complete annotations on text ranges feature + +but underlying problem was always there ready to trigger. + +For this case only render the full page if the state +of comments scrollbars *toggles*, i.e. if there wasn't +scrollbars and there ends up still with no scrollbars +avoid the (bad) hack of invalidating the page + +(cherry picked from commit 378c74ce290ab772f962db51ff8cba200cb40144) + +Conflicts: + sw/source/uibase/docvw/PostItMgr.cxx + +Change-Id: Ic7fd432d2317b0f5ad8d8773636f99fe75d660d6 +(cherry picked from commit 7e75eab406c5e58e40987ab8a249dbacbb685551) +--- + sw/source/core/uibase/docvw/PostItMgr.cxx | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sw/source/core/uibase/docvw/PostItMgr.cxx b/sw/source/core/uibase/docvw/PostItMgr.cxx +index d51ebff..b36e86f 100644 +--- a/sw/source/core/uibase/docvw/PostItMgr.cxx ++++ b/sw/source/core/uibase/docvw/PostItMgr.cxx +@@ -764,7 +764,8 @@ void SwPostItMgr::LayoutPostIts() + } + else + { +- bUpdate = true; ++ if (mPages[n]->bScrollbar) ++ bUpdate = true; + mPages[n]->bScrollbar = false; + } + } +@@ -796,7 +797,6 @@ void SwPostItMgr::LayoutPostIts() + if ( bRepair ) + CheckForRemovedPostIts(); + } +- + // notes scrollbar is otherwise not drawn correctly for some cases + // scrollbar area is enough + if (bUpdate) +-- +1.9.3 + diff --git a/libreoffice.spec b/libreoffice.spec index 74fb189..2223306 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -326,6 +326,7 @@ Patch18: 0001-Resolves-fdo-86466-Wrong-background-color-shown-in-f.patch Patch19: 0001-Revert-Resolves-i63015-always-default-to-WinAnsiEnco.patch Patch20: 0001-Resolves-fdo-84043-don-t-create-duplicate-Mirrored-X.patch Patch21: 0001-Resolves-rhbz-1165444-abrt-crash-with-NULL-pView.patch +Patch22: 0001-Only-call-super-expensive-Invalidate-on-scrollbar-to.patch %define instdir %{_libdir} %define baseinstdir %{instdir}/libreoffice