From 1766de5a5e0c831127e735b60e46e32b984c524f Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 15 Jul 2013 15:26:38 +0100 Subject: can drop RID_SFXDLG_NEWDICT Change-Id: I15d1669a870f991ae4c8428838b22c33a2c021f0 --- cui/source/factory/dlgfact.cxx | 18 +++--------------- cui/source/factory/dlgfact.hxx | 3 +-- cui/source/options/optlingu.cxx | 2 +- cui/uiconfig/ui/optnewdictionarydialog.ui | 3 ++- include/sfx2/sfx.hrc | 1 - include/svx/svxdlg.hxx | 3 +-- 6 files changed, 8 insertions(+), 22 deletions(-) diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 1bc939928a4b..94a7a16f953c 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1420,22 +1420,10 @@ AbstractFmInputRecordNoDialog * AbstractDialogFactory_Impl::CreateFmInputRecordN } AbstractSvxNewDictionaryDialog * AbstractDialogFactory_Impl::CreateSvxNewDictionaryDialog( Window* pParent, - ::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xSpl, - sal_uInt32 nResId ) + ::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xSpl ) { - SvxNewDictionaryDialog* pDlg=NULL; - switch ( nResId ) - { - case RID_SFXDLG_NEWDICT : - pDlg = new SvxNewDictionaryDialog( pParent, xSpl ); - break; - default: - break; - } - - if ( pDlg ) - return new AbstractSvxNewDictionaryDialog_Impl( pDlg ); - return 0; + SvxNewDictionaryDialog* pDlg = new SvxNewDictionaryDialog( pParent, xSpl ); + return new AbstractSvxNewDictionaryDialog_Impl( pDlg ); } VclAbstractDialog* AbstractDialogFactory_Impl::CreateSvxEditDictionaryDialog( Window* pParent, diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 34c4913e2900..4c36e8185f97 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -692,8 +692,7 @@ public: sal_Int32 nInitialFlags); virtual AbstractFmInputRecordNoDialog * CreateFmInputRecordNoDialog( Window* pParent ); virtual AbstractSvxNewDictionaryDialog* CreateSvxNewDictionaryDialog( Window* pParent, - ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xSpl, - sal_uInt32 nResId ); //add for SvxNewDictionaryDialog + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xSpl ); virtual VclAbstractDialog * CreateSvxEditDictionaryDialog( Window* pParent, const String& rName, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1> &xSpl, diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index b0d050d8e7a8..0c30fea717c3 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1651,7 +1651,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, PushButton *, pBtn ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - AbstractSvxNewDictionaryDialog* aDlg = pFact->CreateSvxNewDictionaryDialog( this, xSpellChecker1, RID_SFXDLG_NEWDICT ); + AbstractSvxNewDictionaryDialog* aDlg = pFact->CreateSvxNewDictionaryDialog( this, xSpellChecker1 ); DBG_ASSERT(aDlg, "Dialogdiet fail!"); uno::Reference< XDictionary > xNewDic; if ( aDlg->Execute() == RET_OK ) diff --git a/cui/uiconfig/ui/optnewdictionarydialog.ui b/cui/uiconfig/ui/optnewdictionarydialog.ui index 643465d62f20..9158de3a7d00 100644 --- a/cui/uiconfig/ui/optnewdictionarydialog.ui +++ b/cui/uiconfig/ui/optnewdictionarydialog.ui @@ -23,7 +23,8 @@ gtk-ok True True - True + True + True True True diff --git a/include/sfx2/sfx.hrc b/include/sfx2/sfx.hrc index 7d1fc0a4a286..4044de203d71 100644 --- a/include/sfx2/sfx.hrc +++ b/include/sfx2/sfx.hrc @@ -222,7 +222,6 @@ #define RID_SFXPAGE_SAVE (RID_OPTIONS_START + 0) #define RID_SFXPAGE_GENERAL (RID_OPTIONS_START + 1) -#define RID_SFXDLG_NEWDICT (RID_OPTIONS_START + 3) #define RID_SFXDLG_EDITDICT (RID_OPTIONS_START + 4) #define RID_SFXQB_DELDICT (RID_OPTIONS_START + 5) #define RID_SFXPAGE_PATH (RID_OPTIONS_START + 6) diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx index fd8ced079923..a1b8f2d8b8ae 100644 --- a/include/svx/svxdlg.hxx +++ b/include/svx/svxdlg.hxx @@ -397,8 +397,7 @@ public: sal_Int32 nInitialFlags )=0; virtual AbstractFmInputRecordNoDialog * CreateFmInputRecordNoDialog( Window* pParent ) = 0; virtual AbstractSvxNewDictionaryDialog* CreateSvxNewDictionaryDialog( Window* pParent, - ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xSpl, - sal_uInt32 nResId ) = 0; //add for SvxNewDictionaryDialog + ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1 > &xSpl ) = 0; virtual VclAbstractDialog * CreateSvxEditDictionaryDialog( Window* pParent, const String& rName, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellChecker1> &xSpl, -- cgit