cui/source/tabpages/align.cxx | 2 dbaccess/source/ui/dlg/dlgattr.cxx | 18 ++----- dbaccess/source/ui/inc/dlgattr.hxx | 8 +-- dbaccess/source/ui/misc/UITools.cxx | 8 +-- dbaccess/uiconfig/ui/fielddialog.ui | 85 +++++++++++++++++++++++++++++------- 5 files changed, 84 insertions(+), 37 deletions(-)
New commits: commit d54599561bb1736649d796bb30a60522a64a04c3 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Oct 3 21:29:08 2018 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Oct 4 09:57:03 2018 +0200 weld SbaSbAttrDlg Change-Id: Ic1478d92fcf829bebdf8ada1051a4373d47077cf Reviewed-on: https://gerrit.libreoffice.org/61330 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx index 8832ec7df80c..76581331f0a5 100644 --- a/cui/source/tabpages/align.cxx +++ b/cui/source/tabpages/align.cxx @@ -406,6 +406,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs) { case SfxItemState::UNKNOWN: m_xEdIndent->hide(); + m_xFtIndent->hide(); break; case SfxItemState::DISABLED: case SfxItemState::READONLY: @@ -429,6 +430,7 @@ void AlignmentTabPage::Reset(const SfxItemSet* pCoreAttrs) { case SfxItemState::UNKNOWN: m_xLbVerAlign->hide(); + m_xFtVerAlign->hide(); break; case SfxItemState::DISABLED: case SfxItemState::READONLY: diff --git a/dbaccess/source/ui/dlg/dlgattr.cxx b/dbaccess/source/ui/dlg/dlgattr.cxx index d2c3031b72ee..52b3797c69bc 100644 --- a/dbaccess/source/ui/dlg/dlgattr.cxx +++ b/dbaccess/source/ui/dlg/dlgattr.cxx @@ -33,15 +33,14 @@ using namespace dbaui; -SbaSbAttrDlg::SbaSbAttrDlg(vcl::Window* pParent, const SfxItemSet* pCellAttrs, +SbaSbAttrDlg::SbaSbAttrDlg(weld::Window* pParent, const SfxItemSet* pCellAttrs, SvNumberFormatter* pFormatter, bool bHasFormat) - : SfxTabDialog(pParent, "FieldDialog", "dbaccess/ui/fielddialog.ui", pCellAttrs) - , m_nNumberFormatId(0) + : SfxTabDialogController(pParent, "dbaccess/ui/fielddialog.ui", "FieldDialog", pCellAttrs) { pNumberInfoItem.reset( new SvxNumberInfoItem( pFormatter, 0 ) ); if (bHasFormat) - m_nNumberFormatId = AddTabPage("format", RID_SVXPAGE_NUMBERFORMAT); + AddTabPage("format", RID_SVXPAGE_NUMBERFORMAT); else RemoveTabPage("format"); AddTabPage("alignment", RID_SVXPAGE_ALIGNMENT); @@ -49,19 +48,12 @@ SbaSbAttrDlg::SbaSbAttrDlg(vcl::Window* pParent, const SfxItemSet* pCellAttrs, SbaSbAttrDlg::~SbaSbAttrDlg() { - disposeOnce(); } -void SbaSbAttrDlg::dispose() -{ - pNumberInfoItem.reset(); - SfxTabDialog::dispose(); -} - -void SbaSbAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) +void SbaSbAttrDlg::PageCreated(const OString& rPageId, SfxTabPage& rTabPage) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); - if (nPageId == m_nNumberFormatId) + if (rPageId == "format") { aSet.Put (SvxNumberInfoItem( pNumberInfoItem->GetNumberFormatter(), static_cast<sal_uInt16>(SID_ATTR_NUMBERFORMAT_INFO))); rTabPage.PageCreated(aSet); diff --git a/dbaccess/source/ui/inc/dlgattr.hxx b/dbaccess/source/ui/inc/dlgattr.hxx index 1a10d63ace86..6be420776208 100644 --- a/dbaccess/source/ui/inc/dlgattr.hxx +++ b/dbaccess/source/ui/inc/dlgattr.hxx @@ -27,17 +27,15 @@ class SvNumberFormatter; namespace dbaui { - class SbaSbAttrDlg : public SfxTabDialog + class SbaSbAttrDlg : public SfxTabDialogController { std::unique_ptr<SvxNumberInfoItem> pNumberInfoItem; - sal_uInt32 m_nNumberFormatId; public: - SbaSbAttrDlg(vcl::Window * pParent, const SfxItemSet*, SvNumberFormatter*, bool bHasFormat); + SbaSbAttrDlg(weld::Window * pParent, const SfxItemSet*, SvNumberFormatter*, bool bHasFormat); virtual ~SbaSbAttrDlg() override; - virtual void dispose() override; - virtual void PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) override; + virtual void PageCreated(const OString& rPageId, SfxTabPage& rTabPage) override; }; } // namespace dbaui diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index d66fa16ebfc9..78e1347d5161 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -845,12 +845,12 @@ bool callColumnFormatDialog(vcl::Window* _pParent, } { // want the dialog to be destroyed before our set - ScopedVclPtrInstance< SbaSbAttrDlg > aDlg(_pParent, pFormatDescriptor.get(), _pFormatter, _bHasFormat); - if (RET_OK == aDlg->Execute()) + SbaSbAttrDlg aDlg(_pParent->GetFrameWeld(), pFormatDescriptor.get(), _pFormatter, _bHasFormat); + if (RET_OK == aDlg.execute()) { // ItemSet->UNO // UNO-properties - const SfxItemSet* pSet = aDlg->GetExampleSet(); + const SfxItemSet* pSet = aDlg.GetExampleSet(); // (of course we could put the modified items directly into the column, but then the UNO-model // won't reflect these changes, and why do we have a model, then ?) @@ -868,7 +868,7 @@ bool callColumnFormatDialog(vcl::Window* _pParent, bRet = true; } // deleted formats - const SfxItemSet* pResult = aDlg->GetOutputItemSet(); + const SfxItemSet* pResult = aDlg.GetOutputItemSet(); if (pResult) { const SfxPoolItem* pItem = pResult->GetItem( SID_ATTR_NUMBERFORMAT_INFO ); diff --git a/dbaccess/uiconfig/ui/fielddialog.ui b/dbaccess/uiconfig/ui/fielddialog.ui index e77753f1a804..37f07d994865 100644 --- a/dbaccess/uiconfig/ui/fielddialog.ui +++ b/dbaccess/uiconfig/ui/fielddialog.ui @@ -1,13 +1,20 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.20.0 --> +<!-- Generated with glade 3.22.1 --> <interface domain="dba"> <requires lib="gtk+" version="3.18"/> <object class="GtkDialog" id="FieldDialog"> + <property name="name">-1</property> <property name="can_focus">False</property> <property name="border_width">6</property> <property name="title" translatable="yes" context="fielddialog|FieldDialog">Field Format</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,12 +25,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> @@ -34,10 +39,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> @@ -48,8 +55,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> @@ -59,12 +66,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> @@ -74,6 +80,7 @@ <property name="expand">False</property> <property name="fill">True</property> <property name="position">3</property> + <property name="secondary">True</property> </packing> </child> </object> @@ -104,6 +111,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"> @@ -123,6 +154,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> @@ -142,7 +197,7 @@ </child> </object> <packing> - <property name="expand">False</property> + <property name="expand">True</property> <property name="fill">True</property> <property name="position">0</property> </packing> @@ -161,7 +216,7 @@ </child> </object> <packing> - <property name="expand">False</property> + <property name="expand">True</property> <property name="fill">True</property> <property name="position">1</property> </packing> @@ -169,10 +224,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