[Libreoffice-commits] core.git: sc/inc sc/source sc/uiconfig
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Mar 11 09:01:28 UTC 2019
sc/inc/scabstdlg.hxx | 4
sc/source/ui/attrdlg/scdlgfact.cxx | 5 -
sc/source/ui/attrdlg/scdlgfact.hxx | 4
sc/source/ui/dbgui/subtdlg.cxx | 31 ++-----
sc/source/ui/inc/subtdlg.hxx | 9 --
sc/source/ui/view/cellsh1.cxx | 2
sc/uiconfig/scalc/ui/subtotaldialog.ui | 136 +++++++++++++++++++++++++++-----
sc/uiconfig/scalc/ui/subtotalgrppage.ui | 28 ++----
8 files changed, 150 insertions(+), 69 deletions(-)
New commits:
commit c31e7723915a20e45698d8288816288ce9104af8
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Mar 9 20:20:34 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Mar 11 10:01:02 2019 +0100
weld ScSubTotalDlg
Change-Id: I34db4ff89aa8e91d882bcde94e9ecfb88f25d9a6
Reviewed-on: https://gerrit.libreoffice.org/68984
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 9fc0bdbf32a7..3c6812562c48 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -528,8 +528,8 @@ public:
SfxStyleSheetBase& rStyleBase,
bool bPage /*true : page, false: para*/) = 0;
- virtual VclPtr<SfxAbstractTabDialog> CreateScSubTotalDlg( vcl::Window* pParent,
- const SfxItemSet* pArgSet ) = 0;
+ virtual VclPtr<SfxAbstractTabDialog> CreateScSubTotalDlg(weld::Window* pParent,
+ const SfxItemSet* pArgSet) = 0;
virtual VclPtr<SfxAbstractTabDialog> CreateScCharDlg(weld::Window* pParent,
const SfxItemSet* pAttr, const SfxObjectShell* pDocShell) = 0;
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index dcf8de1a42f2..86d8966b0409 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -1038,10 +1038,9 @@ VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScStyleDlg(weld
return VclPtr<ScAbstractTabController_Impl>::Create(std::make_unique<ScStyleDlg>(pParent, rStyleBase, bPage));
}
-VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScSubTotalDlg(vcl::Window* pParent, const SfxItemSet* pArgSet)
+VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScSubTotalDlg(weld::Window* pParent, const SfxItemSet* pArgSet)
{
- VclPtr<SfxTabDialog> pDlg = VclPtr<ScSubTotalDlg>::Create( pParent, pArgSet );
- return VclPtr<ScAbstractTabDialog_Impl>::Create( pDlg );
+ return VclPtr<ScAbstractTabController_Impl>::Create(std::make_unique<ScSubTotalDlg>(pParent, pArgSet));
}
VclPtr<SfxAbstractTabDialog> ScAbstractDialogFactory_Impl::CreateScCharDlg(
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 6577714f44a4..471d22a9e8cb 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -714,8 +714,8 @@ public:
SfxStyleSheetBase& rStyleBase,
bool bPage) override;
- virtual VclPtr<SfxAbstractTabDialog> CreateScSubTotalDlg( vcl::Window* pParent,
- const SfxItemSet* pArgSet ) override;
+ virtual VclPtr<SfxAbstractTabDialog> CreateScSubTotalDlg(weld::Window* pParent,
+ const SfxItemSet* pArgSet) override;
virtual VclPtr<SfxAbstractTabDialog> CreateScCharDlg(weld::Window* pParent,
const SfxItemSet* pAttr, const SfxObjectShell* pDocShell) override;
diff --git a/sc/source/ui/dbgui/subtdlg.cxx b/sc/source/ui/dbgui/subtdlg.cxx
index 1c931ec082e6..36c692b2f37f 100644
--- a/sc/source/ui/dbgui/subtdlg.cxx
+++ b/sc/source/ui/dbgui/subtdlg.cxx
@@ -23,36 +23,25 @@
#include <subtdlg.hxx>
#include <scui_def.hxx>
-ScSubTotalDlg::ScSubTotalDlg(vcl::Window* pParent, const SfxItemSet* pArgSet)
- : SfxTabDialog(pParent, "SubTotalDialog",
- "modules/scalc/ui/subtotaldialog.ui", pArgSet)
+ScSubTotalDlg::ScSubTotalDlg(weld::Window* pParent, const SfxItemSet* pArgSet)
+ : SfxTabDialogController(pParent, "modules/scalc/ui/subtotaldialog.ui", "SubTotalDialog", pArgSet)
+ , m_xBtnRemove(m_xBuilder->weld_button("remove"))
{
- get(m_pBtnRemove, "remove");
- AddTabPage("1stgroup", ScTpSubTotalGroup1::Create);
- AddTabPage("2ndgroup", ScTpSubTotalGroup2::Create);
- AddTabPage("3rdgroup", ScTpSubTotalGroup3::Create);
- AddTabPage("options", ScTpSubTotalOptions::Create);
- m_pBtnRemove->SetClickHdl( LINK( this, ScSubTotalDlg, RemoveHdl ) );
+ AddTabPage("1stgroup", ScTpSubTotalGroup1::Create, nullptr);
+ AddTabPage("2ndgroup", ScTpSubTotalGroup2::Create, nullptr);
+ AddTabPage("3rdgroup", ScTpSubTotalGroup3::Create, nullptr);
+ AddTabPage("options", ScTpSubTotalOptions::Create, nullptr);
+ m_xBtnRemove->connect_clicked( LINK( this, ScSubTotalDlg, RemoveHdl ) );
}
ScSubTotalDlg::~ScSubTotalDlg()
{
- disposeOnce();
}
-void ScSubTotalDlg::dispose()
+IMPL_LINK_NOARG(ScSubTotalDlg, RemoveHdl, weld::Button&, void)
{
- m_pBtnRemove.clear();
- SfxTabDialog::dispose();
-}
-
-IMPL_LINK( ScSubTotalDlg, RemoveHdl, Button *, pBtn, void )
-{
- if (pBtn == m_pBtnRemove)
- {
- EndDialog( SCRET_REMOVE );
- }
+ m_xDialog->response(SCRET_REMOVE);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/subtdlg.hxx b/sc/source/ui/inc/subtdlg.hxx
index abf9ffd9d9bf..5b821c3b6190 100644
--- a/sc/source/ui/inc/subtdlg.hxx
+++ b/sc/source/ui/inc/subtdlg.hxx
@@ -22,15 +22,14 @@
#include <sfx2/tabdlg.hxx>
-class ScSubTotalDlg : public SfxTabDialog
+class ScSubTotalDlg : public SfxTabDialogController
{
public:
- ScSubTotalDlg(vcl::Window* pParent, const SfxItemSet* pArgSet);
+ ScSubTotalDlg(weld::Window* pParent, const SfxItemSet* pArgSet);
virtual ~ScSubTotalDlg() override;
- virtual void dispose() override;
private:
- VclPtr<PushButton> m_pBtnRemove;
- DECL_LINK( RemoveHdl, Button *, void );
+ std::unique_ptr<weld::Button> m_xBtnRemove;
+ DECL_LINK(RemoveHdl, weld::Button&, void);
};
#endif // INCLUDED_SC_SOURCE_UI_INC_SUBTDLG_HXX
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 42f9c6521f46..6cb83664879e 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -3032,7 +3032,7 @@ void ScCellShell::ExecuteSubtotals(SfxRequest& rReq)
aArgSet.Put( ScSubTotalItem( SCITEM_SUBTDATA, GetViewData(), &aSubTotalParam ) );
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- pDlg.disposeAndReset(pFact->CreateScSubTotalDlg(pTabViewShell->GetDialogParent(), &aArgSet));
+ pDlg.disposeAndReset(pFact->CreateScSubTotalDlg(pTabViewShell->GetFrameWeld(), &aArgSet));
pDlg->SetCurPageId("1stgroup");
short bResult = pDlg->Execute();
diff --git a/sc/uiconfig/scalc/ui/subtotaldialog.ui b/sc/uiconfig/scalc/ui/subtotaldialog.ui
index 4755ec5508cc..e1efb4fd4b3a 100644
--- a/sc/uiconfig/scalc/ui/subtotaldialog.ui
+++ b/sc/uiconfig/scalc/ui/subtotaldialog.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="sc">
<requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="SubTotalDialog">
@@ -7,7 +7,13 @@
<property name="border_width">6</property>
<property name="title" translatable="yes" context="subtotaldialog|SubTotalDialog">Subtotals</property>
<property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="default_width">0</property>
+ <property name="default_height">0</property>
<property name="type_hint">dialog</property>
+ <child>
+ <placeholder/>
+ </child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
@@ -18,24 +24,24 @@
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
- <object class="GtkButton" id="ok">
- <property name="label">gtk-ok</property>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</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="margin_right">6</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
+ <property name="secondary">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="cancel">
- <property name="label">gtk-cancel</property>
+ <object class="GtkButton" id="reset">
+ <property name="label">gtk-revert-to-saved</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -48,26 +54,26 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="help">
- <property name="label">gtk-help</property>
+ <object class="GtkButton" id="remove">
+ <property name="label">gtk-remove</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="margin_right">6</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
- <property name="secondary">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="reset">
- <property name="label">gtk-revert-to-saved</property>
+ <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>
@@ -78,8 +84,8 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="remove">
- <property name="label">gtk-remove</property>
+ <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>
@@ -114,6 +120,30 @@
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
<child type="tab">
@@ -133,6 +163,30 @@
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="position">1</property>
@@ -156,6 +210,30 @@
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="position">2</property>
@@ -179,6 +257,30 @@
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="position">3</property>
@@ -205,11 +307,9 @@
</object>
</child>
<action-widgets>
+ <action-widget response="-11">help</action-widget>
<action-widget response="-5">ok</action-widget>
<action-widget response="-6">cancel</action-widget>
- <action-widget response="-11">help</action-widget>
- <action-widget response="0">reset</action-widget>
- <action-widget response="0">remove</action-widget>
</action-widgets>
</object>
</interface>
diff --git a/sc/uiconfig/scalc/ui/subtotalgrppage.ui b/sc/uiconfig/scalc/ui/subtotalgrppage.ui
index b75f3d67cc2e..994a7d1061d9 100644
--- a/sc/uiconfig/scalc/ui/subtotalgrppage.ui
+++ b/sc/uiconfig/scalc/ui/subtotalgrppage.ui
@@ -1,30 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
<interface domain="sc">
<requires lib="gtk+" version="3.18"/>
- <requires lib="LibreOffice" version="1.0"/>
- <object class="GtkTreeStore" id="liststore2">
+ <object class="GtkTreeStore" id="liststore1">
<columns>
- <!-- column-name check1 -->
- <column type="gboolean"/>
<!-- column-name text -->
<column type="gchararray"/>
<!-- column-name id -->
<column type="gchararray"/>
- <!-- column-name checkvis1 -->
- <column type="gboolean"/>
</columns>
</object>
- <object class="GtkTreeStore" id="liststore1">
+ <object class="GtkTreeStore" id="liststore2">
<columns>
+ <!-- column-name check1 -->
+ <column type="gboolean"/>
<!-- column-name text -->
<column type="gchararray"/>
<!-- column-name id -->
<column type="gchararray"/>
+ <!-- column-name checkvis1 -->
+ <column type="gboolean"/>
</columns>
</object>
<object class="GtkBox" id="SubTotalGrpPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
@@ -86,8 +88,6 @@
<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>
@@ -102,8 +102,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -159,8 +157,6 @@
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -183,7 +179,7 @@
<property name="search_column">0</property>
<property name="show_expanders">False</property>
<child internal-child="selection">
- <object class="GtkTreeSelection" id="Macro Library List-selection2"/>
+ <object class="GtkTreeSelection" id="Macro Library List-selection1"/>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn3">
@@ -191,7 +187,7 @@
<child>
<object class="GtkCellRendererText" id="cellrenderertext3"/>
<attributes>
- <attribute name="text">1</attribute>
+ <attribute name="text">0</attribute>
</attributes>
</child>
</object>
@@ -202,8 +198,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
</object>
More information about the Libreoffice-commits
mailing list