diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-11-18 12:20:46 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-11-18 12:20:46 +0100 |
commit | 7dca2226394b8e07fe915e811bc02315580dd5b9 (patch) | |
tree | c416633980c70ff01a37185e9887bb896ff86880 /sfx2/source | |
parent | fd08abb5941f6815f8a49ae50e7fc93d93609543 (diff) |
Set Referer for auto-reload
Change-Id: Ie6b664bcd2021820a5baf158582fce7a07c112af
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/doc/objmisc.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 590f53c145a8..8751f42fe57a 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 38393501adc8..1fa99c46c2f6 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() ) ); |