summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/xmlwrap.cxx
diff options
context:
space:
mode:
authorNiklas Nebel <nn@openoffice.org>2010-04-09 14:48:00 +0200
committerNiklas Nebel <nn@openoffice.org>2010-04-09 14:48:00 +0200
commite41b8df9409edc8aaf93ccdac4050e6ea90ebd99 (patch)
tree57b7ad2ee02c3ccd7f59a3f26a866083a5f7630e /sc/source/filter/xml/xmlwrap.cxx
parent2975955db0512b8ba6ac4a543cedcf8e2fe1879c (diff)
calc321stopper2: #i110692# ExportToComponent: reset stream flags if source stream not available
Diffstat (limited to 'sc/source/filter/xml/xmlwrap.cxx')
-rw-r--r--sc/source/filter/xml/xmlwrap.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index a8176cc7d955..f21ed7d55ac2 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -764,7 +764,10 @@ sal_Bool ScXMLImportWrapper::ExportToComponent(uno::Reference<lang::XMultiServic
pExport->SetSourceStream( uno::Reference<io::XInputStream>() );
// If there was an error, reset all stream flags, so the next save attempt will use normal saving.
- if (!bRet)
+ // #i110692# For embedded objects, the stream may be unavailable for one save operation (m_pAntiImpl)
+ // and become available again later. But after saving normally once, the stream positions aren't
+ // valid anymore, so the flags also have to be reset if the stream wasn't available.
+ if ( !bRet || !xSrcInput.is() )
{
SCTAB nTabCount = rDoc.GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)