diff options
author | Kurt Zenker <kz@openoffice.org> | 2004-06-10 12:27:38 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2004-06-10 12:27:38 +0000 |
commit | f5455b1ae5433715c4a5ad97946ef1ebd6c0ca0f (patch) | |
tree | 01b519b929bb3a6a788314cbd98a2305a02f4543 /sfx2 | |
parent | 8f2efd4c27e9d79ced423471cfad2aa01e44d1de (diff) |
INTEGRATION: CWS fwk02ea (1.78.26); FILE MERGED
2004/05/17 10:16:07 as 1.78.26.1: #i24366# implement new version of NewDocDirectExec_Impl but but provide copy of old version for FrameLoader!
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appopen.cxx | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 96c749d83d0d..d8cd92a7379b 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -2,9 +2,9 @@ * * $RCSfile: appopen.cxx,v $ * - * $Revision: 1.79 $ + * $Revision: 1.80 $ * - * last change: $Author: hr $ $Date: 2004-05-10 12:59:41 $ + * last change: $Author: kz $ $Date: 2004-06-10 13:27:38 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -766,6 +766,29 @@ void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq ) { DBG_MEMTEST(); + SFX_REQUEST_ARG( rReq, pFactoryItem, SfxStringItem, SID_NEWDOCDIRECT, FALSE); + String aFactName; + if ( pFactoryItem ) + aFactName = pFactoryItem->GetValue(); + else + aFactName = SvtModuleOptions().GetDefaultModuleName(); + + SfxRequest aReq( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, GetPool() ); + String aFact = String::CreateFromAscii("private:factory/"); + aFact += aFactName; + aReq.AppendItem( SfxStringItem( SID_FILE_NAME, aFact ) ); + aReq.AppendItem( SfxFrameItem( SID_DOCFRAME, GetFrame() ) ); + aReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii( "_default" ) ) ); + SFX_APP()->ExecuteSlot( aReq ); + const SfxViewFrameItem* pItem = PTR_CAST( SfxViewFrameItem, aReq.GetReturnValue() ); + if ( pItem ) + rReq.SetReturnValue( SfxFrameItem( 0, pItem->GetFrame() ) ); +} + +const SfxPoolItem* SfxApplication::NewDocDirectExec_ImplOld( SfxRequest& rReq ) +{ + DBG_MEMTEST(); + SFX_REQUEST_ARG(rReq, pHidden, SfxBoolItem, SID_HIDDEN, FALSE); //(mba)/task /* @@ -880,6 +903,8 @@ void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq ) rReq.SetReturnValue( SfxFrameItem( 0, pFrame ) ); } + return rReq.GetReturnValue(); + //(mba)/task /* if ( !pHidden || !pHidden->GetValue() ) |