[ooo-build-commit] Branch 'ooo-build-3-2' - patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Tue Dec 22 13:54:47 PST 2009


 patches/dev300/apply                                        |    3 +
 patches/dev300/xlsx-export-no-more-svstream-sotstorage.diff |   36 ++++++++++++
 2 files changed, 39 insertions(+)

New commits:
commit 1f08c7354e05f6f640d5b0fd0dc0909f4ae68be8
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Dec 22 16:48:40 2009 -0500

    Fixed a General I/O Error problem when saving ods document as xlsx.
    
    This problem was caused by use of SvStream/SotStorage inside the xlsx
    export filter.  Most of the filter code now properly use UNO's
    XOutputStream instance to write to an output stream, so let's remove
    the part that still uses SvStream. (n#566581)
    
    * patches/dev300/apply: new patch
    
    * patches/dev300/xlsx-export-no-more-svstream-sotstorage.diff: remove
      the part that relies on SvStream/SotStorage pair.  This removes the
      VBA export part temporarily, until that gets re-written to work with
      XOutputStream.

diff --git a/patches/dev300/apply b/patches/dev300/apply
index a157956..a977577 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3097,6 +3097,9 @@ oox-calc-export-sotstorage-init.diff, n#505917, janneke
 
 xlsx-export-row-limit-fix.diff, n#504623, kohei
 
+# No more SvStream/SotStorage as they conflict with their UNO counterparts.
+xlsx-export-no-more-svstream-sotstorage.diff, n#566581, kohei
+
 [ OOXMLExport ]
 # hack to ignore writerfilter when odf-converter is present
 odf-converter-ignore-writerfilter.diff, n#348471, n#502173, jholesov
diff --git a/patches/dev300/xlsx-export-no-more-svstream-sotstorage.diff b/patches/dev300/xlsx-export-no-more-svstream-sotstorage.diff
new file mode 100644
index 0000000..32309e2
--- /dev/null
+++ b/patches/dev300/xlsx-export-no-more-svstream-sotstorage.diff
@@ -0,0 +1,36 @@
+diff --git sc/source/filter/xlsx/xlsx-xestream.cxx sc/source/filter/xlsx/xlsx-xestream.cxx
+index 7a57718..36ab09e 100644
+--- sc/source/filter/xlsx/xlsx-xestream.cxx
++++ sc/source/filter/xlsx/xlsx-xestream.cxx
+@@ -1129,9 +1129,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;
+@@ -1147,7 +1148,7 @@ bool XclExpXmlStream::exportDocument() throw()
+     aRoot.GetOldRoot().eDateiTyp = Biff8;
+     XclEscher escher( *aRoot.GetOldRoot ().pER, pDoc->GetTableCount () );
+     aRoot.GetOldRoot().pEscher = &escher;
+-
++#if 0 // FIXME: Re-write this block without using SotStorage.
+     if ( SvtFilterOptions* pOptions = SvtFilterOptions::Get() )
+         if ( pShell && pOptions->IsLoadExcelBasicStorage() )
+             if ( sal_uInt32 nError
+@@ -1158,7 +1159,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>(),


More information about the ooo-build-commit mailing list