summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/baside2.cxx2
-rw-r--r--basctl/source/basicide/basides1.cxx18
-rw-r--r--include/sfx2/request.hxx13
-rw-r--r--sc/source/ui/app/scmod.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx2
-rw-r--r--sc/source/ui/drawfunc/drawsh5.cxx2
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx2
-rw-r--r--sc/source/ui/drawfunc/drtxtob2.cxx2
-rw-r--r--sc/source/ui/drawfunc/fuconuno.cxx4
-rw-r--r--sc/source/ui/drawfunc/fuins2.cxx2
-rw-r--r--sc/source/ui/view/cellsh1.cxx20
-rw-r--r--sc/source/ui/view/editsh.cxx2
-rw-r--r--sc/source/ui/view/formatsh.cxx4
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx2
-rw-r--r--sc/source/ui/view/tabvwshb.cxx2
-rw-r--r--sd/source/ui/app/sdmod1.cxx6
-rw-r--r--sd/source/ui/docshell/docshel3.cxx2
-rw-r--r--sd/source/ui/framework/tools/FrameworkHelper.cxx2
-rw-r--r--sd/source/ui/func/fuconarc.cxx12
-rw-r--r--sd/source/ui/func/fuconrec.cxx16
-rw-r--r--sd/source/ui/func/fuconuno.cxx4
-rw-r--r--sd/source/ui/func/fuinsert.cxx2
-rw-r--r--sd/source/ui/func/fuinsfil.cxx4
-rw-r--r--sd/source/ui/func/fuolbull.cxx2
-rw-r--r--sd/source/ui/func/fuscale.cxx2
-rw-r--r--sd/source/ui/func/fusnapln.cxx2
-rw-r--r--sd/source/ui/func/futempl.cxx4
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx2
-rw-r--r--sd/source/ui/table/tablefunction.cxx6
-rw-r--r--sd/source/ui/view/ViewShellImplementation.cxx12
-rw-r--r--sd/source/ui/view/drtxtob1.cxx2
-rw-r--r--sd/source/ui/view/drviews2.cxx65
-rw-r--r--sd/source/ui/view/drviews3.cxx18
-rw-r--r--sd/source/ui/view/drviews9.cxx76
-rw-r--r--sd/source/ui/view/drviewse.cxx8
-rw-r--r--sd/source/ui/view/outlnvs2.cxx2
-rw-r--r--sd/source/ui/view/viewshe3.cxx10
-rw-r--r--sfx2/source/appl/appbas.cxx2
-rw-r--r--sfx2/source/appl/appopen.cxx58
-rw-r--r--sfx2/source/appl/appserv.cxx17
-rw-r--r--sfx2/source/control/request.cxx23
-rw-r--r--sfx2/source/doc/objserv.cxx17
-rw-r--r--sfx2/source/view/viewfrm.cxx32
-rw-r--r--sfx2/source/view/viewfrm2.cxx6
-rw-r--r--sfx2/source/view/viewprn.cxx6
-rw-r--r--sfx2/source/view/viewsh.cxx10
-rw-r--r--svx/source/form/fmshell.cxx10
-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
63 files changed, 308 insertions, 333 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 7017f2cab53c..2aaf3b865db0 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1010,7 +1010,7 @@ void ModulWindow::ExecuteCommand (SfxRequest& rReq)
break;
case SID_SHOWLINES:
{
- SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, rReq.GetSlot());
+ const SfxBoolItem* pItem = rReq.GetArg<SfxBoolItem>(rReq.GetSlot());
bSourceLinesEnabled = pItem && pItem->GetValue();
aXEditorWindow->SetLineNumberDisplay(bSourceLinesEnabled);
}
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 05dd7afa3c71..5ab729c1277b 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -221,7 +221,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
{
uno::Reference< task::XStatusIndicator > xStatusIndicator;
- SFX_REQUEST_ARG(rReq, pStatusIndicatorItem, SfxUnoAnyItem, SID_PROGRESS_STATUSBAR_CONTROL);
+ const SfxUnoAnyItem* pStatusIndicatorItem = rReq.GetArg<SfxUnoAnyItem>(SID_PROGRESS_STATUSBAR_CONTROL);
if ( pStatusIndicatorItem )
OSL_VERIFY( pStatusIndicatorItem->GetValue() >>= xStatusIndicator );
else
@@ -558,7 +558,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
{
std::unique_ptr< ScriptDocument > pDocument;
- SFX_REQUEST_ARG(rReq, pDocumentItem, SfxStringItem, SID_BASICIDE_ARG_DOCUMENT);
+ const SfxStringItem* pDocumentItem = rReq.GetArg<SfxStringItem>(SID_BASICIDE_ARG_DOCUMENT);
if ( pDocumentItem )
{
OUString sDocumentCaption = pDocumentItem->GetValue();
@@ -566,7 +566,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
pDocument.reset( new ScriptDocument( ScriptDocument::getDocumentWithURLOrCaption( sDocumentCaption ) ) );
}
- SFX_REQUEST_ARG(rReq, pDocModelItem, SfxUsrAnyItem, SID_BASICIDE_ARG_DOCUMENT_MODEL);
+ const SfxUsrAnyItem* pDocModelItem = rReq.GetArg<SfxUsrAnyItem>(SID_BASICIDE_ARG_DOCUMENT_MODEL);
if ( !pDocument.get() && pDocModelItem )
{
uno::Reference< frame::XModel > xModel( pDocModelItem->GetValue(), UNO_QUERY );
@@ -577,21 +577,21 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
if ( !pDocument.get() )
break;
- SFX_REQUEST_ARG(rReq, pLibNameItem, SfxStringItem, SID_BASICIDE_ARG_LIBNAME);
+ const SfxStringItem* pLibNameItem = rReq.GetArg<SfxStringItem>(SID_BASICIDE_ARG_LIBNAME);
if ( !pLibNameItem )
break;
OUString aLibName( pLibNameItem->GetValue() );
pDocument->loadLibraryIfExists( E_SCRIPTS, aLibName );
SetCurLib( *pDocument, aLibName );
- SFX_REQUEST_ARG(rReq, pNameItem, SfxStringItem, SID_BASICIDE_ARG_NAME);
+ const SfxStringItem* pNameItem = rReq.GetArg<SfxStringItem>(SID_BASICIDE_ARG_NAME);
if ( pNameItem )
{
OUString aName( pNameItem->GetValue() );
OUString aModType( "Module" );
OUString aDlgType( "Dialog" );
OUString aType( aModType );
- SFX_REQUEST_ARG(rReq, pTypeItem, SfxStringItem, SID_BASICIDE_ARG_TYPE);
+ const SfxStringItem* pTypeItem = rReq.GetArg<SfxStringItem>(SID_BASICIDE_ARG_TYPE);
if ( pTypeItem )
aType = pTypeItem->GetValue();
@@ -609,7 +609,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
if (ModulWindow* pModWin = dynamic_cast<ModulWindow*>(pWin))
{
- SFX_REQUEST_ARG(rReq, pLineItem, SfxUInt32Item, SID_BASICIDE_ARG_LINE);
+ const SfxUInt32Item* pLineItem = rReq.GetArg<SfxUInt32Item>(SID_BASICIDE_ARG_LINE);
if ( pLineItem )
{
pModWin->AssertValidEditEngine();
@@ -642,7 +642,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
pModWin->GetEditVScrollBar().SetThumbPos( pTextView->GetStartDocPos().Y() );
}
sal_uInt16 nCol1 = 0, nCol2 = 0;
- SFX_REQUEST_ARG(rReq, pCol1Item, SfxUInt16Item, SID_BASICIDE_ARG_COLUMN1);
+ const SfxUInt16Item* pCol1Item = rReq.GetArg<SfxUInt16Item>(SID_BASICIDE_ARG_COLUMN1);
if ( pCol1Item )
{
nCol1 = pCol1Item->GetValue();
@@ -650,7 +650,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
--nCol1;
nCol2 = nCol1;
}
- SFX_REQUEST_ARG(rReq, pCol2Item, SfxUInt16Item, SID_BASICIDE_ARG_COLUMN2);
+ const SfxUInt16Item* pCol2Item = rReq.GetArg<SfxUInt16Item>(SID_BASICIDE_ARG_COLUMN2);
if ( pCol2Item )
{
nCol2 = pCol2Item->GetValue();
diff --git a/include/sfx2/request.hxx b/include/sfx2/request.hxx
index 9b6e54dd9409..8f03849378f9 100644
--- a/include/sfx2/request.hxx
+++ b/include/sfx2/request.hxx
@@ -81,7 +81,15 @@ public:
static const SfxPoolItem* GetItem( const SfxItemSet*, sal_uInt16 nSlotId,
bool bDeep = false,
std::function<bool ( const SfxPoolItem* )> isItemType = nullptr );
- const SfxPoolItem* GetArg( sal_uInt16 nSlotId, bool bDeep = false, std::function<bool ( const SfxPoolItem* )> isItemType = nullptr ) const;
+
+ /** Templatized access to the individual parameters of the SfxRequest.
+
+ Use like: const SfxInt32Item *pPosItem = rReq.GetArg<SfxInt32Item>(SID_POS);
+ */
+ template<class T> const T* GetArg(sal_uInt16 nSlotId) const
+ {
+ return dynamic_cast<const T*>(GetItem(pArgs, nSlotId));
+ }
void ReleaseArgs();
void SetReturnValue(const SfxPoolItem &);
@@ -115,9 +123,6 @@ template<class T> bool checkSfxPoolItem(const SfxPoolItem* pItem)
return dynamic_cast<const T*>(pItem) != nullptr;
}
-#define SFX_REQUEST_ARG(rReq, pItem, ItemType, nSlotId) \
- const ItemType *pItem = static_cast<const ItemType*>( \
- rReq.GetArg( nSlotId, false, checkSfxPoolItem<ItemType> ) )
#define SFX_ITEMSET_ARG(pArgs, pItem, ItemType, nSlotId) \
const ItemType *pItem = static_cast<const ItemType*>( \
SfxRequest::GetItem( pArgs, nSlotId, false, checkSfxPoolItem<ItemType> ) )
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 458ea4ae7c2e..dcf9d51f97e7 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -455,7 +455,7 @@ void ScModule::Execute( SfxRequest& rReq )
{
ScAppOptions aNewOpts( GetAppOptions() );
bool bNew = !aNewOpts.GetDetectiveAuto();
- SFX_REQUEST_ARG(rReq, pAuto, SfxBoolItem, SID_DETECTIVE_AUTO);
+ const SfxBoolItem* pAuto = rReq.GetArg<SfxBoolItem>(SID_DETECTIVE_AUTO);
if ( pAuto )
bNew = pAuto->GetValue();
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 49939ab14edf..c0ffe06de98a 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -566,7 +566,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
{
ScDocument& rDoc = GetDocument();
// get argument (recorded macro)
- SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, FID_CHG_RECORD);
+ const SfxBoolItem* pItem = rReq.GetArg<SfxBoolItem>(FID_CHG_RECORD);
bool bDo = true;
// xmlsec05/06:
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx
index d67eee28ca18..65bae265db17 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -461,7 +461,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq )
case SID_ENABLE_HYPHENATION:
{
- SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, SID_ENABLE_HYPHENATION);
+ const SfxBoolItem* pItem = rReq.GetArg<SfxBoolItem>(SID_ENABLE_HYPHENATION);
if( pItem )
{
SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 5d354e88221f..0937cc6da64c 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -344,7 +344,7 @@ void ScDrawTextObjectBar::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())
diff --git a/sc/source/ui/drawfunc/drtxtob2.cxx b/sc/source/ui/drawfunc/drtxtob2.cxx
index b214f7cc4515..223b2b7227f5 100644
--- a/sc/source/ui/drawfunc/drtxtob2.cxx
+++ b/sc/source/ui/drawfunc/drtxtob2.cxx
@@ -104,7 +104,7 @@ void ScDrawTextObjectBar::ExecuteGlobal( SfxRequest &rReq )
case SID_ENABLE_HYPHENATION:
{
- SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, SID_ENABLE_HYPHENATION);
+ const SfxBoolItem* pItem = rReq.GetArg<SfxBoolItem>(SID_ENABLE_HYPHENATION);
if( pItem )
{
SfxItemSet aSet( GetPool(), EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
diff --git a/sc/source/ui/drawfunc/fuconuno.cxx b/sc/source/ui/drawfunc/fuconuno.cxx
index cba33724a1f9..518f2548385c 100644
--- a/sc/source/ui/drawfunc/fuconuno.cxx
+++ b/sc/source/ui/drawfunc/fuconuno.cxx
@@ -34,8 +34,8 @@ FuConstUnoControl::FuConstUnoControl(ScTabViewShell* pViewSh, vcl::Window* pWin,
, nInventor(0)
, nIdentifier(0)
{
- SFX_REQUEST_ARG(rReq, pInventorItem, SfxUInt32Item, SID_FM_CONTROL_INVENTOR);
- SFX_REQUEST_ARG(rReq, pIdentifierItem, SfxUInt16Item, SID_FM_CONTROL_IDENTIFIER);
+ const SfxUInt32Item* pInventorItem = rReq.GetArg<SfxUInt32Item>(SID_FM_CONTROL_INVENTOR);
+ const SfxUInt16Item* pIdentifierItem = rReq.GetArg<SfxUInt16Item>(SID_FM_CONTROL_IDENTIFIER);
if( pInventorItem )
nInventor = pInventorItem->GetValue();
if( pIdentifierItem )
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 48ecd5c9cba7..6a5338681f64 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -214,7 +214,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView*
uno::Reference< io::XInputStream > xIconMetaFile;
sal_uInt16 nSlot = rReq.GetSlot();
- SFX_REQUEST_ARG(rReq, pNameItem, SfxGlobalNameItem, SID_INSERT_OBJECT);
+ const SfxGlobalNameItem* pNameItem = rReq.GetArg<SfxGlobalNameItem>(SID_INSERT_OBJECT);
if ( nSlot == SID_INSERT_OBJECT && pNameItem )
{
SvGlobalName aClassName = pNameItem->GetValue();
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 445e7cb5ea79..2d7bc84f3818 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -1359,11 +1359,11 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
}
}
- SFX_REQUEST_ARG(rReq, pFuncItem, SfxUInt16Item, FN_PARAM_1);
- SFX_REQUEST_ARG(rReq, pSkipItem, SfxBoolItem, FN_PARAM_2);
- SFX_REQUEST_ARG(rReq, pTransposeItem, SfxBoolItem, FN_PARAM_3);
- SFX_REQUEST_ARG(rReq, pLinkItem, SfxBoolItem, FN_PARAM_4);
- SFX_REQUEST_ARG(rReq, pMoveItem, SfxInt16Item, FN_PARAM_5);
+ const SfxUInt16Item* pFuncItem = rReq.GetArg<SfxUInt16Item>(FN_PARAM_1);
+ const SfxBoolItem* pSkipItem = rReq.GetArg<SfxBoolItem>(FN_PARAM_2);
+ const SfxBoolItem* pTransposeItem = rReq.GetArg<SfxBoolItem>(FN_PARAM_3);
+ const SfxBoolItem* pLinkItem = rReq.GetArg<SfxBoolItem>(FN_PARAM_4);
+ const SfxInt16Item* pMoveItem = rReq.GetArg<SfxInt16Item>(FN_PARAM_5);
if ( pFuncItem )
nFunction = static_cast<ScPasteFunc>(pFuncItem->GetValue());
if ( pSkipItem )
@@ -2475,19 +2475,19 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
OUString aSource;
sal_uLong nRefresh=0;
- SFX_REQUEST_ARG(rReq, pFile, SfxStringItem, SID_FILE_NAME);
- SFX_REQUEST_ARG(rReq, pSource, SfxStringItem, FN_PARAM_1);
+ const SfxStringItem* pFile = rReq.GetArg<SfxStringItem>(SID_FILE_NAME);
+ const SfxStringItem* pSource = rReq.GetArg<SfxStringItem>(FN_PARAM_1);
if ( pFile && pSource )
{
aFile = pFile->GetValue();
aSource = pSource->GetValue();
- SFX_REQUEST_ARG(rReq, pFilter, SfxStringItem, SID_FILTER_NAME);
+ const SfxStringItem* pFilter = rReq.GetArg<SfxStringItem>(SID_FILTER_NAME);
if ( pFilter )
aFilter = pFilter->GetValue();
- SFX_REQUEST_ARG(rReq, pOptions, SfxStringItem, SID_FILE_FILTEROPTIONS);
+ const SfxStringItem* pOptions = rReq.GetArg<SfxStringItem>(SID_FILE_FILTEROPTIONS);
if ( pOptions )
aOptions = pOptions->GetValue();
- SFX_REQUEST_ARG(rReq, pRefresh, SfxUInt32Item, FN_PARAM_2);
+ const SfxUInt32Item* pRefresh = rReq.GetArg<SfxUInt32Item>(FN_PARAM_2);
if ( pRefresh )
nRefresh = pRefresh->GetValue();
}
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 58b5de8e8b9d..f087fe8f149d 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -210,7 +210,7 @@ void ScEditShell::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())
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 4ec667b96036..d2f8e91b215b 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -399,8 +399,8 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
case SID_STYLE_APPLY:
{
- 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 )
{
com::sun::star::uno::Reference< com::sun::star::style::XStyleFamiliesSupplier > xModel(pDocSh->GetModel(), com::sun::star::uno::UNO_QUERY);
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 4a4d868ea3a9..0f3b1d177edc 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -307,7 +307,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
pTabView->SetDrawFuncPtr( new FuConstCustomShape( this, pWin, pView, pDoc, aNewReq ));
if ( nNewId != SID_DRAW_CS_ID )
{
- SFX_REQUEST_ARG(rReq, pEnumCommand, SfxStringItem, nNewId);
+ const SfxStringItem* pEnumCommand = rReq.GetArg<SfxStringItem>(nNewId);
if ( pEnumCommand )
{
SfxBindings& rBind = GetViewFrame()->GetBindings();
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 3299e0f92d31..2e9d63f6013c 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -794,7 +794,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
SCTAB nTab;
::std::vector < sal_Int32 > aIndexList;
- SFX_REQUEST_ARG(rReq, pItem, SfxIntegerListItem, SID_SELECT_TABLES);
+ const SfxIntegerListItem* pItem = rReq.GetArg<SfxIntegerListItem>(SID_SELECT_TABLES);
if ( pItem )
pItem->GetList( aIndexList );
else
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index c2b44ed4f1f5..fdeeda14016e 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -375,7 +375,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
case SID_FM_CREATE_FIELDCONTROL:
{
- SFX_REQUEST_ARG(rReq, pDescriptorItem, SfxUnoAnyItem, SID_FM_DATACCESS_DESCRIPTOR);
+ const SfxUnoAnyItem* pDescriptorItem = rReq.GetArg<SfxUnoAnyItem>(SID_FM_DATACCESS_DESCRIPTOR);
OSL_ENSURE( pDescriptorItem, "SID_FM_CREATE_FIELDCONTROL: invalid request args!" );
if(pDescriptorItem)
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 9b53e92ff335..cdadcc55a3bc 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -235,7 +235,7 @@ void SdModule::Execute(SfxRequest& rReq)
{
ScopedVclPtrInstance<MessageDialog>::Create(nullptr, SD_RESSTR(STR_CANT_PERFORM_IN_LIVEMODE))->Execute();
- SFX_REQUEST_ARG(rReq, pLinkItem, SfxLinkItem, SID_DONELINK);
+ const SfxLinkItem* pLinkItem = rReq.GetArg<SfxLinkItem>(SID_DONELINK);
if( pLinkItem )
pLinkItem->GetValue().Call( 0 );
}
@@ -274,7 +274,7 @@ bool SdModule::OutlineToImpress(SfxRequest& rRequest)
pDoc->StopWorkStartupDelay();
}
- SFX_REQUEST_ARG(rRequest, pFrmItem, SfxFrameItem, SID_DOCFRAME);
+ const SfxFrameItem* pFrmItem = rRequest.GetArg<SfxFrameItem>(SID_DOCFRAME);
SfxViewFrame::LoadDocumentIntoFrame( *pDocSh, pFrmItem, ::sd::OUTLINE_FACTORY_ID );
::sd::ViewShell* pViewSh = pDocSh->GetViewShell();
@@ -522,7 +522,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
if ( SvtModuleOptions().IsImpress() )
{
Reference< XFrame > xTargetFrame;
- SFX_REQUEST_ARG(rReq, pFrmItem, SfxUnoFrameItem, SID_FILLFRAME);
+ const SfxUnoFrameItem* pFrmItem = rReq.GetArg<SfxUnoFrameItem>(SID_FILLFRAME);
if ( pFrmItem )
xTargetFrame = pFrmItem->GetFrame();
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index a68ce9c0fc87..7775d83c5c3b 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -273,7 +273,7 @@ void DrawDocShell::Execute( SfxRequest& rReq )
case SID_LANGUAGE_STATUS:
{
OUString aNewLangTxt;
- SFX_REQUEST_ARG(rReq, pItem, SfxStringItem, SID_LANGUAGE_STATUS);
+ const SfxStringItem* pItem = rReq.GetArg<SfxStringItem>(SID_LANGUAGE_STATUS);
if (pItem)
aNewLangTxt = pItem->GetValue();
if (aNewLangTxt == "*" )
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx
index c9c779f0f1f5..1d081653ea34 100644
--- a/sd/source/ui/framework/tools/FrameworkHelper.cxx
+++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx
@@ -538,7 +538,7 @@ void FrameworkHelper::HandleModeChangeSlot (
const SfxItemSet* pRequestArguments = rRequest.GetArgs();
if (pRequestArguments)
{
- SFX_REQUEST_ARG(rRequest, pIsActive, SfxBoolItem, (sal_uInt16)nSlotId);
+ const SfxBoolItem* pIsActive = rRequest.GetArg<SfxBoolItem>((sal_uInt16)nSlotId);
bIsActive = pIsActive->GetValue ();
}
}
diff --git a/sd/source/ui/func/fuconarc.cxx b/sd/source/ui/func/fuconarc.cxx
index 1ee7c3648c1f..3360b3efa4a5 100644
--- a/sd/source/ui/func/fuconarc.cxx
+++ b/sd/source/ui/func/fuconarc.cxx
@@ -78,12 +78,12 @@ void FuConstructArc::DoExecute( SfxRequest& rReq )
if (pArgs)
{
- SFX_REQUEST_ARG(rReq, pCenterX, SfxUInt32Item, ID_VAL_CENTER_X);
- SFX_REQUEST_ARG(rReq, pCenterY, SfxUInt32Item, ID_VAL_CENTER_Y);
- SFX_REQUEST_ARG(rReq, pAxisX, SfxUInt32Item, ID_VAL_AXIS_X);
- SFX_REQUEST_ARG(rReq, pAxisY, SfxUInt32Item, ID_VAL_AXIS_Y);
- SFX_REQUEST_ARG(rReq, pPhiStart, SfxUInt32Item, ID_VAL_ANGLESTART);
- SFX_REQUEST_ARG(rReq, pPhiEnd, SfxUInt32Item, ID_VAL_ANGLEEND);
+ const SfxUInt32Item* pCenterX = rReq.GetArg<SfxUInt32Item>(ID_VAL_CENTER_X);
+ const SfxUInt32Item* pCenterY = rReq.GetArg<SfxUInt32Item>(ID_VAL_CENTER_Y);
+ const SfxUInt32Item* pAxisX = rReq.GetArg<SfxUInt32Item>(ID_VAL_AXIS_X);
+ const SfxUInt32Item* pAxisY = rReq.GetArg<SfxUInt32Item>(ID_VAL_AXIS_Y);
+ const SfxUInt32Item* pPhiStart = rReq.GetArg<SfxUInt32Item>(ID_VAL_ANGLESTART);
+ const SfxUInt32Item* pPhiEnd = rReq.GetArg<SfxUInt32Item>(ID_VAL_ANGLEEND);
Rectangle aNewRectangle (pCenterX->GetValue () - pAxisX->GetValue () / 2,
pCenterY->GetValue () - pAxisY->GetValue () / 2,
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index ecdd9d2b9a03..9536ad9b432e 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -101,10 +101,10 @@ void FuConstructRectangle::DoExecute( SfxRequest& rReq )
{
case SID_DRAW_ELLIPSE :
{
- SFX_REQUEST_ARG(rReq, pCenterX, SfxUInt32Item, ID_VAL_CENTER_X);
- SFX_REQUEST_ARG(rReq, pCenterY, SfxUInt32Item, ID_VAL_CENTER_Y);
- SFX_REQUEST_ARG(rReq, pAxisX, SfxUInt32Item, ID_VAL_AXIS_X);
- SFX_REQUEST_ARG(rReq, pAxisY, SfxUInt32Item, ID_VAL_AXIS_Y);
+ const SfxUInt32Item* pCenterX = rReq.GetArg<SfxUInt32Item>(ID_VAL_CENTER_X);
+ const SfxUInt32Item* pCenterY = rReq.GetArg<SfxUInt32Item>(ID_VAL_CENTER_Y);
+ const SfxUInt32Item* pAxisX = rReq.GetArg<SfxUInt32Item>(ID_VAL_AXIS_X);
+ const SfxUInt32Item* pAxisY = rReq.GetArg<SfxUInt32Item>(ID_VAL_AXIS_Y);
Rectangle aNewRectangle (pCenterX->GetValue () - pAxisX->GetValue () / 2,
pCenterY->GetValue () - pAxisY->GetValue () / 2,
@@ -119,10 +119,10 @@ void FuConstructRectangle::DoExecute( SfxRequest& rReq )
case SID_DRAW_RECT :
{
- SFX_REQUEST_ARG(rReq, pMouseStartX, SfxUInt32Item, ID_VAL_MOUSESTART_X);
- SFX_REQUEST_ARG(rReq, pMouseStartY, SfxUInt32Item, ID_VAL_MOUSESTART_Y);
- SFX_REQUEST_ARG(rReq, pMouseEndX, SfxUInt32Item, ID_VAL_MOUSEEND_X);
- SFX_REQUEST_ARG(rReq, pMouseEndY, SfxUInt32Item, ID_VAL_MOUSEEND_Y);
+ const SfxUInt32Item* pMouseStartX = rReq.GetArg<SfxUInt32Item>(ID_VAL_MOUSESTART_X);
+ const SfxUInt32Item* pMouseStartY = rReq.GetArg<SfxUInt32Item>(ID_VAL_MOUSESTART_Y);
+ const SfxUInt32Item* pMouseEndX = rReq.GetArg<SfxUInt32Item>(ID_VAL_MOUSEEND_X);
+ const SfxUInt32Item* pMouseEndY = rReq.GetArg<SfxUInt32Item>(ID_VAL_MOUSEEND_Y);
Rectangle aNewRectangle (pMouseStartX->GetValue (),
pMouseStartY->GetValue (),
diff --git a/sd/source/ui/func/fuconuno.cxx b/sd/source/ui/func/fuconuno.cxx
index 547d8be60de3..af015b9a923b 100644
--- a/sd/source/ui/func/fuconuno.cxx
+++ b/sd/source/ui/func/fuconuno.cxx
@@ -68,8 +68,8 @@ void FuConstructUnoControl::DoExecute( SfxRequest& rReq )
{
FuConstruct::DoExecute( rReq );
- SFX_REQUEST_ARG(rReq, pInventorItem, SfxUInt32Item, SID_FM_CONTROL_INVENTOR);
- SFX_REQUEST_ARG(rReq, pIdentifierItem, SfxUInt16Item, SID_FM_CONTROL_IDENTIFIER);
+ const SfxUInt32Item* pInventorItem = rReq.GetArg<SfxUInt32Item>(SID_FM_CONTROL_INVENTOR);
+ const SfxUInt16Item* pIdentifierItem = rReq.GetArg<SfxUInt16Item>(SID_FM_CONTROL_IDENTIFIER);
if( pInventorItem )
nInventor = pInventorItem->GetValue();
if( pIdentifierItem )
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 9ffaaad848b7..6e2c856cbb97 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -432,7 +432,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
OUString aIconMediaType;
uno::Reference< io::XInputStream > xIconMetaFile;
- SFX_REQUEST_ARG(rReq, pNameItem, SfxGlobalNameItem, SID_INSERT_OBJECT);
+ const SfxGlobalNameItem* pNameItem = rReq.GetArg<SfxGlobalNameItem>(SID_INSERT_OBJECT);
if ( nSlotId == SID_INSERT_OBJECT && pNameItem )
{
SvGlobalName aClassName = pNameItem->GetValue();
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index 80e9906e8146..19f175e58a23 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -248,8 +248,8 @@ void FuInsertFile::DoExecute( SfxRequest& rReq )
}
else
{
- SFX_REQUEST_ARG(rReq, pFileName, SfxStringItem, ID_VAL_DUMMY0);
- SFX_REQUEST_ARG(rReq, pFilterName, SfxStringItem, ID_VAL_DUMMY1);
+ const SfxStringItem* pFileName = rReq.GetArg<SfxStringItem>(ID_VAL_DUMMY0);
+ const SfxStringItem* pFilterName = rReq.GetArg<SfxStringItem>(ID_VAL_DUMMY1);
aFile = pFileName->GetValue ();
diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index f2d53f0dfbd6..cee7082409f9 100644
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -143,7 +143,7 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq)
return;
}
- SFX_REQUEST_ARG(rReq, pItem, SfxUInt16Item, nSId);
+ const SfxUInt16Item* pItem = rReq.GetArg<SfxUInt16Item>(nSId);
if ( !pItem )
{
rReq.Done();
diff --git a/sd/source/ui/func/fuscale.cxx b/sd/source/ui/func/fuscale.cxx
index 6ad4fba0915a..b33f264edba9 100644
--- a/sd/source/ui/func/fuscale.cxx
+++ b/sd/source/ui/func/fuscale.cxx
@@ -179,7 +179,7 @@ void FuScale::DoExecute( SfxRequest& rReq )
}
else if(mpViewShell && (pArgs->Count () == 1))
{
- SFX_REQUEST_ARG(rReq, pScale, SfxUInt32Item, ID_VAL_ZOOM);
+ const SfxUInt32Item* pScale = rReq.GetArg<SfxUInt32Item>(ID_VAL_ZOOM);
mpViewShell->SetZoom (pScale->GetValue ());
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArrayZoom );
diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx
index 5eed09d51acc..8e121c990389 100644
--- a/sd/source/ui/func/fusnapln.cxx
+++ b/sd/source/ui/func/fusnapln.cxx
@@ -61,7 +61,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
bool bCreateNew = true;
// Get index of snap line or snap point from the request.
- SFX_REQUEST_ARG(rReq, pHelpLineIndex, SfxUInt32Item, ID_VAL_INDEX);
+ const SfxUInt32Item* pHelpLineIndex = rReq.GetArg<SfxUInt32Item>(ID_VAL_INDEX);
if (pHelpLineIndex != NULL)
{
nHelpLine = static_cast<sal_uInt16>(pHelpLineIndex->GetValue());
diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx
index 3eb303b312bb..21ddb1a1882a 100644
--- a/sd/source/ui/func/futempl.cxx
+++ b/sd/source/ui/func/futempl.cxx
@@ -133,8 +133,8 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
case SID_STYLE_FAMILY:
case SID_STYLE_NEW_BY_EXAMPLE:
{
- 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 )
{
try
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 74149682e9aa..14fcf10edc95 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -151,7 +151,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
case SID_PAGES_PER_ROW:
if (rRequest.GetArgs() != NULL)
{
- SFX_REQUEST_ARG(rRequest, pPagesPerRow, SfxUInt16Item, SID_PAGES_PER_ROW);
+ const SfxUInt16Item* pPagesPerRow = rRequest.GetArg<SfxUInt16Item>(SID_PAGES_PER_ROW);
if (pPagesPerRow != NULL)
{
sal_Int32 nColumnCount = pPagesPerRow->GetValue();
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index 8a165c47de3e..d3c32d68a0d2 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -112,9 +112,9 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
sal_Int32 nRows = 0;
OUString sTableStyle;
- SFX_REQUEST_ARG(rReq, pCols, SfxUInt16Item, SID_ATTR_TABLE_COLUMN);
- SFX_REQUEST_ARG(rReq, pRows, SfxUInt16Item, SID_ATTR_TABLE_ROW);
- SFX_REQUEST_ARG(rReq, pStyle, SfxStringItem, SID_TABLE_STYLE);
+ const SfxUInt16Item* pCols = rReq.GetArg<SfxUInt16Item>(SID_ATTR_TABLE_COLUMN);
+ const SfxUInt16Item* pRows = rReq.GetArg<SfxUInt16Item>(SID_ATTR_TABLE_ROW);
+ const SfxStringItem* pStyle = rReq.GetArg<SfxStringItem>(SID_TABLE_STYLE);
if( pCols )
nColumns = pCols->GetValue();
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index 63d15393e74e..439389902628 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -128,10 +128,10 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
}
else if (pArgs->Count() == 4)
{
- SFX_REQUEST_ARG(rRequest, pNewName, SfxStringItem, ID_VAL_PAGENAME);
- SFX_REQUEST_ARG(rRequest, pNewAutoLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT);
- SFX_REQUEST_ARG(rRequest, pBVisible, SfxBoolItem, ID_VAL_ISPAGEBACK);
- SFX_REQUEST_ARG(rRequest, pBObjsVisible, SfxBoolItem, ID_VAL_ISPAGEOBJ);
+ const SfxStringItem* pNewName = rRequest.GetArg<SfxStringItem>(ID_VAL_PAGENAME);
+ const SfxUInt32Item* pNewAutoLayout = rRequest.GetArg<SfxUInt32Item>(ID_VAL_WHATLAYOUT);
+ const SfxBoolItem* pBVisible = rRequest.GetArg<SfxBoolItem>(ID_VAL_ISPAGEBACK);
+ const SfxBoolItem* pBObjsVisible = rRequest.GetArg<SfxBoolItem>(ID_VAL_ISPAGEOBJ);
AutoLayout aLayout ((AutoLayout)pNewAutoLayout->GetValue ());
if (aLayout >= AUTOLAYOUT__START
&& aLayout < AUTOLAYOUT__END)
@@ -234,8 +234,8 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
void ViewShell::Implementation::AssignLayout ( SfxRequest& rRequest, PageKind ePageKind )
{
- const SfxUInt32Item* pWhatPage = static_cast< const SfxUInt32Item* > ( rRequest.GetArg( ID_VAL_WHATPAGE, false, checkSfxPoolItem< SfxUInt32Item > ) );
- const SfxUInt32Item* pWhatLayout = static_cast< const SfxUInt32Item* > ( rRequest.GetArg( ID_VAL_WHATLAYOUT, false, checkSfxPoolItem< SfxUInt32Item > ) );
+ const SfxUInt32Item* pWhatPage = rRequest.GetArg<SfxUInt32Item>(ID_VAL_WHATPAGE);
+ const SfxUInt32Item* pWhatLayout = rRequest.GetArg<SfxUInt32Item>(ID_VAL_WHATLAYOUT);
SdDrawDocument* pDocument = mrViewShell.GetDoc();
if( !pDocument )
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 4a675594af1a..a34745db6d32 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -406,7 +406,7 @@ void TextObjectBar::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())
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index eb01114c5be7..e81d073f9f45 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -304,9 +304,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_HYPHENATION:
{
- // const SfxPoolItem* pItem = rReq.GetArg( SID_HYPHENATION );
- // ^-- should not be used (defaults are wrong) !
- SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, SID_HYPHENATION);
+ const SfxBoolItem* pItem = rReq.GetArg<SfxBoolItem>(SID_HYPHENATION);
if( pItem )
{
@@ -475,9 +473,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (pArgs)
if (pArgs->Count () == 3)
{
- SFX_REQUEST_ARG(rReq, pWidth, SfxUInt32Item, ID_VAL_PAGEWIDTH);
- SFX_REQUEST_ARG(rReq, pHeight, SfxUInt32Item, ID_VAL_PAGEHEIGHT);
- SFX_REQUEST_ARG(rReq, pScaleAll, SfxBoolItem, ID_VAL_SCALEOBJECTS);
+ const SfxUInt32Item* pWidth = rReq.GetArg<SfxUInt32Item>(ID_VAL_PAGEWIDTH);
+ const SfxUInt32Item* pHeight = rReq.GetArg<SfxUInt32Item>(ID_VAL_PAGEHEIGHT);
+ const SfxBoolItem* pScaleAll = rReq.GetArg<SfxBoolItem>(ID_VAL_SCALEOBJECTS);
Size aSize (pWidth->GetValue (), pHeight->GetValue ());
@@ -499,11 +497,11 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (pArgs)
if (pArgs->Count () == 5)
{
- SFX_REQUEST_ARG(rReq, pLeft, SfxUInt32Item, ID_VAL_PAGELEFT);
- SFX_REQUEST_ARG(rReq, pRight, SfxUInt32Item, ID_VAL_PAGERIGHT);
- SFX_REQUEST_ARG(rReq, pUpper, SfxUInt32Item, ID_VAL_PAGETOP);
- SFX_REQUEST_ARG(rReq, pLower, SfxUInt32Item, ID_VAL_PAGEBOTTOM);
- SFX_REQUEST_ARG(rReq, pScaleAll, SfxBoolItem, ID_VAL_SCALEOBJECTS);
+ const SfxUInt32Item* pLeft = rReq.GetArg<SfxUInt32Item>(ID_VAL_PAGELEFT);
+ const SfxUInt32Item* pRight = rReq.GetArg<SfxUInt32Item>(ID_VAL_PAGERIGHT);
+ const SfxUInt32Item* pUpper = rReq.GetArg<SfxUInt32Item>(ID_VAL_PAGETOP);
+ const SfxUInt32Item* pLower = rReq.GetArg<SfxUInt32Item>(ID_VAL_PAGEBOTTOM);
+ const SfxBoolItem* pScaleAll = rReq.GetArg<SfxBoolItem>(ID_VAL_SCALEOBJECTS);
Size aEmptySize (0, 0);
@@ -526,7 +524,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (pArgs && pArgs->Count () == 1 )
{
- SFX_REQUEST_ARG(rReq, pScale, SfxUInt16Item, SID_ATTR_ZOOMSLIDER);
+ const SfxUInt16Item* pScale = rReq.GetArg<SfxUInt16Item>(SID_ATTR_ZOOMSLIDER);
if (CHECK_RANGE (5, pScale->GetValue (), 3000))
{
SetZoom (pScale->GetValue ());
@@ -551,7 +549,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (pArgs)
if (pArgs->Count () == 1)
{
- SFX_REQUEST_ARG(rReq, pScale, SfxUInt32Item, ID_VAL_ZOOM);
+ const SfxUInt32Item* pScale = rReq.GetArg<SfxUInt32Item>(ID_VAL_ZOOM);
if (CHECK_RANGE (10, pScale->GetValue (), 1000))
{
SetZoom (pScale->GetValue ());
@@ -1453,10 +1451,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
else
{
- SFX_REQUEST_ARG(rReq, pLayerName, SfxStringItem, ID_VAL_LAYERNAME);
- SFX_REQUEST_ARG(rReq, pIsVisible, SfxBoolItem, ID_VAL_ISVISIBLE);
- SFX_REQUEST_ARG(rReq, pIsLocked, SfxBoolItem, ID_VAL_ISLOCKED);
- SFX_REQUEST_ARG(rReq, pIsPrintable, SfxBoolItem, ID_VAL_ISPRINTABLE);
+ const SfxStringItem* pLayerName = rReq.GetArg<SfxStringItem>(ID_VAL_LAYERNAME);
+ const SfxBoolItem* pIsVisible = rReq.GetArg<SfxBoolItem>(ID_VAL_ISVISIBLE);
+ const SfxBoolItem* pIsLocked = rReq.GetArg<SfxBoolItem>(ID_VAL_ISLOCKED);
+ const SfxBoolItem* pIsPrintable = rReq.GetArg<SfxBoolItem>(ID_VAL_ISPRINTABLE);
aLayerName = pLayerName->GetValue ();
bIsVisible = pIsVisible->GetValue ();
@@ -1614,10 +1612,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
else if (pArgs->Count () == 4)
{
- SFX_REQUEST_ARG(rReq, pLayerName, SfxStringItem, ID_VAL_LAYERNAME);
- SFX_REQUEST_ARG(rReq, pIsVisible, SfxBoolItem, ID_VAL_ISVISIBLE);
- SFX_REQUEST_ARG(rReq, pIsLocked, SfxBoolItem, ID_VAL_ISLOCKED);
- SFX_REQUEST_ARG(rReq, pIsPrintable, SfxBoolItem, ID_VAL_ISPRINTABLE);
+ const SfxStringItem* pLayerName = rReq.GetArg<SfxStringItem>(ID_VAL_LAYERNAME);
+ const SfxBoolItem* pIsVisible = rReq.GetArg<SfxBoolItem>(ID_VAL_ISVISIBLE);
+ const SfxBoolItem* pIsLocked = rReq.GetArg<SfxBoolItem>(ID_VAL_ISLOCKED);
+ const SfxBoolItem* pIsPrintable = rReq.GetArg<SfxBoolItem>(ID_VAL_ISPRINTABLE);
aLayerName = pLayerName->GetValue ();
bIsVisible = pIsVisible->GetValue ();
@@ -2936,7 +2934,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq )
case SID_ATTR_CHAR_FONT:
if( rReq.GetArgs() )
{
- SFX_REQUEST_ARG(rReq, pItem, SvxFontItem, SID_ATTR_CHAR_FONT);
+ const SvxFontItem* pItem = rReq.GetArg<SvxFontItem>(SID_ATTR_CHAR_FONT);
if (pItem)
{
aNewAttr.Put(*pItem);
@@ -2946,7 +2944,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq )
case SID_ATTR_CHAR_FONTHEIGHT:
if( rReq.GetArgs() )
{
- SFX_REQUEST_ARG(rReq, pItem, SvxFontHeightItem, SID_ATTR_CHAR_FONTHEIGHT);
+ const SvxFontHeightItem* pItem = rReq.GetArg<SvxFontHeightItem>(SID_ATTR_CHAR_FONTHEIGHT);
if (pItem)
{
aNewAttr.Put(*pItem);
@@ -2956,8 +2954,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq )
case SID_ATTR_CHAR_WEIGHT:
if( rReq.GetArgs() )
{
- //const SvxWeightItem *pItem = (const SvxWeightItem*) rReq.GetArg( SID_ATTR_CHAR_WEIGHT, sal_False, TYPE(SvxWeightItem) );
- SFX_REQUEST_ARG(rReq, pItem, SvxWeightItem, SID_ATTR_CHAR_WEIGHT);
+ const SvxWeightItem* pItem = rReq.GetArg<SvxWeightItem>(SID_ATTR_CHAR_WEIGHT);
if (pItem)
{
aNewAttr.Put(*pItem);
@@ -2967,8 +2964,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq )
case SID_ATTR_CHAR_POSTURE:
if( rReq.GetArgs() )
{
- //const SvxPostureItem *pItem = (const SvxPostureItem*) rReq.GetArg( SID_ATTR_CHAR_POSTURE, sal_False, TYPE(SvxPostureItem) );
- SFX_REQUEST_ARG(rReq, pItem, SvxPostureItem, SID_ATTR_CHAR_POSTURE);
+ const SvxPostureItem* pItem = rReq.GetArg<SvxPostureItem>(SID_ATTR_CHAR_POSTURE);
if (pItem)
{
aNewAttr.Put(*pItem);
@@ -2978,10 +2974,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq )
case SID_ATTR_CHAR_UNDERLINE:
if( rReq.GetArgs() )
{
- //<<modify by wj for sym2_1873
- //SFX_REQUEST_ARG(rReq, pItem, SvxTextLineItem, SID_ATTR_CHAR_UNDERLINE , sal_False);
- SFX_REQUEST_ARG(rReq, pItem, SvxUnderlineItem, SID_ATTR_CHAR_UNDERLINE);
- //end>>
+ const SvxUnderlineItem* pItem = rReq.GetArg<SvxUnderlineItem>(SID_ATTR_CHAR_UNDERLINE);
if (pItem)
{
aNewAttr.Put(*pItem);
@@ -2996,7 +2989,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq )
case SID_ATTR_CHAR_SHADOWED:
if( rReq.GetArgs() )
{
- SFX_REQUEST_ARG(rReq, pItem, SvxShadowedItem, SID_ATTR_CHAR_SHADOWED);
+ const SvxShadowedItem* pItem = rReq.GetArg<SvxShadowedItem>(SID_ATTR_CHAR_SHADOWED);
if (pItem)
{
aNewAttr.Put(*pItem);
@@ -3006,7 +2999,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq )
case SID_ATTR_CHAR_STRIKEOUT:
if( rReq.GetArgs() )
{
- SFX_REQUEST_ARG(rReq, pItem, SvxCrossedOutItem, SID_ATTR_CHAR_STRIKEOUT);
+ const SvxCrossedOutItem* pItem = rReq.GetArg<SvxCrossedOutItem>(SID_ATTR_CHAR_STRIKEOUT);
if (pItem)
{
aNewAttr.Put(*pItem);
@@ -3016,7 +3009,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq )
case SID_ATTR_CHAR_COLOR:
if( rReq.GetArgs() )
{
- SFX_REQUEST_ARG(rReq, pItem, SvxColorItem, SID_ATTR_CHAR_COLOR);
+ const SvxColorItem* pItem = rReq.GetArg<SvxColorItem>(SID_ATTR_CHAR_COLOR);
if (pItem)
{
aNewAttr.Put(*pItem);
@@ -3026,7 +3019,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq )
case SID_ATTR_CHAR_KERNING:
if( rReq.GetArgs() )
{
- SFX_REQUEST_ARG(rReq, pItem, SvxKerningItem, SID_ATTR_CHAR_KERNING);
+ const SvxKerningItem* pItem = rReq.GetArg<SvxKerningItem>(SID_ATTR_CHAR_KERNING);
if (pItem)
{
aNewAttr.Put(*pItem);
@@ -3036,7 +3029,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq )
case SID_ATTR_CHAR_CASEMAP:
if( rReq.GetArgs() )
{
- SFX_REQUEST_ARG(rReq, pItem, SvxCaseMapItem, SID_ATTR_CHAR_CASEMAP);
+ const SvxCaseMapItem* pItem = rReq.GetArg<SvxCaseMapItem>(SID_ATTR_CHAR_CASEMAP);
if (pItem)
{
aNewAttr.Put(*pItem);
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 9771741b1464..9203b5f19f05 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -132,7 +132,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
// switch page in running slide show
if(SlideShow::IsRunning(GetViewShellBase()) && rReq.GetArgs())
{
- SFX_REQUEST_ARG(rReq, pWhatPage, SfxUInt32Item, ID_VAL_WHATPAGE);
+ const SfxUInt32Item* pWhatPage = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATPAGE);
SlideShow::GetSlideShow(GetViewShellBase())->jumpToPageNumber((sal_Int32)((pWhatPage->GetValue()-1)>>1));
}
else
@@ -146,8 +146,8 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
}
else if (pArgs->Count () == 2)
{
- SFX_REQUEST_ARG(rReq, pWhatPage, SfxUInt32Item, ID_VAL_WHATPAGE);
- SFX_REQUEST_ARG(rReq, pWhatKind, SfxUInt32Item, ID_VAL_WHATKIND);
+ const SfxUInt32Item* pWhatPage = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATPAGE);
+ const SfxUInt32Item* pWhatKind = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATKIND);
sal_Int32 nWhatPage = (sal_Int32)pWhatPage->GetValue ();
sal_Int32 nWhatKind = (sal_Int32)pWhatKind->GetValue ();
@@ -214,7 +214,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
if(pArgs && 1 == pArgs->Count())
{
- SFX_REQUEST_ARG(rReq, pWhatLayer, SfxUInt32Item, ID_VAL_WHATLAYER);
+ const SfxUInt32Item* pWhatLayer = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATLAYER);
if(pWhatLayer)
{
@@ -241,8 +241,8 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
if ( pArgs && pArgs->Count () == 2)
{
- SFX_REQUEST_ARG(rReq, pIsActive, SfxBoolItem, ID_VAL_ISACTIVE);
- SFX_REQUEST_ARG(rReq, pWhatKind, SfxUInt32Item, ID_VAL_WHATKIND);
+ const SfxBoolItem* pIsActive = rReq.GetArg<SfxBoolItem>(ID_VAL_ISACTIVE);
+ const SfxUInt32Item* pWhatKind = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATKIND);
sal_Int32 nWhatKind = (sal_Int32)pWhatKind->GetValue ();
if (CHECK_RANGE (PK_STANDARD, nWhatKind, PK_HANDOUT))
@@ -269,8 +269,8 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
if ( pArgs && pArgs->Count () == 2)
{
- SFX_REQUEST_ARG(rReq, pWhatLayerMode, SfxBoolItem, ID_VAL_ISACTIVE);
- SFX_REQUEST_ARG(rReq, pWhatLayer, SfxUInt32Item, ID_VAL_WHATLAYER);
+ const SfxBoolItem* pWhatLayerMode = rReq.GetArg<SfxBoolItem>(ID_VAL_ISACTIVE);
+ const SfxUInt32Item* pWhatLayer = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATLAYER);
sal_Int32 nWhatLayer = (sal_Int32)pWhatLayer->GetValue ();
if (CHECK_RANGE (EM_PAGE, nWhatLayer, EM_MASTERPAGE))
@@ -416,7 +416,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
{
if( rReq.GetArgs() )
{
- SFX_REQUEST_ARG(rReq, pBookmark, SfxStringItem, SID_JUMPTOMARK);
+ const SfxStringItem* pBookmark = rReq.GetArg<SfxStringItem>(SID_JUMPTOMARK);
if (pBookmark)
{
diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx
index 568b630faa5f..01846afb77ce 100644
--- a/sd/source/ui/view/drviews9.cxx
+++ b/sd/source/ui/view/drviews9.cxx
@@ -214,7 +214,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 1)
{
- SFX_REQUEST_ARG(rReq, pFillStyle, SfxUInt32Item, ID_VAL_STYLE);
+ const SfxUInt32Item* pFillStyle = rReq.GetArg<SfxUInt32Item>(ID_VAL_STYLE);
if (CHECK_RANGE (drawing::FillStyle_NONE, (sal_Int32)pFillStyle->GetValue (), drawing::FillStyle_BITMAP))
{
pAttr->ClearItem (XATTR_FILLSTYLE);
@@ -236,7 +236,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 1)
{
- SFX_REQUEST_ARG(rReq, pLineStyle, SfxUInt32Item, ID_VAL_STYLE);
+ const SfxUInt32Item* pLineStyle = rReq.GetArg<SfxUInt32Item>(ID_VAL_STYLE);
if (CHECK_RANGE (drawing::LineStyle_NONE, (sal_Int32)pLineStyle->GetValue (), drawing::LineStyle_DASH))
{
pAttr->ClearItem (XATTR_LINESTYLE);
@@ -258,7 +258,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 1)
{
- SFX_REQUEST_ARG(rReq, pLineWidth, SfxUInt32Item, ID_VAL_WIDTH);
+ const SfxUInt32Item* pLineWidth = rReq.GetArg<SfxUInt32Item>(ID_VAL_WIDTH);
pAttr->ClearItem (XATTR_LINEWIDTH);
pAttr->Put (XLineWidthItem (pLineWidth->GetValue ()), XATTR_LINEWIDTH);
rBindings.Invalidate (SID_ATTR_LINE_WIDTH);
@@ -273,9 +273,9 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 3)
{
- SFX_REQUEST_ARG(rReq, pRed, SfxUInt32Item, ID_VAL_RED);
- SFX_REQUEST_ARG(rReq, pGreen, SfxUInt32Item, ID_VAL_GREEN);
- SFX_REQUEST_ARG(rReq, pBlue, SfxUInt32Item, ID_VAL_BLUE);
+ const SfxUInt32Item* pRed = rReq.GetArg<SfxUInt32Item>(ID_VAL_RED);
+ const SfxUInt32Item* pGreen = rReq.GetArg<SfxUInt32Item>(ID_VAL_GREEN);
+ const SfxUInt32Item* pBlue = rReq.GetArg<SfxUInt32Item>(ID_VAL_BLUE);
pAttr->ClearItem (XATTR_FILLCOLOR);
pAttr->ClearItem (XATTR_FILLSTYLE);
@@ -297,9 +297,9 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 3)
{
- SFX_REQUEST_ARG(rReq, pRed, SfxUInt32Item, ID_VAL_RED);
- SFX_REQUEST_ARG(rReq, pGreen, SfxUInt32Item, ID_VAL_GREEN);
- SFX_REQUEST_ARG(rReq, pBlue, SfxUInt32Item, ID_VAL_BLUE);
+ const SfxUInt32Item* pRed = rReq.GetArg<SfxUInt32Item>(ID_VAL_RED);
+ const SfxUInt32Item* pGreen = rReq.GetArg<SfxUInt32Item>(ID_VAL_GREEN);
+ const SfxUInt32Item* pBlue = rReq.GetArg<SfxUInt32Item>(ID_VAL_BLUE);
pAttr->ClearItem (XATTR_LINECOLOR);
pAttr->Put (XLineColorItem (-1, Color ((sal_uInt8) pRed->GetValue (),
@@ -319,10 +319,10 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 4)
{
- SFX_REQUEST_ARG(rReq, pName, SfxStringItem, ID_VAL_INDEX);
- SFX_REQUEST_ARG(rReq, pRed, SfxUInt32Item, ID_VAL_RED);
- SFX_REQUEST_ARG(rReq, pGreen, SfxUInt32Item, ID_VAL_GREEN);
- SFX_REQUEST_ARG(rReq, pBlue, SfxUInt32Item, ID_VAL_BLUE);
+ const SfxStringItem* pName = rReq.GetArg<SfxStringItem>(ID_VAL_INDEX);
+ const SfxUInt32Item* pRed = rReq.GetArg<SfxUInt32Item>(ID_VAL_RED);
+ const SfxUInt32Item* pGreen = rReq.GetArg<SfxUInt32Item>(ID_VAL_GREEN);
+ const SfxUInt32Item* pBlue = rReq.GetArg<SfxUInt32Item>(ID_VAL_BLUE);
XGradientListRef pGradientList = GetDoc()->GetGradientList ();
long nCounts = pGradientList->Count ();
@@ -380,10 +380,10 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 4)
{
- SFX_REQUEST_ARG(rReq, pName, SfxStringItem, ID_VAL_INDEX);
- SFX_REQUEST_ARG(rReq, pRed, SfxUInt32Item, ID_VAL_RED);
- SFX_REQUEST_ARG(rReq, pGreen, SfxUInt32Item, ID_VAL_GREEN);
- SFX_REQUEST_ARG(rReq, pBlue, SfxUInt32Item, ID_VAL_BLUE);
+ const SfxStringItem* pName = rReq.GetArg<SfxStringItem>(ID_VAL_INDEX);
+ const SfxUInt32Item* pRed = rReq.GetArg<SfxUInt32Item>(ID_VAL_RED);
+ const SfxUInt32Item* pGreen = rReq.GetArg<SfxUInt32Item>(ID_VAL_GREEN);
+ const SfxUInt32Item* pBlue = rReq.GetArg<SfxUInt32Item>(ID_VAL_BLUE);
XHatchListRef pHatchList = GetDoc()->GetHatchList ();
long nCounts = pHatchList->Count ();
@@ -435,13 +435,13 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 7)
{
- SFX_REQUEST_ARG(rReq, pName, SfxStringItem, ID_VAL_INDEX);
- SFX_REQUEST_ARG(rReq, pStyle, SfxUInt32Item, ID_VAL_STYLE);
- SFX_REQUEST_ARG(rReq, pDots, SfxUInt32Item, ID_VAL_DOTS);
- SFX_REQUEST_ARG(rReq, pDotLen, SfxUInt32Item, ID_VAL_DOTLEN);
- SFX_REQUEST_ARG(rReq, pDashes, SfxUInt32Item, ID_VAL_DASHES);
- SFX_REQUEST_ARG(rReq, pDashLen, SfxUInt32Item, ID_VAL_DASHLEN);
- SFX_REQUEST_ARG(rReq, pDistance, SfxUInt32Item, ID_VAL_DISTANCE);
+ const SfxStringItem* pName = rReq.GetArg<SfxStringItem>(ID_VAL_INDEX);
+ const SfxUInt32Item* pStyle = rReq.GetArg<SfxUInt32Item>(ID_VAL_STYLE);
+ const SfxUInt32Item* pDots = rReq.GetArg<SfxUInt32Item>(ID_VAL_DOTS);
+ const SfxUInt32Item* pDotLen = rReq.GetArg<SfxUInt32Item>(ID_VAL_DOTLEN);
+ const SfxUInt32Item* pDashes = rReq.GetArg<SfxUInt32Item>(ID_VAL_DASHES);
+ const SfxUInt32Item* pDashLen = rReq.GetArg<SfxUInt32Item>(ID_VAL_DASHLEN);
+ const SfxUInt32Item* pDistance = rReq.GetArg<SfxUInt32Item>(ID_VAL_DISTANCE);
if (CHECK_RANGE (css::drawing::DashStyle_RECT, (sal_Int32)pStyle->GetValue (), css::drawing::DashStyle_ROUNDRELATIVE))
{
@@ -485,14 +485,14 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 8)
{
- SFX_REQUEST_ARG(rReq, pName, SfxStringItem, ID_VAL_INDEX);
- SFX_REQUEST_ARG(rReq, pStyle, SfxUInt32Item, ID_VAL_STYLE);
- SFX_REQUEST_ARG(rReq, pAngle, SfxUInt32Item, ID_VAL_ANGLE);
- SFX_REQUEST_ARG(rReq, pBorder, SfxUInt32Item, ID_VAL_BORDER);
- SFX_REQUEST_ARG(rReq, pCenterX, SfxUInt32Item, ID_VAL_CENTER_X);
- SFX_REQUEST_ARG(rReq, pCenterY, SfxUInt32Item, ID_VAL_CENTER_Y);
- SFX_REQUEST_ARG(rReq, pStart, SfxUInt32Item, ID_VAL_STARTINTENS);
- SFX_REQUEST_ARG(rReq, pEnd, SfxUInt32Item, ID_VAL_ENDINTENS);
+ const SfxStringItem* pName = rReq.GetArg<SfxStringItem>(ID_VAL_INDEX);
+ const SfxUInt32Item* pStyle = rReq.GetArg<SfxUInt32Item>(ID_VAL_STYLE);
+ const SfxUInt32Item* pAngle = rReq.GetArg<SfxUInt32Item>(ID_VAL_ANGLE);
+ const SfxUInt32Item* pBorder = rReq.GetArg<SfxUInt32Item>(ID_VAL_BORDER);
+ const SfxUInt32Item* pCenterX = rReq.GetArg<SfxUInt32Item>(ID_VAL_CENTER_X);
+ const SfxUInt32Item* pCenterY = rReq.GetArg<SfxUInt32Item>(ID_VAL_CENTER_Y);
+ const SfxUInt32Item* pStart = rReq.GetArg<SfxUInt32Item>(ID_VAL_STARTINTENS);
+ const SfxUInt32Item* pEnd = rReq.GetArg<SfxUInt32Item>(ID_VAL_ENDINTENS);
if (CHECK_RANGE (css::awt::GradientStyle_LINEAR, (sal_Int32)pStyle->GetValue (), css::awt::GradientStyle_RECT) &&
CHECK_RANGE (0, (sal_Int32)pAngle->GetValue (), 360) &&
@@ -562,10 +562,10 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 4)
{
- SFX_REQUEST_ARG(rReq, pName, SfxStringItem, ID_VAL_INDEX);
- SFX_REQUEST_ARG(rReq, pStyle, SfxUInt32Item, ID_VAL_STYLE);
- SFX_REQUEST_ARG(rReq, pDistance, SfxUInt32Item, ID_VAL_DISTANCE);
- SFX_REQUEST_ARG(rReq, pAngle, SfxUInt32Item, ID_VAL_ANGLE);
+ const SfxStringItem* pName = rReq.GetArg<SfxStringItem>(ID_VAL_INDEX);
+ const SfxUInt32Item* pStyle = rReq.GetArg<SfxUInt32Item>(ID_VAL_STYLE);
+ const SfxUInt32Item* pDistance = rReq.GetArg<SfxUInt32Item>(ID_VAL_DISTANCE);
+ const SfxUInt32Item* pAngle = rReq.GetArg<SfxUInt32Item>(ID_VAL_ANGLE);
if (CHECK_RANGE (css::drawing::HatchStyle_SINGLE, (sal_Int32)pStyle->GetValue (), css::drawing::HatchStyle_TRIPLE) &&
CHECK_RANGE (0, (sal_Int32)pAngle->GetValue (), 360))
@@ -623,7 +623,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 1)
{
- SFX_REQUEST_ARG(rReq, pName, SfxStringItem, ID_VAL_INDEX);
+ const SfxStringItem* pName = rReq.GetArg<SfxStringItem>(ID_VAL_INDEX);
XGradientListRef pGradientList = GetDoc()->GetGradientList ();
long nCounts = pGradientList->Count ();
@@ -658,7 +658,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (pArgs)
if (pArgs->Count () == 1)
{
- SFX_REQUEST_ARG(rReq, pName, SfxStringItem, ID_VAL_INDEX);
+ const SfxStringItem* pName = rReq.GetArg<SfxStringItem>(ID_VAL_INDEX);
XHatchListRef pHatchList = GetDoc()->GetHatchList ();
long nCounts = pHatchList->Count ();
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 0987499e2974..f3ec602de426 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -260,7 +260,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
case SID_FM_CREATE_FIELDCONTROL:
{
- SFX_REQUEST_ARG(rReq, pDescriptorItem, SfxUnoAnyItem, SID_FM_DATACCESS_DESCRIPTOR);
+ const SfxUnoAnyItem* pDescriptorItem = rReq.GetArg<SfxUnoAnyItem>(SID_FM_DATACCESS_DESCRIPTOR);
DBG_ASSERT( pDescriptorItem, "DrawViewShell::FuPermanent(SID_FM_CREATE_FIELDCONTROL): invalid request args!" );
if(pDescriptorItem)
@@ -912,7 +912,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
if( pReqArgs )
{
- SFX_REQUEST_ARG(rReq, pIsActive, SfxUInt32Item, SID_CLIPBOARD_FORMAT_ITEMS);
+ const SfxUInt32Item* pIsActive = rReq.GetArg<SfxUInt32Item>(SID_CLIPBOARD_FORMAT_ITEMS);
nFormat = static_cast<SotClipboardFormatId>(pIsActive->GetValue());
}
@@ -993,7 +993,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
if ( pReqArgs )
{
- SFX_REQUEST_ARG(rReq, pIsActive, SfxBoolItem, SID_MASTERPAGE);
+ const SfxBoolItem* pIsActive = rReq.GetArg<SfxBoolItem>(SID_MASTERPAGE);
mbIsLayerModeActive = pIsActive->GetValue ();
}
@@ -1115,7 +1115,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
if ( pReqArgs )
{
- SFX_REQUEST_ARG(rReq, pIsActive, SfxBoolItem, SID_RULER);
+ const SfxBoolItem* pIsActive = rReq.GetArg<SfxBoolItem>(SID_RULER);
SetRuler (pIsActive->GetValue ());
}
else SetRuler (!HasRuler());
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index 49ffbe08b1c5..e4286e20b1f7 100644
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
@@ -122,7 +122,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
if (pArgs && pArgs->Count () == 1 )
{
- SFX_REQUEST_ARG(rReq, pScale, SfxUInt16Item, SID_ATTR_ZOOMSLIDER);
+ const SfxUInt16Item* pScale = rReq.GetArg<SfxUInt16Item>(SID_ATTR_ZOOMSLIDER);
if (CHECK_RANGE (5, pScale->GetValue (), 3000))
{
SetZoom (pScale->GetValue ());
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx
index 61c574b4a8b2..5d79a3e0dbc0 100644
--- a/sd/source/ui/view/viewshe3.cxx
+++ b/sd/source/ui/view/viewshe3.cxx
@@ -235,7 +235,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
else if (pArgs->Count() == 1)
{
pDocument->StopWorkStartupDelay();
- SFX_REQUEST_ARG(rRequest, pLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT);
+ const SfxUInt32Item* pLayout = rRequest.GetArg<SfxUInt32Item>(ID_VAL_WHATLAYOUT);
if( pLayout )
{
if (ePageKind == PK_NOTES)
@@ -253,10 +253,10 @@ SdPage* ViewShell::CreateOrDuplicatePage (
// AutoLayouts must be ready
pDocument->StopWorkStartupDelay();
- SFX_REQUEST_ARG(rRequest, pPageName, SfxStringItem, ID_VAL_PAGENAME);
- SFX_REQUEST_ARG(rRequest, pLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT);
- SFX_REQUEST_ARG(rRequest, pIsPageBack, SfxBoolItem, ID_VAL_ISPAGEBACK);
- SFX_REQUEST_ARG(rRequest, pIsPageObj, SfxBoolItem, ID_VAL_ISPAGEOBJ);
+ const SfxStringItem* pPageName = rRequest.GetArg<SfxStringItem>(ID_VAL_PAGENAME);
+ const SfxUInt32Item* pLayout = rRequest.GetArg<SfxUInt32Item>(ID_VAL_WHATLAYOUT);
+ const SfxBoolItem* pIsPageBack = rRequest.GetArg<SfxBoolItem>(ID_VAL_ISPAGEBACK);
+ const SfxBoolItem* pIsPageObj = rRequest.GetArg<SfxBoolItem>(ID_VAL_ISPAGEOBJ);
if (CHECK_RANGE (AUTOLAYOUT__START, (AutoLayout) pLayout->GetValue (), AUTOLAYOUT__END))
{
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 6dd18292a9c8..1a4365bb37f8 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -152,7 +152,7 @@ void SfxApplication::PropExec_Impl( SfxRequest &rReq )
{
case SID_ATTR_UNDO_COUNT:
{
- SFX_REQUEST_ARG(rReq, pCountItem, SfxUInt16Item, nSID);
+ const SfxUInt16Item* pCountItem = rReq.GetArg<SfxUInt16Item>(nSID);
std::shared_ptr< comphelper::ConfigurationChanges > batch(
comphelper::ConfigurationChanges::create());
officecfg::Office::Common::Undo::Steps::set(
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index ae314e1deefe..79f733719b38 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -413,7 +413,7 @@ sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUStri
void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
{
- SFX_REQUEST_ARG(rReq, pFactoryItem, SfxStringItem, SID_NEWDOCDIRECT);
+ const SfxStringItem* pFactoryItem = rReq.GetArg<SfxStringItem>(SID_NEWDOCDIRECT);
OUString aFactName;
if ( pFactoryItem )
aFactName = pFactoryItem->GetValue();
@@ -429,10 +429,10 @@ void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
aReq.AppendItem( SfxStringItem( SID_TARGETNAME, OUString( "_default" ) ) );
// TODO/LATER: Should the other arguments be transferred as well?
- SFX_REQUEST_ARG(rReq, pDefaultPathItem, SfxStringItem, SID_DEFAULTFILEPATH);
+ const SfxStringItem* pDefaultPathItem = rReq.GetArg<SfxStringItem>(SID_DEFAULTFILEPATH);
if ( pDefaultPathItem )
aReq.AppendItem( *pDefaultPathItem );
- SFX_REQUEST_ARG(rReq, pDefaultNameItem, SfxStringItem, SID_DEFAULTFILENAME);
+ const SfxStringItem* pDefaultNameItem = rReq.GetArg<SfxStringItem>(SID_DEFAULTFILENAME);
if ( pDefaultNameItem )
aReq.AppendItem( *pDefaultNameItem );
@@ -447,9 +447,9 @@ void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
{
// No Parameter from BASIC only Factory given?
- SFX_REQUEST_ARG(rReq, pTemplNameItem, SfxStringItem, SID_TEMPLATE_NAME);
- SFX_REQUEST_ARG(rReq, pTemplFileNameItem, SfxStringItem, SID_FILE_NAME);
- SFX_REQUEST_ARG(rReq, pTemplRegionNameItem, SfxStringItem, SID_TEMPLATE_REGIONNAME);
+ const SfxStringItem* pTemplNameItem = rReq.GetArg<SfxStringItem>(SID_TEMPLATE_NAME);
+ const SfxStringItem* pTemplFileNameItem = rReq.GetArg<SfxStringItem>(SID_FILE_NAME);
+ const SfxStringItem* pTemplRegionNameItem = rReq.GetArg<SfxStringItem>(SID_TEMPLATE_REGIONNAME);
SfxObjectShellLock xDoc;
@@ -576,12 +576,12 @@ bool lcl_isFilterNativelySupported(const SfxFilter& rFilter)
void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
{
OUString aDocService;
- SFX_REQUEST_ARG(rReq, pDocSrvItem, SfxStringItem, SID_DOC_SERVICE);
+ const SfxStringItem* pDocSrvItem = rReq.GetArg<SfxStringItem>(SID_DOC_SERVICE);
if (pDocSrvItem)
aDocService = pDocSrvItem->GetValue();
sal_uInt16 nSID = rReq.GetSlot();
- SFX_REQUEST_ARG(rReq, pFileNameItem, SfxStringItem, SID_FILE_NAME);
+ const SfxStringItem* pFileNameItem = rReq.GetArg<SfxStringItem>(SID_FILE_NAME);
if ( pFileNameItem )
{
OUString aCommand( pFileNameItem->GetValue() );
@@ -608,7 +608,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
OUString aFilter;
SfxItemSet* pSet = NULL;
OUString aPath;
- SFX_REQUEST_ARG(rReq, pFolderNameItem, SfxStringItem, SID_PATH);
+ const SfxStringItem* pFolderNameItem = rReq.GetArg<SfxStringItem>(SID_PATH);
if ( pFolderNameItem )
aPath = pFolderNameItem->GetValue();
else if ( nSID == SID_OPENTEMPLATE )
@@ -619,23 +619,23 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
}
sal_Int16 nDialog = SFX2_IMPL_DIALOG_CONFIG;
- SFX_REQUEST_ARG(rReq, pSystemDialogItem, SfxBoolItem, SID_FILE_DIALOG);
+ const SfxBoolItem* pSystemDialogItem = rReq.GetArg<SfxBoolItem>(SID_FILE_DIALOG);
if ( pSystemDialogItem )
nDialog = pSystemDialogItem->GetValue() ? SFX2_IMPL_DIALOG_SYSTEM : SFX2_IMPL_DIALOG_OOO;
- SFX_REQUEST_ARG(rReq, pRemoteDialogItem, SfxBoolItem, SID_REMOTE_DIALOG);
+ const SfxBoolItem* pRemoteDialogItem = rReq.GetArg<SfxBoolItem>(SID_REMOTE_DIALOG);
if ( pRemoteDialogItem && pRemoteDialogItem->GetValue())
nDialog = SFX2_IMPL_DIALOG_REMOTE;
OUString sStandardDir;
- SFX_REQUEST_ARG(rReq, pStandardDirItem, SfxStringItem, SID_STANDARD_DIR);
+ const SfxStringItem* pStandardDirItem = rReq.GetArg<SfxStringItem>(SID_STANDARD_DIR);
if ( pStandardDirItem )
sStandardDir = pStandardDirItem->GetValue();
::com::sun::star::uno::Sequence< OUString > aBlackList;
- SFX_REQUEST_ARG(rReq, pBlackListItem, SfxStringListItem, SID_BLACK_LIST);
+ const SfxStringListItem* pBlackListItem = rReq.GetArg<SfxStringListItem>(SID_BLACK_LIST);
if ( pBlackListItem )
pBlackListItem->GetStringList( aBlackList );
@@ -672,7 +672,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
css::uno::Reference< css::task::XInteractionHandler > xWrappedHandler;
// wrap existing handler or create new UUI handler
- SFX_REQUEST_ARG(rReq, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER);
+ const SfxUnoAnyItem* pInteractionItem = rReq.GetArg<SfxUnoAnyItem>(SID_INTERACTIONHANDLER);
if (pInteractionItem)
{
pInteractionItem->GetValue() >>= xWrappedHandler;
@@ -760,22 +760,22 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
// no else here! It's optional ...
if (!bHyperlinkUsed)
{
- SFX_REQUEST_ARG(rReq, pHyperLinkUsedItem, SfxBoolItem, SID_BROWSE);
+ const SfxBoolItem* pHyperLinkUsedItem = rReq.GetArg<SfxBoolItem>(SID_BROWSE);
if ( pHyperLinkUsedItem )
bHyperlinkUsed = pHyperLinkUsedItem->GetValue();
// no "official" item, so remove it from ItemSet before using UNO-API
rReq.RemoveItem( SID_BROWSE );
}
- SFX_REQUEST_ARG(rReq, pFileName, SfxStringItem, SID_FILE_NAME);
+ const SfxStringItem* pFileName = rReq.GetArg<SfxStringItem>(SID_FILE_NAME);
OUString aFileName = pFileName->GetValue();
OUString aReferer;
- SFX_REQUEST_ARG(rReq, pRefererItem, SfxStringItem, SID_REFERER);
+ const SfxStringItem* pRefererItem = rReq.GetArg<SfxStringItem>(SID_REFERER);
if ( pRefererItem )
aReferer = pRefererItem->GetValue();
- SFX_REQUEST_ARG(rReq, pFileFlagsItem, SfxStringItem, SID_OPTIONS);
+ const SfxStringItem* pFileFlagsItem = rReq.GetArg<SfxStringItem>(SID_OPTIONS);
if ( pFileFlagsItem )
{
OUString aFileFlags = pFileFlagsItem->GetValue();
@@ -936,13 +936,13 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
SfxFrame* pTargetFrame = NULL;
Reference< XFrame > xTargetFrame;
- SFX_REQUEST_ARG(rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME);
+ const SfxFrameItem* pFrameItem = rReq.GetArg<SfxFrameItem>(SID_DOCFRAME);
if ( pFrameItem )
pTargetFrame = pFrameItem->GetFrame();
if ( !pTargetFrame )
{
- SFX_REQUEST_ARG(rReq, pUnoFrameItem, SfxUnoFrameItem, SID_FILLFRAME);
+ const SfxUnoFrameItem* pUnoFrameItem = rReq.GetArg<SfxUnoFrameItem>(SID_FILLFRAME);
if ( pUnoFrameItem )
xTargetFrame = pUnoFrameItem->GetFrame();
}
@@ -951,7 +951,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
pTargetFrame = &SfxViewFrame::Current()->GetFrame();
// check if caller has set a callback
- SFX_REQUEST_ARG(rReq, pLinkItem, SfxLinkItem, SID_DONELINK);
+ const SfxLinkItem* pLinkItem = rReq.GetArg<SfxLinkItem>(SID_DONELINK);
// remove from Itemset, because it confuses the parameter transformation
if ( pLinkItem )
@@ -961,19 +961,19 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
// check if the view must be hidden
bool bHidden = false;
- SFX_REQUEST_ARG(rReq, pHidItem, SfxBoolItem, SID_HIDDEN);
+ const SfxBoolItem* pHidItem = rReq.GetArg<SfxBoolItem>(SID_HIDDEN);
if ( pHidItem )
bHidden = pHidItem->GetValue();
// This request is a UI call. We have to set the right values inside the MediaDescriptor
// for: InteractionHandler, StatusIndicator, MacroExecutionMode and DocTemplate.
// But we have to look for already existing values or for real hidden requests.
- SFX_REQUEST_ARG(rReq, pPreviewItem, SfxBoolItem, SID_PREVIEW);
+ const SfxBoolItem* pPreviewItem = rReq.GetArg<SfxBoolItem>(SID_PREVIEW);
if (!bHidden && ( !pPreviewItem || !pPreviewItem->GetValue() ) )
{
- SFX_REQUEST_ARG(rReq, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER);
- SFX_REQUEST_ARG(rReq, pMacroExecItem , SfxUInt16Item, SID_MACROEXECMODE);
- SFX_REQUEST_ARG(rReq, pDocTemplateItem, SfxUInt16Item, SID_UPDATEDOCMODE);
+ const SfxUnoAnyItem* pInteractionItem = rReq.GetArg<SfxUnoAnyItem>(SID_INTERACTIONHANDLER);
+ const SfxUInt16Item* pMacroExecItem = rReq.GetArg<SfxUInt16Item>(SID_MACROEXECMODE);
+ const SfxUInt16Item* pDocTemplateItem = rReq.GetArg<SfxUInt16Item>(SID_UPDATEDOCMODE);
if (!pInteractionItem)
{
@@ -988,12 +988,12 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
// extract target name
OUString aTarget;
- SFX_REQUEST_ARG(rReq, pTargetItem, SfxStringItem, SID_TARGETNAME);
+ const SfxStringItem* pTargetItem = rReq.GetArg<SfxStringItem>(SID_TARGETNAME);
if ( pTargetItem )
aTarget = pTargetItem->GetValue();
else
{
- SFX_REQUEST_ARG(rReq, pNewViewItem, SfxBoolItem, SID_OPEN_NEW_VIEW);
+ const SfxBoolItem* pNewViewItem = rReq.GetArg<SfxBoolItem>(SID_OPEN_NEW_VIEW);
if ( pNewViewItem && pNewViewItem->GetValue() )
aTarget = "_blank" ;
}
@@ -1020,7 +1020,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
}
// make URL ready
- SFX_REQUEST_ARG(rReq, pURLItem, SfxStringItem, SID_FILE_NAME);
+ const SfxStringItem* pURLItem = rReq.GetArg<SfxStringItem>(SID_FILE_NAME);
aFileName = pURLItem->GetValue();
if( aFileName.startsWith("#") ) // Mark without URL
{
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index e126695f5417..2fa9faefc408 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -346,7 +346,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
if ( pFact )
{
- SFX_REQUEST_ARG(rReq, pStringItem, SfxStringItem, SID_CONFIG);
+ const SfxStringItem* pStringItem = rReq.GetArg<SfxStringItem>(SID_CONFIG);
SfxItemSet aSet(
GetPool(), SID_CONFIG, SID_CONFIG );
@@ -481,7 +481,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
case SID_HELPTIPS:
{
// Evaluate Parameter
- SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELPTIPS);
+ const SfxBoolItem* pOnItem = rReq.GetArg<SfxBoolItem>(SID_HELPTIPS);
bool bOn = pOnItem
? pOnItem->GetValue()
: !Help::IsQuickHelpEnabled();
@@ -508,7 +508,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
case SID_HELPBALLOONS:
{
// Evaluate Parameter
- SFX_REQUEST_ARG(rReq, pOnItem, SfxBoolItem, SID_HELPBALLOONS);
+ const SfxBoolItem* pOnItem = rReq.GetArg<SfxBoolItem>(SID_HELPBALLOONS);
bool bOn = pOnItem
? pOnItem->GetValue()
: !Help::IsBalloonHelpEnabled();
@@ -569,9 +569,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
case SID_SHOW_IME_STATUS_WINDOW:
if (sfx2::appl::ImeStatusWindow::canToggle())
{
- SfxBoolItem const * pItem = static_cast< SfxBoolItem const * >(
- rReq.GetArg(SID_SHOW_IME_STATUS_WINDOW, false,
- checkSfxPoolItem<SfxBoolItem>));
+ const SfxBoolItem * pItem = rReq.GetArg<SfxBoolItem>(SID_SHOW_IME_STATUS_WINDOW);
bool bShow = pItem == 0
? !pAppData_Impl->m_xImeStatusWindow->isShowing()
: pItem->GetValue();
@@ -634,8 +632,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
}
case SID_AVAILABLE_TOOLBARS:
{
- SfxStringItem const * pToolbarName = static_cast< SfxStringItem const *>(
- rReq.GetArg(SID_AVAILABLE_TOOLBARS, false, checkSfxPoolItem< SfxStringItem >));
+ const SfxStringItem* pToolbarName = rReq.GetArg<SfxStringItem>(SID_AVAILABLE_TOOLBARS);
if ( pToolbarName )
{
@@ -962,7 +959,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
case SID_OPTIONS_TREEDIALOG:
{
OUString sPageURL;
- SFX_REQUEST_ARG(rReq, pURLItem, SfxStringItem, SID_OPTIONS_PAGEURL);
+ const SfxStringItem* pURLItem = rReq.GetArg<SfxStringItem>(SID_OPTIONS_PAGEURL);
if ( pURLItem )
sPageURL = pURLItem->GetValue();
const SfxItemSet* pArgs = rReq.GetInternalArgs_Impl();
@@ -1220,7 +1217,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
case SID_OFFICE_CHECK_PLZ:
{
bool bRet = false;
- SFX_REQUEST_ARG(rReq, pStringItem, SfxStringItem, rReq.GetSlot());
+ const SfxStringItem* pStringItem = rReq.GetArg<SfxStringItem>(rReq.GetSlot());
if ( pStringItem )
{
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index 1c314a631534..0ab61b547a6c 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -426,20 +426,6 @@ void SfxRequest::RemoveItem( sal_uInt16 nID )
}
}
-
-
-const SfxPoolItem* SfxRequest::GetArg
-(
- sal_uInt16 nSlotId, // Slot-Id or Which-Id of the parameters
- bool bDeep, // sal_False: do not search in the Parent-ItemSets
- std::function<bool ( const SfxPoolItem* )> isItemType // != 0: check for required pool item class
-) const
-{
- return GetItem( pArgs, nSlotId, bDeep, isItemType );
-}
-
-
-
const SfxPoolItem* SfxRequest::GetItem
(
const SfxItemSet* pArgs,
@@ -464,15 +450,10 @@ const SfxPoolItem* SfxRequest::GetItem
case SID_MY:
{
...
- // An Example on not using the macros
- const SfxInt32Item *pPosItem = (const SfxUInt32Item*)
- rReq.GetArg( SID_POS, sal_False, TYPE(SfxInt32Item) );
+ // An example
+ const SfxInt32Item *pPosItem = rReq.GetArg<SfxUInt32Item>(SID_POS);
sal_uInt16 nPos = pPosItem ? pPosItem->GetValue() : 0;
- // An Example on using the macros
- SFX_REQUEST_ARG(rReq, pSizeItem, SfxInt32Item, SID_SIZE, sal_False);
- sal_uInt16 nSize = pSizeItem ? pPosItem->GetValue() : 0;
-
...
}
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 2bd58b2fff08..27fc3156ebc2 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -450,7 +450,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_DOCINFO:
{
- SFX_REQUEST_ARG(rReq, pDocInfItem, SfxDocumentInfoItem, SID_DOCINFO);
+ const SfxDocumentInfoItem* pDocInfItem = rReq.GetArg<SfxDocumentInfoItem>(SID_DOCINFO);
if ( pDocInfItem )
{
// parameter, e.g. from replayed macro
@@ -461,7 +461,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
{
// no argument containing DocInfo; check optional arguments
bool bReadOnly = IsReadOnly();
- SFX_REQUEST_ARG(rReq, pROItem, SfxBoolItem, SID_DOC_READONLY);
+ const SfxBoolItem* pROItem = rReq.GetArg<SfxBoolItem>(SID_DOC_READONLY);
if ( pROItem )
// override readonly attribute of document
// e.g. if a readonly document is saved elsewhere and user asks for editing DocInfo before
@@ -573,7 +573,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// TODO/LATER: do the following GUI related actions in standalown method
// Introduce a status indicator for GUI operation
- SFX_REQUEST_ARG(rReq, pStatusIndicatorItem, SfxUnoAnyItem, SID_PROGRESS_STATUSBAR_CONTROL);
+ const SfxUnoAnyItem* pStatusIndicatorItem = rReq.GetArg<SfxUnoAnyItem>(SID_PROGRESS_STATUSBAR_CONTROL);
if ( !pStatusIndicatorItem )
{
// get statusindicator
@@ -610,7 +610,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
}
// Introduce an interaction handler for GUI operation
- SFX_REQUEST_ARG(rReq, pInteractionHandlerItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER);
+ const SfxUnoAnyItem* pInteractionHandlerItem = rReq.GetArg<SfxUnoAnyItem>(SID_INTERACTIONHANDLER);
if ( !pInteractionHandlerItem )
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
@@ -707,7 +707,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
if ( lErr && nErrorCode == ERRCODE_NONE )
{
- SFX_REQUEST_ARG(rReq, pWarnItem, SfxBoolItem, SID_FAIL_ON_WARNING);
+ const SfxBoolItem* pWarnItem = rReq.GetArg<SfxBoolItem>(SID_FAIL_ON_WARNING);
if ( pWarnItem && pWarnItem->GetValue() )
nErrorCode = lErr;
}
@@ -729,8 +729,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
if ( ( nId == SID_SAVEASDOC || nId == SID_SAVEASREMOTE ) && nErrorCode == ERRCODE_NONE )
{
- SfxBoolItem const * saveTo = static_cast<SfxBoolItem const *>(
- rReq.GetArg(SID_SAVETO, false, checkSfxPoolItem< SfxBoolItem >));
+ const SfxBoolItem* saveTo = rReq.GetArg<SfxBoolItem>(SID_SAVETO);
if (saveTo == nullptr || !saveTo->GetValue())
{
GetFrame()->RemoveInfoBar("readonly");
@@ -806,8 +805,8 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
}
// Evaluate Parameter
- SFX_REQUEST_ARG(rReq, pSaveItem, SfxBoolItem, SID_CLOSEDOC_SAVE);
- SFX_REQUEST_ARG(rReq, pNameItem, SfxStringItem, SID_CLOSEDOC_FILENAME);
+ const SfxBoolItem* pSaveItem = rReq.GetArg<SfxBoolItem>(SID_CLOSEDOC_SAVE);
+ const SfxStringItem* pNameItem = rReq.GetArg<SfxStringItem>(SID_CLOSEDOC_FILENAME);
if ( pSaveItem )
{
if ( pSaveItem->GetValue() )
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 432e7da5a3d2..82667530348d 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -417,7 +417,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
if ( rReq.IsAPI() )
{
// Control through API if r/w or r/o
- SFX_REQUEST_ARG(rReq, pEditItem, SfxBoolItem, SID_EDITDOC);
+ const SfxBoolItem* pEditItem = rReq.GetArg<SfxBoolItem>(SID_EDITDOC);
if ( pEditItem )
nOpenMode = pEditItem->GetValue() ? SFX_STREAM_READWRITE : SFX_STREAM_READONLY;
}
@@ -559,7 +559,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
if ( !pSh || !pSh->CanReload_Impl() )
break;
SfxApplication* pApp = SfxGetpApp();
- SFX_REQUEST_ARG(rReq, pForceReloadItem, SfxBoolItem, SID_FORCERELOAD);
+ const SfxBoolItem* pForceReloadItem = rReq.GetArg<SfxBoolItem>(SID_FORCERELOAD);
if( pForceReloadItem && !pForceReloadItem->GetValue() &&
!pSh->GetMedium()->IsExpired() )
return;
@@ -567,20 +567,20 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
return;
// AutoLoad is prohibited if possible
- SFX_REQUEST_ARG(rReq, pAutoLoadItem, SfxBoolItem, SID_AUTOLOAD);
+ const SfxBoolItem* pAutoLoadItem = rReq.GetArg<SfxBoolItem>(SID_AUTOLOAD);
if ( pAutoLoadItem && pAutoLoadItem->GetValue() &&
GetFrame().IsAutoLoadLocked_Impl() )
return;
SfxObjectShellLock xOldObj( pSh );
pImp->bReloading = true;
- SFX_REQUEST_ARG(rReq, pURLItem, SfxStringItem, SID_FILE_NAME);
+ const SfxStringItem* pURLItem = rReq.GetArg<SfxStringItem>(SID_FILE_NAME);
// Open as editable?
bool bForEdit = !pSh->IsReadOnly();
// If possible ask the User
bool bDo = GetViewShell()->PrepareClose();
- SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT);
+ const SfxBoolItem* pSilentItem = rReq.GetArg<SfxBoolItem>(SID_SILENT);
if ( bDo && GetFrame().DocIsModified_Impl() &&
!rReq.IsAPI() && ( !pSilentItem || !pSilentItem->GetValue() ) )
{
@@ -633,7 +633,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
// Filter Detection
OUString referer;
- SFX_REQUEST_ARG(rReq, refererItem, SfxStringItem, SID_REFERER);
+ const SfxStringItem* refererItem = rReq.GetArg<SfxStringItem>(SID_REFERER);
if (refererItem != 0) {
referer = refererItem->GetValue();
}
@@ -1942,8 +1942,8 @@ SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const
SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest, const sal_uInt16 i_nViewId )
{
- SFX_REQUEST_ARG(i_rCreateDocRequest, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME);
- SFX_REQUEST_ARG(i_rCreateDocRequest, pHiddenItem, SfxBoolItem, SID_HIDDEN);
+ const SfxUnoFrameItem* pFrameItem = i_rCreateDocRequest.GetArg<SfxUnoFrameItem>(SID_FILLFRAME);
+ const SfxBoolItem* pHiddenItem = i_rCreateDocRequest.GetArg<SfxBoolItem>(SID_HIDDEN);
return LoadViewIntoFrame_Impl_NoThrow(
i_rDoc,
@@ -2217,12 +2217,12 @@ void SfxViewFrame::ExecView_Impl
pMed->GetItemSet()->ClearItem( SID_HIDDEN );
// the view ID (optional arg. TODO: this is currently not supported in the slot definition ...)
- SFX_REQUEST_ARG(rReq, pViewIdItem, SfxUInt16Item, SID_VIEW_ID);
+ const SfxUInt16Item* pViewIdItem = rReq.GetArg<SfxUInt16Item>(SID_VIEW_ID);
const sal_uInt16 nViewId = pViewIdItem ? pViewIdItem->GetValue() : GetCurViewId();
Reference < XFrame > xFrame;
// the frame (optional arg. TODO: this is currently not supported in the slot definition ...)
- SFX_REQUEST_ARG(rReq, pFrameItem, SfxUnoFrameItem, SID_FILLFRAME);
+ const SfxUnoFrameItem* pFrameItem = rReq.GetArg<SfxUnoFrameItem>(SID_FILLFRAME);
if ( pFrameItem )
xFrame = pFrameItem->GetFrame();
@@ -2234,7 +2234,7 @@ void SfxViewFrame::ExecView_Impl
case SID_OBJECT:
{
- SFX_REQUEST_ARG(rReq, pItem, SfxInt16Item, SID_OBJECT);
+ const SfxInt16Item* pItem = rReq.GetArg<SfxInt16Item>(SID_OBJECT);
SfxViewShell *pViewShell = GetViewShell();
if ( pViewShell && pItem )
@@ -2713,7 +2713,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
xRecorder = xSupplier->getDispatchRecorder();
bool bIsRecording = xRecorder.is();
- SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, SID_RECORDMACRO);
+ const SfxBoolItem* pItem = rReq.GetArg<SfxBoolItem>(SID_RECORDMACRO);
if ( pItem && pItem->GetValue() == bIsRecording )
return;
@@ -2723,7 +2723,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
aProp <<= com::sun::star::uno::Reference< com::sun::star::frame::XDispatchRecorderSupplier >();
xSet->setPropertyValue(sProperty,aProp);
- SFX_REQUEST_ARG(rReq, pRecordItem, SfxBoolItem, FN_PARAM_1);
+ const SfxBoolItem* pRecordItem = rReq.GetArg<SfxBoolItem>(FN_PARAM_1);
if ( !pRecordItem || !pRecordItem->GetValue() )
// insert script into basic library container of application
AddDispatchMacroToBasic_Impl(xRecorder->getRecordedMacro());
@@ -2782,7 +2782,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
{
OUString aStatusbarResString( "private:resource/statusbar/statusbar" );
// Evaluate parameter.
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, rReq.GetSlot());
+ const SfxBoolItem* pShowItem = rReq.GetArg<SfxBoolItem>(rReq.GetSlot());
bool bShow( true );
if ( !pShowItem )
bShow = xLayoutManager->isElementVisible( aStatusbarResString );
@@ -2807,7 +2807,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq )
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_WIN_FULLSCREEN:
{
- SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, rReq.GetSlot());
+ const SfxBoolItem* pItem = rReq.GetArg<SfxBoolItem>(rReq.GetSlot());
SfxViewFrame *pTop = GetTopViewFrame();
if ( pTop )
{
@@ -3002,7 +3002,7 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq )
// Evaluate Parameter
sal_uInt16 nSID = rReq.GetSlot();
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSID);
+ const SfxBoolItem* pShowItem = rReq.GetArg<SfxBoolItem>(nSID);
if ( nSID == SID_VIEW_DATA_SOURCE_BROWSER )
{
if (!SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::DATABASE))
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index e44350c2e5f3..a2ccc4339538 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -163,9 +163,9 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
{
case SID_SHOWPOPUPS :
{
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, SID_SHOWPOPUPS);
+ const SfxBoolItem* pShowItem = rReq.GetArg<SfxBoolItem>(SID_SHOWPOPUPS);
bool bShow = pShowItem == nullptr || pShowItem->GetValue();
- SFX_REQUEST_ARG(rReq, pIdItem, SfxUInt16Item, SID_CONFIGITEMID);
+ const SfxUInt16Item* pIdItem = rReq.GetArg<SfxUInt16Item>(SID_CONFIGITEMID);
sal_uInt16 nId = pIdItem ? pIdItem->GetValue() : 0;
SfxWorkWindow *pWorkWin = GetFrame().GetWorkWindow_Impl();
@@ -206,7 +206,7 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
case SID_NEWDOCDIRECT :
{
- SFX_REQUEST_ARG(rReq, pFactoryItem, SfxStringItem, SID_NEWDOCDIRECT);
+ const SfxStringItem* pFactoryItem = rReq.GetArg<SfxStringItem>(SID_NEWDOCDIRECT);
OUString aFactName;
if ( pFactoryItem )
aFactName = pFactoryItem->GetValue();
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index b11b990e5f77..6beda04894a7 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -646,7 +646,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
// Should it be visible on the user interface,
// should it launch popup dialogue ?
- SFX_REQUEST_ARG(rReq, pSilentItem, SfxBoolItem, SID_SILENT);
+ const SfxBoolItem* pSilentItem = rReq.GetArg<SfxBoolItem>(SID_SILENT);
bSilent = pSilentItem && pSilentItem->GetValue();
}
@@ -677,7 +677,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
return;
// should we print only the selection or the whole document
- SFX_REQUEST_ARG(rReq, pSelectItem, SfxBoolItem, SID_SELECTION);
+ const SfxBoolItem* pSelectItem = rReq.GetArg<SfxBoolItem>(SID_SELECTION);
bool bSelection = ( pSelectItem != NULL && pSelectItem->GetValue() );
// detect non api call from writer ( that adds SID_SELECTION ) and reset bIsAPI
if ( pSelectItem && rReq.GetArgs()->Count() == 1 )
@@ -764,7 +764,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
SfxPrinter *pDocPrinter = GetPrinter(true);
// look for printer in parameters
- SFX_REQUEST_ARG(rReq, pPrinterItem, SfxStringItem, SID_PRINTER_NAME);
+ const SfxStringItem* pPrinterItem = rReq.GetArg<SfxStringItem>(SID_PRINTER_NAME);
if ( pPrinterItem )
{
// use PrinterName parameter to create a printer
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 47597535194f..cf88e35c8b81 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -472,7 +472,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
{
case SID_STYLE_FAMILY :
{
- SFX_REQUEST_ARG(rReq, pItem, SfxUInt16Item, nId);
+ const SfxUInt16Item* pItem = rReq.GetArg<SfxUInt16Item>(nId);
if (pItem)
{
pImp->m_nFamily = pItem->GetValue();
@@ -555,11 +555,11 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
SfxMailModel aModel;
OUString aDocType;
- SFX_REQUEST_ARG(rReq, pMailSubject, SfxStringItem, SID_MAIL_SUBJECT);
+ const SfxStringItem* pMailSubject = rReq.GetArg<SfxStringItem>(SID_MAIL_SUBJECT);
if ( pMailSubject )
aModel.SetSubject( pMailSubject->GetValue() );
- SFX_REQUEST_ARG(rReq, pMailRecipient, SfxStringItem, SID_MAIL_RECIPIENT);
+ const SfxStringItem* pMailRecipient = rReq.GetArg<SfxStringItem>(SID_MAIL_RECIPIENT);
if ( pMailRecipient )
{
OUString aRecipient( pMailRecipient->GetValue() );
@@ -569,7 +569,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
aRecipient = aRecipient.copy( aMailToStr.getLength() );
aModel.AddAddress( aRecipient, SfxMailModel::ROLE_TO );
}
- SFX_REQUEST_ARG(rReq, pMailDocType, SfxStringItem, SID_TYPE_NAME);
+ const SfxStringItem* pMailDocType = rReq.GetArg<SfxStringItem>(SID_TYPE_NAME);
if ( pMailDocType )
aDocType = pMailDocType->GetValue();
@@ -750,7 +750,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_PLUGINS_ACTIVE:
{
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nId);
+ const SfxBoolItem* pShowItem = rReq.GetArg<SfxBoolItem>(nId);
bool const bActive = (pShowItem)
? pShowItem->GetValue()
: !pImp->m_bPlugInsActive;
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index cd4b2d1605b4..7665e08453af 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -492,7 +492,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
case SID_FM_SCROLLBAR:
case SID_FM_SPINBUTTON:
{
- SFX_REQUEST_ARG(rReq, pGrabFocusItem, SfxBoolItem, SID_FM_TOGGLECONTROLFOCUS);
+ const SfxBoolItem* pGrabFocusItem = rReq.GetArg<SfxBoolItem>(SID_FM_TOGGLECONTROLFOCUS);
if ( pGrabFocusItem && pGrabFocusItem->GetValue() )
{ // see below
SfxViewShell* pShell = GetViewShell();
@@ -602,7 +602,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
break;
case SID_FM_SHOW_PROPERTY_BROWSER:
{
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, SID_FM_SHOW_PROPERTIES);
+ const SfxBoolItem* pShowItem = rReq.GetArg<SfxBoolItem>(SID_FM_SHOW_PROPERTIES);
bool bShow = true;
if ( pShowItem )
bShow = pShowItem->GetValue();
@@ -614,7 +614,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
case SID_FM_PROPERTIES:
{
// PropertyBrowser anzeigen
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSlot);
+ const SfxBoolItem* pShowItem = rReq.GetArg<SfxBoolItem>(nSlot);
bool bShow = pShowItem == nullptr || pShowItem->GetValue();
InterfaceBag aOnlyTheForm;
@@ -628,7 +628,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
case SID_FM_CTL_PROPERTIES:
{
- SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, nSlot);
+ const SfxBoolItem* pShowItem = rReq.GetArg<SfxBoolItem>(nSlot);
bool bShow = pShowItem == nullptr || pShowItem->GetValue();
OSL_ENSURE( GetImpl()->onlyControlsAreMarked(), "FmFormShell::Execute: ControlProperties should be disabled!" );
@@ -665,7 +665,7 @@ void FmFormShell::Execute(SfxRequest &rReq)
case SID_FM_DESIGN_MODE:
{
- SFX_REQUEST_ARG(rReq, pDesignItem, SfxBoolItem, nSlot);
+ const SfxBoolItem* pDesignItem = rReq.GetArg<SfxBoolItem>(nSlot);
bool bDesignMode = pDesignItem ? pDesignItem->GetValue() : !m_bDesignMode;
SetDesignMode( bDesignMode );
if ( m_bDesignMode == bDesignMode )
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();