summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-10-16 08:42:39 +0200
committerJan Holesovsky <kendy@collabora.com>2015-10-16 12:12:27 +0200
commite5be07f5167d4103b4620201df350b1d9e795393 (patch)
treea100ca13a792d765caf75decd2b47104bf3a9f41 /sc
parent427c5dc6e0f817253b2f8cd7727e447ac4f4d656 (diff)
sfx items: Kill the unreadable SFX_REQUEST_ARG, use a template param instead.
Change-Id: I7130f7a84077a63cdc0ca1e131a4d90469eac90d
Diffstat (limited to 'sc')
-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
13 files changed, 24 insertions, 24 deletions
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)