summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/appopen.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/appl/appopen.cxx')
-rw-r--r--sfx2/source/appl/appopen.cxx58
1 files changed, 29 insertions, 29 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index ae314e1deefe..79f733719b38 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -413,7 +413,7 @@ sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUStri
void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
{
- SFX_REQUEST_ARG(rReq, pFactoryItem, SfxStringItem, SID_NEWDOCDIRECT);
+ const SfxStringItem* pFactoryItem = rReq.GetArg<SfxStringItem>(SID_NEWDOCDIRECT);
OUString aFactName;
if ( pFactoryItem )
aFactName = pFactoryItem->GetValue();
@@ -429,10 +429,10 @@ void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
aReq.AppendItem( SfxStringItem( SID_TARGETNAME, OUString( "_default" ) ) );
// TODO/LATER: Should the other arguments be transferred as well?
- SFX_REQUEST_ARG(rReq, pDefaultPathItem, SfxStringItem, SID_DEFAULTFILEPATH);
+ const SfxStringItem* pDefaultPathItem = rReq.GetArg<SfxStringItem>(SID_DEFAULTFILEPATH);
if ( pDefaultPathItem )
aReq.AppendItem( *pDefaultPathItem );
- SFX_REQUEST_ARG(rReq, pDefaultNameItem, SfxStringItem, SID_DEFAULTFILENAME);
+ const SfxStringItem* pDefaultNameItem = rReq.GetArg<SfxStringItem>(SID_DEFAULTFILENAME);
if ( pDefaultNameItem )
aReq.AppendItem( *pDefaultNameItem );
@@ -447,9 +447,9 @@ void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq )
void SfxApplication::NewDocExec_Impl( SfxRequest& rReq )
{
// No Parameter from BASIC only Factory given?
- SFX_REQUEST_ARG(rReq, pTemplNameItem, SfxStringItem, SID_TEMPLATE_NAME);
- SFX_REQUEST_ARG(rReq, pTemplFileNameItem, SfxStringItem, SID_FILE_NAME);
- SFX_REQUEST_ARG(rReq, pTemplRegionNameItem, SfxStringItem, SID_TEMPLATE_REGIONNAME);
+ const SfxStringItem* pTemplNameItem = rReq.GetArg<SfxStringItem>(SID_TEMPLATE_NAME);
+ const SfxStringItem* pTemplFileNameItem = rReq.GetArg<SfxStringItem>(SID_FILE_NAME);
+ const SfxStringItem* pTemplRegionNameItem = rReq.GetArg<SfxStringItem>(SID_TEMPLATE_REGIONNAME);
SfxObjectShellLock xDoc;
@@ -576,12 +576,12 @@ bool lcl_isFilterNativelySupported(const SfxFilter& rFilter)
void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
{
OUString aDocService;
- SFX_REQUEST_ARG(rReq, pDocSrvItem, SfxStringItem, SID_DOC_SERVICE);
+ const SfxStringItem* pDocSrvItem = rReq.GetArg<SfxStringItem>(SID_DOC_SERVICE);
if (pDocSrvItem)
aDocService = pDocSrvItem->GetValue();
sal_uInt16 nSID = rReq.GetSlot();
- SFX_REQUEST_ARG(rReq, pFileNameItem, SfxStringItem, SID_FILE_NAME);
+ const SfxStringItem* pFileNameItem = rReq.GetArg<SfxStringItem>(SID_FILE_NAME);
if ( pFileNameItem )
{
OUString aCommand( pFileNameItem->GetValue() );
@@ -608,7 +608,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
OUString aFilter;
SfxItemSet* pSet = NULL;
OUString aPath;
- SFX_REQUEST_ARG(rReq, pFolderNameItem, SfxStringItem, SID_PATH);
+ const SfxStringItem* pFolderNameItem = rReq.GetArg<SfxStringItem>(SID_PATH);
if ( pFolderNameItem )
aPath = pFolderNameItem->GetValue();
else if ( nSID == SID_OPENTEMPLATE )
@@ -619,23 +619,23 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
}
sal_Int16 nDialog = SFX2_IMPL_DIALOG_CONFIG;
- SFX_REQUEST_ARG(rReq, pSystemDialogItem, SfxBoolItem, SID_FILE_DIALOG);
+ const SfxBoolItem* pSystemDialogItem = rReq.GetArg<SfxBoolItem>(SID_FILE_DIALOG);
if ( pSystemDialogItem )
nDialog = pSystemDialogItem->GetValue() ? SFX2_IMPL_DIALOG_SYSTEM : SFX2_IMPL_DIALOG_OOO;
- SFX_REQUEST_ARG(rReq, pRemoteDialogItem, SfxBoolItem, SID_REMOTE_DIALOG);
+ const SfxBoolItem* pRemoteDialogItem = rReq.GetArg<SfxBoolItem>(SID_REMOTE_DIALOG);
if ( pRemoteDialogItem && pRemoteDialogItem->GetValue())
nDialog = SFX2_IMPL_DIALOG_REMOTE;
OUString sStandardDir;
- SFX_REQUEST_ARG(rReq, pStandardDirItem, SfxStringItem, SID_STANDARD_DIR);
+ const SfxStringItem* pStandardDirItem = rReq.GetArg<SfxStringItem>(SID_STANDARD_DIR);
if ( pStandardDirItem )
sStandardDir = pStandardDirItem->GetValue();
::com::sun::star::uno::Sequence< OUString > aBlackList;
- SFX_REQUEST_ARG(rReq, pBlackListItem, SfxStringListItem, SID_BLACK_LIST);
+ const SfxStringListItem* pBlackListItem = rReq.GetArg<SfxStringListItem>(SID_BLACK_LIST);
if ( pBlackListItem )
pBlackListItem->GetStringList( aBlackList );
@@ -672,7 +672,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
css::uno::Reference< css::task::XInteractionHandler > xWrappedHandler;
// wrap existing handler or create new UUI handler
- SFX_REQUEST_ARG(rReq, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER);
+ const SfxUnoAnyItem* pInteractionItem = rReq.GetArg<SfxUnoAnyItem>(SID_INTERACTIONHANDLER);
if (pInteractionItem)
{
pInteractionItem->GetValue() >>= xWrappedHandler;
@@ -760,22 +760,22 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
// no else here! It's optional ...
if (!bHyperlinkUsed)
{
- SFX_REQUEST_ARG(rReq, pHyperLinkUsedItem, SfxBoolItem, SID_BROWSE);
+ const SfxBoolItem* pHyperLinkUsedItem = rReq.GetArg<SfxBoolItem>(SID_BROWSE);
if ( pHyperLinkUsedItem )
bHyperlinkUsed = pHyperLinkUsedItem->GetValue();
// no "official" item, so remove it from ItemSet before using UNO-API
rReq.RemoveItem( SID_BROWSE );
}
- SFX_REQUEST_ARG(rReq, pFileName, SfxStringItem, SID_FILE_NAME);
+ const SfxStringItem* pFileName = rReq.GetArg<SfxStringItem>(SID_FILE_NAME);
OUString aFileName = pFileName->GetValue();
OUString aReferer;
- SFX_REQUEST_ARG(rReq, pRefererItem, SfxStringItem, SID_REFERER);
+ const SfxStringItem* pRefererItem = rReq.GetArg<SfxStringItem>(SID_REFERER);
if ( pRefererItem )
aReferer = pRefererItem->GetValue();
- SFX_REQUEST_ARG(rReq, pFileFlagsItem, SfxStringItem, SID_OPTIONS);
+ const SfxStringItem* pFileFlagsItem = rReq.GetArg<SfxStringItem>(SID_OPTIONS);
if ( pFileFlagsItem )
{
OUString aFileFlags = pFileFlagsItem->GetValue();
@@ -936,13 +936,13 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
SfxFrame* pTargetFrame = NULL;
Reference< XFrame > xTargetFrame;
- SFX_REQUEST_ARG(rReq, pFrameItem, SfxFrameItem, SID_DOCFRAME);
+ const SfxFrameItem* pFrameItem = rReq.GetArg<SfxFrameItem>(SID_DOCFRAME);
if ( pFrameItem )
pTargetFrame = pFrameItem->GetFrame();
if ( !pTargetFrame )
{
- SFX_REQUEST_ARG(rReq, pUnoFrameItem, SfxUnoFrameItem, SID_FILLFRAME);
+ const SfxUnoFrameItem* pUnoFrameItem = rReq.GetArg<SfxUnoFrameItem>(SID_FILLFRAME);
if ( pUnoFrameItem )
xTargetFrame = pUnoFrameItem->GetFrame();
}
@@ -951,7 +951,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
pTargetFrame = &SfxViewFrame::Current()->GetFrame();
// check if caller has set a callback
- SFX_REQUEST_ARG(rReq, pLinkItem, SfxLinkItem, SID_DONELINK);
+ const SfxLinkItem* pLinkItem = rReq.GetArg<SfxLinkItem>(SID_DONELINK);
// remove from Itemset, because it confuses the parameter transformation
if ( pLinkItem )
@@ -961,19 +961,19 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
// check if the view must be hidden
bool bHidden = false;
- SFX_REQUEST_ARG(rReq, pHidItem, SfxBoolItem, SID_HIDDEN);
+ const SfxBoolItem* pHidItem = rReq.GetArg<SfxBoolItem>(SID_HIDDEN);
if ( pHidItem )
bHidden = pHidItem->GetValue();
// This request is a UI call. We have to set the right values inside the MediaDescriptor
// for: InteractionHandler, StatusIndicator, MacroExecutionMode and DocTemplate.
// But we have to look for already existing values or for real hidden requests.
- SFX_REQUEST_ARG(rReq, pPreviewItem, SfxBoolItem, SID_PREVIEW);
+ const SfxBoolItem* pPreviewItem = rReq.GetArg<SfxBoolItem>(SID_PREVIEW);
if (!bHidden && ( !pPreviewItem || !pPreviewItem->GetValue() ) )
{
- SFX_REQUEST_ARG(rReq, pInteractionItem, SfxUnoAnyItem, SID_INTERACTIONHANDLER);
- SFX_REQUEST_ARG(rReq, pMacroExecItem , SfxUInt16Item, SID_MACROEXECMODE);
- SFX_REQUEST_ARG(rReq, pDocTemplateItem, SfxUInt16Item, SID_UPDATEDOCMODE);
+ const SfxUnoAnyItem* pInteractionItem = rReq.GetArg<SfxUnoAnyItem>(SID_INTERACTIONHANDLER);
+ const SfxUInt16Item* pMacroExecItem = rReq.GetArg<SfxUInt16Item>(SID_MACROEXECMODE);
+ const SfxUInt16Item* pDocTemplateItem = rReq.GetArg<SfxUInt16Item>(SID_UPDATEDOCMODE);
if (!pInteractionItem)
{
@@ -988,12 +988,12 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
// extract target name
OUString aTarget;
- SFX_REQUEST_ARG(rReq, pTargetItem, SfxStringItem, SID_TARGETNAME);
+ const SfxStringItem* pTargetItem = rReq.GetArg<SfxStringItem>(SID_TARGETNAME);
if ( pTargetItem )
aTarget = pTargetItem->GetValue();
else
{
- SFX_REQUEST_ARG(rReq, pNewViewItem, SfxBoolItem, SID_OPEN_NEW_VIEW);
+ const SfxBoolItem* pNewViewItem = rReq.GetArg<SfxBoolItem>(SID_OPEN_NEW_VIEW);
if ( pNewViewItem && pNewViewItem->GetValue() )
aTarget = "_blank" ;
}
@@ -1020,7 +1020,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
}
// make URL ready
- SFX_REQUEST_ARG(rReq, pURLItem, SfxStringItem, SID_FILE_NAME);
+ const SfxStringItem* pURLItem = rReq.GetArg<SfxStringItem>(SID_FILE_NAME);
aFileName = pURLItem->GetValue();
if( aFileName.startsWith("#") ) // Mark without URL
{