summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-04-18 17:25:30 +0200
committerJan Holesovsky <kendy@collabora.com>2014-04-18 22:51:06 +0200
commitb731d71c67b864b61f5c08e219140be59c473f53 (patch)
tree29f8a9f208e2e72b93389d5ee06d244599aefdc9 /sd
parent8c3ab6093afad91f7dcb7b674adb257be9530ca7 (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 'sd')
-rw-r--r--sd/source/ui/app/sdmod.cxx3
-rw-r--r--sd/source/ui/dlg/PaneShells.cxx4
-rw-r--r--sd/source/ui/docshell/docshell.cxx3
-rw-r--r--sd/source/ui/docshell/grdocsh.cxx2
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx7
-rw-r--r--sd/source/ui/table/tableobjectbar.cxx8
-rw-r--r--sd/source/ui/view/GraphicObjectBar.cxx8
-rw-r--r--sd/source/ui/view/MediaObjectBar.cxx9
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx3
-rw-r--r--sd/source/ui/view/drbezob.cxx3
-rw-r--r--sd/source/ui/view/drtxtob.cxx8
-rw-r--r--sd/source/ui/view/drvwshrg.cxx6
-rw-r--r--sd/source/ui/view/outlnvsh.cxx9
-rw-r--r--sd/source/ui/view/presvish.cxx4
14 files changed, 35 insertions, 42 deletions
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index 830f3e86ed94..2466c84279c6 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -59,8 +59,9 @@ TYPEINIT1( SdModule, SfxModule );
#define SdModule
#include "sdslots.hxx"
-
SFX_IMPL_INTERFACE(SdModule, SfxModule, SdResId(STR_APPLICATIONOBJECTBAR))
+
+void SdModule::InitInterface_Impl()
{
GetStaticInterface()->RegisterStatusBar(SdResId(RID_DRAW_STATUSBAR));
}
diff --git a/sd/source/ui/dlg/PaneShells.cxx b/sd/source/ui/dlg/PaneShells.cxx
index bdd4c3c4810f..5e1e212553d6 100644
--- a/sd/source/ui/dlg/PaneShells.cxx
+++ b/sd/source/ui/dlg/PaneShells.cxx
@@ -37,6 +37,8 @@ SFX_SLOTMAP(LeftImpressPaneShell)
};
SFX_IMPL_INTERFACE(LeftImpressPaneShell, SfxShell, SdResId(STR_LEFT_IMPRESS_PANE_SHELL))
+
+void LeftImpressPaneShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterChildWindow(::sd::LeftPaneImpressChildWindow::GetChildWindowId());
}
@@ -61,6 +63,8 @@ SFX_SLOTMAP(LeftDrawPaneShell)
};
SFX_IMPL_INTERFACE(LeftDrawPaneShell, SfxShell, SdResId(STR_LEFT_DRAW_PANE_SHELL))
+
+void LeftDrawPaneShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterChildWindow(::sd::LeftPaneDrawChildWindow::GetChildWindowId());
}
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 96fbbe545868..f43878762457 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -74,11 +74,12 @@ using namespace sd;
#include "sdslots.hxx"
SFX_IMPL_INTERFACE(DrawDocShell, SfxObjectShell, SdResId(0))
+
+void DrawDocShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterChildWindow(SvxSearchDialogWrapper::GetChildWindowId());
}
-
namespace sd {
/**
diff --git a/sd/source/ui/docshell/grdocsh.cxx b/sd/source/ui/docshell/grdocsh.cxx
index 83278ce4c6ff..5a0b821addae 100644
--- a/sd/source/ui/docshell/grdocsh.cxx
+++ b/sd/source/ui/docshell/grdocsh.cxx
@@ -45,6 +45,8 @@ namespace sd
TYPEINIT1(GraphicDocShell, DrawDocShell);
SFX_IMPL_INTERFACE(GraphicDocShell, SfxObjectShell, SdResId(0))
+
+void GraphicDocShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterChildWindow(SID_SEARCH_DLG);
}
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index 5e10da2de460..5c7f6cb4312e 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -82,18 +82,15 @@ using ::sfx2::sidebar::EnumContext;
namespace sd { namespace slidesorter {
-
SFX_IMPL_INTERFACE(SlideSorterViewShell, SfxShell, SdResId(STR_SLIDESORTERVIEWSHELL))
+
+void SlideSorterViewShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterChildWindow(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
}
-
-
TYPEINIT1(SlideSorterViewShell, ViewShell);
-
-
::boost::shared_ptr<SlideSorterViewShell> SlideSorterViewShell::Create (
SfxViewFrame* pFrame,
ViewShellBase& rViewShellBase,
diff --git a/sd/source/ui/table/tableobjectbar.cxx b/sd/source/ui/table/tableobjectbar.cxx
index cc9f9d55b29f..88f6670a8ebe 100644
--- a/sd/source/ui/table/tableobjectbar.cxx
+++ b/sd/source/ui/table/tableobjectbar.cxx
@@ -75,20 +75,16 @@ void RegisterInterfaces(SfxModule* pMod)
TableObjectBar::RegisterInterface(pMod);
}
-
// - TableObjectBar -
-
TYPEINIT1( TableObjectBar, SfxShell );
+SFX_IMPL_INTERFACE(TableObjectBar, SfxShell, SdResId(STR_TABLEOBJECTBARSHELL))
-
-SFX_IMPL_INTERFACE( TableObjectBar, SfxShell, SdResId( STR_TABLEOBJECTBARSHELL ) )
+void TableObjectBar::InitInterface_Impl()
{
}
-
-
TableObjectBar::TableObjectBar( ViewShell* pSdViewShell, ::sd::View* pSdView )
: SfxShell( pSdViewShell->GetViewShell() )
, mpView( pSdView )
diff --git a/sd/source/ui/view/GraphicObjectBar.cxx b/sd/source/ui/view/GraphicObjectBar.cxx
index 1f950457b552..8248808dbd70 100644
--- a/sd/source/ui/view/GraphicObjectBar.cxx
+++ b/sd/source/ui/view/GraphicObjectBar.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "GraphicObjectBar.hxx"
#include <limits.h>
@@ -34,7 +33,6 @@
#include <svl/aeitem.hxx>
#include <svx/grafctrl.hxx>
-
#include <sfx2/objface.hxx>
#include "app.hrc"
@@ -54,13 +52,11 @@ using namespace sd;
namespace sd {
-
-
-
// - GraphicObjectBar -
+SFX_IMPL_INTERFACE(GraphicObjectBar, SfxShell, SdResId(STR_GRAFOBJECTBARSHELL))
-SFX_IMPL_INTERFACE( GraphicObjectBar, SfxShell, SdResId( STR_GRAFOBJECTBARSHELL ) )
+void GraphicObjectBar::InitInterface_Impl()
{
}
diff --git a/sd/source/ui/view/MediaObjectBar.cxx b/sd/source/ui/view/MediaObjectBar.cxx
index 90cc1e344674..c2bfb8a2d704 100644
--- a/sd/source/ui/view/MediaObjectBar.cxx
+++ b/sd/source/ui/view/MediaObjectBar.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "MediaObjectBar.hxx"
#include <avmedia/mediaitem.hxx>
#include <sfx2/msg.hxx>
@@ -48,20 +47,16 @@ using namespace sd;
namespace sd {
-
// - MediaObjectBar -
-
TYPEINIT1( MediaObjectBar, SfxShell );
+SFX_IMPL_INTERFACE(MediaObjectBar, SfxShell, SdResId(STR_MEDIAOBJECTBARSHELL))
-
-SFX_IMPL_INTERFACE( MediaObjectBar, SfxShell, SdResId( STR_MEDIAOBJECTBARSHELL ) )
+void MediaObjectBar::InitInterface_Impl()
{
}
-
-
MediaObjectBar::MediaObjectBar( ViewShell* pSdViewShell, ::sd::View* pSdView ) :
SfxShell( pSdViewShell->GetViewShell() ),
mpView( pSdView ),
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 573630db02d8..833c12aedf81 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -214,7 +214,6 @@ private:
};
} // end of anonymous namespace
-
//===== ViewShellBase =========================================================
TYPEINIT1(ViewShellBase, SfxViewShell);
@@ -225,6 +224,8 @@ TYPEINIT1(ViewShellBase, SfxViewShell);
SfxViewFactory* ViewShellBase::pFactory;
SFX_IMPL_INTERFACE(ViewShellBase, SfxViewShell, SdResId(0))
+
+void ViewShellBase::InitInterface_Impl()
{
}
diff --git a/sd/source/ui/view/drbezob.cxx b/sd/source/ui/view/drbezob.cxx
index 32dffba88de2..bf1b88631f94 100644
--- a/sd/source/ui/view/drbezob.cxx
+++ b/sd/source/ui/view/drbezob.cxx
@@ -57,12 +57,13 @@ namespace sd {
*/
SFX_IMPL_INTERFACE(BezierObjectBar, ::SfxShell, SdResId(STR_BEZIEROBJECTBARSHELL))
+
+void BezierObjectBar::InitInterface_Impl()
{
}
TYPEINIT1(BezierObjectBar, ::SfxShell);
-
BezierObjectBar::BezierObjectBar(
ViewShell* pSdViewShell,
::sd::View* pSdView)
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index 0d48df45586c..13b1def5845b 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "TextObjectBar.hxx"
#include <svx/svxids.hrc>
@@ -48,7 +47,6 @@
#include <editeng/frmdiritem.hxx>
#include <editeng/fhgtitem.hxx>
-
#include <sfx2/objface.hxx>
#include "app.hrc"
@@ -65,7 +63,6 @@
#include "Window.hxx"
#include "OutlineView.hxx"
-
using namespace sd;
using namespace ::com::sun::star;
@@ -79,13 +76,14 @@ namespace sd {
* something that (hopefully) never occurs.
*/
-SFX_IMPL_INTERFACE( TextObjectBar, SfxShell, SdResId(STR_TEXTOBJECTBARSHELL) )
+SFX_IMPL_INTERFACE(TextObjectBar, SfxShell, SdResId(STR_TEXTOBJECTBARSHELL))
+
+void TextObjectBar::InitInterface_Impl()
{
}
TYPEINIT1( TextObjectBar, SfxShell );
-
TextObjectBar::TextObjectBar (
ViewShell* pSdViewSh,
SfxItemPool& rItemPool,
diff --git a/sd/source/ui/view/drvwshrg.cxx b/sd/source/ui/view/drvwshrg.cxx
index 2524ce4e01c0..3fdf95f4d7d0 100644
--- a/sd/source/ui/view/drvwshrg.cxx
+++ b/sd/source/ui/view/drvwshrg.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "DrawViewShell.hxx"
#include <sfx2/templdlg.hxx>
#include <sfx2/infobar.hxx>
@@ -36,7 +35,6 @@
#include <svx/hyperdlg.hxx>
#include <avmedia/mediaplayer.hxx>
-
#include "app.hrc"
#include "strings.hrc"
#include "res_bmp.hrc"
@@ -63,6 +61,8 @@ namespace sd {
*/
SFX_IMPL_INTERFACE(DrawViewShell, SfxShell, SdResId(STR_DRAWVIEWSHELL))
+
+void DrawViewShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu(SdResId(RID_DRAW_TEXTOBJ_INSIDE_POPUP));
@@ -89,6 +89,8 @@ TYPEINIT1( DrawViewShell, ViewShell );
// SdGraphicViewShell
SFX_IMPL_INTERFACE(GraphicViewShell, SfxShell, SdResId(STR_DRAWVIEWSHELL)) //SOH...
+
+void GraphicViewShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu(SdResId(RID_DRAW_TEXTOBJ_INSIDE_POPUP));
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index c34be2e74df4..f8d61b0f7757 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "OutlineViewShell.hxx"
#include "ViewShellImplementation.hxx"
@@ -95,6 +94,7 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::linguistic2;
using namespace sd;
+
#define OutlineViewShell
#include "sdslots.hxx"
@@ -103,13 +103,12 @@ namespace sd {
#define MIN_ZOOM 10 // minimum zoom factor
#define MAX_ZOOM 1000 // maximum zoom factor
-/************************************************************************/
-
-
/**
* Declare SFX-Slotmap and standard interface
*/
SFX_IMPL_INTERFACE(OutlineViewShell, SfxShell, SdResId(STR_OUTLINEVIEWSHELL))
+
+void OutlineViewShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterPopupMenu(SdResId(RID_OUTLINE_POPUP));
@@ -126,10 +125,8 @@ SFX_IMPL_INTERFACE(OutlineViewShell, SfxShell, SdResId(STR_OUTLINEVIEWSHELL))
GetStaticInterface()->RegisterChildWindow(::sfx2::sidebar::SidebarChildWindow::GetChildWindowId());
}
-
TYPEINIT1( OutlineViewShell, ViewShell );
-
/**
* common initialization part of both constructors
*/
diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx
index 53cb9a70f20b..b81af442b771 100644
--- a/sd/source/ui/view/presvish.cxx
+++ b/sd/source/ui/view/presvish.cxx
@@ -61,7 +61,9 @@ using namespace ::com::sun::star::presentation;
namespace sd {
-SFX_IMPL_INTERFACE( PresentationViewShell, DrawViewShell, SdResId( STR_PRESVIEWSHELL ) )
+SFX_IMPL_INTERFACE(PresentationViewShell, DrawViewShell, SdResId( STR_PRESVIEWSHELL ) )
+
+void PresentationViewShell::InitInterface_Impl()
{
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS | SFX_VISIBILITY_STANDARD | SFX_VISIBILITY_FULLSCREEN | SFX_VISIBILITY_SERVER,
SdResId(RID_DRAW_TOOLBOX));