summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-08-05 14:50:14 +0200
committerCaolán McNamara <caolanm@redhat.com>2013-08-05 15:24:14 +0200
commitb989b2b5837145d5df15a686de3c845585d93307 (patch)
treee80dc716be7ce946fd6b49183d1ecda001c37c5a
parente584d4abbb4087a552c0848680275d90c691be01 (diff)
convert format section dialog to .ui
Change-Id: I126a4a03618060f8fe8dbe0f1a8caa6d7e891c73
-rw-r--r--sw/UIConfig_swriter.mk1
-rw-r--r--sw/inc/globals.hrc4
-rw-r--r--sw/inc/helpid.h1
-rw-r--r--sw/source/ui/dialog/regionsw.src40
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx28
-rw-r--r--sw/source/ui/inc/regionsw.hxx6
-rw-r--r--sw/uiconfig/swriter/ui/formatsectiondialog.ui162
7 files changed, 183 insertions, 59 deletions
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 4db60f5f8b3f..6e2b96c8e55a 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -83,6 +83,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/editcategories \
sw/uiconfig/swriter/ui/editsectiondialog \
sw/uiconfig/swriter/ui/exchangedatabases \
+ sw/uiconfig/swriter/ui/formatsectiondialog \
sw/uiconfig/swriter/ui/formattablepage \
sw/uiconfig/swriter/ui/footendnotedialog \
sw/uiconfig/swriter/ui/footnotepage \
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index 8fbc97e38ecb..a68ef4e1f7fb 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -190,8 +190,6 @@
#define TP_OPTCAPTION_PAGE (RC_GLOBALS_BEGIN + 78)
#define DLG_SVXTEST_NUM_BULLET (RC_GLOBALS_BEGIN + 79)
-#define DLG_SECTION_PROPERTIES (RC_GLOBALS_BEGIN + 87)
-
#define DLG_MULTI_TOX (RC_GLOBALS_BEGIN + 89)
#define TP_TOX_SELECT (RC_GLOBALS_BEGIN + 90)
#define TP_TOX_ENTRY (RC_GLOBALS_BEGIN + 91)
@@ -200,12 +198,10 @@
#define DLG_ADD_IDX_STYLES (RC_GLOBALS_BEGIN + 94)
#define TP_PRIVATE_DATA (RC_GLOBALS_BEGIN + 95)
#define TP_BUSINESS_DATA (RC_GLOBALS_BEGIN + 96)
-#define TP_SECTION_FTNENDNOTES (RC_GLOBALS_BEGIN + 97)
#define TP_CHAR_POS (RC_GLOBALS_BEGIN + 98)
#define TP_CHAR_TWOLN (RC_GLOBALS_BEGIN + 99)
#define TP_PARA_ASIAN (RC_GLOBALS_BEGIN + 100)
#define TP_TEXTGRID_PAGE (RC_GLOBALS_BEGIN + 101)
-#define TP_SECTION_INDENTS (RC_GLOBALS_BEGIN + 102)
#define TP_OPTCOMPATIBILITY_PAGE (RC_GLOBALS_BEGIN + 103)
#define TP_MAILCONFIG (RC_GLOBALS_BEGIN + 104)
//maximum: RC_GLOBALS_BEGIN + 120
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index b1d8f7baa21f..612792084fd8 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -167,7 +167,6 @@
#define HID_EDIT_FLD_REF "SW_HID_EDIT_FLD_REF"
#define HID_REDLINE_CTRL "SW_HID_REDLINE_CTRL"
#define HID_OPTCAPTION_PAGE "SW_HID_OPTCAPTION_PAGE"
-#define HID_SECTION_PROPERTIES_DLG "SW_HID_SECTION_PROPERTIES_DLG"
#define HID_TP_TOX_SELECT "SW_HID_TP_TOX_SELECT"
#define HID_TP_TOX_ENTRY "SW_HID_TP_TOX_ENTRY"
#define HID_TOX_STYLES_PAGE "SW_HID_TOX_STYLES_PAGE"
diff --git a/sw/source/ui/dialog/regionsw.src b/sw/source/ui/dialog/regionsw.src
index e65cc6ff4250..fa1e976bfa49 100644
--- a/sw/source/ui/dialog/regionsw.src
+++ b/sw/source/ui/dialog/regionsw.src
@@ -116,44 +116,4 @@ InfoBox REG_WRONG_PASSWD_REPEAT
Message [ en-US ] = "The password has not been set." ;
};
-TabDialog DLG_SECTION_PROPERTIES
-{
- HelpId = HID_SECTION_PROPERTIES_DLG;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Moveable = TRUE ;
- TabControl 1
- {
- OutputSize = TRUE ;
- PageList =
- {
- PageItem
- {
- Identifier = TP_COLUMN ;
- PageResID = TP_COLUMN ;
- Text [ en-US ] = "Columns" ;
- };
- PageItem
- {
- Identifier = TP_SECTION_INDENTS;
- PageResID = TP_SECTION_INDENTS;
- Text [ en-US ] = "Indents" ;
- };
- PageItem
- {
- Identifier = TP_BACKGROUND ;
- PageResID = TP_BACKGROUND ;
- Text [ en-US ] = "Background" ;
- };
- PageItem
- {
- Identifier = TP_SECTION_FTNENDNOTES ;
- PageResID = TP_SECTION_FTNENDNOTES ;
- Text [ en-US ] = "Footnotes/Endnotes";
- };
- };
- };
- Text [ en-US ] = "Options";
-};
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 225669a468db..3f5e438696b9 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -2103,27 +2103,27 @@ IMPL_LINK( SwSectionFtnEndTabPage, FootEndHdl, CheckBox *, pBox )
}
SwSectionPropertyTabDialog::SwSectionPropertyTabDialog(
- Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh) :
- SfxTabDialog(pParent, SW_RES(DLG_SECTION_PROPERTIES), &rSet),
- rWrtSh(rSh)
+ Window* pParent, const SfxItemSet& rSet, SwWrtShell& rSh)
+ : SfxTabDialog(pParent, "FormatSectionDialog",
+ "modules/swriter/ui/formatsectiondialog.ui", &rSet)
+ , rWrtSh(rSh)
{
- FreeResource();
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
- AddTabPage(TP_COLUMN, SwColumnPage::Create, 0);
- AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
- AddTabPage(TP_SECTION_FTNENDNOTES, SwSectionFtnEndTabPage::Create, 0);
- AddTabPage(TP_SECTION_INDENTS, SwSectionIndentTabPage::Create, 0);
+ m_nColumnPageId = AddTabPage("columns", SwColumnPage::Create, 0);
+ m_nBackPageId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
+ m_nNotePageId = AddTabPage("notes", SwSectionFtnEndTabPage::Create, 0);
+ m_nIndentPage = AddTabPage("indents", SwSectionIndentTabPage::Create, 0);
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
long nHtmlMode = rHtmlOpt.GetExportMode();
bool bWeb = 0 != PTR_CAST( SwWebDocShell, rSh.GetView().GetDocShell() );
if(bWeb)
{
- RemoveTabPage(TP_SECTION_FTNENDNOTES);
- RemoveTabPage(TP_SECTION_INDENTS);
+ RemoveTabPage(m_nNotePageId);
+ RemoveTabPage(m_nIndentPage);
if( HTML_CFG_NS40 != nHtmlMode && HTML_CFG_WRITER != nHtmlMode)
- RemoveTabPage(TP_COLUMN);
+ RemoveTabPage(m_nColumnPageId);
}
}
@@ -2133,18 +2133,18 @@ SwSectionPropertyTabDialog::~SwSectionPropertyTabDialog()
void SwSectionPropertyTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
{
- if( TP_BACKGROUND == nId )
+ if (nId == m_nBackPageId)
{
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_SHOW_SELECTOR));
rPage.PageCreated(aSet);
}
- else if( TP_COLUMN == nId )
+ else if (nId == m_nColumnPageId)
{
((SwColumnPage&)rPage).ShowBalance(sal_True);
((SwColumnPage&)rPage).SetInSection(sal_True);
}
- else if(TP_SECTION_INDENTS == nId)
+ else if (nId == m_nIndentPage)
((SwSectionIndentTabPage&)rPage).SetWrtShell(rWrtSh);
}
diff --git a/sw/source/ui/inc/regionsw.hxx b/sw/source/ui/inc/regionsw.hxx
index b00ec02c4566..5912f28d07e6 100644
--- a/sw/source/ui/inc/regionsw.hxx
+++ b/sw/source/ui/inc/regionsw.hxx
@@ -287,6 +287,12 @@ public:
class SwSectionPropertyTabDialog : public SfxTabDialog
{
SwWrtShell& rWrtSh;
+
+ sal_uInt16 m_nColumnPageId;
+ sal_uInt16 m_nBackPageId;
+ sal_uInt16 m_nNotePageId;
+ sal_uInt16 m_nIndentPage;
+
protected:
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
public:
diff --git a/sw/uiconfig/swriter/ui/formatsectiondialog.ui b/sw/uiconfig/swriter/ui/formatsectiondialog.ui
new file mode 100644
index 000000000000..9631013a8525
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/formatsectiondialog.ui
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="FormatSectionDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Options</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_underline">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="columns">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Columns</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="indents">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Indents</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="background">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Background</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="notes">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Footnotes/Endnotes</property>
+ </object>
+ <packing>
+ <property name="position">3</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>