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 88d6e6873fe05ada6ee7178811b0b6f0a3f14635 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Fri Jul 2 12:56:09 2021 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Thu Jul 29 22:02:19 2021 +0200 lok sidebar: remove unused code Change-Id: I88325246d4997d44b4a1ca681627ca00ade1f030 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118285 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119664 Tested-by: Jenkins diff --git a/include/sfx2/sidebar/Deck.hxx b/include/sfx2/sidebar/Deck.hxx index 1c6d2faae379..47f3d6434eb2 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; sal_Int32 GetMinimalWidth() const { return mnMinimalWidth; } 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 82c0c8f350c7..7494e99c7feb 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -114,20 +114,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 116af3e8c8bf..b81080c546cd 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -503,8 +503,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 f8405e7989a9..48ef151b9d61 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) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits