diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-10-16 08:42:39 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-10-16 12:12:27 +0200 |
commit | e5be07f5167d4103b4620201df350b1d9e795393 (patch) | |
tree | a100ca13a792d765caf75decd2b47104bf3a9f41 /sw/source/uibase/uiview | |
parent | 427c5dc6e0f817253b2f8cd7727e447ac4f4d656 (diff) |
sfx items: Kill the unreadable SFX_REQUEST_ARG, use a template param instead.
Change-Id: I7130f7a84077a63cdc0ca1e131a4d90469eac90d
Diffstat (limited to 'sw/source/uibase/uiview')
-rw-r--r-- | sw/source/uibase/uiview/view2.cxx | 8 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewdraw.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewprt.cxx | 4 |
3 files changed, 9 insertions, 9 deletions
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(); |