diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-01-31 23:19:54 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-01-31 23:47:37 +0100 |
commit | 0799130b0ba954715d00feb93cef83dd48e29889 (patch) | |
tree | e154a693675f824ae6d532b7ea1c70f39823ffd6 /sfx2 | |
parent | f6f5bde055f299e18a369714469dd39d6917e09d (diff) |
fdo#59022: revert "SfxMedium::GetOutputStream(): re-use existing XStream"
Revert commit 0c2206081de38a41597aadfb2255540d6308be63, since this
apparently causes failure to open ODF files via SMB on Linux.
Instead of changing SfxMedium, adjust the ScExportTest: when saving
XLSX files interactively, the SfxFilter::lFormat is always 0, which
causes SfxObjectShell::SaveTo_Impl not to call
SfxMedium::GetOutputStorage() at all, working around the locking issue
on WNT.
Change-Id: I0ab8b4262475e4c8425eebb1413997457e5e9417
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 85b7981b1e43..3ce8ab77b360 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -636,20 +636,13 @@ SvStream* SfxMedium::GetOutStream() if ( pImp->pTempFile ) { - // try to re-use XOutStream from xStream if that exists; - // opening new SvFileStream in this situation may fail on - // Windows with ERROR_SHARING_VIOLATION - if (pImp->xStream.is()) - { - assert(pImp->xStream->getOutputStream().is()); // need that... - pImp->m_pOutStream = utl::UcbStreamHelper::CreateStream( - pImp->xStream, false); - } - else - { - pImp->m_pOutStream = new SvFileStream( + // don't try to re-use XOutStream from xStream if that exists; + // it causes fdo#59022 (fails opening files via SMB on Linux) + // OTOH opening new SvFileStream in this situation may fail on + // Windows with ERROR_SHARING_VIOLATION... but that is apparently + // not a problem in practice currently + pImp->m_pOutStream = new SvFileStream( pImp->m_aName, STREAM_STD_READWRITE); - } CloseStorage(); } } |