summaryrefslogtreecommitdiff
path: root/sd/source/ui/animations
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-03-04 17:22:14 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-03-11 17:42:22 +0100
commit1653bb9bffaa84a40b7d81a8277e887ea28df4e4 (patch)
tree5e56142b7b63ab66fb1dcc781ffeb3ae5afda2ad /sd/source/ui/animations
parent40c58f6039fb02cff74e442f6adc5ba38adcff1d (diff)
remove intermediate containers in sidebars
tested extension sidebars of: a) Wollmux extension sidebars b) Analog Clock Extension demo https://wiki.openoffice.org/wiki/Sidebar_for_Developers#Example:_Analog_Clock_Extension Change-Id: If9729e20526681928137989f01a8ae733a9b0cb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112035 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source/ui/animations')
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx28
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx28
2 files changed, 8 insertions, 48 deletions
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 1764b4541c2d..4d1481872ae4 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -54,6 +54,7 @@
#include <svx/unoapi.hxx>
#include <svx/svxids.hrc>
+#include <svx/colorwindow.hxx>
#include <DrawDocShell.hxx>
#include <ViewShellBase.hxx>
#include <DrawViewShell.hxx>
@@ -117,9 +118,8 @@ void fillRepeatComboBox(weld::ComboBox& rBox)
rBox.append_text(aEndOfSlide);
}
-CustomAnimationPane::CustomAnimationPane( Window* pParent, ViewShellBase& rBase,
- const css::uno::Reference<css::frame::XFrame>& rxFrame )
- : PanelLayout(pParent, "CustomAnimationsPanel", "modules/simpress/ui/customanimationspanel.ui", rxFrame)
+CustomAnimationPane::CustomAnimationPane( weld::Widget* pParent, ViewShellBase& rBase )
+ : PanelLayout(pParent, "CustomAnimationsPanel", "modules/simpress/ui/customanimationspanel.ui")
, mrBase(rBase)
// load resources
, mxFTAnimation(m_xBuilder->weld_label("effectlabel"))
@@ -154,7 +154,6 @@ CustomAnimationPane::CustomAnimationPane( Window* pParent, ViewShellBase& rBase,
, maLateInitTimer()
{
initialize();
- m_pInitialFocusWidget = &mxCustomAnimationList->get_widget();
}
css::ui::LayoutSize CustomAnimationPane::GetHeightForWidth(const sal_Int32 /*nWidth*/)
@@ -212,16 +211,10 @@ void CustomAnimationPane::initialize()
maLateInitTimer.SetTimeout(100);
maLateInitTimer.SetInvokeHandler(LINK(this, CustomAnimationPane, lateInitCallback));
maLateInitTimer.Start();
- UpdateLook();
}
CustomAnimationPane::~CustomAnimationPane()
{
- disposeOnce();
-}
-
-void CustomAnimationPane::dispose()
-{
maLateInitTimer.Stop();
removeListener();
@@ -253,8 +246,6 @@ void CustomAnimationPane::dispose()
mxLBCategory.reset();
mxFTAnimation.reset();
mxLBAnimation.reset();
-
- PanelLayout::dispose();
}
void CustomAnimationPane::addUndo()
@@ -866,19 +857,6 @@ void CustomAnimationPane::onContextMenu(const OString &rIdent)
updateControls();
}
-void CustomAnimationPane::DataChanged (const DataChangedEvent&)
-{
- UpdateLook();
-}
-
-void CustomAnimationPane::UpdateLook()
-{
- Color aBackground (
- ::sfx2::sidebar::Theme::GetColor(
- ::sfx2::sidebar::Theme::Color_PanelBackground));
- SetBackground(aBackground);
-}
-
static void addValue( const std::unique_ptr<STLPropertySet>& pSet, sal_Int32 nHandle, const Any& rValue )
{
switch( pSet->getPropertyState( nHandle ) )
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index ea56c90f9902..5a509fb448a9 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -36,6 +36,7 @@
#include <sal/log.hxx>
#include <tools/debug.hxx>
#include <svx/gallery.hxx>
+#include <svx/colorwindow.hxx>
#include <vcl/stdtext.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
@@ -390,10 +391,9 @@ public:
// SlideTransitionPane
SlideTransitionPane::SlideTransitionPane(
- Window * pParent,
- ViewShellBase & rBase,
- const css::uno::Reference<css::frame::XFrame>& rxFrame ) :
- PanelLayout( pParent, "SlideTransitionsPanel", "modules/simpress/ui/slidetransitionspanel.ui", rxFrame ),
+ weld::Widget* pParent,
+ ViewShellBase & rBase) :
+ PanelLayout( pParent, "SlideTransitionsPanel", "modules/simpress/ui/slidetransitionspanel.ui" ),
mrBase( rBase ),
mpDrawDoc( rBase.GetDocShell() ? rBase.GetDocShell()->GetDoc() : nullptr ),
@@ -477,17 +477,10 @@ void SlideTransitionPane::Initialize(SdDrawDocument* pDoc)
maLateInitTimer.SetTimeout(200);
maLateInitTimer.SetInvokeHandler(LINK(this, SlideTransitionPane, LateInitCallback));
maLateInitTimer.Start();
-
- UpdateLook();
}
SlideTransitionPane::~SlideTransitionPane()
{
- disposeOnce();
-}
-
-void SlideTransitionPane::dispose()
-{
maLateInitTimer.Stop();
removeListener();
mxVS_TRANSITION_ICONSWin.reset();
@@ -505,17 +498,6 @@ void SlideTransitionPane::dispose()
mxPB_APPLY_TO_ALL.reset();
mxPB_PLAY.reset();
mxCB_AUTO_PREVIEW.reset();
- PanelLayout::dispose();
-}
-
-void SlideTransitionPane::DataChanged (const DataChangedEvent&)
-{
- UpdateLook();
-}
-
-void SlideTransitionPane::UpdateLook()
-{
- SetBackground(::sfx2::sidebar::Theme::GetColor(::sfx2::sidebar::Theme::Color_PanelBackground));
}
void SlideTransitionPane::onSelectionChanged()
@@ -888,7 +870,7 @@ void SlideTransitionPane::applyToSelectedPages(bool bPreview = true)
if( mbUpdatingControls )
return;
- Window *pFocusWindow = Application::GetFocusWindow();
+ vcl::Window *pFocusWindow = Application::GetFocusWindow();
::sd::slidesorter::SharedPageSelection pSelectedPages( getSelectedPages());
impl::TransitionEffect aEffect = getTransitionEffectFromControls();