sfx2/source/doc/docfile.cxx | 3 +++ sfx2/source/doc/objmisc.cxx | 4 ++++ sfx2/source/view/viewfrm.cxx | 8 +++++++- 3 files changed, 14 insertions(+), 1 deletion(-)
New commits: commit 7dca2226394b8e07fe915e811bc02315580dd5b9 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Nov 18 12:20:46 2013 +0100 Set Referer for auto-reload Change-Id: Ie6b664bcd2021820a5baf158582fce7a07c112af diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 590f53c..8751f42 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1445,6 +1445,10 @@ void AutoReloadTimer_Impl::Timeout() aSet.Put( SfxBoolItem( SID_AUTOLOAD, sal_True ) ); if ( !aUrl.isEmpty() ) aSet.Put( SfxStringItem( SID_FILE_NAME, aUrl ) ); + if (pObjSh->HasName()) { + aSet.Put( + SfxStringItem(SID_REFERER, pObjSh->GetMedium()->GetName())); + } SfxRequest aReq( SID_RELOAD, 0, aSet ); pObjSh->Get_Impl()->pReloadTimer = 0; delete this; diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 3839350..1fa99c4 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -639,7 +639,13 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) pNewSet->Put( *pURLItem ); // Filter Detection - SfxMedium aMedium( pURLItem->GetValue(), SFX_STREAM_READWRITE ); + OUString referer; + SFX_REQUEST_ARG( + rReq, refererItem, SfxStringItem, SID_REFERER, false); + if (refererItem != 0) { + referer = refererItem->GetValue(); + } + SfxMedium aMedium( pURLItem->GetValue(), referer, SFX_STREAM_READWRITE ); SfxFilterMatcher().GuessFilter( aMedium, &pFilter ); if ( pFilter ) pNewSet->Put( SfxStringItem( SID_FILTER_NAME, pFilter->GetName() ) ); commit fd08abb5941f6815f8a49ae50e7fc93d93609543 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Nov 18 12:19:18 2013 +0100 Don't try lockfile creation when getting medium already failed Change-Id: Idbca79b5224358eaaef040365b2b385f2e2af9dd diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 1b808ed..3d23f50 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -1063,6 +1063,9 @@ void SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI ) { // let the stream be opened to check the system file locking GetMedium_Impl(); + if (GetError() != ERRCODE_NONE) { + return; + } } sal_Int8 bUIStatus = LOCK_UI_NOLOCK; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits