chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx | 12 - chart2/source/controller/inc/dlg_ShapeParagraph.hxx | 7 chart2/source/controller/main/ShapeController.cxx | 6 chart2/uiconfig/ui/paradialog.ui | 128 ++++++++++++++-- 4 files changed, 125 insertions(+), 28 deletions(-)
New commits: commit 80761fd7cd574a2d71b5b0aeead5d6920db56707 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Sep 17 12:43:17 2018 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Sep 19 11:41:18 2018 +0200 weld ShapeParagraphDialog Change-Id: I8c3b3c0f6c0cfe133e1ec8eda8c10bbbaee5f010 Reviewed-on: https://gerrit.libreoffice.org/60584 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx index 76a665775741..b203e13b3d7c 100644 --- a/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx +++ b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx @@ -30,11 +30,9 @@ using namespace ::com::sun::star; namespace chart { -ShapeParagraphDialog::ShapeParagraphDialog(vcl::Window* pParent, +ShapeParagraphDialog::ShapeParagraphDialog(weld::Window* pParent, const SfxItemSet* pAttr) - : SfxTabDialog(pParent, "ParagraphDialog", - "modules/schart/ui/paradialog.ui", pAttr) - , m_nTabPageId(0) + : SfxTabDialogController(pParent, "modules/schart/ui/paradialog.ui", "ParagraphDialog", pAttr) { SvtCJKOptions aCJKOptions; @@ -48,12 +46,12 @@ ShapeParagraphDialog::ShapeParagraphDialog(vcl::Window* pParent, { RemoveTabPage("labelTP_PARA_ASIAN"); } - m_nTabPageId = AddTabPage("labelTP_TABULATOR", RID_SVXPAGE_TABULATOR); + AddTabPage("labelTP_TABULATOR", RID_SVXPAGE_TABULATOR); } -void ShapeParagraphDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage ) +void ShapeParagraphDialog::PageCreated(const OString& rId, SfxTabPage& rPage) { - if (nId == m_nTabPageId) + if (rId == "labelTP_TABULATOR") { SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) ); TabulatorDisableFlags const nFlags(( TabulatorDisableFlags::TypeMask &~TabulatorDisableFlags::TypeLeft ) | diff --git a/chart2/source/controller/inc/dlg_ShapeParagraph.hxx b/chart2/source/controller/inc/dlg_ShapeParagraph.hxx index d47d7098c729..14fbf5f0cc8c 100644 --- a/chart2/source/controller/inc/dlg_ShapeParagraph.hxx +++ b/chart2/source/controller/inc/dlg_ShapeParagraph.hxx @@ -26,13 +26,12 @@ namespace chart /** dialog for paragraph properties of shapes */ -class ShapeParagraphDialog : public SfxTabDialog +class ShapeParagraphDialog : public SfxTabDialogController { public: - ShapeParagraphDialog(vcl::Window* pParent, const SfxItemSet* pAttr); + ShapeParagraphDialog(weld::Window* pParent, const SfxItemSet* pAttr); private: - virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage) override; - sal_uInt16 m_nTabPageId; + virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override; }; } // namespace chart diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx index 04683e058481..1c082d84505b 100644 --- a/chart2/source/controller/main/ShapeController.cxx +++ b/chart2/source/controller/main/ShapeController.cxx @@ -547,10 +547,10 @@ void ShapeController::executeDispatch_ParagraphDialog() aNewAttr.Put( SvxWidowsItem( 0, SID_ATTR_PARA_WIDOWS) ); aNewAttr.Put( SvxOrphansItem( 0, SID_ATTR_PARA_ORPHANS) ); - ScopedVclPtrInstance< ShapeParagraphDialog > pDlg( pChartWindow, &aNewAttr ); - if ( pDlg->Execute() == RET_OK ) + ShapeParagraphDialog aDlg(pChartWindow->GetFrameWeld(), &aNewAttr); + if (aDlg.execute() == RET_OK) { - const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet(); + const SfxItemSet* pOutAttr = aDlg.GetOutputItemSet(); pDrawViewWrapper->SetAttributes( *pOutAttr ); } } diff --git a/chart2/uiconfig/ui/paradialog.ui b/chart2/uiconfig/ui/paradialog.ui index f32fc5fa68d6..5e89c680dd44 100644 --- a/chart2/uiconfig/ui/paradialog.ui +++ b/chart2/uiconfig/ui/paradialog.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="chart"> <requires lib="gtk+" version="3.18"/> <object class="GtkDialog" id="ParagraphDialog"> @@ -7,6 +7,9 @@ <property name="border_width">6</property> <property name="title" translatable="yes" context="paradialog|ParagraphDialog">Paragraph</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> @@ -17,12 +20,10 @@ <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="reset"> + <property name="label">gtk-revert-to-saved</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> @@ -33,10 +34,12 @@ </packing> </child> <child> - <object class="GtkButton" id="cancel"> - <property name="label">gtk-cancel</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> @@ -47,8 +50,8 @@ </packing> </child> <child> - <object class="GtkButton" id="help"> - <property name="label">gtk-help</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> @@ -58,12 +61,11 @@ <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="help"> + <property name="label">gtk-help</property> <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> @@ -73,6 +75,7 @@ <property name="expand">False</property> <property name="fill">True</property> <property name="position">3</property> + <property name="secondary">True</property> </packing> </child> </object> @@ -86,9 +89,10 @@ <child> <object class="GtkNotebook" id="tabcontrol"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can_focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> + <property name="scrollable">True</property> <child> <object class="GtkGrid"> <property name="visible">True</property> @@ -96,6 +100,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"> @@ -115,6 +143,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> @@ -139,6 +191,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> @@ -162,6 +238,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> @@ -188,10 +288,10 @@ </object> </child> <action-widgets> + <action-widget response="0">reset</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-widgets> </object> </interface> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits