diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-04-18 17:25:30 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-04-18 22:51:06 +0200 |
commit | b731d71c67b864b61f5c08e219140be59c473f53 (patch) | |
tree | 29f8a9f208e2e72b93389d5ee06d244599aefdc9 /sw | |
parent | 8c3ab6093afad91f7dcb7b674adb257be9530ca7 (diff) |
sfx2: Move InitInterface_Impl() method out of SFX_IMPL_INTERFACE.
SFX_IMPL_INTERFACE previously looked like a function; where in fact it is
several methods defined at once, and only the last one has a body.
This is extremely confusing and hard to read; let's kill that nonsense.
Change-Id: Ia4ae22eb58b1260c9c827c894f5345693bad49e7
Diffstat (limited to 'sw')
30 files changed, 70 insertions, 9 deletions
diff --git a/sw/source/core/uibase/app/apphdl.cxx b/sw/source/core/uibase/app/apphdl.cxx index fd517e832bc9..7fbdc2d70193 100644 --- a/sw/source/core/uibase/app/apphdl.cxx +++ b/sw/source/core/uibase/app/apphdl.cxx @@ -111,7 +111,9 @@ using namespace ::com::sun::star; #include <shells.hrc> -SFX_IMPL_INTERFACE( SwModule, SfxModule, SW_RES(RID_SW_NAME) ) +SFX_IMPL_INTERFACE(SwModule, SfxModule, SW_RES(RID_SW_NAME) ) + +void SwModule::InitInterface_Impl() { GetStaticInterface()->RegisterStatusBar(SW_RES(CFG_STATUSBAR)); diff --git a/sw/source/core/uibase/app/docsh.cxx b/sw/source/core/uibase/app/docsh.cxx index 58f176942d77..240c8ead1514 100644 --- a/sw/source/core/uibase/app/docsh.cxx +++ b/sw/source/core/uibase/app/docsh.cxx @@ -115,7 +115,9 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::script; using namespace ::com::sun::star::container; -SFX_IMPL_INTERFACE( SwDocShell, SfxObjectShell, SW_RES(0) ) +SFX_IMPL_INTERFACE(SwDocShell, SfxObjectShell, SW_RES(0) ) + +void SwDocShell::InitInterface_Impl() { } diff --git a/sw/source/core/uibase/misc/glshell.cxx b/sw/source/core/uibase/misc/glshell.cxx index e78ca093bc85..0f4d8693762d 100644 --- a/sw/source/core/uibase/misc/glshell.cxx +++ b/sw/source/core/uibase/misc/glshell.cxx @@ -53,11 +53,15 @@ using namespace ::com::sun::star; -SFX_IMPL_INTERFACE( SwGlosDocShell, SwDocShell, SW_RES(0) ) +SFX_IMPL_INTERFACE(SwGlosDocShell, SwDocShell, SW_RES(0) ) + +void SwGlosDocShell::InitInterface_Impl() { } -SFX_IMPL_INTERFACE( SwWebGlosDocShell, SwWebDocShell, SW_RES(0) ) +SFX_IMPL_INTERFACE(SwWebGlosDocShell, SwWebDocShell, SW_RES(0) ) + +void SwWebGlosDocShell::InitInterface_Impl() { } diff --git a/sw/source/core/uibase/shells/annotsh.cxx b/sw/source/core/uibase/shells/annotsh.cxx index eaba65bc2069..96faa5945cf9 100644 --- a/sw/source/core/uibase/shells/annotsh.cxx +++ b/sw/source/core/uibase/shells/annotsh.cxx @@ -137,6 +137,8 @@ using namespace ::com::sun::star::i18n; #include <swslots.hxx> SFX_IMPL_INTERFACE(SwAnnotationShell, SfxShell, SW_RES(STR_SHELLNAME_DRAW_TEXT)) + +void SwAnnotationShell::InitInterface_Impl() { GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_TEXT_TOOLBOX)); diff --git a/sw/source/core/uibase/shells/basesh.cxx b/sw/source/core/uibase/shells/basesh.cxx index e86ed00d1b47..dfcc17498ef6 100644 --- a/sw/source/core/uibase/shells/basesh.cxx +++ b/sw/source/core/uibase/shells/basesh.cxx @@ -143,6 +143,8 @@ using namespace ::com::sun::star::frame; using namespace ::com::sun::star::lang; SFX_IMPL_INTERFACE(SwBaseShell, SfxShell, SW_RES(0)) + +void SwBaseShell::InitInterface_Impl() { GetStaticInterface()->RegisterChildWindow(SvxIMapDlgChildWindow::GetChildWindowId()); GetStaticInterface()->RegisterChildWindow(SvxContourDlgChildWindow::GetChildWindowId()); diff --git a/sw/source/core/uibase/shells/beziersh.cxx b/sw/source/core/uibase/shells/beziersh.cxx index 8a42b1c0ce1f..3268ea5b36e6 100644 --- a/sw/source/core/uibase/shells/beziersh.cxx +++ b/sw/source/core/uibase/shells/beziersh.cxx @@ -44,6 +44,8 @@ #include <unomid.h> SFX_IMPL_INTERFACE(SwBezierShell, SwBaseShell, SW_RES(STR_SHELLNAME_BEZIER)) + +void SwBezierShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_DRAW_POPUPMENU)); diff --git a/sw/source/core/uibase/shells/drawsh.cxx b/sw/source/core/uibase/shells/drawsh.cxx index daabdc27b99c..2091c921d775 100644 --- a/sw/source/core/uibase/shells/drawsh.cxx +++ b/sw/source/core/uibase/shells/drawsh.cxx @@ -75,6 +75,8 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; SFX_IMPL_INTERFACE(SwDrawShell, SwDrawBaseShell, SW_RES(STR_SHELLNAME_DRAW)) + +void SwDrawShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_DRAW_POPUPMENU)); diff --git a/sw/source/core/uibase/shells/drformsh.cxx b/sw/source/core/uibase/shells/drformsh.cxx index 55ebc7bbba92..1c39b6837c20 100644 --- a/sw/source/core/uibase/shells/drformsh.cxx +++ b/sw/source/core/uibase/shells/drformsh.cxx @@ -58,6 +58,8 @@ using namespace ::com::sun::star; SFX_IMPL_INTERFACE(SwDrawFormShell, SwDrawBaseShell, SW_RES(STR_SHELLNAME_DRAWFORM)) + +void SwDrawFormShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_DRAWFORM_POPUPMENU)); diff --git a/sw/source/core/uibase/shells/drwbassh.cxx b/sw/source/core/uibase/shells/drwbassh.cxx index be1fea36e8d8..d8a7ee97559c 100644 --- a/sw/source/core/uibase/shells/drwbassh.cxx +++ b/sw/source/core/uibase/shells/drwbassh.cxx @@ -68,6 +68,8 @@ using namespace ::com::sun::star; SFX_IMPL_INTERFACE(SwDrawBaseShell, SwBaseShell, SW_RES(0)) + +void SwDrawBaseShell::InitInterface_Impl() { } diff --git a/sw/source/core/uibase/shells/drwtxtsh.cxx b/sw/source/core/uibase/shells/drwtxtsh.cxx index d4614dc032fa..99551ac9bc89 100644 --- a/sw/source/core/uibase/shells/drwtxtsh.cxx +++ b/sw/source/core/uibase/shells/drwtxtsh.cxx @@ -80,6 +80,8 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::i18n; SFX_IMPL_INTERFACE(SwDrawTextShell, SfxShell, SW_RES(STR_SHELLNAME_DRAW_TEXT)) + +void SwDrawTextShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_DRWTXT_POPUPMENU)); diff --git a/sw/source/core/uibase/shells/frmsh.cxx b/sw/source/core/uibase/shells/frmsh.cxx index f3e9615f00e4..b565dd9f09ce 100644 --- a/sw/source/core/uibase/shells/frmsh.cxx +++ b/sw/source/core/uibase/shells/frmsh.cxx @@ -105,6 +105,8 @@ static const SwFrmFmt* lcl_GetFrmFmtByName(SwWrtShell& rSh, const OUString& rNam #include "swslots.hxx" SFX_IMPL_INTERFACE(SwFrameShell, SwBaseShell, SW_RES(STR_SHELLNAME_FRAME)) + +void SwFrameShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_FRM_POPUPMENU)); diff --git a/sw/source/core/uibase/shells/grfsh.cxx b/sw/source/core/uibase/shells/grfsh.cxx index a75c61c34a71..d78af685d773 100644 --- a/sw/source/core/uibase/shells/grfsh.cxx +++ b/sw/source/core/uibase/shells/grfsh.cxx @@ -96,6 +96,8 @@ namespace } SFX_IMPL_INTERFACE(SwGrfShell, SwBaseShell, SW_RES(STR_SHELLNAME_GRAPHIC)) + +void SwGrfShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_GRF_POPUPMENU)); diff --git a/sw/source/core/uibase/shells/listsh.cxx b/sw/source/core/uibase/shells/listsh.cxx index 37bad349b695..6d2f7bd296ae 100644 --- a/sw/source/core/uibase/shells/listsh.cxx +++ b/sw/source/core/uibase/shells/listsh.cxx @@ -53,6 +53,8 @@ #include <IDocumentOutlineNodes.hxx> SFX_IMPL_INTERFACE(SwListShell, SwBaseShell, SW_RES(STR_SHELLNAME_LIST)) + +void SwListShell::InitInterface_Impl() { GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_NUM_TOOLBOX)); } diff --git a/sw/source/core/uibase/shells/mediash.cxx b/sw/source/core/uibase/shells/mediash.cxx index cc59d2e40dff..e5323f9c60a3 100644 --- a/sw/source/core/uibase/shells/mediash.cxx +++ b/sw/source/core/uibase/shells/mediash.cxx @@ -69,6 +69,8 @@ #include "swabstdlg.hxx" SFX_IMPL_INTERFACE(SwMediaShell, SwBaseShell, SW_RES(STR_SHELLNAME_MEDIA)) + +void SwMediaShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_MEDIA_POPUPMENU)); diff --git a/sw/source/core/uibase/shells/navsh.cxx b/sw/source/core/uibase/shells/navsh.cxx index c5a9199daa32..af68afaebc63 100644 --- a/sw/source/core/uibase/shells/navsh.cxx +++ b/sw/source/core/uibase/shells/navsh.cxx @@ -30,6 +30,8 @@ #include "navmgr.hxx" SFX_IMPL_INTERFACE(SwNavigationShell, SwBaseShell, SW_RES(STR_SHELLNAME_NAVIGATION)) + +void SwNavigationShell::InitInterface_Impl() { } diff --git a/sw/source/core/uibase/shells/olesh.cxx b/sw/source/core/uibase/shells/olesh.cxx index be3f3d3d0f84..a872e3a98ff1 100644 --- a/sw/source/core/uibase/shells/olesh.cxx +++ b/sw/source/core/uibase/shells/olesh.cxx @@ -38,6 +38,8 @@ #include <swslots.hxx> SFX_IMPL_INTERFACE(SwOleShell, SwFrameShell, SW_RES(STR_SHELLNAME_OBJECT)) + +void SwOleShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_OLE_POPUPMENU)); diff --git a/sw/source/core/uibase/shells/tabsh.cxx b/sw/source/core/uibase/shells/tabsh.cxx index 033ba9f78693..3fd9a853f63f 100644 --- a/sw/source/core/uibase/shells/tabsh.cxx +++ b/sw/source/core/uibase/shells/tabsh.cxx @@ -90,6 +90,8 @@ using ::editeng::SvxBorderLine; using namespace ::com::sun::star; SFX_IMPL_INTERFACE(SwTableShell, SwBaseShell, SW_RES(STR_SHELLNAME_TABLE)) + +void SwTableShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_TAB_POPUPMENU)); diff --git a/sw/source/core/uibase/shells/textsh.cxx b/sw/source/core/uibase/shells/textsh.cxx index 4f5f3b7cc1f5..0a8805b7ee2e 100644 --- a/sw/source/core/uibase/shells/textsh.cxx +++ b/sw/source/core/uibase/shells/textsh.cxx @@ -115,6 +115,8 @@ using namespace ::com::sun::star; #include <unomid.h> SFX_IMPL_INTERFACE(SwTextShell, SwBaseShell, SW_RES(STR_SHELLNAME_TEXT)) + +void SwTextShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_TEXT_POPUPMENU)); diff --git a/sw/source/core/uibase/uiview/pview.cxx b/sw/source/core/uibase/uiview/pview.cxx index d70878bfdcad..d34c0da3c15f 100644 --- a/sw/source/core/uibase/uiview/pview.cxx +++ b/sw/source/core/uibase/uiview/pview.cxx @@ -89,6 +89,8 @@ SFX_IMPL_NAMED_VIEWFACTORY(SwPagePreview, "PrintPreview") } SFX_IMPL_INTERFACE(SwPagePreview, SfxViewShell, SW_RES(RID_PVIEW_TOOLBOX)) + +void SwPagePreview::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_PPREVIEW_POPUPMENU)); diff --git a/sw/source/core/uibase/uiview/srcview.cxx b/sw/source/core/uibase/uiview/srcview.cxx index d7b589fca43a..156876e74902 100644 --- a/sw/source/core/uibase/uiview/srcview.cxx +++ b/sw/source/core/uibase/uiview/srcview.cxx @@ -112,7 +112,9 @@ SFX_IMPL_NAMED_VIEWFACTORY(SwSrcView, "SourceView") SFX_VIEW_REGISTRATION(SwWebDocShell); } -SFX_IMPL_INTERFACE( SwSrcView, SfxViewShell, SW_RES(0) ) +SFX_IMPL_INTERFACE(SwSrcView, SfxViewShell, SW_RES(0) ) + +void SwSrcView::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_SRCVIEW_POPUPMENU)); diff --git a/sw/source/core/uibase/uiview/view0.cxx b/sw/source/core/uibase/uiview/view0.cxx index 100619a0ee32..a13db11d95ec 100644 --- a/sw/source/core/uibase/uiview/view0.cxx +++ b/sw/source/core/uibase/uiview/view0.cxx @@ -88,7 +88,9 @@ SFX_IMPL_NAMED_VIEWFACTORY(SwView, "Default") } } -SFX_IMPL_INTERFACE( SwView, SfxViewShell, SW_RES(RID_TOOLS_TOOLBOX) ) +SFX_IMPL_INTERFACE(SwView, SfxViewShell, SW_RES(RID_TOOLS_TOOLBOX) ) + +void SwView::InitInterface_Impl() { GetStaticInterface()->RegisterChildWindow(SID_NAVIGATOR, true); diff --git a/sw/source/core/uibase/web/wdocsh.cxx b/sw/source/core/uibase/web/wdocsh.cxx index 12b47059b199..85101332066e 100644 --- a/sw/source/core/uibase/web/wdocsh.cxx +++ b/sw/source/core/uibase/web/wdocsh.cxx @@ -30,7 +30,6 @@ #include "swtypes.hxx" #include "shellio.hxx" -// just because of the itemtypes #include "wdocsh.hxx" #include "web.hrc" @@ -39,7 +38,9 @@ #include <unomid.h> -SFX_IMPL_INTERFACE( SwWebDocShell, SfxObjectShell, SW_RES(0) ) +SFX_IMPL_INTERFACE(SwWebDocShell, SfxObjectShell, SW_RES(0) ) + +void SwWebDocShell::InitInterface_Impl() { } diff --git a/sw/source/core/uibase/web/wformsh.cxx b/sw/source/core/uibase/web/wformsh.cxx index e112fd7c4742..be3b7b830757 100644 --- a/sw/source/core/uibase/web/wformsh.cxx +++ b/sw/source/core/uibase/web/wformsh.cxx @@ -37,6 +37,8 @@ #include "swslots.hxx" SFX_IMPL_INTERFACE(SwWebDrawFormShell, SwDrawFormShell, SW_RES(0)) + +void SwWebDrawFormShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_DRAWFORM_POPUPMENU)); diff --git a/sw/source/core/uibase/web/wfrmsh.cxx b/sw/source/core/uibase/web/wfrmsh.cxx index 795644c4c7d8..b28b57fe267b 100644 --- a/sw/source/core/uibase/web/wfrmsh.cxx +++ b/sw/source/core/uibase/web/wfrmsh.cxx @@ -36,6 +36,8 @@ #include "swslots.hxx" SFX_IMPL_INTERFACE(SwWebFrameShell, SwFrameShell, SW_RES(STR_SHELLNAME_WEBFRAME)) + +void SwWebFrameShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_FRM_POPUPMENU)); diff --git a/sw/source/core/uibase/web/wgrfsh.cxx b/sw/source/core/uibase/web/wgrfsh.cxx index 295ea3bd5984..b9fd9401d193 100644 --- a/sw/source/core/uibase/web/wgrfsh.cxx +++ b/sw/source/core/uibase/web/wgrfsh.cxx @@ -39,6 +39,8 @@ #include "swslots.hxx" SFX_IMPL_INTERFACE(SwWebGrfShell, SwGrfShell, SW_RES(STR_SHELLNAME_GRAPHIC)) + +void SwWebGrfShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_GRF_POPUPMENU)); diff --git a/sw/source/core/uibase/web/wlistsh.cxx b/sw/source/core/uibase/web/wlistsh.cxx index 1c42b209a89e..5d9e9c8a3f76 100644 --- a/sw/source/core/uibase/web/wlistsh.cxx +++ b/sw/source/core/uibase/web/wlistsh.cxx @@ -35,6 +35,8 @@ #include "swslots.hxx" SFX_IMPL_INTERFACE(SwWebListShell, SwListShell, SW_RES(STR_SHELLNAME_LIST)) + +void SwWebListShell::InitInterface_Impl() { GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_NUM_TOOLBOX)); } diff --git a/sw/source/core/uibase/web/wolesh.cxx b/sw/source/core/uibase/web/wolesh.cxx index 13143b205547..2a30b7ffa697 100644 --- a/sw/source/core/uibase/web/wolesh.cxx +++ b/sw/source/core/uibase/web/wolesh.cxx @@ -36,6 +36,8 @@ #include "swslots.hxx" SFX_IMPL_INTERFACE(SwWebOleShell, SwOleShell, SW_RES(STR_SHELLNAME_OBJECT)) + +void SwWebOleShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_OLE_POPUPMENU)); diff --git a/sw/source/core/uibase/web/wtabsh.cxx b/sw/source/core/uibase/web/wtabsh.cxx index 2d87bfce8b8f..013f2bbe169e 100644 --- a/sw/source/core/uibase/web/wtabsh.cxx +++ b/sw/source/core/uibase/web/wtabsh.cxx @@ -39,6 +39,8 @@ #include "swslots.hxx" SFX_IMPL_INTERFACE(SwWebTableShell, SwTableShell, SW_RES(STR_SHELLNAME_TABLE)) + +void SwWebTableShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_TAB_POPUPMENU)); diff --git a/sw/source/core/uibase/web/wtextsh.cxx b/sw/source/core/uibase/web/wtextsh.cxx index 031e9ad13f87..901a78f8c03c 100644 --- a/sw/source/core/uibase/web/wtextsh.cxx +++ b/sw/source/core/uibase/web/wtextsh.cxx @@ -42,6 +42,8 @@ #include "swslots.hxx" SFX_IMPL_INTERFACE(SwWebTextShell, SwBaseShell, SW_RES(STR_SHELLNAME_WEBTEXT)) + +void SwWebTextShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_TEXT_POPUPMENU)); diff --git a/sw/source/core/uibase/web/wview.cxx b/sw/source/core/uibase/web/wview.cxx index cb899a7ba24e..8c4eb4cb1108 100644 --- a/sw/source/core/uibase/web/wview.cxx +++ b/sw/source/core/uibase/web/wview.cxx @@ -72,7 +72,9 @@ SFX_IMPL_NAMED_VIEWFACTORY(SwWebView, "Default") SFX_VIEW_REGISTRATION(SwWebDocShell); } -SFX_IMPL_INTERFACE( SwWebView, SwView, SW_RES(RID_WEBTOOLS_TOOLBOX) ) +SFX_IMPL_INTERFACE(SwWebView, SwView, SW_RES(RID_WEBTOOLS_TOOLBOX) ) + +void SwWebView::InitInterface_Impl() { GetStaticInterface()->RegisterChildWindow(SfxTemplateDialogWrapper::GetChildWindowId()); GetStaticInterface()->RegisterChildWindow(SvxSearchDialogWrapper::GetChildWindowId()); |