summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorManal Alhassoun <malhassoun@kacst.edu.sa>2013-06-09 11:13:56 +0300
committerCaolán McNamara <caolanm@redhat.com>2013-06-11 11:59:12 +0000
commit8da13c55405f1a5789401b280d15f77efbf908e8 (patch)
tree4442345890493fef931005a9232cef16d62d4f4c /sc
parent0946de1e2fbf8bd5ad3919429f648359d4464eca (diff)
groupdialog.ui widget
Change-Id: Ic19184c1250b59a4dac7c2bb42893d63c6b1a602 Reviewed-on: https://gerrit.libreoffice.org/4208 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/inc/scabstdlg.hxx1
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx3
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx1
-rw-r--r--sc/source/ui/inc/groupdlg.hxx10
-rw-r--r--sc/source/ui/miscdlgs/groupdlg.cxx27
-rw-r--r--sc/source/ui/view/cellsh1.cxx4
-rw-r--r--sc/uiconfig/scalc/ui/groupdialog.ui159
8 files changed, 176 insertions, 30 deletions
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 9e7fb460d51b..46692c839bc0 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -70,6 +70,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\
sc/uiconfig/scalc/ui/footerdialog \
sc/uiconfig/scalc/ui/formatcellsdialog \
sc/uiconfig/scalc/ui/goalseekdlg \
+ sc/uiconfig/scalc/ui/groupdialog \
sc/uiconfig/scalc/ui/headerdialog \
sc/uiconfig/scalc/ui/headerfootercontent \
sc/uiconfig/scalc/ui/headerfooterdialog \
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 9a0edf4a77b8..a041451ab872 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -385,7 +385,6 @@ public:
int nId) = 0;
virtual AbstractScGroupDlg * CreateAbstractScGroupDlg( Window* pParent, //add for ScGroupDlg
- sal_uInt16 nResId,
int nId,
sal_Bool bUnGroup = false,
sal_Bool bRows = sal_True ) = 0;
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 4a8b9bea542d..fe688143ee24 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -856,7 +856,6 @@ AbstractScFillSeriesDlg* ScAbstractDialogFactory_Impl::CreateScFillSeriesDlg( Wi
AbstractScGroupDlg* ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg( Window* pParent,
- sal_uInt16 nResId,
int nId,
sal_Bool bUnGroup ,
sal_Bool bRows )
@@ -866,7 +865,7 @@ AbstractScGroupDlg* ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg( Wind
{
case RID_SCDLG_GRP_KILL :
case RID_SCDLG_GRP_MAKE :
- pDlg = new ScGroupDlg( pParent, nResId,bUnGroup, bRows);
+ pDlg = new ScGroupDlg( pParent, bUnGroup, bRows);
break;
default:
break;
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index f2075584d945..2be305eced52 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -452,7 +452,6 @@ public:
sal_uInt16 nPossDir,
int nId);
virtual AbstractScGroupDlg * CreateAbstractScGroupDlg( Window* pParent, //add for ScGroupDlg
- sal_uInt16 nResId,
int nId,
sal_Bool bUnGroup = false,
sal_Bool bRows = sal_True );
diff --git a/sc/source/ui/inc/groupdlg.hxx b/sc/source/ui/inc/groupdlg.hxx
index 7c548005f4ea..538d60112537 100644
--- a/sc/source/ui/inc/groupdlg.hxx
+++ b/sc/source/ui/inc/groupdlg.hxx
@@ -31,7 +31,6 @@ class ScGroupDlg : public ModalDialog
{
public:
ScGroupDlg( Window* pParent,
- sal_uInt16 nResId,
sal_Bool bUnGroup = false,
sal_Bool bRows = sal_True );
~ScGroupDlg();
@@ -39,12 +38,9 @@ public:
sal_Bool GetColsChecked() const;
private:
- FixedLine aFlFrame;
- RadioButton aBtnRows;
- RadioButton aBtnCols;
- OKButton aBtnOk;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
+ FixedText* m_pFtLabel;
+ RadioButton* m_pBtnRows;
+ RadioButton* m_pBtnCols;
};
diff --git a/sc/source/ui/miscdlgs/groupdlg.cxx b/sc/source/ui/miscdlgs/groupdlg.cxx
index 6cdf30678a4d..bc3742354a18 100644
--- a/sc/source/ui/miscdlgs/groupdlg.cxx
+++ b/sc/source/ui/miscdlgs/groupdlg.cxx
@@ -26,41 +26,34 @@
#include "groupdlg.hxx"
#include "scresid.hxx"
-#include "miscdlgs.hrc"
//==================================================================
ScGroupDlg::ScGroupDlg( Window* pParent,
- sal_uInt16 nResId,
sal_Bool bUngroup,
sal_Bool bRows ) :
- ModalDialog ( pParent, ScResId( nResId ) ),
- //
- aFlFrame ( this, ScResId( FL_FRAME ) ),
- aBtnRows ( this, ScResId( BTN_GROUP_ROWS ) ),
- aBtnCols ( this, ScResId( BTN_GROUP_COLS ) ),
- aBtnOk ( this, ScResId( BTN_OK ) ),
- aBtnCancel ( this, ScResId( BTN_CANCEL ) ),
- aBtnHelp ( this, ScResId( BTN_HELP ) )
+ ModalDialog ( pParent, "GroupDialog", "modules/scalc/ui/groupdialog.ui")
{
- aFlFrame.SetText( String( ScResId(bUngroup ? STR_UNGROUP : STR_GROUP) ) );
+ get(m_pBtnRows, "rows");
+ get(m_pBtnCols, "cols");
+ get(m_pFtLabel, bUngroup ? "deactivateLabel" : "includeLabel");
+
+ m_pFtLabel->Show();
if ( bRows )
- aBtnRows.Check();
+ m_pBtnRows->Check();
else
- aBtnCols.Check();
+ m_pBtnCols->Check();
- //-------------
- FreeResource();
- aBtnRows.GrabFocus();
+ m_pBtnRows->GrabFocus();
}
//------------------------------------------------------------------------
sal_Bool ScGroupDlg::GetColsChecked() const
{
- return aBtnCols.IsChecked();
+ return m_pBtnCols->IsChecked();
}
//------------------------------------------------------------------------
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 528191bb1e01..26e13a1e4caf 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1025,7 +1025,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_MAKE, RID_SCDLG_GRP_MAKE,false);
+ AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_MAKE, false);
OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
bColumns = pDlg->GetColsChecked();
@@ -1085,7 +1085,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_KILL, RID_SCDLG_GRP_KILL,true);
+ AbstractScGroupDlg* pDlg = pFact->CreateAbstractScGroupDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_GRP_KILL, true);
OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
bColumns = pDlg->GetColsChecked();
diff --git a/sc/uiconfig/scalc/ui/groupdialog.ui b/sc/uiconfig/scalc/ui/groupdialog.ui
new file mode 100644
index 000000000000..eb3dbd29705b
--- /dev/null
+++ b/sc/uiconfig/scalc/ui/groupdialog.ui
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="GroupDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Group</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_area1">
+ <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_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>
+ <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="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="includeLabel">
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Include</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="deactivateLabel">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Deactivate for</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="rows">
+ <property name="label" translatable="yes">_Rows</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">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">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">_Columns</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">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">4</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-widgets>
+ </object>
+</interface>