[PATCH] inscldlg.ui widget
Manal Alhassoun (via Code Review)
gerrit at gerrit.libreoffice.org
Mon May 27 01:47:56 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/4049
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/49/4049/1
inscldlg.ui widget
Change-Id: Ia931e330303e9f5baf7ae92a8d69bc460327425d
---
M sc/source/ui/inc/inscldlg.hxx
M sc/source/ui/inc/miscdlgs.hrc
M sc/source/ui/miscdlgs/inscldlg.cxx
M sc/source/ui/src/miscdlgs.src
A sc/uiconfig/scalc/ui/insertcells.ui
5 files changed, 218 insertions(+), 107 deletions(-)
diff --git a/sc/source/ui/inc/inscldlg.hxx b/sc/source/ui/inc/inscldlg.hxx
index f6a5ed9..008206d 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 9efabdc..c65428a 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 56e72e7..0d522c8 100644
--- a/sc/source/ui/miscdlgs/inscldlg.cxx
+++ b/sc/source/ui/miscdlgs/inscldlg.cxx
@@ -34,42 +34,36 @@
//==================================================================
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 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 798a375..74f7ea1 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 0000000..92c4795
--- /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>
--
To view, visit https://gerrit.libreoffice.org/4049
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia931e330303e9f5baf7ae92a8d69bc460327425d
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Manal Alhassoun <malhassoun at kacst.edu.sa>
More information about the LibreOffice
mailing list