diff options
author | Noel Grandin <noel@peralex.com> | 2016-09-09 13:26:44 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-09-09 12:42:25 +0000 |
commit | 20c14c812ccc00692d42d294d3b8dea1774e3511 (patch) | |
tree | d48011cd869cf64069c84d1494f504f6f59b8ed1 /cui | |
parent | 9dc0f2b703d8fbc8698a3cf36949a981e55b68c6 (diff) |
loplugin:constantparam in sfx2
Change-Id: If5d401001abb7bf3fc642d47f537b57836e6d9c5
Reviewed-on: https://gerrit.libreoffice.org/28772
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 49 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.hxx | 8 |
2 files changed, 10 insertions, 47 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 2dac0259a46f..e732c7b28b48 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -861,54 +861,21 @@ VclAbstractDialog* AbstractDialogFactory_Impl::CreateFrameDialog( const Referenc } // TabDialog outside the drawing layer -SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTabDialog( sal_uInt32 nResId, - vcl::Window* pParent, - const SfxItemSet* pAttrSet, - SfxViewFrame* ) +SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateAutoCorrTabDialog( const SfxItemSet* pAttrSet ) { - SfxTabDialog* pDlg=nullptr; - switch ( nResId ) - { - case RID_OFA_AUTOCORR_DLG : - pDlg = VclPtr<OfaAutoCorrDlg>::Create( pParent, pAttrSet ); - break; - case RID_SVXDLG_CUSTOMIZE : - pDlg = VclPtr<SvxConfigDialog>::Create( pParent, pAttrSet ); - break; - default: - break; - } - - if ( pDlg ) - return new CuiAbstractTabDialog_Impl( pDlg ); - return nullptr; + VclPtrInstance<OfaAutoCorrDlg> pDlg( nullptr, pAttrSet ); + return new CuiAbstractTabDialog_Impl( pDlg ); } -SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTabDialog( sal_uInt32 nResId, - vcl::Window* pParent, +SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateCustomizeTabDialog( const SfxItemSet* pAttrSet, const Reference< frame::XFrame >& xViewFrame ) { VclPtr<SfxTabDialog> pDlg; - switch ( nResId ) - { - case RID_OFA_AUTOCORR_DLG : - pDlg = VclPtr<OfaAutoCorrDlg>::Create( pParent, pAttrSet ); - break; - case RID_SVXDLG_CUSTOMIZE : - { - VclPtrInstance<SvxConfigDialog> pDlg1( pParent, pAttrSet ); - pDlg1->SetFrame(xViewFrame); - pDlg.reset(pDlg1); - } - break; - default: - break; - } - - if ( pDlg ) - return new CuiAbstractTabDialog_Impl( pDlg ); - return nullptr; + VclPtrInstance<SvxConfigDialog> pDlg1( nullptr, pAttrSet ); + pDlg1->SetFrame(xViewFrame); + pDlg.reset(pDlg1); + return new CuiAbstractTabDialog_Impl( pDlg ); } // TabDialog that use functionality of the drawing layer diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 63d2a8dedb2e..ada887ed7a08 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -467,12 +467,8 @@ public: virtual VclAbstractDialog* CreateFrameDialog( const css::uno::Reference< css::frame::XFrame >& rxFrame, sal_uInt32 nResId, const OUString& rParameter ) override; - virtual SfxAbstractTabDialog* CreateTabDialog( sal_uInt32 nResId, - vcl::Window* pParent, - const SfxItemSet* pAttrSet, - SfxViewFrame* pViewFrame ) override; - virtual SfxAbstractTabDialog* CreateTabDialog( sal_uInt32 nResId, - vcl::Window* pParent, + virtual SfxAbstractTabDialog* CreateAutoCorrTabDialog( const SfxItemSet* pAttrSet ) override; + virtual SfxAbstractTabDialog* CreateCustomizeTabDialog( const SfxItemSet* pAttrSet, const css::uno::Reference< css::frame::XFrame >& xViewFrame ) override; virtual SfxAbstractTabDialog* CreateTextTabDialog( vcl::Window* pParent, |