From b731d71c67b864b61f5c08e219140be59c473f53 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Fri, 18 Apr 2014 17:25:30 +0200 Subject: 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 --- sc/source/ui/drawfunc/chartsh.cxx | 4 +++- sc/source/ui/drawfunc/drawsh.cxx | 5 +++-- sc/source/ui/drawfunc/drformsh.cxx | 4 +++- sc/source/ui/drawfunc/drtxtob.cxx | 4 ++-- sc/source/ui/drawfunc/graphsh.cxx | 4 +++- sc/source/ui/drawfunc/mediash.cxx | 4 +++- sc/source/ui/drawfunc/oleobjsh.cxx | 4 +++- 7 files changed, 20 insertions(+), 9 deletions(-) (limited to 'sc/source/ui/drawfunc') diff --git a/sc/source/ui/drawfunc/chartsh.cxx b/sc/source/ui/drawfunc/chartsh.cxx index 396264e3925a..59072eac484f 100644 --- a/sc/source/ui/drawfunc/chartsh.cxx +++ b/sc/source/ui/drawfunc/chartsh.cxx @@ -45,7 +45,9 @@ using namespace css::uno; namespace drawing = com::sun::star::drawing; -SFX_IMPL_INTERFACE(ScChartShell, ScDrawShell, ScResId(SCSTR_CHARTSHELL) ) +SFX_IMPL_INTERFACE(ScChartShell, ScDrawShell, ScResId(SCSTR_CHARTSHELL)) + +void ScChartShell::InitInterface_Impl() { GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_SERVER, ScResId(RID_DRAW_OBJECTBAR)); diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index 0960af4b47a1..8a082c06aaef 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -61,7 +61,9 @@ TYPEINIT1( ScDrawShell, SfxShell ); -SFX_IMPL_INTERFACE(ScDrawShell, SfxShell, ScResId(SCSTR_DRAWSHELL) ) +SFX_IMPL_INTERFACE(ScDrawShell, SfxShell, ScResId(SCSTR_DRAWSHELL)) + +void ScDrawShell::InitInterface_Impl() { GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER, ScResId(RID_DRAW_OBJECTBAR)); @@ -71,7 +73,6 @@ SFX_IMPL_INTERFACE(ScDrawShell, SfxShell, ScResId(SCSTR_DRAWSHELL) ) GetStaticInterface()->RegisterChildWindow(SvxFontWorkChildWindow::GetChildWindowId()); } - // abschalten der nicht erwuenschten Acceleratoren: void ScDrawShell::StateDisableItems( SfxItemSet &rSet ) diff --git a/sc/source/ui/drawfunc/drformsh.cxx b/sc/source/ui/drawfunc/drformsh.cxx index 754b668c9a88..6842f494f750 100644 --- a/sc/source/ui/drawfunc/drformsh.cxx +++ b/sc/source/ui/drawfunc/drformsh.cxx @@ -41,7 +41,9 @@ #include "scslots.hxx" -SFX_IMPL_INTERFACE(ScDrawFormShell, ScDrawShell, ScResId(SCSTR_DRAWFORMSHELL) ) +SFX_IMPL_INTERFACE(ScDrawFormShell, ScDrawShell, ScResId(SCSTR_DRAWFORMSHELL)) + +void ScDrawFormShell::InitInterface_Impl() { GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER, ScResId(RID_OBJECTBAR_FORMAT)); diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index ef800d70ad84..9101591b3ef5 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -76,11 +76,11 @@ #define ScDrawTextObjectBar #include "scslots.hxx" - using namespace ::com::sun::star; +SFX_IMPL_INTERFACE(ScDrawTextObjectBar, SfxShell, ScResId(SCSTR_DRAWTEXTSHELL)) -SFX_IMPL_INTERFACE( ScDrawTextObjectBar, SfxShell, ScResId(SCSTR_DRAWTEXTSHELL) ) +void ScDrawTextObjectBar::InitInterface_Impl() { GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER, ScResId(RID_TEXT_TOOLBOX)); diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx index bb2d6273a0a4..6f48256a79e5 100644 --- a/sc/source/ui/drawfunc/graphsh.cxx +++ b/sc/source/ui/drawfunc/graphsh.cxx @@ -64,7 +64,9 @@ public: } }; -SFX_IMPL_INTERFACE(ScGraphicShell, ScDrawShell, ScResId(SCSTR_GRAPHICSHELL) ) +SFX_IMPL_INTERFACE(ScGraphicShell, ScDrawShell, ScResId(SCSTR_GRAPHICSHELL)) + +void ScGraphicShell::InitInterface_Impl() { GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER, ScResId(RID_GRAPHIC_OBJECTBAR)); diff --git a/sc/source/ui/drawfunc/mediash.cxx b/sc/source/ui/drawfunc/mediash.cxx index d8bb003dead6..ac8ef7f6ebd5 100644 --- a/sc/source/ui/drawfunc/mediash.cxx +++ b/sc/source/ui/drawfunc/mediash.cxx @@ -36,7 +36,9 @@ #define ScMediaShell #include "scslots.hxx" -SFX_IMPL_INTERFACE(ScMediaShell, ScDrawShell, ScResId(SCSTR_GRAPHICSHELL) ) +SFX_IMPL_INTERFACE(ScMediaShell, ScDrawShell, ScResId(SCSTR_GRAPHICSHELL)) + +void ScMediaShell::InitInterface_Impl() { GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, ScResId(RID_MEDIA_OBJECTBAR)); diff --git a/sc/source/ui/drawfunc/oleobjsh.cxx b/sc/source/ui/drawfunc/oleobjsh.cxx index d3a583c8dd1b..99d9f03dec1d 100644 --- a/sc/source/ui/drawfunc/oleobjsh.cxx +++ b/sc/source/ui/drawfunc/oleobjsh.cxx @@ -41,7 +41,9 @@ #include "scslots.hxx" -SFX_IMPL_INTERFACE(ScOleObjectShell, ScDrawShell, ScResId(SCSTR_OLEOBJECTSHELL) ) +SFX_IMPL_INTERFACE(ScOleObjectShell, ScDrawShell, ScResId(SCSTR_OLEOBJECTSHELL)) + +void ScOleObjectShell::InitInterface_Impl() { GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER, ScResId(RID_DRAW_OBJECTBAR)); -- cgit