diff options
author | Henning Brinkmann <hbrinkm@openoffice.org> | 2010-07-28 14:17:26 +0200 |
---|---|---|
committer | Henning Brinkmann <hbrinkm@openoffice.org> | 2010-07-28 14:17:26 +0200 |
commit | a8f1ad65612c0e54969cabc541b183062ae3d905 (patch) | |
tree | ee5e7bfb18762a21ca1783e474ee45cda8775e36 /sfx2 | |
parent | 49b06312d167ec3c210062ef704f8403abadf058 (diff) |
writerfilter08ooo330: applied patch for writerfilter08
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/view/frame2.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index b5a9536b12c5..7ef9fe0d2f19 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -977,6 +977,8 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString& aArgs.remove( "BreakMacroSignature" ); aArgs.remove( "Stream" ); aArgs.remove( "InputStream" ); + aArgs.remove( "URL" ); + aArgs.remove( "Frame" ); // TODO/LATER: all the parameters that are accepted by ItemSet of the DocShell must be removed here @@ -988,6 +990,10 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString& SfxAllItemSet aSet( pObjectShell->GetPool() ); TransformParameters( SID_OPENDOC, rArgs, aSet ); + // the arguments are not allowed to reach the medium + aSet.ClearItem( SID_FILE_NAME ); + aSet.ClearItem( SID_FILLFRAME ); + pMedium->GetItemSet()->Put( aSet ); SFX_ITEMSET_ARG( &aSet, pItem, SfxStringItem, SID_FILTER_NAME, sal_False ); if ( pItem ) diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index d99ad8733e03..d43512ac791d 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -280,10 +280,7 @@ SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, Window& rWindow, USHORT nViewI aLoadArgs = aArgs.getPropertyValues(); // load the doc into that frame - ::rtl::OUString sLoaderURL( rDoc.GetModel()->getURL() ); - if ( sLoaderURL.getLength() == 0 ) - sLoaderURL = rDoc.GetFactory().GetFactoryURL(); - + ::rtl::OUString sLoaderURL( RTL_CONSTASCII_USTRINGPARAM( "private:object" ) ); Reference< XComponentLoader > xLoader( xFrame, UNO_QUERY_THROW ); xLoader->loadComponentFromURL( sLoaderURL, diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 035fd3f794de..feced28efb11 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -2144,6 +2144,8 @@ SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc aTransformLoadArgs.remove( "Hidden" ); ::rtl::OUString sURL( RTL_CONSTASCII_USTRINGPARAM( "private:object" ) ); + if ( !sURL.getLength() ) + sURL = i_rDoc.GetFactory().GetFactoryURL(); Reference< XComponentLoader > xLoader( i_rFrame, UNO_QUERY_THROW ); xLoader->loadComponentFromURL( sURL, ::rtl::OUString::createFromAscii( "_self" ), 0, |