diff options
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/animations/CustomAnimation.hrc | 1 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimation.src | 27 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationDialog.cxx | 21 |
3 files changed, 9 insertions, 40 deletions
diff --git a/sd/source/ui/animations/CustomAnimation.hrc b/sd/source/ui/animations/CustomAnimation.hrc index 9124b4386eb1..0f0a69bdf8d7 100644 --- a/sd/source/ui/animations/CustomAnimation.hrc +++ b/sd/source/ui/animations/CustomAnimation.hrc @@ -27,7 +27,6 @@ // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #define RID_CUSTOMANIMATION_ROTATION_POPUP RID_CUSTOMANIMATION_START+9 -#define RID_CUSTOMANIMATION_FONTSIZE_POPUP RID_CUSTOMANIMATION_START+10 #define RID_CUSTOMANIMATION_SCALE_POPUP RID_CUSTOMANIMATION_START+11 #define RID_CUSTOMANIMATION_FONTSTYLE_POPUP RID_CUSTOMANIMATION_START+12 diff --git a/sd/source/ui/animations/CustomAnimation.src b/sd/source/ui/animations/CustomAnimation.src index 34eedb138aad..ae5fe4267a6c 100644 --- a/sd/source/ui/animations/CustomAnimation.src +++ b/sd/source/ui/animations/CustomAnimation.src @@ -19,33 +19,6 @@ #include "CustomAnimation.hrc" -Menu RID_CUSTOMANIMATION_FONTSIZE_POPUP -{ - ItemList = - { - MenuItem - { - Identifier = CM_SIZE_25 ; - Text [ en-US ] = "Tiny" ; - }; - MenuItem - { - Identifier = CM_SIZE_50 ; - Text [ en-US ] = "Smaller" ; - }; - MenuItem - { - Identifier = CM_SIZE_150 ; - Text [ en-US ] = "Larger" ; - }; - MenuItem - { - Identifier = CM_SIZE_400 ; - Text [ en-US ] = "Extra large" ; - }; - }; -}; - Menu RID_CUSTOMANIMATION_SCALE_POPUP { ItemList = diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index 333065e0229d..6facfeef0f9b 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -420,21 +420,24 @@ public: private: DECL_LINK( EditModifyHdl, Edit&, void ); + VclBuilder maBuilder; VclPtr<DropdownMenuBox> mpControl; VclPtr<PopupMenu> mpMenu; VclPtr<MetricField> mpMetric; Link<LinkParamNone*,void> maModifyHdl; }; -CharHeightPropertyBox::CharHeightPropertyBox( sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl ) -: PropertySubControl( nControlType ), maModifyHdl(rModifyHdl) +CharHeightPropertyBox::CharHeightPropertyBox(sal_Int32 nControlType, vcl::Window* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl) + : PropertySubControl(nControlType) + , maBuilder(nullptr, VclBuilderContainer::getUIRootDir(), "modules/simpress/ui/fontsizemenu.ui", "") + , maModifyHdl(rModifyHdl) { mpMetric.set( VclPtr<MetricField>::Create( pParent, WB_TABSTOP|WB_IGNORETAB| WB_NOBORDER) ); mpMetric->SetUnit( FUNIT_PERCENT ); mpMetric->SetMin( 0 ); mpMetric->SetMax( 1000 ); - mpMenu = VclPtr<PopupMenu>::Create(SdResId( RID_CUSTOMANIMATION_FONTSIZE_POPUP ) ); + mpMenu = maBuilder.get_menu("menu"); mpControl = VclPtr<DropdownMenuBox>::Create( pParent, mpMetric, mpMenu ); mpControl->SetMenuSelectHdl( LINK( this, CharHeightPropertyBox, implMenuSelectHdl )); mpControl->SetModifyHdl( LINK( this, CharHeightPropertyBox, EditModifyHdl ) ); @@ -446,6 +449,7 @@ CharHeightPropertyBox::CharHeightPropertyBox( sal_Int32 nControlType, vcl::Windo CharHeightPropertyBox::~CharHeightPropertyBox() { + maBuilder.disposeBuilder(); mpControl.disposeAndClear(); } @@ -456,15 +460,8 @@ IMPL_LINK_NOARG( CharHeightPropertyBox, EditModifyHdl, Edit&, void ) IMPL_LINK( CharHeightPropertyBox, implMenuSelectHdl, MenuButton*, pPb, void ) { - long nValue = 100; - switch( pPb->GetCurItemId() ) - { - case CM_SIZE_25: nValue = 25; break; - case CM_SIZE_50: nValue = 50; break; - case CM_SIZE_150: nValue = 150; break; - case CM_SIZE_400: nValue = 400; break; - } - mpMetric->SetValue( nValue ); + sal_Int32 nValue = pPb->GetCurItemIdent().toInt32(); + mpMetric->SetValue(nValue); mpMetric->Modify(); } |