diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2021-01-16 17:56:34 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-01-18 15:53:31 +0100 |
commit | e8b98ef6c2b4e8cbcb83309fdcafb1cb8289dfa6 (patch) | |
tree | 584f100c9514c999ae84373595ebab65cc4cff05 /sfx2 | |
parent | 077eb097fd0b0429286c2a61eef923c56ad9685e (diff) |
sidebar: avoid invalidation thrash with LOK.
Avoids complete sidebar invalidate when entering text into a cell
and hitting enter.
Change-Id: I88ee3792589a1c0a16ae555da77ed7c12ca5f296
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109455
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ash@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/sidebar/DeckLayouter.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/sidebar/TabBar.cxx | 5 |
3 files changed, 16 insertions, 2 deletions
diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx index bc1bf6e93986..71d732f48cbc 100644 --- a/sfx2/source/sidebar/DeckLayouter.cxx +++ b/sfx2/source/sidebar/DeckLayouter.cxx @@ -613,7 +613,12 @@ void UpdateFiller ( vcl::Window& rFiller, const tools::Rectangle& rBox) { - if (rBox.GetHeight() > 0) + if (comphelper::LibreOfficeKit::isActive()) + { + // Not shown on LOK, and causes invalidation thrash + rFiller.Hide(); + } + else if (rBox.GetHeight() > 0) { // Show the filler. rFiller.SetBackground(Theme::GetPaint(Theme::Paint_PanelBackground).GetWallpaper()); diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index d6c1103850e2..bb1592627c94 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -797,7 +797,11 @@ void SidebarController::SwitchToDeck ( msCurrentDeckId = rDeckDescriptor.msId; } - mpTabBar->Invalidate(); + + // invisible with LOK, so avoid invalidations + if (!comphelper::LibreOfficeKit::isActive()) + mpTabBar->Invalidate(); + mpTabBar->HighlightDeck(msCurrentDeckId); // Determine the panels to display in the deck. diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 96b00f54939e..3dd2af4b7874 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -30,6 +30,7 @@ #include <sfx2/sfxresid.hxx> +#include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <vcl/commandevent.hxx> #include <vcl/event.hxx> @@ -108,6 +109,10 @@ sal_Int32 TabBar::GetDefaultWidth() void TabBar::SetDecks(const ResourceManager::DeckContextDescriptorContainer& rDecks) { + // invisible with LOK, so keep empty to avoid invalidations + if (comphelper::LibreOfficeKit::isActive()) + return; + // Remove the current buttons. { for (auto & item : maItems) |