diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-02-12 20:52:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-02-16 07:00:15 +0100 |
commit | 37f227344f387257a5d8613449ffbd1bb0537be4 (patch) | |
tree | 32402dd0ff6c2b4200334206059b76979de342db /include | |
parent | 15c0f22c31a46ce37e98f9394e6a8e0bc92495f9 (diff) |
move some headers inside sfx2/
Change-Id: I806735926661ae4a666725f970ee86f0cb816a49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88562
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
31 files changed, 0 insertions, 1936 deletions
diff --git a/include/IwyuFilter_include.yaml b/include/IwyuFilter_include.yaml index 88ad4981fd0a..d2a5838c2b7e 100644 --- a/include/IwyuFilter_include.yaml +++ b/include/IwyuFilter_include.yaml @@ -616,9 +616,6 @@ blacklist: include/sfx2/mieclip.hxx: # Needed for implicit dtor - tools/stream.hxx - include/sfx2/recentdocsview.hxx: - # Needed for struct declaration - - com/sun/star/beans/PropertyValue.hpp include/sfx2/sfxbasecontroller.hxx: # base class has to be a complete type - com/sun/star/frame/XController2.hpp @@ -682,12 +679,6 @@ blacklist: # base class has to be a complete type - com/sun/star/frame/XStatusListener.hpp - com/sun/star/lang/XComponent.hpp - include/sfx2/sidebar/Accessible.hxx: - # base class has to be a complete type - - com/sun/star/accessibility/XAccessible.hpp - include/sfx2/sidebar/Paint.hxx: - # Needed for boost::variant - - vcl/gradient.hxx include/sfx2/sidebar/SidebarController.hxx: # base class has to be a complete type - com/sun/star/ui/XContextChangeEventListener.hpp @@ -705,25 +696,9 @@ blacklist: include/sfx2/sidebar/Theme.hxx: # base class has to be a complete type - com/sun/star/beans/XPropertySet.hpp - include/sfx2/sidebar/UnoDeck.hxx: - # base class has to be a complete type - - com/sun/star/ui/XDeck.hpp - include/sfx2/sidebar/UnoDecks.hxx: - # base class has to be a complete type - - com/sun/star/ui/XDecks.hpp - include/sfx2/sidebar/UnoPanel.hxx: - # base class has to be a complete type - - com/sun/star/ui/XPanel.hpp - include/sfx2/sidebar/UnoPanels.hxx: - # base class has to be a complete type - - com/sun/star/ui/XPanels.hpp include/sfx2/sidebar/UnoSidebar.hxx: # base class has to be a complete type - com/sun/star/ui/XSidebarProvider.hpp - include/sfx2/unoctitm.hxx: - # base class has to be a complete type - - com/sun/star/frame/XNotifyingDispatch.hpp - - com/sun/star/lang/XUnoTunnel.hpp include/sfx2/viewsh.hxx: # Needed for macro - class SfxViewFactory diff --git a/include/sfx2/charmapcontrol.hxx b/include/sfx2/charmapcontrol.hxx deleted file mode 100644 index 31a7ce5937e7..000000000000 --- a/include/sfx2/charmapcontrol.hxx +++ /dev/null @@ -1,69 +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_INC_CHARMAPCONTROL_HXX -#define INCLUDED_SFX2_INC_CHARMAPCONTROL_HXX - -#include <sal/config.h> -#include <sfx2/dllapi.h> -#include <sfx2/charwin.hxx> -#include <svtools/toolbarmenu.hxx> -#include <deque> - -class CharmapPopup; - -namespace com::sun::star::frame { class XFrame; } - -class SfxCharmapCtrl final : public WeldToolbarPopup -{ -public: - explicit SfxCharmapCtrl(CharmapPopup* pControl, weld::Widget* pParent); - virtual ~SfxCharmapCtrl() override; - - virtual void GrabFocus() override; - -private: - rtl::Reference<CharmapPopup> m_xControl; - - ScopedVclPtr<VirtualDevice> m_xVirDev; - - std::deque<OUString> m_aRecentCharList; - std::deque<OUString> m_aRecentCharFontList; - std::deque<OUString> m_aFavCharList; - std::deque<OUString> m_aFavCharFontList; - - SvxCharView m_aRecentCharView[16]; - SvxCharView m_aFavCharView[16]; - std::unique_ptr<weld::Button> m_xDlgBtn; - std::unique_ptr<weld::CustomWeld> m_xRecentCharView[16]; - std::unique_ptr<weld::CustomWeld> m_xFavCharView[16]; - - DECL_LINK(CharClickHdl, SvxCharView*, void); - DECL_LINK(OpenDlgHdl, weld::Button&, void); - - void getFavCharacterList(); - void updateFavCharControl(); - - void getRecentCharacterList(); //gets both recent char and recent char font list - void updateRecentCharControl(); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/checkin.hxx b/include/sfx2/checkin.hxx deleted file mode 100644 index 78535f7aab9d..000000000000 --- a/include/sfx2/checkin.hxx +++ /dev/null @@ -1,31 +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/. - */ - -#pragma once - -#include <vcl/weld.hxx> - -class SfxCheckinDialog final : public weld::GenericDialogController -{ -private: - std::unique_ptr<weld::TextView> m_xCommentED; - std::unique_ptr<weld::CheckButton> m_xMajorCB; - std::unique_ptr<weld::Button> m_xOKBtn; - - DECL_LINK(OKHdl, weld::Button&, void); - -public: - SfxCheckinDialog(weld::Window* pParent); - virtual ~SfxCheckinDialog() override; - - OUString GetComment() const; - bool IsMajor() const; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/emojicontrol.hxx b/include/sfx2/emojicontrol.hxx deleted file mode 100644 index 33d0e021bbe1..000000000000 --- a/include/sfx2/emojicontrol.hxx +++ /dev/null @@ -1,51 +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/. - */ - -#ifndef INCLUDED_SFX2_INC_EMOJICONTROL_HXX -#define INCLUDED_SFX2_INC_EMOJICONTROL_HXX - -#include <sal/config.h> -#include <sfx2/dllapi.h> -#include <vcl/tabctrl.hxx> -#include <svtools/toolbarmenu.hxx> - -#define TAB_FONT_SIZE 15 - -namespace com::sun::star::frame { class XFrame; } - -class EmojiPopup; -class EmojiView; -class ThumbnailViewItem; -enum class FILTER_CATEGORY; - -class SfxEmojiControl final : public svtools::ToolbarPopup -{ -public: - explicit SfxEmojiControl(EmojiPopup* pControl, vcl::Window* pParent); - - virtual ~SfxEmojiControl() override; - - virtual void dispose() override; - -private: - void ConvertLabelToUnicode(sal_uInt16 nPageId); - - /// Return filter according to the currently selected tab page. - FILTER_CATEGORY getCurrentFilter() const; - - DECL_LINK(ActivatePageHdl, TabControl*, void); - DECL_STATIC_LINK(SfxEmojiControl, InsertHdl, ThumbnailViewItem*, void); - - VclPtr<TabControl> mpTabControl; - VclPtr<EmojiView> mpEmojiView; -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/emojiview.hxx b/include/sfx2/emojiview.hxx deleted file mode 100644 index 8a08e1d8c75d..000000000000 --- a/include/sfx2/emojiview.hxx +++ /dev/null @@ -1,81 +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/. - */ - -#ifndef INCLUDED_SFX2_SOURCE_INC_EMOJIVIEW_HXX -#define INCLUDED_SFX2_SOURCE_INC_EMOJIVIEW_HXX - -#include <sfx2/thumbnailview.hxx> - -//unicode item defines -#define ITEM_MAX_WIDTH 30 -#define ITEM_MAX_HEIGHT 30 -#define ITEM_PADDING 5 -#define ITEM_MAX_TEXT_LENGTH 10 - -enum class FILTER_CATEGORY -{ - PEOPLE, - NATURE, - FOOD, - ACTIVITY, - TRAVEL, - OBJECTS, - SYMBOLS, - FLAGS, - UNICODE9 -}; - -// Display unicode emojis depending on the category -class ViewFilter_Category final -{ -public: - - ViewFilter_Category (FILTER_CATEGORY rCategory) - : mCategory(rCategory) - {} - - bool operator () (const ThumbnailViewItem *pItem); - - static bool isFilteredCategory(FILTER_CATEGORY filter, const OUString &rCategory); - -private: - - FILTER_CATEGORY const mCategory; -}; - - -class EmojiView final : public ThumbnailView -{ -public: - EmojiView ( vcl::Window* pParent); - - virtual ~EmojiView () override; - - // Fill view with emojis - void Populate (); - - void setInsertEmojiHdl (const Link<ThumbnailViewItem*, void> &rLink); - - void AppendItem(const OUString &rTitle, const OUString &rCategory, const OUString &rName ); - -private: - virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; - - virtual void KeyInput( const KeyEvent& rKEvt ) override; - - virtual void ApplySettings(vcl::RenderContext& rRenderContext) override; - - std::string msJSONData; - - Link<ThumbnailViewItem*, void> maInsertEmojiHdl; -}; - -#endif // INCLUDED_SFX2_SOURCE_INC_EMOJIVIEW_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/emojiviewitem.hxx b/include/sfx2/emojiviewitem.hxx deleted file mode 100644 index 65fd8005a7f7..000000000000 --- a/include/sfx2/emojiviewitem.hxx +++ /dev/null @@ -1,38 +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/. - */ - -#ifndef INCLUDED_SFX2_SOURCE_INC_EMOJIVIEWITEM_HXX -#define INCLUDED_SFX2_SOURCE_INC_EMOJIVIEWITEM_HXX - -#include <sfx2/thumbnailviewitem.hxx> - -class EmojiViewItem final : public ThumbnailViewItem -{ -public: - EmojiViewItem (ThumbnailViewBase &rView, sal_uInt16 nId); - - virtual ~EmojiViewItem () override; - - void setCategory (const OUString &rCategory) { msCategory = rCategory; } - - const OUString& getCategory () const { return msCategory; } - - virtual void Paint (drawinglayer::processor2d::BaseProcessor2D *pProcessor, - const ThumbnailItemAttributes *pAttrs) override; - - virtual void calculateItemsPosition (const long nThumbnailHeight, - const long nPadding, sal_uInt32 nMaxTextLength, - const ThumbnailItemAttributes *pAttrs) override; -private: - OUString msCategory; -}; - -#endif // INCLUDED_SFX2_SOURCE_INC_EMOJIVIEWITEM_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/notebookbar/NotebookbarTabControl.hxx b/include/sfx2/notebookbar/NotebookbarTabControl.hxx deleted file mode 100644 index 440148beff0d..000000000000 --- a/include/sfx2/notebookbar/NotebookbarTabControl.hxx +++ /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/. - */ - -#ifndef INCLUDED_SFX2_NOTEBOOKBAR_NOTEBOOKBARTABCONTROL_HXX -#define INCLUDED_SFX2_NOTEBOOKBAR_NOTEBOOKBARTABCONTROL_HXX - -#include <sfx2/dllapi.h> -#include <vcl/tabctrl.hxx> - -namespace com { namespace sun { namespace star { namespace ui { - class XUIConfigurationListener; -} } } } -namespace com::sun::star::uno { class XComponentContext; } - -class NotebookbarTabControl final : public NotebookbarTabControlBase -{ -friend class ChangedUIEventListener; - -public: - NotebookbarTabControl( Window* pParent ); - ~NotebookbarTabControl() override; - - virtual void KeyInput( const KeyEvent& rKEvt ) override; - virtual bool EventNotify( NotifyEvent& rNEvt ) override; - virtual void StateChanged(StateChangedType nStateChange) override; - virtual Size calculateRequisition() const override; - -private: - static void FillShortcutsToolBox(css::uno::Reference<css::uno::XComponentContext> const & xContext, - const css::uno::Reference<css::frame::XFrame>& xFrame, - const OUString& aModuleName, - ToolBox* pShortcuts - ); - void ArrowStops( sal_uInt16 nCode ); - - DECL_LINK(OpenNotebookbarPopupMenu, NotebookBar*, void); - - css::uno::Reference<css::ui::XUIConfigurationListener> m_pListener; - css::uno::Reference<css::frame::XFrame> m_xFrame; - bool m_bInitialized; - bool m_bInvalidate; -}; - -#endif // INCLUDED_SFX2_NOTEBOOKBAR_NOTEBOOKBARTABCONTROL_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx deleted file mode 100644 index 6eb48dddd47a..000000000000 --- a/include/sfx2/recentdocsview.hxx +++ /dev/null @@ -1,102 +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/. - */ - -#ifndef INCLUDED_SFX2_RECENTDOCSVIEW_HXX -#define INCLUDED_SFX2_RECENTDOCSVIEW_HXX - -#include <sfx2/thumbnailview.hxx> -#include <vcl/image.hxx> - -#include <o3tl/typed_flags_set.hxx> - -#include <com/sun/star/util/URL.hpp> -#include <com/sun/star/beans/PropertyValue.hpp> - -namespace com::sun::star::frame { class XDispatch; } - -namespace sfx2 -{ - -struct LoadRecentFile -{ - css::util::URL aTargetURL; - css::uno::Sequence< css::beans::PropertyValue > aArgSeq; - css::uno::Reference< css::frame::XDispatch > xDispatch; - VclPtr< ThumbnailView > pView; -}; - -enum class ApplicationType -{ - TYPE_NONE = 0, - TYPE_WRITER = 1 << 0, - TYPE_CALC = 1 << 1, - TYPE_IMPRESS = 1 << 2, - TYPE_DRAW = 1 << 3, - TYPE_DATABASE = 1 << 4, - TYPE_MATH = 1 << 5, - TYPE_OTHER = 1 << 6 -}; - -} // namespace sfx2 - -namespace o3tl { - -template<> struct typed_flags<sfx2::ApplicationType> : is_typed_flags<sfx2::ApplicationType, 0x7f> {}; - -} // namespace o3tl - -namespace sfx2 -{ - -class RecentDocsView final : public ThumbnailView -{ -public: - RecentDocsView( vcl::Window* pParent ); - - void insertItem(const OUString &rURL, const OUString &rTitle, const BitmapEx &rThumbnail, sal_uInt16 nId); - - static bool typeMatchesExtension(ApplicationType type, const OUString &rExt); - static BitmapEx getDefaultThumbnail(const OUString &rURL); - - ApplicationType mnFileTypes; - - virtual void Clear() override; - - /// Update the information in the view. - virtual void Reload() override; - - DECL_STATIC_LINK( RecentDocsView, ExecuteHdl_Impl, void*, void ); - -private: - virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; - - virtual void MouseButtonUp( const MouseEvent& rMEvt ) override; - - virtual void OnItemDblClicked(ThumbnailViewItem *pItem) override; - - virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override; - - virtual void LoseFocus() override; - - bool isAcceptedFile(const OUString &rURL) const; - - long mnItemMaxSize; - size_t mnLastMouseDownItem; - - /// Image that appears when there is no recent document. - Image const maWelcomeImage; - OUString const maWelcomeLine1; - OUString const maWelcomeLine2; -}; - -} // namespace sfx2 - -#endif // INCLUDED_SFX2_RECENTDOCSVIEW_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/Accessible.hxx b/include/sfx2/sidebar/Accessible.hxx deleted file mode 100644 index 8ba5f03d9daf..000000000000 --- a/include/sfx2/sidebar/Accessible.hxx +++ /dev/null @@ -1,63 +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_SOURCE_SIDEBAR_ACCESSIBLE_HXX -#define INCLUDED_SFX2_SOURCE_SIDEBAR_ACCESSIBLE_HXX - -#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 { namespace 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 - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/AccessibleTitleBar.hxx b/include/sfx2/sidebar/AccessibleTitleBar.hxx deleted file mode 100644 index 5ce9ae311e10..000000000000 --- a/include/sfx2/sidebar/AccessibleTitleBar.hxx +++ /dev/null @@ -1,47 +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_SOURCE_SIDEBAR_ACCESSIBLETITLEBAR_HXX -#define INCLUDED_SFX2_SOURCE_SIDEBAR_ACCESSIBLETITLEBAR_HXX - -#include <toolkit/awt/vclxaccessiblecomponent.hxx> - -namespace com::sun::star::accessibility { class XAccessible; } - -namespace sfx2 { namespace sidebar { - -class TitleBar; - -class AccessibleTitleBar final - : public VCLXAccessibleComponent -{ -public: - static css::uno::Reference<css::accessibility::XAccessible> Create (TitleBar& rTitleBar); - -private: - virtual void FillAccessibleStateSet (utl::AccessibleStateSetHelper& rStateSet) override; - - explicit AccessibleTitleBar (VCLXWindow* pWindow); - virtual ~AccessibleTitleBar() override; -}; - -} } // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/ContextList.hxx b/include/sfx2/sidebar/ContextList.hxx deleted file mode 100644 index fc2f6845fbf5..000000000000 --- a/include/sfx2/sidebar/ContextList.hxx +++ /dev/null @@ -1,69 +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_SOURCE_SIDEBAR_CONTEXTLIST_HXX -#define INCLUDED_SFX2_SOURCE_SIDEBAR_CONTEXTLIST_HXX - -#include <sfx2/sidebar/Context.hxx> -#include <rtl/ustring.hxx> - -#include <vector> - -namespace sfx2 { namespace sidebar { - -/** Per context data for deck and panel descriptors. -*/ -class ContextList -{ -public: - ContextList(); - - class Entry - { - public: - Context maContext; - bool mbIsInitiallyVisible; - OUString msMenuCommand; - }; - - /** Return <TRUE/> when the given context matches any of the stored contexts. - */ - const Entry* GetMatch ( - const Context& rContext) const; - Entry* GetMatch ( - const Context& rContext); - - void AddContextDescription ( - const Context& rContext, - const bool bIsInitiallyVisible, - const OUString& rsMenuCommand); - - void ToggleVisibilityForContext( const Context& rContext,const bool bIsInitiallyVisible ); - const ::std::vector<Entry>& GetEntries() const {return maEntries;}; - -private: - ::std::vector<Entry> maEntries; - - ::std::vector<Entry>::const_iterator FindBestMatch (const Context& rContext) const; -}; - -} } // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/ControllerFactory.hxx b/include/sfx2/sidebar/ControllerFactory.hxx deleted file mode 100644 index e84b139563a4..000000000000 --- a/include/sfx2/sidebar/ControllerFactory.hxx +++ /dev/null @@ -1,69 +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_CONTROLLERFACTORY_HXX -#define INCLUDED_SFX2_SIDEBAR_CONTROLLERFACTORY_HXX - -#include <sfx2/dllapi.h> -#include <com/sun/star/uno/Reference.hxx> - -namespace com::sun::star::awt { class XWindow; } -namespace com::sun::star::frame { class XController; } -namespace com::sun::star::frame { class XFrame; } -namespace com::sun::star::frame { class XToolbarController; } - -class ToolBox; - -namespace weld { class Toolbar; } - -namespace sfx2 { namespace sidebar { - -/** Convenience class for the easy creation of toolbox controllers. -*/ -class ControllerFactory -{ -public: - static css::uno::Reference<css::frame::XToolbarController> CreateToolBoxController( - ToolBox* pToolBox, - const sal_uInt16 nItemId, - const OUString& rsCommandName, - const css::uno::Reference<css::frame::XFrame>& rxFrame, - const css::uno::Reference<css::frame::XController>& rxController, - const css::uno::Reference<css::awt::XWindow>& rxParentWindow, - const sal_Int32 nItemWidth); - - static css::uno::Reference<css::frame::XToolbarController> CreateToolBoxController( - weld::Toolbar& rToolbar, - const OUString& rsCommandName, - const css::uno::Reference<css::frame::XFrame>& rxFrame); - -private: - static css::uno::Reference<css::frame::XToolbarController> CreateToolBarController( - const css::uno::Reference<css::awt::XWindow>& rToolbar, - const OUString& rsCommandName, - const css::uno::Reference<css::frame::XFrame>& rxFrame, - const css::uno::Reference<css::frame::XController>& rxController, - const sal_Int32 nWidth); -}; - - -} } // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/DeckDescriptor.hxx b/include/sfx2/sidebar/DeckDescriptor.hxx deleted file mode 100644 index 9a205335b6e2..000000000000 --- a/include/sfx2/sidebar/DeckDescriptor.hxx +++ /dev/null @@ -1,56 +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_SOURCE_SIDEBAR_DECKDESCRIPTOR_HXX -#define INCLUDED_SFX2_SOURCE_SIDEBAR_DECKDESCRIPTOR_HXX - -#include <sfx2/sidebar/ContextList.hxx> - -#include <sfx2/sidebar/Deck.hxx> - -namespace sfx2 { namespace sidebar { - -class DeckDescriptor -{ -public: - OUString msTitle; - OUString msId; - OUString msIconURL; - OUString msHighContrastIconURL; - OUString msTitleBarIconURL; - OUString msHighContrastTitleBarIconURL; - OUString msHelpText; - ContextList maContextList; - bool mbIsEnabled; - sal_Int32 mnOrderIndex; - bool mbExperimental; - - OUString msNodeName; // some impress deck nodes names are different from their Id - - VclPtr<Deck> mpDeck; - - DeckDescriptor(); - DeckDescriptor (const DeckDescriptor& rOther); - ~DeckDescriptor(); -}; - -} } // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/DeckLayouter.hxx b/include/sfx2/sidebar/DeckLayouter.hxx deleted file mode 100644 index 0d9c7c2b90f4..000000000000 --- a/include/sfx2/sidebar/DeckLayouter.hxx +++ /dev/null @@ -1,51 +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_SOURCE_SIDEBAR_DECKLAYOUTER_HXX -#define INCLUDED_SFX2_SOURCE_SIDEBAR_DECKLAYOUTER_HXX - -#include <sfx2/sidebar/Panel.hxx> - -class ScrollBar; -namespace vcl { class Window; } -namespace tools { class Rectangle; } - -namespace sfx2 { namespace sidebar { - -/** Helper for layouting the direct and indirect children of a - deck like title bars, panels, and scroll bars. -*/ -namespace DeckLayouter -{ - void LayoutDeck ( - const tools::Rectangle& rContentArea, - sal_Int32& rMinimalWidth, - sal_Int32& rMinimalHeight, - SharedPanelContainer& rPanels, - vcl::Window& pDeckTitleBar, - vcl::Window& pScrollClipWindow, - vcl::Window& pScrollContainer, - vcl::Window& pFiller, - ScrollBar& pVerticalScrollBar); -} - -} } // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/DeckTitleBar.hxx b/include/sfx2/sidebar/DeckTitleBar.hxx deleted file mode 100644 index bb49467c8431..000000000000 --- a/include/sfx2/sidebar/DeckTitleBar.hxx +++ /dev/null @@ -1,55 +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_SOURCE_SIDEBAR_DECKTITLEBAR_HXX -#define INCLUDED_SFX2_SOURCE_SIDEBAR_DECKTITLEBAR_HXX - -#include <sfx2/sidebar/TitleBar.hxx> - -namespace sfx2 { namespace sidebar { - -class DeckTitleBar final : public TitleBar -{ -public: - DeckTitleBar(const OUString& rsTitle, - vcl::Window* pParentWindow, - const std::function<void()>& rCloserAction); - - void SetCloserVisible(const bool bIsCloserVisible); - static tools::Rectangle GetDragArea(); - - virtual void DataChanged(const DataChangedEvent& rEvent) override; - virtual void MouseMove(const MouseEvent& rMouseEvent) override; - -private: - virtual tools::Rectangle GetTitleArea(const tools::Rectangle& rTitleBarBox) override; - virtual void PaintDecoration(vcl::RenderContext& rRenderContext) override; - virtual sidebar::Paint GetBackgroundPaint() override; - virtual void HandleToolBoxItemClick(const sal_uInt16 nItemIndex) override; - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; - - static const sal_uInt16 mnCloserItemIndex = 1; - const std::function<void()> maCloserAction; - bool mbIsCloserVisible; -}; - -} } // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/DrawHelper.hxx b/include/sfx2/sidebar/DrawHelper.hxx deleted file mode 100644 index 6bf6d17756a0..000000000000 --- a/include/sfx2/sidebar/DrawHelper.hxx +++ /dev/null @@ -1,50 +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_SOURCE_SIDEBAR_DRAWHELPER_HXX -#define INCLUDED_SFX2_SOURCE_SIDEBAR_DRAWHELPER_HXX - -#include <vcl/outdev.hxx> - -class Color; -class SvBorder; - -namespace sfx2 { namespace sidebar { - -class Paint; - -/** Some convenience functions for painting backgrounds and borders. -*/ -class DrawHelper -{ -public: - static void DrawBorder(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBox, const SvBorder& rBorderSize, - const Paint& rHorizontalPaint, const Paint& rVerticalPaint); - static void DrawHorizontalLine(vcl::RenderContext& rRenderContext, const sal_Int32 nLeft, const sal_Int32 nRight, - const sal_Int32 nY, const sal_Int32 nHeight, const Paint& rPaint); - static void DrawVerticalLine(vcl::RenderContext& rRenderContext, const sal_Int32 nTop, const sal_Int32 nBottom, - const sal_Int32 nX, const sal_Int32 nWidth, const Paint& rPaint); - static void DrawRoundedRectangle(vcl::RenderContext& rRenderContext, const tools::Rectangle& rBox, const sal_Int32 nCornerRadius, - const Color& rBorderColor, const Paint& rFillPaint); -}; - -}} // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/MenuButton.hxx b/include/sfx2/sidebar/MenuButton.hxx deleted file mode 100644 index cccebd7e577a..000000000000 --- a/include/sfx2/sidebar/MenuButton.hxx +++ /dev/null @@ -1,48 +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_SOURCE_SIDEBAR_MENUBUTTON_HXX -#define INCLUDED_SFX2_SOURCE_SIDEBAR_MENUBUTTON_HXX - -#include <vcl/button.hxx> - -namespace sfx2 { namespace sidebar { - -class MenuButton final - : public CheckBox -{ -public: - MenuButton (vcl::Window* pParentWindow); - - virtual void Paint (vcl::RenderContext& /*rRenderContext*/, const tools::Rectangle& rUpdateArea) override; - virtual void MouseMove (const MouseEvent& rEvent) override; - virtual void MouseButtonDown (const MouseEvent& rMouseEvent) override; - virtual void MouseButtonUp (const MouseEvent& rMouseEvent) override; - -protected: - using CheckBox::FillLayoutData; - -private: - bool mbIsLeftButtonDown; -}; - -} } // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/Paint.hxx b/include/sfx2/sidebar/Paint.hxx deleted file mode 100644 index f693482a6c75..000000000000 --- a/include/sfx2/sidebar/Paint.hxx +++ /dev/null @@ -1,76 +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_SOURCE_SIDEBAR_PAINT_HXX -#define INCLUDED_SFX2_SOURCE_SIDEBAR_PAINT_HXX - -#include <vcl/gradient.hxx> -#include <vcl/wall.hxx> - -#include <boost/variant.hpp> - -namespace sfx2 { namespace sidebar { - -/** Abstraction of different ways to fill outlines. - Can be - - none (empty: outline is not filled) - - singular color - - gradient -*/ -class Paint -{ -public: - enum Type - { - NoPaint, - ColorPaint, - GradientPaint - }; - - // Create a Paint object for an Any that may contain a color, a - // awt::Gradient, or nothing. - static Paint Create (const css::uno::Any& rValue); - - // Create paint with type NoPaint. - explicit Paint(); - - // Create a Paint object for the given color. - explicit Paint (const Color& rColor); - - // Create a Paint object for the given gradient. - explicit Paint (const Gradient& rGradient); - - Type GetType() const { return meType;} - const Color& GetColor() const; - const Gradient& GetGradient() const; - - Wallpaper GetWallpaper() const; - -private: - Type meType; - ::boost::variant< - Color, - Gradient - > maValue; -}; - -} } // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/PanelDescriptor.hxx b/include/sfx2/sidebar/PanelDescriptor.hxx deleted file mode 100644 index 2fdf2b1d4702..000000000000 --- a/include/sfx2/sidebar/PanelDescriptor.hxx +++ /dev/null @@ -1,53 +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_SOURCE_SIDEBAR_PANELDESCRIPTOR_HXX -#define INCLUDED_SFX2_SOURCE_SIDEBAR_PANELDESCRIPTOR_HXX - -#include <sfx2/sidebar/ContextList.hxx> - -namespace sfx2 { namespace sidebar { - -class PanelDescriptor -{ -public: - OUString msTitle; - bool mbIsTitleBarOptional; - OUString msId; - OUString msDeckId; - OUString msTitleBarIconURL; - OUString msHighContrastTitleBarIconURL; - ContextList maContextList; - OUString msImplementationURL; - sal_Int32 mnOrderIndex; - bool mbShowForReadOnlyDocuments; - bool mbWantsCanvas; - bool mbExperimental; - - OUString msNodeName; // some impress panel nodes names are different from their Id - - PanelDescriptor(); - PanelDescriptor (const PanelDescriptor& rPanelDescriptor); - ~PanelDescriptor(); -}; - -} } // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/PanelTitleBar.hxx b/include/sfx2/sidebar/PanelTitleBar.hxx deleted file mode 100644 index 4a8799975fb8..000000000000 --- a/include/sfx2/sidebar/PanelTitleBar.hxx +++ /dev/null @@ -1,65 +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_SOURCE_SIDEBAR_PANELTITLEBAR_HXX -#define INCLUDED_SFX2_SOURCE_SIDEBAR_PANELTITLEBAR_HXX - -#include <sfx2/sidebar/TitleBar.hxx> - -namespace com::sun::star::frame { class XController; } -namespace com::sun::star::frame { class XFrame; } - -namespace sfx2 { namespace sidebar { - -class Panel; - -class PanelTitleBar final - : public TitleBar -{ -public: - PanelTitleBar(const OUString& rsTitle, vcl::Window* pParentWindow, Panel* pPanel); - virtual ~PanelTitleBar() override; - virtual void dispose() override; - - void SetMoreOptionsCommand(const OUString& rsCommandName, - const css::uno::Reference<css::frame::XFrame>& rxFrame, - const css::uno::Reference<css::frame::XController>& rxController); - - virtual void DataChanged(const DataChangedEvent& rEvent) override; - virtual void MouseButtonDown(const MouseEvent& rMouseEvent) override; - virtual void MouseButtonUp(const MouseEvent& rMouseEvent) override; - -private: - virtual tools::Rectangle GetTitleArea(const tools::Rectangle& rTitleBarBox) override; - virtual void PaintDecoration(vcl::RenderContext& rRenderContext) override; - virtual sidebar::Paint GetBackgroundPaint() override; - virtual void HandleToolBoxItemClick (const sal_uInt16 nItemIndex) override; - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; - - bool mbIsLeftButtonDown; - VclPtr<Panel> mpPanel; - static const sal_uInt16 mnMenuItemIndex = 1; - css::uno::Reference<css::frame::XFrame> mxFrame; - OUString msMoreOptionsCommand; -}; - -} } // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/TabItem.hxx b/include/sfx2/sidebar/TabItem.hxx deleted file mode 100644 index 8d54640a680c..000000000000 --- a/include/sfx2/sidebar/TabItem.hxx +++ /dev/null @@ -1,49 +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_SOURCE_SIDEBAR_TABITEM_HXX -#define INCLUDED_SFX2_SOURCE_SIDEBAR_TABITEM_HXX - -#include <vcl/button.hxx> - -namespace vcl { class Window; } - -namespace sfx2 { namespace sidebar { - -/** A single button in the tab bar. -*/ -class TabItem final - : public RadioButton -{ -public: - TabItem (vcl::Window* pParentWindow); - - virtual void Paint (vcl::RenderContext& rRenderContext, const tools::Rectangle& rUpdateArea) override; - virtual void MouseMove (const MouseEvent& rEvent) override; - virtual void MouseButtonDown (const MouseEvent& rMouseEvent) override; - virtual void MouseButtonUp (const MouseEvent& rMouseEvent) override; - -private: - bool mbIsLeftButtonDown; -}; - -} } // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/TitleBar.hxx b/include/sfx2/sidebar/TitleBar.hxx deleted file mode 100644 index f06f6aa83fa8..000000000000 --- a/include/sfx2/sidebar/TitleBar.hxx +++ /dev/null @@ -1,79 +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_SOURCE_SIDEBAR_TITLEBAR_HXX -#define INCLUDED_SFX2_SOURCE_SIDEBAR_TITLEBAR_HXX - -#include <sfx2/sidebar/Paint.hxx> - -#include <sfx2/sidebar/SidebarToolBox.hxx> - -namespace sfx2 { namespace sidebar { - -class TitleBar : public vcl::Window -{ -public: - TitleBar (const OUString& rsTitle, - vcl::Window* pParentWindow, - const sidebar::Paint& rInitialBackgroundPaint); - virtual ~TitleBar() override; - virtual void dispose() override; - - void SetTitle (const OUString& rsTitle); - const OUString& GetTitle() const {return msTitle; } - - void SetIcon (const Image& rIcon); - - virtual void ApplySettings(vcl::RenderContext& rRenderContext) override; - virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rUpdateArea) override; - virtual void DataChanged (const DataChangedEvent& rEvent) override; - virtual void setPosSizePixel (long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) override; - - ToolBox& GetToolBox() - { - return *maToolBox; - } - const ToolBox& GetToolBox() const - { - return *maToolBox; - } - -protected: - VclPtr<SidebarToolBox> maToolBox; - OUString msTitle; - - virtual tools::Rectangle GetTitleArea (const tools::Rectangle& rTitleBarBox) = 0; - virtual void PaintDecoration (vcl::RenderContext& rRenderContext) = 0; - void PaintFocus(vcl::RenderContext& rRenderContext, const tools::Rectangle& rFocusBox); - virtual sidebar::Paint GetBackgroundPaint() = 0; - virtual void HandleToolBoxItemClick (const sal_uInt16 nItemIndex); - virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() override; - -private: - Image maIcon; - sidebar::Paint maBackgroundPaint; - - void PaintTitle(vcl::RenderContext& rRenderContext, const tools::Rectangle& rTitleBox); - DECL_LINK(SelectionHandler, ToolBox*, void); -}; - -} } // end of namespace sfx2::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/UnoDeck.hxx b/include/sfx2/sidebar/UnoDeck.hxx deleted file mode 100644 index fc719dee49d2..000000000000 --- a/include/sfx2/sidebar/UnoDeck.hxx +++ /dev/null @@ -1,65 +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/. - * - */ - -#ifndef INCLUDED_SFX2_SIDEBAR_UNODECK_HXX -#define INCLUDED_SFX2_SIDEBAR_UNODECK_HXX - - -#include <com/sun/star/ui/XDeck.hpp> - -#include <cppuhelper/implbase.hxx> - -#include <sfx2/sidebar/ResourceManager.hxx> - -namespace com::sun::star::frame { class XFrame; } -namespace com::sun::star::ui { class XPanels; } -namespace sfx2 { namespace sidebar { class SidebarController; } } - -/** get the decks -*/ -class SfxUnoDeck final : public cppu::WeakImplHelper<css::ui::XDeck> -{ - -public: - - SfxUnoDeck(const css::uno::Reference<css::frame::XFrame>& , const OUString&); - - virtual OUString SAL_CALL getId() override; - - virtual OUString SAL_CALL getTitle() override; - virtual void SAL_CALL setTitle( const OUString& newTitle ) override; - - virtual sal_Bool SAL_CALL isActive() override; - virtual void SAL_CALL activate( const sal_Bool bActivate ) override; - - virtual css::uno::Reference<css::ui::XPanels> SAL_CALL getPanels() override; - - virtual sal_Int32 SAL_CALL getOrderIndex() override; - virtual void SAL_CALL setOrderIndex( const sal_Int32 newOrderIndex ) override; - virtual void SAL_CALL moveFirst() override; - virtual void SAL_CALL moveLast() override; - virtual void SAL_CALL moveUp() override; - virtual void SAL_CALL moveDown() override; - -private: - - const css::uno::Reference<css::frame::XFrame> xFrame; - sfx2::sidebar::SidebarController* getSidebarController(); - - const OUString mDeckId; - - sal_Int32 GetMaxOrderIndex(sfx2::sidebar::ResourceManager::DeckContextDescriptorContainer aDecks); - sal_Int32 GetMinOrderIndex(sfx2::sidebar::ResourceManager::DeckContextDescriptorContainer aDecks); - -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/UnoDecks.hxx b/include/sfx2/sidebar/UnoDecks.hxx deleted file mode 100644 index 5ee4a5244fb2..000000000000 --- a/include/sfx2/sidebar/UnoDecks.hxx +++ /dev/null @@ -1,58 +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/. - * - */ - -#ifndef INCLUDED_SFX2_SIDEBAR_DECKS_HXX -#define INCLUDED_SFX2_SIDEBAR_DECKS_HXX - - -#include <com/sun/star/ui/XDecks.hpp> - -#include <cppuhelper/implbase.hxx> - -namespace com::sun::star::frame { class XFrame; } -namespace sfx2 { namespace sidebar { class SidebarController; } } - -/** get the decks -*/ -class SfxUnoDecks final : public cppu::WeakImplHelper<css::ui::XDecks> -{ - -public: - - SfxUnoDecks(const css::uno::Reference<css::frame::XFrame>&); - -// XNameAccess - - virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override; - - virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override; - - virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override; - -// XIndexAccess - - virtual sal_Int32 SAL_CALL getCount() override; - - virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override; - -// XElementAccess - virtual css::uno::Type SAL_CALL getElementType() override; - virtual sal_Bool SAL_CALL hasElements() override; - -private: - - const css::uno::Reference<css::frame::XFrame> xFrame; - sfx2::sidebar::SidebarController* getSidebarController(); - -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/UnoPanel.hxx b/include/sfx2/sidebar/UnoPanel.hxx deleted file mode 100644 index 7d82662eaaf2..000000000000 --- a/include/sfx2/sidebar/UnoPanel.hxx +++ /dev/null @@ -1,72 +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/. - * - */ - -#ifndef INCLUDED_SFX2_SIDEBAR_UNOPANEL_HXX -#define INCLUDED_SFX2_SIDEBAR_UNOPANEL_HXX - -#include <com/sun/star/ui/XPanel.hpp> - - -#include <cppuhelper/implbase.hxx> - -#include <sfx2/sidebar/Panel.hxx> -#include <sfx2/sidebar/Deck.hxx> -#include <sfx2/sidebar/ResourceManager.hxx> - -namespace com::sun::star::awt { class XWindow; } -namespace com::sun::star::frame { class XFrame; } -namespace sfx2 { namespace sidebar { class SidebarController; } } - - -/** get the Panel -*/ -class SfxUnoPanel final : public cppu::WeakImplHelper<css::ui::XPanel> -{ - -public: - - SfxUnoPanel(const css::uno::Reference<css::frame::XFrame>& , const OUString&, const OUString&); - - virtual OUString SAL_CALL getId() override; - - virtual OUString SAL_CALL getTitle() override; - virtual void SAL_CALL setTitle( const OUString& newTitle ) override; - - virtual sal_Bool SAL_CALL isExpanded() override; - virtual void SAL_CALL expand( const sal_Bool bCollapseOther ) override; - virtual void SAL_CALL collapse( ) override; - - virtual sal_Int32 SAL_CALL getOrderIndex() override; - virtual void SAL_CALL setOrderIndex( const sal_Int32 newOrderIndex ) override; - virtual void SAL_CALL moveFirst() override; - virtual void SAL_CALL moveLast() override; - virtual void SAL_CALL moveUp() override; - virtual void SAL_CALL moveDown() override; - - virtual css::uno::Reference<css::awt::XWindow> SAL_CALL getDialog() override; - -private: - - const css::uno::Reference<css::frame::XFrame> xFrame; - sfx2::sidebar::SidebarController* getSidebarController(); - - const OUString mPanelId; - const OUString mDeckId; - - VclPtr<sfx2::sidebar::Deck> mpDeck; - VclPtr<sfx2::sidebar::Panel> mpPanel; - - sal_Int32 GetMaxOrderIndex(sfx2::sidebar::ResourceManager::PanelContextDescriptorContainer aPanels); - sal_Int32 GetMinOrderIndex(sfx2::sidebar::ResourceManager::PanelContextDescriptorContainer aPanels); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/sidebar/UnoPanels.hxx b/include/sfx2/sidebar/UnoPanels.hxx deleted file mode 100644 index 247f0ceb4814..000000000000 --- a/include/sfx2/sidebar/UnoPanels.hxx +++ /dev/null @@ -1,61 +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/. - */ - -#ifndef INCLUDED_SFX2_SIDEBAR_PANELS_HXX -#define INCLUDED_SFX2_SIDEBAR_PANELS_HXX - - -#include <com/sun/star/ui/XPanels.hpp> - -#include <cppuhelper/implbase.hxx> - -namespace com::sun::star::frame { class XFrame; } -namespace sfx2 { namespace sidebar { class SidebarController; } } - -/** get the decks -*/ -class SfxUnoPanels final : public cppu::WeakImplHelper<css::ui::XPanels> -{ - -public: - - SfxUnoPanels(const css::uno::Reference<css::frame::XFrame>& , const OUString&); - -// XPanels - virtual OUString SAL_CALL getDeckId() override; - -// XNameAccess - - virtual css::uno::Any SAL_CALL getByName( const OUString& aName ) override; - - virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override; - - virtual sal_Bool SAL_CALL hasByName( const OUString& aName ) override; - -// XIndexAccess - - virtual sal_Int32 SAL_CALL getCount() override; - - virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index ) override; - -// XElementAccess - virtual css::uno::Type SAL_CALL getElementType() override; - virtual sal_Bool SAL_CALL hasElements() override; - -private: - - const css::uno::Reference<css::frame::XFrame> xFrame; - sfx2::sidebar::SidebarController* getSidebarController(); - const OUString& mDeckId; - -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/templatecontaineritem.hxx b/include/sfx2/templatecontaineritem.hxx deleted file mode 100644 index f7a19f64164f..000000000000 --- a/include/sfx2/templatecontaineritem.hxx +++ /dev/null @@ -1,30 +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/. - */ - -#ifndef INCLUDED_SFX2_TEMPLATECONTAINERITEM_HXX -#define INCLUDED_SFX2_TEMPLATECONTAINERITEM_HXX - -#include <sfx2/templateproperties.hxx> - -class TemplateContainerItem final -{ -public: - sal_uInt16 const mnId; - sal_uInt16 mnRegionId; - OUString maTitle; - std::vector<TemplateItemProperties> maTemplates; - - TemplateContainerItem (sal_uInt16 nId); - - ~TemplateContainerItem (); -}; - -#endif // INCLUDED_SFX2_TEMPLATECONTAINERITEM_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/templatedefaultview.hxx b/include/sfx2/templatedefaultview.hxx deleted file mode 100644 index 598653981f7b..000000000000 --- a/include/sfx2/templatedefaultview.hxx +++ /dev/null @@ -1,35 +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/. - */ - -#ifndef INCLUDED_SFX2_TEMPLATEDEFAULTVIEW_HXX -#define INCLUDED_SFX2_TEMPLATEDEFAULTVIEW_HXX - -#include <sfx2/templatelocalview.hxx> - -class TemplateDefaultView final : public TemplateLocalView -{ -public: - TemplateDefaultView(Window *pParent); - - virtual void reload() override; - - virtual void showAllTemplates () override; - - virtual void KeyInput( const KeyEvent& rKEvt ) override; - - virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; - - void createContextMenu(); - -private: - long mnItemMaxSize; -}; - -#endif // INCLUDED_SFX2_TEMPLATEDEFAULTVIEW_HXX -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/templateviewitem.hxx b/include/sfx2/templateviewitem.hxx deleted file mode 100644 index 21433157f796..000000000000 --- a/include/sfx2/templateviewitem.hxx +++ /dev/null @@ -1,48 +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/. - */ - -#ifndef INCLUDED_SFX2_TEMPLATEVIEWITEM_HXX -#define INCLUDED_SFX2_TEMPLATEVIEWITEM_HXX - -#include <sfx2/thumbnailviewitem.hxx> - -class TemplateViewItem : public ThumbnailViewItem -{ -public: - - TemplateViewItem (ThumbnailViewBase &rView, sal_uInt16 nId); - - virtual ~TemplateViewItem () override; - - void setPath (const OUString &rPath) { maPath = rPath; } - - const OUString& getPath () const { return maPath; } - - void showDefaultIcon(bool bVal) { mbIsDefaultTemplate = bVal; } - - bool IsDefaultTemplate() const { return mbIsDefaultTemplate; } - - tools::Rectangle getDefaultIconArea() const; - - virtual void Paint (drawinglayer::processor2d::BaseProcessor2D *pProcessor, - const ThumbnailItemAttributes *pAttrs) override; - - sal_uInt16 mnRegionId; - sal_uInt16 mnDocId; - -private: - - OUString maPath; - BitmapEx const maDefaultBitmap; - bool mbIsDefaultTemplate; -}; - -#endif // INCLUDED_SFX2_TEMPLATEVIEWITEM_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/thumbnailviewitem.hxx b/include/sfx2/thumbnailviewitem.hxx deleted file mode 100644 index e5be46e9bb2b..000000000000 --- a/include/sfx2/thumbnailviewitem.hxx +++ /dev/null @@ -1,140 +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_THUMBNAILVIEWITEM_HXX -#define INCLUDED_SFX2_THUMBNAILVIEWITEM_HXX - -#include <basegfx/vector/b2dvector.hxx> -#include <drawinglayer/attribute/fontattribute.hxx> -#include <vcl/bitmapex.hxx> -#include <sfx2/dllapi.h> - -namespace com::sun::star::accessibility { class XAccessible; } -namespace drawinglayer::primitive2d { class Primitive2DContainer; } - -#define THUMBNAILVIEW_ITEM_NONEITEM 0xFFFE - -const int THUMBNAILVIEW_ITEM_CORNER = 5; - -class ThumbnailViewBase; -class MouseEvent; - -namespace basegfx { - class B2DPolygon; -} - -namespace drawinglayer { - namespace processor2d { - class BaseProcessor2D; - } - - namespace primitive2d { - class PolygonHairlinePrimitive2D; - } -} - -struct ThumbnailItemAttributes -{ - sal_uInt32 nMaxTextLength; - basegfx::BColor aFillColor; - basegfx::BColor aTextColor; - basegfx::BColor aHighlightColor; - basegfx::BColor aHighlightTextColor; - basegfx::BColor aSelectHighlightColor; - basegfx::BColor aSelectHighlightTextColor; - double fHighlightTransparence; - basegfx::B2DVector aFontSize; - drawinglayer::attribute::FontAttribute aFontAttr; -}; - -class ThumbnailViewItem -{ -public: - - ThumbnailViewBase &mrParent; - sal_uInt16 const mnId; - bool mbVisible; - bool mbSelected; - bool mbHover; - BitmapEx maPreview1; - OUString maTitle; - OUString maHelpText; - css::uno::Reference< css::accessibility::XAccessible > mxAcc; - - ThumbnailViewItem (ThumbnailViewBase &rView, sal_uInt16 nId); - - virtual ~ThumbnailViewItem (); - - bool isVisible () const { return mbVisible; } - - void show (bool bVisible); - - bool isSelected () const { return mbSelected; } - - void setSelection (bool state); - - bool isHighlighted () const { return mbHover; } - - void setHighlight (bool state); - - /** Updates own highlight status based on the aPoint position. - - Returns rectangle that needs to be invalidated. - */ - virtual tools::Rectangle updateHighlight(bool bVisible, const Point& rPoint); - - /// Text to be used for the tooltip. - - void setHelpText (const OUString &sText) { maHelpText = sText; } - - virtual OUString getHelpText() const { return maHelpText; }; - OUString const & getTitle() const { return maTitle; }; - - void setTitle (const OUString& rTitle); - - css::uno::Reference< css::accessibility::XAccessible > const & - GetAccessible( bool bIsTransientChildrenDisabled ); - - void setDrawArea (const tools::Rectangle &area); - - const tools::Rectangle& getDrawArea () const { return maDrawArea; } - - virtual void calculateItemsPosition (const long nThumbnailHeight, - const long nPadding, sal_uInt32 nMaxTextLength, - const ThumbnailItemAttributes *pAttrs); - - virtual void Paint (drawinglayer::processor2d::BaseProcessor2D *pProcessor, - const ThumbnailItemAttributes *pAttrs); - void addTextPrimitives (const OUString& rText, const ThumbnailItemAttributes *pAttrs, Point aPos, drawinglayer::primitive2d::Primitive2DContainer& rSeq); - - static drawinglayer::primitive2d::PolygonHairlinePrimitive2D* - createBorderLine (const basegfx::B2DPolygon &rPolygon); - - virtual void MouseButtonUp(const MouseEvent&) {} - -protected: - - Point maTextPos; - Point maPrev1Pos; - tools::Rectangle maDrawArea; -}; - -#endif // INCLUDED_SFX2_THUMBNAILVIEWITEM_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/sfx2/unoctitm.hxx b/include/sfx2/unoctitm.hxx deleted file mode 100644 index 3460d941571a..000000000000 --- a/include/sfx2/unoctitm.hxx +++ /dev/null @@ -1,148 +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_UNOCTITM_HXX -#define INCLUDED_SFX2_UNOCTITM_HXX - -#include <memory> -#include <com/sun/star/frame/XNotifyingDispatch.hpp> -#include <com/sun/star/lang/XUnoTunnel.hpp> -#include <cppuhelper/implbase.hxx> -#include <cppuhelper/interfacecontainer.hxx> -#include <cppuhelper/weakref.hxx> - -#include <sfx2/ctrlitem.hxx> -#include <osl/mutex.hxx> - -namespace com::sun::star::frame { class XFrame; } -namespace com::sun::star::frame { class XNotifyingDispatch; } -namespace com::sun::star::frame { class XStatusListener; } -namespace com::sun::star::frame { struct FeatureStateEvent; } - -class SfxBindings; -class SfxDispatcher; -class SfxSlot; - -typedef cppu::OMultiTypeInterfaceContainerHelperVar<OUString> - SfxStatusDispatcher_Impl_ListenerContainer; - -class SfxStatusDispatcher : public cppu::WeakImplHelper<css::frame::XNotifyingDispatch> -{ - ::osl::Mutex aMutex; - SfxStatusDispatcher_Impl_ListenerContainer aListeners; - -public: - - SfxStatusDispatcher(); - - // XDispatch - virtual void SAL_CALL dispatchWithNotification( const css::util::URL& aURL, - const css::uno::Sequence< css::beans::PropertyValue >& aArgs, - const css::uno::Reference< css::frame::XDispatchResultListener >& rListener ) override; - virtual void SAL_CALL dispatch( const css::util::URL& aURL, const css::uno::Sequence< css::beans::PropertyValue >& aArgs ) override; - virtual void SAL_CALL addStatusListener(const css::uno::Reference< css::frame::XStatusListener > & xControl, const css::util::URL& aURL) override; - virtual void SAL_CALL removeStatusListener(const css::uno::Reference< css::frame::XStatusListener > & xControl, const css::util::URL& aURL) override; - - // Something else - void ReleaseAll(); - SfxStatusDispatcher_Impl_ListenerContainer& GetListeners() - { return aListeners; } -}; - -class SfxSlotServer; -class SfxDispatchController_Impl; -class SfxOfficeDispatch final : public cppu::ImplInheritanceHelper<SfxStatusDispatcher, css::lang::XUnoTunnel> -{ -friend class SfxDispatchController_Impl; - std::unique_ptr<SfxDispatchController_Impl> pImpl; -public: - SfxOfficeDispatch( SfxBindings& rBind, - SfxDispatcher* pDispat, - const SfxSlot* pSlot, - const css::util::URL& rURL ); - SfxOfficeDispatch( SfxDispatcher* pDispat, - const SfxSlot* pSlot, - const css::util::URL& rURL ); - virtual ~SfxOfficeDispatch() override; - - virtual void SAL_CALL dispatchWithNotification( const css::util::URL& aURL, - const css::uno::Sequence< css::beans::PropertyValue >& aArgs, - const css::uno::Reference< css::frame::XDispatchResultListener >& rListener ) override; - virtual void SAL_CALL dispatch( const css::util::URL& aURL, - const css::uno::Sequence< css::beans::PropertyValue >& aArgs ) override; - virtual void SAL_CALL addStatusListener( const css::uno::Reference< css::frame::XStatusListener > & xControl, - const css::util::URL& aURL) override; - - // XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override ; - static const css::uno::Sequence< sal_Int8 >& impl_getStaticIdentifier(); - - static bool IsMasterUnoCommand( const css::util::URL& aURL ); - static OUString GetMasterUnoCommand( const css::util::URL& aURL ); - - void SetFrame(const css::uno::Reference< css::frame::XFrame >& xFrame); - - void SetMasterUnoCommand( bool bSet ); - - SfxDispatcher* GetDispatcher_Impl(); -}; - -class SfxDispatchController_Impl : public SfxControllerItem -{ - css::util::URL aDispatchURL; - SfxDispatcher* pDispatcher; - SfxBindings* pBindings; - const SfxPoolItem* pLastState; - SfxOfficeDispatch* pDispatch; - bool bMasterSlave; - bool bVisible; - css::uno::WeakReference< css::frame::XFrame > xFrame; - - static void addParametersToArgs( const css::util::URL& aURL, - css::uno::Sequence< css::beans::PropertyValue >& rArgs ); - static MapUnit GetCoreMetric( SfxItemPool const & rPool, sal_uInt16 nSlot ); - - void sendStatusChanged(const OUString& rURL, const css::frame::FeatureStateEvent& rEvent); - -public: - SfxDispatchController_Impl( SfxOfficeDispatch* pDisp, - SfxBindings* pBind, - SfxDispatcher* pDispat, - const SfxSlot* pSlot, - const css::util::URL& rURL ); - virtual ~SfxDispatchController_Impl() override; - - static OUString getSlaveCommand( const css::util::URL& rURL ); - - void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState, SfxSlotServer const * pServ ); - virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) override; - void setMasterSlaveCommand( bool bSet ); - /// @throws css::uno::RuntimeException - void dispatch( const css::util::URL& aURL, - const css::uno::Sequence< css::beans::PropertyValue >& aArgs, - const css::uno::Reference< css::frame::XDispatchResultListener >& rListener ); - /// @throws css::uno::RuntimeException - void addStatusListener(const css::uno::Reference< css::frame::XStatusListener > & xControl, const css::util::URL& aURL); - void UnBindController(); - SfxDispatcher* GetDispatcher(); - void SetFrame(const css::uno::Reference< css::frame::XFrame >& xFrame); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |