summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-04-18 15:28:44 +0200
committerJan Holesovsky <kendy@collabora.com>2014-04-18 22:49:27 +0200
commit9f83ea4bc61c051473aeaed9849cba4627aceadb (patch)
treea74b93ca66a9c46c1376283f45767938106d72a8 /sw
parent7acb27081c6da9fc0ae64f4d145d8744c81d4b0a (diff)
sfx2: Kill SFX_POPUPMENU_REGISTRATION macro.
Change-Id: Ie68ccbe5874ec7c7e1bb73cb2937e06bb4910cd0
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/uibase/shells/annotsh.cxx2
-rw-r--r--sw/source/core/uibase/shells/beziersh.cxx2
-rw-r--r--sw/source/core/uibase/shells/drawsh.cxx2
-rw-r--r--sw/source/core/uibase/shells/drformsh.cxx2
-rw-r--r--sw/source/core/uibase/shells/drwtxtsh.cxx2
-rw-r--r--sw/source/core/uibase/shells/frmsh.cxx2
-rw-r--r--sw/source/core/uibase/shells/grfsh.cxx2
-rw-r--r--sw/source/core/uibase/shells/mediash.cxx2
-rw-r--r--sw/source/core/uibase/shells/olesh.cxx3
-rw-r--r--sw/source/core/uibase/shells/tabsh.cxx3
-rw-r--r--sw/source/core/uibase/shells/textsh.cxx4
-rw-r--r--sw/source/core/uibase/uiview/pview.cxx15
-rw-r--r--sw/source/core/uibase/uiview/srcview.cxx9
-rw-r--r--sw/source/core/uibase/web/wformsh.cxx3
-rw-r--r--sw/source/core/uibase/web/wfrmsh.cxx3
-rw-r--r--sw/source/core/uibase/web/wgrfsh.cxx3
-rw-r--r--sw/source/core/uibase/web/wolesh.cxx3
-rw-r--r--sw/source/core/uibase/web/wtabsh.cxx3
-rw-r--r--sw/source/core/uibase/web/wtextsh.cxx4
19 files changed, 42 insertions, 27 deletions
diff --git a/sw/source/core/uibase/shells/annotsh.cxx b/sw/source/core/uibase/shells/annotsh.cxx
index cde9c1fc0887..eaba65bc2069 100644
--- a/sw/source/core/uibase/shells/annotsh.cxx
+++ b/sw/source/core/uibase/shells/annotsh.cxx
@@ -140,7 +140,7 @@ SFX_IMPL_INTERFACE(SwAnnotationShell, SfxShell, SW_RES(STR_SHELLNAME_DRAW_TEXT))
{
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_TEXT_TOOLBOX));
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_ANNOTATION_POPUPMENU));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_ANNOTATION_POPUPMENU));
}
TYPEINIT1(SwAnnotationShell,SfxShell)
diff --git a/sw/source/core/uibase/shells/beziersh.cxx b/sw/source/core/uibase/shells/beziersh.cxx
index b8e6a68d84b8..8a42b1c0ce1f 100644
--- a/sw/source/core/uibase/shells/beziersh.cxx
+++ b/sw/source/core/uibase/shells/beziersh.cxx
@@ -45,7 +45,7 @@
SFX_IMPL_INTERFACE(SwBezierShell, SwBaseShell, SW_RES(STR_SHELLNAME_BEZIER))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_DRAW_POPUPMENU));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_DRAW_POPUPMENU));
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_BEZIER_TOOLBOX));
}
diff --git a/sw/source/core/uibase/shells/drawsh.cxx b/sw/source/core/uibase/shells/drawsh.cxx
index 548ba33a5b93..9f01c97dabf6 100644
--- a/sw/source/core/uibase/shells/drawsh.cxx
+++ b/sw/source/core/uibase/shells/drawsh.cxx
@@ -76,7 +76,7 @@ using namespace ::com::sun::star::uno;
SFX_IMPL_INTERFACE(SwDrawShell, SwDrawBaseShell, SW_RES(STR_SHELLNAME_DRAW))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_DRAW_POPUPMENU));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_DRAW_POPUPMENU));
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_DRAW_TOOLBOX));
diff --git a/sw/source/core/uibase/shells/drformsh.cxx b/sw/source/core/uibase/shells/drformsh.cxx
index d2b1cafd6ccc..55ebc7bbba92 100644
--- a/sw/source/core/uibase/shells/drformsh.cxx
+++ b/sw/source/core/uibase/shells/drformsh.cxx
@@ -59,7 +59,7 @@ using namespace ::com::sun::star;
SFX_IMPL_INTERFACE(SwDrawFormShell, SwDrawBaseShell, SW_RES(STR_SHELLNAME_DRAWFORM))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_DRAWFORM_POPUPMENU));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_DRAWFORM_POPUPMENU));
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_TEXT_TOOLBOX));
}
diff --git a/sw/source/core/uibase/shells/drwtxtsh.cxx b/sw/source/core/uibase/shells/drwtxtsh.cxx
index c5b273473d67..2af6858de6f1 100644
--- a/sw/source/core/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/core/uibase/shells/drwtxtsh.cxx
@@ -81,7 +81,7 @@ using namespace ::com::sun::star::i18n;
SFX_IMPL_INTERFACE(SwDrawTextShell, SfxShell, SW_RES(STR_SHELLNAME_DRAW_TEXT))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_DRWTXT_POPUPMENU));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_DRWTXT_POPUPMENU));
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_DRAW_TEXT_TOOLBOX));
diff --git a/sw/source/core/uibase/shells/frmsh.cxx b/sw/source/core/uibase/shells/frmsh.cxx
index bede835844fa..f3e9615f00e4 100644
--- a/sw/source/core/uibase/shells/frmsh.cxx
+++ b/sw/source/core/uibase/shells/frmsh.cxx
@@ -106,7 +106,7 @@ static const SwFrmFmt* lcl_GetFrmFmtByName(SwWrtShell& rSh, const OUString& rNam
SFX_IMPL_INTERFACE(SwFrameShell, SwBaseShell, SW_RES(STR_SHELLNAME_FRAME))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_FRM_POPUPMENU));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_FRM_POPUPMENU));
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_FRAME_TOOLBOX));
}
diff --git a/sw/source/core/uibase/shells/grfsh.cxx b/sw/source/core/uibase/shells/grfsh.cxx
index c368f18accae..a75c61c34a71 100644
--- a/sw/source/core/uibase/shells/grfsh.cxx
+++ b/sw/source/core/uibase/shells/grfsh.cxx
@@ -97,7 +97,7 @@ namespace
SFX_IMPL_INTERFACE(SwGrfShell, SwBaseShell, SW_RES(STR_SHELLNAME_GRAPHIC))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_GRF_POPUPMENU));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_GRF_POPUPMENU));
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_GRAFIK_TOOLBOX));
}
diff --git a/sw/source/core/uibase/shells/mediash.cxx b/sw/source/core/uibase/shells/mediash.cxx
index 77673b3e9e82..cc59d2e40dff 100644
--- a/sw/source/core/uibase/shells/mediash.cxx
+++ b/sw/source/core/uibase/shells/mediash.cxx
@@ -70,7 +70,7 @@
SFX_IMPL_INTERFACE(SwMediaShell, SwBaseShell, SW_RES(STR_SHELLNAME_MEDIA))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_MEDIA_POPUPMENU));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_MEDIA_POPUPMENU));
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_MEDIA_TOOLBOX));
}
diff --git a/sw/source/core/uibase/shells/olesh.cxx b/sw/source/core/uibase/shells/olesh.cxx
index 87a6ec67b005..be3f3d3d0f84 100644
--- a/sw/source/core/uibase/shells/olesh.cxx
+++ b/sw/source/core/uibase/shells/olesh.cxx
@@ -39,7 +39,8 @@
SFX_IMPL_INTERFACE(SwOleShell, SwFrameShell, SW_RES(STR_SHELLNAME_OBJECT))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_OLE_POPUPMENU));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_OLE_POPUPMENU));
+
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_OLE_TOOLBOX));
}
diff --git a/sw/source/core/uibase/shells/tabsh.cxx b/sw/source/core/uibase/shells/tabsh.cxx
index 032d68caefe6..033ba9f78693 100644
--- a/sw/source/core/uibase/shells/tabsh.cxx
+++ b/sw/source/core/uibase/shells/tabsh.cxx
@@ -91,7 +91,8 @@ using namespace ::com::sun::star;
SFX_IMPL_INTERFACE(SwTableShell, SwBaseShell, SW_RES(STR_SHELLNAME_TABLE))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_TAB_POPUPMENU));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_TAB_POPUPMENU));
+
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_TABLE_TOOLBOX));
}
diff --git a/sw/source/core/uibase/shells/textsh.cxx b/sw/source/core/uibase/shells/textsh.cxx
index 087994e6ebbf..32ed6b934de5 100644
--- a/sw/source/core/uibase/shells/textsh.cxx
+++ b/sw/source/core/uibase/shells/textsh.cxx
@@ -116,8 +116,10 @@ using namespace ::com::sun::star;
SFX_IMPL_INTERFACE(SwTextShell, SwBaseShell, SW_RES(STR_SHELLNAME_TEXT))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_TEXT_POPUPMENU));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_TEXT_POPUPMENU));
+
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_TEXT_TOOLBOX));
+
SFX_CHILDWINDOW_REGISTRATION(FN_EDIT_FORMULA);
SFX_CHILDWINDOW_REGISTRATION(FN_INSERT_FIELD);
SFX_CHILDWINDOW_REGISTRATION(FN_INSERT_IDX_ENTRY_DLG);
diff --git a/sw/source/core/uibase/uiview/pview.cxx b/sw/source/core/uibase/uiview/pview.cxx
index fe183d016d5a..d70878bfdcad 100644
--- a/sw/source/core/uibase/uiview/pview.cxx
+++ b/sw/source/core/uibase/uiview/pview.cxx
@@ -90,11 +90,10 @@ SFX_IMPL_NAMED_VIEWFACTORY(SwPagePreview, "PrintPreview")
SFX_IMPL_INTERFACE(SwPagePreview, SfxViewShell, SW_RES(RID_PVIEW_TOOLBOX))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_PPREVIEW_POPUPMENU));
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|
- SFX_VISIBILITY_CLIENT|SFX_VISIBILITY_FULLSCREEN|
- SFX_VISIBILITY_READONLYDOC,
- SW_RES(RID_PVIEW_TOOLBOX));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_PPREVIEW_POPUPMENU));
+
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_CLIENT|SFX_VISIBILITY_FULLSCREEN|SFX_VISIBILITY_READONLYDOC,
+ SW_RES(RID_PVIEW_TOOLBOX));
}
TYPEINIT1(SwPagePreview,SfxViewShell)
@@ -111,18 +110,22 @@ static sal_uInt16 lcl_GetNextZoomStep(sal_uInt16 nCurrentZoom, sal_Bool bZoomIn)
25, 50, 75, 100, 150, 200, 400, 600
};
const sal_uInt16 nZoomArrSize = sizeof(aZoomArr)/sizeof(sal_uInt16);
- if(bZoomIn)
+ if (bZoomIn)
+ {
for(int i = nZoomArrSize - 1; i >= 0; --i)
{
if(nCurrentZoom > aZoomArr[i] || !i)
return aZoomArr[i];
}
+ }
else
+ {
for(int i = 0; i < nZoomArrSize; ++i)
{
if(nCurrentZoom < aZoomArr[i])
return aZoomArr[i];
}
+ }
return bZoomIn ? MAX_PREVIEW_ZOOM : MIN_PREVIEW_ZOOM;
};
diff --git a/sw/source/core/uibase/uiview/srcview.cxx b/sw/source/core/uibase/uiview/srcview.cxx
index 38f4f9cb494a..1f1d238989c5 100644
--- a/sw/source/core/uibase/uiview/srcview.cxx
+++ b/sw/source/core/uibase/uiview/srcview.cxx
@@ -114,10 +114,11 @@ SFX_IMPL_NAMED_VIEWFACTORY(SwSrcView, "SourceView")
SFX_IMPL_INTERFACE( SwSrcView, SfxViewShell, SW_RES(0) )
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_SRCVIEW_POPUPMENU));
- GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS|
- SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
- SW_RES(RID_WEBTOOLS_TOOLBOX) );
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_SRCVIEW_POPUPMENU));
+
+ GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_TOOLS|SFX_VISIBILITY_STANDARD|SFX_VISIBILITY_SERVER,
+ SW_RES(RID_WEBTOOLS_TOOLBOX) );
+
SFX_CHILDWINDOW_REGISTRATION(SvxSearchDialogWrapper::GetChildWindowId());
}
diff --git a/sw/source/core/uibase/web/wformsh.cxx b/sw/source/core/uibase/web/wformsh.cxx
index c35f292b1c57..e112fd7c4742 100644
--- a/sw/source/core/uibase/web/wformsh.cxx
+++ b/sw/source/core/uibase/web/wformsh.cxx
@@ -38,7 +38,8 @@
SFX_IMPL_INTERFACE(SwWebDrawFormShell, SwDrawFormShell, SW_RES(0))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_DRAWFORM_POPUPMENU));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_DRAWFORM_POPUPMENU));
+
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_TEXT_TOOLBOX));
}
diff --git a/sw/source/core/uibase/web/wfrmsh.cxx b/sw/source/core/uibase/web/wfrmsh.cxx
index c6addc826aab..795644c4c7d8 100644
--- a/sw/source/core/uibase/web/wfrmsh.cxx
+++ b/sw/source/core/uibase/web/wfrmsh.cxx
@@ -37,7 +37,8 @@
SFX_IMPL_INTERFACE(SwWebFrameShell, SwFrameShell, SW_RES(STR_SHELLNAME_WEBFRAME))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_FRM_POPUPMENU));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_FRM_POPUPMENU));
+
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_WEBFRAME_TOOLBOX));
}
diff --git a/sw/source/core/uibase/web/wgrfsh.cxx b/sw/source/core/uibase/web/wgrfsh.cxx
index 0e6d2c420131..295ea3bd5984 100644
--- a/sw/source/core/uibase/web/wgrfsh.cxx
+++ b/sw/source/core/uibase/web/wgrfsh.cxx
@@ -40,7 +40,8 @@
SFX_IMPL_INTERFACE(SwWebGrfShell, SwGrfShell, SW_RES(STR_SHELLNAME_GRAPHIC))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_GRF_POPUPMENU));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_GRF_POPUPMENU));
+
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_WEBGRAPHIC_TOOLBOX));
}
diff --git a/sw/source/core/uibase/web/wolesh.cxx b/sw/source/core/uibase/web/wolesh.cxx
index 57b70ec9764e..13143b205547 100644
--- a/sw/source/core/uibase/web/wolesh.cxx
+++ b/sw/source/core/uibase/web/wolesh.cxx
@@ -37,7 +37,8 @@
SFX_IMPL_INTERFACE(SwWebOleShell, SwOleShell, SW_RES(STR_SHELLNAME_OBJECT))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_OLE_POPUPMENU));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_OLE_POPUPMENU));
+
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_WEBOLE_TOOLBOX));
}
diff --git a/sw/source/core/uibase/web/wtabsh.cxx b/sw/source/core/uibase/web/wtabsh.cxx
index 99ba669b5604..2d87bfce8b8f 100644
--- a/sw/source/core/uibase/web/wtabsh.cxx
+++ b/sw/source/core/uibase/web/wtabsh.cxx
@@ -40,7 +40,8 @@
SFX_IMPL_INTERFACE(SwWebTableShell, SwTableShell, SW_RES(STR_SHELLNAME_TABLE))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_TAB_POPUPMENU));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_TAB_POPUPMENU));
+
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_TABLE_TOOLBOX));
}
diff --git a/sw/source/core/uibase/web/wtextsh.cxx b/sw/source/core/uibase/web/wtextsh.cxx
index 9c1af4123e8e..3fb5d9d37bd2 100644
--- a/sw/source/core/uibase/web/wtextsh.cxx
+++ b/sw/source/core/uibase/web/wtextsh.cxx
@@ -43,8 +43,10 @@
SFX_IMPL_INTERFACE(SwWebTextShell, SwBaseShell, SW_RES(STR_SHELLNAME_WEBTEXT))
{
- SFX_POPUPMENU_REGISTRATION(SW_RES(MN_TEXT_POPUPMENU));
+ GetStaticInterface()->RegisterPopupMenu(SW_RES(MN_TEXT_POPUPMENU));
+
GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SW_RES(RID_TEXT_TOOLBOX));
+
SFX_CHILDWINDOW_REGISTRATION(FN_EDIT_FORMULA);
SFX_CHILDWINDOW_REGISTRATION(FN_INSERT_FIELD);
}