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

GtkComboBox->GtkComboBoxText to use the items, etc

Change-Id: I6ece0c471fbe21fc832c4c65a02bfbc9cf991a5a
üst 9f0644d6
...@@ -60,7 +60,6 @@ ...@@ -60,7 +60,6 @@
#define HID_SC_PIVOTSUBT "SC_HID_SC_PIVOTSUBT" #define HID_SC_PIVOTSUBT "SC_HID_SC_PIVOTSUBT"
#define HID_SCPAGE_SUBT_OPTIONS "SC_HID_SCPAGE_SUBT_OPTIONS" #define HID_SCPAGE_SUBT_OPTIONS "SC_HID_SCPAGE_SUBT_OPTIONS"
#define HID_SCPAGE_SUBT_GROUP "SC_HID_SCPAGE_SUBT_GROUP" #define HID_SCPAGE_SUBT_GROUP "SC_HID_SCPAGE_SUBT_GROUP"
#define HID_SCPAGE_AREAS "SC_HID_SCPAGE_AREAS"
#define HID_SCPAGE_SUBT_GROUP1 "SC_HID_SCPAGE_SUBT_GROUP1" #define HID_SCPAGE_SUBT_GROUP1 "SC_HID_SCPAGE_SUBT_GROUP1"
#define HID_SCPAGE_SUBT_GROUP2 "SC_HID_SCPAGE_SUBT_GROUP2" #define HID_SCPAGE_SUBT_GROUP2 "SC_HID_SCPAGE_SUBT_GROUP2"
#define HID_SCPAGE_SUBT_GROUP3 "SC_HID_SCPAGE_SUBT_GROUP3" #define HID_SCPAGE_SUBT_GROUP3 "SC_HID_SCPAGE_SUBT_GROUP3"
......
...@@ -48,17 +48,14 @@ public: ...@@ -48,17 +48,14 @@ public:
virtual sal_Bool Close(); virtual sal_Bool Close();
private: private:
FixedLine* pFlPrintArea;
ListBox* pLbPrintArea; ListBox* pLbPrintArea;
formula::RefEdit* pEdPrintArea; formula::RefEdit* pEdPrintArea;
formula::RefButton* pRbPrintArea; formula::RefButton* pRbPrintArea;
FixedLine* pFlRepeatRow;
ListBox* pLbRepeatRow; ListBox* pLbRepeatRow;
formula::RefEdit* pEdRepeatRow; formula::RefEdit* pEdRepeatRow;
formula::RefButton* pRbRepeatRow; formula::RefButton* pRbRepeatRow;
FixedLine* pFlRepeatCol;
ListBox* pLbRepeatCol; ListBox* pLbRepeatCol;
formula::RefEdit* pEdRepeatCol; formula::RefEdit* pEdRepeatCol;
formula::RefButton* pRbRepeatCol; formula::RefButton* pRbRepeatCol;
......
...@@ -105,32 +105,28 @@ static void printAddressFlags(sal_uInt16 nFlag) ...@@ -105,32 +105,28 @@ static void printAddressFlags(sal_uInt16 nFlag)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent ) ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent )
: ScAnyRefDlg ( pB, pCW, pParent, "PrintAreasDialog", "modules/scalc/ui/printareasdialog.ui"), : ScAnyRefDlg(pB, pCW, pParent, "PrintAreasDialog", "modules/scalc/ui/printareasdialog.ui")
// , bDlgLostFocus(false)
bDlgLostFocus ( false ), , pDoc(NULL)
pDoc ( NULL ), , pViewData(NULL)
pViewData ( NULL ), , nCurTab(0)
nCurTab ( 0 )
{ {
get(pFlPrintArea,"label1");
get(pLbPrintArea,"lbprintarea"); get(pLbPrintArea,"lbprintarea");
get(pEdPrintArea,"edprintarea"); get(pEdPrintArea,"edprintarea");
pEdPrintArea->SetReferences(this, pFlPrintArea); pEdPrintArea->SetReferences(this, get<VclFrame>("printframe")->get_label_widget());
pRefInputEdit = pEdPrintArea; pRefInputEdit = pEdPrintArea;
get(pRbPrintArea,"rbprintarea"); get(pRbPrintArea,"rbprintarea");
pRbPrintArea->SetReferences(this, pEdPrintArea); pRbPrintArea->SetReferences(this, pEdPrintArea);
get(pFlRepeatRow,"label2");
get(pLbRepeatRow,"lbrepeatrow"); get(pLbRepeatRow,"lbrepeatrow");
get(pEdRepeatRow,"edrepeatrow"); get(pEdRepeatRow,"edrepeatrow");
pEdRepeatRow->SetReferences(this, pFlRepeatRow); pEdRepeatRow->SetReferences(this, get<VclFrame>("rowframe")->get_label_widget());
get(pRbRepeatRow,"rbrepeatrow"); get(pRbRepeatRow,"rbrepeatrow");
pRbRepeatRow->SetReferences(this, pEdRepeatRow); pRbRepeatRow->SetReferences(this, pEdRepeatRow);
get(pFlRepeatCol,"label3");
get(pLbRepeatCol,"lbrepeatcol"); get(pLbRepeatCol,"lbrepeatcol");
get(pEdRepeatCol,"edrepeatcol"); get(pEdRepeatCol,"edrepeatcol");
pEdRepeatCol->SetReferences(this, pFlRepeatCol); pEdRepeatCol->SetReferences(this, get<VclFrame>("colframe")->get_label_widget());
get(pRbRepeatCol,"rbrepeatcol"); get(pRbRepeatCol,"rbrepeatcol");
pRbRepeatCol->SetReferences(this, pEdRepeatCol); pRbRepeatCol->SetReferences(this, pEdRepeatCol);
...@@ -162,13 +158,13 @@ ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* ...@@ -162,13 +158,13 @@ ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, Window*
ScPrintAreasDlg::~ScPrintAreasDlg() ScPrintAreasDlg::~ScPrintAreasDlg()
{ {
// Extra-Data an ListBox-Entries abraeumen // Extra-Data an ListBox-Entries abraeumen
ListBox* pLb[3] = { pLbPrintArea, pLbRepeatRow, pLbRepeatCol }; ListBox* aLb[3] = { pLbPrintArea, pLbRepeatRow, pLbRepeatCol };
for ( sal_uInt16 i=0; i<3; i++ ) for (sal_uInt16 i = 0; i < SAL_N_ELEMENTS(aLb); ++i)
{ {
sal_uInt16 nCount = pLb[i]->GetEntryCount(); sal_uInt16 nCount = aLb[i]->GetEntryCount();
for ( sal_uInt16 j=0; j<nCount; j++ ) for ( sal_uInt16 j=0; j<nCount; j++ )
delete (String*)pLb[i]->GetEntryData(j); delete (String*)aLb[i]->GetEntryData(j);
} }
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<interface> <interface>
<!-- interface-requires gtk+ 3.0 --> <!-- interface-requires gtk+ 3.0 -->
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkDialog" id="PrintAreasDialog"> <object class="GtkDialog" id="PrintAreasDialog">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="title" translatable="yes">Edit Print Ranges</property>
<property name="type_hint">dialog</property> <property name="type_hint">dialog</property>
<child internal-child="vbox"> <child internal-child="vbox">
<object class="GtkBox" id="internal-box1"> <object class="GtkBox" id="internal-box1">
...@@ -19,6 +21,8 @@ ...@@ -19,6 +21,8 @@
<property name="label">gtk-ok</property> <property name="label">gtk-ok</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">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="receives_default">True</property>
<property name="use_stock">True</property> <property name="use_stock">True</property>
</object> </object>
...@@ -71,7 +75,7 @@ ...@@ -71,7 +75,7 @@
<property name="orientation">vertical</property> <property name="orientation">vertical</property>
<property name="spacing">12</property> <property name="spacing">12</property>
<child> <child>
<object class="GtkFrame" id="frame1"> <object class="GtkFrame" id="printframe">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label_xalign">0</property> <property name="label_xalign">0</property>
...@@ -119,15 +123,16 @@ ...@@ -119,15 +123,16 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBox" id="lbprintarea"> <object class="GtkComboBoxText" id="lbprintarea">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="hexpand">True</property> <property name="entry_text_column">0</property>
<property name="id_column">1</property>
<items> <items>
<item>- none -</item> <item translatable="yes">- none -</item>
<item>- entire sheet -</item> <item translatable="yes">- entire sheet -</item>
<item>- user defined -</item> <item translatable="yes">- user defined -</item>
<item>- selection -</item> <item translatable="yes">- selection -</item>
</items> </items>
</object> </object>
<packing> <packing>
...@@ -159,7 +164,7 @@ ...@@ -159,7 +164,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkFrame" id="frame2"> <object class="GtkFrame" id="rowframe">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label_xalign">0</property> <property name="label_xalign">0</property>
...@@ -176,23 +181,6 @@ ...@@ -176,23 +181,6 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="row_spacing">6</property> <property name="row_spacing">6</property>
<property name="column_spacing">12</property> <property name="column_spacing">12</property>
<child>
<object class="GtkComboBox" id="lbrepeatrow">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<items>
<item>- none -</item>
<item>- user defined -</item>
</items>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child> <child>
<object class="foruilo-RefEdit" id="edrepeatrow"> <object class="foruilo-RefEdit" id="edrepeatrow">
<property name="visible">True</property> <property name="visible">True</property>
...@@ -210,7 +198,7 @@ ...@@ -210,7 +198,7 @@
<child> <child>
<object class="foruilo-RefButton" id="rbrepeatrow"> <object class="foruilo-RefButton" id="rbrepeatrow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">Fales</property> <property name="can_focus">False</property>
<property name="receives_default">False</property> <property name="receives_default">False</property>
<child> <child>
<placeholder/> <placeholder/>
...@@ -223,6 +211,24 @@ ...@@ -223,6 +211,24 @@
<property name="height">1</property> <property name="height">1</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkComboBoxText" id="lbrepeatrow">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="entry_text_column">0</property>
<property name="id_column">1</property>
<items>
<item translatable="yes">- none -</item>
<item translatable="yes">- user defined -</item>
</items>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object> </object>
</child> </child>
</object> </object>
...@@ -231,7 +237,7 @@ ...@@ -231,7 +237,7 @@
<object class="GtkLabel" id="label2"> <object class="GtkLabel" id="label2">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes">Moves to repeat</property> <property name="label" translatable="yes">Rows to repeat</property>
<attributes> <attributes>
<attribute name="weight" value="bold"/> <attribute name="weight" value="bold"/>
</attributes> </attributes>
...@@ -245,7 +251,7 @@ ...@@ -245,7 +251,7 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkFrame" id="frame3"> <object class="GtkFrame" id="colframe">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label_xalign">0</property> <property name="label_xalign">0</property>
...@@ -262,23 +268,6 @@ ...@@ -262,23 +268,6 @@
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="row_spacing">6</property> <property name="row_spacing">6</property>
<property name="column_spacing">12</property> <property name="column_spacing">12</property>
<child>
<object class="GtkComboBox" id="lbrepeatcol">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<items>
<item>- none -</item>
<item>- user defined -</item>
</items>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child> <child>
<object class="foruilo-RefEdit" id="edrepeatcol"> <object class="foruilo-RefEdit" id="edrepeatcol">
<property name="visible">True</property> <property name="visible">True</property>
...@@ -309,6 +298,24 @@ ...@@ -309,6 +298,24 @@
<property name="height">1</property> <property name="height">1</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkComboBoxText" id="lbrepeatcol">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="entry_text_column">0</property>
<property name="id_column">1</property>
<items>
<item translatable="yes">- none -</item>
<item translatable="yes">- user defined -</item>
</items>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object> </object>
</child> </child>
</object> </object>
......
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