summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/UIConfig_simpress.mk1
-rw-r--r--sd/source/ui/animations/CustomAnimationCreateDialog.cxx4
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx14
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.hxx1
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx12
-rw-r--r--sd/source/ui/animations/CustomAnimationList.hxx6
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx140
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.hxx12
-rw-r--r--sd/source/ui/sidebar/CustomAnimationPanel.cxx14
-rw-r--r--sd/source/ui/sidebar/CustomAnimationPanel.hxx8
-rw-r--r--sd/source/ui/sidebar/PanelFactory.cxx2
-rw-r--r--sd/uiconfig/simpress/ui/customanimationspanel.ui418
12 files changed, 548 insertions, 84 deletions
diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk
index 16d0cae14bd0..eb3953c49c3a 100644
--- a/sd/UIConfig_simpress.mk
+++ b/sd/UIConfig_simpress.mk
@@ -79,6 +79,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\
sd/uiconfig/simpress/ui/customslideshows \
sd/uiconfig/simpress/ui/optimpressgeneralpage \
sd/uiconfig/simpress/ui/prntopts \
+ sd/uiconfig/simpress/ui/customanimationspanel \
))
# vim: set noet sw=4 ts=4:
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index b24b8ef056a4..22dff093f25b 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -64,7 +64,7 @@ const int EXIT = 2;
const int MOTIONPATH = 3;
const int MISCEFFECTS = 4;
-extern void fillDurationComboBox( ComboBox* pBox );
+//extern void fillDurationComboBox( ComboBox* pBox );
// --------------------------------------------------------------------
@@ -286,7 +286,7 @@ CustomAnimationCreateTabPage::CustomAnimationCreateTabPage( Window* pParent, Cus
mpLBEffects->SelectEntryPos( nFirstEffect );
- fillDurationComboBox( mpCBSpeed );
+ //fillDurationComboBox( mpCBSpeed );
if( nFirstEffect != LISTBOX_ENTRY_NOTFOUND )
onSelectEffect();
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 6f1ca05b0511..0ce986cbce80 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -1848,8 +1848,8 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(Window* pParent,
mpRBInteractive.reset( new RadioButton( this, SdResId( RB_INTERACTIVE ) ) );
mpLBTrigger.reset( new ListBox( this, SdResId( LB_TRIGGER ) ) );
- fillRepeatComboBox( mpCBRepeat.get() );
- fillDurationComboBox( mpCBDuration.get() );
+ //fillRepeatComboBox( mpCBRepeat.get() );
+ //fillDurationComboBox( mpCBDuration.get() );
FreeResource();
@@ -2483,6 +2483,16 @@ PropertyControl::PropertyControl( Window* pParent, const ResId& rResId )
{
}
+PropertyControl::PropertyControl( Window* pParent )
+: ListBox( pParent, WB_TABSTOP | WB_BORDER | WB_DROPDOWN ), mpSubControl(0)
+{
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makePropertyControl( Window *pParent )
+{
+ return new PropertyControl( pParent );
+}
+
PropertyControl::~PropertyControl()
{
if( mpSubControl )
diff --git a/sd/source/ui/animations/CustomAnimationDialog.hxx b/sd/source/ui/animations/CustomAnimationDialog.hxx
index 38fd8df408b4..2ac374c6cac5 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.hxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.hxx
@@ -129,6 +129,7 @@ class PropertyControl : public ListBox
{
public:
PropertyControl( Window* pParent, const ResId& rResId );
+ PropertyControl( Window* pParent );
~PropertyControl();
void setSubControl( PropertySubControl* pSubControl );
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index d0e6d76fd1ad..40d759a6b881 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -469,6 +469,18 @@ CustomAnimationList::CustomAnimationList( ::Window* pParent, const ResId& rResId
SetNodeDefaultImages();
}
+CustomAnimationList::CustomAnimationList( ::Window* pParent )
+: SvTreeListBox( pParent, WB_TABSTOP | WB_BORDER ),
+ mpController(0)
+{
+
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeCustomAnimationList( ::Window *pParent )
+{
+ return new CustomAnimationList( pParent );
+}
+
// --------------------------------------------------------------------
const Image& CustomAnimationList::getImage( sal_uInt16 nId )
diff --git a/sd/source/ui/animations/CustomAnimationList.hxx b/sd/source/ui/animations/CustomAnimationList.hxx
index d063d69af0ec..da4dae1c9182 100644
--- a/sd/source/ui/animations/CustomAnimationList.hxx
+++ b/sd/source/ui/animations/CustomAnimationList.hxx
@@ -47,6 +47,7 @@ class CustomAnimationList : public SvTreeListBox, public ISequenceListener
public:
CustomAnimationList( ::Window* pParent, const ResId& rResId, ICustomAnimationListController* pController );
+ CustomAnimationList( ::Window* pParent );
virtual ~CustomAnimationList();
// methods
@@ -87,6 +88,11 @@ public:
/// clears all entries from the listbox
void clear();
+ void setController( ICustomAnimationListController* pController )
+ {
+ mpController = pController;
+ };
+
private:
bool mbIgnorePaint;
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 6da8a8219c3e..bb110221c9e5 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -108,7 +108,7 @@ namespace sd {
// --------------------------------------------------------------------
-void fillDurationComboBox( ComboBox* pBox )
+void fillDurationComboBox( ListBox* pBox )
{
static const double gdVerySlow = 5.0;
static const double gdSlow = 3.0;
@@ -132,7 +132,7 @@ void fillDurationComboBox( ComboBox* pBox )
pBox->SetEntryData( pBox->InsertEntry( aVeryFast ), (void*)&gdVeryFast );
}
-void fillRepeatComboBox( ComboBox* pBox )
+void fillRepeatComboBox( ListBox* pBox )
{
String aNone( SdResId( STR_CUSTOMANIMATION_REPEAT_NONE ) );
pBox->SetEntryData( pBox->InsertEntry( aNone ), (void*)((sal_Int32)0) );
@@ -152,8 +152,11 @@ void fillRepeatComboBox( ComboBox* pBox )
// --------------------------------------------------------------------
-CustomAnimationPane::CustomAnimationPane( ::Window* pParent, ViewShellBase& rBase, const Size& rMinSize )
-: Control( pParent, SdResId(DLG_CUSTOMANIMATIONPANE) ),
+
+CustomAnimationPane::CustomAnimationPane( ::Window* pParent, ViewShellBase& rBase,
+ const cssu::Reference<css::frame::XFrame>& rxFrame,
+ const Size& rMinSize )
+: PanelLayout( pParent, "CustomAnimationsPanel", "modules/simpress/ui/customanimationspanel.ui", rxFrame ),
mrBase( rBase ),
mpCustomAnimationPresets(NULL),
mnPropertyType( nPropertyTypeNone ),
@@ -162,43 +165,38 @@ CustomAnimationPane::CustomAnimationPane( ::Window* pParent, ViewShellBase& rBas
maLateInitTimer()
{
// load resources
- mpFLEffect = new FixedLine( this, SdResId( FL_EFFECT ) );
-
- mpPBAddEffect = new PushButton( this, SdResId( PB_ADD_EFFECT ) );
- mpPBChangeEffect = new PushButton( this, SdResId( PB_CHANGE_EFFECT ) );
- mpPBRemoveEffect = new PushButton( this, SdResId( PB_REMOVE_EFFECT ) );
-
- mpFLModify = new FixedLine( this, SdResId( FL_MODIFY ) );
-
- mpFTStart = new FixedText( this, SdResId( FT_START ) );
- mpLBStart = new ListBox( this, SdResId( LB_START ) );
- mpFTProperty = new FixedText( this, SdResId( FT_PROPERTY ) );
- mpLBProperty = new PropertyControl( this, SdResId( LB_PROPERTY ) );
- mpPBPropertyMore = new PushButton( this, SdResId( PB_PROPERTY_MORE ) );
-
- mpFTSpeed = new FixedText( this, SdResId( FT_SPEED ) );
- mpCBSpeed = new ComboBox( this, SdResId( CB_SPEED ) );
-
- mpCustomAnimationList = new CustomAnimationList( this, SdResId( CT_CUSTOM_ANIMATION_LIST ), this );
-
- mpPBMoveUp = new PushButton( this, SdResId( PB_MOVE_UP ) );
- mpPBMoveDown = new PushButton( this, SdResId( PB_MOVE_DOWN ) );
- mpFTChangeOrder = new FixedText( this, SdResId( FT_CHANGE_ORDER ) );
- mpFLSeparator1 = new FixedLine( this, SdResId( FL_SEPARATOR1 ) );
- mpPBPlay = new PushButton( this, SdResId( PB_PLAY ) );
- mpPBSlideShow = new PushButton( this, SdResId( PB_SLIDE_SHOW ) );
- mpFLSeparator2 = new FixedLine( this, SdResId( FL_SEPARATOR2 ) );
- mpCBAutoPreview = new CheckBox( this, SdResId( CB_AUTOPREVIEW ) );
+ get(mpPBAddEffect, "add_effect");
+ get(mpPBChangeEffect, "change_effect");
+ get(mpPBRemoveEffect, "remove_effect");
+
+ get(mpFTStart, "start_effect");
+ get(mpLBStart, "start_effect_list");
+ get(mpFTProperty, "effect_property");
+ get(mpLBProperty, "effect_property_list");
+ get(mpPBPropertyMore, "more_properties");
+
+ get(mpFTSpeed, "effect_speed");
+ get(mpCBSpeed, "effect_speed_list");
+
+ get(mpCustomAnimationList, "custom_animation_list");
+ mpCustomAnimationList->setController( dynamic_cast<ICustomAnimationListController*> ( this ) );
+ mpCustomAnimationList->set_width_request(mpCustomAnimationList->approximate_char_width() * 16);
+ mpCustomAnimationList->set_height_request(mpCustomAnimationList->GetTextHeight() * 16);
+
+ get(mpPBMoveUp, "move_up");
+ get(mpPBMoveDown, "move_down");
+ get(mpFTChangeOrder, "change_order");
+ get(mpPBPlay, "play");
+ get(mpPBSlideShow, "slideshow");
+ get(mpCBAutoPreview,"auto_preview");
maStrProperty = mpFTProperty->GetText();
- FreeResource();
-
// use bold font for group headings (same font for all fixed lines):
- Font font( mpFLEffect->GetFont() );
+ /*Font font( mpFLEffect->GetFont() );
font.SetWeight( WEIGHT_BOLD );
mpFLEffect->SetFont( font );
- mpFLModify->SetFont( font );
+ mpFLModify->SetFont( font );*/
fillDurationComboBox( mpCBSpeed );
mpPBMoveUp->SetSymbol( SYMBOL_ARROW_UP );
@@ -216,10 +214,10 @@ CustomAnimationPane::CustomAnimationPane( ::Window* pParent, ViewShellBase& rBas
mpPBSlideShow->SetClickHdl( LINK( this, CustomAnimationPane, implControlHdl ) );
mpCBAutoPreview->SetClickHdl( LINK( this, CustomAnimationPane, implControlHdl ) );
- maStrModify = mpFLEffect->GetText();
+ //maStrModify = mpFLEffect->GetText();
// resize controls according to current size
- updateLayout();
+ //updateLayout();
// get current controller and initialize listeners
try
@@ -256,11 +254,9 @@ CustomAnimationPane::~CustomAnimationPane()
for( aIter = aTags.begin(); aIter != aTags.end(); ++aIter )
(*aIter)->Dispose();
- delete mpFLModify;
delete mpPBAddEffect;
delete mpPBChangeEffect;
delete mpPBRemoveEffect;
- delete mpFLEffect;
delete mpFTStart;
delete mpLBStart;
delete mpFTProperty;
@@ -272,10 +268,8 @@ CustomAnimationPane::~CustomAnimationPane()
delete mpFTChangeOrder;
delete mpPBMoveUp;
delete mpPBMoveDown;
- delete mpFLSeparator1;
delete mpPBPlay;
delete mpPBSlideShow;
- delete mpFLSeparator2;
delete mpCBAutoPreview;
}
@@ -292,7 +286,8 @@ void CustomAnimationPane::addUndo()
void CustomAnimationPane::Resize()
{
- updateLayout();
+ //updateLayout();
+ return;
}
void CustomAnimationPane::StateChanged( StateChangedType nStateChange )
@@ -391,10 +386,10 @@ void CustomAnimationPane::updateLayout()
// place the modify fixed line
// place the "modify effect" fixed line
- Size aSize( mpFLModify->GetSizePixel() );
+ Size aSize;/*( mpFLModify->GetSizePixel() );*/
aSize.Width() = aPaneSize.Width() - 2 * aOffset.X();
- mpFLModify->SetPosSizePixel( aCursor, aSize );
+ //mpFLModify->SetPosSizePixel( aCursor, aSize );
aCursor.Y() += aSize.Height() + aOffset.Y();
@@ -438,10 +433,10 @@ void CustomAnimationPane::updateLayout()
aCursor.Y() += aCtrlSize.Height() + 2 * aOffset.Y();
// place the "modify effect" fixed line
- aSize = mpFLEffect->GetSizePixel();
- aSize.Width() = aPaneSize.Width() - 2 * aOffset.X();
+ /*aSize = mpFLEffect->GetSizePixel();
+ aSize.Width() = aPaneSize.Width() - 2 * aOffset.X();*/
- mpFLEffect->SetPosSizePixel( aCursor, aSize );
+ //mpFLEffect->SetPosSizePixel( aCursor, aSize );
aCursor.Y() += aSize.Height() + aOffset.Y();
@@ -521,10 +516,10 @@ void CustomAnimationPane::updateLayout()
mpCBAutoPreview->SetPosPixel( aCursor );
// place the separator 2 fixed line
- aCursor.Y() -= /* aOffset.Y() + */ mpFLSeparator2->GetSizePixel().Height();
+ /* aCursor.Y() -= aOffset.Y() + mpFLSeparator2->GetSizePixel().Height();
aSize = mpFLSeparator2->GetSizePixel();
aSize.Width() = aPaneSize.Width() - 2 * aOffset.X();
- mpFLSeparator2->SetPosSizePixel( aCursor, aSize );
+ mpFLSeparator2->SetPosSizePixel( aCursor, aSize );*/
// next, layout and place the play and slide show buttons
aCtrlSize = mpPBSlideShow->GetSizePixel();
@@ -552,10 +547,10 @@ void CustomAnimationPane::updateLayout()
// place the separator 1 fixed line
aCursor.X() = aOffset.X();
- aCursor.Y() -= /* aOffset.Y() + */ mpFLSeparator1->GetSizePixel().Height();
+ /* aCursor.Y() -= aOffset.Y() + mpFLSeparator1->GetSizePixel().Height();
aSize = mpFLSeparator1->GetSizePixel();
aSize.Width() = aPaneSize.Width() - 2 * aOffset.X();
- mpFLSeparator1->SetPosSizePixel( aCursor, aSize );
+ mpFLSeparator1->SetPosSizePixel( aCursor, aSize ); */
// place the move down button
aSize = mpPBMoveDown->GetSizePixel();
@@ -706,17 +701,17 @@ OUString getPropertyName( sal_Int32 nPropertyType )
void CustomAnimationPane::updateControls()
{
- mpFLModify->Enable( mxView.is() );
+ //mpFLModify->Enable( mxView.is() );
mpFTSpeed->Enable( mxView.is() );
mpCBSpeed->Enable( mxView.is() );
mpCustomAnimationList->Enable( mxView.is() );
mpFTChangeOrder->Enable( mxView.is() );
mpPBMoveUp->Enable( mxView.is() );
mpPBMoveDown->Enable( mxView.is() );
- mpFLSeparator1->Enable( mxView.is() );
+ //mpFLSeparator1->Enable( mxView.is() );
mpPBPlay->Enable( mxView.is() );
mpPBSlideShow->Enable( mxView.is() );
- mpFLSeparator2->Enable( mxView.is() );
+ //mpFLSeparator2->Enable( mxView.is() );
mpCBAutoPreview->Enable( mxView.is() );
if( !mxView.is() )
@@ -724,7 +719,7 @@ void CustomAnimationPane::updateControls()
mpPBAddEffect->Enable( sal_False );
mpPBChangeEffect->Enable( sal_False );
mpPBRemoveEffect->Enable( sal_False );
- mpFLEffect->Enable( sal_False );
+ //mpFLEffect->Enable( sal_False );
mpFTStart->Enable( sal_False );
mpLBStart->Enable( sal_False );
mpPBPropertyMore->Enable( sal_False );
@@ -740,7 +735,7 @@ void CustomAnimationPane::updateControls()
mpPBChangeEffect->Enable( nSelectionCount);
mpPBRemoveEffect->Enable(nSelectionCount);
- mpFLEffect->Enable(nSelectionCount > 0);
+ //mpFLEffect->Enable(nSelectionCount > 0);
mpFTStart->Enable(nSelectionCount > 0);
mpLBStart->Enable(nSelectionCount > 0);
mpPBPropertyMore->Enable(nSelectionCount > 0);
@@ -762,7 +757,7 @@ void CustomAnimationPane::updateControls()
aTemp += OUString( (sal_Unicode)' ' );
aTemp += aUIName;
}
- mpFLEffect->SetText( aTemp );
+ //mpFLEffect->SetText( aTemp );
CustomAnimationPresetPtr pDescriptor = getPresets().getEffectDescriptor( pEffect->getPresetId() );
if( pDescriptor.get() )
@@ -862,7 +857,7 @@ void CustomAnimationPane::updateControls()
mpFTChangeOrder->Enable( sal_False );
mpLBStart->SetNoSelection();
mpCBSpeed->SetNoSelection();
- mpFLEffect->SetText( maStrModify );
+ //mpFLEffect->SetText( maStrModify );
}
bool bEnableUp = true;
@@ -1080,10 +1075,10 @@ void CustomAnimationPane::UpdateLook (void)
::sfx2::sidebar::Theme::GetWallpaper(
::sfx2::sidebar::Theme::Paint_PanelBackground));
SetBackground(aBackground);
- if (mpFLModify != NULL)
+ /*if (mpFLModify != NULL)
mpFLModify->SetBackground(aBackground);
if (mpFLEffect != NULL)
- mpFLEffect->SetBackground(aBackground);
+ mpFLEffect->SetBackground(aBackground);*/
if (mpFTStart != NULL)
mpFTStart->SetBackground(aBackground);
if (mpFTProperty != NULL)
@@ -1092,10 +1087,10 @@ void CustomAnimationPane::UpdateLook (void)
mpFTSpeed->SetBackground(aBackground);
if (mpFTChangeOrder != NULL)
mpFTChangeOrder->SetBackground(aBackground);
- if (mpFLSeparator1 != NULL)
+ /*if (mpFLSeparator1 != NULL)
mpFLSeparator1->SetBackground(aBackground);
if (mpFLSeparator2 != NULL)
- mpFLSeparator2->SetBackground(aBackground);
+ mpFLSeparator2->SetBackground(aBackground);*/
}
@@ -2562,7 +2557,7 @@ void CustomAnimationPane::updatePathFromMotionPathTag( const rtl::Reference< Mot
pWindow->SetSizePixel(aMinSize);
pWindow->SetBackground(Wallpaper(Color(COL_BLUE)));
- ::Window* pPaneWindow = new CustomAnimationPane( pWindow, rBase, aMinSize );
+ ::Window* pPaneWindow = new CustomAnimationPane( pWindow, rBase, NULL, aMinSize );
pWindow->SetChildWindow( pPaneWindow, aMinSize );
pWindow->SetText( pPaneWindow->GetText() );
}
@@ -2570,6 +2565,25 @@ void CustomAnimationPane::updatePathFromMotionPathTag( const rtl::Reference< Mot
return pWindow;
}
+::Window * createCustomAnimationPanel( ::Window* pParent, ViewShellBase& rBase, const cssu::Reference<css::frame::XFrame>& rxFrame )
+{
+ DialogListBox* pWindow = 0;
+
+ DrawDocShell* pDocSh = rBase.GetDocShell();
+ if( pDocSh )
+ {
+ pWindow = new DialogListBox( pParent, WB_CLIPCHILDREN|WB_TABSTOP|WB_AUTOHSCROLL );
+ const Size aMinSize( pWindow->LogicToPixel( Size( 80, 256 ), MAP_APPFONT ) );
+ pWindow->SetSizePixel(aMinSize);
+ pWindow->SetBackground(Wallpaper(Color(COL_BLUE)));
+
+ ::Window* pPaneWindow = new CustomAnimationPane( pWindow, rBase, rxFrame, aMinSize );
+ pWindow->SetChildWindow( pPaneWindow, aMinSize );
+ pWindow->SetText( pPaneWindow->GetText() );
+ }
+
+ return pWindow;
+}
diff --git a/sd/source/ui/animations/CustomAnimationPane.hxx b/sd/source/ui/animations/CustomAnimationPane.hxx
index a95b14e3e64c..325995b198b8 100644
--- a/sd/source/ui/animations/CustomAnimationPane.hxx
+++ b/sd/source/ui/animations/CustomAnimationPane.hxx
@@ -23,6 +23,8 @@
#include <com/sun/star/drawing/XDrawView.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <vcl/dialog.hxx>
+#include <svx/sidebar/PanelLayout.hxx>
+#include <sfx2/sidebar/ControlFactory.hxx>
#include "CustomAnimationPreset.hxx"
#include "CustomAnimationList.hxx"
#include "CustomAnimationCreateDialog.hxx"
@@ -57,11 +59,11 @@ typedef std::vector< rtl::Reference< MotionPathTag > > MotionPathTagVector;
// --------------------------------------------------------------------
-class CustomAnimationPane : public Control, public ICustomAnimationListController
+class CustomAnimationPane : public PanelLayout, public ICustomAnimationListController
{
friend class MotionPathTag;
public:
- CustomAnimationPane( ::Window* pParent, ViewShellBase& rBase, const Size& rMinSize );
+ CustomAnimationPane( ::Window* pParent, ViewShellBase& rBase, const cssu::Reference<css::frame::XFrame>& rxFrame, const Size& rMinSize );
virtual ~CustomAnimationPane();
// callbacks
@@ -126,26 +128,22 @@ private:
const CustomAnimationPresets* mpCustomAnimationPresets;
- FixedLine* mpFLModify;
PushButton* mpPBAddEffect;
PushButton* mpPBChangeEffect;
PushButton* mpPBRemoveEffect;
- FixedLine* mpFLEffect;
FixedText* mpFTStart;
ListBox* mpLBStart;
FixedText* mpFTProperty;
PropertyControl* mpLBProperty;
PushButton* mpPBPropertyMore;
FixedText* mpFTSpeed;
- ComboBox* mpCBSpeed;
+ ListBox* mpCBSpeed;
CustomAnimationList* mpCustomAnimationList;
FixedText* mpFTChangeOrder;
PushButton* mpPBMoveUp;
PushButton* mpPBMoveDown;
- FixedLine* mpFLSeparator1;
PushButton* mpPBPlay;
PushButton* mpPBSlideShow;
- FixedLine* mpFLSeparator2;
CheckBox* mpCBAutoPreview;
String maStrModify;
diff --git a/sd/source/ui/sidebar/CustomAnimationPanel.cxx b/sd/source/ui/sidebar/CustomAnimationPanel.cxx
index c2f8350c3f2b..f2b38af7ba1d 100644
--- a/sd/source/ui/sidebar/CustomAnimationPanel.cxx
+++ b/sd/source/ui/sidebar/CustomAnimationPanel.cxx
@@ -22,22 +22,22 @@
namespace sd {
- extern ::Window * createCustomAnimationPanel (::Window* pParent, ViewShellBase& rBase);
+ extern ::Window * createCustomAnimationPanel (::Window* pParent, ViewShellBase& rBase, const cssu::Reference<css::frame::XFrame>& rxFrame);
extern sal_Int32 getCustomAnimationPanelMinimumHeight (::Window* pParent);
}
-
-
-
namespace sd { namespace sidebar {
CustomAnimationPanel::CustomAnimationPanel (
::Window* pParentWindow,
- ViewShellBase& rViewShellBase)
+ ViewShellBase& rViewShellBase,
+ const cssu::Reference<css::frame::XFrame>& rxFrame
+ )
: PanelBase(
pParentWindow,
- rViewShellBase)
+ rViewShellBase),
+ mxFrame( rxFrame )
{
#ifdef DEBUG
SetText(OUString("sd:CustomAnimationPanel"));
@@ -58,7 +58,7 @@ CustomAnimationPanel::~CustomAnimationPanel (void)
::Window* pParentWindow,
ViewShellBase& rViewShellBase)
{
- return createCustomAnimationPanel(pParentWindow, rViewShellBase);
+ return createCustomAnimationPanel(pParentWindow, rViewShellBase, mxFrame);
}
diff --git a/sd/source/ui/sidebar/CustomAnimationPanel.hxx b/sd/source/ui/sidebar/CustomAnimationPanel.hxx
index 2fb71c1b4ec6..9c2732bca9e0 100644
--- a/sd/source/ui/sidebar/CustomAnimationPanel.hxx
+++ b/sd/source/ui/sidebar/CustomAnimationPanel.hxx
@@ -19,7 +19,7 @@
#define SD_SIDEBAR_CUSTOM_ANIMATION_PANEL_HXX
#include "PanelBase.hxx"
-
+#include <sfx2/sidebar/ControlFactory.hxx>
namespace sd { namespace sidebar {
@@ -29,7 +29,8 @@ class CustomAnimationPanel
public:
CustomAnimationPanel (
::Window* pParentWindow,
- ViewShellBase& rViewShellBase);
+ ViewShellBase& rViewShellBase,
+ const cssu::Reference<css::frame::XFrame>& rxFrame);
virtual ~CustomAnimationPanel (void);
// ILayoutableWindow
@@ -39,6 +40,9 @@ protected:
virtual ::Window* CreateWrappedControl (
::Window* pParentWindow,
ViewShellBase& rViewShellBase);
+
+private:
+ cssu::Reference<css::frame::XFrame> mxFrame;
};
} } // end of namespace sd::sidebar
diff --git a/sd/source/ui/sidebar/PanelFactory.cxx b/sd/source/ui/sidebar/PanelFactory.cxx
index c2f0a7441eb2..f1677f32de07 100644
--- a/sd/source/ui/sidebar/PanelFactory.cxx
+++ b/sd/source/ui/sidebar/PanelFactory.cxx
@@ -180,7 +180,7 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement (
#define EndsWith(s,t) s.endsWithAsciiL(t,strlen(t))
if (EndsWith(rsUIElementResourceURL, gsResourceNameCustomAnimations))
- pControl = new CustomAnimationPanel(pParentWindow, *pBase);
+ pControl = new CustomAnimationPanel(pParentWindow, *pBase, xFrame);
else if (EndsWith(rsUIElementResourceURL, gsResourceNameLayouts))
pControl = new LayoutMenu(pParentWindow, *pBase, xSidebar);
else if (EndsWith(rsUIElementResourceURL, gsResourceNameAllMasterPages))
diff --git a/sd/uiconfig/simpress/ui/customanimationspanel.ui b/sd/uiconfig/simpress/ui/customanimationspanel.ui
new file mode 100644
index 000000000000..068af803efb9
--- /dev/null
+++ b/sd/uiconfig/simpress/ui/customanimationspanel.ui
@@ -0,0 +1,418 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkBox" id="CustomAnimationPanel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkButton" id="add_effect">
+ <property name="label" translatable="yes">_Add...</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="change_effect">
+ <property name="label" translatable="yes">_Change...</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="remove_effect">
+ <property name="label" translatable="yes">_Remove</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Modify effect</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="start_effect">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Start:</property>
+ <property name="use_underline">True</property>
+ <property name="halign">end</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="effect_property">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Direction:</property>
+ <property name="use_underline">True</property>
+ <property name="halign">end</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="effect_speed">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Sp_eed:</property>
+ <property name="use_underline">True</property>
+ <property name="halign">end</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="start_effect_list">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ <property name="hexpand">True</property>
+ <items>
+ <item translatable="yes">On click</item>
+ <item translatable="yes">With previous</item>
+ <item translatable="yes">After previous</item>
+ </items>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="sdlo-PropertyControl" id="effect_property_list">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="more_properties">
+ <property name="label" translatable="yes">_...</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="effect_speed_list">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ <property name="hexpand">True</property>
+ <items>
+ <item translatable="yes">Very slow</item>
+ <item translatable="yes">Slow</item>
+ <item translatable="yes">Normal</item>
+ <item translatable="yes">Fast</item>
+ <item translatable="yes">Very fast</item>
+ </items>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="sdlo-CustomAnimationList" id="custom_animation_list">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="halign">end</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="change_order">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Change order:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="move_up">
+ <property name="label">gtk-go-up</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="move_down">
+ <property name="label">gtk-go-down</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Effect</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkBox" id="box5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkButton" id="play">
+ <property name="label" translatable="yes">_Play</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="slideshow">
+ <property name="label" translatable="yes">S_lide Show</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkCheckButton" id="auto_preview">
+ <property name="label" translatable="yes">Automatic pre_view</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+</interface>