From cab162e77a357bef8e8f5563acfa46b09bd5340c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 30 Oct 2020 12:10:11 +0000 Subject: SidebarToolBox.hxx can be a private header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2367ef3912f3b84cdd0324b8e76598fc44a22874 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105078 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- include/sfx2/sidebar/SidebarToolBox.hxx | 86 ----------------------- sfx2/inc/sidebar/SidebarToolBox.hxx | 86 +++++++++++++++++++++++ sfx2/inc/sidebar/TitleBar.hxx | 2 +- sfx2/source/notebookbar/NotebookbarTabControl.cxx | 2 +- sfx2/source/sidebar/SidebarToolBox.cxx | 2 +- solenv/clang-format/excludelist | 2 +- 6 files changed, 90 insertions(+), 90 deletions(-) delete mode 100644 include/sfx2/sidebar/SidebarToolBox.hxx create mode 100644 sfx2/inc/sidebar/SidebarToolBox.hxx diff --git a/include/sfx2/sidebar/SidebarToolBox.hxx b/include/sfx2/sidebar/SidebarToolBox.hxx deleted file mode 100644 index bf0fbf60ceba..000000000000 --- a/include/sfx2/sidebar/SidebarToolBox.hxx +++ /dev/null @@ -1,86 +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 . - */ -#ifndef INCLUDED_SFX2_SIDEBAR_SIDEBARTOOLBOX_HXX -#define INCLUDED_SFX2_SIDEBAR_SIDEBARTOOLBOX_HXX - -#include -#include -#include -#include - -namespace com::sun::star::frame { class XToolbarController; } - -namespace sfx2::sidebar { - -/** The sidebar tool box has two responsibilities: - 1. Coordinated location, size, and other states with its parent - background window. - 2. Create and handle tool bar controller for its items. -*/ -class UNLESS_MERGELIBS(SFX2_DLLPUBLIC) SidebarToolBox : public ToolBox -{ -public: - SidebarToolBox(vcl::Window* pParentWindow); - virtual ~SidebarToolBox() override; - virtual void dispose() override; - - virtual ToolBoxButtonSize GetDefaultButtonSize() const; - - using ToolBox::InsertItem; - virtual void InsertItem(const OUString& rCommand, - const css::uno::Reference& rFrame, - ToolBoxItemBits nBits, - const Size& rRequestedSize, - ImplToolItems::size_type nPos = APPEND) override; - - virtual bool EventNotify(NotifyEvent& rEvent) override; - virtual void KeyInput( const KeyEvent& rKEvt ) override; - - void SetController(const sal_uInt16 nItemId, - const css::uno::Reference& rxController); - - void InitToolBox(VclBuilder::stringmap& rMap); - -protected: - typedef std::map> ControllerContainer; - ControllerContainer maControllers; - bool mbAreHandlersRegistered; - bool mbUseDefaultButtonSize; - bool mbSideBar; - - DECL_LINK(DropDownClickHandler, ToolBox*, void); - DECL_LINK(ClickHandler, ToolBox*, void); - DECL_LINK(DoubleClickHandler, ToolBox*, void); - DECL_LINK(SelectHandler, ToolBox*, void); - DECL_LINK(ChangedIconSizeHandler, LinkParamNone*, void ); - - css::uno::Reference GetControllerForItemId(const sal_uInt16 nItemId) const; - - void CreateController(const sal_uInt16 nItemId, - const css::uno::Reference& rxFrame, - const sal_Int32 nItemWidth, bool bSideBar); - void RegisterHandlers(); -}; - - -} // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/SidebarToolBox.hxx b/sfx2/inc/sidebar/SidebarToolBox.hxx new file mode 100644 index 000000000000..33bfc9ec3437 --- /dev/null +++ b/sfx2/inc/sidebar/SidebarToolBox.hxx @@ -0,0 +1,86 @@ +/* -*- 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 . + */ +#ifndef INCLUDED_SFX2_SIDEBAR_SIDEBARTOOLBOX_HXX +#define INCLUDED_SFX2_SIDEBAR_SIDEBARTOOLBOX_HXX + +#include +#include +#include +#include + +namespace com::sun::star::frame { class XToolbarController; } + +namespace sfx2::sidebar { + +/** The sidebar tool box has two responsibilities: + 1. Coordinated location, size, and other states with its parent + background window. + 2. Create and handle tool bar controller for its items. +*/ +class SidebarToolBox : public ToolBox +{ +public: + SidebarToolBox(vcl::Window* pParentWindow); + virtual ~SidebarToolBox() override; + virtual void dispose() override; + + virtual ToolBoxButtonSize GetDefaultButtonSize() const; + + using ToolBox::InsertItem; + virtual void InsertItem(const OUString& rCommand, + const css::uno::Reference& rFrame, + ToolBoxItemBits nBits, + const Size& rRequestedSize, + ImplToolItems::size_type nPos = APPEND) override; + + virtual bool EventNotify(NotifyEvent& rEvent) override; + virtual void KeyInput( const KeyEvent& rKEvt ) override; + + void SetController(const sal_uInt16 nItemId, + const css::uno::Reference& rxController); + + void InitToolBox(VclBuilder::stringmap& rMap); + +protected: + typedef std::map> ControllerContainer; + ControllerContainer maControllers; + bool mbAreHandlersRegistered; + bool mbUseDefaultButtonSize; + bool mbSideBar; + + DECL_LINK(DropDownClickHandler, ToolBox*, void); + DECL_LINK(ClickHandler, ToolBox*, void); + DECL_LINK(DoubleClickHandler, ToolBox*, void); + DECL_LINK(SelectHandler, ToolBox*, void); + DECL_LINK(ChangedIconSizeHandler, LinkParamNone*, void ); + + css::uno::Reference GetControllerForItemId(const sal_uInt16 nItemId) const; + + void CreateController(const sal_uInt16 nItemId, + const css::uno::Reference& rxFrame, + const sal_Int32 nItemWidth, bool bSideBar); + void RegisterHandlers(); +}; + + +} // end of namespace sfx2::sidebar + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/TitleBar.hxx b/sfx2/inc/sidebar/TitleBar.hxx index e6a3e302bae0..917a09cda416 100644 --- a/sfx2/inc/sidebar/TitleBar.hxx +++ b/sfx2/inc/sidebar/TitleBar.hxx @@ -20,7 +20,7 @@ #include -#include +#include namespace sfx2::sidebar { diff --git a/sfx2/source/notebookbar/NotebookbarTabControl.cxx b/sfx2/source/notebookbar/NotebookbarTabControl.cxx index 79f0cd7ef67c..c503c7b52ea3 100644 --- a/sfx2/source/notebookbar/NotebookbarTabControl.cxx +++ b/sfx2/source/notebookbar/NotebookbarTabControl.cxx @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #define ICON_SIZE 25 diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx index f77e6d5ff260..d96f1419f6b7 100644 --- a/sfx2/source/sidebar/SidebarToolBox.cxx +++ b/sfx2/source/sidebar/SidebarToolBox.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include +#include #include #include diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist index 844f96d7f7ad..6afc193dd6c8 100644 --- a/solenv/clang-format/excludelist +++ b/solenv/clang-format/excludelist @@ -6346,7 +6346,6 @@ include/sfx2/sidebar/SidebarController.hxx include/sfx2/sidebar/SidebarDockingWindow.hxx include/sfx2/sidebar/SidebarModelUpdate.hxx include/sfx2/sidebar/SidebarPanelBase.hxx -include/sfx2/sidebar/SidebarToolBox.hxx include/sfx2/sidebar/TabBar.hxx include/sfx2/sidebar/Theme.hxx include/sfx2/signaturestate.hxx @@ -11828,6 +11827,7 @@ sfx2/inc/sidebar/MenuButton.hxx sfx2/inc/sidebar/Paint.hxx sfx2/inc/sidebar/PanelDescriptor.hxx sfx2/inc/sidebar/PanelTitleBar.hxx +sfx2/inc/sidebar/SidebarToolBox.hxx sfx2/inc/sidebar/TabItem.hxx sfx2/inc/sidebar/TitleBar.hxx sfx2/inc/sidebar/Tools.hxx -- cgit