[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - include/sfx2 sfx2/source

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 2 11:54:36 UTC 2021


 include/sfx2/sidebar/Deck.hxx                 |    2 -
 include/sfx2/sidebar/SidebarDockingWindow.hxx |    5 ---
 sfx2/source/sidebar/Deck.cxx                  |   14 -----------
 sfx2/source/sidebar/SidebarController.cxx     |    2 -
 sfx2/source/sidebar/SidebarDockingWindow.cxx  |   33 --------------------------
 5 files changed, 56 deletions(-)

New commits:
commit bcb1ce26225cefe953bc018192d12fca1a8023df
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Jul 2 12:56:09 2021 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Fri Jul 2 13:53:59 2021 +0200

    lok sidebar: remove unused code
    
    Change-Id: I88325246d4997d44b4a1ca681627ca00ade1f030
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118285
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/include/sfx2/sidebar/Deck.hxx b/include/sfx2/sidebar/Deck.hxx
index 489f6137b3a7..f5940366fa1f 100644
--- a/include/sfx2/sidebar/Deck.hxx
+++ b/include/sfx2/sidebar/Deck.hxx
@@ -62,8 +62,6 @@ public:
 
     virtual void DataChanged(const DataChangedEvent& rEvent) override;
 
-    virtual void Resize() override;
-
     virtual void DumpAsPropertyTree(tools::JsonWriter&) override;
 
     static void PrintWindowSubTree(vcl::Window* pRoot, int nIndentation);
diff --git a/include/sfx2/sidebar/SidebarDockingWindow.hxx b/include/sfx2/sidebar/SidebarDockingWindow.hxx
index ff7f2d2aff38..9bad1f5a8464 100644
--- a/include/sfx2/sidebar/SidebarDockingWindow.hxx
+++ b/include/sfx2/sidebar/SidebarDockingWindow.hxx
@@ -45,22 +45,17 @@ public:
     /// Force generation of all panels by completion.
     void SyncUpdate();
 
-    void NotifyResize();
     auto& GetSidebarController() const { return mpSidebarController; }
     using SfxDockingWindow::Close;
 
 private:
     // Window overridables
     virtual void GetFocus() override;
-    virtual void Resize() override;
 
     virtual SfxChildAlignment CheckAlignment (
         SfxChildAlignment eCurrentAlignment,
         SfxChildAlignment eRequestedAlignment) override;
 
-    /// Notify LOKit that we closed and release the LOKNotifier.
-    void LOKClose();
-
     ::rtl::Reference<sfx2::sidebar::SidebarController> mpSidebarController;
     bool mbIsReadyToDrag;
     std::unique_ptr<svt::AcceleratorExecute> mpAccel;
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index 9b266acb4e9b..ebe147fcc2d2 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -116,20 +116,6 @@ void Deck::DataChanged(const DataChangedEvent&)
     RequestLayoutInternal();
 }
 
-void Deck::Resize()
-{
-    InterimItemWindow::Resize();
-
-    if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
-    {
-        std::vector<vcl::LOKPayloadItem> aItems;
-        aItems.emplace_back("type", "deck");
-        aItems.emplace_back(std::make_pair("position", Point(GetOutOffXPixel(), GetOutOffYPixel()).toString()));
-        aItems.emplace_back(std::make_pair("size", GetSizePixel().toString()));
-        pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems);
-    }
-}
-
 /*
  * Get the ordering as is shown in the layout, and our type as 'deck'
  * also elide nested panel windows.
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 90ddc0b6c6d4..0f46d910d2cc 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -479,8 +479,6 @@ void SidebarController::NotifyResize()
     }
 
     RestrictWidth(nMinimalWidth);
-
-    mpParentWindow->NotifyResize();
 }
 
 void SidebarController::ProcessNewWidth (const sal_Int32 nNewWidth)
diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx
index f536165255d8..d50aa2b3d4b0 100644
--- a/sfx2/source/sidebar/SidebarDockingWindow.cxx
+++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx
@@ -67,9 +67,6 @@ SidebarDockingWindow::~SidebarDockingWindow()
 
 void SidebarDockingWindow::dispose()
 {
-    if (comphelper::LibreOfficeKit::isActive())
-        LOKClose();
-
     Reference<lang::XComponent> xComponent (static_cast<XWeak*>(mpSidebarController.get()), UNO_QUERY);
     mpSidebarController.clear();
     if (xComponent.is())
@@ -78,13 +75,6 @@ void SidebarDockingWindow::dispose()
     SfxDockingWindow::dispose();
 }
 
-void SidebarDockingWindow::LOKClose()
-{
-    assert(comphelper::LibreOfficeKit::isActive());
-    if (GetLOKNotifier())
-        ReleaseLOKNotifier();
-}
-
 void SidebarDockingWindow::GetFocus()
 {
     if (mpSidebarController.is())
@@ -104,35 +94,12 @@ bool SidebarDockingWindow::Close()
     return SfxDockingWindow::Close();
 }
 
-void SidebarDockingWindow::Resize()
-{
-    SfxDockingWindow::Resize();
-
-    NotifyResize();
-}
-
 void SidebarDockingWindow::SyncUpdate()
 {
     if (mpSidebarController.is())
         mpSidebarController->SyncUpdate();
 }
 
-void SidebarDockingWindow::NotifyResize()
-{
-    if (!(comphelper::LibreOfficeKit::isActive() && mpSidebarController.is() && SfxViewShell::Current()))
-        return;
-
-    const vcl::ILibreOfficeKitNotifier* pCurrentView = SfxViewShell::Current();
-    if (GetLOKNotifier() != pCurrentView)
-    {
-        // ViewShell not yet set, or has changed. Reset it.
-        // Note GetLOKWindowId will return a new value after resetting, so we must notify clients.
-        LOKClose();
-
-        SetLOKNotifier(pCurrentView);
-    }
-}
-
 SfxChildAlignment SidebarDockingWindow::CheckAlignment (
     SfxChildAlignment eCurrentAlignment,
     SfxChildAlignment eRequestedAlignment)


More information about the Libreoffice-commits mailing list