sc/UIConfig_scalc.mk | 1 sc/inc/scabstdlg.hxx | 1 sc/source/ui/attrdlg/scdlgfact.cxx | 3 sc/source/ui/attrdlg/scdlgfact.hxx | 1 sc/source/ui/inc/groupdlg.hxx | 10 -- sc/source/ui/miscdlgs/groupdlg.cxx | 27 ++---- sc/source/ui/view/cellsh1.cxx | 4 sc/uiconfig/scalc/ui/groupdialog.ui | 159 ++++++++++++++++++++++++++++++++++++ 8 files changed, 176 insertions(+), 30 deletions(-)
New commits: commit 8da13c55405f1a5789401b280d15f77efbf908e8 Author: Manal Alhassoun <malhass...@kacst.edu.sa> Date: Sun Jun 9 11:13:56 2013 +0300 groupdialog.ui widget Change-Id: Ic19184c1250b59a4dac7c2bb42893d63c6b1a602 Reviewed-on: https://gerrit.libreoffice.org/4208 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk index 9e7fb46..46692c8 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 9a0edf4..a041451a 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 4a8b9be..fe68814 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 f207558..2be305e 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 7c54800..538d601 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 6cdf306..bc37423 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 528191b..26e13a1 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 0000000..eb3dbd2 --- /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>
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits