[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sfx2/source

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Mon Jan 18 14:54:06 UTC 2021


 sfx2/source/sidebar/DeckLayouter.cxx      |    7 ++++++-
 sfx2/source/sidebar/SidebarController.cxx |    6 +++++-
 sfx2/source/sidebar/TabBar.cxx            |    5 +++++
 3 files changed, 16 insertions(+), 2 deletions(-)

New commits:
commit e8b98ef6c2b4e8cbcb83309fdcafb1cb8289dfa6
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Sat Jan 16 17:56:34 2021 +0000
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Jan 18 15:53:31 2021 +0100

    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 at gmail.com>
    Reviewed-by: Ashod Nakashian <ash at collabora.com>

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)


More information about the Libreoffice-commits mailing list