summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/swabstdlg.hxx7
-rw-r--r--sw/source/ui/app/applab.cxx2
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx40
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx7
-rw-r--r--sw/source/ui/dochdl/gloshdl.cxx5
-rw-r--r--sw/source/ui/ribbar/workctrl.cxx2
-rw-r--r--sw/source/ui/shells/textglos.cxx6
7 files changed, 21 insertions, 48 deletions
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index d8d214895c2c..19cb943db62d 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -407,8 +407,7 @@ public:
sal_uInt16 nPageId = 0,
SwWrtShell* pActShell = 0,
sal_Bool bNew = sal_False ) = 0; //add for SwTemplateDlg
- virtual AbstractGlossaryDlg* CreateGlossaryDlg( int nResId,
- SfxViewFrame* pViewFrame,
+ virtual AbstractGlossaryDlg* CreateGlossaryDlg(SfxViewFrame* pViewFrame,
SwGlossaryHdl* pGlosHdl,
SwWrtShell *pWrtShell) = 0; //add for SwGlossaryDlg
virtual AbstractFldInputDlg* CreateFldInputDlg( int nResId,
@@ -464,8 +463,8 @@ public:
virtual AbstractMailMergeWizard* CreateMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rConfigItem) = 0;
//add for static func in SwGlossaryDlg
- virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc( sal_uInt16 nId ) = 0;
- virtual GlossarySetActGroup SetGlossaryActGroupFunc( sal_uInt16 nId ) = 0;
+ virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc() = 0;
+ virtual GlossarySetActGroup SetGlossaryActGroupFunc() = 0;
// for tabpage
virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) = 0;
diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx
index 689c760280d9..5972421d0321 100644
--- a/sw/source/ui/app/applab.cxx
+++ b/sw/source/ui/app/applab.cxx
@@ -105,7 +105,7 @@ static const SwFrmFmt *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
- ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
+ ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc();
if ( fnSetActGroup )
(*fnSetActGroup)( rItem.sGlossaryGroup );
SwGlossaryHdl* pGlosHdl = rSh.GetView().GetGlosHdl();
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 6d766bff79ff..fb7a53c7a3d2 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -1061,23 +1061,12 @@ SfxAbstractApplyTabDialog* SwAbstractDialogFactory_Impl::CreateTemplateDialog(
return new AbstractApplyTabDialog_Impl( pDlg );
}
-AbstractGlossaryDlg* SwAbstractDialogFactory_Impl::CreateGlossaryDlg( int nResId,
- SfxViewFrame* pViewFrame,
+AbstractGlossaryDlg* SwAbstractDialogFactory_Impl::CreateGlossaryDlg(SfxViewFrame* pViewFrame,
SwGlossaryHdl* pGlosHdl,
SwWrtShell *pWrtShell) //add for SwGlossaryDlg
{
- SwGlossaryDlg* pDlg=NULL;
- switch ( nResId )
- {
- case DLG_RENAME_GLOS :
- pDlg = new SwGlossaryDlg( pViewFrame, pGlosHdl, pWrtShell );
- break;
- default:
- break;
- }
- if ( pDlg )
- return new AbstractGlossaryDlg_Impl( pDlg );
- return 0;
+ SwGlossaryDlg* pDlg = new SwGlossaryDlg(pViewFrame, pGlosHdl, pWrtShell);
+ return new AbstractGlossaryDlg_Impl( pDlg );
}
AbstractFldInputDlg* SwAbstractDialogFactory_Impl::CreateFldInputDlg( int nResId,
@@ -1319,27 +1308,14 @@ AbstractMailMergeWizard* SwAbstractDialogFactory_Impl::CreateMailMergeWizard(
}
//add for static func in SwGlossaryDlg
-GlossaryGetCurrGroup SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc( sal_uInt16 nId )
+GlossaryGetCurrGroup SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc()
{
- switch ( nId )
- {
- case DLG_RENAME_GLOS :
- return SwGlossaryDlg::GetCurrGroup;
- default:
- break;
- }
- return 0;
+ return SwGlossaryDlg::GetCurrGroup;
}
-GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc( sal_uInt16 nId )
+
+GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc()
{
- switch ( nId )
- {
- case DLG_RENAME_GLOS :
- return SwGlossaryDlg::SetActGroup;
- default:
- break;
- }
- return 0;
+ return SwGlossaryDlg::SetActGroup;
}
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index da283f2e4481..9b681008e0f2 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -506,8 +506,7 @@ public:
sal_uInt16 nPageId = 0,
SwWrtShell* pActShell = 0,
sal_Bool bNew = sal_False ); //add for SwTemplateDlg
- virtual AbstractGlossaryDlg* CreateGlossaryDlg( int nResId,
- SfxViewFrame* pViewFrame,
+ virtual AbstractGlossaryDlg* CreateGlossaryDlg(SfxViewFrame* pViewFrame,
SwGlossaryHdl* pGlosHdl,
SwWrtShell *pWrtShell); //add for SwGlossaryDlg
virtual AbstractFldInputDlg* CreateFldInputDlg( int nResId,
@@ -563,8 +562,8 @@ public:
virtual AbstractMailMergeWizard* CreateMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rConfigItem);
//add for static func in SwGlossaryDlg
- virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc( sal_uInt16 nId );
- virtual GlossarySetActGroup SetGlossaryActGroupFunc( sal_uInt16 nId );
+ virtual GlossaryGetCurrGroup GetGlossaryCurrGroupFunc();
+ virtual GlossarySetActGroup SetGlossaryActGroupFunc();
// For TabPage
virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId );
diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx
index 09925ec98238..4253cf763537 100644
--- a/sw/source/ui/dochdl/gloshdl.cxx
+++ b/sw/source/ui/dochdl/gloshdl.cxx
@@ -79,8 +79,7 @@ void SwGlossaryHdl::GlossaryDlg()
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
- AbstractGlossaryDlg* pDlg = pFact->CreateGlossaryDlg( DLG_RENAME_GLOS,
- pViewFrame, this, pWrtShell);
+ AbstractGlossaryDlg* pDlg = pFact->CreateGlossaryDlg(pViewFrame, this, pWrtShell);
OSL_ENSURE(pDlg, "Dialogdiet fail!");
String sName, sShortName;
@@ -370,7 +369,7 @@ sal_Bool SwGlossaryHdl::ExpandGlossary()
SwTextBlocks *pGlossary;
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
- ::GlossaryGetCurrGroup fnGetCurrGroup = pFact->GetGlossaryCurrGroupFunc( DLG_RENAME_GLOS );
+ ::GlossaryGetCurrGroup fnGetCurrGroup = pFact->GetGlossaryCurrGroupFunc();
OSL_ENSURE(fnGetCurrGroup, "Dialogdiet fail!");
String sGroupName( (*fnGetCurrGroup)() );
if(STRING_NOTFOUND == sGroupName.Search(GLOS_DELIM))
diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx
index 8c3920345904..11a6fe86416c 100644
--- a/sw/source/ui/ribbar/workctrl.cxx
+++ b/sw/source/ui/ribbar/workctrl.cxx
@@ -308,7 +308,7 @@ IMPL_LINK(SwTbxAutoTextCtrl, PopupHdl, PopupMenu*, pMenu)
SwGlossaryHdl* pGlosHdl = pView->GetGlosHdl();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
- ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
+ ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc();
if ( fnSetActGroup )
(*fnSetActGroup)( sGroup );
pGlosHdl->SetCurGroup(sGroup, sal_True);
diff --git a/sw/source/ui/shells/textglos.cxx b/sw/source/ui/shells/textglos.cxx
index c48690b3b05b..fc981f177238 100644
--- a/sw/source/ui/shells/textglos.cxx
+++ b/sw/source/ui/shells/textglos.cxx
@@ -74,7 +74,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
- ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
+ ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc();
if ( fnSetActGroup )
(*fnSetActGroup)( aGroup );
pGlosHdl->SetCurGroup(aGroup, sal_True);
@@ -90,7 +90,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
String aGroup = (( const SfxStringItem *)pItem)->GetValue();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
- ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
+ ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc();
if ( fnSetActGroup )
(*fnSetActGroup)( aGroup );
rReq.Done();
@@ -106,7 +106,7 @@ void SwTextShell::ExecGlossary(SfxRequest &rReq)
aName = (( const SfxStringItem *)pItem)->GetValue();
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialogdiet fail!");
- ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc( DLG_RENAME_GLOS );
+ ::GlossarySetActGroup fnSetActGroup = pFact->SetGlossaryActGroupFunc();
if ( fnSetActGroup )
(*fnSetActGroup)( aGroup );
pGlosHdl->SetCurGroup(aGroup, sal_True);