chart2/source/controller/dialogs/dlg_ShapeFont.cxx | 19 +-- chart2/source/controller/inc/dlg_ShapeFont.hxx | 8 - chart2/source/controller/main/ShapeController.cxx | 6 - chart2/uiconfig/ui/chardialog.ui | 102 ++++++++++++++++++--- 4 files changed, 103 insertions(+), 32 deletions(-)
New commits: commit 230f67d958be212ab496c66d3a7ed96ca498f241 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Sep 17 12:40:04 2018 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Sep 18 10:06:08 2018 +0200 weld ShapeFontDialog Change-Id: I9df9dd3f2bfaedccb4a02681964544daf39f261e Reviewed-on: https://gerrit.libreoffice.org/60580 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/chart2/source/controller/dialogs/dlg_ShapeFont.cxx b/chart2/source/controller/dialogs/dlg_ShapeFont.cxx index fbc2afdb94f0..7b257b556b44 100644 --- a/chart2/source/controller/dialogs/dlg_ShapeFont.cxx +++ b/chart2/source/controller/dialogs/dlg_ShapeFont.cxx @@ -32,28 +32,25 @@ using namespace ::com::sun::star; namespace chart { -ShapeFontDialog::ShapeFontDialog( vcl::Window* pParent, const SfxItemSet* pAttr, - const ViewElementListProvider* pViewElementListProvider ) - : SfxTabDialog(pParent, "CharDialog", - "modules/schart/ui/chardialog.ui", pAttr) +ShapeFontDialog::ShapeFontDialog(weld::Window* pParent, const SfxItemSet* pAttr, + const ViewElementListProvider* pViewElementListProvider) + : SfxTabDialogController(pParent, "modules/schart/ui/chardialog.ui", "CharDialog", pAttr) , m_pViewElementListProvider(pViewElementListProvider) - , m_nNamePageId(0) - , m_nEffectsPageId(0) { - m_nNamePageId = AddTabPage("font", RID_SVXPAGE_CHAR_NAME); - m_nEffectsPageId = AddTabPage("fonteffects", RID_SVXPAGE_CHAR_EFFECTS); + AddTabPage("font", RID_SVXPAGE_CHAR_NAME); + AddTabPage("fonteffects", RID_SVXPAGE_CHAR_EFFECTS); AddTabPage("position", RID_SVXPAGE_CHAR_POSITION ); } -void ShapeFontDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage ) +void ShapeFontDialog::PageCreated(const OString& rId, SfxTabPage& rPage) { SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) ); - if (nId == m_nNamePageId) + if (rId == "font") { aSet.Put( SvxFontListItem( m_pViewElementListProvider->getFontList(), SID_ATTR_CHAR_FONTLIST ) ); rPage.PageCreated( aSet ); } - else if (nId == m_nEffectsPageId) + else if (rId == "fonteffects") { aSet.Put( SfxUInt16Item( SID_DISABLE_CTL, DISABLE_CASEMAP ) ); rPage.PageCreated( aSet ); diff --git a/chart2/source/controller/inc/dlg_ShapeFont.hxx b/chart2/source/controller/inc/dlg_ShapeFont.hxx index 233015d560de..21abdcd17dea 100644 --- a/chart2/source/controller/inc/dlg_ShapeFont.hxx +++ b/chart2/source/controller/inc/dlg_ShapeFont.hxx @@ -28,17 +28,15 @@ class ViewElementListProvider; /** dialog for font properties of shapes */ -class ShapeFontDialog : public SfxTabDialog +class ShapeFontDialog : public SfxTabDialogController { public: - ShapeFontDialog(vcl::Window* pParent, const SfxItemSet* pAttr, + ShapeFontDialog(weld::Window* pParent, const SfxItemSet* pAttr, const ViewElementListProvider* pViewElementListProvider); private: - virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage) override; + virtual void PageCreated(const OString& rId, SfxTabPage& rPage) override; const ViewElementListProvider* m_pViewElementListProvider; - sal_uInt16 m_nNamePageId; - sal_uInt16 m_nEffectsPageId; }; } // namespace chart diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx index 32708238c1fc..04683e058481 100644 --- a/chart2/source/controller/main/ShapeController.cxx +++ b/chart2/source/controller/main/ShapeController.cxx @@ -512,10 +512,10 @@ void ShapeController::executeDispatch_FontDialog() SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() ); pDrawViewWrapper->GetAttributes( aAttr ); ViewElementListProvider aViewElementListProvider( pDrawModelWrapper ); - ScopedVclPtrInstance< ShapeFontDialog > pDlg( pChartWindow, &aAttr, &aViewElementListProvider ); - if ( pDlg->Execute() == RET_OK ) + ShapeFontDialog aDlg(pChartWindow->GetFrameWeld(), &aAttr, &aViewElementListProvider); + if (aDlg.execute() == RET_OK) { - const SfxItemSet* pOutAttr = pDlg->GetOutputItemSet(); + const SfxItemSet* pOutAttr = aDlg.GetOutputItemSet(); pDrawViewWrapper->SetAttributes( *pOutAttr ); } } diff --git a/chart2/uiconfig/ui/chardialog.ui b/chart2/uiconfig/ui/chardialog.ui index 75f73e6db10e..fb7bfc1211b5 100644 --- a/chart2/uiconfig/ui/chardialog.ui +++ b/chart2/uiconfig/ui/chardialog.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="CharDialog"> @@ -7,6 +7,9 @@ <property name="border_width">6</property> <property name="title" translatable="yes" context="chardialog|CharDialog">Character</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> @@ -89,6 +92,7 @@ <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> @@ -138,6 +190,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> @@ -164,10 +240,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