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 /sd/source/ui | |
parent | 427c5dc6e0f817253b2f8cd7727e447ac4f4d656 (diff) |
sfx items: Kill the unreadable SFX_REQUEST_ARG, use a template param instead.
Change-Id: I7130f7a84077a63cdc0ca1e131a4d90469eac90d
Diffstat (limited to 'sd/source/ui')
-rw-r--r-- | sd/source/ui/app/sdmod1.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshel3.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/framework/tools/FrameworkHelper.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fuconarc.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/func/fuconrec.cxx | 16 | ||||
-rw-r--r-- | sd/source/ui/func/fuconuno.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fuinsert.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fuinsfil.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/func/fuolbull.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fuscale.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/fusnapln.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/func/futempl.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/table/tablefunction.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/ViewShellImplementation.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/view/drtxtob1.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 65 | ||||
-rw-r--r-- | sd/source/ui/view/drviews3.cxx | 18 | ||||
-rw-r--r-- | sd/source/ui/view/drviews9.cxx | 76 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvs2.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/viewshe3.cxx | 10 |
22 files changed, 126 insertions, 133 deletions
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)) { |