summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-16 14:12:33 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-06-18 15:13:51 +0100
commit0e0aca151b36462cf5f5592fa7e7d21b5c96472d (patch)
treef99c1a0464ad9aa1f949bf8c86fe124e404354d7 /sfx2
parent40bb1f631b1b79db919474846996e67eb12a9907 (diff)
callcatcher: drop unused macro-generated GetChildWindowId methods
add _WITHID variants for the cases where we (apparently?) still need them. Change-Id: I3b8290869368487f04ecd93a5f3a717de7fd10b4
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/sfx2/childwin.hxx40
-rw-r--r--sfx2/inc/sfx2/templdlg.hxx2
-rw-r--r--sfx2/source/dialog/dockwin.cxx6
-rw-r--r--sfx2/source/dialog/templdlg.cxx2
4 files changed, 39 insertions, 11 deletions
diff --git a/sfx2/inc/sfx2/childwin.hxx b/sfx2/inc/sfx2/childwin.hxx
index c3f554f00d5b..4362a9ad4c06 100644
--- a/sfx2/inc/sfx2/childwin.hxx
+++ b/sfx2/inc/sfx2/childwin.hxx
@@ -290,12 +290,18 @@ public:
static SfxChildWindow* CreateImpl(::Window *pParent, sal_uInt16 nId, \
SfxBindings *pBindings, SfxChildWinInfo* pInfo ); \
static void RegisterChildWindow (sal_Bool bVisible=sal_False, SfxModule *pMod=NULL, sal_uInt16 nFlags=0); \
- static sal_uInt16 GetChildWindowId ();\
virtual SfxChildWinInfo GetInfo() const
+#define SFX_DECL_CHILDWINDOW_WITHID(Class) \
+ SFX_DECL_CHILDWINDOW(Class); \
+ static sal_uInt16 GetChildWindowId ()\
+
#define SFX_IMPL_CHILDWINDOW(Class, MyID) \
SFX_IMPL_POS_CHILDWINDOW(Class, MyID, CHILDWIN_NOPOS)
+#define SFX_IMPL_CHILDWINDOW_WITHID(Class, MyID) \
+ SFX_IMPL_POS_CHILDWINDOW_WITHID(Class, MyID, CHILDWIN_NOPOS)
+
#define SFX_IMPL_POS_CHILDWINDOW(Class, MyID, Pos) \
SfxChildWindow* Class::CreateImpl( ::Window *pParent, \
sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \
@@ -303,8 +309,6 @@ public:
SfxChildWindow *pWin = new Class(pParent, nId, pBindings, pInfo);\
return pWin; \
} \
- sal_uInt16 Class::GetChildWindowId () \
- { return MyID; } \
void Class::RegisterChildWindow (sal_Bool bVis, SfxModule *pMod, sal_uInt16 nFlags) \
{ \
SfxChildWinFactory *pFact = new SfxChildWinFactory( \
@@ -314,6 +318,11 @@ public:
SfxChildWindow::RegisterChildWindow(pMod, pFact); \
}
+#define SFX_IMPL_POS_CHILDWINDOW_WITHID(Class, MyID, Pos) \
+ SFX_IMPL_POS_CHILDWINDOW(Class, MyID, Pos) \
+ sal_uInt16 Class::GetChildWindowId () \
+ { return MyID; } \
+
#define SFX_IMPL_FLOATINGWINDOW(Class, MyID) \
SFX_IMPL_CHILDWINDOW(Class, MyID) \
SfxChildWinInfo Class::GetInfo() const \
@@ -322,6 +331,14 @@ public:
((SfxFloatingWindow*)GetWindow())->FillInfo( aInfo ); \
return aInfo; }
+#define SFX_IMPL_FLOATINGWINDOW_WITHID(Class, MyID) \
+ SFX_IMPL_CHILDWINDOW_WITHID(Class, MyID) \
+ SfxChildWinInfo Class::GetInfo() const \
+ { \
+ SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \
+ ((SfxFloatingWindow*)GetWindow())->FillInfo( aInfo ); \
+ return aInfo; }
+
#define SFX_IMPL_MODELESSDIALOG(Class, MyID) \
SFX_IMPL_CHILDWINDOW(Class, MyID) \
SfxChildWinInfo Class::GetInfo() const \
@@ -330,6 +347,15 @@ public:
((SfxModelessDialog*)GetWindow())->FillInfo( aInfo ); \
return aInfo; }
+#define SFX_IMPL_MODELESSDIALOG_WITHID(Class, MyID) \
+ SFX_IMPL_CHILDWINDOW_WITHID(Class, MyID) \
+ SfxChildWinInfo Class::GetInfo() const \
+ { \
+ SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \
+ ((SfxModelessDialog*)GetWindow())->FillInfo( aInfo ); \
+ return aInfo; }
+
+
#define SFX_IMPL_DOCKINGWINDOW(Class, MyID) \
SFX_IMPL_CHILDWINDOW(Class, MyID) \
SfxChildWinInfo Class::GetInfo() const \
@@ -338,6 +364,14 @@ public:
((SfxDockingWindow*)GetWindow())->FillInfo( aInfo ); \
return aInfo; }
+#define SFX_IMPL_DOCKINGWINDOW_WITHID(Class, MyID) \
+ SFX_IMPL_CHILDWINDOW_WITHID(Class, MyID) \
+ SfxChildWinInfo Class::GetInfo() const \
+ { \
+ SfxChildWinInfo aInfo = SfxChildWindow::GetInfo(); \
+ ((SfxDockingWindow*)GetWindow())->FillInfo( aInfo ); \
+ return aInfo; }
+
#define SFX_IMPL_TOOLBOX(Class, MyID) \
SFX_IMPL_CHILDWINDOW(Class, MyID) \
SfxChildWinInfo Class::GetInfo() const \
diff --git a/sfx2/inc/sfx2/templdlg.hxx b/sfx2/inc/sfx2/templdlg.hxx
index 02132266e6d3..11699dc152fd 100644
--- a/sfx2/inc/sfx2/templdlg.hxx
+++ b/sfx2/inc/sfx2/templdlg.hxx
@@ -97,7 +97,7 @@ class SFX2_DLLPUBLIC SfxTemplateDialogWrapper : public SfxChildWindow
public:
SfxTemplateDialogWrapper
(Window*,sal_uInt16,SfxBindings*,SfxChildWinInfo*);
- SFX_DECL_CHILDWINDOW(SfxTemplateDialogWrapper);
+ SFX_DECL_CHILDWINDOW_WITHID(SfxTemplateDialogWrapper);
void SetParagraphFamily();
};
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 00da60db9a61..0d43e62b9202 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -252,12 +252,6 @@ Window *pParent, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo* pInfo
return pWin;
}
-sal_uInt16 SfxDockingWrapper::GetChildWindowId ()
-{
- DBG_ASSERT( false, "This method shouldn't be called!" );
- return 0;
-}
-
void SfxDockingWrapper::RegisterChildWindow (sal_Bool bVis, SfxModule *pMod, sal_uInt16 nFlags)
{
// pre-register a couple of docking windows
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 4ba51cef0fbc..75bace87997b 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -109,7 +109,7 @@ TYPEINIT0(SfxCommonTemplateDialog_Impl);
TYPEINIT1(SfxTemplateDialog_Impl,SfxCommonTemplateDialog_Impl);
TYPEINIT1(SfxTemplateCatalog_Impl,SfxCommonTemplateDialog_Impl);
-SFX_IMPL_DOCKINGWINDOW(SfxTemplateDialogWrapper, SID_STYLE_DESIGNER)
+SFX_IMPL_DOCKINGWINDOW_WITHID(SfxTemplateDialogWrapper, SID_STYLE_DESIGNER)
//-------------------------------------------------------------------------