diff options
author | Mathias Bauer <mba@openoffice.org> | 2001-08-27 15:13:35 +0000 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2001-08-27 15:13:35 +0000 |
commit | e14356babbe7503340ff9d3ba8560d9def7532fb (patch) | |
tree | ba090ac5fd2fde86d928cb778a9dfcb56acc65cd /sfx2 | |
parent | 25c8751e5bb0931aab39f6fb70d52978bfecc538 (diff) |
#88229#: transfer open arguments to model for new created documents
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appopen.cxx | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index b5a83083db21..518b17f5b57a 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -2,9 +2,9 @@ * * $RCSfile: appopen.cxx,v $ * - * $Revision: 1.31 $ + * $Revision: 1.32 $ * - * last change: $Author: pb $ $Date: 2001-08-23 10:50:29 $ + * last change: $Author: mba $ $Date: 2001-08-27 16:13:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -684,7 +684,10 @@ SfxObjectShellLock SfxApplication::NewDoc_Impl( const String& rFact, const SfxIt pFrmItem = (const SfxFrameItem*) SfxRequest::GetItem( pSet, SID_DOCFRAME, FALSE, TYPE(SfxFrameItem) ); SfxBoolItem aItem( SID_NEWDOCDIRECT, TRUE ); if ( pFrmItem && pFrmItem->GetFrame() && !pFrmItem->GetFrame()->GetCurrentDocument() ) + { GetDispatcher_Impl()->Execute( nSlotId, SFX_CALLMODE_SYNCHRON, &aItem, pFrmItem, 0L ); + xDoc = pFrmItem->GetFrame()->GetCurrentDocument(); + } else GetDispatcher_Impl()->Execute( nSlotId, SFX_CALLMODE_ASYNCHRON, &aItem, pFrmItem, 0L ); } @@ -696,6 +699,20 @@ SfxObjectShellLock SfxApplication::NewDoc_Impl( const String& rFact, const SfxIt xDoc->DoInitNew_Impl( aParam ); } + if ( xDoc.Is() ) + { + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel ( xDoc->GetModel(), ::com::sun::star::uno::UNO_QUERY ); + if ( xModel.is() ) + { + SfxItemSet* pNew = pSet->Clone(); + pNew->ClearItem( SID_PROGRESS_STATUSBAR_CONTROL ); + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs; + TransformItems( SID_OPENDOC, *pNew, aArgs ); + xModel->attachResource( ::rtl::OUString(), aArgs ); + delete pNew; + } + } + return xDoc; } |