summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
Diffstat (limited to 'cui')
-rw-r--r--cui/source/factory/dlgfact.cxx49
-rw-r--r--cui/source/factory/dlgfact.hxx8
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,