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 /sfx2 | |
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 'sfx2')
96 files changed, 1969 insertions, 118 deletions
diff --git a/sfx2/IwyuFilter_sfx2.yaml b/sfx2/IwyuFilter_sfx2.yaml index ddb3efcaa2ba..16c922da30a7 100644 --- a/sfx2/IwyuFilter_sfx2.yaml +++ b/sfx2/IwyuFilter_sfx2.yaml @@ -1,6 +1,31 @@ --- assumeFilename: sfx2/source/appl/app.cxx blacklist: + sfx2/inc/sidebar/Accessible.hxx: + # base class has to be a complete type + - com/sun/star/accessibility/XAccessible.hpp + sfx2/inc/sidebar/Paint.hxx: + # Needed for boost::variant + - vcl/gradient.hxx + sfx2/inc/sidebar/UnoDeck.hxx: + # base class has to be a complete type + - com/sun/star/ui/XDeck.hpp + sfx2/inc/sidebar/UnoDecks.hxx: + # base class has to be a complete type + - com/sun/star/ui/XDecks.hpp + sfx2/inc/sidebar/UnoPanel.hxx: + # base class has to be a complete type + - com/sun/star/ui/XPanel.hpp + sfx2/inc/sidebar/UnoPanels.hxx: + # base class has to be a complete type + - com/sun/star/ui/XPanels.hpp + sfx2/inc/recentdocsview.hxx: + # Needed for struct declaration + - com/sun/star/beans/PropertyValue.hpp + sfx2/inc/unoctitm.hxx: + # base class has to be a complete type + - com/sun/star/frame/XNotifyingDispatch.hpp + - com/sun/star/lang/XUnoTunnel.hpp sfx2/source/doc/syspathw32.hxx: # Needed on WIN32 - sal/types.h diff --git a/sfx2/inc/charmapcontrol.hxx b/sfx2/inc/charmapcontrol.hxx new file mode 100644 index 000000000000..0902f17fa94f --- /dev/null +++ b/sfx2/inc/charmapcontrol.hxx @@ -0,0 +1,66 @@ +/* -*- 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 <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(); +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/checkin.hxx b/sfx2/inc/checkin.hxx new file mode 100644 index 000000000000..78535f7aab9d --- /dev/null +++ b/sfx2/inc/checkin.hxx @@ -0,0 +1,31 @@ +/* -*- 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/sfx2/inc/emojicontrol.hxx b/sfx2/inc/emojicontrol.hxx new file mode 100644 index 000000000000..33d0e021bbe1 --- /dev/null +++ b/sfx2/inc/emojicontrol.hxx @@ -0,0 +1,51 @@ +/* -*- 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/sfx2/inc/emojiview.hxx b/sfx2/inc/emojiview.hxx new file mode 100644 index 000000000000..212a785de445 --- /dev/null +++ b/sfx2/inc/emojiview.hxx @@ -0,0 +1,78 @@ +/* -*- 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 <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; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/emojiviewitem.hxx b/sfx2/inc/emojiviewitem.hxx new file mode 100644 index 000000000000..bbdcf329f392 --- /dev/null +++ b/sfx2/inc/emojiviewitem.hxx @@ -0,0 +1,35 @@ +/* -*- 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 "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; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/notebookbar/NotebookbarTabControl.hxx b/sfx2/inc/notebookbar/NotebookbarTabControl.hxx new file mode 100644 index 000000000000..f2f62a70bddb --- /dev/null +++ b/sfx2/inc/notebookbar/NotebookbarTabControl.hxx @@ -0,0 +1,49 @@ +/* -*- 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 <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; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx index efa6a446c846..306c66fdef39 100644 --- a/sfx2/inc/pch/precompiled_sfx.hxx +++ b/sfx2/inc/pch/precompiled_sfx.hxx @@ -437,36 +437,36 @@ #include <sfx2/sfxresid.hxx> #include <sfx2/sfxuno.hxx> #include <sfx2/sidebar/Context.hxx> -#include <sfx2/sidebar/ControllerFactory.hxx> +#include <sidebar/ControllerFactory.hxx> #include <sfx2/sidebar/Deck.hxx> -#include <sfx2/sidebar/DeckDescriptor.hxx> -#include <sfx2/sidebar/DeckTitleBar.hxx> -#include <sfx2/sidebar/DrawHelper.hxx> -#include <sfx2/sidebar/Paint.hxx> +#include <sidebar/DeckDescriptor.hxx> +#include <sidebar/DeckTitleBar.hxx> +#include <sidebar/DrawHelper.hxx> +#include <sidebar/Paint.hxx> #include <sfx2/sidebar/Panel.hxx> -#include <sfx2/sidebar/PanelDescriptor.hxx> -#include <sfx2/sidebar/PanelTitleBar.hxx> +#include <sidebar/PanelDescriptor.hxx> +#include <sidebar/PanelTitleBar.hxx> #include <sfx2/sidebar/ResourceManager.hxx> #include <sfx2/sidebar/SidebarChildWindow.hxx> #include <sfx2/sidebar/SidebarController.hxx> #include <sfx2/sidebar/SidebarDockingWindow.hxx> #include <sfx2/sidebar/TabBar.hxx> #include <sfx2/sidebar/Theme.hxx> -#include <sfx2/sidebar/TitleBar.hxx> +#include <sidebar/TitleBar.hxx> #include <sfx2/sidebar/Tools.hxx> #include <sfx2/signaturestate.hxx> #include <sfx2/stbitem.hxx> #include <sfx2/styfitem.hxx> #include <sfx2/tabdlg.hxx> #include <sfx2/tbxctrl.hxx> -#include <sfx2/templatecontaineritem.hxx> +#include <templatecontaineritem.hxx> #include <sfx2/templatedlg.hxx> #include <sfx2/templatelocalview.hxx> -#include <sfx2/templateviewitem.hxx> +#include <templateviewitem.hxx> #include <sfx2/thumbnailview.hxx> -#include <sfx2/thumbnailviewitem.hxx> +#include <thumbnailviewitem.hxx> #include <sfx2/tplpitem.hxx> -#include <sfx2/unoctitm.hxx> +#include <unoctitm.hxx> #include <sfx2/viewfac.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/viewsh.hxx> diff --git a/sfx2/inc/recentdocsview.hxx b/sfx2/inc/recentdocsview.hxx new file mode 100644 index 000000000000..e5f7ebfb5a8e --- /dev/null +++ b/sfx2/inc/recentdocsview.hxx @@ -0,0 +1,99 @@ +/* -*- 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 <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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/Accessible.hxx b/sfx2/inc/sidebar/Accessible.hxx new file mode 100644 index 000000000000..f216da980cf2 --- /dev/null +++ b/sfx2/inc/sidebar/Accessible.hxx @@ -0,0 +1,60 @@ +/* -*- 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 { 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/AccessibleTitleBar.hxx b/sfx2/inc/sidebar/AccessibleTitleBar.hxx new file mode 100644 index 000000000000..58f70e3efd3b --- /dev/null +++ b/sfx2/inc/sidebar/AccessibleTitleBar.hxx @@ -0,0 +1,44 @@ +/* -*- 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 <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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/ContextList.hxx b/sfx2/inc/sidebar/ContextList.hxx new file mode 100644 index 000000000000..2ca07d36d416 --- /dev/null +++ b/sfx2/inc/sidebar/ContextList.hxx @@ -0,0 +1,66 @@ +/* -*- 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 <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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/ControllerFactory.hxx b/sfx2/inc/sidebar/ControllerFactory.hxx new file mode 100644 index 000000000000..66c3e432aebc --- /dev/null +++ b/sfx2/inc/sidebar/ControllerFactory.hxx @@ -0,0 +1,66 @@ +/* -*- 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 <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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/DeckDescriptor.hxx b/sfx2/inc/sidebar/DeckDescriptor.hxx new file mode 100644 index 000000000000..92a229f41c47 --- /dev/null +++ b/sfx2/inc/sidebar/DeckDescriptor.hxx @@ -0,0 +1,53 @@ +/* -*- 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 <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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/DeckLayouter.hxx b/sfx2/inc/sidebar/DeckLayouter.hxx new file mode 100644 index 000000000000..ed74e6261742 --- /dev/null +++ b/sfx2/inc/sidebar/DeckLayouter.hxx @@ -0,0 +1,48 @@ +/* -*- 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 <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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/DeckTitleBar.hxx b/sfx2/inc/sidebar/DeckTitleBar.hxx new file mode 100644 index 000000000000..bc522d87a889 --- /dev/null +++ b/sfx2/inc/sidebar/DeckTitleBar.hxx @@ -0,0 +1,52 @@ +/* -*- 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 <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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/DrawHelper.hxx b/sfx2/inc/sidebar/DrawHelper.hxx new file mode 100644 index 000000000000..64e173ce317a --- /dev/null +++ b/sfx2/inc/sidebar/DrawHelper.hxx @@ -0,0 +1,47 @@ +/* -*- 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 <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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/MenuButton.hxx b/sfx2/inc/sidebar/MenuButton.hxx new file mode 100644 index 000000000000..36d18a0b836a --- /dev/null +++ b/sfx2/inc/sidebar/MenuButton.hxx @@ -0,0 +1,45 @@ +/* -*- 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 <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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/Paint.hxx b/sfx2/inc/sidebar/Paint.hxx new file mode 100644 index 000000000000..e93c6d28d829 --- /dev/null +++ b/sfx2/inc/sidebar/Paint.hxx @@ -0,0 +1,73 @@ +/* -*- 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 <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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/PanelDescriptor.hxx b/sfx2/inc/sidebar/PanelDescriptor.hxx new file mode 100644 index 000000000000..42dd7b8578c3 --- /dev/null +++ b/sfx2/inc/sidebar/PanelDescriptor.hxx @@ -0,0 +1,50 @@ +/* -*- 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 <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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/PanelTitleBar.hxx b/sfx2/inc/sidebar/PanelTitleBar.hxx new file mode 100644 index 000000000000..1806f1bb133d --- /dev/null +++ b/sfx2/inc/sidebar/PanelTitleBar.hxx @@ -0,0 +1,62 @@ +/* -*- 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 <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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/TabItem.hxx b/sfx2/inc/sidebar/TabItem.hxx new file mode 100644 index 000000000000..c80604b86b6f --- /dev/null +++ b/sfx2/inc/sidebar/TabItem.hxx @@ -0,0 +1,46 @@ +/* -*- 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 <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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/TitleBar.hxx b/sfx2/inc/sidebar/TitleBar.hxx new file mode 100644 index 000000000000..8a22303aabbf --- /dev/null +++ b/sfx2/inc/sidebar/TitleBar.hxx @@ -0,0 +1,76 @@ +/* -*- 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 <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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/UnoDeck.hxx b/sfx2/inc/sidebar/UnoDeck.hxx new file mode 100644 index 000000000000..c2f10b36452e --- /dev/null +++ b/sfx2/inc/sidebar/UnoDeck.hxx @@ -0,0 +1,62 @@ +/* -*- 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 <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); + +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/UnoDecks.hxx b/sfx2/inc/sidebar/UnoDecks.hxx new file mode 100644 index 000000000000..d0a5b710e05a --- /dev/null +++ b/sfx2/inc/sidebar/UnoDecks.hxx @@ -0,0 +1,54 @@ +/* -*- 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 <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(); + +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/UnoPanel.hxx b/sfx2/inc/sidebar/UnoPanel.hxx new file mode 100644 index 000000000000..07fa526907a1 --- /dev/null +++ b/sfx2/inc/sidebar/UnoPanel.hxx @@ -0,0 +1,69 @@ +/* -*- 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 <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); +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/sidebar/UnoPanels.hxx b/sfx2/inc/sidebar/UnoPanels.hxx new file mode 100644 index 000000000000..598db749ee1f --- /dev/null +++ b/sfx2/inc/sidebar/UnoPanels.hxx @@ -0,0 +1,57 @@ +/* -*- 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 <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; + +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/templatecontaineritem.hxx b/sfx2/inc/templatecontaineritem.hxx new file mode 100644 index 000000000000..0e618e48ee5a --- /dev/null +++ b/sfx2/inc/templatecontaineritem.hxx @@ -0,0 +1,27 @@ +/* -*- 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 <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 (); +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/templatedefaultview.hxx b/sfx2/inc/templatedefaultview.hxx new file mode 100644 index 000000000000..9020a779bfd9 --- /dev/null +++ b/sfx2/inc/templatedefaultview.hxx @@ -0,0 +1,33 @@ +/* -*- 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 <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; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/templateviewitem.hxx b/sfx2/inc/templateviewitem.hxx new file mode 100644 index 000000000000..64faf438b847 --- /dev/null +++ b/sfx2/inc/templateviewitem.hxx @@ -0,0 +1,45 @@ +/* -*- 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 "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; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/thumbnailviewitem.hxx b/sfx2/inc/thumbnailviewitem.hxx new file mode 100644 index 000000000000..eef035ae09d1 --- /dev/null +++ b/sfx2/inc/thumbnailviewitem.hxx @@ -0,0 +1,137 @@ +/* -*- 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 <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; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/inc/unoctitm.hxx b/sfx2/inc/unoctitm.hxx new file mode 100644 index 000000000000..c180150325cc --- /dev/null +++ b/sfx2/inc/unoctitm.hxx @@ -0,0 +1,145 @@ +/* -*- 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 <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); +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx index 1b74848f39cf..fdc3f0304df2 100644 --- a/sfx2/source/appl/appdata.cxx +++ b/sfx2/source/appl/appdata.cxx @@ -25,7 +25,7 @@ #include <sfx2/module.hxx> #include <sfx2/sidebar/Theme.hxx> #include <sfx2/objsh.hxx> -#include <sfx2/unoctitm.hxx> +#include <unoctitm.hxx> #include <appbaslib.hxx> #include <svl/svdde.hxx> diff --git a/sfx2/source/appl/appdispatchprovider.cxx b/sfx2/source/appl/appdispatchprovider.cxx index d3ec722aaead..2cec473fc748 100644 --- a/sfx2/source/appl/appdispatchprovider.cxx +++ b/sfx2/source/appl/appdispatchprovider.cxx @@ -36,7 +36,7 @@ #include <sfx2/msg.hxx> #include <sfx2/msgpool.hxx> #include <sfx2/sfxbasecontroller.hxx> -#include <sfx2/unoctitm.hxx> +#include <unoctitm.hxx> #include <vcl/svapp.hxx> using namespace ::com::sun::star; diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index c1584878aaca..3ebc6a83bf5d 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -40,7 +40,7 @@ #include <vcl/help.hxx> #include <vcl/svapp.hxx> -#include <sfx2/unoctitm.hxx> +#include <unoctitm.hxx> #include <appdata.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/msgpool.hxx> diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index b3e630fd73bd..cf5dff142be9 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -44,7 +44,7 @@ #include <sfx2/module.hxx> #include <sfx2/request.hxx> #include <workwin.hxx> -#include <sfx2/unoctitm.hxx> +#include <unoctitm.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/objsh.hxx> #include <sfx2/msgpool.hxx> diff --git a/sfx2/source/control/charmapcontrol.cxx b/sfx2/source/control/charmapcontrol.cxx index f4fff6f14a52..69e1a197d4ee 100644 --- a/sfx2/source/control/charmapcontrol.cxx +++ b/sfx2/source/control/charmapcontrol.cxx @@ -19,7 +19,7 @@ #include <comphelper/dispatchcommand.hxx> #include <officecfg/Office/Common.hxx> -#include <sfx2/charmapcontrol.hxx> +#include <charmapcontrol.hxx> #include <sfx2/charmappopup.hxx> #include <sfx2/viewfrm.hxx> diff --git a/sfx2/source/control/emojicontrol.cxx b/sfx2/source/control/emojicontrol.cxx index 7713009ec014..2baf021d37bf 100644 --- a/sfx2/source/control/emojicontrol.cxx +++ b/sfx2/source/control/emojicontrol.cxx @@ -17,10 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/emojicontrol.hxx> +#include <emojicontrol.hxx> #include <sfx2/emojipopup.hxx> -#include <sfx2/emojiview.hxx> -#include <sfx2/thumbnailviewitem.hxx> +#include <emojiview.hxx> +#include <thumbnailviewitem.hxx> #include <vcl/tabpage.hxx> #include <comphelper/propertysequence.hxx> #include <comphelper/dispatchcommand.hxx> diff --git a/sfx2/source/control/emojipopup.cxx b/sfx2/source/control/emojipopup.cxx index 513592bf0b92..2fe9173ea8cd 100644 --- a/sfx2/source/control/emojipopup.cxx +++ b/sfx2/source/control/emojipopup.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include <sfx2/emojipopup.hxx> -#include <sfx2/emojicontrol.hxx> +#include <emojicontrol.hxx> #include <vcl/toolbox.hxx> EmojiPopup::EmojiPopup(const css::uno::Reference<css::uno::XComponentContext>& rContext) diff --git a/sfx2/source/control/emojiview.cxx b/sfx2/source/control/emojiview.cxx index 571681474335..8bc65609d1d0 100644 --- a/sfx2/source/control/emojiview.cxx +++ b/sfx2/source/control/emojiview.cxx @@ -7,8 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <sfx2/emojiview.hxx> -#include <sfx2/emojiviewitem.hxx> +#include <emojiview.hxx> +#include <emojiviewitem.hxx> #include <rtl/bootstrap.hxx> #include <sal/log.hxx> #include <config_folders.h> diff --git a/sfx2/source/control/emojiviewitem.cxx b/sfx2/source/control/emojiviewitem.cxx index 8a5115a95331..665e24eb79ee 100644 --- a/sfx2/source/control/emojiviewitem.cxx +++ b/sfx2/source/control/emojiviewitem.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <sfx2/emojiviewitem.hxx> +#include <emojiviewitem.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx> diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx index 5367fe718833..d875c73dda17 100644 --- a/sfx2/source/control/recentdocsview.cxx +++ b/sfx2/source/control/recentdocsview.cxx @@ -19,7 +19,7 @@ #include <sal/log.hxx> #include <comphelper/base64.hxx> -#include <sfx2/recentdocsview.hxx> +#include <recentdocsview.hxx> #include <sfx2/sfxresid.hxx> #include <tools/diagnose_ex.h> #include <unotools/historyoptions.hxx> diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx index 26a281be5e26..7fa4bfaeb508 100644 --- a/sfx2/source/control/recentdocsviewitem.cxx +++ b/sfx2/source/control/recentdocsviewitem.cxx @@ -13,7 +13,7 @@ #include <drawinglayer/processor2d/baseprocessor2d.hxx> #include <i18nutil/paper.hxx> #include <officecfg/Office/Common.hxx> -#include <sfx2/recentdocsview.hxx> +#include <recentdocsview.hxx> #include <sfx2/templatelocalview.hxx> #include <tools/urlobj.hxx> #include <unotools/historyoptions.hxx> diff --git a/sfx2/source/control/recentdocsviewitem.hxx b/sfx2/source/control/recentdocsviewitem.hxx index 5f88f4170cae..fd4cddf97da2 100644 --- a/sfx2/source/control/recentdocsviewitem.hxx +++ b/sfx2/source/control/recentdocsviewitem.hxx @@ -10,7 +10,7 @@ #ifndef INCLUDED_SFX2_RECENTDOCSVIEWITEM_HXX #define INCLUDED_SFX2_RECENTDOCSVIEWITEM_HXX -#include <sfx2/thumbnailviewitem.hxx> +#include <thumbnailviewitem.hxx> class ThumbnailView; diff --git a/sfx2/source/control/sfxstatuslistener.cxx b/sfx2/source/control/sfxstatuslistener.cxx index 58c6aa522d03..9452d9e7ad91 100644 --- a/sfx2/source/control/sfxstatuslistener.cxx +++ b/sfx2/source/control/sfxstatuslistener.cxx @@ -35,7 +35,7 @@ #include <sfx2/viewfrm.hxx> #include <sfx2/dispatch.hxx> -#include <sfx2/unoctitm.hxx> +#include <unoctitm.hxx> #include <sfx2/msgpool.hxx> #include <sfx2/msg.hxx> diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx index ab0e95c91039..c0c92841c0b3 100644 --- a/sfx2/source/control/statcach.cxx +++ b/sfx2/source/control/statcach.cxx @@ -37,7 +37,7 @@ #include <sfx2/ctrlitem.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/sfxuno.hxx> -#include <sfx2/unoctitm.hxx> +#include <unoctitm.hxx> #include <sfx2/msgpool.hxx> #include <sfx2/viewfrm.hxx> diff --git a/sfx2/source/control/templatecontaineritem.cxx b/sfx2/source/control/templatecontaineritem.cxx index 41f1b6b93719..e30b6b7b1f6b 100644 --- a/sfx2/source/control/templatecontaineritem.cxx +++ b/sfx2/source/control/templatecontaineritem.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <sfx2/templatecontaineritem.hxx> +#include <templatecontaineritem.hxx> TemplateContainerItem::TemplateContainerItem (sal_uInt16 nId) : mnId(nId) diff --git a/sfx2/source/control/templatedefaultview.cxx b/sfx2/source/control/templatedefaultview.cxx index 1d170cfef538..65415520b81f 100644 --- a/sfx2/source/control/templatedefaultview.cxx +++ b/sfx2/source/control/templatedefaultview.cxx @@ -7,9 +7,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <sfx2/templatedefaultview.hxx> +#include <templatedefaultview.hxx> #include <sfx2/thumbnailview.hxx> -#include <sfx2/templateviewitem.hxx> +#include <templateviewitem.hxx> #include <sfx2/sfxresid.hxx> #include <vcl/builderfactory.hxx> #include <vcl/event.hxx> diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx index f033aaf53747..ecaddc2c9f5d 100644 --- a/sfx2/source/control/templatelocalview.cxx +++ b/sfx2/source/control/templatelocalview.cxx @@ -13,8 +13,8 @@ #include <sfx2/doctempl.hxx> #include <sfx2/inputdlg.hxx> #include <sfx2/sfxresid.hxx> -#include <sfx2/templatecontaineritem.hxx> -#include <sfx2/templateviewitem.hxx> +#include <templatecontaineritem.hxx> +#include <templateviewitem.hxx> #include <sfx2/docfac.hxx> #include <tools/urlobj.hxx> #include <unotools/moduleoptions.hxx> diff --git a/sfx2/source/control/templateviewitem.cxx b/sfx2/source/control/templateviewitem.cxx index f77ba6448054..6d8a99e925b5 100644 --- a/sfx2/source/control/templateviewitem.cxx +++ b/sfx2/source/control/templateviewitem.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <sfx2/templateviewitem.hxx> +#include <templateviewitem.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <basegfx/polygon/b2dpolygon.hxx> diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index ba829574d6a3..747205cd1f69 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -8,7 +8,7 @@ */ #include <sfx2/thumbnailview.hxx> -#include <sfx2/thumbnailviewitem.hxx> +#include <thumbnailviewitem.hxx> #include <utility> diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx index 53423bd567ae..e1a7a59c9f2a 100644 --- a/sfx2/source/control/thumbnailviewacc.cxx +++ b/sfx2/source/control/thumbnailviewacc.cxx @@ -21,7 +21,7 @@ #include <comphelper/servicehelper.hxx> #include <sfx2/thumbnailview.hxx> -#include <sfx2/thumbnailviewitem.hxx> +#include <thumbnailviewitem.hxx> #include <unotools/accessiblestatesethelper.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx index 54c2a6e4451e..8936a16627da 100644 --- a/sfx2/source/control/thumbnailviewitem.cxx +++ b/sfx2/source/control/thumbnailviewitem.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/thumbnailviewitem.hxx> +#include <thumbnailviewitem.hxx> #include <sfx2/thumbnailview.hxx> #include "thumbnailviewacc.hxx" diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 1eac0a9c7964..4d8bff24f497 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -49,7 +49,7 @@ #include <vcl/uitest/logger.hxx> #include <sfx2/app.hxx> -#include <sfx2/unoctitm.hxx> +#include <unoctitm.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/frame.hxx> #include <sfx2/ctrlitem.hxx> diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 10e38a0d2b21..d64a1747bc7b 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -31,7 +31,7 @@ #include <svtools/openfiledroptargetlistener.hxx> #include <svtools/colorcfg.hxx> #include <svtools/langhelp.hxx> -#include <sfx2/templateviewitem.hxx> +#include <templateviewitem.hxx> #include <vcl/menubtn.hxx> diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx index c9a803e433b3..a029557324ad 100644 --- a/sfx2/source/dialog/backingwindow.hxx +++ b/sfx2/source/dialog/backingwindow.hxx @@ -28,8 +28,8 @@ #include <vcl/menubtn.hxx> -#include <sfx2/recentdocsview.hxx> -#include <sfx2/templatedefaultview.hxx> +#include <recentdocsview.hxx> +#include <templatedefaultview.hxx> #include <svtools/acceleratorexecute.hxx> diff --git a/sfx2/source/dialog/charmappopup.cxx b/sfx2/source/dialog/charmappopup.cxx index 7d01a5a661c4..7788a45c73c0 100644 --- a/sfx2/source/dialog/charmappopup.cxx +++ b/sfx2/source/dialog/charmappopup.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include <sfx2/charmappopup.hxx> -#include <sfx2/charmapcontrol.hxx> +#include <charmapcontrol.hxx> #include <vcl/toolbox.hxx> CharmapPopup::CharmapPopup(const css::uno::Reference<css::uno::XComponentContext>& rContext) diff --git a/sfx2/source/dialog/checkin.cxx b/sfx2/source/dialog/checkin.cxx index cd464d751525..6d90be8af234 100644 --- a/sfx2/source/dialog/checkin.cxx +++ b/sfx2/source/dialog/checkin.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <sfx2/checkin.hxx> +#include <checkin.hxx> SfxCheckinDialog::SfxCheckinDialog(weld::Window* pParent) : GenericDialogController( pParent, "sfx/ui/checkin.ui", "CheckinDialog") diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index a0b7cb6b13f4..a4e4381ab179 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -82,7 +82,7 @@ #include <sfx2/fcontnr.hxx> #include <sfx2/msgpool.hxx> #include <sfx2/objface.hxx> -#include <sfx2/checkin.hxx> +#include <checkin.hxx> #include <sfx2/infobar.hxx> #include <sfx2/sfxuno.hxx> #include <sfx2/sfxsids.hrc> diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index c5e2d204e303..2fc118bfb37b 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -25,9 +25,9 @@ #include <sfx2/objsh.hxx> #include <sfx2/sfxresid.hxx> #include <sfx2/templatelocalview.hxx> -#include <sfx2/templatecontaineritem.hxx> -#include <sfx2/templateviewitem.hxx> -#include <sfx2/thumbnailviewitem.hxx> +#include <templatecontaineritem.hxx> +#include <templateviewitem.hxx> +#include <thumbnailviewitem.hxx> #include <sot/storage.hxx> #include <svtools/imagemgr.hxx> #include <svtools/langhelp.hxx> diff --git a/sfx2/source/inc/templatesearchviewitem.hxx b/sfx2/source/inc/templatesearchviewitem.hxx index 4df92e8916e1..0f681cbdd152 100644 --- a/sfx2/source/inc/templatesearchviewitem.hxx +++ b/sfx2/source/inc/templatesearchviewitem.hxx @@ -10,7 +10,7 @@ #ifndef INCLUDED_SFX2_SOURCE_INC_TEMPLATESEARCHVIEWITEM_HXX #define INCLUDED_SFX2_SOURCE_INC_TEMPLATESEARCHVIEWITEM_HXX -#include <sfx2/templateviewitem.hxx> +#include <templateviewitem.hxx> struct TemplateSearchViewItem : public TemplateViewItem { diff --git a/sfx2/source/notebookbar/NotebookbarTabControl.cxx b/sfx2/source/notebookbar/NotebookbarTabControl.cxx index 13d0c6da3983..acbc65a7efca 100644 --- a/sfx2/source/notebookbar/NotebookbarTabControl.cxx +++ b/sfx2/source/notebookbar/NotebookbarTabControl.cxx @@ -22,7 +22,7 @@ #include <vcl/notebookbar.hxx> #include <vcl/tabpage.hxx> #include <sfx2/viewfrm.hxx> -#include <sfx2/notebookbar/NotebookbarTabControl.hxx> +#include <notebookbar/NotebookbarTabControl.hxx> #include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp> #include <com/sun/star/ui/ItemType.hpp> #include <com/sun/star/frame/XModuleManager.hpp> diff --git a/sfx2/source/sidebar/Accessible.cxx b/sfx2/source/sidebar/Accessible.cxx index bae5ac590cd6..8eb264f39085 100644 --- a/sfx2/source/sidebar/Accessible.cxx +++ b/sfx2/source/sidebar/Accessible.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/sidebar/Accessible.hxx> +#include <sidebar/Accessible.hxx> using namespace css; using namespace css::uno; diff --git a/sfx2/source/sidebar/AccessibleTitleBar.cxx b/sfx2/source/sidebar/AccessibleTitleBar.cxx index f6343d1c795b..c92fbf59e812 100644 --- a/sfx2/source/sidebar/AccessibleTitleBar.cxx +++ b/sfx2/source/sidebar/AccessibleTitleBar.cxx @@ -17,9 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/sidebar/AccessibleTitleBar.hxx> -#include <sfx2/sidebar/Accessible.hxx> -#include <sfx2/sidebar/TitleBar.hxx> +#include <sidebar/AccessibleTitleBar.hxx> +#include <sidebar/Accessible.hxx> +#include <sidebar/TitleBar.hxx> #include <com/sun/star/accessibility/AccessibleStateType.hpp> diff --git a/sfx2/source/sidebar/ContextList.cxx b/sfx2/source/sidebar/ContextList.cxx index 2d77cd7a4c47..36e9872d3d0b 100644 --- a/sfx2/source/sidebar/ContextList.cxx +++ b/sfx2/source/sidebar/ContextList.cxx @@ -16,7 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/sidebar/ContextList.hxx> +#include <sidebar/ContextList.hxx> #include <sfx2/sidebar/Context.hxx> namespace sfx2::sidebar { diff --git a/sfx2/source/sidebar/ControlFactory.cxx b/sfx2/source/sidebar/ControlFactory.cxx index de5e8123ddf3..5e4d03ac3c0a 100644 --- a/sfx2/source/sidebar/ControlFactory.cxx +++ b/sfx2/source/sidebar/ControlFactory.cxx @@ -18,8 +18,8 @@ */ #include <sfx2/sidebar/ControlFactory.hxx> -#include <sfx2/sidebar/MenuButton.hxx> -#include <sfx2/sidebar/TabItem.hxx> +#include <sidebar/MenuButton.hxx> +#include <sidebar/TabItem.hxx> namespace sfx2::sidebar { diff --git a/sfx2/source/sidebar/ControllerFactory.cxx b/sfx2/source/sidebar/ControllerFactory.cxx index 98d39395d26b..54fc5b774674 100644 --- a/sfx2/source/sidebar/ControllerFactory.cxx +++ b/sfx2/source/sidebar/ControllerFactory.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/sidebar/ControllerFactory.hxx> +#include <sidebar/ControllerFactory.hxx> #include <sfx2/sidebar/Tools.hxx> #include <com/sun/star/frame/XToolbarController.hpp> diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index 0967468e3879..d5910704d50e 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -18,12 +18,12 @@ */ #include <sfx2/sidebar/Deck.hxx> -#include <sfx2/sidebar/DeckDescriptor.hxx> -#include <sfx2/sidebar/DeckLayouter.hxx> -#include <sfx2/sidebar/DrawHelper.hxx> -#include <sfx2/sidebar/DeckTitleBar.hxx> -#include <sfx2/sidebar/PanelTitleBar.hxx> -#include <sfx2/sidebar/Paint.hxx> +#include <sidebar/DeckDescriptor.hxx> +#include <sidebar/DeckLayouter.hxx> +#include <sidebar/DrawHelper.hxx> +#include <sidebar/DeckTitleBar.hxx> +#include <sidebar/PanelTitleBar.hxx> +#include <sidebar/Paint.hxx> #include <sfx2/sidebar/Panel.hxx> #include <sfx2/sidebar/Theme.hxx> #include <sfx2/lokhelper.hxx> diff --git a/sfx2/source/sidebar/DeckDescriptor.cxx b/sfx2/source/sidebar/DeckDescriptor.cxx index 0f38e335dca2..79bb3afdab54 100644 --- a/sfx2/source/sidebar/DeckDescriptor.cxx +++ b/sfx2/source/sidebar/DeckDescriptor.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/sidebar/DeckDescriptor.hxx> +#include <sidebar/DeckDescriptor.hxx> namespace sfx2::sidebar { diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx index e96a068a2b5f..49a57bf4d8ba 100644 --- a/sfx2/source/sidebar/DeckLayouter.cxx +++ b/sfx2/source/sidebar/DeckLayouter.cxx @@ -17,10 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/sidebar/DeckLayouter.hxx> +#include <sidebar/DeckLayouter.hxx> #include <sfx2/sidebar/Theme.hxx> #include <sfx2/sidebar/Panel.hxx> -#include <sfx2/sidebar/PanelTitleBar.hxx> +#include <sidebar/PanelTitleBar.hxx> #include <sfx2/sidebar/Deck.hxx> #include <sfx2/sidebar/SidebarController.hxx> #include <comphelper/lok.hxx> diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx index 8ba8c95bd627..4c2f833a4f0a 100644 --- a/sfx2/source/sidebar/DeckTitleBar.cxx +++ b/sfx2/source/sidebar/DeckTitleBar.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/sidebar/DeckTitleBar.hxx> +#include <sidebar/DeckTitleBar.hxx> #include <sfx2/sidebar/Theme.hxx> #include <sfx2/sfxresid.hxx> #include <sfx2/strings.hrc> diff --git a/sfx2/source/sidebar/DrawHelper.cxx b/sfx2/source/sidebar/DrawHelper.cxx index 9b5c16bc6c3f..4c9f193ba21f 100644 --- a/sfx2/source/sidebar/DrawHelper.cxx +++ b/sfx2/source/sidebar/DrawHelper.cxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/sidebar/DrawHelper.hxx> -#include <sfx2/sidebar/Paint.hxx> +#include <sidebar/DrawHelper.hxx> +#include <sidebar/Paint.hxx> #include <tools/svborder.hxx> diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx index d39c26d70820..4a5140c1ae17 100644 --- a/sfx2/source/sidebar/FocusManager.cxx +++ b/sfx2/source/sidebar/FocusManager.cxx @@ -19,9 +19,9 @@ #include <sfx2/sidebar/FocusManager.hxx> #include <sfx2/sidebar/Panel.hxx> -#include <sfx2/sidebar/DeckTitleBar.hxx> -#include <sfx2/sidebar/PanelTitleBar.hxx> -#include <sfx2/sidebar/TitleBar.hxx> +#include <sidebar/DeckTitleBar.hxx> +#include <sidebar/PanelTitleBar.hxx> +#include <sidebar/TitleBar.hxx> #include <vcl/button.hxx> #include <vcl/event.hxx> #include <vcl/toolbox.hxx> diff --git a/sfx2/source/sidebar/MenuButton.cxx b/sfx2/source/sidebar/MenuButton.cxx index 76ab0dc162e0..36be7fcfc2e3 100644 --- a/sfx2/source/sidebar/MenuButton.cxx +++ b/sfx2/source/sidebar/MenuButton.cxx @@ -17,9 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/sidebar/MenuButton.hxx> +#include <sidebar/MenuButton.hxx> -#include <sfx2/sidebar/DrawHelper.hxx> +#include <sidebar/DrawHelper.hxx> #include <sfx2/sidebar/Theme.hxx> #include <vcl/event.hxx> diff --git a/sfx2/source/sidebar/Paint.cxx b/sfx2/source/sidebar/Paint.cxx index 9c6e7344c96b..a3f4012eab66 100644 --- a/sfx2/source/sidebar/Paint.cxx +++ b/sfx2/source/sidebar/Paint.cxx @@ -16,7 +16,7 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/sidebar/Paint.hxx> +#include <sidebar/Paint.hxx> #include <sfx2/sidebar/Tools.hxx> #include <com/sun/star/awt/Gradient.hpp> diff --git a/sfx2/source/sidebar/Panel.cxx b/sfx2/source/sidebar/Panel.cxx index c1d98be5f36f..85b6ebf14d3e 100644 --- a/sfx2/source/sidebar/Panel.cxx +++ b/sfx2/source/sidebar/Panel.cxx @@ -18,10 +18,10 @@ */ #include <sfx2/sidebar/Panel.hxx> -#include <sfx2/sidebar/PanelTitleBar.hxx> -#include <sfx2/sidebar/PanelDescriptor.hxx> +#include <sidebar/PanelTitleBar.hxx> +#include <sidebar/PanelDescriptor.hxx> #include <sfx2/sidebar/Theme.hxx> -#include <sfx2/sidebar/Paint.hxx> +#include <sidebar/Paint.hxx> #include <sfx2/sidebar/ResourceManager.hxx> #include <sfx2/sidebar/SidebarController.hxx> diff --git a/sfx2/source/sidebar/PanelDescriptor.cxx b/sfx2/source/sidebar/PanelDescriptor.cxx index 853d2c445ff5..bdbec773fcdc 100644 --- a/sfx2/source/sidebar/PanelDescriptor.cxx +++ b/sfx2/source/sidebar/PanelDescriptor.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/sidebar/PanelDescriptor.hxx> +#include <sidebar/PanelDescriptor.hxx> namespace sfx2::sidebar { diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx b/sfx2/source/sidebar/PanelTitleBar.cxx index deb501e43d07..78bd8bbe4123 100644 --- a/sfx2/source/sidebar/PanelTitleBar.cxx +++ b/sfx2/source/sidebar/PanelTitleBar.cxx @@ -17,13 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/sidebar/PanelTitleBar.hxx> +#include <sidebar/PanelTitleBar.hxx> #include <sfx2/sfxresid.hxx> #include <sfx2/strings.hrc> -#include <sfx2/sidebar/Paint.hxx> +#include <sidebar/Paint.hxx> #include <sfx2/sidebar/Panel.hxx> #include <sfx2/sidebar/Theme.hxx> -#include <sfx2/sidebar/ControllerFactory.hxx> +#include <sidebar/ControllerFactory.hxx> #include <sfx2/sidebar/Tools.hxx> #include <vcl/event.hxx> #include <vcl/image.hxx> diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx index 455ddcf14fb4..50da0dc46d54 100644 --- a/sfx2/source/sidebar/ResourceManager.cxx +++ b/sfx2/source/sidebar/ResourceManager.cxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/sidebar/DeckDescriptor.hxx> -#include <sfx2/sidebar/PanelDescriptor.hxx> +#include <sidebar/DeckDescriptor.hxx> +#include <sidebar/PanelDescriptor.hxx> #include <sfx2/sidebar/ResourceManager.hxx> #include <sfx2/sidebar/Tools.hxx> diff --git a/sfx2/source/sidebar/Sidebar.cxx b/sfx2/source/sidebar/Sidebar.cxx index eea91f9b9dad..6f205389e166 100644 --- a/sfx2/source/sidebar/Sidebar.cxx +++ b/sfx2/source/sidebar/Sidebar.cxx @@ -20,7 +20,7 @@ #include <sfx2/sidebar/Sidebar.hxx> #include <sfx2/sidebar/SidebarController.hxx> #include <sfx2/sidebar/ResourceManager.hxx> -#include <sfx2/sidebar/PanelDescriptor.hxx> +#include <sidebar/PanelDescriptor.hxx> using namespace css; diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 462b17051b06..c56c6ed9e2c2 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -18,11 +18,11 @@ */ #include <sfx2/sidebar/SidebarController.hxx> #include <sfx2/sidebar/Deck.hxx> -#include <sfx2/sidebar/DeckDescriptor.hxx> -#include <sfx2/sidebar/DeckTitleBar.hxx> +#include <sidebar/DeckDescriptor.hxx> +#include <sidebar/DeckTitleBar.hxx> #include <sfx2/sidebar/Panel.hxx> -#include <sfx2/sidebar/PanelDescriptor.hxx> -#include <sfx2/sidebar/PanelTitleBar.hxx> +#include <sidebar/PanelDescriptor.hxx> +#include <sidebar/PanelTitleBar.hxx> #include <sfx2/sidebar/TabBar.hxx> #include <sfx2/sidebar/Theme.hxx> #include <sfx2/sidebar/SidebarChildWindow.hxx> diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx index fe4548655c81..b74b96d79932 100644 --- a/sfx2/source/sidebar/SidebarDockingWindow.cxx +++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx @@ -19,7 +19,7 @@ #include <sfx2/sidebar/SidebarDockingWindow.hxx> #include <sfx2/sidebar/SidebarChildWindow.hxx> #include <sfx2/sidebar/SidebarController.hxx> -#include <sfx2/sidebar/PanelDescriptor.hxx> +#include <sidebar/PanelDescriptor.hxx> #include <comphelper/processfactory.hxx> #include <sfx2/lokhelper.hxx> diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx index 70be2424f276..ca3d076fb414 100644 --- a/sfx2/source/sidebar/SidebarToolBox.cxx +++ b/sfx2/source/sidebar/SidebarToolBox.cxx @@ -18,7 +18,7 @@ */ #include <sfx2/sidebar/SidebarToolBox.hxx> -#include <sfx2/sidebar/ControllerFactory.hxx> +#include <sidebar/ControllerFactory.hxx> #include <sfx2/viewfrm.hxx> #include <vcl/commandinfoprovider.hxx> diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 61b2f6559b46..62fa64aa86d5 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -19,8 +19,8 @@ #include <sfx2/sidebar/TabBar.hxx> #include <sfx2/sidebar/ControlFactory.hxx> -#include <sfx2/sidebar/DeckDescriptor.hxx> -#include <sfx2/sidebar/Paint.hxx> +#include <sidebar/DeckDescriptor.hxx> +#include <sidebar/Paint.hxx> #include <sfx2/sidebar/Theme.hxx> #include <sfx2/sidebar/Tools.hxx> #include <sfx2/sidebar/FocusManager.hxx> diff --git a/sfx2/source/sidebar/TabItem.cxx b/sfx2/source/sidebar/TabItem.cxx index 013ff688d19c..e37f028d8b47 100644 --- a/sfx2/source/sidebar/TabItem.cxx +++ b/sfx2/source/sidebar/TabItem.cxx @@ -17,10 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/sidebar/TabItem.hxx> +#include <sidebar/TabItem.hxx> -#include <sfx2/sidebar/DrawHelper.hxx> -#include <sfx2/sidebar/Paint.hxx> +#include <sidebar/DrawHelper.hxx> +#include <sidebar/Paint.hxx> #include <sfx2/sidebar/Theme.hxx> #include <vcl/event.hxx> diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx index 51d55f067fc1..62c440807f63 100644 --- a/sfx2/source/sidebar/Theme.cxx +++ b/sfx2/source/sidebar/Theme.cxx @@ -18,7 +18,7 @@ */ #include <sfx2/sidebar/Theme.hxx> -#include <sfx2/sidebar/Paint.hxx> +#include <sidebar/Paint.hxx> #include <sfx2/sidebar/Tools.hxx> #include <sfx2/app.hxx> diff --git a/sfx2/source/sidebar/TitleBar.cxx b/sfx2/source/sidebar/TitleBar.cxx index b793d3a879fd..40627a6c2353 100644 --- a/sfx2/source/sidebar/TitleBar.cxx +++ b/sfx2/source/sidebar/TitleBar.cxx @@ -17,9 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <sfx2/sidebar/TitleBar.hxx> -#include <sfx2/sidebar/Paint.hxx> -#include <sfx2/sidebar/AccessibleTitleBar.hxx> +#include <sidebar/TitleBar.hxx> +#include <sidebar/Paint.hxx> +#include <sidebar/AccessibleTitleBar.hxx> #include <com/sun/star/accessibility/AccessibleRole.hpp> diff --git a/sfx2/source/sidebar/UnoDeck.cxx b/sfx2/source/sidebar/UnoDeck.cxx index 9a77c064b3e3..122afbe018a2 100644 --- a/sfx2/source/sidebar/UnoDeck.cxx +++ b/sfx2/source/sidebar/UnoDeck.cxx @@ -8,15 +8,15 @@ * */ -#include <sfx2/sidebar/UnoDeck.hxx> +#include <sidebar/UnoDeck.hxx> -#include <sfx2/sidebar/UnoPanels.hxx> +#include <sidebar/UnoPanels.hxx> #include <sfx2/sidebar/ResourceManager.hxx> #include <sfx2/sidebar/SidebarController.hxx> -#include <sfx2/sidebar/DeckTitleBar.hxx> +#include <sidebar/DeckTitleBar.hxx> #include <sfx2/sidebar/Deck.hxx> -#include <sfx2/sidebar/DeckDescriptor.hxx> +#include <sidebar/DeckDescriptor.hxx> #include <vcl/svapp.hxx> diff --git a/sfx2/source/sidebar/UnoDecks.cxx b/sfx2/source/sidebar/UnoDecks.cxx index 915a0656ae69..9b3ad8999784 100644 --- a/sfx2/source/sidebar/UnoDecks.cxx +++ b/sfx2/source/sidebar/UnoDecks.cxx @@ -11,8 +11,8 @@ #include <sal/config.h> #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> -#include <sfx2/sidebar/UnoDecks.hxx> -#include <sfx2/sidebar/UnoDeck.hxx> +#include <sidebar/UnoDecks.hxx> +#include <sidebar/UnoDeck.hxx> #include <sfx2/sidebar/ResourceManager.hxx> #include <sfx2/sidebar/SidebarController.hxx> diff --git a/sfx2/source/sidebar/UnoPanel.cxx b/sfx2/source/sidebar/UnoPanel.cxx index 83fb45dd7842..eee70429aa30 100644 --- a/sfx2/source/sidebar/UnoPanel.cxx +++ b/sfx2/source/sidebar/UnoPanel.cxx @@ -8,16 +8,16 @@ * */ -#include <sfx2/sidebar/UnoPanel.hxx> +#include <sidebar/UnoPanel.hxx> #include <sfx2/sidebar/ResourceManager.hxx> #include <sfx2/sidebar/SidebarController.hxx> -#include <sfx2/sidebar/PanelDescriptor.hxx> -#include <sfx2/sidebar/PanelTitleBar.hxx> +#include <sidebar/PanelDescriptor.hxx> +#include <sidebar/PanelTitleBar.hxx> #include <sfx2/sidebar/Panel.hxx> #include <sfx2/sidebar/Deck.hxx> -#include <sfx2/sidebar/DeckDescriptor.hxx> +#include <sidebar/DeckDescriptor.hxx> #include <vcl/svapp.hxx> diff --git a/sfx2/source/sidebar/UnoPanels.cxx b/sfx2/source/sidebar/UnoPanels.cxx index 07d3c2455e4b..1bc0ded10ecd 100644 --- a/sfx2/source/sidebar/UnoPanels.cxx +++ b/sfx2/source/sidebar/UnoPanels.cxx @@ -8,14 +8,14 @@ * */ -#include <sfx2/sidebar/UnoPanels.hxx> +#include <sidebar/UnoPanels.hxx> #include <sfx2/sidebar/ResourceManager.hxx> #include <sfx2/sidebar/SidebarController.hxx> #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> #include <com/sun/star/ui/XPanel.hpp> -#include <sfx2/sidebar/UnoPanel.hxx> +#include <sidebar/UnoPanel.hxx> #include <vcl/svapp.hxx> diff --git a/sfx2/source/sidebar/UnoSidebar.cxx b/sfx2/source/sidebar/UnoSidebar.cxx index 812fe9c877ea..dcd8d6ee8f3e 100644 --- a/sfx2/source/sidebar/UnoSidebar.cxx +++ b/sfx2/source/sidebar/UnoSidebar.cxx @@ -12,7 +12,7 @@ #include <sfx2/sidebar/Tools.hxx> #include <sfx2/sidebar/SidebarController.hxx> -#include <sfx2/sidebar/UnoDecks.hxx> +#include <sidebar/UnoDecks.hxx> #include <com/sun/star/frame/XDispatch.hpp> diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx index 45590eeb72bc..70e8248b579d 100644 --- a/sfx2/source/statbar/stbitem.cxx +++ b/sfx2/source/statbar/stbitem.cxx @@ -38,7 +38,7 @@ #include <sfx2/msgpool.hxx> #include <sfx2/module.hxx> #include <sfx2/dispatch.hxx> -#include <sfx2/unoctitm.hxx> +#include <unoctitm.hxx> #include <sfx2/objsh.hxx> #include <comphelper/processfactory.hxx> diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index d362cc9d37c9..723e28000089 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -56,7 +56,7 @@ #include <sfx2/viewfrm.hxx> #include <sfx2/module.hxx> #include <sfx2/app.hxx> -#include <sfx2/unoctitm.hxx> +#include <unoctitm.hxx> #include <ctrlfactoryimpl.hxx> using namespace ::com::sun::star; diff --git a/sfx2/source/toolbox/weldutils.cxx b/sfx2/source/toolbox/weldutils.cxx index 281b7594660a..3b16543242aa 100644 --- a/sfx2/source/toolbox/weldutils.cxx +++ b/sfx2/source/toolbox/weldutils.cxx @@ -8,7 +8,7 @@ */ #include <com/sun/star/frame/XSubToolbarController.hpp> -#include <sfx2/sidebar/ControllerFactory.hxx> +#include <sidebar/ControllerFactory.hxx> #include <sfx2/weldutils.hxx> #include <vcl/commandinfoprovider.hxx> #include <vcl/settings.hxx> diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index 28c41a714b0c..3d25070a0b08 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -50,7 +50,7 @@ #include <sfx2/dispatch.hxx> #include <sfx2/userinputinterception.hxx> -#include <sfx2/unoctitm.hxx> +#include <unoctitm.hxx> #include <sfx2/childwin.hxx> #include <sfx2/sfxsids.hrc> #include <sfx2/sfxresid.hxx> |