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 /sc/source | |
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 'sc/source')
-rw-r--r-- | sc/source/ui/app/scmod.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/chartsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drawsh.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drformsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drtxtob.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/graphsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/mediash.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/oleobjsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/auditsh.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/editsh.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/pgbrksh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/pivotsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/prevwsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsh.cxx | 4 |
17 files changed, 45 insertions, 16 deletions
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index d001186a0bc4..246130f45102 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -119,7 +119,9 @@ static sal_uInt16 nIdleCount = 0; -SFX_IMPL_INTERFACE( ScModule, SfxShell, ScResId(RID_APPTITLE) ) +SFX_IMPL_INTERFACE(ScModule, SfxShell, ScResId(RID_APPTITLE)) + +void ScModule::InitInterface_Impl() { GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_APPLICATION | SFX_VISIBILITY_DESKTOP | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_CLIENT | SFX_VISIBILITY_VIEWER, ScResId(RID_OBJECTBAR_APP)); diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 0c2b700a8f57..e08aa62d0de3 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -171,6 +171,8 @@ static const sal_Char pFilterRtf[] = "Rich Text Format (StarCalc)"; SFX_IMPL_INTERFACE(ScDocShell,SfxObjectShell, ScResId(SCSTR_DOCSHELL)) + +void ScDocShell::InitInterface_Impl() { } 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)); diff --git a/sc/source/ui/view/auditsh.cxx b/sc/source/ui/view/auditsh.cxx index a150d13d63a6..f8723e688ccf 100644 --- a/sc/source/ui/view/auditsh.cxx +++ b/sc/source/ui/view/auditsh.cxx @@ -37,11 +37,12 @@ TYPEINIT1( ScAuditingShell, SfxShell ); SFX_IMPL_INTERFACE(ScAuditingShell, SfxShell, ScResId(SCSTR_AUDITSHELL)) + +void ScAuditingShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(ScResId(RID_POPUP_AUDIT)); } - ScAuditingShell::ScAuditingShell(ScViewData* pData) : SfxShell(pData->GetViewShell()), pViewData( pData ), diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index 1fcc28d8e5a5..79da4a4ed08a 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -63,7 +63,9 @@ TYPEINIT1( ScCellShell, ScFormatShell ); -SFX_IMPL_INTERFACE(ScCellShell, ScFormatShell , ScResId(SCSTR_CELLSHELL) ) +SFX_IMPL_INTERFACE(ScCellShell, ScFormatShell, ScResId(SCSTR_CELLSHELL)) + +void ScCellShell::InitInterface_Impl() { GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_SERVER, ScResId(RID_OBJECTBAR_FORMAT)); diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index d5600939721e..14bfab8e2737 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -82,11 +82,12 @@ using namespace ::com::sun::star; TYPEINIT1( ScEditShell, SfxShell ); SFX_IMPL_INTERFACE(ScEditShell, SfxShell, ScResId(SCSTR_EDITSHELL)) + +void ScEditShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(ScResId(RID_POPUP_EDIT)); } - ScEditShell::ScEditShell(EditView* pView, ScViewData* pData) : pEditView (pView), pViewData (pData), diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index a70a7ef59fab..a0e7e55c5c59 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -120,7 +120,9 @@ SvxCellVerJustify lclConvertSlotToVAlign( sal_uInt16 nSlot ) TYPEINIT1( ScFormatShell, SfxShell ); -SFX_IMPL_INTERFACE(ScFormatShell, SfxShell, ScResId(SCSTR_FORMATSHELL) ) +SFX_IMPL_INTERFACE(ScFormatShell, SfxShell, ScResId(SCSTR_FORMATSHELL)) + +void ScFormatShell::InitInterface_Impl() { GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_SERVER, ScResId(RID_OBJECTBAR_FORMAT)); diff --git a/sc/source/ui/view/pgbrksh.cxx b/sc/source/ui/view/pgbrksh.cxx index 2b1db9ed0246..5265c93a1cb7 100644 --- a/sc/source/ui/view/pgbrksh.cxx +++ b/sc/source/ui/view/pgbrksh.cxx @@ -37,6 +37,8 @@ TYPEINIT1( ScPageBreakShell, SfxShell ); SFX_IMPL_INTERFACE(ScPageBreakShell, SfxShell, ScResId(SCSTR_PAGEBREAKSHELL)) + +void ScPageBreakShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(ScResId(RID_POPUP_PAGEBREAK)); } diff --git a/sc/source/ui/view/pivotsh.cxx b/sc/source/ui/view/pivotsh.cxx index 79b87bd9b915..a094cffe620b 100644 --- a/sc/source/ui/view/pivotsh.cxx +++ b/sc/source/ui/view/pivotsh.cxx @@ -45,6 +45,8 @@ TYPEINIT1( ScPivotShell, SfxShell ); SFX_IMPL_INTERFACE(ScPivotShell, SfxShell, ScResId(SCSTR_PIVOTSHELL)) + +void ScPivotShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(ScResId(RID_POPUP_PIVOT)); } diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 016015fd07ba..e1a83495b307 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -83,7 +83,9 @@ using namespace com::sun::star; TYPEINIT1( ScPreviewShell, SfxViewShell ); -SFX_IMPL_INTERFACE( ScPreviewShell, SfxViewShell, ScResId(SCSTR_PREVIEWSHELL) ) +SFX_IMPL_INTERFACE(ScPreviewShell, SfxViewShell, ScResId(SCSTR_PREVIEWSHELL)) + +void ScPreviewShell::InitInterface_Impl() { GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER|SFX_VISIBILITY_READONLYDOC, ScResId(RID_OBJECTBAR_PREVIEW)); diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx index 8847d5e0a3a8..3a048d0525c5 100644 --- a/sc/source/ui/view/tabvwsh.cxx +++ b/sc/source/ui/view/tabvwsh.cxx @@ -46,7 +46,9 @@ TYPEINIT2(ScTabViewShell,SfxViewShell,SfxListener); -SFX_IMPL_INTERFACE(ScTabViewShell,SfxViewShell,ScResId(SCSTR_TABVIEWSHELL)) +SFX_IMPL_INTERFACE(ScTabViewShell, SfxViewShell, ScResId(SCSTR_TABVIEWSHELL)) + +void ScTabViewShell::InitInterface_Impl() { GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_FULLSCREEN | SFX_VISIBILITY_SERVER, ScResId(RID_OBJECTBAR_TOOLS)); |