diff options
author | Noel <noelgrandin@gmail.com> | 2020-12-07 16:06:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-12-07 16:59:28 +0100 |
commit | b541cd9a8038810ce449f8c49ae179d9d6eaa7e8 (patch) | |
tree | 291a876a7d947b43cf9b59ef752e1a38bcb89851 /sfx2 | |
parent | 2538188ee85513cb80eb8aa8f925082d86ff711d (diff) |
loplugin:unusedmethods
Change-Id: Ib51fd610c5188fe95872d509f004ae88f38c5417
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107351
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/Library_sfx.mk | 1 | ||||
-rw-r--r-- | sfx2/inc/sidebar/Accessible.hxx | 60 | ||||
-rw-r--r-- | sfx2/inc/sidebar/DeckTitleBar.hxx | 2 | ||||
-rw-r--r-- | sfx2/inc/sidebar/SidebarToolBox.hxx | 3 | ||||
-rw-r--r-- | sfx2/source/control/templatelocalview.cxx | 33 | ||||
-rw-r--r-- | sfx2/source/sidebar/Accessible.cxx | 52 | ||||
-rw-r--r-- | sfx2/source/sidebar/FocusManager.cxx | 15 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarToolBox.cxx | 21 |
8 files changed, 0 insertions, 187 deletions
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk index b7f69f1d8e5b..3f1b76ecd80f 100644 --- a/sfx2/Library_sfx.mk +++ b/sfx2/Library_sfx.mk @@ -260,7 +260,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\ sfx2/source/sidebar/SidebarModelUpdate \ sfx2/source/sidebar/SidebarPanelBase \ sfx2/source/sidebar/SidebarToolBox \ - sfx2/source/sidebar/Accessible \ sfx2/source/sidebar/AsynchronousCall \ sfx2/source/sidebar/Context \ sfx2/source/sidebar/ContextChangeBroadcaster \ diff --git a/sfx2/inc/sidebar/Accessible.hxx b/sfx2/inc/sidebar/Accessible.hxx deleted file mode 100644 index 3f3d351ed8d8..000000000000 --- a/sfx2/inc/sidebar/Accessible.hxx +++ /dev/null @@ -1,60 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#pragma once - -#include <com/sun/star/accessibility/XAccessible.hpp> - -#include <cppuhelper/compbase.hxx> -#include <cppuhelper/basemutex.hxx> - -namespace com::sun::star::accessibility { class XAccessibleContext; } - -typedef cppu::WeakComponentImplHelper < - css::accessibility::XAccessible - > AccessibleInterfaceBase; - -namespace sfx2::sidebar { - - -/** Simple implementation of the XAccessible interface. - Its getAccessibleContext() method returns a context object given - to its constructor. -*/ -class Accessible final - : private ::cppu::BaseMutex, - public AccessibleInterfaceBase -{ -public: - explicit Accessible ( - const css::uno::Reference<css::accessibility::XAccessibleContext>& rxContext); - virtual ~Accessible() override; - Accessible(const Accessible&) = delete; - Accessible& operator=( const Accessible& ) = delete; - - virtual void SAL_CALL disposing() override; - // XAccessible - virtual css::uno::Reference<css::accessibility::XAccessibleContext> SAL_CALL getAccessibleContext() override; - -private: - css::uno::Reference<css::accessibility::XAccessibleContext> mxContext; -}; - -} // end of namespace sfx2::sidebar - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/DeckTitleBar.hxx b/sfx2/inc/sidebar/DeckTitleBar.hxx index 29dec2d47c3a..cad5dac3d8f4 100644 --- a/sfx2/inc/sidebar/DeckTitleBar.hxx +++ b/sfx2/inc/sidebar/DeckTitleBar.hxx @@ -44,8 +44,6 @@ public: private: virtual void HandleToolBoxItemClick() override; - DECL_LINK(DrawGripHdl, weld::DrawingArea::draw_args, void); - std::unique_ptr<GripWidget> mxGripWidget; std::unique_ptr<weld::CustomWeld> mxGripWeld; std::unique_ptr<weld::Label> mxLabel; diff --git a/sfx2/inc/sidebar/SidebarToolBox.hxx b/sfx2/inc/sidebar/SidebarToolBox.hxx index 33bfc9ec3437..38b49b49c57d 100644 --- a/sfx2/inc/sidebar/SidebarToolBox.hxx +++ b/sfx2/inc/sidebar/SidebarToolBox.hxx @@ -52,9 +52,6 @@ public: virtual bool EventNotify(NotifyEvent& rEvent) override; virtual void KeyInput( const KeyEvent& rKEvt ) override; - void SetController(const sal_uInt16 nItemId, - const css::uno::Reference<css::frame::XToolbarController>& rxController); - void InitToolBox(VclBuilder::stringmap& rMap); protected: diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx index 6c1597bea1ca..5faba8b552d1 100644 --- a/sfx2/source/control/templatelocalview.cxx +++ b/sfx2/source/control/templatelocalview.cxx @@ -177,18 +177,6 @@ void TemplateLocalView::showRegion(TemplateContainerItem const *pItem) maOpenRegionHdl.Call(nullptr); } -void TemplateLocalView::showRegion(std::u16string_view rName) -{ - for (auto const & pRegion : maRegions) - { - if (pRegion->maTitle == rName) - { - showRegion(pRegion.get()); - break; - } - } -} - TemplateContainerItem* TemplateLocalView::getRegion(std::u16string_view rName) { for (auto const & pRegion : maRegions) @@ -198,27 +186,6 @@ TemplateContainerItem* TemplateLocalView::getRegion(std::u16string_view rName) return nullptr; } -void TemplateLocalView::createContextMenu(const bool bIsDefault) -{ - mxContextMenu->clear(); - mxContextMenu->append("open",SfxResId(STR_OPEN)); - mxContextMenu->append("edit",SfxResId(STR_EDIT_TEMPLATE)); - - if(!bIsDefault) - mxContextMenu->append("default",SfxResId(STR_DEFAULT_TEMPLATE)); - else - mxContextMenu->append("default",SfxResId(STR_RESET_DEFAULT)); - - mxContextMenu->append_separator("separator"); - mxContextMenu->append("rename",SfxResId(STR_SFX_RENAME)); - mxContextMenu->append("delete",SfxResId(STR_DELETE)); - deselectItems(); - maSelectedItem->setSelection(true); - maItemStateHdl.Call(maSelectedItem); - ContextMenuSelectHdl(mxContextMenu->popup_at_rect(GetDrawingArea(), tools::Rectangle(maPosition, Size(1,1)))); - Invalidate(); -} - void TemplateLocalView::ContextMenuSelectHdl(std::string_view rIdent) { if (rIdent == "open") diff --git a/sfx2/source/sidebar/Accessible.cxx b/sfx2/source/sidebar/Accessible.cxx deleted file mode 100644 index 8eb264f39085..000000000000 --- a/sfx2/source/sidebar/Accessible.cxx +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <sidebar/Accessible.hxx> - -using namespace css; -using namespace css::uno; - -namespace sfx2::sidebar { - -Accessible::Accessible ( - const Reference<accessibility::XAccessibleContext>& rxContext) - : AccessibleInterfaceBase(m_aMutex), - mxContext(rxContext) -{ -} - -Accessible::~Accessible() -{ -} - -void SAL_CALL Accessible::disposing() -{ - Reference<XComponent> xComponent (mxContext, UNO_QUERY); - if (xComponent.is()) - xComponent->dispose(); -} - -Reference<accessibility::XAccessibleContext> SAL_CALL Accessible::getAccessibleContext() -{ - return mxContext; -} - -} // end of namespace sfx2::sidebar - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx index 967256a46875..159bb27d6c05 100644 --- a/sfx2/source/sidebar/FocusManager.cxx +++ b/sfx2/source/sidebar/FocusManager.cxx @@ -265,21 +265,6 @@ void FocusManager::FocusButton (const sal_Int32 nButtonIndex) maButtons[nButtonIndex]->grab_focus(); } -void FocusManager::RemoveWindow (vcl::Window& rWindow) -{ - auto iPanel (::std::find(maPanels.begin(), maPanels.end(), &rWindow)); - if (iPanel != maPanels.end()) - { - if ((*iPanel)->GetTitleBar() != nullptr) - { - UnregisterWindow((*iPanel)->GetTitleBar()->GetToolBox()); - UnregisterWindow((*iPanel)->GetTitleBar()->GetExpander()); - } - maPanels.erase(iPanel); - return; - } -} - void FocusManager::MoveFocusInsidePanel ( const FocusLocation& rFocusLocation, const sal_Int32 nDirection) diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx index 340c1a286cc7..8e582861fb4f 100644 --- a/sfx2/source/sidebar/SidebarToolBox.cxx +++ b/sfx2/source/sidebar/SidebarToolBox.cxx @@ -171,27 +171,6 @@ Reference<frame::XToolbarController> SidebarToolBox::GetControllerForItemId (con return Reference<frame::XToolbarController>(); } -void SidebarToolBox::SetController(const sal_uInt16 nItemId, - const css::uno::Reference<css::frame::XToolbarController>& rxController) -{ - ControllerContainer::iterator iController (maControllers.find(nItemId)); - if (iController != maControllers.end()) - { - Reference<lang::XComponent> xComponent(rxController, UNO_QUERY); - if (xComponent.is()) - xComponent->dispose(); - - iController->second = rxController; - } - else - { - maControllers[nItemId] = rxController; - } - - if (rxController.is()) - RegisterHandlers(); -} - void SidebarToolBox::RegisterHandlers() { if ( ! mbAreHandlersRegistered) |