diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-10-03 21:29:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-10-04 09:57:03 +0200 |
commit | d54599561bb1736649d796bb30a60522a64a04c3 (patch) | |
tree | adc0b8a0e18a368e2bd61c39bc18da2a94e3c52f /dbaccess/source/ui/dlg/dlgattr.cxx | |
parent | fd5e9b1eb383e380d7eef4d168f2f5f85d2ab819 (diff) |
weld SbaSbAttrDlg
Change-Id: Ic1478d92fcf829bebdf8ada1051a4373d47077cf
Reviewed-on: https://gerrit.libreoffice.org/61330
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess/source/ui/dlg/dlgattr.cxx')
-rw-r--r-- | dbaccess/source/ui/dlg/dlgattr.cxx | 18 |
1 files changed, 5 insertions, 13 deletions
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); |