summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-10-16 08:42:39 +0200
committerJan Holesovsky <kendy@collabora.com>2015-10-16 12:12:27 +0200
commite5be07f5167d4103b4620201df350b1d9e795393 (patch)
treea100ca13a792d765caf75decd2b47104bf3a9f41 /sw/source
parent427c5dc6e0f817253b2f8cd7727e447ac4f4d656 (diff)
sfx items: Kill the unreadable SFX_REQUEST_ARG, use a template param instead.
Change-Id: I7130f7a84077a63cdc0ca1e131a4d90469eac90d
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/app/appenv.cxx4
-rw-r--r--sw/source/uibase/app/docsh2.cxx4
-rw-r--r--sw/source/uibase/app/docst.cxx4
-rw-r--r--sw/source/uibase/shells/annotsh.cxx10
-rw-r--r--sw/source/uibase/shells/basesh.cxx14
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx4
-rw-r--r--sw/source/uibase/shells/langhelper.cxx2
-rw-r--r--sw/source/uibase/shells/tabsh.cxx8
-rw-r--r--sw/source/uibase/shells/textfld.cxx12
-rw-r--r--sw/source/uibase/shells/textsh.cxx16
-rw-r--r--sw/source/uibase/shells/textsh1.cxx16
-rw-r--r--sw/source/uibase/shells/txtnum.cxx8
-rw-r--r--sw/source/uibase/uiview/view2.cxx8
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx6
-rw-r--r--sw/source/uibase/uiview/viewprt.cxx4
15 files changed, 60 insertions, 60 deletions
diff --git a/sw/source/uibase/app/appenv.cxx b/sw/source/uibase/app/appenv.cxx
index b4278cfec306..bb5dcef67782 100644
--- a/sw/source/uibase/app/appenv.cxx
+++ b/sw/source/uibase/app/appenv.cxx
@@ -211,7 +211,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
std::unique_ptr<SfxAbstractTabDialog> pDlg;
short nMode = ENV_INSERT;
- SFX_REQUEST_ARG(rReq, pItem, SwEnvItem, FN_ENVELOP);
+ const SwEnvItem* pItem = rReq.GetArg<SwEnvItem>(FN_ENVELOP);
if ( !pItem )
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -223,7 +223,7 @@ void SwModule::InsertEnv( SfxRequest& rReq )
}
else
{
- SFX_REQUEST_ARG(rReq, pBoolItem, SfxBoolItem, FN_PARAM_1);
+ const SfxBoolItem* pBoolItem = rReq.GetArg<SfxBoolItem>(FN_PARAM_1);
if ( pBoolItem && pBoolItem->GetValue() )
nMode = ENV_NEWDOC;
}
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 5c543ec5fa6c..ec99808d258d 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -482,11 +482,11 @@ void SwDocShell::Execute(SfxRequest& rReq)
if ( pArgs )
{
- SFX_REQUEST_ARG(rReq, pTemplateItem, SfxStringItem, SID_TEMPLATE_NAME);
+ const SfxStringItem* pTemplateItem = rReq.GetArg<SfxStringItem>(SID_TEMPLATE_NAME);
if ( pTemplateItem )
{
aFileName = pTemplateItem->GetValue();
- SFX_REQUEST_ARG(rReq, pFlagsItem, SfxInt32Item, SID_TEMPLATE_LOAD);
+ const SfxInt32Item* pFlagsItem = rReq.GetArg<SfxInt32Item>(SID_TEMPLATE_LOAD);
if ( pFlagsItem )
nFlags = static_cast<SfxTemplateFlags>((sal_uInt16) pFlagsItem->GetValue());
}
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index afd5883bac02..b324353b8bb1 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -309,8 +309,8 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
else
{
// convert internal StyleName to DisplayName (slot implementation uses the latter)
- SFX_REQUEST_ARG(rReq, pNameItem, SfxStringItem, SID_APPLY_STYLE);
- SFX_REQUEST_ARG(rReq, pFamilyItem, SfxStringItem, SID_STYLE_FAMILYNAME);
+ const SfxStringItem* pNameItem = rReq.GetArg<SfxStringItem>(SID_APPLY_STYLE);
+ const SfxStringItem* pFamilyItem = rReq.GetArg<SfxStringItem>(SID_STYLE_FAMILYNAME);
if ( pFamilyItem && pNameItem )
{
uno::Reference< style::XStyleFamiliesSupplier > xModel(GetModel(), uno::UNO_QUERY);
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index a07e9a684eff..d4e9cdaac179 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -275,7 +275,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
{
if( rReq.GetArgs() )
{
- SFX_REQUEST_ARG(rReq, pItem, SvxUnderlineItem, SID_ATTR_CHAR_UNDERLINE);
+ const SvxUnderlineItem* pItem = rReq.GetArg<SvxUnderlineItem>(SID_ATTR_CHAR_UNDERLINE);
if (pItem)
{
aNewAttr.Put(*pItem);
@@ -470,7 +470,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
case SID_CHAR_DLG:
{
const SfxItemSet* pArgs = rReq.GetArgs();
- SFX_REQUEST_ARG(rReq, pItem, SfxStringItem, FN_PARAM_1);
+ const SfxStringItem* pItem = rReq.GetArg<SfxStringItem>(FN_PARAM_1);
if( !pArgs || pItem )
{
@@ -1113,7 +1113,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
break;
case FN_DELETE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG(rReq, pItem, SfxStringItem, nSlot);
+ const SfxStringItem* pItem = rReq.GetArg<SfxStringItem>(nSlot);
if ( pItem )
pPostItMgr->Delete( pItem->GetValue() );
break;
@@ -1125,7 +1125,7 @@ void SwAnnotationShell::NoteExec(SfxRequest &rReq)
break;
case FN_HIDE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG(rReq, pItem, SfxStringItem, nSlot);
+ const SfxStringItem* pItem = rReq.GetArg<SfxStringItem>(nSlot);
if ( pItem )
pPostItMgr->Hide( pItem->GetValue() );
}
@@ -1222,7 +1222,7 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq)
case SID_THES:
{
OUString aReplaceText;
- SFX_REQUEST_ARG(rReq, pItem2, SfxStringItem, SID_THES);
+ const SfxStringItem* pItem2 = rReq.GetArg<SfxStringItem>(SID_THES);
if (pItem2)
aReplaceText = pItem2->GetValue();
if (!aReplaceText.isEmpty())
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 828ab5dae721..9336584c413e 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2576,11 +2576,11 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest )
if( pArgs && pArgs->Count() >= 2 )
{
- SFX_REQUEST_ARG(_rRequest, pName, SfxStringItem, FN_INSERT_TABLE);
- SFX_REQUEST_ARG(_rRequest, pCols, SfxUInt16Item, SID_ATTR_TABLE_COLUMN);
- SFX_REQUEST_ARG(_rRequest, pRows, SfxUInt16Item, SID_ATTR_TABLE_ROW);
- SFX_REQUEST_ARG(_rRequest, pFlags, SfxInt32Item, FN_PARAM_1);
- SFX_REQUEST_ARG(_rRequest, pAuto, SfxStringItem, FN_PARAM_2);
+ const SfxStringItem* pName = _rRequest.GetArg<SfxStringItem>(FN_INSERT_TABLE);
+ const SfxUInt16Item* pCols = _rRequest.GetArg<SfxUInt16Item>(SID_ATTR_TABLE_COLUMN);
+ const SfxUInt16Item* pRows = _rRequest.GetArg<SfxUInt16Item>(SID_ATTR_TABLE_ROW);
+ const SfxInt32Item* pFlags = _rRequest.GetArg<SfxInt32Item>(FN_PARAM_1);
+ const SfxStringItem* pAuto = _rRequest.GetArg<SfxStringItem>(FN_PARAM_2);
if ( pName )
aTableName = pName->GetValue();
@@ -2772,8 +2772,8 @@ void SwBaseShell::ExecuteGallery(SfxRequest &rReq)
if ( nSel & nsSelectionType::SEL_DRW_TXT )
break;
- SFX_REQUEST_ARG(rReq, pPos, SfxUInt16Item, SID_GALLERY_BG_POS);
- SFX_REQUEST_ARG(rReq, pBrush, SvxBrushItem, SID_GALLERY_BG_BRUSH);
+ const SfxUInt16Item* pPos = rReq.GetArg<SfxUInt16Item>(SID_GALLERY_BG_POS);
+ const SvxBrushItem* pBrush = rReq.GetArg<SvxBrushItem>(SID_GALLERY_BG_BRUSH);
if ( !pPos || !pBrush )
break;
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx
index 1d81df196561..69b808b99523 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -135,7 +135,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
case SID_THES:
{
OUString aReplaceText;
- SFX_REQUEST_ARG(rReq, pItem2, SfxStringItem, SID_THES);
+ const SfxStringItem* pItem2 = rReq.GetArg<SfxStringItem>(SID_THES);
if (pItem2)
aReplaceText = pItem2->GetValue();
if (!aReplaceText.isEmpty())
@@ -318,7 +318,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
case SID_CHAR_DLG_FOR_PARAGRAPH:
{
const SfxItemSet* pArgs = rReq.GetArgs();
- SFX_REQUEST_ARG(rReq, pItem, SfxStringItem, FN_PARAM_1);
+ const SfxStringItem* pItem = rReq.GetArg<SfxStringItem>(FN_PARAM_1);
if( !pArgs || pItem )
{
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index b4657e6d4ccf..27329776a93e 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -111,7 +111,7 @@ namespace SwLangHelper
// get the language
OUString aNewLangText;
- SFX_REQUEST_ARG(rReq, pItem, SfxStringItem, SID_LANGUAGE_STATUS);
+ const SfxStringItem* pItem = rReq.GetArg<SfxStringItem>(SID_LANGUAGE_STATUS);
if (pItem)
aNewLangText = pItem->GetValue();
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index d40d21a0f43b..641b1f00257e 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -943,9 +943,9 @@ void SwTableShell::Execute(SfxRequest &rReq)
long nCount=0;
bool bHorizontal=true;
bool bProportional = false;
- SFX_REQUEST_ARG(rReq, pSplit, SfxInt32Item, FN_TABLE_SPLIT_CELLS);
- SFX_REQUEST_ARG(rReq, pHor, SfxBoolItem, FN_PARAM_1);
- SFX_REQUEST_ARG(rReq, pProp, SfxBoolItem, FN_PARAM_2);
+ const SfxInt32Item* pSplit = rReq.GetArg<SfxInt32Item>(FN_TABLE_SPLIT_CELLS);
+ const SfxBoolItem* pHor = rReq.GetArg<SfxBoolItem>(FN_PARAM_1);
+ const SfxBoolItem* pProp = rReq.GetArg<SfxBoolItem>(FN_PARAM_2);
if ( pSplit )
{
nCount = pSplit->GetValue();
@@ -985,7 +985,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
case FN_TABLE_SPLIT_TABLE:
{
- SFX_REQUEST_ARG(rReq, pType, SfxUInt16Item, FN_PARAM_1);
+ const SfxUInt16Item* pType = rReq.GetArg<SfxUInt16Item>(FN_PARAM_1);
if( pType )
{
switch( pType->GetValue() )
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index a69be420ccb1..4ea500e1d49c 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -347,7 +347,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break;
case FN_DELETE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG(rReq, pNoteItem, SfxStringItem, nSlot);
+ const SfxStringItem* pNoteItem = rReq.GetArg<SfxStringItem>(nSlot);
if ( pNoteItem && GetView().GetPostItMgr() )
GetView().GetPostItMgr()->Delete( pNoteItem->GetValue() );
}
@@ -365,7 +365,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
break;
case FN_HIDE_NOTE_AUTHOR:
{
- SFX_REQUEST_ARG(rReq, pNoteItem, SfxStringItem, nSlot);
+ const SfxStringItem* pNoteItem = rReq.GetArg<SfxStringItem>(nSlot);
if ( pNoteItem && GetView().GetPostItMgr() )
GetView().GetPostItMgr()->Hide( pNoteItem->GetValue() );
}
@@ -376,7 +376,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
bool bNew = !(pPostIt && pPostIt->GetTyp()->Which() == RES_POSTITFLD);
if (bNew || GetView().GetPostItMgr()->IsAnswer())
{
- SFX_REQUEST_ARG(rReq, pAuthorItem, SvxPostItAuthorItem, SID_ATTR_POSTIT_AUTHOR);
+ const SvxPostItAuthorItem* pAuthorItem = rReq.GetArg<SvxPostItAuthorItem>(SID_ATTR_POSTIT_AUTHOR);
OUString sAuthor;
if ( pAuthorItem )
sAuthor = pAuthorItem->GetValue();
@@ -388,7 +388,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
sAuthor = SW_RES( STR_REDLINE_UNKNOWN_AUTHOR );
}
- SFX_REQUEST_ARG(rReq, pTextItem, SvxPostItTextItem, SID_ATTR_POSTIT_TEXT);
+ const SvxPostItTextItem* pTextItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_TEXT);
OUString sText;
if ( pTextItem )
sText = pTextItem->GetValue();
@@ -543,8 +543,8 @@ void SwTextShell::ExecField(SfxRequest &rReq)
if ( pItem )
{
aText = static_cast<const SfxStringItem*>(pItem)->GetValue();
- SFX_REQUEST_ARG(rReq, pType, SfxStringItem, FN_PARAM_2);
- SFX_REQUEST_ARG(rReq, pIsUrl, SfxBoolItem, FN_PARAM_1);
+ const SfxStringItem* pType = rReq.GetArg<SfxStringItem>(FN_PARAM_2);
+ const SfxBoolItem* pIsUrl = rReq.GetArg<SfxBoolItem>(FN_PARAM_1);
if ( pType )
aType = pType->GetValue();
if ( pIsUrl )
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index 45f4ecbdc385..c842ef5e14d5 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -282,7 +282,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case SID_INSERT_OBJECT:
case SID_INSERT_PLUGIN:
{
- SFX_REQUEST_ARG(rReq, pNameItem, SfxGlobalNameItem, SID_INSERT_OBJECT);
+ const SfxGlobalNameItem* pNameItem = rReq.GetArg<SfxGlobalNameItem>(SID_INSERT_OBJECT);
SvGlobalName *pName = NULL;
SvGlobalName aName;
if ( pNameItem )
@@ -291,8 +291,8 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
pName = &aName;
}
- SFX_REQUEST_ARG(rReq, pClassLocationItem, SfxStringItem, FN_PARAM_2);
- SFX_REQUEST_ARG(rReq, pCommandsItem, SfxStringItem, FN_PARAM_3);
+ const SfxStringItem* pClassLocationItem = rReq.GetArg<SfxStringItem>(FN_PARAM_2);
+ const SfxStringItem* pCommandsItem = rReq.GetArg<SfxStringItem>(FN_PARAM_3);
//TODO/LATER: recording currently not working, need code for Commandlist
svt::EmbeddedObjectRef xObj;
if( nSlot == SID_INSERT_PLUGIN && ( pClassLocationItem || pCommandsItem ) )
@@ -353,11 +353,11 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case SID_INSERT_FLOATINGFRAME:
{
svt::EmbeddedObjectRef xObj;
- SFX_REQUEST_ARG(rReq, pNameItem, SfxStringItem, FN_PARAM_1);
- SFX_REQUEST_ARG(rReq, pURLItem, SfxStringItem, FN_PARAM_2);
- SFX_REQUEST_ARG(rReq, pMarginItem, SvxSizeItem, FN_PARAM_3);
- SFX_REQUEST_ARG(rReq, pScrollingItem, SfxByteItem, FN_PARAM_4);
- SFX_REQUEST_ARG(rReq, pBorderItem, SfxBoolItem, FN_PARAM_5);
+ const SfxStringItem* pNameItem = rReq.GetArg<SfxStringItem>(FN_PARAM_1);
+ const SfxStringItem* pURLItem = rReq.GetArg<SfxStringItem>(FN_PARAM_2);
+ const SvxSizeItem* pMarginItem = rReq.GetArg<SvxSizeItem>(FN_PARAM_3);
+ const SfxByteItem* pScrollingItem = rReq.GetArg<SfxByteItem>(FN_PARAM_4);
+ const SfxBoolItem* pBorderItem = rReq.GetArg<SfxBoolItem>(FN_PARAM_5);
if(pURLItem) // URL is a _must_
{
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index f67df16a5908..2e1b8eba6a56 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -189,7 +189,7 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
}
else if (pDlg && pReq)
{
- SFX_REQUEST_ARG((*pReq), pItem, SfxStringItem, FN_PARAM_1);
+ const SfxStringItem* pItem = (*pReq).GetArg<SfxStringItem>(FN_PARAM_1);
if (pItem)
pDlg->SetCurPageId(OUStringToOString(pItem->GetValue(), RTL_TEXTENCODING_UTF8));
}
@@ -323,7 +323,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
// get the language
OUString aNewLangText;
- SFX_REQUEST_ARG(rReq, pItem2, SfxStringItem, SID_LANGUAGE_STATUS);
+ const SfxStringItem* pItem2 = rReq.GetArg<SfxStringItem>(SID_LANGUAGE_STATUS);
if (pItem2)
aNewLangText = pItem2->GetValue();
@@ -435,7 +435,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
// replace word/selection with text from selected sub menu entry
OUString aReplaceText;
- SFX_REQUEST_ARG(rReq, pItem2, SfxStringItem, SID_THES);
+ const SfxStringItem* pItem2 = rReq.GetArg<SfxStringItem>(SID_THES);
if (pItem2)
aReplaceText = pItem2->GetValue();
if (!aReplaceText.isEmpty())
@@ -457,8 +457,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
case FN_INSERT_ENDNOTE:
{
OUString aStr;
- SFX_REQUEST_ARG(rReq, pFont, SfxStringItem, FN_PARAM_1);
- SFX_REQUEST_ARG(rReq, pNameItem, SfxStringItem, nSlot);
+ const SfxStringItem* pFont = rReq.GetArg<SfxStringItem>(FN_PARAM_1);
+ const SfxStringItem* pNameItem = rReq.GetArg<SfxStringItem>(nSlot);
if ( pNameItem )
aStr = pNameItem->GetValue();
bool bFont = pFont && !pFont->GetValue().isEmpty();
@@ -556,9 +556,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
if ( pItem )
{
nKind = static_cast<const SfxInt16Item*>(pItem)->GetValue();
- SFX_REQUEST_ARG(rReq, pTemplate, SfxStringItem, FN_PARAM_1);
- SFX_REQUEST_ARG(rReq, pNumber, SfxUInt16Item, FN_PARAM_2);
- SFX_REQUEST_ARG(rReq, pIsNumberFilled, SfxBoolItem, FN_PARAM_3);
+ const SfxStringItem* pTemplate = rReq.GetArg<SfxStringItem>(FN_PARAM_1);
+ const SfxUInt16Item* pNumber = rReq.GetArg<SfxUInt16Item>(FN_PARAM_2);
+ const SfxBoolItem* pIsNumberFilled = rReq.GetArg<SfxBoolItem>(FN_PARAM_3);
if ( pTemplate )
aTemplateName = pTemplate->GetValue();
if ( pNumber && pIsNumberFilled && pIsNumberFilled->GetValue() )
diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx
index 3c96264d08ae..9b3e89563f7d 100644
--- a/sw/source/uibase/shells/txtnum.cxx
+++ b/sw/source/uibase/shells/txtnum.cxx
@@ -50,7 +50,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
case FN_NUM_NUMBERING_ON:
{
GetShell().StartAllAction();
- SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, FN_PARAM_1);
+ const SfxBoolItem* pItem = rReq.GetArg<SfxBoolItem>(FN_PARAM_1);
bool bMode = !GetShell().SelectionHasNumber(); // #i29560#
if ( pItem )
bMode = pItem->GetValue();
@@ -79,7 +79,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
case FN_NUM_BULLET_ON:
{
GetShell().StartAllAction();
- SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, FN_PARAM_1);
+ const SfxBoolItem* pItem = rReq.GetArg<SfxBoolItem>(FN_PARAM_1);
bool bMode = !GetShell().SelectionHasBullet(); // #i29560#
if ( pItem )
bMode = pItem->GetValue();
@@ -186,7 +186,7 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq)
std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwTabDialog( DLG_SVXTEST_NUM_BULLET,
GetView().GetWindow(), &aSet, GetShell()));
OSL_ENSURE(pDlg, "Dialog creation failed!");
- SFX_REQUEST_ARG(rReq, pPageItem, SfxStringItem, FN_PARAM_1);
+ const SfxStringItem* pPageItem = rReq.GetArg<SfxStringItem>(FN_PARAM_1);
if ( pPageItem )
pDlg->SetCurPageId( OUStringToOString( pPageItem->GetValue(), RTL_TEXTENCODING_UTF8 ) );
const short nRet = pDlg->Execute();
@@ -247,7 +247,7 @@ void SwTextShell::ExecSetNumber(SfxRequest &rReq)
case FN_SVX_SET_NUMBER:
case FN_SVX_SET_BULLET:
{
- SFX_REQUEST_ARG(rReq, pItem, SfxUInt16Item, nSlot);
+ const SfxUInt16Item* pItem = rReq.GetArg<SfxUInt16Item>(nSlot);
if ( pItem != NULL )
{
const sal_uInt16 nChoosenItemIdx = pItem->GetValue();
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 64fa8a32a22b..982d5e96a72f 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -360,7 +360,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
OSL_FAIL("control access failed");
}
- SFX_REQUEST_ARG(rReq, pName, SfxStringItem, SID_INSERT_GRAPHIC);
+ const SfxStringItem* pName = rReq.GetArg<SfxStringItem>(SID_INSERT_GRAPHIC);
bool bShowError = !pName;
if( pName || ERRCODE_NONE == pFileDlg->Execute() )
{
@@ -369,7 +369,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
if ( pName )
{
aFileName = pName->GetValue();
- SFX_REQUEST_ARG(rReq, pFilter, SfxStringItem, FN_PARAM_FILTER);
+ const SfxStringItem* pFilter = rReq.GetArg<SfxStringItem>(FN_PARAM_FILTER);
if ( pFilter )
aFilterName = pFilter->GetValue();
}
@@ -405,8 +405,8 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq )
rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bAsLink ) );
}
- SFX_REQUEST_ARG(rReq, pAsLink, SfxBoolItem, FN_PARAM_1);
- SFX_REQUEST_ARG(rReq, pStyle, SfxStringItem, FN_PARAM_2);
+ const SfxBoolItem* pAsLink = rReq.GetArg<SfxBoolItem>(FN_PARAM_1);
+ const SfxStringItem* pStyle = rReq.GetArg<SfxStringItem>(FN_PARAM_2);
bool bAsLink = false;
if( nHtmlMode & HTMLMODE_ON )
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index e8dedb84493f..7a4364af6a11 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -115,7 +115,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
}
else if (nSlotId == SID_FM_CREATE_CONTROL)
{
- SFX_REQUEST_ARG(rReq, pIdentifierItem, SfxUInt16Item, SID_FM_CONTROL_IDENTIFIER);
+ const SfxUInt16Item* pIdentifierItem = rReq.GetArg<SfxUInt16Item>(SID_FM_CONTROL_IDENTIFIER);
if( pIdentifierItem )
{
sal_uInt16 nNewId = pIdentifierItem->GetValue();
@@ -131,7 +131,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
FmFormView* pFormView = dynamic_cast<FmFormView*>( pSdrView );
if ( pFormView )
{
- SFX_REQUEST_ARG(rReq, pDescriptorItem, SfxUnoAnyItem, SID_FM_DATACCESS_DESCRIPTOR);
+ const SfxUnoAnyItem* pDescriptorItem = rReq.GetArg<SfxUnoAnyItem>(SID_FM_DATACCESS_DESCRIPTOR);
OSL_ENSURE( pDescriptorItem, "SwView::ExecDraw(SID_FM_CREATE_FIELDCONTROL): invalid request args!" );
if( pDescriptorItem )
{
@@ -297,7 +297,7 @@ void SwView::ExecDraw(SfxRequest& rReq)
case SID_FM_CREATE_CONTROL:
{
- SFX_REQUEST_ARG(rReq, pIdentifierItem, SfxUInt16Item, SID_FM_CONTROL_IDENTIFIER);
+ const SfxUInt16Item* pIdentifierItem = rReq.GetArg<SfxUInt16Item>(SID_FM_CONTROL_IDENTIFIER);
if( pIdentifierItem )
nSlotId = pIdentifierItem->GetValue();
pFuncPtr = new ConstFormControl(m_pWrtShell, m_pEditWin, this);
diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx
index c56751b454ca..760e480c355f 100644
--- a/sw/source/uibase/uiview/viewprt.cxx
+++ b/sw/source/uibase/uiview/viewprt.cxx
@@ -190,9 +190,9 @@ void SwView::ExecutePrint(SfxRequest& rReq)
case SID_PRINTDOCDIRECT:
{
SwWrtShell* pSh = &GetWrtShell();
- SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT);
+ const SfxBoolItem* pSilentItem = rReq.GetArg<SfxBoolItem>(SID_SILENT);
bool bSilent = pSilentItem && pSilentItem->GetValue();
- SFX_REQUEST_ARG(rReq, pPrintFromMergeItem, SfxBoolItem, FN_QRY_MERGE);
+ const SfxBoolItem* pPrintFromMergeItem = rReq.GetArg<SfxBoolItem>(FN_QRY_MERGE);
if(pPrintFromMergeItem)
rReq.RemoveItem(FN_QRY_MERGE);
bool bFromMerge = pPrintFromMergeItem && pPrintFromMergeItem->GetValue();