diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-04 12:21:58 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-04 20:57:07 +0100 |
commit | 56d5b221f91f792fa6ff215a54a343c3672d6e24 (patch) | |
tree | db55c9c892c17531a421ac089dc3b696141a350e /sd | |
parent | 4f6e80e67d219c7b79a28bcf164931d1ff27b592 (diff) |
remove intermediate CustomAnimationPanel
Change-Id: I34e1e3f87565cb9d8bf33f8e8f22844081785e21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111969
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/IwyuFilter_sd.yaml | 9 | ||||
-rw-r--r-- | sd/Library_sd.mk | 1 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationDialog.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationList.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.cxx | 24 | ||||
-rw-r--r-- | sd/source/ui/animations/motionpathtag.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/animations/motionpathtag.hxx | 2 | ||||
-rw-r--r-- | sd/source/ui/inc/CustomAnimationList.hxx (renamed from sd/source/ui/animations/CustomAnimationList.hxx) | 0 | ||||
-rw-r--r-- | sd/source/ui/inc/CustomAnimationPane.hxx (renamed from sd/source/ui/animations/CustomAnimationPane.hxx) | 12 | ||||
-rw-r--r-- | sd/source/ui/inc/createcustomanimationpanel.hxx | 38 | ||||
-rw-r--r-- | sd/source/ui/sidebar/CustomAnimationPanel.cxx | 63 | ||||
-rw-r--r-- | sd/source/ui/sidebar/CustomAnimationPanel.hxx | 54 | ||||
-rw-r--r-- | sd/source/ui/sidebar/PanelFactory.cxx | 4 |
13 files changed, 26 insertions, 187 deletions
diff --git a/sd/IwyuFilter_sd.yaml b/sd/IwyuFilter_sd.yaml index b4632fdb7c91..288f567758fe 100644 --- a/sd/IwyuFilter_sd.yaml +++ b/sd/IwyuFilter_sd.yaml @@ -87,12 +87,6 @@ excludelist: sd/source/filter/eppt/eppt.hxx: # base class has to be a complete type - escherex.hxx - sd/source/ui/animations/CustomAnimationPane.hxx: - # Needed for typedef - - motionpathtag.hxx - sd/source/ui/animations/CustomAnimationPane.cxx: - # Avoid loplugin:unreffun error - - createcustomanimationpanel.hxx sd/source/ui/annotations/annotationmanagerimpl.hxx: # base class has to be a complete type - annotationtag.hxx @@ -180,6 +174,9 @@ excludelist: - com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp - com/sun/star/accessibility/XAccessibleSelection.hpp - com/sun/star/lang/XServiceInfo.hpp + sd/source/ui/inc/CustomAnimationPane.hxx: + # Needed for typedef + - motionpathtag.hxx sd/source/ui/inc/DrawDocShell.hxx: # base class has to be a complete type - fupoor.hxx diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index 9ba5375ad7fa..b4a029c81920 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -325,7 +325,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\ sd/source/ui/presenter/SlideRenderer \ sd/source/ui/sidebar/AllMasterPagesSelector \ sd/source/ui/sidebar/CurrentMasterPagesSelector \ - sd/source/ui/sidebar/CustomAnimationPanel \ sd/source/ui/sidebar/DocumentHelper \ sd/source/ui/sidebar/LayoutMenu \ sd/source/ui/sidebar/MasterPageContainer \ diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index fb8a5bc68efd..16df53997094 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -57,7 +57,7 @@ #include <sdresid.hxx> #include "CustomAnimationDialog.hxx" -#include "CustomAnimationPane.hxx" +#include <CustomAnimationPane.hxx> #include "STLPropertySet.hxx" #include <CustomAnimationPreset.hxx> diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index 2b24919a57a0..d4fcbb1c852b 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -27,7 +27,7 @@ #include <com/sun/star/text/XTextRange.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/drawing/XDrawPage.hpp> -#include "CustomAnimationList.hxx" +#include <CustomAnimationList.hxx> #include <CustomAnimationPreset.hxx> #include <vcl/commandevent.hxx> #include <vcl/event.hxx> diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 624d70ad901d..825a88b9bab8 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -40,12 +40,11 @@ #include <sfx2/viewfrm.hxx> #include <tools/debug.hxx> #include "STLPropertySet.hxx" -#include "CustomAnimationPane.hxx" +#include <CustomAnimationPane.hxx> #include "CustomAnimationDialog.hxx" -#include "CustomAnimationList.hxx" +#include <CustomAnimationList.hxx> #include "motionpathtag.hxx" #include <CustomAnimationPreset.hxx> -#include <createcustomanimationpanel.hxx> #include <comphelper/lok.hxx> #include <comphelper/sequence.hxx> @@ -158,6 +157,12 @@ CustomAnimationPane::CustomAnimationPane( Window* pParent, ViewShellBase& rBase, m_pInitialFocusWidget = &mxCustomAnimationList->get_widget(); } +css::ui::LayoutSize CustomAnimationPane::GetHeightForWidth(const sal_Int32 /*nWidth*/) +{ + sal_Int32 nMinimumHeight = get_preferred_size().Height(); + return css::ui::LayoutSize(nMinimumHeight, -1, nMinimumHeight); +} + void CustomAnimationPane::initialize() { mxLBAnimation->connect_changed(LINK(this, CustomAnimationPane, AnimationSelectHdl)); @@ -2542,19 +2547,6 @@ void CustomAnimationPane::updatePathFromMotionPathTag( const rtl::Reference< Mot } } -vcl::Window * createCustomAnimationPanel( vcl::Window* pParent, ViewShellBase& rBase, const css::uno::Reference<css::frame::XFrame>& rxFrame ) -{ - vcl::Window* pWindow = nullptr; - - DrawDocShell* pDocSh = rBase.GetDocShell(); - if( pDocSh ) - { - pWindow = VclPtr<CustomAnimationPane>::Create( pParent, rBase, rxFrame ); - } - - return pWindow; -} - } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx index b20e57740f4f..6597faf2c7b9 100644 --- a/sd/source/ui/animations/motionpathtag.cxx +++ b/sd/source/ui/animations/motionpathtag.cxx @@ -45,7 +45,7 @@ #include <svx/polypolygoneditor.hxx> #include <svx/svddrgmt.hxx> -#include "CustomAnimationPane.hxx" +#include <CustomAnimationPane.hxx> #include <View.hxx> #include "motionpathtag.hxx" #include <ViewShell.hxx> diff --git a/sd/source/ui/animations/motionpathtag.hxx b/sd/source/ui/animations/motionpathtag.hxx index 82d596c90c23..9c2a493fa728 100644 --- a/sd/source/ui/animations/motionpathtag.hxx +++ b/sd/source/ui/animations/motionpathtag.hxx @@ -23,7 +23,7 @@ #include <com/sun/star/util/XChangesListener.hpp> #include <basegfx/polygon/b2dpolypolygon.hxx> #include <smarttag.hxx> -#include "CustomAnimationList.hxx" +#include <CustomAnimationList.hxx> namespace com::sun::star::drawing { class XShape; } class SdrPathObj; diff --git a/sd/source/ui/animations/CustomAnimationList.hxx b/sd/source/ui/inc/CustomAnimationList.hxx index 56cfafcf5176..56cfafcf5176 100644 --- a/sd/source/ui/animations/CustomAnimationList.hxx +++ b/sd/source/ui/inc/CustomAnimationList.hxx diff --git a/sd/source/ui/animations/CustomAnimationPane.hxx b/sd/source/ui/inc/CustomAnimationPane.hxx index 94b543dcd298..5d156884a919 100644 --- a/sd/source/ui/animations/CustomAnimationPane.hxx +++ b/sd/source/ui/inc/CustomAnimationPane.hxx @@ -20,10 +20,9 @@ #ifndef INCLUDED_SD_SOURCE_UI_ANIMATIONS_CUSTOMANIMATIONPANE_HXX #define INCLUDED_SD_SOURCE_UI_ANIMATIONS_CUSTOMANIMATIONPANE_HXX +#include <sfx2/sidebar/ILayoutableWindow.hxx> #include <sfx2/sidebar/PanelLayout.hxx> -#include "CustomAnimationDialog.hxx" #include "CustomAnimationList.hxx" -#include "motionpathtag.hxx" #include <misc/scopelock.hxx> #include <vector> @@ -38,12 +37,16 @@ enum class PathKind { NONE, CURVE, POLYGON, FREEFORM }; namespace sd { +class MotionPathTag; +class SdPropertySubControl; class STLPropertySet; class ViewShellBase; typedef std::vector< rtl::Reference< MotionPathTag > > MotionPathTagVector; -class CustomAnimationPane : public PanelLayout, public ICustomAnimationListController +class CustomAnimationPane : public PanelLayout + , public sfx2::sidebar::ILayoutableWindow + , public ICustomAnimationListController { friend class MotionPathTag; public: @@ -51,6 +54,9 @@ public: virtual ~CustomAnimationPane() override; virtual void dispose() override; + // ILayoutableWindow + virtual css::ui::LayoutSize GetHeightForWidth (const sal_Int32 nWidth) override; + // callbacks void onSelectionChanged(); void onChangeCurrentPage(); diff --git a/sd/source/ui/inc/createcustomanimationpanel.hxx b/sd/source/ui/inc/createcustomanimationpanel.hxx deleted file mode 100644 index 7005d71abd44..000000000000 --- a/sd/source/ui/inc/createcustomanimationpanel.hxx +++ /dev/null @@ -1,38 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef INCLUDED_SD_SOURCE_UI_INC_CREATECUSTOMANIMATIONPANEL_HXX -#define INCLUDED_SD_SOURCE_UI_INC_CREATECUSTOMANIMATIONPANEL_HXX - -#include <sal/config.h> -#include <vcl/window.hxx> - -#include <com/sun/star/frame/XFrame.hpp> - -#include "ViewShell.hxx" - -namespace sd { - -vcl::Window * createCustomAnimationPanel (vcl::Window* pParent, ViewShellBase& rBase, const css::uno::Reference<css::frame::XFrame>& rxFrame); - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/sidebar/CustomAnimationPanel.cxx b/sd/source/ui/sidebar/CustomAnimationPanel.cxx deleted file mode 100644 index bd253f2a52f9..000000000000 --- a/sd/source/ui/sidebar/CustomAnimationPanel.cxx +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "CustomAnimationPanel.hxx" -#include <createcustomanimationpanel.hxx> - -#include <ViewShellBase.hxx> - -namespace sd::sidebar { - -CustomAnimationPanel::CustomAnimationPanel ( - vcl::Window* pParentWindow, - ViewShellBase& rViewShellBase, - const css::uno::Reference<css::frame::XFrame>& rxFrame - ) - : PanelBase( - pParentWindow, - rViewShellBase), - mxFrame( rxFrame ) -{ - SetStyle( GetStyle() | WB_DIALOGCONTROL ); -#ifdef DEBUG - SetText(OUString("sd:CustomAnimationPanel")); -#endif -} - -CustomAnimationPanel::~CustomAnimationPanel() -{ -} - -vcl::Window* CustomAnimationPanel::CreateWrappedControl ( - vcl::Window* pParentWindow, - ViewShellBase& rViewShellBase) -{ - return createCustomAnimationPanel(pParentWindow, rViewShellBase, mxFrame); -} - -css::ui::LayoutSize CustomAnimationPanel::GetHeightForWidth (const sal_Int32 /*nWidth*/) -{ - Window *pControl = mpWrappedControl.get(); - sal_Int32 nMinimumHeight = pControl ? pControl->get_preferred_size().Height() : 0; - return css::ui::LayoutSize(nMinimumHeight,-1, nMinimumHeight); -} - -} // end of namespace sd::sidebar - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/sidebar/CustomAnimationPanel.hxx b/sd/source/ui/sidebar/CustomAnimationPanel.hxx deleted file mode 100644 index 0e03fb399600..000000000000 --- a/sd/source/ui/sidebar/CustomAnimationPanel.hxx +++ /dev/null @@ -1,54 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef INCLUDED_SD_SOURCE_UI_SIDEBAR_CUSTOMANIMATIONPANEL_HXX -#define INCLUDED_SD_SOURCE_UI_SIDEBAR_CUSTOMANIMATIONPANEL_HXX - -#include "PanelBase.hxx" - -namespace com::sun::star::frame { class XFrame; } - -namespace sd::sidebar { - -class CustomAnimationPanel - : public PanelBase -{ -public: - CustomAnimationPanel ( - vcl::Window* pParentWindow, - ViewShellBase& rViewShellBase, - const css::uno::Reference<css::frame::XFrame>& rxFrame); - virtual ~CustomAnimationPanel() override; - - // ILayoutableWindow - virtual css::ui::LayoutSize GetHeightForWidth (const sal_Int32 nWidth) override; - -protected: - virtual vcl::Window* CreateWrappedControl ( - vcl::Window* pParentWindow, - ViewShellBase& rViewShellBase) override; - -private: - css::uno::Reference<css::frame::XFrame> mxFrame; -}; - -} // end of namespace sd::sidebar - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/sidebar/PanelFactory.cxx b/sd/source/ui/sidebar/PanelFactory.cxx index d24eca6ff0a9..baa2938320ad 100644 --- a/sd/source/ui/sidebar/PanelFactory.cxx +++ b/sd/source/ui/sidebar/PanelFactory.cxx @@ -25,7 +25,7 @@ #include "CurrentMasterPagesSelector.hxx" #include "RecentMasterPagesSelector.hxx" #include "AllMasterPagesSelector.hxx" -#include "CustomAnimationPanel.hxx" +#include <CustomAnimationPane.hxx> #include "NavigatorWrapper.hxx" #include <SlideTransitionPane.hxx> #include "TableDesignPanel.hxx" @@ -101,7 +101,7 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement ( for the TaskPanelFactory. */ if (rsUIElementResourceURL.endsWith("/CustomAnimations")) - pControl = VclPtr<CustomAnimationPanel>::Create(pParentWindow, *pBase, xFrame); + pControl = VclPtr<CustomAnimationPane>::Create(pParentWindow, *pBase, xFrame); else if (rsUIElementResourceURL.endsWith("/Layouts")) pControl = VclPtr<LayoutMenu>::Create(pParentWindow, *pBase, xSidebar); else if (rsUIElementResourceURL.endsWith("/AllMasterPages")) |