diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-12-24 23:06:53 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-24 23:06:53 +0000 |
commit | d80a79b018376d211db38d28976f652ffdacdfa1 (patch) | |
tree | 8d910c03b0ded102c3468dfe6eb53669ccf88916 /svx/source/form | |
parent | 2a1d60f76d84f4c617792b1dcf4196b4289fb51f (diff) |
convert text control character dialog to .ui
Change-Id: I4f8301578e01d3c7bf0ea912a5a9fc0beac70b4f
Diffstat (limited to 'svx/source/form')
-rw-r--r-- | svx/source/form/fmtextcontroldialogs.cxx | 50 | ||||
-rw-r--r-- | svx/source/form/formshell.src | 32 |
2 files changed, 22 insertions, 60 deletions
diff --git a/svx/source/form/fmtextcontroldialogs.cxx b/svx/source/form/fmtextcontroldialogs.cxx index 92a5402b4432..c7eba1eb748e 100644 --- a/svx/source/form/fmtextcontroldialogs.cxx +++ b/svx/source/form/fmtextcontroldialogs.cxx @@ -39,42 +39,36 @@ namespace svx //==================================================================== //-------------------------------------------------------------------- TextControlCharAttribDialog::TextControlCharAttribDialog( Window* pParent, const SfxItemSet& _rCoreSet, const SvxFontListItem& _rFontList ) - :SfxTabDialog( pParent, SVX_RES( RID_SVXDLG_TEXTCONTROL_CHARATTR ), &_rCoreSet ) - ,m_aFontList( _rFontList ) - { - FreeResource(); - - AddTabPage( RID_SVXPAGE_CHAR_NAME); - AddTabPage( RID_SVXPAGE_CHAR_EFFECTS); - AddTabPage( RID_SVXPAGE_CHAR_POSITION); - } - - //-------------------------------------------------------------------- - TextControlCharAttribDialog::~TextControlCharAttribDialog() + : SfxTabDialog( pParent, "TextControlCharacterPropertiesDialog", + "svx/ui/textcontrolchardialog.ui", &_rCoreSet ) + , m_aFontList(_rFontList) + , m_nCharNamePageId(0) + , m_nCharEffectsPageId(0) + , m_nCharPositionPageId(0) { + m_nCharNamePageId = AddTabPage("font", RID_SVXPAGE_CHAR_NAME); + m_nCharEffectsPageId = AddTabPage("fonteffects", RID_SVXPAGE_CHAR_EFFECTS); + m_nCharPositionPageId = AddTabPage("position", RID_SVXPAGE_CHAR_POSITION); } - //-------------------------------------------------------------------- void TextControlCharAttribDialog::PageCreated( sal_uInt16 _nId, SfxTabPage& _rPage ) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - switch( _nId ) + if (_nId == m_nCharNamePageId) { - case RID_SVXPAGE_CHAR_NAME: - aSet.Put (m_aFontList); - _rPage.PageCreated(aSet); - break; - - case RID_SVXPAGE_CHAR_EFFECTS: - aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP)); - _rPage.PageCreated(aSet); - break; - - case RID_SVXPAGE_CHAR_POSITION: - aSet.Put( SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER) ); - _rPage.PageCreated(aSet); - break; + aSet.Put (m_aFontList); + _rPage.PageCreated(aSet); + } + else if (_nId == m_nCharEffectsPageId) + { + aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP)); + _rPage.PageCreated(aSet); + } + else if (_nId == m_nCharPositionPageId) + { + aSet.Put( SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER) ); + _rPage.PageCreated(aSet); } } diff --git a/svx/source/form/formshell.src b/svx/source/form/formshell.src index 965e91f94b9b..339cb17aae9d 100644 --- a/svx/source/form/formshell.src +++ b/svx/source/form/formshell.src @@ -150,36 +150,4 @@ Menu RID_FM_TEXTATTRIBUTE_MENU }; }; -TabDialog RID_SVXDLG_TEXTCONTROL_CHARATTR -{ - OutputSize = TRUE; - SVLook = TRUE; - Moveable = TRUE; - - Text [ en-US ] = "Character"; - - TabControl 1 - { - OutputSize = TRUE; - PageList = - { - PageItem - { - Identifier = RID_SVXPAGE_CHAR_NAME; - Text [ en-US ] = "Font"; - }; - PageItem - { - Identifier = RID_SVXPAGE_CHAR_EFFECTS; - Text [ en-US ] = "Font Effects"; - }; - PageItem - { - Identifier = RID_SVXPAGE_CHAR_POSITION; - Text [ en-US ] = "Position"; - }; - }; - }; -}; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |