basctl/source/basicide/basides1.cxx | 6 +- sc/source/ui/docshell/docsh4.cxx | 8 +- sc/source/ui/drawfunc/fuconuno.cxx | 4 - sc/source/ui/drawfunc/fuins2.cxx | 2 sc/source/ui/view/cellsh1.cxx | 6 +- sc/source/ui/view/tabvwsh2.cxx | 2 sc/source/ui/view/tabvwsh3.cxx | 2 sc/source/ui/view/tabvwsha.cxx | 2 sd/source/ui/app/sdmod1.cxx | 4 - sd/source/ui/docshell/docshel3.cxx | 2 sd/source/ui/func/fuconuno.cxx | 4 - sd/source/ui/func/fuinsert.cxx | 2 sd/source/ui/func/fusnapln.cxx | 2 sd/source/ui/func/futempl.cxx | 2 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 2 sd/source/ui/table/tablefunction.cxx | 6 +- sd/source/ui/view/ViewShellImplementation.cxx | 8 +- sd/source/ui/view/drviews2.cxx | 24 ++++---- sd/source/ui/view/drviews3.cxx | 6 +- sd/source/ui/view/viewshe3.cxx | 6 +- sfx2/source/appl/appopen.cxx | 50 ++++++++--------- sfx2/source/appl/appserv.cxx | 18 +++--- sfx2/source/doc/objserv.cxx | 12 ++-- sfx2/source/view/viewfrm.cxx | 30 +++++----- sfx2/source/view/viewfrm2.cxx | 2 sfx2/source/view/viewprn.cxx | 8 +- sfx2/source/view/viewsh.cxx | 2 svx/source/form/fmshell.cxx | 4 - svx/source/table/tablecontroller.cxx | 6 +- sw/source/uibase/app/docsh2.cxx | 6 +- sw/source/uibase/app/docst.cxx | 2 sw/source/uibase/shells/annotsh.cxx | 2 sw/source/uibase/shells/basesh.cxx | 6 +- sw/source/uibase/shells/tabsh.cxx | 4 - sw/source/uibase/shells/textfld.cxx | 24 ++++---- sw/source/uibase/shells/textsh.cxx | 2 sw/source/uibase/uiview/view2.cxx | 6 +- sw/source/uibase/uiview/viewdraw.cxx | 2 sw/source/uibase/uiview/viewprt.cxx | 2 sw/source/uibase/wrtsh/wrtsh1.cxx | 12 ++-- 40 files changed, 150 insertions(+), 150 deletions(-)
New commits: commit b8df7459ba39b9c91ad703b557c0e924d42f6a10 Author: Mike Kaganski <[email protected]> AuthorDate: Thu Nov 27 07:48:59 2025 +0100 Commit: Mike Kaganski <[email protected]> CommitDate: Thu Nov 27 19:20:38 2025 +0100 Drop explicit template parameter where deducible Namely, from SfxRequest::GetArg variant taking TypedWhichId. Change-Id: I60e0fcf6defdc78d29bc98afe24ac22014d4aee2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194672 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 9c910ba8389f..b76afa43b13d 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -318,7 +318,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) { uno::Reference< task::XStatusIndicator > xStatusIndicator; - const SfxUnoAnyItem* pStatusIndicatorItem = rReq.GetArg<SfxUnoAnyItem>(SID_PROGRESS_STATUSBAR_CONTROL); + const SfxUnoAnyItem* pStatusIndicatorItem = rReq.GetArg(SID_PROGRESS_STATUSBAR_CONTROL); if ( pStatusIndicatorItem ) OSL_VERIFY( pStatusIndicatorItem->GetValue() >>= xStatusIndicator ); else @@ -720,7 +720,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) pDocument.reset( new ScriptDocument( ScriptDocument::getDocumentWithURLOrCaption( sDocumentCaption ) ) ); } - const SfxUnoAnyItem* pDocModelItem = rReq.GetArg<SfxUnoAnyItem>(SID_BASICIDE_ARG_DOCUMENT_MODEL); + const SfxUnoAnyItem* pDocModelItem = rReq.GetArg(SID_BASICIDE_ARG_DOCUMENT_MODEL); if (!pDocument && pDocModelItem) { uno::Reference< frame::XModel > xModel( pDocModelItem->GetValue(), UNO_QUERY ); @@ -731,7 +731,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq ) if (!pDocument) break; - const SfxStringItem* pLibNameItem = rReq.GetArg<SfxStringItem>(SID_BASICIDE_ARG_LIBNAME); + const SfxStringItem* pLibNameItem = rReq.GetArg(SID_BASICIDE_ARG_LIBNAME); if ( !pLibNameItem ) break; diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 7571cdf06352..143c8f26f272 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -714,7 +714,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) break; case SID_SC_ATTR_PAGE_MARGIN: { - const SvxLRSpaceItem* pLR = rReq.GetArg<SvxLRSpaceItem>(SID_ATTR_LRSPACE); + const SvxLRSpaceItem* pLR = rReq.GetArg(SID_ATTR_LRSPACE); if (!pLR) { SAL_WARN( "sc", " Left & Right margins are missing"); break; @@ -723,7 +723,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) SvxIndentValue nLeft = pLR->GetLeft(); SvxIndentValue nRight = pLR->GetRight(); - const SvxULSpaceItem* pUL = rReq.GetArg<SvxULSpaceItem>(SID_ATTR_ULSPACE); + const SvxULSpaceItem* pUL = rReq.GetArg(SID_ATTR_ULSPACE); if (!pUL) { SAL_WARN( "sc", " Top & Bottom margins are missing"); break; @@ -786,7 +786,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) { ScDocument& rDoc = GetDocument(); // get argument (recorded macro) - const SfxBoolItem* pItem = rReq.GetArg<SfxBoolItem>(FID_CHG_RECORD); + const SfxBoolItem* pItem = rReq.GetArg(FID_CHG_RECORD); bool bDo = true; // desired state @@ -1324,7 +1324,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) break; case SID_NOTEBOOKBAR: { - const SfxStringItem* pFile = rReq.GetArg<SfxStringItem>( SID_NOTEBOOKBAR ); + const SfxStringItem* pFile = rReq.GetArg( SID_NOTEBOOKBAR ); if ( pBindings && sfx2::SfxNotebookBar::IsActive() ) sfx2::SfxNotebookBar::ExecMethod(*pBindings, pFile ? pFile->GetValue() : u""_ustr); diff --git a/sc/source/ui/drawfunc/fuconuno.cxx b/sc/source/ui/drawfunc/fuconuno.cxx index 6bf8150b16f8..2f1db46198b5 100644 --- a/sc/source/ui/drawfunc/fuconuno.cxx +++ b/sc/source/ui/drawfunc/fuconuno.cxx @@ -29,8 +29,8 @@ FuConstUnoControl::FuConstUnoControl(ScTabViewShell& rViewSh, vcl::Window* pWin, , nInventor(SdrInventor::Unknown) , nIdentifier(SdrObjKind::NONE) { - const SfxUInt32Item* pInventorItem = rReq.GetArg<SfxUInt32Item>(SID_FM_CONTROL_INVENTOR); - const SfxUInt16Item* pIdentifierItem = rReq.GetArg<SfxUInt16Item>(SID_FM_CONTROL_IDENTIFIER); + const SfxUInt32Item* pInventorItem = rReq.GetArg(SID_FM_CONTROL_INVENTOR); + const SfxUInt16Item* pIdentifierItem = rReq.GetArg(SID_FM_CONTROL_IDENTIFIER); if( pInventorItem ) nInventor = static_cast<SdrInventor>(pInventorItem->GetValue()); if( pIdentifierItem ) diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index 8d38623adc5c..264a69adc7e3 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -234,7 +234,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* uno::Reference< io::XInputStream > xIconMetaFile; const sal_uInt16 nSlot = rReq.GetSlot(); - const SfxGlobalNameItem* pNameItem = rReq.GetArg<SfxGlobalNameItem>(SID_INSERT_OBJECT); + const SfxGlobalNameItem* pNameItem = rReq.GetArg(SID_INSERT_OBJECT); if ( nSlot == SID_INSERT_OBJECT && pNameItem ) { const SvGlobalName& aClassName = pNameItem->GetValue(); diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 96ebbc41971c..63e33886b024 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -3071,7 +3071,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case SID_EXTERNAL_SOURCE: { - const SfxStringItem* pFile = rReq.GetArg<SfxStringItem>(SID_FILE_NAME); + const SfxStringItem* pFile = rReq.GetArg(SID_FILE_NAME); const SfxStringItem* pSource = rReq.GetArg<SfxStringItem>(FN_PARAM_1); if ( pFile && pSource ) { @@ -3083,10 +3083,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) aFile = pFile->GetValue(); aSource = pSource->GetValue(); - const SfxStringItem* pFilter = rReq.GetArg<SfxStringItem>(SID_FILTER_NAME); + const SfxStringItem* pFilter = rReq.GetArg(SID_FILTER_NAME); if ( pFilter ) aFilter = pFilter->GetValue(); - const SfxStringItem* pOptions = rReq.GetArg<SfxStringItem>(SID_FILE_FILTEROPTIONS); + const SfxStringItem* pOptions = rReq.GetArg(SID_FILE_FILTEROPTIONS); if ( pOptions ) aOptions = pOptions->GetValue(); const SfxUInt32Item* pRefresh = rReq.GetArg<SfxUInt32Item>(FN_PARAM_2); diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx index 0ba71d02df8c..1330e77f6912 100644 --- a/sc/source/ui/view/tabvwsh2.cxx +++ b/sc/source/ui/view/tabvwsh2.cxx @@ -99,7 +99,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) SdrObjKind eNewFormObjKind = SdrObjKind::NONE; if (nNewId == SID_FM_CREATE_CONTROL) { - const SfxUInt16Item* pIdentifierItem = rReq.GetArg<SfxUInt16Item>(SID_FM_CONTROL_IDENTIFIER); + const SfxUInt16Item* pIdentifierItem = rReq.GetArg(SID_FM_CONTROL_IDENTIFIER); if (pIdentifierItem) eNewFormObjKind = static_cast<SdrObjKind>(pIdentifierItem->GetValue()); } diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index 8c0b51b0c8e6..1c8fd3cf5863 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -1248,7 +1248,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) SCTAB nTab; ::std::vector < sal_Int32 > aIndexList; - const SfxIntegerListItem* pItem = rReq.GetArg<SfxIntegerListItem>(SID_SELECT_TABLES); + const SfxIntegerListItem* pItem = rReq.GetArg(SID_SELECT_TABLES); if ( pItem ) aIndexList = pItem->GetList(); else diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 503d3cac6b1f..7ff73bd5cef9 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -1032,7 +1032,7 @@ void ScTabViewShell::ExecStyle( SfxRequest& rReq ) case SID_STYLE_APPLY: { const SfxStringItem* pNameItem = rReq.GetArg<SfxStringItem>(SID_APPLY_STYLE); - const SfxStringItem* pFamilyItem = rReq.GetArg<SfxStringItem>(SID_STYLE_FAMILYNAME); + const SfxStringItem* pFamilyItem = rReq.GetArg(SID_STYLE_FAMILYNAME); if ( pFamilyItem && pNameItem ) { try diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index dfc7c0297523..620a3c4b3aba 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -229,7 +229,7 @@ void SdModule::Execute(SfxRequest& rReq) if (!bIntercept) { - if (const SfxStringItem* pURLItem = rReq.GetArg<SfxStringItem>(SID_FILE_NAME)) + if (const SfxStringItem* pURLItem = rReq.GetArg(SID_FILE_NAME)) { if (!pViewShell || !SfxObjectShell::AllowedLinkProtocolFromDocument(pURLItem->GetValue(), pViewShell->GetObjectShell(), @@ -483,7 +483,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest const & rReq ) if (SvtModuleOptions().IsImpressInstalled()) { Reference< XFrame > xTargetFrame; - const SfxUnoFrameItem* pFrmItem = rReq.GetArg<SfxUnoFrameItem>(SID_FILLFRAME); + const SfxUnoFrameItem* pFrmItem = rReq.GetArg(SID_FILLFRAME); if ( pFrmItem ) xTargetFrame = pFrmItem->GetFrame(); diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx index 4f648b3cc233..f8b3542da356 100644 --- a/sd/source/ui/docshell/docshel3.cxx +++ b/sd/source/ui/docshell/docshel3.cxx @@ -430,7 +430,7 @@ void DrawDocShell::Execute( SfxRequest& rReq ) case SID_NOTEBOOKBAR: { - const SfxStringItem* pFile = rReq.GetArg<SfxStringItem>( SID_NOTEBOOKBAR ); + const SfxStringItem* pFile = rReq.GetArg( SID_NOTEBOOKBAR ); if ( mpViewShell ) { diff --git a/sd/source/ui/func/fuconuno.cxx b/sd/source/ui/func/fuconuno.cxx index 01826758c31b..af253159ff39 100644 --- a/sd/source/ui/func/fuconuno.cxx +++ b/sd/source/ui/func/fuconuno.cxx @@ -62,8 +62,8 @@ void FuConstructUnoControl::DoExecute( SfxRequest& rReq ) { FuConstruct::DoExecute( rReq ); - const SfxUInt32Item* pInventorItem = rReq.GetArg<SfxUInt32Item>(SID_FM_CONTROL_INVENTOR); - const SfxUInt16Item* pIdentifierItem = rReq.GetArg<SfxUInt16Item>(SID_FM_CONTROL_IDENTIFIER); + const SfxUInt32Item* pInventorItem = rReq.GetArg(SID_FM_CONTROL_INVENTOR); + const SfxUInt16Item* pIdentifierItem = rReq.GetArg(SID_FM_CONTROL_IDENTIFIER); if( pInventorItem ) nInventor = static_cast<SdrInventor>(pInventorItem->GetValue()); if( pIdentifierItem ) diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index 1b88fc4ff891..4083a5ca7af2 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -441,7 +441,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq ) OUString aIconMediaType; uno::Reference< io::XInputStream > xIconMetaFile; - const SfxGlobalNameItem* pNameItem = rReq.GetArg<SfxGlobalNameItem>(SID_INSERT_OBJECT); + const SfxGlobalNameItem* pNameItem = rReq.GetArg(SID_INSERT_OBJECT); if ( nSlotId == SID_INSERT_OBJECT && pNameItem ) { const SvGlobalName& aClassName = pNameItem->GetValue(); diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx index db8aac3c4a89..33a26902b6cb 100644 --- a/sd/source/ui/func/fusnapln.cxx +++ b/sd/source/ui/func/fusnapln.cxx @@ -57,7 +57,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq ) bool bCreateNew = true; // Get index of snap line or snap point from the request. - const SfxUInt32Item* pHelpLineIndex = rReq.GetArg<SfxUInt32Item>(ID_VAL_INDEX); + const SfxUInt32Item* pHelpLineIndex = rReq.GetArg(ID_VAL_INDEX); if (pHelpLineIndex != nullptr) { nHelpLine = static_cast<sal_uInt16>(pHelpLineIndex->GetValue()); diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index c4d0b71b121c..b30250c87bb7 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -131,7 +131,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) case SID_STYLE_NEW_BY_EXAMPLE: { const SfxStringItem* pNameItem = rReq.GetArg<SfxStringItem>(SID_APPLY_STYLE); - const SfxStringItem* pFamilyItem = rReq.GetArg<SfxStringItem>(SID_STYLE_FAMILYNAME); + const SfxStringItem* pFamilyItem = rReq.GetArg(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 e47866e9b4ba..cb1126eea317 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -147,7 +147,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest) case SID_PAGES_PER_ROW: if (rRequest.GetArgs() != nullptr) { - const SfxUInt16Item* pPagesPerRow = rRequest.GetArg<SfxUInt16Item>(SID_PAGES_PER_ROW); + const SfxUInt16Item* pPagesPerRow = rRequest.GetArg(SID_PAGES_PER_ROW); if (pPagesPerRow != nullptr) { sal_Int32 nColumnCount = pPagesPerRow->GetValue(); diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx index 943744da15dc..008055f9ef04 100644 --- a/sd/source/ui/table/tablefunction.cxx +++ b/sd/source/ui/table/tablefunction.cxx @@ -185,9 +185,9 @@ void DrawViewShell::FuTable(SfxRequest& rReq) DrawViewShell* pShell = this; ::sd::View* pView = mpView; - 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); + const SfxUInt16Item* pCols = rReq.GetArg(SID_ATTR_TABLE_COLUMN); + const SfxUInt16Item* pRows = rReq.GetArg(SID_ATTR_TABLE_ROW); + const SfxStringItem* pStyle = rReq.GetArg(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 2541083d6fd4..794150f0eac9 100644 --- a/sd/source/ui/view/ViewShellImplementation.cxx +++ b/sd/source/ui/view/ViewShellImplementation.cxx @@ -116,8 +116,8 @@ void ViewShell::Implementation::ProcessModifyPageSlot ( } else if (pArgs->Count() == 4) { - const SfxStringItem* pNewName = rRequest.GetArg<SfxStringItem>(ID_VAL_PAGENAME); - const SfxUInt32Item* pNewAutoLayout = rRequest.GetArg<SfxUInt32Item>(ID_VAL_WHATLAYOUT); + const SfxStringItem* pNewName = rRequest.GetArg(ID_VAL_PAGENAME); + const SfxUInt32Item* pNewAutoLayout = rRequest.GetArg(ID_VAL_WHATLAYOUT); const SfxBoolItem* pBVisible = rRequest.GetArg<SfxBoolItem>(ID_VAL_ISPAGEBACK); const SfxBoolItem* pBObjsVisible = rRequest.GetArg<SfxBoolItem>(ID_VAL_ISPAGEOBJ); assert(pNewName && pNewAutoLayout && pBVisible && pBObjsVisible && "must be present"); @@ -223,8 +223,8 @@ void ViewShell::Implementation::ProcessModifyPageSlot ( void ViewShell::Implementation::AssignLayout ( SfxRequest const & rRequest, PageKind ePageKind ) { - const SfxUInt32Item* pWhatPage = rRequest.GetArg<SfxUInt32Item>(ID_VAL_WHATPAGE); - const SfxUInt32Item* pWhatLayout = rRequest.GetArg<SfxUInt32Item>(ID_VAL_WHATLAYOUT); + const SfxUInt32Item* pWhatPage = rRequest.GetArg(ID_VAL_WHATPAGE); + const SfxUInt32Item* pWhatLayout = rRequest.GetArg(ID_VAL_WHATLAYOUT); SdDrawDocument* pDocument = mrViewShell.GetDoc(); if( !pDocument ) diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index a15fc19532a4..d0b3ead6ab9d 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -4330,7 +4330,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_FONT: if( rReq.GetArgs() ) { - const SvxFontItem* pItem = rReq.GetArg<SvxFontItem>(SID_ATTR_CHAR_FONT); + const SvxFontItem* pItem = rReq.GetArg(SID_ATTR_CHAR_FONT); if (pItem) { aNewAttr.Put(*pItem); @@ -4340,7 +4340,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_FONTHEIGHT: if( rReq.GetArgs() ) { - const SvxFontHeightItem* pItem = rReq.GetArg<SvxFontHeightItem>(SID_ATTR_CHAR_FONTHEIGHT); + const SvxFontHeightItem* pItem = rReq.GetArg(SID_ATTR_CHAR_FONTHEIGHT); if (pItem) { aNewAttr.Put(*pItem); @@ -4350,7 +4350,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_WEIGHT: if( rReq.GetArgs() ) { - const SvxWeightItem* pItem = rReq.GetArg<SvxWeightItem>(SID_ATTR_CHAR_WEIGHT); + const SvxWeightItem* pItem = rReq.GetArg(SID_ATTR_CHAR_WEIGHT); if (pItem) { aNewAttr.Put(*pItem); @@ -4360,7 +4360,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_POSTURE: if( rReq.GetArgs() ) { - const SvxPostureItem* pItem = rReq.GetArg<SvxPostureItem>(SID_ATTR_CHAR_POSTURE); + const SvxPostureItem* pItem = rReq.GetArg(SID_ATTR_CHAR_POSTURE); if (pItem) { aNewAttr.Put(*pItem); @@ -4370,7 +4370,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_UNDERLINE: if( rReq.GetArgs() ) { - const SvxUnderlineItem* pItem = rReq.GetArg<SvxUnderlineItem>(SID_ATTR_CHAR_UNDERLINE); + const SvxUnderlineItem* pItem = rReq.GetArg(SID_ATTR_CHAR_UNDERLINE); if (pItem) { aNewAttr.Put(*pItem); @@ -4385,7 +4385,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_OVERLINE: if( rReq.GetArgs() ) { - const SvxOverlineItem* pItem = rReq.GetArg<SvxOverlineItem>(SID_ATTR_CHAR_OVERLINE); + const SvxOverlineItem* pItem = rReq.GetArg(SID_ATTR_CHAR_OVERLINE); if (pItem) { aNewAttr.Put(*pItem); @@ -4432,7 +4432,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_SHADOWED: if( rReq.GetArgs() ) { - const SvxShadowedItem* pItem = rReq.GetArg<SvxShadowedItem>(SID_ATTR_CHAR_SHADOWED); + const SvxShadowedItem* pItem = rReq.GetArg(SID_ATTR_CHAR_SHADOWED); if (pItem) { aNewAttr.Put(*pItem); @@ -4442,7 +4442,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_CONTOUR: if( rReq.GetArgs() ) { - const SvxContourItem* pItem = rReq.GetArg<SvxContourItem>(SID_ATTR_CHAR_CONTOUR); + const SvxContourItem* pItem = rReq.GetArg(SID_ATTR_CHAR_CONTOUR); if (pItem) { aNewAttr.Put(*pItem); @@ -4453,7 +4453,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_STRIKEOUT: if( rReq.GetArgs() ) { - const SvxCrossedOutItem* pItem = rReq.GetArg<SvxCrossedOutItem>(SID_ATTR_CHAR_STRIKEOUT); + const SvxCrossedOutItem* pItem = rReq.GetArg(SID_ATTR_CHAR_STRIKEOUT); if (pItem) { aNewAttr.Put(*pItem); @@ -4463,7 +4463,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_COLOR: if( rReq.GetArgs() ) { - const SvxColorItem* pItem = rReq.GetArg<SvxColorItem>(SID_ATTR_CHAR_COLOR); + const SvxColorItem* pItem = rReq.GetArg(SID_ATTR_CHAR_COLOR); if (pItem) { aNewAttr.Put(*pItem); @@ -4473,7 +4473,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_KERNING: if( rReq.GetArgs() ) { - const SvxKerningItem* pItem = rReq.GetArg<SvxKerningItem>(SID_ATTR_CHAR_KERNING); + const SvxKerningItem* pItem = rReq.GetArg(SID_ATTR_CHAR_KERNING); if (pItem) { aNewAttr.Put(*pItem); @@ -4483,7 +4483,7 @@ void DrawViewShell::ExecChar( SfxRequest &rReq ) case SID_ATTR_CHAR_CASEMAP: if( rReq.GetArgs() ) { - const SvxCaseMapItem* pItem = rReq.GetArg<SvxCaseMapItem>(SID_ATTR_CHAR_CASEMAP); + const SvxCaseMapItem* pItem = rReq.GetArg(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 3617806833e5..ae6c27645807 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -143,7 +143,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) && !SlideShow::IsInteractiveSlideshow(GetViewShellBase()) // IASS && rReq.GetArgs()) { - if (const SfxUInt32Item* pWhatPage = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATPAGE)) + if (const SfxUInt32Item* pWhatPage = rReq.GetArg(ID_VAL_WHATPAGE)) SlideShow::GetSlideShow(GetViewShellBase())->jumpToPageNumber(static_cast<sal_Int32>((pWhatPage->GetValue()-1)>>1)); } else @@ -157,7 +157,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) } else if (pArgs->Count () == 2) { - const SfxUInt32Item* pWhatPage = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATPAGE); + const SfxUInt32Item* pWhatPage = rReq.GetArg(ID_VAL_WHATPAGE); const SfxUInt32Item* pWhatKind = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATKIND); sal_Int32 nWhatPage = static_cast<sal_Int32>(pWhatPage->GetValue ()); @@ -427,7 +427,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) { if( rReq.GetArgs() ) { - const SfxStringItem* pBookmark = rReq.GetArg<SfxStringItem>(SID_JUMPTOMARK); + const SfxStringItem* pBookmark = rReq.GetArg(SID_JUMPTOMARK); if (pBookmark) { diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx index a722aef10fe3..894bf969af9c 100644 --- a/sd/source/ui/view/viewshe3.cxx +++ b/sd/source/ui/view/viewshe3.cxx @@ -212,7 +212,7 @@ SdPage* ViewShell::CreateOrDuplicatePage ( else if (pArgs->Count() == 1 || pArgs->Count() == 2) { pDocument->StopWorkStartupDelay(); - const SfxUInt32Item* pLayout = rRequest.GetArg<SfxUInt32Item>(ID_VAL_WHATLAYOUT); + const SfxUInt32Item* pLayout = rRequest.GetArg(ID_VAL_WHATLAYOUT); if( pLayout ) { if (ePageKind == PageKind::Notes) @@ -230,8 +230,8 @@ SdPage* ViewShell::CreateOrDuplicatePage ( // AutoLayouts must be ready pDocument->StopWorkStartupDelay(); - const SfxStringItem* pPageName = rRequest.GetArg<SfxStringItem>(ID_VAL_PAGENAME); - const SfxUInt32Item* pLayout = rRequest.GetArg<SfxUInt32Item>(ID_VAL_WHATLAYOUT); + const SfxStringItem* pPageName = rRequest.GetArg(ID_VAL_PAGENAME); + const SfxUInt32Item* pLayout = rRequest.GetArg(ID_VAL_WHATLAYOUT); const SfxBoolItem* pIsPageBack = rRequest.GetArg<SfxBoolItem>(ID_VAL_ISPAGEBACK); const SfxBoolItem* pIsPageObj = rRequest.GetArg<SfxBoolItem>(ID_VAL_ISPAGEOBJ); assert(pPageName && pLayout && pIsPageBack && pIsPageObj && "must be present"); diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index b56b44c11992..bd57052bfde1 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -416,7 +416,7 @@ ErrCodeMsg SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUStrin void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq ) { - const SfxStringItem* pFactoryItem = rReq.GetArg<SfxStringItem>(SID_NEWDOCDIRECT); + const SfxStringItem* pFactoryItem = rReq.GetArg(SID_NEWDOCDIRECT); OUString aFactName; if ( pFactoryItem ) aFactName = pFactoryItem->GetValue(); @@ -450,9 +450,9 @@ void SfxApplication::NewDocDirectState_Impl( SfxItemSet &rSet ) void SfxApplication::NewDocExec_Impl( SfxRequest& rReq ) { // No Parameter from BASIC only Factory given? - 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); + const SfxStringItem* pTemplNameItem = rReq.GetArg(SID_TEMPLATE_NAME); + const SfxStringItem* pTemplFileNameItem = rReq.GetArg(SID_FILE_NAME); + const SfxStringItem* pTemplRegionNameItem = rReq.GetArg(SID_TEMPLATE_REGIONNAME); SfxObjectShellLock xDoc; @@ -585,12 +585,12 @@ bool lcl_isFilterNativelySupported(const SfxFilter& rFilter) void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) { OUString aDocService; - const SfxStringItem* pDocSrvItem = rReq.GetArg<SfxStringItem>(SID_DOC_SERVICE); + const SfxStringItem* pDocSrvItem = rReq.GetArg(SID_DOC_SERVICE); if (pDocSrvItem) aDocService = pDocSrvItem->GetValue(); sal_uInt16 nSID = rReq.GetSlot(); - const SfxStringItem* pFileNameItem = rReq.GetArg<SfxStringItem>(SID_FILE_NAME); + const SfxStringItem* pFileNameItem = rReq.GetArg(SID_FILE_NAME); if ( pFileNameItem ) { OUString aCommand( pFileNameItem->GetValue() ); @@ -617,7 +617,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) OUString aFilter; std::optional<SfxAllItemSet> pSet; OUString aPath; - const SfxStringItem* pFolderNameItem = rReq.GetArg<SfxStringItem>(SID_PATH); + const SfxStringItem* pFolderNameItem = rReq.GetArg(SID_PATH); if ( pFolderNameItem ) aPath = pFolderNameItem->GetValue(); else if ( nSID == SID_OPENTEMPLATE ) @@ -628,17 +628,17 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) } sal_Int16 nDialog = SFX2_IMPL_DIALOG_CONFIG; - const SfxBoolItem* pSystemDialogItem = rReq.GetArg<SfxBoolItem>(SID_FILE_DIALOG); + const SfxBoolItem* pSystemDialogItem = rReq.GetArg(SID_FILE_DIALOG); if ( pSystemDialogItem ) nDialog = pSystemDialogItem->GetValue() ? SFX2_IMPL_DIALOG_SYSTEM : SFX2_IMPL_DIALOG_OOO; - const SfxBoolItem* pRemoteDialogItem = rReq.GetArg<SfxBoolItem>(SID_REMOTE_DIALOG); + const SfxBoolItem* pRemoteDialogItem = rReq.GetArg(SID_REMOTE_DIALOG); if ( pRemoteDialogItem && pRemoteDialogItem->GetValue()) nDialog = SFX2_IMPL_DIALOG_REMOTE; sal_Int16 nDialogType = ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION_FILTEROPTIONS; FileDialogFlags eDialogFlags = FileDialogFlags::MultiSelection; - const SfxBoolItem* pSignPDFItem = rReq.GetArg<SfxBoolItem>(SID_SIGNPDF); + const SfxBoolItem* pSignPDFItem = rReq.GetArg(SID_SIGNPDF); if (pSignPDFItem && pSignPDFItem->GetValue()) { eDialogFlags |= FileDialogFlags::SignPDF; @@ -647,7 +647,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) css::uno::Sequence< OUString > aDenyList; - const SfxStringListItem* pDenyListItem = rReq.GetArg<SfxStringListItem>(SID_DENY_LIST); + const SfxStringListItem* pDenyListItem = rReq.GetArg(SID_DENY_LIST); if ( pDenyListItem ) pDenyListItem->GetStringList( aDenyList ); @@ -683,7 +683,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) uno::Reference<task::XInteractionHandler> xWrappedHandler; // wrap existing handler or create new UUI handler - const SfxUnoAnyItem* pInteractionItem = rReq.GetArg<SfxUnoAnyItem>(SID_INTERACTIONHANDLER); + const SfxUnoAnyItem* pInteractionItem = rReq.GetArg(SID_INTERACTIONHANDLER); if (pInteractionItem) { pInteractionItem->GetValue() >>= xWrappedHandler; @@ -785,16 +785,16 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) rReq.RemoveItem( SID_BROWSE ); } - const SfxStringItem* pFileName = rReq.GetArg<SfxStringItem>(SID_FILE_NAME); + const SfxStringItem* pFileName = rReq.GetArg(SID_FILE_NAME); assert(pFileName && "SID_FILE_NAME is required"); OUString aFileName = pFileName->GetValue(); OUString aReferer; - const SfxStringItem* pRefererItem = rReq.GetArg<SfxStringItem>(SID_REFERER); + const SfxStringItem* pRefererItem = rReq.GetArg(SID_REFERER); if ( pRefererItem ) aReferer = pRefererItem->GetValue(); - const SfxStringItem* pFileFlagsItem = rReq.GetArg<SfxStringItem>(SID_OPTIONS); + const SfxStringItem* pFileFlagsItem = rReq.GetArg(SID_OPTIONS); if ( pFileFlagsItem ) { const OUString aFileFlags = pFileFlagsItem->GetValue().toAsciiUpperCase(); @@ -869,7 +869,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) bool bStartPresentation = false; if (pFilter) { - const SfxUInt16Item* pSlide = rReq.GetArg<SfxUInt16Item>(SID_DOC_STARTPRESENTATION); + const SfxUInt16Item* pSlide = rReq.GetArg(SID_DOC_STARTPRESENTATION); if (pSlide && (pFilter->GetWildcard().Matches(u".pptx") || pFilter->GetWildcard().Matches(u".ppt") @@ -976,7 +976,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) if ( !pTargetFrame ) { - const SfxUnoFrameItem* pUnoFrameItem = rReq.GetArg<SfxUnoFrameItem>(SID_FILLFRAME); + const SfxUnoFrameItem* pUnoFrameItem = rReq.GetArg(SID_FILLFRAME); if ( pUnoFrameItem ) xTargetFrame = pUnoFrameItem->GetFrame(); } @@ -998,19 +998,19 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) // check if the view must be hidden bool bHidden = false; - const SfxBoolItem* pHidItem = rReq.GetArg<SfxBoolItem>(SID_HIDDEN); + const SfxBoolItem* pHidItem = rReq.GetArg(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. - const SfxBoolItem* pPreviewItem = rReq.GetArg<SfxBoolItem>(SID_PREVIEW); + const SfxBoolItem* pPreviewItem = rReq.GetArg(SID_PREVIEW); if (!bHidden && ( !pPreviewItem || !pPreviewItem->GetValue() ) ) { - const SfxUnoAnyItem* pInteractionItem = rReq.GetArg<SfxUnoAnyItem>(SID_INTERACTIONHANDLER); - const SfxUInt16Item* pMacroExecItem = rReq.GetArg<SfxUInt16Item>(SID_MACROEXECMODE); - const SfxUInt16Item* pDocTemplateItem = rReq.GetArg<SfxUInt16Item>(SID_UPDATEDOCMODE); + const SfxUnoAnyItem* pInteractionItem = rReq.GetArg(SID_INTERACTIONHANDLER); + const SfxUInt16Item* pMacroExecItem = rReq.GetArg(SID_MACROEXECMODE); + const SfxUInt16Item* pDocTemplateItem = rReq.GetArg(SID_UPDATEDOCMODE); if (!pInteractionItem) { @@ -1025,12 +1025,12 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) // extract target name OUString aTarget; - const SfxStringItem* pTargetItem = rReq.GetArg<SfxStringItem>(SID_TARGETNAME); + const SfxStringItem* pTargetItem = rReq.GetArg(SID_TARGETNAME); if ( pTargetItem ) aTarget = pTargetItem->GetValue(); else { - const SfxBoolItem* pNewViewItem = rReq.GetArg<SfxBoolItem>(SID_OPEN_NEW_VIEW); + const SfxBoolItem* pNewViewItem = rReq.GetArg(SID_OPEN_NEW_VIEW); if ( pNewViewItem && pNewViewItem->GetValue() ) aTarget = "_blank" ; } @@ -1057,7 +1057,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) } // make URL ready - const SfxStringItem* pURLItem = rReq.GetArg<SfxStringItem>(SID_FILE_NAME); + const SfxStringItem* pURLItem = rReq.GetArg(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 6eb6930adf11..55ad4355afce 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -456,7 +456,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - const SfxStringItem* pStringItem = rReq.GetArg<SfxStringItem>(SID_CONFIG); + const SfxStringItem* pStringItem = rReq.GetArg(SID_CONFIG); SfxItemSetFixed<SID_CONFIG, SID_CONFIG, SID_MACROINFO, SID_MACROINFO> aSet( GetPool() ); @@ -479,7 +479,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) #if HAVE_FEATURE_SCRIPTING // Preselect a macro in the 'keyboard' page - if (auto const item = rReq.GetArg<SfxMacroInfoItem>(SID_MACROINFO)) { + if (auto const item = rReq.GetArg(SID_MACROINFO)) { aSet.Put(*item); } #endif @@ -699,7 +699,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) case FN_CHANGE_THEME: { - const SfxStringItem* pNewThemeArg = rReq.GetArg<SfxStringItem>(FN_PARAM_NEW_THEME); + const SfxStringItem* pNewThemeArg = rReq.GetArg(FN_PARAM_NEW_THEME); OUString sSchemeName = ThemeColors::GetThemeColors().GetThemeName(); AppearanceMode eAppearnceMode = MiscSettings::GetAppColorMode(); @@ -752,7 +752,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) } case FN_INVERT_BACKGROUND: { - const SfxStringItem* pNewThemeArg = rReq.GetArg<SfxStringItem>(FN_PARAM_NEW_THEME); + const SfxStringItem* pNewThemeArg = rReq.GetArg(FN_PARAM_NEW_THEME); svtools::EditableColorConfig aColorConfig; ::Color aDefLightColor = svtools::ColorConfig::GetDefaultColor(svtools::DOCCOLOR, 0); @@ -797,7 +797,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) case SID_HELPTIPS: { // Evaluate Parameter - const SfxBoolItem* pOnItem = rReq.GetArg<SfxBoolItem>(SID_HELPTIPS); + const SfxBoolItem* pOnItem = rReq.GetArg(SID_HELPTIPS); bool bOn = pOnItem ? pOnItem->GetValue() : !Help::IsQuickHelpEnabled(); @@ -826,7 +826,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) case SID_HELPBALLOONS: { // Evaluate Parameter - const SfxBoolItem* pOnItem = rReq.GetArg<SfxBoolItem>(SID_HELPBALLOONS); + const SfxBoolItem* pOnItem = rReq.GetArg(SID_HELPBALLOONS); bool bOn = pOnItem ? pOnItem->GetValue() : !Help::IsBalloonHelpEnabled(); @@ -1659,12 +1659,12 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) case SID_OPTIONS_TREEDIALOG: { OUString sPageURL; - const SfxStringItem* pURLItem = rReq.GetArg<SfxStringItem>(SID_OPTIONS_PAGEURL); + const SfxStringItem* pURLItem = rReq.GetArg(SID_OPTIONS_PAGEURL); if ( pURLItem ) sPageURL = pURLItem->GetValue(); sal_uInt16 nPageID = 0; - const SfxUInt16Item* pIDItem = rReq.GetArg<SfxUInt16Item>(SID_OPTIONS_PAGEID); + const SfxUInt16Item* pIDItem = rReq.GetArg(SID_OPTIONS_PAGEID); if (pIDItem) nPageID = pIDItem->GetValue(); @@ -1717,7 +1717,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) { OUString sAdditionsTag = u""_ustr; - const SfxStringItem* pStringArg = rReq.GetArg<SfxStringItem>(FN_PARAM_ADDITIONS_TAG); + const SfxStringItem* pStringArg = rReq.GetArg(FN_PARAM_ADDITIONS_TAG); if (pStringArg) sAdditionsTag = pStringArg->GetValue(); diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index cb1c3759492c..c8d0d613c96c 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -694,7 +694,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_DOCINFO: { - const SfxDocumentInfoItem* pDocInfItem = rReq.GetArg<SfxDocumentInfoItem>(SID_DOCINFO); + const SfxDocumentInfoItem* pDocInfItem = rReq.GetArg(SID_DOCINFO); if ( pDocInfItem ) { // parameter, e.g. from replayed macro @@ -712,7 +712,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) { // no argument containing DocInfo; check optional arguments bool bReadOnly = IsReadOnly(); - const SfxBoolItem* pROItem = rReq.GetArg<SfxBoolItem>(SID_DOC_READONLY); + const SfxBoolItem* pROItem = rReq.GetArg(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 @@ -1039,7 +1039,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) // TODO/LATER: do the following GUI related actions in standalone method // Introduce a status indicator for GUI operation - const SfxUnoAnyItem* pStatusIndicatorItem = rReq.GetArg<SfxUnoAnyItem>(SID_PROGRESS_STATUSBAR_CONTROL); + const SfxUnoAnyItem* pStatusIndicatorItem = rReq.GetArg(SID_PROGRESS_STATUSBAR_CONTROL); if ( !pStatusIndicatorItem ) { // get statusindicator @@ -1076,7 +1076,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) } // Introduce an interaction handler for GUI operation - const SfxUnoAnyItem* pInteractionHandlerItem = rReq.GetArg<SfxUnoAnyItem>(SID_INTERACTIONHANDLER); + const SfxUnoAnyItem* pInteractionHandlerItem = rReq.GetArg(SID_INTERACTIONHANDLER); if ( !pInteractionHandlerItem ) { uno::Reference<css::awt::XWindow> xParentWindow; @@ -1186,7 +1186,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) if ( lErr && nErrorCode == ERRCODE_NONE ) { - const SfxBoolItem* pWarnItem = rReq.GetArg<SfxBoolItem>(SID_FAIL_ON_WARNING); + const SfxBoolItem* pWarnItem = rReq.GetArg(SID_FAIL_ON_WARNING); if ( pWarnItem && pWarnItem->GetValue() ) nErrorCode = lErr; } @@ -1291,7 +1291,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) if ( ( nId == SID_SAVEASDOC || nId == SID_SAVEASREMOTE ) && nErrorCode == ERRCODE_NONE ) { - const SfxBoolItem* saveTo = rReq.GetArg<SfxBoolItem>(SID_SAVETO); + const SfxBoolItem* saveTo = rReq.GetArg(SID_SAVETO); // IsReadOnly may still return true, e.g. when embedded fonts disallow editing if ((saveTo == nullptr || !saveTo->GetValue()) && !IsReadOnly()) { diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 45a82fcf3e90..4c04104763f0 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -428,7 +428,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) if ( rReq.IsAPI() ) { // Control through API if r/w or r/o - const SfxBoolItem* pEditItem = rReq.GetArg<SfxBoolItem>(SID_EDITDOC); + const SfxBoolItem* pEditItem = rReq.GetArg(SID_EDITDOC); if ( pEditItem ) nOpenMode = pEditItem->GetValue() ? SFX_STREAM_READWRITE : SFX_STREAM_READONLY; } @@ -633,7 +633,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) if ( !pSh || !pSh->CanReload_Impl() ) break; SfxApplication* pApp = SfxGetpApp(); - const SfxBoolItem* pForceReloadItem = rReq.GetArg<SfxBoolItem>(SID_FORCERELOAD); + const SfxBoolItem* pForceReloadItem = rReq.GetArg(SID_FORCERELOAD); if( pForceReloadItem && !pForceReloadItem->GetValue() && !pSh->GetMedium()->IsExpired() ) return; @@ -641,21 +641,21 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) return; // AutoLoad is prohibited if possible - const SfxBoolItem* pAutoLoadItem = rReq.GetArg<SfxBoolItem>(SID_AUTOLOAD); + const SfxBoolItem* pAutoLoadItem = rReq.GetArg(SID_AUTOLOAD); if ( pAutoLoadItem && pAutoLoadItem->GetValue() && GetFrame().IsAutoLoadLocked_Impl() ) return; SfxObjectShellLock xOldObj( pSh ); m_pImpl->bReloading = true; - const SfxStringItem* pURLItem = rReq.GetArg<SfxStringItem>(SID_FILE_NAME); + const SfxStringItem* pURLItem = rReq.GetArg(SID_FILE_NAME); // Open as editable? if (!oForEdit.has_value()) oForEdit = !pSh->IsReadOnly(); // If possible ask the User bool bDo = GetViewShell()->PrepareClose(); - const SfxBoolItem* pSilentItem = rReq.GetArg<SfxBoolItem>(SID_SILENT); + const SfxBoolItem* pSilentItem = rReq.GetArg(SID_SILENT); if (getenv("SAL_NO_QUERYSAVE")) bDo = true; else if (bDo && GetFrame().DocIsModified_Impl() && !rReq.IsAPI() @@ -710,7 +710,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) // Filter Detection OUString referer; - const SfxStringItem* refererItem = rReq.GetArg<SfxStringItem>(SID_REFERER); + const SfxStringItem* refererItem = rReq.GetArg(SID_REFERER); if (refererItem != nullptr) { referer = refererItem->GetValue(); } @@ -890,7 +890,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) aViewFrames.clear(); } - const SfxInt32Item* pPageNumber = rReq.GetArg<SfxInt32Item>(SID_PAGE_NUMBER); + const SfxInt32Item* pPageNumber = rReq.GetArg(SID_PAGE_NUMBER); if (pPageNumber && pPageNumber->GetValue() >= 0) { // Restore current page after reload. @@ -2514,8 +2514,8 @@ SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell const & i_rDoc SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell const & i_rDoc, const SfxRequest& i_rCreateDocRequest ) { - const SfxUnoFrameItem* pFrameItem = i_rCreateDocRequest.GetArg<SfxUnoFrameItem>(SID_FILLFRAME); - const SfxBoolItem* pHiddenItem = i_rCreateDocRequest.GetArg<SfxBoolItem>(SID_HIDDEN); + const SfxUnoFrameItem* pFrameItem = i_rCreateDocRequest.GetArg(SID_FILLFRAME); + const SfxBoolItem* pHiddenItem = i_rCreateDocRequest.GetArg(SID_HIDDEN); return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, @@ -2792,12 +2792,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 ...) - const SfxUInt16Item* pViewIdItem = rReq.GetArg<SfxUInt16Item>(SID_VIEW_ID); + const SfxUInt16Item* pViewIdItem = rReq.GetArg(SID_VIEW_ID); const SfxInterfaceId nViewId = pViewIdItem ? SfxInterfaceId(pViewIdItem->GetValue()) : GetCurViewId(); Reference < XFrame > xFrame; // the frame (optional arg. TODO: this is currently not supported in the slot definition ...) - const SfxUnoFrameItem* pFrameItem = rReq.GetArg<SfxUnoFrameItem>(SID_FILLFRAME); + const SfxUnoFrameItem* pFrameItem = rReq.GetArg(SID_FILLFRAME); if ( pFrameItem ) xFrame = pFrameItem->GetFrame(); @@ -2809,7 +2809,7 @@ void SfxViewFrame::ExecView_Impl case SID_OBJECT: { - const SfxInt16Item* pItem = rReq.GetArg<SfxInt16Item>(SID_OBJECT); + const SfxInt16Item* pItem = rReq.GetArg(SID_OBJECT); if (pItem) { @@ -3285,7 +3285,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq ) xRecorder = xSupplier->getDispatchRecorder(); bool bIsRecording = xRecorder.is(); - const SfxBoolItem* pItem = rReq.GetArg<SfxBoolItem>(SID_RECORDMACRO); + const SfxBoolItem* pItem = rReq.GetArg(SID_RECORDMACRO); if ( pItem && pItem->GetValue() == bIsRecording ) return; @@ -3535,14 +3535,14 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq ) if (nSID == SID_SIDEBAR_DECK) { - const SfxStringItem* pDeckIdItem = rReq.GetArg<SfxStringItem>(SID_SIDEBAR_DECK); + const SfxStringItem* pDeckIdItem = rReq.GetArg(SID_SIDEBAR_DECK); if (pDeckIdItem) { const OUString aDeckId(pDeckIdItem->GetValue()); // Compatibility with old LOK "toggle always" // TODO: check LOK with tdf#142978 Show a11y sidebar when finding issues on PDF export, hash: 53fc5fa const bool isLOK = comphelper::LibreOfficeKit::isActive(); - const SfxBoolItem* pToggleItem = rReq.GetArg<SfxBoolItem>(SID_SIDEBAR_DECK_TOGGLE); + const SfxBoolItem* pToggleItem = rReq.GetArg(SID_SIDEBAR_DECK_TOGGLE); bool bToggle = isLOK || (pToggleItem && pToggleItem->GetValue()); ::sfx2::sidebar::Sidebar::ShowDeck(aDeckId, this, bToggle); } diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx index 295aa4d38db9..7a3a7c795e55 100644 --- a/sfx2/source/view/viewfrm2.cxx +++ b/sfx2/source/view/viewfrm2.cxx @@ -187,7 +187,7 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq ) case SID_NEWDOCDIRECT : { - const SfxStringItem* pFactoryItem = rReq.GetArg<SfxStringItem>(SID_NEWDOCDIRECT); + const SfxStringItem* pFactoryItem = rReq.GetArg(SID_NEWDOCDIRECT); OUString aFactName; if ( pFactoryItem ) aFactName = pFactoryItem->GetValue(); diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index bc885e5670c7..a49a4d9d90c7 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -661,7 +661,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) // Should it be visible on the user interface, // should it launch popup dialogue ? - const SfxBoolItem* pSilentItem = rReq.GetArg<SfxBoolItem>(SID_SILENT); + const SfxBoolItem* pSilentItem = rReq.GetArg(SID_SILENT); bSilent = pSilentItem && pSilentItem->GetValue(); } @@ -690,7 +690,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) pDoc->QueryHiddenInformation(HiddenWarningFact::WhenPrinting); // should we print only the selection or the whole document - const SfxBoolItem* pSelectItem = rReq.GetArg<SfxBoolItem>(SID_SELECTION); + const SfxBoolItem* pSelectItem = rReq.GetArg(SID_SELECTION); bool bSelection = ( pSelectItem != nullptr && pSelectItem->GetValue() ); // detect non api call from writer ( that adds SID_SELECTION ) and reset bIsAPI if ( pSelectItem && rReq.GetArgs()->Count() == 1 ) @@ -775,7 +775,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) { // get printer and printer settings from the document SfxPrinter* pDocPrinter = GetPrinter(true); - const SfxStringItem* pPrinterItem = rReq.GetArg<SfxStringItem>(SID_PRINTER_NAME); + const SfxStringItem* pPrinterItem = rReq.GetArg(SID_PRINTER_NAME); if (!pPrinterItem) { rReq.Ignore(); @@ -801,7 +801,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) SfxPrinter *pDocPrinter = GetPrinter(true); // look for printer in parameters - const SfxStringItem* pPrinterItem = rReq.GetArg<SfxStringItem>(SID_PRINTER_NAME); + const SfxStringItem* pPrinterItem = rReq.GetArg(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 8b1b86e2ed53..3d106104d9fa 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -2134,7 +2134,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) aRecipient = aRecipient.copy( aMailToStr.getLength() ); aModel.AddToAddress( aRecipient ); } - const SfxStringItem* pMailDocType = rReq.GetArg<SfxStringItem>(SID_TYPE_NAME); + const SfxStringItem* pMailDocType = rReq.GetArg(SID_TYPE_NAME); if ( pMailDocType ) aDocType = pMailDocType->GetValue(); diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index d83899d301e5..57381ce0a8e0 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -444,7 +444,7 @@ void FmFormShell::Execute(SfxRequest &rReq) case SID_FM_SCROLLBAR: case SID_FM_SPINBUTTON: { - const SfxBoolItem* pGrabFocusItem = rReq.GetArg<SfxBoolItem>(SID_FM_TOGGLECONTROLFOCUS); + const SfxBoolItem* pGrabFocusItem = rReq.GetArg(SID_FM_TOGGLECONTROLFOCUS); if ( pGrabFocusItem && pGrabFocusItem->GetValue() ) { // see below SfxViewShell* pShell = GetViewShell(); @@ -556,7 +556,7 @@ void FmFormShell::Execute(SfxRequest &rReq) break; case SID_FM_SHOW_PROPERTY_BROWSER: { - const SfxBoolItem* pShowItem = rReq.GetArg<SfxBoolItem>(SID_FM_SHOW_PROPERTIES); + const SfxBoolItem* pShowItem = rReq.GetArg(SID_FM_SHOW_PROPERTIES); bool bShow = true; if ( pShowItem ) bShow = pShowItem->GetValue(); diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 1788614fa600..6e39738ef04e 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -1542,9 +1542,9 @@ void SvxTableController::changeTableEdge(const SfxRequest& rReq) if (!checkTableObject()) return; - const auto* pType = rReq.GetArg<SfxStringItem>(SID_TABLE_BORDER_TYPE); - const auto* pIndex = rReq.GetArg<SfxUInt16Item>(SID_TABLE_BORDER_INDEX); - const auto* pOffset = rReq.GetArg<SfxInt32Item>(SID_TABLE_BORDER_OFFSET); + const auto* pType = rReq.GetArg(SID_TABLE_BORDER_TYPE); + const auto* pIndex = rReq.GetArg(SID_TABLE_BORDER_INDEX); + const auto* pOffset = rReq.GetArg(SID_TABLE_BORDER_OFFSET); if (!(pType && pIndex && pOffset)) return; diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 6a462c700b19..ebba72f85e51 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -541,11 +541,11 @@ void SwDocShell::Execute(SfxRequest& rReq) if ( pArgs ) { - const SfxStringItem* pTemplateItem = rReq.GetArg<SfxStringItem>(SID_TEMPLATE_NAME); + const SfxStringItem* pTemplateItem = rReq.GetArg(SID_TEMPLATE_NAME); if ( pTemplateItem ) { aFileName = pTemplateItem->GetValue(); - const SfxInt32Item* pFlagsItem = rReq.GetArg<SfxInt32Item>(SID_TEMPLATE_LOAD); + const SfxInt32Item* pFlagsItem = rReq.GetArg(SID_TEMPLATE_LOAD); if ( pFlagsItem ) nFlags = static_cast<SfxTemplateFlags>(o3tl::narrowing<sal_uInt16>(pFlagsItem->GetValue())); } @@ -1287,7 +1287,7 @@ void SwDocShell::Execute(SfxRequest& rReq) break; case SID_NOTEBOOKBAR: { - const SfxStringItem* pFile = rReq.GetArg<SfxStringItem>( SID_NOTEBOOKBAR ); + const SfxStringItem* pFile = rReq.GetArg( SID_NOTEBOOKBAR ); SfxViewShell* pViewShell = GetView()? GetView(): SfxViewShell::Current(); SfxBindings& rBindings( pViewShell->GetViewFrame().GetBindings() ); diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index 24ebdbbd5d03..4678df9fc6b4 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -367,7 +367,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq ) { // convert internal StyleName to DisplayName (slot implementation uses the latter) const SfxStringItem* pNameItem = rReq.GetArg<SfxStringItem>(SID_APPLY_STYLE); - const SfxStringItem* pFamilyItem = rReq.GetArg<SfxStringItem>(SID_STYLE_FAMILYNAME); + const SfxStringItem* pFamilyItem = rReq.GetArg(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 c340e67b71a9..b71aecd2f9e7 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -288,7 +288,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) { if( rReq.GetArgs() ) { - const SvxUnderlineItem* pItem = rReq.GetArg<SvxUnderlineItem>(SID_ATTR_CHAR_UNDERLINE); + const SvxUnderlineItem* pItem = rReq.GetArg(SID_ATTR_CHAR_UNDERLINE); if (pItem) { aNewAttr.Put(*pItem); diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index f7e46db45649..9e6c14be81c3 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -3166,9 +3166,9 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) if( pArgs && pArgs->Count() >= 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 SfxStringItem* pName = _rRequest.GetArg(FN_INSERT_TABLE); + const SfxUInt16Item* pCols = _rRequest.GetArg(SID_ATTR_TABLE_COLUMN); + const SfxUInt16Item* pRows = _rRequest.GetArg(SID_ATTR_TABLE_ROW); const SfxInt32Item* pFlags = _rRequest.GetArg<SfxInt32Item>(FN_PARAM_1); const SfxStringItem* pAuto = _rRequest.GetArg<SfxStringItem>(FN_PARAM_2); diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index a9cde0891496..9bb829d243c4 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -1200,7 +1200,7 @@ void SwTableShell::Execute(SfxRequest &rReq) } case SID_ATTR_TABLE_ROW_HEIGHT: { - const SfxUInt32Item* pItem2 = rReq.GetArg<SfxUInt32Item>(SID_ATTR_TABLE_ROW_HEIGHT); + const SfxUInt32Item* pItem2 = rReq.GetArg(SID_ATTR_TABLE_ROW_HEIGHT); if (pItem2) { tools::Long nNewHeight = pItem2->GetValue(); @@ -1217,7 +1217,7 @@ void SwTableShell::Execute(SfxRequest &rReq) } case SID_ATTR_TABLE_COLUMN_WIDTH: { - const SfxUInt32Item* pItem2 = rReq.GetArg<SfxUInt32Item>(SID_ATTR_TABLE_COLUMN_WIDTH); + const SfxUInt32Item* pItem2 = rReq.GetArg(SID_ATTR_TABLE_COLUMN_WIDTH); if (pItem2) { tools::Long nNewWidth = pItem2->GetValue(); diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index 71c51a7997a7..c23b000837f2 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -444,7 +444,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) break; case FN_DELETE_COMMENT: { - const SvxPostItIdItem* pIdItem = rReq.GetArg<SvxPostItIdItem>(SID_ATTR_POSTIT_ID); + const SvxPostItIdItem* pIdItem = rReq.GetArg(SID_ATTR_POSTIT_ID); if (pIdItem && !pIdItem->GetValue().isEmpty() && GetView().GetPostItMgr()) { sal_uInt32 nPostItId = pIdItem->GetValue().toUInt32(); @@ -463,7 +463,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) } case FN_DELETE_COMMENT_THREAD: { - const SvxPostItIdItem* pIdItem = rReq.GetArg<SvxPostItIdItem>(SID_ATTR_POSTIT_ID); + const SvxPostItIdItem* pIdItem = rReq.GetArg(SID_ATTR_POSTIT_ID); if (pIdItem && !pIdItem->GetValue().isEmpty() && GetView().GetPostItMgr()) { sal_uInt32 nPostItId = pIdItem->GetValue().toUInt32(); @@ -481,7 +481,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) } case FN_RESOLVE_NOTE: { - const SvxPostItIdItem* pIdItem = rReq.GetArg<SvxPostItIdItem>(SID_ATTR_POSTIT_ID); + const SvxPostItIdItem* pIdItem = rReq.GetArg(SID_ATTR_POSTIT_ID); if (pIdItem && !pIdItem->GetValue().isEmpty() && GetView().GetPostItMgr()) { GetView().GetPostItMgr()->ToggleResolved(pIdItem->GetValue().toUInt32()); @@ -490,7 +490,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) } case FN_RESOLVE_NOTE_THREAD: { - const SvxPostItIdItem* pIdItem = rReq.GetArg<SvxPostItIdItem>(SID_ATTR_POSTIT_ID); + const SvxPostItIdItem* pIdItem = rReq.GetArg(SID_ATTR_POSTIT_ID); if (pIdItem && !pIdItem->GetValue().isEmpty() && GetView().GetPostItMgr()) { GetView().GetPostItMgr()->ToggleResolvedForThread(pIdItem->GetValue().toUInt32()); @@ -536,7 +536,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) break; case FN_REPLY: { - const SvxPostItIdItem* pIdItem = rReq.GetArg<SvxPostItIdItem>(SID_ATTR_POSTIT_ID); + const SvxPostItIdItem* pIdItem = rReq.GetArg(SID_ATTR_POSTIT_ID); if (pIdItem && !pIdItem->GetValue().isEmpty()) { SwFieldType* pType = rSh.GetDoc()->getIDocumentFieldsAccess().GetFieldType(SwFieldIds::Postit, OUString(), false); @@ -546,7 +546,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) auto pWin = pMgr->GetAnnotationWin(pIdItem->GetValue().toUInt32()); if(pWin) { - if (const SvxPostItTextItem* pHtmlItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_HTML)) + if (const SvxPostItTextItem* pHtmlItem = rReq.GetArg(SID_ATTR_POSTIT_HTML)) { SwDocShell* pDocSh = GetView().GetDocShell(); Outliner aOutliner(&pDocSh->GetPool(), OutlinerMode::TextObject); @@ -556,7 +556,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) } OUString sText; - if(const auto pTextItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_TEXT)) + if(const auto pTextItem = rReq.GetArg(SID_ATTR_POSTIT_TEXT)) sText = pTextItem->GetValue(); pMgr->RegisterAnswerText(sText); pWin->ExecuteCommand(nSlot); @@ -572,17 +572,17 @@ void SwTextShell::ExecField(SfxRequest &rReq) break; case SID_EDIT_POSTIT: { - const SvxPostItIdItem* pIdItem = rReq.GetArg<SvxPostItIdItem>(SID_ATTR_POSTIT_ID); + const SvxPostItIdItem* pIdItem = rReq.GetArg(SID_ATTR_POSTIT_ID); if (pIdItem && !pIdItem->GetValue().isEmpty()) { sw::annotation::SwAnnotationWin* pAnnotationWin = GetView().GetPostItMgr()->GetAnnotationWin(pIdItem->GetValue().toUInt32()); if (pAnnotationWin && lcl_canUserModifyAnnotation(GetView(), pAnnotationWin)) { - if (const SvxPostItTextItem* pHtmlItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_HTML)) + if (const SvxPostItTextItem* pHtmlItem = rReq.GetArg(SID_ATTR_POSTIT_HTML)) pAnnotationWin->UpdateHTML(pHtmlItem->GetValue()); else { - const SvxPostItTextItem* pTextItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_TEXT); + const SvxPostItTextItem* pTextItem = rReq.GetArg(SID_ATTR_POSTIT_TEXT); OUString sText; if (pTextItem) sText = pTextItem->GetValue(); @@ -597,7 +597,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) break; case FN_PROMOTE_COMMENT: { - const SvxPostItIdItem* pIdItem = rReq.GetArg<SvxPostItIdItem>(SID_ATTR_POSTIT_ID); + const SvxPostItIdItem* pIdItem = rReq.GetArg(SID_ATTR_POSTIT_ID); if (pIdItem && !pIdItem->GetValue().isEmpty() && GetView().GetPostItMgr()) { GetView().GetPostItMgr()->PromoteToRoot(pIdItem->GetValue().toUInt32()); @@ -621,7 +621,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) } OUString sCommentText; - const SfxStringItem* pTextItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_TEXT); + const SfxStringItem* pTextItem = rReq.GetArg(SID_ATTR_POSTIT_TEXT); if (pTextItem) sCommentText = pTextItem->GetValue(); diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index 802a9f96d9af..32946033210e 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -292,7 +292,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) case SID_INSERT_OBJECT: { - const SfxGlobalNameItem* pNameItem = rReq.GetArg<SfxGlobalNameItem>(SID_INSERT_OBJECT); + const SfxGlobalNameItem* pNameItem = rReq.GetArg(SID_INSERT_OBJECT); SvGlobalName *pName = nullptr; SvGlobalName aName; if ( pNameItem ) diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index a1abdb77bd8d..9b62077d6f02 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -395,7 +395,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) UIName sGraphicFormat( SwResId(STR_POOLFRM_GRAPHIC) ); - const SfxStringItem* pName = rReq.GetArg<SfxStringItem>(SID_INSERT_GRAPHIC); + const SfxStringItem* pName = rReq.GetArg(SID_INSERT_GRAPHIC); bool bShowError = !pName; // No file pickers in a non-desktop (mobile app) build. @@ -480,7 +480,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) { rReq.AppendItem(SfxStringItem(SID_INSERT_GRAPHIC, pFileDlg->GetPath())); rReq.AppendItem(SfxStringItem(FN_PARAM_FILTER, pFileDlg->GetCurrentFilter())); - pName = rReq.GetArg<SfxStringItem>(SID_INSERT_GRAPHIC); + pName = rReq.GetArg(SID_INSERT_GRAPHIC); bool bAsLink = false; if(nHtmlMode & HTMLMODE_ON) @@ -512,7 +512,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) { OUString aFileName = pName->GetValue(); OUString aFilterName; - if (const SfxStringItem* pFilter = rReq.GetArg<SfxStringItem>(FN_PARAM_FILTER)) + if (const SfxStringItem* pFilter = rReq.GetArg(FN_PARAM_FILTER)) aFilterName = pFilter->GetValue(); bool bAsLink = false; if (const SfxBoolItem* pAsLink = rReq.GetArg<SfxBoolItem>(FN_PARAM_1)) diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx index a697875e0a61..83f4c799ff61 100644 --- a/sw/source/uibase/uiview/viewdraw.cxx +++ b/sw/source/uibase/uiview/viewdraw.cxx @@ -85,7 +85,7 @@ void SwView::ExecDraw(const SfxRequest& rReq) SdrObjKind eNewFormObjKind = SdrObjKind::NONE; if (nSlotId == SID_FM_CREATE_CONTROL) { - const SfxUInt16Item* pIdentifierItem = rReq.GetArg<SfxUInt16Item>(SID_FM_CONTROL_IDENTIFIER); + const SfxUInt16Item* pIdentifierItem = rReq.GetArg(SID_FM_CONTROL_IDENTIFIER); if (pIdentifierItem) eNewFormObjKind = static_cast<SdrObjKind>(pIdentifierItem->GetValue()); } diff --git a/sw/source/uibase/uiview/viewprt.cxx b/sw/source/uibase/uiview/viewprt.cxx index d6a2f579fc89..2389f80b6f2a 100644 --- a/sw/source/uibase/uiview/viewprt.cxx +++ b/sw/source/uibase/uiview/viewprt.cxx @@ -206,7 +206,7 @@ void SwView::ExecutePrint(SfxRequest& rReq) case SID_PRINTDOCDIRECT: { SwWrtShell* pSh = &GetWrtShell(); - const SfxBoolItem* pSilentItem = rReq.GetArg<SfxBoolItem>(SID_SILENT); + const SfxBoolItem* pSilentItem = rReq.GetArg(SID_SILENT); bool bSilent = pSilentItem && pSilentItem->GetValue(); const SfxBoolItem* pPrintFromMergeItem = rReq.GetArg<SfxBoolItem>(FN_QRY_MERGE); if(pPrintFromMergeItem) diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index be8b623e99ad..aa006d5605e3 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -2345,7 +2345,7 @@ void SwWrtShell::InsertPostIt(SwFieldMgr& rFieldMgr, const SfxRequest& rReq) bool bNew = !(pPostIt && pPostIt->GetTyp()->Which() == SwFieldIds::Postit); if (bNew || GetView().GetPostItMgr()->IsAnswer() || comphelper::LibreOfficeKit::isActive()) { - const SvxPostItAuthorItem* pAuthorItem = rReq.GetArg<SvxPostItAuthorItem>(SID_ATTR_POSTIT_AUTHOR); + const SvxPostItAuthorItem* pAuthorItem = rReq.GetArg(SID_ATTR_POSTIT_AUTHOR); OUString sAuthor; if ( pAuthorItem ) sAuthor = pAuthorItem->GetValue(); @@ -2356,13 +2356,13 @@ void SwWrtShell::InsertPostIt(SwFieldMgr& rFieldMgr, const SfxRequest& rReq) sAuthor = mod->GetRedlineAuthor(nAuthor); } - const SvxPostItTextItem* pTextItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_TEXT); + const SvxPostItTextItem* pTextItem = rReq.GetArg(SID_ATTR_POSTIT_TEXT); OUString sText; if ( pTextItem ) sText = pTextItem->GetValue(); std::optional<OutlinerParaObject> oTextPara; - if (const SvxPostItTextItem* pHtmlItem = rReq.GetArg<SvxPostItTextItem>(SID_ATTR_POSTIT_HTML)) + if (const SvxPostItTextItem* pHtmlItem = rReq.GetArg(SID_ATTR_POSTIT_HTML)) { SwDocShell* pDocSh = GetView().GetDocShell(); Outliner aOutliner(&pDocSh->GetPool(), OutlinerMode::TextObject); @@ -2400,9 +2400,9 @@ void SwWrtShell::InsertPostIt(SwFieldMgr& rFieldMgr, const SfxRequest& rReq) SwInsertField_Data aData(SwFieldTypesEnum::Postit, 0, sAuthor, sText, 0); { - SvxPostItIdItem const*const pParentParaIdItem{rReq.GetArg<SvxPostItIdItem>(SID_ATTR_POSTIT_PARENTPARAID)}; - SvxPostItIdItem const*const pParentPostItIdItem{rReq.GetArg<SvxPostItIdItem>(SID_ATTR_POSTIT_PARENTPOSTITID)}; - SfxStringItem const*const pParentNameItem{rReq.GetArg<SfxStringItem>(SID_ATTR_POSTIT_PARENTNAME)}; + SvxPostItIdItem const*const pParentParaIdItem{rReq.GetArg(SID_ATTR_POSTIT_PARENTPARAID)}; + SvxPostItIdItem const*const pParentPostItIdItem{rReq.GetArg(SID_ATTR_POSTIT_PARENTPOSTITID)}; + SfxStringItem const*const pParentNameItem{rReq.GetArg(SID_ATTR_POSTIT_PARENTNAME)}; if (pParentParaIdItem && pParentPostItIdItem && pParentNameItem) { aData.m_oParentId.emplace(pParentParaIdItem->GetValue().toUInt32(),
