summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-16 20:36:25 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-16 20:38:23 +0000
commita0fdc73984d0eb89eacbcd858db938ad5cf1157d (patch)
treecadb2fe67935db74a7c662de6a7b9354d55da728 /svx
parent36e590ee00affc89b26055c748b862cf79f56247 (diff)
Related: fdo#73414 use frame::XDispatch::dispatch directly
This hopefully is a model which we can build in further to remove the rest of the direct SID... stuff and the fragile mapping from the known .uno: commands to SIDS to dispatch, and instead just dispatch the .uno: command directly Change-Id: Iec0f92123fa4c2dae15e0ac716d5ef687e67da79
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sidebar/text/TextPropertyPanel.cxx43
1 files changed, 3 insertions, 40 deletions
diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx
index 8f29d2fa53af..2ed39fc78f60 100644
--- a/svx/source/sidebar/text/TextPropertyPanel.cxx
+++ b/svx/source/sidebar/text/TextPropertyPanel.cxx
@@ -81,9 +81,6 @@ namespace svx { namespace sidebar {
#undef HAS_IA2
-#define FN_GROW_FONT_SIZE (FN_FORMAT + 3 )
-#define FN_SHRINK_FONT_SIZE (FN_FORMAT + 4 )
-
PopupControl* TextPropertyPanel::CreateCharacterSpacingControl (PopupContainer* pParent)
{
return new TextCharacterSpacingControl(pParent, *this, mpBindings);
@@ -553,44 +550,10 @@ IMPL_LINK(TextPropertyPanel, ToolboxIncDecSelectHdl, ToolBox*, pToolBox)
const sal_uInt16 nId = pToolBox->GetCurItemId();
const OUString aCommand(pToolBox->GetItemCommand(nId));
- // font size +/- enhancement in sd
- switch (maContext.GetCombinedContext_DI())
- {
- case CombinedEnumContext(Application_DrawImpress, Context_DrawText):
- case CombinedEnumContext(Application_DrawImpress, Context_Text):
- case CombinedEnumContext(Application_DrawImpress, Context_Table):
- case CombinedEnumContext(Application_DrawImpress, Context_OutlineText):
- case CombinedEnumContext(Application_DrawImpress, Context_Draw):
- case CombinedEnumContext(Application_DrawImpress, Context_TextObject):
- case CombinedEnumContext(Application_DrawImpress, Context_Graphic):
- if(aCommand == UNO_GROW)
- {
- EndTracking();
- SfxVoidItem aItem(SID_GROW_FONT_SIZE);
- mpBindings->GetDispatcher()->Execute( SID_GROW_FONT_SIZE, SFX_CALLMODE_RECORD, &aItem, 0L );
- }
- else if(aCommand == UNO_SHRINK)
- {
- EndTracking();
- SfxVoidItem aItem(SID_SHRINK_FONT_SIZE);
- mpBindings->GetDispatcher()->Execute( SID_SHRINK_FONT_SIZE, SFX_CALLMODE_RECORD, &aItem, 0L );
- }
- break;
+ EndTracking();
+
+ dispatch(aCommand);
- default:
- if(aCommand == UNO_GROW)
- {
- EndTracking();
- SfxVoidItem aItem(FN_GROW_FONT_SIZE);
- mpBindings->GetDispatcher()->Execute( FN_GROW_FONT_SIZE, SFX_CALLMODE_RECORD, &aItem, 0L );
- }
- else if(aCommand == UNO_SHRINK)
- {
- EndTracking();
- SfxVoidItem aItem(FN_SHRINK_FONT_SIZE);
- mpBindings->GetDispatcher()->Execute( FN_SHRINK_FONT_SIZE, SFX_CALLMODE_RECORD, &aItem, 0L );
- }
- }
UpdateItem(SID_ATTR_CHAR_FONTHEIGHT);
return 0;