summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorManal Alhassoun <malhassoun@kacst.edu.sa>2013-05-27 11:58:45 +0300
committerCaolán McNamara <caolanm@redhat.com>2013-05-27 13:15:32 +0000
commitbfc0609a4c5c73533b31f2581963160abe57df5e (patch)
tree9ebfdae32737324b30278d6ad16e19fa26ed8cfb /sc
parent7d01bed2e663e19b2387d5427036afea0ff4fa4f (diff)
inscldlg.ui widget
Change-Id: Ia931e330303e9f5baf7ae92a8d69bc460327425d Reviewed-on: https://gerrit.libreoffice.org/4049 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/UIConfig_scalc.mk1
-rw-r--r--sc/source/ui/inc/inscldlg.hxx12
-rw-r--r--sc/source/ui/inc/miscdlgs.hrc5
-rw-r--r--sc/source/ui/miscdlgs/inscldlg.cxx46
-rw-r--r--sc/source/ui/src/miscdlgs.src68
-rw-r--r--sc/uiconfig/scalc/ui/insertcells.ui194
6 files changed, 219 insertions, 107 deletions
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 1f77cdd0e521..cf715ff59c2e 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -73,6 +73,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/headerdialog \
sc/uiconfig/scalc/ui/headerfootercontent \
sc/uiconfig/scalc/ui/headerfooterdialog \
+ sc/uiconfig/scalc/ui/insertcells \
sc/uiconfig/scalc/ui/insertname \
sc/uiconfig/scalc/ui/insertsheet \
sc/uiconfig/scalc/ui/leftfooterdialog \
diff --git a/sc/source/ui/inc/inscldlg.hxx b/sc/source/ui/inc/inscldlg.hxx
index f6a5ed9b2436..008206df3f15 100644
--- a/sc/source/ui/inc/inscldlg.hxx
+++ b/sc/source/ui/inc/inscldlg.hxx
@@ -32,14 +32,10 @@
class ScInsertCellDlg : public ModalDialog
{
private:
- FixedLine aFlFrame;
- RadioButton aBtnCellsDown;
- RadioButton aBtnCellsRight;
- RadioButton aBtnInsRows;
- RadioButton aBtnInsCols;
- OKButton aBtnOk;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
+ RadioButton* m_pBtnCellsDown;
+ RadioButton* m_pBtnCellsRight;
+ RadioButton* m_pBtnInsRow;
+ RadioButton* m_pBtnInsCol;
public:
ScInsertCellDlg( Window* pParent,sal_Bool bDisallowCellMove = false );
diff --git a/sc/source/ui/inc/miscdlgs.hrc b/sc/source/ui/inc/miscdlgs.hrc
index 9efabdc4568b..c65428ab4170 100644
--- a/sc/source/ui/inc/miscdlgs.hrc
+++ b/sc/source/ui/inc/miscdlgs.hrc
@@ -37,11 +37,6 @@
#define FL_FRAME 112
#define STR_BTN_CLOSE 200
-// Insert Cell Dialog
-#define BTN_CELLSDOWN 11
-#define BTN_CELLSRIGHT 12
-#define BTN_INSROWS 16
-#define BTN_INSCOLS 17
// Insert Contents Dialog
#define BTN_INSALL 20
diff --git a/sc/source/ui/miscdlgs/inscldlg.cxx b/sc/source/ui/miscdlgs/inscldlg.cxx
index 56e72e710041..0d522c80224f 100644
--- a/sc/source/ui/miscdlgs/inscldlg.cxx
+++ b/sc/source/ui/miscdlgs/inscldlg.cxx
@@ -34,42 +34,36 @@ static sal_uInt8 nInsItemChecked=0;
//==================================================================
ScInsertCellDlg::ScInsertCellDlg( Window* pParent,sal_Bool bDisallowCellMove) :
- ModalDialog ( pParent, ScResId( RID_SCDLG_INSCELL ) ),
- //
- aFlFrame ( this, ScResId( FL_FRAME ) ),
- aBtnCellsDown ( this, ScResId( BTN_CELLSDOWN ) ),
- aBtnCellsRight ( this, ScResId( BTN_CELLSRIGHT ) ),
- aBtnInsRows ( this, ScResId( BTN_INSROWS ) ),
- aBtnInsCols ( this, ScResId( BTN_INSCOLS ) ),
- aBtnOk ( this, ScResId( BTN_OK ) ),
- aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
- aBtnHelp ( this, ScResId( BTN_HELP ) )
+ ModalDialog ( pParent, "InsertCellsDialog", "modules/scalc/ui/insertcells.ui")
{
+ get(m_pBtnCellsDown, "down");
+ get(m_pBtnCellsRight, "right");
+ get(m_pBtnInsRow, "rows");
+ get(m_pBtnInsCol, "cols");
+
if (bDisallowCellMove)
{
- aBtnCellsDown.Disable();
- aBtnCellsRight.Disable();
- aBtnInsRows.Check();
+ m_pBtnCellsDown->Disable();
+ m_pBtnCellsRight->Disable();
+ m_pBtnInsRow->Check();
switch(nInsItemChecked)
{
- case 2: aBtnInsRows .Check();break;
- case 3: aBtnInsCols .Check();break;
- default:aBtnInsRows .Check();break;
+ case 2: m_pBtnInsRow->Check();break;
+ case 3: m_pBtnInsCol->Check();break;
+ default:m_pBtnInsRow->Check();break;
}
}
else
{
switch(nInsItemChecked)
{
- case 0: aBtnCellsDown .Check();break;
- case 1: aBtnCellsRight.Check();break;
- case 2: aBtnInsRows .Check();break;
- case 3: aBtnInsCols .Check();break;
+ case 0: m_pBtnCellsDown->Check();break;
+ case 1: m_pBtnCellsRight->Check();break;
+ case 2: m_pBtnInsRow->Check();break;
+ case 3: m_pBtnInsCol->Check();break;
}
}
- //-------------
- FreeResource();
}
//------------------------------------------------------------------------
@@ -78,22 +72,22 @@ InsCellCmd ScInsertCellDlg::GetInsCellCmd() const
{
InsCellCmd nReturn = INS_NONE;
- if ( aBtnCellsDown.IsChecked() )
+ if ( m_pBtnCellsDown->IsChecked() )
{
nInsItemChecked=0;
nReturn = INS_CELLSDOWN;
}
- else if ( aBtnCellsRight.IsChecked())
+ else if ( m_pBtnCellsRight->IsChecked())
{
nInsItemChecked=1;
nReturn = INS_CELLSRIGHT;
}
- else if ( aBtnInsRows.IsChecked() )
+ else if ( m_pBtnInsRow->IsChecked() )
{
nInsItemChecked=2;
nReturn = INS_INSROWS;
}
- else if ( aBtnInsCols.IsChecked() )
+ else if ( m_pBtnInsCol->IsChecked() )
{
nInsItemChecked=3;
nReturn = INS_INSCOLS;
diff --git a/sc/source/ui/src/miscdlgs.src b/sc/source/ui/src/miscdlgs.src
index 798a375821cd..74f7ea19814a 100644
--- a/sc/source/ui/src/miscdlgs.src
+++ b/sc/source/ui/src/miscdlgs.src
@@ -19,74 +19,6 @@
#include "miscdlgs.hrc"
-ModalDialog RID_SCDLG_INSCELL
-{
- OutputSize = TRUE ;
- HelpId = CMD_FID_INS_CELL ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 191 , 70 ) ;
- Text [ en-US ] = "Insert Cells" ;
- Moveable = TRUE ;
- Closeable = FALSE ;
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT ( 135 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT ( 135 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT ( 135 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- RadioButton BTN_INSCOLS
- {
- HelpID = "sc:RadioButton:RID_SCDLG_INSCELL:BTN_INSCOLS";
- Pos = MAP_APPFONT ( 12 , 56 ) ;
- Size = MAP_APPFONT ( 114 , 10 ) ;
- Text [ en-US ] = "Entire ~column" ;
- TabStop = TRUE ;
- };
- RadioButton BTN_INSROWS
- {
- HelpID = "sc:RadioButton:RID_SCDLG_INSCELL:BTN_INSROWS";
- Pos = MAP_APPFONT ( 12 , 42 ) ;
- Size = MAP_APPFONT ( 114 , 10 ) ;
- Text [ en-US ] = "Entire ro~w" ;
- TabStop = TRUE ;
- };
- RadioButton BTN_CELLSRIGHT
- {
- HelpID = "sc:RadioButton:RID_SCDLG_INSCELL:BTN_CELLSRIGHT";
- Pos = MAP_APPFONT ( 12 , 28 ) ;
- Size = MAP_APPFONT ( 114 , 10 ) ;
- Text [ en-US ] = "Shift cells ~right" ;
- TabStop = TRUE ;
- };
- RadioButton BTN_CELLSDOWN
- {
- HelpID = "sc:RadioButton:RID_SCDLG_INSCELL:BTN_CELLSDOWN";
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 114 , 10 ) ;
- Text [ en-US ] = "Shift cells ~down" ;
- TabStop = TRUE ;
- };
- FixedLine FL_FRAME
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 123 , 8 ) ;
- Text [ en-US ] = "Selection" ;
- };
-};
-
ModalDialog RID_SCDLG_INSCONT
{
OutputSize = TRUE ;
diff --git a/sc/uiconfig/scalc/ui/insertcells.ui b/sc/uiconfig/scalc/ui/insertcells.ui
new file mode 100644
index 000000000000..92c47955d9b3
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/insertcells.ui
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="InsertCellsDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Insert Cells</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="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area3">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="layout_style">start</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_action_appearance">False</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_action_appearance">False</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_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ <property name="image_position">top</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</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="GtkFrame" id="Selection">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="down">
+ <property name="label" translatable="yes">Shift cells _down</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">right</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="right">
+ <property name="label" translatable="yes">Shift cells _right</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">rows</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="rows">
+ <property name="label" translatable="yes">Entire ro_w</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">cols</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="cols">
+ <property name="label" translatable="yes">Entire _column</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">down</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Selection</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </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-widgets>
+ </object>
+</interface>