diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index 53660a87d64a..95c0691fed61 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -218,8 +218,6 @@ #define RID_SVXIMG_NOTCHECKED (RID_SVX_START + 243) #define RID_SVXIMG_CHECKED (RID_SVX_START + 244) -#define RID_SVXDLG_TEXTCONTROL_CHARATTR (RID_SVX_START + 286) - #define RID_SVXDLG_LINK_WARNING (RID_SVX_START + 313) #define RID_SIDEBAR_TEXT_PANEL (RID_SVX_START + 314) #define RID_POPUPPANEL_TEXTPAGE_UNDERLINE (RID_SVX_START + 315) diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk index 9faa773b1642..b3a0ed72cf28 100644 --- a/svx/UIConfig_svx.mk +++ b/svx/UIConfig_svx.mk @@ -39,6 +39,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\ svx/uiconfig/ui/sidebarparagraph \ svx/uiconfig/ui/sidebarpossize \ svx/uiconfig/ui/sidebartextpanel \ + svx/uiconfig/ui/textcontrolchardialog \ svx/uiconfig/ui/textcontrolparadialog \ )) 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 ) + : SfxTabDialog( pParent, "TextControlCharacterPropertiesDialog", + "svx/ui/textcontrolchardialog.ui", &_rCoreSet ) + , m_aFontList(_rFontList) + , m_nCharNamePageId(0) + , m_nCharEffectsPageId(0) + , m_nCharPositionPageId(0) { - FreeResource(); - - AddTabPage( RID_SVXPAGE_CHAR_NAME); - AddTabPage( RID_SVXPAGE_CHAR_EFFECTS); - AddTabPage( RID_SVXPAGE_CHAR_POSITION); + m_nCharNamePageId = AddTabPage("font", RID_SVXPAGE_CHAR_NAME); + m_nCharEffectsPageId = AddTabPage("fonteffects", RID_SVXPAGE_CHAR_EFFECTS); + m_nCharPositionPageId = AddTabPage("position", RID_SVXPAGE_CHAR_POSITION); } - //-------------------------------------------------------------------- - TextControlCharAttribDialog::~TextControlCharAttribDialog() - { - } - - //-------------------------------------------------------------------- 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: */ diff --git a/svx/source/inc/fmtextcontroldialogs.hxx b/svx/source/inc/fmtextcontroldialogs.hxx index 9f20a54691ef..81e78bb1d187 100644 --- a/svx/source/inc/fmtextcontroldialogs.hxx +++ b/svx/source/inc/fmtextcontroldialogs.hxx @@ -36,10 +36,12 @@ namespace svx { private: SvxFontListItem m_aFontList; + sal_uInt16 m_nCharNamePageId; + sal_uInt16 m_nCharEffectsPageId; + sal_uInt16 m_nCharPositionPageId; public: TextControlCharAttribDialog( Window* pParent, const SfxItemSet& _rCoreSet, const SvxFontListItem& _rFontList ); - ~TextControlCharAttribDialog(); protected: virtual void PageCreated( sal_uInt16 _nId, SfxTabPage& _rPage ); diff --git a/svx/uiconfig/ui/textcontrolchardialog.ui b/svx/uiconfig/ui/textcontrolchardialog.ui new file mode 100644 index 000000000000..26ecee9833c8 --- /dev/null +++ b/svx/uiconfig/ui/textcontrolchardialog.ui @@ -0,0 +1,147 @@ + + + + + False + 6 + Character + dialog + + + False + vertical + 12 + + + False + end + + + gtk-ok + True + True + True + True + True + True + + + False + True + 0 + + + + + gtk-cancel + True + True + True + True + + + False + True + 1 + + + + + gtk-help + True + True + True + True + + + False + True + 2 + + + + + gtk-revert-to-saved + True + True + True + True + + + False + True + 3 + + + + + False + True + end + 0 + + + + + True + True + True + True + + + + + + True + False + Font + + + False + + + + + + + + True + False + Font Effects + + + 1 + False + + + + + + + + True + False + Position + + + 2 + False + + + + + False + True + 1 + + + + + + ok + cancel + help + reset + + +