summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel/xestream.cxx
diff options
context:
space:
mode:
authorKatarina Machalkova <kmachalkova@suse.cz>2010-10-13 17:58:15 +0200
committerKatarina Machalkova <kmachalkova@suse.cz>2010-10-13 19:51:45 +0200
commitab08a3cc4dd0900abd06e6e1de1b90dabdbfe9f9 (patch)
tree873750b4d0064d8729a3999205e34452b8f86653 /sc/source/filter/excel/xestream.cxx
parent6fd98badf201390e06559127017d66e649eb52fa (diff)
Merged xlsx-shared-xlsx-export-no-more-svstream-sotstorage.diff from ooo-build
Diffstat (limited to 'sc/source/filter/excel/xestream.cxx')
-rw-r--r--sc/source/filter/excel/xestream.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index 855c7d971d42..35976d7a0fdd 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -1096,9 +1096,10 @@ bool XclExpXmlStream::exportDocument() throw()
{
ScDocShell* pShell = getDocShell();
ScDocument* pDoc = pShell->GetDocument();
- SfxMedium* pMedium = pShell->GetMedium();
- SvStream* pMediumStream = pMedium->GetOutStream();
- SotStorageRef rStorage = new SotStorage( pMediumStream, false );
+ // NOTE: Don't use SotStorage or SvStream any more, and never call
+ // SfxMedium::GetOutStream() anywhere in the xlsx export filter code!
+ // Instead, write via XOutputStream instance.
+ SotStorageRef rStorage = static_cast<SotStorage*>(NULL);
XclExpRootData aData( EXC_BIFF8, *pShell->GetMedium (), rStorage, *pDoc, RTL_TEXTENCODING_DONTKNOW );
aData.meOutput = EXC_OUTPUT_XML_2007;
@@ -1107,7 +1108,7 @@ bool XclExpXmlStream::exportDocument() throw()
mpRoot = &aRoot;
aRoot.GetOldRoot().pER = &aRoot;
aRoot.GetOldRoot().eDateiTyp = Biff8;
-
+#if 0 // FIXME: Re-write this block without using SotStorage.
if ( SvtFilterOptions* pOptions = SvtFilterOptions::Get() )
if ( pShell && pOptions->IsLoadExcelBasicStorage() )
if ( sal_uInt32 nError
@@ -1118,7 +1119,7 @@ bool XclExpXmlStream::exportDocument() throw()
{
pShell->SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
}
-
+#endif
OUString const workbook = CREATE_OUSTRING( "xl/workbook.xml" );
PushStream( CreateOutputStream( workbook, workbook,
Reference <XOutputStream>(),