Kaydet (Commit) d80a79b0 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert text control character dialog to .ui

Change-Id: I4f8301578e01d3c7bf0ea912a5a9fc0beac70b4f
üst 2a1d60f7
......@@ -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)
......
......@@ -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 \
))
......
......@@ -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);
}
}
......
......@@ -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: */
......@@ -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 );
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="TextControlCharacterPropertiesDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Character</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">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="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</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="help">
<property name="label">gtk-help</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</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>
<child>
<object class="GtkButton" id="reset">
<property name="label">gtk-revert-to-saved</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="tabcontrol">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="font">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Font</property>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="fonteffects">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Font Effects</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child type="tab">
<object class="GtkLabel" id="position">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Position</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab_fill">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">ok</action-widget>
<action-widget response="0">cancel</action-widget>
<action-widget response="0">help</action-widget>
<action-widget response="0">reset</action-widget>
</action-widgets>
</object>
</interface>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment