summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2021-01-16 17:56:34 +0000
committerMichael Meeks <michael.meeks@collabora.com>2021-01-17 00:13:56 +0100
commiteecedf21f4869dd52a6498377e35d85d2321ac80 (patch)
tree21273554bd26b224fe85f8b440f11bf51765251e /sfx2
parent8941f3f65e149c9f53c425c9cc153b32d8cd2482 (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/+/109403 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/sidebar/DeckLayouter.cxx7
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx6
-rw-r--r--sfx2/source/sidebar/TabBar.cxx5
3 files changed, 16 insertions, 2 deletions
diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx
index c4c9cd4b9a81..f90ec176b2d0 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::GetColor(Theme::Color_PanelBackground));
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 168719f84d23..60013c9b9274 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -793,7 +793,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 fc6124f79659..b989cb7d0964 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -24,6 +24,7 @@
#include <sfx2/sidebar/FocusManager.hxx>
#include <sfx2/sidebar/SidebarController.hxx>
+#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <o3tl/safeint.hxx>
#include <vcl/commandevent.hxx>
@@ -104,6 +105,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.
maItems.clear();
for (auto const& deck : rDecks)