update ooo310-m15
[ooovba.git] / applied_patches / 0851-xlsx-shared-import-and-export.diff
bloba247ff61d40ff430b37641e686cf5d73f6705815
1 # For the purpose of the 3.1 release, instead of sharing the binary and ooxml
2 # export, we introduce a separate sc/source/filter/xlsx that creates libxlsx -
3 # a filter for the XLSX files. After the release, the changes will be
4 # reverted so that the binary and ooxml are shared again.
5 # The changes include:
6 # sc/source/filter/excel/* -> sc/source/filter/xlsx/xlsx-*
7 # sc/source/filter/inc/*.hxx -> sc/source/filter/xlsx/*.hxx
8 # scp2 introduction of libxlsx
9 diff --git oox/inc/oox/xls/excelfilter.hxx oox/inc/oox/xls/excelfilter.hxx
10 index 4ed3418..f1e2d65 100644
11 --- oox/inc/oox/xls/excelfilter.hxx
12 +++ oox/inc/oox/xls/excelfilter.hxx
13 @@ -58,6 +58,8 @@ public:
14 virtual const ::oox::drawingml::table::TableStyleListPtr getTableStyles();
15 virtual ::oox::drawingml::chart::ChartConverter& getChartConverter();
17 + virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rDescriptor ) throw( ::com::sun::star::uno::RuntimeException );
19 private:
20 virtual ::rtl::OUString implGetImplementationName() const;
22 diff --git oox/source/xls/excelfilter.cxx oox/source/xls/excelfilter.cxx
23 index cb02ba3..fcf3d3f 100644
24 --- oox/source/xls/excelfilter.cxx
25 +++ oox/source/xls/excelfilter.cxx
26 @@ -43,7 +43,9 @@ using ::com::sun::star::uno::Any;
27 using ::com::sun::star::uno::Reference;
28 using ::com::sun::star::uno::Sequence;
29 using ::com::sun::star::uno::Exception;
30 +using ::com::sun::star::uno::UNO_QUERY;
31 using ::com::sun::star::uno::XInterface;
32 +using ::com::sun::star::lang::XComponent;
33 using ::com::sun::star::lang::XMultiServiceFactory;
34 using ::com::sun::star::xml::sax::XFastDocumentHandler;
35 using ::oox::core::BinaryFilterBase;
36 @@ -143,6 +145,32 @@ const TableStyleListPtr ExcelFilter::getTableStyles()
37 return mpHelper->getChartConverter();
40 +sal_Bool SAL_CALL ExcelFilter::filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rDescriptor ) throw( ::com::sun::star::uno::RuntimeException )
42 + if ( XmlFilterBase::filter( rDescriptor ) )
43 + return true;
45 + if ( isExportFilter() )
46 + {
47 + Reference< XExporter > xExporter( getGlobalFactory()->createInstance( CREATE_OUSTRING( "com.sun.star.comp.oox.ExcelFilterExport" ) ), UNO_QUERY );
49 + if ( xExporter.is() )
50 + {
51 + Reference< XComponent > xDocument( getModel(), UNO_QUERY );
52 + Reference< XFilter > xFilter( xExporter, UNO_QUERY );
54 + if ( xFilter.is() )
55 + {
56 + xExporter->setSourceDocument( xDocument );
57 + if ( xFilter->filter( rDescriptor ) )
58 + return true;
59 + }
60 + }
61 + }
63 + return false;
66 OUString ExcelFilter::implGetImplementationName() const
68 return ExcelFilter_getImplementationName();
69 diff --git sc/inc/filter.hxx sc/inc/filter.hxx
70 index bc72301..275f787 100644
71 --- sc/inc/filter.hxx
72 +++ sc/inc/filter.hxx
73 @@ -72,7 +72,7 @@ enum EXCIMPFORMAT { EIF_AUTO, EIF_BIFF5, EIF_BIFF8, EIF_BIFF_LE4 };
75 // fuer Export
76 enum ExportFormatLotus { ExpWK1, ExpWK3, ExpWK4 };
77 -enum ExportFormatExcel { ExpBiff2, ExpBiff3, ExpBiff4, ExpBiff4W, ExpBiff5, ExpBiff8, Exp2007Xml };
78 +enum ExportFormatExcel { ExpBiff2, ExpBiff3, ExpBiff4, ExpBiff4W, ExpBiff5, ExpBiff8 };
81 // Optionen fuer DIF-Im-/Export (Kombination ueber '|')
82 diff --git sc/source/filter/excel/excdoc.cxx sc/source/filter/excel/excdoc.cxx
83 index ff03be7..0e213f6 100644
84 --- sc/source/filter/xlsx/xlsx-excdoc.cxx
85 +++ sc/source/filter/xlsx/xlsx-excdoc.cxx
86 @@ -769,19 +769,17 @@ void ExcDocument::Write( SvStream& rSvStrm )
87 pExpChangeTrack->Write();
90 -void ExcDocument::WriteXml( SvStream& rStrm )
91 +void ExcDocument::WriteXml( XclExpXmlStream& rStrm )
93 - XclExpXmlStream aStrm( ::comphelper::getProcessServiceFactory(), rStrm, GetRoot() );
95 SfxObjectShell* pDocShell = GetDocShell();
97 using namespace ::com::sun::star;
98 uno::Reference<document::XDocumentPropertiesSupplier> xDPS( pDocShell->GetModel(), uno::UNO_QUERY_THROW );
99 uno::Reference<document::XDocumentProperties> xDocProps = xDPS->getDocumentProperties();
101 - aStrm.exportDocumentProperties( xDocProps );
102 + rStrm.exportDocumentProperties( xDocProps );
104 - sax_fastparser::FSHelperPtr& rWorkbook = aStrm.GetCurrentStream();
105 + sax_fastparser::FSHelperPtr& rWorkbook = rStrm.GetCurrentStream();
106 rWorkbook->startElement( XML_workbook,
107 XML_xmlns, "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
108 FSNS(XML_xmlns, XML_r), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
109 @@ -800,7 +798,7 @@ void ExcDocument::WriteXml( SvStream& rStrm )
111 GetOldRoot().pEscher->GetStrm().Seek(0); // ready for take off
113 - aHeader.WriteXml( aStrm );
114 + aHeader.WriteXml( rStrm );
116 for( size_t nTab = 0, nTabCount = maTableList.GetSize(); nTab < nTabCount; ++nTab )
118 @@ -811,16 +809,16 @@ void ExcDocument::WriteXml( SvStream& rStrm )
119 xBoundsheet->SetStreamPos( aXclStrm.GetSvStreamPos() );
120 #endif
121 // write the table
122 - maTableList.GetRecord( nTab )->WriteXml( aStrm );
123 + maTableList.GetRecord( nTab )->WriteXml( rStrm );
127 if( pExpChangeTrack )
128 - pExpChangeTrack->WriteXml( aStrm );
129 + pExpChangeTrack->WriteXml( rStrm );
131 rWorkbook->endElement( XML_workbook );
132 rWorkbook.reset();
134 - aStrm.commit();
135 + rStrm.commit();
138 diff --git sc/source/filter/excel/excel.cxx sc/source/filter/excel/excel.cxx
139 index 1ae79fb..d19958d 100644
140 --- sc/source/filter/xlsx/xlsx-excel.cxx
141 +++ sc/source/filter/xlsx/xlsx-excel.cxx
142 @@ -250,25 +250,10 @@ static FltError lcl_ExportExcelBiff( SfxMedium& rMedium, ScDocument *pDocument,
143 return eRet;
146 -static FltError lcl_ExportExcel2007Xml( SfxMedium& rMedium, ScDocument *pDocument,
147 - SvStream* pMedStrm, CharSet eNach )
149 - SotStorageRef xRootStrg = (SotStorage*) 0;
151 - XclExpRootData aExpData( EXC_BIFF8, rMedium, xRootStrg, *pDocument, eNach );
152 - aExpData.meOutput = EXC_OUTPUT_XML_2007;
154 - ExportXml2007 aFilter( aExpData, *pMedStrm );
156 - FltError eRet = aFilter.Write();
158 - return eRet;
161 FltError ScFormatFilterPluginImpl::ScExportExcel5( SfxMedium& rMedium, ScDocument *pDocument,
162 ExportFormatExcel eFormat, CharSet eNach )
164 - if( eFormat != ExpBiff5 && eFormat != ExpBiff8 && eFormat != Exp2007Xml )
165 + if( eFormat != ExpBiff5 && eFormat != ExpBiff8 )
166 return eERR_NI;
168 // check the passed Calc document
169 @@ -283,8 +268,6 @@ FltError ScFormatFilterPluginImpl::ScExportExcel5( SfxMedium& rMedium, ScDocumen
170 FltError eRet = eERR_UNKN_BIFF;
171 if( eFormat == ExpBiff5 || eFormat == ExpBiff8 )
172 eRet = lcl_ExportExcelBiff( rMedium, pDocument, pMedStrm, eFormat == ExpBiff8, eNach );
173 - else if( eFormat == Exp2007Xml )
174 - eRet = lcl_ExportExcel2007Xml( rMedium, pDocument, pMedStrm, eNach );
176 return eRet;
178 diff --git sc/source/filter/excel/expop2.cxx sc/source/filter/excel/expop2.cxx
179 index bed1d2c..b4763c4 100644
180 --- sc/source/filter/xlsx/xlsx-expop2.cxx
181 +++ sc/source/filter/xlsx/xlsx-expop2.cxx
182 @@ -153,63 +153,3 @@ ExportBiff8::~ExportBiff8()
183 delete pExcRoot->pEscher;
184 pExcRoot->pEscher = NULL;
188 -ExportXml2007::ExportXml2007( XclExpRootData& rExpData, SvStream& rStrm )
189 - : ExportTyp( rStrm, &rExpData.mrDoc, rExpData.meTextEnc )
190 - , XclExpRoot( rExpData )
192 - pExcRoot = &GetOldRoot();
193 - pExcRoot->pER = this;
194 - pExcRoot->eDateiTyp = Biff8;
195 - pExcRoot->pEscher = new XclEscher( *pExcRoot->pER, GetDoc().GetTableCount() );
196 - pExcDoc = new ExcDocument( *this );
200 -ExportXml2007::~ExportXml2007()
202 - delete pExcRoot->pEscher;
203 - pExcRoot->pEscher = NULL;
205 - delete pExcDoc;
209 -FltError ExportXml2007::Write()
211 - SfxObjectShell* pDocShell = GetDocShell();
212 - DBG_ASSERT( pDocShell, "ExportXml2007::Write - no document shell" );
214 - SotStorageRef xRootStrg = GetRootStorage();
215 - DBG_ASSERT( xRootStrg.Is(), "ExportXml2007::Write - no root storage" );
217 - bool bWriteBasicCode = false;
218 - bool bWriteBasicStrg = false;
220 - if( SvtFilterOptions* pFilterOpt = SvtFilterOptions::Get() )
222 - bWriteBasicCode = pFilterOpt->IsLoadExcelBasicCode();
223 - bWriteBasicStrg = pFilterOpt->IsLoadExcelBasicStorage();
226 - if( pDocShell && xRootStrg.Is() && bWriteBasicStrg )
228 - SvxImportMSVBasic aBasicImport( *pDocShell, *xRootStrg, bWriteBasicCode, bWriteBasicStrg );
229 - ULONG nErr = aBasicImport.SaveOrDelMSVBAStorage( TRUE, EXC_STORAGE_VBA_PROJECT );
230 - if( nErr != ERRCODE_NONE )
231 - pDocShell->SetError( nErr );
234 - pExcDoc->ReadDoc(); // ScDoc -> ExcDoc
235 - pExcDoc->WriteXml( aOut ); // wechstreamen
237 - //! TODO: separate warnings for columns and sheets
238 - const XclExpAddressConverter& rAddrConv = GetAddressConverter();
239 - if( rAddrConv.IsColTruncated() || rAddrConv.IsRowTruncated() || rAddrConv.IsTabTruncated() )
240 - return SCWARN_EXPORT_MAXROW;
242 - return eERR_OK;
246 diff --git sc/source/filter/excel/xestream.cxx sc/source/filter/excel/xestream.cxx
247 index 33cd93b..a147e13 100644
248 --- sc/source/filter/xlsx/xlsx-xestream.cxx
249 +++ sc/source/filter/xlsx/xlsx-xestream.cxx
250 @@ -49,6 +49,11 @@
251 #include "rangelst.hxx"
252 #include "compiler.hxx"
254 +#include <../../ui/inc/docsh.hxx>
255 +#include <svtools/fltrcfg.hxx>
256 +#include <svx/svxmsbas.hxx>
257 +#include <excdoc.hxx>
259 #include <oox/core/tokens.hxx>
260 #include <formula/grammar.hxx>
261 #include <oox/export/drawingml.hxx>
262 @@ -58,14 +63,20 @@
263 using ::std::vector;
265 using ::com::sun::star::beans::PropertyValue;
266 +using ::com::sun::star::embed::XStorage;
267 using ::com::sun::star::io::XOutputStream;
268 using ::com::sun::star::io::XStream;
269 using ::com::sun::star::lang::XComponent;
270 using ::com::sun::star::lang::XMultiServiceFactory;
271 using ::com::sun::star::lang::XServiceInfo;
272 +using ::com::sun::star::lang::XSingleServiceFactory;
273 +using ::com::sun::star::registry::InvalidRegistryException;
274 +using ::com::sun::star::registry::XRegistryKey;
275 +using ::com::sun::star::uno::Exception;
276 using ::com::sun::star::uno::Reference;
277 using ::com::sun::star::uno::Sequence;
278 using ::com::sun::star::uno::UNO_QUERY;
279 +using ::com::sun::star::uno::XInterface;
280 using ::oox::drawingml::DrawingML;
281 using ::rtl::OString;
282 using ::rtl::OUString;
283 @@ -968,29 +979,10 @@ sax_fastparser::FSHelperPtr XclXmlUtils::WriteFontData( sax_fastparser::FSHelper
285 // ============================================================================
287 -XclExpXmlStream::XclExpXmlStream( const Reference< XMultiServiceFactory >& rSMgr, SvStream& rStrm, const XclExpRoot& rRoot )
288 - : XmlFilterBase( rSMgr )
289 - , mrRoot( rRoot )
290 +XclExpXmlStream::XclExpXmlStream( const Reference< XMultiServiceFactory >& rSMgr )
291 + : XmlFilterBase( rSMgr ),
292 + mpRoot( NULL )
294 - Sequence< PropertyValue > aArgs( 1 );
295 - const OUString sStream( RTL_CONSTASCII_USTRINGPARAM( "StreamForOutput" ) );
296 - aArgs[0].Name = sStream;
297 - aArgs[0].Value <<= Reference< XStream > ( new OStreamWrapper( rStrm ) );
299 - XServiceInfo* pInfo = rRoot.GetDocModelObj();
300 - Reference< XComponent > aComponent( pInfo, UNO_QUERY );
301 - setSourceDocument( aComponent );
302 - filter( aArgs );
304 - PushStream( CreateOutputStream(
305 - OUString::createFromAscii( "xl/workbook.xml" ),
306 - OUString::createFromAscii( "xl/workbook.xml" ),
307 - Reference< XOutputStream >(),
308 - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",
309 - "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" ) );
311 - DrawingML::ResetCounters();
312 - XclObjList::ResetCounters();
315 XclExpXmlStream::~XclExpXmlStream()
316 @@ -1108,14 +1100,59 @@ oox::drawingml::chart::ChartConverter& XclExpXmlStream::getChartConverter()
317 return * (oox::drawingml::chart::ChartConverter*) NULL;
320 -bool XclExpXmlStream::exportDocument() throw()
321 +ScDocShell* XclExpXmlStream::getDocShell()
323 - return false;
324 + Reference< XInterface > xModel( getModel(), UNO_QUERY );
326 + ScModelObj *pObj = dynamic_cast < ScModelObj* >( xModel.get() );
328 + if ( pObj )
329 + return reinterpret_cast < ScDocShell* >( pObj->GetEmbeddedObject() );
331 + return 0;
334 -::rtl::OUString XclExpXmlStream::implGetImplementationName() const
335 +bool XclExpXmlStream::exportDocument() throw()
337 - return CREATE_OUSTRING( "TODO" );
338 + ScDocShell* pShell = getDocShell();
339 + ScDocument* pDoc = pShell->GetDocument();
340 + SotStorageRef rStorage = dynamic_cast <SotStorage*>( Reference<XStorage>( pShell->GetStorage() ).get() );
342 + XclExpRootData aData( EXC_BIFF8, *pShell->GetMedium (), rStorage, *pDoc, RTL_TEXTENCODING_DONTKNOW );
343 + XclExpRoot aRoot( aData );
345 + mpRoot = &aRoot;
346 + aRoot.GetOldRoot().pER = &aRoot;
347 + aRoot.GetOldRoot().eDateiTyp = Biff8;
348 + XclEscher escher( *aRoot.GetOldRoot ().pER, pDoc->GetTableCount () );
349 + aRoot.GetOldRoot().pEscher = &escher;
351 + if ( SvtFilterOptions* pOptions = SvtFilterOptions::Get() )
352 + if ( pShell && pOptions->IsLoadExcelBasicStorage() )
353 + if ( sal_uInt32 nError
354 + = SvxImportMSVBasic( *pShell, *rStorage,
355 + pOptions->IsLoadExcelBasicCode(),
356 + pOptions->IsLoadExcelBasicStorage() )
357 + .SaveOrDelMSVBAStorage( true, EXC_STORAGE_VBA_PROJECT) )
359 + pShell->SetError( nError );
362 + OUString const workbook = CREATE_OUSTRING( "xl/workbook.xml" );
363 + PushStream( CreateOutputStream( workbook, workbook,
364 + Reference <XOutputStream>(),
365 + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",
366 + "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" ) );
368 + // destruct at the end of the block
370 + ExcDocument aDocRoot( aRoot );
371 + aDocRoot.ReadDoc();
372 + aDocRoot.WriteXml( *this );
375 + mpRoot = NULL;
376 + return true;
379 void XclExpXmlStream::Trace( const char* format, ...)
380 @@ -1126,3 +1163,98 @@ void XclExpXmlStream::Trace( const char* format, ...)
381 va_end( ap );
384 +//////////////////////////////////////////////////////////////////////////
385 +// UNO stuff so that the filter is registered
386 +//////////////////////////////////////////////////////////////////////////
388 +#define IMPL_NAME "com.sun.star.comp.oox.ExcelFilterExport"
390 +OUString XlsxExport_getImplementationName()
392 + return OUString( RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME ) );
395 +::rtl::OUString XclExpXmlStream::implGetImplementationName() const
397 + return CREATE_OUSTRING( "TODO" );
401 +Sequence< OUString > SAL_CALL XlsxExport_getSupportedServiceNames() throw()
403 + const OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.ExportFilter" ) );
404 + const Sequence< OUString > aSeq( &aServiceName, 1 );
405 + return aSeq;
408 +Reference< XInterface > SAL_CALL XlsxExport_createInstance(const Reference< XMultiServiceFactory > & rSMgr ) throw( Exception )
410 + return (cppu::OWeakObject*) new XclExpXmlStream( rSMgr );
413 +#ifdef __cplusplus
414 +extern "C"
416 +#endif
418 +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ )
420 + *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
423 +SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, void* pRegistryKey )
425 + sal_Bool bRet = sal_False;
427 + if( pRegistryKey )
429 + try
431 + Reference< XRegistryKey > xNewKey1(
432 + static_cast< XRegistryKey* >( pRegistryKey )->createKey(
433 + OUString::createFromAscii( IMPL_NAME "/UNO/SERVICES/" ) ) );
434 + xNewKey1->createKey( XlsxExport_getSupportedServiceNames().getConstArray()[0] );
436 + bRet = sal_True;
438 + catch( InvalidRegistryException& )
440 + OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
444 + return bRet;
447 +// ------------------------
448 +// - component_getFactory -
449 +// ------------------------
451 +SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ )
453 + Reference< XSingleServiceFactory > xFactory;
454 + void* pRet = 0;
456 + if ( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
458 + const OUString aServiceName( OUString::createFromAscii( IMPL_NAME ) );
460 + xFactory = Reference< XSingleServiceFactory >( ::cppu::createSingleFactory(
461 + reinterpret_cast< XMultiServiceFactory* >( pServiceManager ),
462 + XlsxExport_getImplementationName(),
463 + XlsxExport_createInstance,
464 + XlsxExport_getSupportedServiceNames() ) );
467 + if ( xFactory.is() )
469 + xFactory->acquire();
470 + pRet = xFactory.get();
473 + return pRet;
476 +#ifdef __cplusplus
478 +#endif
479 diff --git sc/source/filter/inc/excdoc.hxx sc/source/filter/inc/excdoc.hxx
480 index dd73a3e..26edc01 100644
481 --- sc/source/filter/xlsx/excdoc.hxx
482 +++ sc/source/filter/xlsx/excdoc.hxx
483 @@ -113,7 +113,7 @@ public:
485 void ReadDoc( void );
486 void Write( SvStream& rSvStrm );
487 - void WriteXml( SvStream& rSvStrm );
488 + void WriteXml( XclExpXmlStream& );
492 diff --git sc/source/filter/inc/exp_op.hxx sc/source/filter/inc/exp_op.hxx
493 index f696cc3..b0197c1 100644
494 --- sc/source/filter/xlsx/exp_op.hxx
495 +++ sc/source/filter/xlsx/exp_op.hxx
496 @@ -130,21 +130,6 @@ public:
500 -class ExportXml2007 : public ExportTyp, protected XclExpRoot
502 -private:
503 - ExcDocument* pExcDoc;
505 -protected:
506 - RootData* pExcRoot;
508 -public:
509 - ExportXml2007( XclExpRootData& rExpData, SvStream& rStrm );
510 - virtual ~ExportXml2007();
511 - FltError Write();
515 #endif
518 diff --git sc/source/filter/inc/xestream.hxx sc/source/filter/inc/xestream.hxx
519 index 172f054..fc986fb 100644
520 --- sc/source/filter/xlsx/xestream.hxx
521 +++ sc/source/filter/xlsx/xestream.hxx
522 @@ -269,6 +269,7 @@ private:
523 (s.Len() && s.GetChar( 0 ) != 0 ? XclXmlUtils::ToOString( s ).getStr() : NULL)
525 class ScAddress;
526 +class ScDocShell;
527 class ScDocument;
528 class ScFormulaCell;
529 class ScRange;
530 @@ -317,11 +318,11 @@ public:
531 class XclExpXmlStream : public oox::core::XmlFilterBase
533 public:
534 - XclExpXmlStream( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rSMgr, SvStream& rStrm, const XclExpRoot& rRoot );
535 + XclExpXmlStream( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rSMgr );
536 virtual ~XclExpXmlStream();
538 /** Returns the filter root data. */
539 - inline const XclExpRoot& GetRoot() const { return mrRoot; }
540 + inline const XclExpRoot& GetRoot() const { return *mpRoot; }
542 sax_fastparser::FSHelperPtr& GetCurrentStream();
543 void PushStream( sax_fastparser::FSHelperPtr aStream );
544 @@ -354,12 +355,13 @@ public:
545 void Trace( const char* format, ...);
546 private:
547 virtual ::rtl::OUString implGetImplementationName() const;
548 + ScDocShell *getDocShell();
550 typedef std::map< ::rtl::OUString,
551 std::pair< ::rtl::OUString,
552 sax_fastparser::FSHelperPtr > > XclExpXmlPathToStateMap;
554 - const XclExpRoot& mrRoot; /// Filter root data.
555 + const XclExpRoot* mpRoot;
556 std::stack< sax_fastparser::FSHelperPtr > maStreams;
557 XclExpXmlPathToStateMap maOpenedStreamMap;
559 diff --git sc/source/ui/docshell/docsh.cxx sc/source/ui/docshell/docsh.cxx
560 index 9ed459f..04825b9 100644
561 --- sc/source/ui/docshell/docsh.cxx
562 +++ sc/source/ui/docshell/docsh.cxx
563 @@ -166,7 +166,6 @@ static const sal_Char __FAR_DATA pFilterExcel95[] = "MS Excel 95";
564 static const sal_Char __FAR_DATA pFilterEx95Temp[] = "MS Excel 95 Vorlage/Template";
565 static const sal_Char __FAR_DATA pFilterExcel97[] = "MS Excel 97";
566 static const sal_Char __FAR_DATA pFilterEx97Temp[] = "MS Excel 97 Vorlage/Template";
567 -static const sal_Char __FAR_DATA pFilterEx07Xml[] = "Calc MS Excel 2007 XML";
568 static const sal_Char __FAR_DATA pFilterDBase[] = "dBase";
569 static const sal_Char __FAR_DATA pFilterDif[] = "DIF";
570 static const sal_Char __FAR_DATA pFilterSylk[] = "SYLK";
571 @@ -1954,8 +1953,7 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed )
573 else if (aFltName.EqualsAscii(pFilterExcel5) || aFltName.EqualsAscii(pFilterExcel95) ||
574 aFltName.EqualsAscii(pFilterExcel97) || aFltName.EqualsAscii(pFilterEx5Temp) ||
575 - aFltName.EqualsAscii(pFilterEx95Temp) || aFltName.EqualsAscii(pFilterEx97Temp) ||
576 - aFltName.EqualsAscii(pFilterEx07Xml))
577 + aFltName.EqualsAscii(pFilterEx95Temp) || aFltName.EqualsAscii(pFilterEx97Temp))
579 WaitObject aWait( GetActiveDialogParent() );
581 @@ -2008,8 +2006,6 @@ BOOL __EXPORT ScDocShell::ConvertTo( SfxMedium &rMed )
582 ExportFormatExcel eFormat = ExpBiff5;
583 if( aFltName.EqualsAscii( pFilterExcel97 ) || aFltName.EqualsAscii( pFilterEx97Temp ) )
584 eFormat = ExpBiff8;
585 - if( aFltName.EqualsAscii( pFilterEx07Xml ) )
586 - eFormat = Exp2007Xml;
587 FltError eError = ScFormatFilter::Get().ScExportExcel5( rMed, &aDocument, eFormat, RTL_TEXTENCODING_MS_1252 );
589 if( eError && !GetError() )
590 # disabled for the temporary libxlsx diff --git sc/util/scfilt.map sc/util/scfilt.map
591 # disabled for the temporary libxlsx index 589736f..dc24c02 100644
592 # disabled for the temporary libxlsx --- sc/util/scfilt.map
593 # disabled for the temporary libxlsx +++ sc/util/scfilt.map
594 # disabled for the temporary libxlsx @@ -1,6 +1,9 @@
595 # disabled for the temporary libxlsx SCFILT_1_0 {
596 # disabled for the temporary libxlsx global:
597 # disabled for the temporary libxlsx ScFilterCreate;
598 # disabled for the temporary libxlsx + component_getImplementationEnvironment;
599 # disabled for the temporary libxlsx + component_writeInfo;
600 # disabled for the temporary libxlsx + component_getFactory;
601 # disabled for the temporary libxlsx local:
602 # disabled for the temporary libxlsx *;
603 # disabled for the temporary libxlsx };
604 # disabled for the temporary libxlsx diff --git scp2/source/calc/file_calc.scp scp2/source/calc/file_calc.scp
605 # disabled for the temporary libxlsx index e49770f..4674990 100644
606 # disabled for the temporary libxlsx --- scp2/source/calc/file_calc.scp
607 # disabled for the temporary libxlsx +++ scp2/source/calc/file_calc.scp
608 # disabled for the temporary libxlsx @@ -49,7 +49,7 @@ STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Sc, sc)
609 # disabled for the temporary libxlsx
610 # disabled for the temporary libxlsx STD_LIB_FILE_PATCH( gid_File_Lib_Scui, scui)
611 # disabled for the temporary libxlsx
612 # disabled for the temporary libxlsx -STD_LIB_FILE( gid_File_Lib_Scfilt, scfilt)
613 # disabled for the temporary libxlsx +STD_UNO_LIB_FILE( gid_File_Lib_Scfilt, scfilt)
614 # disabled for the temporary libxlsx
615 # disabled for the temporary libxlsx STD_UNO_LIB_FILE( gid_File_Lib_Scd, scd)
616 # disabled for the temporary libxlsx
617 --- scp2/source/calc/file_calc.scp
618 +++ scp2/source/calc/file_calc.scp
619 @@ -49,6 +49,8 @@ STD_UNO_LIB_FILE_PATCH( gid_File_Lib_Sc, sc)
620 STD_LIB_FILE_PATCH( gid_File_Lib_Scui, scui)
622 STD_LIB_FILE_PATCH( gid_File_Lib_Scfilt, scfilt)
624 +STD_UNO_LIB_FILE( gid_File_Lib_Xlsx, xlsx)
626 STD_UNO_LIB_FILE( gid_File_Lib_Scd, scd)
628 --- scp2/source/calc/module_calc.scp 2009-01-06 14:16:56.000000000 +0100
629 +++ scp2/source/calc/module_calc.scp 2009-04-30 09:36:28.000000000 +0200
630 @@ -45,7 +45,7 @@ Module gid_Module_Prg_Calc_Bin
631 Minimal = YES;
632 Default = YES;
633 Styles = (HIDDEN_ROOT);
634 - Files = (gid_File_Lib_Calc,gid_File_Lib_Sc,gid_File_Lib_Scui,gid_File_Lib_Scfilt,gid_File_Lib_Scd,gid_File_Extra_Urldesktop_Calc,gid_File_Extra_Urlnew_Calc,gid_File_Extra_Urlstart_Calc,gid_File_Extra_Urltasks_Calc,gid_File_Oo_Office_Filter_Calc_Pkg,gid_File_Share_Config_Sofficecfg_Calc_Menubar_Xml,
635 + Files = (gid_File_Lib_Calc,gid_File_Lib_Sc,gid_File_Lib_Scui,gid_File_Lib_Scfilt,gid_File_Lib_Xlsx,gid_File_Lib_Scd,gid_File_Extra_Urldesktop_Calc,gid_File_Extra_Urlnew_Calc,gid_File_Extra_Urlstart_Calc,gid_File_Extra_Urltasks_Calc,gid_File_Oo_Office_Filter_Calc_Pkg,gid_File_Share_Config_Sofficecfg_Calc_Menubar_Xml,
636 gid_File_Lib_Solver,gid_File_Lib_Lpsolve,
637 gid_File_Oo_Office_Ui_Calccommands_Xcs,gid_File_Oo_Office_Ui_Calccommands_Xcu,gid_File_Oo_Office_Ui_Calcwindowstate_Xcs,
638 gid_File_Registry_Spool_Oo_Common_Calc_Xcu,gid_File_Registry_Spool_Oo_Setup_Calc_Xcu, gid_File_Registry_Spool_Oo_Office_Embedding_Calc_Xcu,